(function(a){a.prettyPhoto={version:"2.5.4"};a.fn.prettyPhoto=function(u){u=jQuery.extend({animationSpeed:"normal",padding:40,opacity:0.8,showTitle:true,allowresize:true,counter_separator_label:"/",theme:"light_rounded",hideflash:false,modal:false,changepicturecallback:function(){},callback:function(){}},u);if(a.browser.msie&&a.browser.version==6){u.theme="light_square";}if(a(".pp_overlay").size()==0){v();}else{o=a(".pp_pic_holder");y=a(".ppt");}var d=true,h=false,t,o,y,m,n,s,w,e="image",c=0,j=f();a(window).scroll(function(){j=f();i();r();});a(window).resize(function(){i();r();});a(document).keydown(function(z){if(o.is(":visible")){switch(z.keyCode){case 37:a.prettyPhoto.changePage("previous");break;case 39:a.prettyPhoto.changePage("next");break;case 27:if(!u.modal){a.prettyPhoto.close();}break;}}});a(this).each(function(){a(this).bind("click",function(){link=this;theRel=a(this).attr("rel");galleryRegExp=/\[(?:.*)\]/;theGallery=galleryRegExp.exec(theRel);var z=new Array(),B=new Array(),A=new Array();if(theGallery){a("a[rel*="+theGallery+"]").each(function(C){if(a(this)[0]===a(link)[0]){c=C;}z.push(a(this).attr("href"));B.push(a(this).find("img").attr("alt"));A.push(a(this).attr("title"));});}else{z=a(this).attr("href");B=(a(this).find("img").attr("alt"))?a(this).find("img").attr("alt"):"";A=(a(this).attr("title"))?a(this).attr("title"):"";}a.prettyPhoto.open(z,B,A);return false;});});a.prettyPhoto.open=function(B,A,z){if(a.browser.msie&&a.browser.version==6){a("select").css("visibility","hidden");}if(u.hideflash){a("object,embed").css("visibility","hidden");}images=a.makeArray(B);titles=a.makeArray(A);descriptions=a.makeArray(z);if(a(".pp_overlay").size()==0){v();}else{o=a(".pp_pic_holder");y=a(".ppt");}o.attr("class","pp_pic_holder "+u.theme);isSet=(a(images).size()>0)?true:false;x(images[c]);i();g(a(images).size());a(".pp_loaderIcon").show();a("div.pp_overlay").show().fadeTo(u.animationSpeed,u.opacity,function(){o.fadeIn(u.animationSpeed,function(){o.find("p.currentTextHolder").text((c+1)+u.counter_separator_label+a(images).size());if(descriptions[c]){o.find(".pp_description").show().html(unescape(descriptions[c]));}else{o.find(".pp_description").hide().text("");}if(titles[c]&&u.showTitle){hasTitle=true;y.html(unescape(titles[c]));}else{hasTitle=false;}if(e=="image"){imgPreloader=new Image();nextImage=new Image();if(isSet&&c>a(images).size()){nextImage.src=images[c+1];}prevImage=new Image();if(isSet&&images[c-1]){prevImage.src=images[c-1];}pp_typeMarkup='<img id="fullResImage" src="" />';o.find("#pp_full_res")[0].innerHTML=pp_typeMarkup;o.find(".pp_content").css("overflow","hidden");o.find("#fullResImage").attr("src",images[c]);imgPreloader.onload=function(){t=l(imgPreloader.width,imgPreloader.height);_showContent();};imgPreloader.src=images[c];}else{movie_width=(parseFloat(b("width",images[c])))?b("width",images[c]):"425";movie_height=(parseFloat(b("height",images[c])))?b("height",images[c]):"344";if(movie_width.indexOf("%")!=-1||movie_height.indexOf("%")!=-1){movie_height=(a(window).height()*parseFloat(movie_height)/100)-100;movie_width=(a(window).width()*parseFloat(movie_width)/100)-100;h=true;}movie_height=parseFloat(movie_height);movie_width=parseFloat(movie_width);if(e=="quicktime"){movie_height+=15;}t=l(movie_width,movie_height);if(e=="youtube"){pp_typeMarkup='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+t.width+'" height="'+t.height+'"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.youtube.com/v/'+b("v",images[c])+'" /><embed src="http://www.youtube.com/v/'+b("v",images[c])+'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+t.width+'" height="'+t.height+'"></embed></object>';}else{if(e=="quicktime"){pp_typeMarkup='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="'+t.height+'" width="'+t.width+'"><param name="src" value="10-prettyPhoto/js/'+images[c]+'"><param name="autoplay" value="true"><param name="type" value="video/quicktime"><embed src="10-prettyPhoto/js/'+images[c]+'" height="'+t.height+'" width="'+t.width+'" autoplay="true" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>';}else{if(e=="flash"){flash_vars=images[c];flash_vars=flash_vars.substring(images[c].indexOf("flashvars")+10,images[c].length);filename=images[c];filename=filename.substring(0,filename.indexOf("?"));pp_typeMarkup='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+t.width+'" height="'+t.height+'"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="10-prettyPhoto/js/'+filename+"?"+flash_vars+'" /><embed src="10-prettyPhoto/js/'+filename+"?"+flash_vars+'" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="'+t.width+'" height="'+t.height+'"></embed></object>';}else{if(e=="iframe"){movie_url=images[c];movie_url=movie_url.substr(0,movie_url.indexOf("iframe")-1);pp_typeMarkup='<iframe src ="'+movie_url+'" width="'+(t.width-10)+'" height="'+(t.height-10)+'" frameborder="no"></iframe>';}}}}_showContent();}});});};a.prettyPhoto.changePage=function(z){if(z=="previous"){c--;if(c<0){c=0;return;}}else{if(a(".pp_arrow_next").is(".disabled")){return;}c++;}if(!d){d=true;}k();a("a.pp_expand,a.pp_contract").fadeOut(u.animationSpeed,function(){a(this).removeClass("pp_contract").addClass("pp_expand");a.prettyPhoto.open(images,titles,descriptions);});};a.prettyPhoto.close=function(){o.find("object,embed").css("visibility","hidden");a("div.pp_pic_holder,div.ppt").fadeOut(u.animationSpeed);a("div.pp_overlay").fadeOut(u.animationSpeed,function(){a("div.pp_overlay,div.pp_pic_holder,div.ppt").remove();if(a.browser.msie&&a.browser.version==6){a("select").css("visibility","visible");}if(u.hideflash){a("object,embed").css("visibility","visible");}c=0;u.callback();});d=true;};_showContent=function(){a(".pp_loaderIcon").hide();if(a.browser.opera){windowHeight=window.innerHeight;windowWidth=window.innerWidth;}else{windowHeight=a(window).height();windowWidth=a(window).width();}projectedTop=j.scrollTop+((windowHeight/2)-(t.containerHeight/2));if(projectedTop<0){projectedTop=0+o.find(".ppt").height();}o.find(".pp_content").animate({height:t.contentHeight},u.animationSpeed);o.animate({top:projectedTop,left:((windowWidth/2)-(t.containerWidth/2)),width:t.containerWidth},u.animationSpeed,function(){o.width(t.containerWidth);o.find(".pp_hoverContainer,#fullResImage").height(t.height).width(t.width);o.find("#pp_full_res").fadeIn(u.animationSpeed);if(isSet&&e=="image"){o.find(".pp_hoverContainer").fadeIn(u.animationSpeed);}else{o.find(".pp_hoverContainer").hide();}o.find(".pp_details").fadeIn(u.animationSpeed);if(u.showTitle&&hasTitle){y.css({top:o.offset().top-20,left:o.offset().left+(u.padding/2),display:"none"});y.fadeIn(u.animationSpeed);}if(t.resized){a("a.pp_expand,a.pp_contract").fadeIn(u.animationSpeed);}if(e!="image"){o.find("#pp_full_res")[0].innerHTML=pp_typeMarkup;}u.changepicturecallback();});};function k(){o.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");o.find(".pp_hoverContainer,.pp_details").fadeOut(u.animationSpeed);o.find("#pp_full_res").fadeOut(u.animationSpeed,function(){a(".pp_loaderIcon").show();});y.fadeOut(u.animationSpeed);}function g(z){if(c==z-1){o.find("a.pp_next").css("visibility","hidden");o.find("a.pp_arrow_next").addClass("disabled").unbind("click");}else{o.find("a.pp_next").css("visibility","visible");o.find("a.pp_arrow_next.disabled").removeClass("disabled").bind("click",function(){a.prettyPhoto.changePage("next");return false;});}if(c==0){o.find("a.pp_previous").css("visibility","hidden");o.find("a.pp_arrow_previous").addClass("disabled").unbind("click");}else{o.find("a.pp_previous").css("visibility","visible");o.find("a.pp_arrow_previous.disabled").removeClass("disabled").bind("click",function(){a.prettyPhoto.changePage("previous");return false;});}if(z>1){a(".pp_nav").show();}else{a(".pp_nav").hide();}}function l(A,z){hasBeenResized=false;q(A,z);imageWidth=A;imageHeight=z;windowHeight=a(window).height();windowWidth=a(window).width();if(((w>windowWidth)||(s>windowHeight))&&d&&u.allowresize&&!h){hasBeenResized=true;notFitting=true;while(notFitting){if((w>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(z/A)*imageWidth;}else{if((s>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(A/z)*imageHeight;}else{notFitting=false;}}s=imageHeight;w=imageWidth;}q(imageWidth,imageHeight);}return{width:imageWidth,height:imageHeight,containerHeight:s,containerWidth:w,contentHeight:m,contentWidth:n,resized:hasBeenResized};}function q(A,z){o.find(".pp_details").width(A).find(".pp_description").width(A-parseFloat(o.find("a.pp_close").css("width")));m=z+o.find(".pp_details").height()+parseFloat(o.find(".pp_details").css("marginTop"))+parseFloat(o.find(".pp_details").css("marginBottom"));n=A;s=m+o.find(".ppt").height()+o.find(".pp_top").height()+o.find(".pp_bottom").height();w=A+u.padding;}function x(z){if(z.match(/youtube\.com\/watch/i)){e="youtube";}else{if(z.indexOf(".mov")!=-1){e="quicktime";}else{if(z.indexOf(".swf")!=-1){e="flash";}else{if(z.indexOf("iframe")!=-1){e="iframe";}else{e="image";}}}}}function i(){if(a.browser.opera){windowHeight=window.innerHeight;windowWidth=window.innerWidth;}else{windowHeight=a(window).height();windowWidth=a(window).width();}if(d){$pHeight=o.height();$pWidth=o.width();$tHeight=y.height();projectedTop=(windowHeight/2)+j.scrollTop-($pHeight/2);if(projectedTop<0){projectedTop=0+$tHeight;}o.css({top:projectedTop,left:(windowWidth/2)+j.scrollLeft-($pWidth/2)});y.css({top:projectedTop-$tHeight,left:(windowWidth/2)+j.scrollLeft-($pWidth/2)+(u.padding/2)});}}function f(){if(self.pageYOffset){scrollTop=self.pageYOffset;scrollLeft=self.pageXOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){scrollTop=document.documentElement.scrollTop;scrollLeft=document.documentElement.scrollLeft;}else{if(document.body){scrollTop=document.body.scrollTop;scrollLeft=document.body.scrollLeft;}}}return{scrollTop:scrollTop,scrollLeft:scrollLeft};}function r(){a("div.pp_overlay").css({height:a(document).height(),width:a(window).width()});}function v(){toInject="";toInject+="<div class='pp_overlay'></div>";toInject+='<div class="pp_pic_holder"><div class="pp_top"><div class="pp_left"></div><div class="pp_middle"></div><div class="pp_right"></div></div><div class="pp_content"><a href="#" class="pp_expand" title="Expand the image">Expand</a><div class="pp_loaderIcon"></div><div class="pp_hoverContainer"><a class="pp_next" href="#">next</a><a class="pp_previous" href="#">previous</a></div><div id="pp_full_res"></div><div class="pp_details clearfix"><a class="pp_close" href="#">Close</a><p class="pp_description"></p><div class="pp_nav"><a href="#" class="pp_arrow_previous">Previous</a><p class="currentTextHolder">0'+u.counter_separator_label+'0</p><a href="#" class="pp_arrow_next">Next</a></div></div></div><div class="pp_bottom"><div class="pp_left"></div><div class="pp_middle"></div><div class="pp_right"></div></div></div>';toInject+='<div class="ppt"></div>';a("body").append(toInject);a("div.pp_overlay").css("opacity",0);o=a(".pp_pic_holder");y=a(".ppt");a("div.pp_overlay").css("height",a(document).height()).hide().bind("click",function(){if(!u.modal){a.prettyPhoto.close();}});a("a.pp_close").bind("click",function(){a.prettyPhoto.close();return false;});a("a.pp_expand").bind("click",function(){$this=a(this);if($this.hasClass("pp_expand")){$this.removeClass("pp_expand").addClass("pp_contract");d=false;}else{$this.removeClass("pp_contract").addClass("pp_expand");d=true;}k();o.find(".pp_hoverContainer, .pp_details").fadeOut(u.animationSpeed);o.find("#pp_full_res").fadeOut(u.animationSpeed,function(){a.prettyPhoto.open(images,titles,descriptions);});return false;});o.find(".pp_previous, .pp_arrow_previous").bind("click",function(){a.prettyPhoto.changePage("previous");return false;});o.find(".pp_next, .pp_arrow_next").bind("click",function(){a.prettyPhoto.changePage("next");return false;});o.find(".pp_hoverContainer").css({"margin-left":u.padding/2});}};function b(e,d){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var c="[\\?&]"+e+"=([^&#]*)";var g=new RegExp(c);var f=g.exec(d);if(f==null){return"";}else{return f[1];}}})(jQuery);(function(b){var a=b.preload=function(f,h){if(f.split){f=b(f);}h=b.extend({},a.defaults,h);var c=b.map(f,function(l){if(!l){return;}if(l.split){return h.base+l+h.ext;}var k=l.src||l.href;if(typeof h.placeholder=="string"&&l.src){l.src=h.placeholder;}if(k&&h.find){k=k.replace(h.find,h.replace);}return k||null;});var i={loaded:0,failed:0,next:0,done:0,total:c.length};if(!i.total){return d();}var j=b(Array(h.threshold+1).join("<img/>")).load(g).error(g).bind("abort",g).each(e);function g(k){i.element=this;i.found=k.type=="load";i.image=this.src;i.index=this.index;var l=i.original=f[this.index];i[i.found?"loaded":"failed"]++;i.done++;if(h.enforceCache){a.cache.push(b("<img/>").attr("src",i.image)[0]);}if(h.placeholder&&l.src){l.src=i.found?i.image:h.notFound||l.src;}if(h.onComplete){h.onComplete(i);}if(i.done<i.total){e(0,this);}else{if(j&&j.unbind){j.unbind("load").unbind("error").unbind("abort");}j=null;d();}}function e(m,l,k){if(l.attachEvent&&i.next&&i.next%a.gap==0&&!k){setTimeout(function(){e(m,l,true);},0);return false;}if(i.next==i.total){return false;}l.index=i.next;l.src=c[i.next++];if(h.onRequest){i.index=l.index;i.element=l;i.image=l.src;i.original=f[i.next-1];h.onRequest(i);}}function d(){if(h.onFinish){h.onFinish(i);}}};a.gap=14;a.cache=[];a.defaults={threshold:2,base:"",ext:"",replace:""};b.fn.preload=function(c){a(this,c);return this;};})(jQuery); (function(i){var l="2.72";if(i.support==undefined){i.support={opacity:!(i.browser.msie)};}function a(q){if(i.fn.cycle.debug){f(q);}}function f(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}i.fn.cycle=function(r,q){var s={s:this.selector,c:this.context};if(this.length===0&&r!="stop"){if(!i.isReady&&s.s){f("DOM not ready, queuing slideshow");i(function(){i(s.s,s.c).cycle(r,q);});return this;}f("terminating; zero elements found by selector"+(i.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var w=m(this,r,q);if(w===false){return;}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var x=i(this);var y=w.slideExpr?i(w.slideExpr,this):x.children();var u=y.get();if(u.length<2){f("terminating; too few slides: "+u.length);return;}var t=k(x,y,u,w,s);if(t===false){return;}var v=t.continuous?10:h(t.currSlide,t.nextSlide,t,!t.rev);if(v){v+=(t.delay||0);if(v<10){v=10;}a("first timeout: "+v);this.cycleTimeout=setTimeout(function(){e(u,t,0,!t.rev);},v);}});};function m(q,t,r){if(q.cycleStop==undefined){q.cycleStop=0;}if(t===undefined||t===null){t={};}if(t.constructor==String){switch(t){case"stop":q.cycleStop++;if(q.cycleTimeout){clearTimeout(q.cycleTimeout);}q.cycleTimeout=0;i(q).removeData("cycle.opts");return false;case"pause":q.cyclePause=1;return false;case"resume":q.cyclePause=0;if(r===true){t=i(q).data("cycle.opts");if(!t){f("options not found, can not resume");return false;}if(q.cycleTimeout){clearTimeout(q.cycleTimeout);q.cycleTimeout=0;}e(t.elements,t,1,1);}return false;case"prev":case"next":var u=i(q).data("cycle.opts");if(!u){f('options not found, "prev/next" ignored');return false;}i.fn.cycle[t](u);return false;default:t={fx:t};}return t;}else{if(t.constructor==Number){var s=t;t=i(q).data("cycle.opts");if(!t){f("options not found, can not advance slide");return false;}if(s<0||s>=t.elements.length){f("invalid slide index: "+s);return false;}t.nextSlide=s;if(q.cycleTimeout){clearTimeout(q.cycleTimeout);q.cycleTimeout=0;}if(typeof r=="string"){t.oneTimeFx=r;}e(t.elements,t,1,s>=t.currSlide);return false;}}return t;}function b(q,r){if(!i.support.opacity&&r.cleartype&&q.style.filter){try{q.style.removeAttribute("filter");}catch(s){}}}function k(y,J,u,t,E){var C=i.extend({},i.fn.cycle.defaults,t||{},i.metadata?y.metadata():i.meta?y.data():{});if(C.autostop){C.countdown=C.autostopCount||u.length;}var r=y[0];y.data("cycle.opts",C);C.$cont=y;C.stopCount=r.cycleStop;C.elements=u;C.before=C.before?[C.before]:[];C.after=C.after?[C.after]:[];C.after.unshift(function(){C.busy=0;});if(!i.support.opacity&&C.cleartype){C.after.push(function(){b(this,C);});}if(C.continuous){C.after.push(function(){e(u,C,0,!C.rev);});}n(C);if(!i.support.opacity&&C.cleartype&&!C.cleartypeNoBg){g(J);}if(y.css("position")=="static"){y.css("position","relative");}if(C.width){y.width(C.width);}if(C.height&&C.height!="auto"){y.height(C.height);}if(C.startingSlide){C.startingSlide=parseInt(C.startingSlide);}if(C.random){C.randomMap=[];for(var H=0;H<u.length;H++){C.randomMap.push(H);}C.randomMap.sort(function(L,w){return Math.random()-0.5;});C.randomIndex=0;C.startingSlide=C.randomMap[0];}else{if(C.startingSlide>=u.length){C.startingSlide=0;}}C.currSlide=C.startingSlide=C.startingSlide||0;var x=C.startingSlide;J.css({position:"absolute",top:0,left:0}).hide().each(function(w){var L=x?w>=x?u.length-(w-x):x-w:u.length-w;i(this).css("z-index",L);});i(u[x]).css("opacity",1).show();b(u[x],C);if(C.fit&&C.width){J.width(C.width);}if(C.fit&&C.height&&C.height!="auto"){J.height(C.height);}var D=C.containerResize&&!y.innerHeight();if(D){var v=0,B=0;for(var F=0;F<u.length;F++){var q=i(u[F]),K=q[0],A=q.outerWidth(),I=q.outerHeight();if(!A){A=K.offsetWidth;}if(!I){I=K.offsetHeight;}v=A>v?A:v;B=I>B?I:B;}if(v>0&&B>0){y.css({width:v+"px",height:B+"px"});}}if(C.pause){y.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(c(C)===false){return false;}var s=false;t.requeueAttempts=t.requeueAttempts||0;J.each(function(){var N=i(this);this.cycleH=(C.fit&&C.height)?C.height:N.height();this.cycleW=(C.fit&&C.width)?C.width:N.width();if(N.is("img")){var L=(i.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var O=(i.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var M=(i.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var w=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(L||O||M||w){if(E.s&&C.requeueOnImageNotLoaded&&++t.requeueAttempts<100){f(t.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){i(E.s,E.c).cycle(t);},C.requeueTimeout);s=true;return false;}else{f("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(s){return false;}C.cssBefore=C.cssBefore||{};C.animIn=C.animIn||{};C.animOut=C.animOut||{};J.not(":eq("+x+")").css(C.cssBefore);if(C.cssFirst){i(J[x]).css(C.cssFirst);}if(C.timeout){C.timeout=parseInt(C.timeout);if(C.speed.constructor==String){C.speed=i.fx.speeds[C.speed]||parseInt(C.speed);}if(!C.sync){C.speed=C.speed/2;}while((C.timeout-C.speed)<250){C.timeout+=C.speed;}}if(C.easing){C.easeIn=C.easeOut=C.easing;}if(!C.speedIn){C.speedIn=C.speed;}if(!C.speedOut){C.speedOut=C.speed;}C.slideCount=u.length;C.currSlide=C.lastSlide=x;if(C.random){C.nextSlide=C.currSlide;if(++C.randomIndex==u.length){C.randomIndex=0;}C.nextSlide=C.randomMap[C.randomIndex];}else{C.nextSlide=C.startingSlide>=(u.length-1)?0:C.startingSlide+1;}if(!C.multiFx){var G=i.fn.cycle.transitions[C.fx];if(i.isFunction(G)){G(y,J,C);}else{if(C.fx!="custom"&&!C.multiFx){f("unknown transition: "+C.fx,"; slideshow terminating");return false;}}}var z=J[x];if(C.before.length){C.before[0].apply(z,[z,z,C,true]);}if(C.after.length>1){C.after[1].apply(z,[z,z,C,true]);}if(C.next){i(C.next).bind(C.prevNextEvent,function(){return o(C,C.rev?-1:1);});}if(C.prev){i(C.prev).bind(C.prevNextEvent,function(){return o(C,C.rev?1:-1);});}if(C.pager){d(u,C);}j(C,u);return C;}function n(q){q.original={before:[],after:[]};q.original.cssBefore=i.extend({},q.cssBefore);q.original.cssAfter=i.extend({},q.cssAfter);q.original.animIn=i.extend({},q.animIn);q.original.animOut=i.extend({},q.animOut);i.each(q.before,function(){q.original.before.push(this);});i.each(q.after,function(){q.original.after.push(this);});}function c(w){var u,s,r=i.fn.cycle.transitions;if(w.fx.indexOf(",")>0){w.multiFx=true;w.fxs=w.fx.replace(/\s*/g,"").split(",");for(u=0;u<w.fxs.length;u++){var v=w.fxs[u];s=r[v];if(!s||!r.hasOwnProperty(v)||!i.isFunction(s)){f("discarding unknown transition: ",v);w.fxs.splice(u,1);u--;}}if(!w.fxs.length){f("No valid transitions named; slideshow terminating.");return false;}}else{if(w.fx=="all"){w.multiFx=true;w.fxs=[];for(p in r){s=r[p];if(r.hasOwnProperty(p)&&i.isFunction(s)){w.fxs.push(p);}}}}if(w.multiFx&&w.randomizeEffects){var t=Math.floor(Math.random()*20)+30;for(u=0;u<t;u++){var q=Math.floor(Math.random()*w.fxs.length);w.fxs.push(w.fxs.splice(q,1)[0]);}a("randomized fx sequence: ",w.fxs);}return true;}function j(r,q){r.addSlide=function(u,v){var t=i(u),w=t[0];if(!r.autostopCount){r.countdown++;}q[v?"unshift":"push"](w);if(r.els){r.els[v?"unshift":"push"](w);}r.slideCount=q.length;t.css("position","absolute");t[v?"prependTo":"appendTo"](r.$cont);if(v){r.currSlide++;r.nextSlide++;}if(!i.support.opacity&&r.cleartype&&!r.cleartypeNoBg){g(t);}if(r.fit&&r.width){t.width(r.width);}if(r.fit&&r.height&&r.height!="auto"){$slides.height(r.height);}w.cycleH=(r.fit&&r.height)?r.height:t.height();w.cycleW=(r.fit&&r.width)?r.width:t.width();t.css(r.cssBefore);if(r.pager){i.fn.cycle.createPagerAnchor(q.length-1,w,i(r.pager),q,r);}if(i.isFunction(r.onAddSlide)){r.onAddSlide(t);}else{t.hide();}};}i.fn.cycle.resetState=function(r,q){q=q||r.fx;r.before=[];r.after=[];r.cssBefore=i.extend({},r.original.cssBefore);r.cssAfter=i.extend({},r.original.cssAfter);r.animIn=i.extend({},r.original.animIn);r.animOut=i.extend({},r.original.animOut);r.fxFn=null;i.each(r.original.before,function(){r.before.push(this);});i.each(r.original.after,function(){r.after.push(this);});var s=i.fn.cycle.transitions[q];if(i.isFunction(s)){s(r.$cont,i(r.elements),r);}};function e(x,q,w,y){if(w&&q.busy&&q.manualTrump){i(x).stop(true,true);q.busy=false;}if(q.busy){return;}var u=q.$cont[0],A=x[q.currSlide],z=x[q.nextSlide];if(u.cycleStop!=q.stopCount||u.cycleTimeout===0&&!w){return;}if(!w&&!u.cyclePause&&((q.autostop&&(--q.countdown<=0))||(q.nowrap&&!q.random&&q.nextSlide<q.currSlide))){if(q.end){q.end(q);}return;}if(w||!u.cyclePause){var v=q.fx;A.cycleH=A.cycleH||i(A).height();A.cycleW=A.cycleW||i(A).width();z.cycleH=z.cycleH||i(z).height();z.cycleW=z.cycleW||i(z).width();if(q.multiFx){if(q.lastFx==undefined||++q.lastFx>=q.fxs.length){q.lastFx=0;}v=q.fxs[q.lastFx];q.currFx=v;}if(q.oneTimeFx){v=q.oneTimeFx;q.oneTimeFx=null;}i.fn.cycle.resetState(q,v);if(q.before.length){i.each(q.before,function(B,C){if(u.cycleStop!=q.stopCount){return;}C.apply(z,[A,z,q,y]);});}var s=function(){i.each(q.after,function(B,C){if(u.cycleStop!=q.stopCount){return;}C.apply(z,[A,z,q,y]);});};if(q.nextSlide!=q.currSlide){q.busy=1;if(q.fxFn){q.fxFn(A,z,q,s,y);}else{if(i.isFunction(i.fn.cycle[q.fx])){i.fn.cycle[q.fx](A,z,q,s);}else{i.fn.cycle.custom(A,z,q,s,w&&q.fastOnEvent);}}}q.lastSlide=q.currSlide;if(q.random){q.currSlide=q.nextSlide;if(++q.randomIndex==x.length){q.randomIndex=0;}q.nextSlide=q.randomMap[q.randomIndex];}else{var t=(q.nextSlide+1)==x.length;q.nextSlide=t?0:q.nextSlide+1;q.currSlide=t?x.length-1:q.nextSlide-1;}if(q.pager){i.fn.cycle.updateActivePagerLink(q.pager,q.currSlide);}}var r=0;if(q.timeout&&!q.continuous){r=h(A,z,q,y);}else{if(q.continuous&&u.cyclePause){r=10;}}if(r>0){u.cycleTimeout=setTimeout(function(){e(x,q,0,!q.rev);},r);}}i.fn.cycle.updateActivePagerLink=function(q,r){i(q).find("a").removeClass("activeSlide").filter("a:eq("+r+")").addClass("activeSlide");};function h(v,s,u,r){if(u.timeoutFn){var q=u.timeoutFn(v,s,u,r);while((q-u.speed)<250){q+=u.speed;}a("calculated timeout: "+q+"; speed: "+u.speed);if(q!==false){return q;}}return u.timeout;}i.fn.cycle.next=function(q){o(q,q.rev?-1:1);};i.fn.cycle.prev=function(q){o(q,q.rev?1:-1);};function o(r,u){var q=r.elements;var t=r.$cont[0],s=t.cycleTimeout;if(s){clearTimeout(s);t.cycleTimeout=0;}if(r.random&&u<0){r.randomIndex--;if(--r.randomIndex==-2){r.randomIndex=q.length-2;}else{if(r.randomIndex==-1){r.randomIndex=q.length-1;}}r.nextSlide=r.randomMap[r.randomIndex];}else{if(r.random){if(++r.randomIndex==q.length){r.randomIndex=0;}r.nextSlide=r.randomMap[r.randomIndex];}else{r.nextSlide=r.currSlide+u;if(r.nextSlide<0){if(r.nowrap){return false;}r.nextSlide=q.length-1;}else{if(r.nextSlide>=q.length){if(r.nowrap){return false;}r.nextSlide=0;}}}}if(i.isFunction(r.prevNextClick)){r.prevNextClick(u>0,r.nextSlide,q[r.nextSlide]);}e(q,r,1,u>=0);return false;}function d(r,s){var q=i(s.pager);i.each(r,function(t,u){i.fn.cycle.createPagerAnchor(t,u,q,r,s);});i.fn.cycle.updateActivePagerLink(s.pager,s.startingSlide);}i.fn.cycle.createPagerAnchor=function(u,v,s,t,w){var r;if(i.isFunction(w.pagerAnchorBuilder)){r=w.pagerAnchorBuilder(u,v);}else{r='<a href="#">'+(u+1)+"</a>";}if(!r){return;}var x=i(r);if(x.parents("body").length===0){var q=[];if(s.length>1){s.each(function(){var y=x.clone(true);i(this).append(y);q.push(y);});x=i(q);}else{x.appendTo(s);}}x.bind(w.pagerEvent,function(A){A.preventDefault();w.nextSlide=u;var z=w.$cont[0],y=z.cycleTimeout;if(y){clearTimeout(y);z.cycleTimeout=0;}if(i.isFunction(w.pagerClick)){w.pagerClick(w.nextSlide,t[w.nextSlide]);}e(t,w,1,w.currSlide<u);return false;});if(w.pagerEvent!="click"){x.click(function(){return false;});}if(w.pauseOnPagerHover){x.hover(function(){w.$cont[0].cyclePause++;},function(){w.$cont[0].cyclePause--;});}};i.fn.cycle.hopsFromLast=function(t,s){var r,q=t.lastSlide,u=t.currSlide;if(s){r=u>q?u-q:t.slideCount-q;}else{r=u<q?q-u:q+t.slideCount-u;}return r;};function g(s){function r(t){t=parseInt(t).toString(16);return t.length<2?"0"+t:t;}function q(w){for(;w&&w.nodeName.toLowerCase()!="html";w=w.parentNode){var t=i.css(w,"background-color");if(t.indexOf("rgb")>=0){var u=t.match(/\d+/g);return"#"+r(u[0])+r(u[1])+r(u[2]);}if(t&&t!="transparent"){return t;}}return"#ffffff";}s.each(function(){i(this).css("background-color",q(this));});}i.fn.cycle.commonReset=function(v,t,u,r,s,q){i(u.elements).not(v).hide();u.cssBefore.opacity=1;u.cssBefore.display="block";if(r!==false&&t.cycleW>0){u.cssBefore.width=t.cycleW;}if(s!==false&&t.cycleH>0){u.cssBefore.height=t.cycleH;}u.cssAfter=u.cssAfter||{};u.cssAfter.display="none";i(v).css("zIndex",u.slideCount+(q===true?1:0));i(t).css("zIndex",u.slideCount+(q===true?0:1));};i.fn.cycle.custom=function(B,v,q,s,r){var A=i(B),w=i(v);var t=q.speedIn,z=q.speedOut,u=q.easeIn,y=q.easeOut;w.css(q.cssBefore);if(r){if(typeof r=="number"){t=z=r;}else{t=z=1;}u=y=null;}var x=function(){w.animate(q.animIn,t,u,s);};A.animate(q.animOut,z,y,function(){if(q.cssAfter){A.css(q.cssAfter);}if(!q.sync){x();}});if(q.sync){x();}};i.fn.cycle.transitions={fade:function(r,s,q){s.not(":eq("+q.currSlide+")").css("opacity",0);q.before.push(function(v,t,u){i.fn.cycle.commonReset(v,t,u);u.cssBefore.opacity=0;});q.animIn={opacity:1};q.animOut={opacity:0};q.cssBefore={top:0,left:0};}};i.fn.cycle.ver=function(){return l;};i.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!i.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250};})(jQuery);google.setOnLoadCallback(function(){if($.browser.safari){$("#banners img").css("margin-right","4px");}$("#menu img").hover(function(){$("#menu-hover").attr("class","menu-hover-"+$(this).attr("class"));},function(){$("#menu-hover").attr("class","");});$("#footer img").preload({find:"/base/",replace:"/hover/"});$("#footer img").hover(function(){this.src=this.src.replace("/base/","/hover/");},function(){this.src=this.src.replace("/hover/","/base/");});$.getJSON("/websites/index.txt",function(b){b.sort(function(){return 0.5-Math.random();});var a=[];$.each(b,function(e,c){var d=c.substring(0,(c.length-4));a.push('<span><a href="http://www.'+d+'?iframe=true&amp;width=100%&amp;height=100%" rel="modal"><img src="http://websites.cubicdesign.it/'+c+'" width="560" height="170" border="0" /></a> <a href="http://www.'+d+'?iframe=true&amp;width=100%&amp;height=100%" rel="modal">http://www.'+d+"</a></span>");});$("#website").append(a.join(""));$("#website").cycle("fade");$("a[rel^='modal']").prettyPhoto({theme:"dark_rounded",modal:"true"});});});
