ws_fade=function(a){var d=jQuery;a.duration=a.duration||1000;var e=[];var b=0;this.init=function(f){e=d("img",f).get();d(e).each(function(g){if(!g){d(this).show()}else{d(this).hide()}})};this.go=function(f){d(e).each(function(g){if(g==f){d(this).fadeIn(a.duration)}if(g==b){d(this).fadeOut(a.duration)}});b=f;return true}};jQuery.fn.wowSlider=function(b){var h=this;var e=jQuery;b=e.extend({effect:function(f){var d;this.init=function(t){d=t.find("img");d.each(function(C){if(!C){e(this).show()}else{e(this).hide()}})};this.go=function(t,C){e(d.get(t)).fadeIn(f.duration);e(d.get(C)).fadeOut(f.duration);return true}},prev:"",next:"",duration:1000,delay:20*100,outWidth:960,outHeight:360,width:960,height:360,caption:true,controls:true,autoPlay:true,bullets:true,onStep:function(){},stopOnHover:0},b);var z=h.find(".ws_images A");var j=z.find("IMG");z.each(function(f){var d=e(this).html()||"";var t=d.indexOf(">",d);if(t>=0){e(this).data("descr",d.substr(t+1));if(t<d.length-1){e(this).html(d.substr(0,t+1))}}e(this).css({"font-size":0})});var s=z.length;var l=e("A.ws_frame",h).get(0);var a=0;function r(d){if(a==d){return}var f=n.go(d,a);if(!f){return}if(typeof f!="object"){f=z[d]}a=d;q(d);if(b.caption){i(f)}b.onStep(a)}function q(d){if(b.bullets){m(d)}if(l){l.setAttribute("href",z.get(d).href)}}var o;function w(){u();if(b.autoPlay){o=setTimeout(function(){r(a<s-1?a+1:0);w()},b.delay+b.duration)}}function u(){if(o){clearTimeout(o)}o=null}function x(f,d){u();f.preventDefault();r(d);w()}z.find("IMG").css("position","absolute");if(typeof b.effect=="string"){b.effect=window["ws_"+b.effect]}var n=new b.effect(b,h);n.init(e(".ws_images",h));z.find("IMG").css("visibility","visible");var p=c=e(".ws_images",h);var k="WOWSlider.com";c=k?e("<div></div>"):0;if(c){c.css({position:"absolute",right:"2px",bottom:"2px",padding:"0 0 0 0"});p.append(c)}if(c&&document.all){var y=e('<iframe src="javascript:false"></iframe>');y.css({position:"absolute",left:0,top:0,width:"100%",height:"100%",filter:"alpha(opacity=0)"});y.attr({scrolling:"no",framespacing:0,border:0,frameBorder:"no"});c.append(y)}var A=c?e(document.createElement("A")):c;if(A){A.css({position:"relative",display:"block","background-color":"#CCC",color:"#837F80","font-family":"Lucida Grande,sans-serif","font-size":"11px","font-weight":"normal","font-style":"normal","-moz-border-radius":"5px","border-radius":"5px",padding:"1px 5px",width:"auto",height:"auto",margin:"0 0 0 0",outline:"none"});A.attr({href:"http://"+k.toLowerCase()});A.html(k);A.bind("contextmenu",function(d){return false});c.append(A)}if(b.controls){var v=e('<a href="#" class="ws_next">'+b.next+"</a>");var g=e('<a href="#" class="ws_prev">'+b.prev+"</a>");h.append(v);h.append(g);v.bind("click",function(d){x(d,a<s-1?a+1:0)});g.bind("click",function(d){x(d,a>0?a-1:s-1)})}function B(){$bullets_cont=h.find(".ws_bullets>div");$bullets=e("a",$bullets_cont);$bullets.click(function(E){x(E,e(E.target).index())});$thumbs=$bullets.find("IMG");if($thumbs.length){var C=e('<div class="ws_bulframe"/>').appendTo($bullets_cont);var f=e("<div/>").css({width:$thumbs.length+1+"00%"}).appendTo(e("<div/>").appendTo(C));$thumbs.appendTo(f);e("<span/>").appendTo(C);var t=-1;function D(F){if(F<0){F=0}e($bullets.get(t)).removeClass("ws_overbull");e($bullets.get(F)).addClass("ws_overbull");C.show();var G={left:$bullets.get(F).offsetLeft-C.width()/2};var E={left:-$thumbs.get(F).offsetLeft};if(t<0){C.css(G);f.css(E)}else{if(!document.all){G.opacity=1}C.stop().animate(G,"fast");f.stop().animate(E,"fast")}t=F}$bullets.hover(function(){D(e(this).index())});var d;$bullets_cont.hover(function(){if(d){clearTimeout(d);d=0}D(t)},function(){$bullets.removeClass("ws_overbull");if(document.all){if(!d){d=setTimeout(function(){C.hide();d=0},400)}}else{C.stop().animate({opacity:0},{duration:"fast",complete:function(){C.hide()}})}});$bullets_cont.click(function(E){x(E,e(E.target).index())})}}function m(d){e(".ws_bullets A",h).each(function(f){if(f==d){e(this).addClass("ws_selbull")}else{e(this).removeClass("ws_selbull")}})}if(b.caption){$caption=e("<div class='ws-title' style='display:none'></div>");h.append($caption);$caption.bind("mouseover",function(d){u()});$caption.bind("mouseout",function(d){w()})}function i(d){var C=e("img",d).attr("title");var t=e(d).data("descr");var f=e(".ws-title",h);f.hide();if(C||t){f.html((C?"<span>"+C+"</span>":"")+(t?"<div>"+t+"</div>":""));f.fadeIn(400,function(){if(e.browser.msie){e(this).get(0).style.removeAttribute("filter")}})}}if(b.bullets){B()}q(0);if(b.caption){i(z[0])}if(b.stopOnHover){this.bind("mouseover",function(d){u()});this.bind("mouseout",function(d){w()})}w();return this};jQuery("#wowslider-container1").wowSlider({effect:"fade",prev:"prev",next:"next",duration:10*100,delay:20*100,outWidth:980,outHeight:392,width:980,height:392,caption:true,controls:true,autoPlay:true,bullets:true,stopOnHover:true});



// FROM: http://www.kitsfest.com/wp-content/themes/Kitsfest_WP_Theme/js/twitter.js
function twitterCallback2(twitters){var statusHTML=[];for(var i=0;i<twitters.length;i++){var username=twitters[i].user.screen_name;var status=twitters[i].text.replace(/((https?|s?ftp|ssh)\:\/\/[^"\s\<\>]*[^.,;'">\:\s\<\>\)\]\!])/g,function(url){return'<a href="'+url+'">'+url+'</a>'}).replace(/\B@([_a-z0-9]+)/ig,function(reply){return reply.charAt(0)+'<a href="http://twitter.com/'+reply.substring(1)+'">'+reply.substring(1)+'</a>'});statusHTML.push('<li><span>'+status+'</span> <a style="font-size:85%" href="http://twitter.com/'+username+'/statuses/'+twitters[i].id+'">'+relative_time(twitters[i].created_at)+'</a></li>')}document.getElementById('twitter_update_list').innerHTML=statusHTML.join('')}function relative_time(time_value){var values=time_value.split(" ");time_value=values[1]+" "+values[2]+", "+values[5]+" "+values[3];var parsed_date=Date.parse(time_value);var relative_to=(arguments.length>1)?arguments[1]:new Date();var delta=parseInt((relative_to.getTime()-parsed_date)/1000);delta=delta+(relative_to.getTimezoneOffset()*60);if(delta<60){return'less than a minute ago'}else if(delta<120){return'about a minute ago'}else if(delta<(60*60)){return(parseInt(delta/60)).toString()+' minutes ago'}else if(delta<(120*60)){return'about an hour ago'}else if(delta<(24*60*60)){return'about '+(parseInt(delta/3600)).toString()+' hours ago'}else if(delta<(48*60*60)){return'1 day ago'}else{return(parseInt(delta/86400)).toString()+' days ago'}}


