(function(a){function c(c){var e=new Date,f=new Date(c);a.browser.msie&&(f=Date.parse(c.replace(/( \+)/," UTC$1")));c=e-f;return isNaN(c)||c<0?"":c<2E3?"right now":c<6E4?Math.floor(c/1E3)+" seconds ago":c<12E4?"1 minute ago":c<36E5?Math.floor(c/6E4)+" minutes ago":c<72E5?"1 hour ago":c<864E5?Math.floor(c/36E5)+" hours ago":c>864E5&&c<1728E5?"yesterday":c<31536E6?Math.floor(c/864E5)+" days ago":"over a year ago"}function i(a){return a.replace(/\b(((https*\:\/\/)|www\.)[^\"\']+?)(([!?,.\)]+)?(\s|$))/g, function(a,c,e,f,i){return'<a class="twtr-hyperlink" target="_blank" href="'+(e.match(/w/)?"http://":"")+c+'">'+(c.length>25?c.substr(0,24)+"...":c)+"</a>"+i})}function f(a){return a.replace(/\B[@@]([a-zA-Z0-9_]{1,20})/g,function(a,c){return'<a target="_blank" class="twtr-atreply" href="http://twitter.com/intent/user?screen_name='+c+'">@'+c+"</a>"})}function e(a){return a.replace(/\B[@@]([a-zA-Z0-9_]{1,20}\/\w+)/g,function(a,c){return'<a target="_blank" class="twtr-atreply" href="http://twitter.com/'+ c+'">@'+c+"</a>"})}function j(a){return a.replace(/(^|\s+)#(\w+)/gi,function(a,c,e){return c+'<a target="_blank" class="twtr-hashtag" href="http://twitter.com/search?q=%23'+e+'">#'+e+"</a>"})}a.fn.toggle=function(){function c(e){e.hasClass("opened")?e.removeClass("opened").find("div").slideUp(300,function(){a(this).parent().css({height:50})}):e.addClass("opened").css("height","auto").find("div").slideDown(300)}a(this).find("li").click(function(){c(a(this))});a(this).find("a").click(function(){c(a(this).parent()); return false})};a.fn.tabs=function(c){var e=a(this).find(c),f=a(this).find("a.selected"),i=a(this).find("div.selected");a(this).find("ul.filters").find("a").click(function(){f.removeClass("selected");f=a(this);f.addClass("selected");i.removeClass("selected");i.fadeOut(200);i=e.children("div").eq(f.parent().index());i.addClass("selected");i.delay(200).fadeIn(350);return false})};a.fn.testimonials=function(){var c=0,e=a(this).children("ul").children();a(this).find("a.btnNext").click(function(){e.eq(c).fadeOut(200); ++c==e.length&&(c=0);e.eq(c).delay(200).fadeIn(200);return false});a(this).find("a.btnPrev").click(function(){e.eq(c).fadeOut(200);--c<0&&(c=e.length-1);e.eq(c).delay(200).fadeIn(200);return false})};a(function(){a("a[href*=#]").click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var c=a(this.hash),c=c.length&&c||a("[name="+this.hash.slice(1)+"]");if(c.length)return c=c.offset().top,a("html,body").animate({scrollTop:c},500,"easeInQuad"), false}})});a.fn.parallaxy=function(){function c(){a(this).hasClass("selected")||(e(t.eq(l),t.eq(a(this).index()),a(this).index()),clearTimeout(h));return false}function e(m,i,n){var k=0,g=0,E=1E3,F=150;m!=null&&(k=500,E=1500,F=200,m.animate({"margin-left":-100,opacity:"0"},600,"easeOutQuad",function(){a(this).css("display","none")}));i.css({display:"block","margin-left":0}).animate({opacity:"1"},0);i.children("*").each(function(){a(this).animate({opacity:0},0).css("margin-left",100).delay(k+g++*400).animate({"margin-left":0, opacity:1},500,"easeInQuad")});z.animate({backgroundPosition:"-"+F*A++ +"px 0"},E,"easeInQuad");l=n;setTimeout(function(){var a=l,g=i.find("h1");g.find(".slidesControls").length==0&&($buttons=g.append(x),$buttons.find("div").fadeIn(200),$buttons.find("a:nth-child("+(a+1)+")").addClass("selected"),$buttons.find("a").bind("click",c));b==0&&(h=setTimeout(f,j))},k+g*400)}function f(){oldIndex=l;++l==t.length-1&&(l=0);e(t.eq(oldIndex),t.eq(l),l)}function i(){b=0;clearTimeout(h);h=setTimeout(f,j)}for(var j= 7E3,z=a(this).children("div"),t=a(this).find(".slidesHolder").children(),x='<div class="slidesControls">',y=1;y<t.length;y++)x+='<a href="#">'+y+"</a>";x+="</div>";var l=0,A=1,b=0,h;e(null,t.eq(0),0);a(this).hover(function(){b=1;clearTimeout(h)},function(){i()});a(window).focus(function(){i()}).blur(function(){b=1;clearTimeout(h)})};a.fn.twitter=function(o,q){var r=a(this),u="";a.getJSON("http://twitter.com/statuses/user_timeline.json?screen_name="+o+"&count="+q+"&callback=?",function(o){a.each(o, function(a,o){a==0&&r.empty();u=a<q-1?"<hr />":"";r.append("<li><p>"+j(f(e(i(o.text))))+'</p><span class="twitFooter">'+c(o.created_at)+"</span>"+u+"</li>")})})}})(jQuery); (function(a){a.fn.quicksand=function(c,i,f){var e={duration:450,easing:"swing",attribute:"id",adjustHeight:"auto",useScaling:true,enhancement:function(){},selector:"> *",dx:0,dy:0};a.extend(e,i);if(a.browser.msie||typeof a.fn.scale=="undefined")e.useScaling=false;var j;typeof i=="function"?j=i:typeof(f=="function")&&(j=f);return this.each(function(f){var i,r=[],u=a(c).clone(),s=a(this),f=a(this).css("height"),z,t=false,x=a(s).offset(),y=[],l=a(this).find(e.selector);if(a.browser.msie&&a.browser.version.substr(0, 1)<7)s.html("").append(u);else{var A=0,b=function(){A||(A=1,$toDelete=s.find("> *"),s.prepend(k.find("> *")),$toDelete.remove(),t&&s.css("height",z),e.enhancement(s),typeof j=="function"&&j.call(this))},h=s.offsetParent(),m=h.offset();h.css("position")=="relative"?h.get(0).nodeName.toLowerCase()!="body"&&(m.top+=parseFloat(h.css("border-top-width"))||0,m.left+=parseFloat(h.css("border-left-width"))||0):(m.top-=parseFloat(h.css("border-top-width"))||0,m.left-=parseFloat(h.css("border-left-width"))|| 0,m.top-=parseFloat(h.css("margin-top"))||0,m.left-=parseFloat(h.css("margin-left"))||0);if(isNaN(m.left))m.left=0;if(isNaN(m.top))m.top=0;m.left-=e.dx;m.top-=e.dy;s.css("height",a(this).height());l.each(function(b){y[b]=a(this).offset()});a(this).stop();var v=0,n=0;l.each(function(b){a(this).stop();var h=a(this).get(0);h.style.position=="absolute"?(v=-e.dx,n=-e.dy):(v=e.dx,n=e.dy);h.style.position="absolute";h.style.margin="0";h.style.top=y[b].top-parseFloat(h.style.marginTop)-m.top+n+"px";h.style.left= y[b].left-parseFloat(h.style.marginLeft)-m.left+v+"px"});var k=a(s).clone(),h=k.get(0);h.innerHTML="";h.setAttribute("id","");h.style.height="auto";h.style.width=s.width()+"px";k.append(u);k.insertBefore(s);k.css("opacity",0);h.style.zIndex=-1;h.style.margin="0";h.style.position="absolute";h.style.top=x.top-m.top+"px";h.style.left=x.left-m.left+"px";e.adjustHeight==="dynamic"?s.animate({height:k.height()},e.duration,e.easing):e.adjustHeight==="auto"&&(z=k.height(),parseFloat(f)<parseFloat(z)?s.css("height", z):t=true);l.each(function(){var b=[];typeof e.attribute=="function"?(i=e.attribute(a(this)),u.each(function(){if(e.attribute(this)==i)return b=a(this),false})):b=u.filter("["+e.attribute+"="+a(this).attr(e.attribute)+"]");b.length?e.useScaling?r.push({element:a(this),animation:{top:b.offset().top-m.top,left:b.offset().left-m.left,opacity:1,scale:"1.0"}}):r.push({element:a(this),animation:{top:b.offset().top-m.top,left:b.offset().left-m.left,opacity:1}}):e.useScaling?r.push({element:a(this),animation:{opacity:"0.0", scale:"0.0"}}):r.push({element:a(this),animation:{opacity:"0.0"}})});u.each(function(){var b=[],h=[];typeof e.attribute=="function"?(i=e.attribute(a(this)),l.each(function(){if(e.attribute(this)==i)return b=a(this),false}),u.each(function(){if(e.attribute(this)==i)return h=a(this),false})):(b=l.filter("["+e.attribute+"="+a(this).attr(e.attribute)+"]"),h=u.filter("["+e.attribute+"="+a(this).attr(e.attribute)+"]"));var c;if(b.length===0){c=e.useScaling?{opacity:"1.0",scale:"1.0"}:{opacity:"1.0"};d= h.clone();var f=d.get(0);f.style.position="absolute";f.style.margin="0";f.style.top=h.offset().top-m.top+"px";f.style.left=h.offset().left-m.left+"px";d.css("opacity",0);e.useScaling&&d.css("transform","scale(0.0)");d.appendTo(s);r.push({element:a(d),animation:c})}});k.remove();e.enhancement(s);for(f=0;f<r.length;f++)r[f].element.animate(r[f].animation,e.duration,e.easing,b)}})}})(jQuery); (function(a){function c(){url=location.href;return hashtag=url.indexOf("#!")!=-1?decodeURI(url.substring(url.indexOf("#!")+2,url.length)):false}function i(a,c){var a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),i=RegExp("[\\?&]"+a+"=([^&#]*)").exec(c);return i==null?"":i[1]}a.prettyPhoto={version:"3.1.3"};a.fn.prettyPhoto=function(f){function e(){a(".pp_loaderIcon").hide();projectedTop=scroll_pos.scrollTop+(n/2-l.containerHeight/2);projectedTop<0&&(projectedTop=0);$ppt.fadeTo(settings.animation_speed, 1);$pp_pic_holder.find(".pp_content").animate({height:l.contentHeight,width:l.contentWidth},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:k/2-l.containerWidth/2,width:l.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(l.height).width(l.width);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);isSet&&u(pp_images[set_position])=="image"?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(); l.resized?a("a.pp_expand,a.pp_contract").show():a("a.pp_expand").hide();settings.autoplay_slideshow&&!g&&!A&&a.prettyPhoto.startSlideshow();settings.changepicturecallback();A=true});isSet&&settings.overlay_gallery&&u(pp_images[set_position])=="image"&&settings.ie6_fallback&&!(a.browser.msie&&parseInt(a.browser.version)==6)?(itemWidth=57,navWidth=settings.theme=="facebook"||settings.theme=="pp_default"?50:30,itemsPerPage=Math.floor((l.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage< pp_images.length?itemsPerPage:pp_images.length,totalPage=Math.ceil(pp_images.length/itemsPerPage)-1,totalPage==0?(navWidth=0,$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").hide()):$pp_gallery.find(".pp_arrow_next,.pp_arrow_previous").show(),galleryWidth=itemsPerPage*itemWidth,fullGalleryWidth=pp_images.length*itemWidth,$pp_gallery.css("margin-left",-(galleryWidth/2+navWidth/2)).find("div:first").width(galleryWidth+5).find("ul").width(fullGalleryWidth).find("li.selected").removeClass("selected"), goToPage=Math.floor(set_position/itemsPerPage)<totalPage?Math.floor(set_position/itemsPerPage):totalPage,a.prettyPhoto.changeGalleryPage(goToPage),$pp_gallery_li.filter(":eq("+set_position+")").addClass("selected")):$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave")}function j(b){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden");$pp_pic_holder.find(".pp_fade").fadeOut(settings.animation_speed,function(){a(".pp_loaderIcon").show();b()})}function o(b){b> 1?a(".pp_nav").show():a(".pp_nav").hide()}function q(a,c){resized=false;r(a,c);imageWidth=a;imageHeight=c;if((v>k||m>n)&&doresize&&settings.allow_resize&&!y){for(resized=true,fitting=false;!fitting;)v>k?(imageWidth=k-200,imageHeight=c/a*imageWidth):m>n?(imageHeight=n-200,imageWidth=a/c*imageHeight):fitting=true,m=imageHeight,v=imageWidth;r(imageWidth,imageHeight);(v>k||m>n)&&q(v,m)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(m),containerWidth:Math.floor(v)+ settings.horizontal_padding*2,contentHeight:Math.floor(b),contentWidth:Math.floor(h),resized:resized}}function r(c,g){c=parseFloat(c);g=parseFloat(g);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(c);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().addClass(settings.theme).width(c).appendTo(a("body")).css({position:"absolute",top:-1E4});detailsHeight+=$pp_details.height();detailsHeight=detailsHeight<= 34?36:detailsHeight;a.browser.msie&&a.browser.version==7&&(detailsHeight+=8);$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");$pp_title.width(c);titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));$pp_title=$pp_title.clone().appendTo(a("body")).css({position:"absolute",top:-1E4});titleHeight+=$pp_title.height();$pp_title.remove();b=g+detailsHeight;h=c;m=b+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height(); v=c}function u(a){return a.match(/youtube\.com\/watch/i)||a.match(/youtu\.be/i)?"youtube":a.match(/vimeo\.com/i)?"vimeo":a.match(/\b.mov\b/i)?"quicktime":a.match(/\b.swf\b/i)?"flash":a.match(/\biframe=true\b/i)?"iframe":a.match(/\bajax=true\b/i)?"ajax":a.match(/\bcustom=true\b/i)?"custom":a.substr(0,1)=="#"?"inline":"image"}function s(){doresize&&typeof $pp_pic_holder!="undefined"&&(scroll_pos=z(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=n/2+scroll_pos.scrollTop- contentHeight/2,projectedTop<0&&(projectedTop=0),contentHeight>n||$pp_pic_holder.css({top:projectedTop,left:k/2+scroll_pos.scrollLeft-contentwidth/2}))}function z(){if(self.pageYOffset)return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};else if(document.documentElement&&document.documentElement.scrollTop)return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};else if(document.body)return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}} function t(){settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)));settings.markup=settings.markup.replace("{pp_social}",settings.social_tools?facebook_like_link:"");a("body").append(settings.markup);$pp_pic_holder=a(".pp_pic_holder");$ppt=a(".ppt");$pp_overlay=a("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var b=0;b<pp_images.length;b++)pp_images[b].match(/\b(jpg|jpeg|png|gif)\b/gi)? (classname="",img_src=pp_images[b]):(classname="default",img_src=""),toInject+="<li class='"+classname+"'><a href='#'><img src='"+img_src+"' width='50' alt='' /></a></li>";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_gallery=a(".pp_pic_holder .pp_gallery");$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){a.prettyPhoto.changeGalleryPage("next");a.prettyPhoto.stopSlideshow();return false}); $pp_gallery.find(".pp_arrow_previous").click(function(){a.prettyPhoto.changeGalleryPage("previous");a.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=57;$pp_gallery_li.each(function(b){a(this).find("a").click(function(){a.prettyPhoto.changePage(b);a.prettyPhoto.stopSlideshow();return false})})}settings.slideshow&& ($pp_pic_holder.find(".pp_nav").prepend('<a href="#" class="pp_play">Play</a>'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){a.prettyPhoto.startSlideshow();return false}));$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({opacity:0,height:a(document).height(),width:a(window).width()}).bind("click",function(){settings.modal||a.prettyPhoto.close()});a("a.pp_close").bind("click",function(){a.prettyPhoto.close();return false});a("a.pp_expand").bind("click",function(){a(this).hasClass("pp_expand")? (a(this).removeClass("pp_expand").addClass("pp_contract"),doresize=false):(a(this).removeClass("pp_contract").addClass("pp_expand"),doresize=true);j(function(){a.prettyPhoto.open()});return false});$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){a.prettyPhoto.changePage("previous");a.prettyPhoto.stopSlideshow();return false});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){a.prettyPhoto.changePage("next");a.prettyPhoto.stopSlideshow(); return false});s()}var f=jQuery.extend({animation_speed:"fast",slideshow:5E3,autoplay_slideshow:false,opacity:0.8,show_title:false,allow_resize:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:false,wmode:"opaque",autoplay:true,modal:false,deeplinking:true,overlay_gallery:false,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},ie6_fallback:false,markup:'<div class="pp_pic_holder"> <div class="ppt">&nbsp;</div> <div class="pp_top"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> <div class="pp_content_container"> <div class="pp_left"> <div class="pp_right"> <div class="pp_content"> <div class="pp_loaderIcon"></div> <div class="pp_fade"> <a href="#" class="pp_expand" title="Expand the image">Expand</a> <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"> <div class="pp_nav"> <a href="#" class="pp_arrow_previous">Previous</a> <p class="currentTextHolder">0/0</p> <a href="#" class="pp_arrow_next">Next</a> </div> <p class="pp_description"></p> <div class="pp_social">{pp_social}</div> <a class="pp_close" href="#">Close</a> </div> </div> </div> </div> </div> </div> <div class="pp_bottom"> <div class="pp_left"></div> <div class="pp_middle"></div> <div class="pp_right"></div> </div> </div> <div class="pp_overlay"></div>', gallery_markup:'<div class="pp_gallery"> <a href="#" class="pp_arrow_previous">Previous</a> <div> <ul> {gallery} </ul> </div> <a href="#" class="pp_arrow_next">Next</a> </div>',image_markup:'<img id="fullResImage" src="{path}" />',flash_markup:'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>', quicktime_markup:'<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>',iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>', inline_markup:'<div class="pp_inline">{content}</div>',custom_markup:""},f),x=this,y=false,l,A,b,h,m,v,n=a(window).height(),k=a(window).width(),g;doresize=true;scroll_pos=z();a(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){s();n=a(window).height();k=a(window).width();typeof $pp_overlay!="undefined"&&$pp_overlay.height(a(document).height()).width(k)});f.keyboard_shortcuts&&a(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(b){if(typeof $pp_pic_holder!= "undefined"&&$pp_pic_holder.is(":visible"))switch(b.keyCode){case 37:a.prettyPhoto.changePage("previous");b.preventDefault();break;case 39:a.prettyPhoto.changePage("next");b.preventDefault();break;case 27:settings.modal||a.prettyPhoto.close(),b.preventDefault()}});a.prettyPhoto.initialize=function(){settings=f;if(settings.theme=="pp_default")settings.horizontal_padding=16;if(settings.ie6_fallback&&a.browser.msie&&parseInt(a.browser.version)==6)settings.theme="light_square";theRel=a(this).attr("rel"); galleryRegExp=/\[(?:.*)\]/;pp_images=(isSet=galleryRegExp.exec(theRel)?true:false)?jQuery.map(x,function(b){if(a(b).attr("rel").indexOf(theRel)!=-1)return a(b).attr("href")}):a.makeArray(a(this).attr("href"));pp_titles=isSet?jQuery.map(x,function(b){if(a(b).attr("rel").indexOf(theRel)!=-1)return a(b).find("img").attr("alt")?a(b).find("img").attr("alt"):""}):a.makeArray(a(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(x,function(b){if(a(b).attr("rel").indexOf(theRel)!=-1)return a(b).attr("title")? a(b).attr("title"):""}):a.makeArray(a(this).attr("title"));if(pp_images.length>30)settings.overlay_gallery=false;set_position=jQuery.inArray(a(this).attr("href"),pp_images);rel_index=isSet?set_position:a("a[rel^='"+theRel+"']").index(a(this));t(this);settings.allow_resize&&a(window).bind("scroll.prettyphoto",function(){s()});a.prettyPhoto.open();return false};a.prettyPhoto.open=function(b,h,c){if(typeof settings=="undefined"){settings=f;if(a.browser.msie&&a.browser.version==6)settings.theme="light_square"; pp_images=a.makeArray(b);pp_titles=h?a.makeArray(h):a.makeArray("");pp_descriptions=c?a.makeArray(c):a.makeArray("");isSet=pp_images.length>1?true:false;set_position=0;t(b.target)}a.browser.msie&&a.browser.version==6&&a("select").css("visibility","hidden");settings.hideflash&&a("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","hidden");o(a(pp_images).size());a(".pp_loaderIcon").show();if(settings.deeplinking&&typeof theRel!="undefined")location.hash="!"+theRel+"/"+rel_index+ "/";settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)),$pp_pic_holder.find(".pp_social").html(facebook_like_link));$ppt.is(":hidden")&&$ppt.css("opacity",0).show();$pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity);$pp_pic_holder.find(".currentTextHolder").text(set_position+1+settings.counter_separator_label+a(pp_images).size());pp_descriptions[set_position]!=""&&pp_descriptions[set_position]!=void 0?$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position])): $pp_pic_holder.find(".pp_description").hide();movie_width=parseFloat(i("width",pp_images[set_position]))?i("width",pp_images[set_position]):settings.default_width.toString();movie_height=parseFloat(i("height",pp_images[set_position]))?i("height",pp_images[set_position]):settings.default_height.toString();y=false;movie_height.indexOf("%")!=-1&&(movie_height=parseFloat(a(window).height()*parseFloat(movie_height)/100-150),y=true);movie_width.indexOf("%")!=-1&&(movie_width=parseFloat(a(window).width()* parseFloat(movie_width)/100-150),y=true);$pp_pic_holder.fadeIn(function(){settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined"?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;");imgPreloader="";skipInjection=false;switch(u(pp_images[set_position])){case "image":imgPreloader=new Image;nextImage=new Image;if(isSet&&set_position<a(pp_images).size()-1)nextImage.src=pp_images[set_position+1];prevImage=new Image;if(isSet&&pp_images[set_position-1])prevImage.src= pp_images[set_position-1];$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup.replace(/{path}/g,pp_images[set_position]);imgPreloader.onload=function(){l=q(imgPreloader.width,imgPreloader.height);e()};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");a.prettyPhoto.close()};imgPreloader.src=pp_images[set_position];break;case "youtube":l=q(movie_width,movie_height);movie_id=i("v",pp_images[set_position]);movie_id==""&& (movie_id=pp_images[set_position].split("youtu.be/"),movie_id=movie_id[1],movie_id.indexOf("?")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("?"))),movie_id.indexOf("&")>0&&(movie_id=movie_id.substr(0,movie_id.indexOf("&"))));movie="http://www.youtube.com/embed/"+movie_id;i("rel",pp_images[set_position])?movie+="?rel="+i("rel",pp_images[set_position]):movie+="?rel=1";settings.autoplay&&(movie+="&autoplay=1");toInject=settings.iframe_markup.replace(/{width}/g,l.width).replace(/{height}/g,l.height).replace(/{wmode}/g, settings.wmode).replace(/{path}/g,movie);break;case "vimeo":l=q(movie_width,movie_height);movie_id=pp_images[set_position];movie="http://player.vimeo.com/video/"+movie_id.match(/http:\/\/(www\.)?vimeo.com\/(\d+)/)[2]+"?title=0&amp;byline=0&amp;portrait=0";settings.autoplay&&(movie+="&autoplay=1;");vimeo_width=l.width+"/embed/?moog_width="+l.width;toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,l.height).replace(/{path}/g,movie);break;case "quicktime":l=q(movie_width, movie_height);l.height+=15;l.contentHeight+=15;l.containerHeight+=15;toInject=settings.quicktime_markup.replace(/{width}/g,l.width).replace(/{height}/g,l.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case "flash":l=q(movie_width,movie_height);flash_vars=pp_images[set_position];flash_vars=flash_vars.substring(pp_images[set_position].indexOf("flashvars")+10,pp_images[set_position].length);filename=pp_images[set_position]; filename=filename.substring(0,filename.indexOf("?"));toInject=settings.flash_markup.replace(/{width}/g,l.width).replace(/{height}/g,l.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case "iframe":l=q(movie_width,movie_height);frame_url=pp_images[set_position];frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1);toInject=settings.iframe_markup.replace(/{width}/g,l.width).replace(/{height}/g,l.height).replace(/{path}/g,frame_url);break;case "ajax":doresize= false;l=q(movie_width,movie_height);skipInjection=doresize=true;a.get(pp_images[set_position],function(a){toInject=settings.inline_markup.replace(/{content}/g,a);$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;e()});break;case "custom":l=q(movie_width,movie_height);toInject=settings.custom_markup;break;case "inline":myClone=a(pp_images[set_position]).clone().append('<br clear="all" />').css({width:settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline"></div></div>').appendTo(a("body")).show(), doresize=false,l=q(a(myClone).width(),a(myClone).height()),doresize=true,a(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,a(pp_images[set_position]).html())}if(!imgPreloader&&!skipInjection)$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,e()});return false};a.prettyPhoto.changePage=function(b){currentGalleryPage=0;b=="previous"?(set_position--,set_position<0&&(set_position=a(pp_images).size()-1)):b=="next"?(set_position++,set_position>a(pp_images).size()-1&&(set_position= 0)):set_position=b;rel_index=set_position;doresize||(doresize=true);a(".pp_contract").removeClass("pp_contract").addClass("pp_expand");j(function(){a.prettyPhoto.open()})};a.prettyPhoto.changeGalleryPage=function(a){a=="next"?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):a=="previous"?(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)):currentGalleryPage=a;slide_speed=a=="next"||a=="previous"?settings.animation_speed:0;slide_to=currentGalleryPage* itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)};a.prettyPhoto.startSlideshow=function(){typeof g=="undefined"?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){a.prettyPhoto.stopSlideshow();return false}),g=setInterval(a.prettyPhoto.startSlideshow,settings.slideshow)):a.prettyPhoto.changePage("next")};a.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){a.prettyPhoto.startSlideshow(); return false});clearInterval(g);g=void 0};a.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(a.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),a("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){a(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){a.browser.msie&&a.browser.version==6&&a("select").css("visibility","visible");settings.hideflash&&a("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility", "visible");a(this).remove();a(window).unbind("scroll.prettyphoto");url=location.href;if(hashtag=url.indexOf("#!prettyPhoto")?true:false)location.hash="!prettyPhoto";settings.callback();doresize=true;A=false;delete settings}))};!pp_alreadyInitialized&&c()&&(pp_alreadyInitialized=true,hashRel=hashIndex=c(),hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){a("a[rel^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")}, 50));return this.unbind("click.prettyphoto").bind("click.prettyphoto",a.prettyPhoto.initialize)}})(jQuery);var pp_alreadyInitialized=false; (function(a){function c(a){a=a.replace(/left|top/g,"0px");a=a.replace(/right|bottom/g,"100%");a=a.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");a=a.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(a[1],10),a[2],parseFloat(a[3],10),a[4]]}if(!document.defaultView||!document.defaultView.getComputedStyle){var i=a.curCSS;a.curCSS=function(a,c,f){c==="background-position"&&(c="backgroundPosition");if(c!=="backgroundPosition"||!a.currentStyle||a.currentStyle[c])return i.apply(this, arguments);var q=a.style;return!f&&q&&q[c]?q[c]:i(a,"backgroundPositionX",f)+" "+i(a,"backgroundPositionY",f)}}var f=a.fn.animate;a.fn.animate=function(a){if("background-position"in a)a.backgroundPosition=a["background-position"],delete a["background-position"];if("backgroundPosition"in a)a.backgroundPosition="("+a.backgroundPosition;return f.apply(this,arguments)};a.fx.step.backgroundPosition=function(e){if(!e.bgPosReady){var f=a.curCSS(e.elem,"backgroundPosition");f||(f="0px 0px");f=c(f);e.start= [f[0],f[2]];f=c(e.end);e.end=[f[0],f[2]];e.unit=[f[1],f[3]];e.bgPosReady=true}f=[];f[0]=(e.end[0]-e.start[0])*e.pos+e.start[0]+e.unit[0];f[1]=(e.end[1]-e.start[1])*e.pos+e.start[1]+e.unit[1];e.elem.style.backgroundPosition=f[0]+" "+f[1]}})(jQuery); (function(a,c){function i(b){a.fn.cycle.debug&&f(b)}function f(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function e(b,c,f){var e=a(b).data("cycle.opts"),i=!!b.cyclePause;i&&e.paused?e.paused(b,e,c,f):!i&&e.resumed&&e.resumed(b,e,c,f)}function j(b,h,m){function i(b,c,h){if(!b&&c===true){b=a(h).data("cycle.opts");if(!b)return f("options not found, can not resume"),false;if(h.cycleTimeout)clearTimeout(h.cycleTimeout),h.cycleTimeout=0;t(b.elements, b,1,!b.backwards)}}if(b.cycleStop==c)b.cycleStop=0;if(h===c||h===null)h={};if(h.constructor==String)switch(h){case "destroy":case "stop":m=a(b).data("cycle.opts");if(!m)return false;b.cycleStop++;b.cycleTimeout&&clearTimeout(b.cycleTimeout);b.cycleTimeout=0;m.elements&&a(m.elements).stop();a(b).removeData("cycle.opts");h=="destroy"&&q(m);return false;case "toggle":return b.cyclePause=b.cyclePause===1?0:1,i(b.cyclePause,m,b),e(b),false;case "pause":return b.cyclePause=1,e(b),false;case "resume":return b.cyclePause= 0,i(false,m,b),e(b),false;case "prev":case "next":m=a(b).data("cycle.opts");if(!m)return f('options not found, "prev/next" ignored'),false;a.fn.cycle[h](m);return false;default:h={fx:h}}else if(h.constructor==Number){var n=h,h=a(b).data("cycle.opts");if(!h)return f("options not found, can not advance slide"),false;if(n<0||n>=h.elements.length)return f("invalid slide index: "+n),false;h.nextSlide=n;if(b.cycleTimeout)clearTimeout(b.cycleTimeout),b.cycleTimeout=0;if(typeof m=="string")h.oneTimeFx=m; t(h.elements,h,1,n>=h.currSlide);return false}return h}function o(b,c){if(!a.support.opacity&&c.cleartype&&b.style.filter)try{b.style.removeAttribute("filter")}catch(f){}}function q(b){b.next&&a(b.next).unbind(b.prevNextEvent);b.prev&&a(b.prev).unbind(b.prevNextEvent);if(b.pager||b.pagerAnchorBuilder)a.each(b.pagerAnchors||[],function(){this.unbind().remove()});b.pagerAnchors=null;b.destroy&&b.destroy(b)}function r(b,h,m,i,n){var k,g=a.extend({},a.fn.cycle.defaults,i||{},a.metadata?b.metadata():a.meta? b.data():{}),j=a.isFunction(b.data)?b.data(g.metaAttr):null;j&&(g=a.extend(g,j));if(g.autostop)g.countdown=g.autostopCount||m.length;var q=b[0];b.data("cycle.opts",g);g.$cont=b;g.stopCount=q.cycleStop;g.elements=m;g.before=g.before?[g.before]:[];g.after=g.after?[g.after]:[];!a.support.opacity&&g.cleartype&&g.after.push(function(){o(this,g)});g.continuous&&g.after.push(function(){t(m,g,0,!g.backwards)});u(g);!a.support.opacity&&g.cleartype&&!g.cleartypeNoBg&&A(h);b.css("position")=="static"&&b.css("position", "relative");g.width&&b.width(g.width);g.height&&g.height!="auto"&&b.height(g.height);g.startingSlide!=c?(g.startingSlide=parseInt(g.startingSlide,10),g.startingSlide>=m.length||g.startSlide<0?g.startingSlide=0:k=true):g.startingSlide=g.backwards?m.length-1:0;if(g.random){g.randomMap=[];for(j=0;j<m.length;j++)g.randomMap.push(j);g.randomMap.sort(function(){return Math.random()-0.5});if(k)for(k=0;k<m.length;k++){if(g.startingSlide==g.randomMap[k])g.randomIndex=k}else g.randomIndex=1,g.startingSlide= g.randomMap[1]}else if(g.startingSlide>=m.length)g.startingSlide=0;g.currSlide=g.startingSlide||0;var w=g.startingSlide;h.css({position:"absolute",top:0,left:0}).hide().each(function(b){b=g.backwards?w?b<=w?m.length+(b-w):w-b:m.length-b:w?b>=w?m.length-(b-w):w-b:m.length-b;a(this).css("z-index",b)});a(m[w]).css("opacity",1).show();o(m[w],g);g.fit&&(g.aspect?h.each(function(){var b=a(this),c=g.aspect===true?b.width()/b.height():g.aspect;g.width&&b.width()!=g.width&&(b.width(g.width),b.height(g.width/ c));g.height&&b.height()<g.height&&(b.height(g.height),b.width(g.height*c))}):(g.width&&h.width(g.width),g.height&&g.height!="auto"&&h.height(g.height)));g.center&&(!g.fit||g.aspect)&&h.each(function(){var b=a(this);b.css({"margin-left":g.width?(g.width-b.width())/2+"px":0,"margin-top":g.height?(g.height-b.height())/2+"px":0})});g.center&&!g.fit&&!g.slideResize&&h.each(function(){var b=a(this);b.css({"margin-left":g.width?(g.width-b.width())/2+"px":0,"margin-top":g.height?(g.height-b.height())/2+ "px":0})});if(g.containerResize&&!b.innerHeight()){for(var r=j=k=0;r<m.length;r++){var x=a(m[r]),B=x[0],C=x.outerWidth(),D=x.outerHeight();C||(C=B.offsetWidth||B.width||x.attr("width"));D||(D=B.offsetHeight||B.height||x.attr("height"));k=C>k?C:k;j=D>j?D:j}k>0&&j>0&&b.css({width:k+"px",height:j+"px"})}var G=false;g.pause&&b.hover(function(){G=true;this.cyclePause++;e(q,true)},function(){G&&this.cyclePause--;e(q,true)});if(s(g)===false)return false;var H=false;i.requeueAttempts=i.requeueAttempts||0; h.each(function(){var b=a(this);this.cycleH=g.fit&&g.height?g.height:b.height()||this.offsetHeight||this.height||b.attr("height")||0;this.cycleW=g.fit&&g.width?g.width:b.width()||this.offsetWidth||this.width||b.attr("width")||0;if(b.is("img")){var b=a.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete,c=a.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,h=this.cycleH==0&&this.cycleW==0&&!this.complete;if(a.browser.msie&&this.cycleW== 28&&this.cycleH==30&&!this.complete||b||c||h)if(n.s&&g.requeueOnImageNotLoaded&&++i.requeueAttempts<100)return f(i.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH),setTimeout(function(){a(n.s,n.c).cycle(i)},g.requeueTimeout),H=true,false;else f("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}return true});if(H)return false;g.cssBefore=g.cssBefore||{};g.cssAfter=g.cssAfter||{};g.cssFirst=g.cssFirst||{};g.animIn=g.animIn||{}; g.animOut=g.animOut||{};h.not(":eq("+w+")").css(g.cssBefore);a(h[w]).css(g.cssFirst);if(g.timeout){g.timeout=parseInt(g.timeout,10);if(g.speed.constructor==String)g.speed=a.fx.speeds[g.speed]||parseInt(g.speed,10);g.sync||(g.speed/=2);for(k=g.fx=="none"?0:g.fx=="shuffle"?500:250;g.timeout-g.speed<k;)g.timeout+=g.speed}if(g.easing)g.easeIn=g.easeOut=g.easing;if(!g.speedIn)g.speedIn=g.speed;if(!g.speedOut)g.speedOut=g.speed;g.slideCount=m.length;g.currSlide=g.lastSlide=w;if(g.random){if(++g.randomIndex== m.length)g.randomIndex=0;g.nextSlide=g.randomMap[g.randomIndex]}else g.nextSlide=g.backwards?g.startingSlide==0?m.length-1:g.startingSlide-1:g.startingSlide>=m.length-1?0:g.startingSlide+1;if(!g.multiFx)if(k=a.fn.cycle.transitions[g.fx],a.isFunction(k))k(b,h,g);else if(g.fx!="custom"&&!g.multiFx)return f("unknown transition: "+g.fx,"; slideshow terminating"),false;b=h[w];g.skipInitializationCallbacks||(g.before.length&&g.before[0].apply(b,[b,b,g,true]),g.after.length&&g.after[0].apply(b,[b,b,g,true])); g.next&&a(g.next).bind(g.prevNextEvent,function(){return y(g,1)});g.prev&&a(g.prev).bind(g.prevNextEvent,function(){return y(g,0)});(g.pager||g.pagerAnchorBuilder)&&l(m,g);z(g,m);return g}function u(b){b.original={before:[],after:[]};b.original.cssBefore=a.extend({},b.cssBefore);b.original.cssAfter=a.extend({},b.cssAfter);b.original.animIn=a.extend({},b.animIn);b.original.animOut=a.extend({},b.animOut);a.each(b.before,function(){b.original.before.push(this)});a.each(b.after,function(){b.original.after.push(this)})} function s(b){var c,e,v=a.fn.cycle.transitions;if(b.fx.indexOf(",")>0){b.multiFx=true;b.fxs=b.fx.replace(/\s*/g,"").split(",");for(c=0;c<b.fxs.length;c++){var n=b.fxs[c];e=v[n];if(!e||!v.hasOwnProperty(n)||!a.isFunction(e))f("discarding unknown transition: ",n),b.fxs.splice(c,1),c--}if(!b.fxs.length)return f("No valid transitions named; slideshow terminating."),false}else if(b.fx=="all")for(p in b.multiFx=true,b.fxs=[],v)e=v[p],v.hasOwnProperty(p)&&a.isFunction(e)&&b.fxs.push(p);if(b.multiFx&&b.randomizeEffects){e= Math.floor(Math.random()*20)+30;for(c=0;c<e;c++)v=Math.floor(Math.random()*b.fxs.length),b.fxs.push(b.fxs.splice(v,1)[0]);i("randomized fx sequence: ",b.fxs)}return true}function z(b,c){b.addSlide=function(e,f){var i=a(e),k=i[0];b.autostopCount||b.countdown++;c[f?"unshift":"push"](k);if(b.els)b.els[f?"unshift":"push"](k);b.slideCount=c.length;b.random&&(b.randomMap.push(b.slideCount-1),b.randomMap.sort(function(){return Math.random()-0.5}));i.css("position","absolute");i[f?"prependTo":"appendTo"](b.$cont); f&&(b.currSlide++,b.nextSlide++);!a.support.opacity&&b.cleartype&&!b.cleartypeNoBg&&A(i);b.fit&&b.width&&i.width(b.width);b.fit&&b.height&&b.height!="auto"&&i.height(b.height);k.cycleH=b.fit&&b.height?b.height:i.height();k.cycleW=b.fit&&b.width?b.width:i.width();i.css(b.cssBefore);(b.pager||b.pagerAnchorBuilder)&&a.fn.cycle.createPagerAnchor(c.length-1,k,a(b.pager),c,b);if(a.isFunction(b.onAddSlide))b.onAddSlide(i);else i.hide()}}function t(b,h,e,f){function n(){var a=0;h.timeout&&!h.continuous?(a= x(b[h.currSlide],b[h.nextSlide],h,f),h.fx=="shuffle"&&(a-=h.speedOut)):h.continuous&&k.cyclePause&&(a=10);if(a>0)k.cycleTimeout=setTimeout(function(){t(b,h,0,!h.backwards)},a)}if(e&&h.busy&&h.manualTrump)i("manualTrump in go(), stopping active transition"),a(b).stop(true,true),h.busy=0;if(h.busy)i("transition active, ignoring new tx request");else{var k=h.$cont[0],g=b[h.currSlide],j=b[h.nextSlide];if(!(k.cycleStop!=h.stopCount||k.cycleTimeout===0&&!e))if(!e&&!k.cyclePause&&!h.bounce&&(h.autostop&& --h.countdown<=0||h.nowrap&&!h.random&&h.nextSlide<h.currSlide))h.end&&h.end(h);else{var l=false;if((e||!k.cyclePause)&&h.nextSlide!=h.currSlide){var l=true,w=h.fx;g.cycleH=g.cycleH||a(g).height();g.cycleW=g.cycleW||a(g).width();j.cycleH=j.cycleH||a(j).height();j.cycleW=j.cycleW||a(j).width();if(h.multiFx){if(f&&(h.lastFx==c||++h.lastFx>=h.fxs.length))h.lastFx=0;else if(!f&&(h.lastFx==c||--h.lastFx<0))h.lastFx=h.fxs.length-1;w=h.fxs[h.lastFx]}if(h.oneTimeFx)w=h.oneTimeFx,h.oneTimeFx=null;a.fn.cycle.resetState(h, w);h.before.length&&a.each(h.before,function(a,b){k.cycleStop==h.stopCount&&b.apply(j,[g,j,h,f])});var o=function(){h.busy=0;a.each(h.after,function(a,b){k.cycleStop==h.stopCount&&b.apply(j,[g,j,h,f])});k.cycleStop||n()};i("tx firing("+w+"); currSlide: "+h.currSlide+"; nextSlide: "+h.nextSlide);h.busy=1;if(h.fxFn)h.fxFn(g,j,h,o,f,e&&h.fastOnEvent);else if(a.isFunction(a.fn.cycle[h.fx]))a.fn.cycle[h.fx](g,j,h,o,f,e&&h.fastOnEvent);else a.fn.cycle.custom(g,j,h,o,f,e&&h.fastOnEvent)}else n();if(l||h.nextSlide== h.currSlide)if(h.lastSlide=h.currSlide,h.random){h.currSlide=h.nextSlide;if(++h.randomIndex==b.length)h.randomIndex=0,h.randomMap.sort(function(){return Math.random()-0.5});h.nextSlide=h.randomMap[h.randomIndex];if(h.nextSlide==h.currSlide)h.nextSlide=h.currSlide==h.slideCount-1?0:h.currSlide+1}else h.backwards?(e=h.nextSlide-1<0)&&h.bounce?(h.backwards=!h.backwards,h.nextSlide=1,h.currSlide=0):(h.nextSlide=e?b.length-1:h.nextSlide-1,h.currSlide=e?0:h.nextSlide+1):(e=h.nextSlide+1==b.length)&&h.bounce? (h.backwards=!h.backwards,h.nextSlide=b.length-2,h.currSlide=b.length-1):(h.nextSlide=e?0:h.nextSlide+1,h.currSlide=e?b.length-1:h.nextSlide-1);l&&h.pager&&h.updateActivePagerLink(h.pager,h.currSlide,h.activePagerClass)}}}function x(a,c,e,f){if(e.timeoutFn){for(a=e.timeoutFn.call(a,a,c,e,f);e.fx!="none"&&a-e.speed<250;)a+=e.speed;i("calculated timeout: "+a+"; speed: "+e.speed);if(a!==false)return a}return e.timeout}function y(b,c){var e=c?1:-1,f=b.elements,i=b.$cont[0],k=i.cycleTimeout;if(k)clearTimeout(k), i.cycleTimeout=0;if(b.random&&e<0){b.randomIndex--;if(--b.randomIndex==-2)b.randomIndex=f.length-2;else if(b.randomIndex==-1)b.randomIndex=f.length-1;b.nextSlide=b.randomMap[b.randomIndex]}else if(b.random)b.nextSlide=b.randomMap[b.randomIndex];else if(b.nextSlide=b.currSlide+e,b.nextSlide<0){if(b.nowrap)return false;b.nextSlide=f.length-1}else if(b.nextSlide>=f.length){if(b.nowrap)return false;b.nextSlide=0}i=b.onPrevNextEvent||b.prevNextClick;a.isFunction(i)&&i(e>0,b.nextSlide,f[b.nextSlide]);t(f, b,1,c);return false}function l(b,c){var e=a(c.pager);a.each(b,function(f,i){a.fn.cycle.createPagerAnchor(f,i,e,b,c)});c.updateActivePagerLink(c.pager,c.startingSlide,c.activePagerClass)}function A(b){function c(a){a=parseInt(a,10).toString(16);return a.length<2?"0"+a:a}function e(b){for(;b&&b.nodeName.toLowerCase()!="html";b=b.parentNode){var f=a.css(b,"background-color");if(f&&f.indexOf("rgb")>=0)return b=f.match(/\d+/g),"#"+c(b[0])+c(b[1])+c(b[2]);if(f&&f!="transparent")return f}return"#ffffff"} i("applying clearType background-color hack");b.each(function(){a(this).css("background-color",e(this))})}if(a.support==c)a.support={opacity:!a.browser.msie};a.expr[":"].paused=function(a){return a.cyclePause};a.fn.cycle=function(b,c){var e={s:this.selector,c:this.context};if(this.length===0&&b!="stop"){if(!a.isReady&&e.s)return f("DOM not ready, queuing slideshow"),a(function(){a(e.s,e.c).cycle(b,c)}),this;f("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var l= j(this,b,c);if(l!==false){l.updateActivePagerLink=l.updateActivePagerLink||a.fn.cycle.updateActivePagerLink;this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var n=a(this),k=l.slideExpr?a(l.slideExpr,this):n.children(),g=k.get(),o=r(n,k,g,l,e);if(o!==false)if(g.length<2)f("terminating; too few slides: "+g.length);else if(n=o.continuous?10:x(g[o.currSlide],g[o.nextSlide],o,!o.backwards))n+=o.delay||0,n<10&&(n=10),i("first timeout: "+n),this.cycleTimeout=setTimeout(function(){t(g, o,0,!l.backwards)},n)}})};a.fn.cycle.resetState=function(b,c){c=c||b.fx;b.before=[];b.after=[];b.cssBefore=a.extend({},b.original.cssBefore);b.cssAfter=a.extend({},b.original.cssAfter);b.animIn=a.extend({},b.original.animIn);b.animOut=a.extend({},b.original.animOut);b.fxFn=null;a.each(b.original.before,function(){b.before.push(this)});a.each(b.original.after,function(){b.after.push(this)});var e=a.fn.cycle.transitions[c];a.isFunction(e)&&e(b.$cont,a(b.elements),b)};a.fn.cycle.updateActivePagerLink= function(b,c,e){a(b).each(function(){a(this).children().removeClass(e).eq(c).addClass(e)})};a.fn.cycle.next=function(a){y(a,1)};a.fn.cycle.prev=function(a){y(a,0)};a.fn.cycle.createPagerAnchor=function(b,c,f,j,n){a.isFunction(n.pagerAnchorBuilder)?(c=n.pagerAnchorBuilder(b,c),i("pagerAnchorBuilder("+b+", el) returned: "+c)):c='<a href="#">'+(b+1)+"</a>";if(c){var k=a(c);if(k.parents("body").length===0){var g=[];f.length>1?(f.each(function(){var b=k.clone(true);a(this).append(b);g.push(b[0])}),k=a(g)): k.appendTo(f)}n.pagerAnchors=n.pagerAnchors||[];n.pagerAnchors.push(k);f=function(c){c.preventDefault();n.nextSlide=b;var c=n.$cont[0],e=c.cycleTimeout;if(e)clearTimeout(e),c.cycleTimeout=0;c=n.onPagerEvent||n.pagerClick;a.isFunction(c)&&c(n.nextSlide,j[n.nextSlide]);t(j,n,1,n.currSlide<b)};/mouseenter|mouseover/i.test(n.pagerEvent)?k.hover(f,function(){}):k.bind(n.pagerEvent,f);!/^click/.test(n.pagerEvent)&&!n.allowPagerClickBubble&&k.bind("click.cycle",function(){return false});var l=n.$cont[0], o=false;n.pauseOnPagerHover&&k.hover(function(){o=true;l.cyclePause++;e(l,true,true)},function(){o&&l.cyclePause--;e(l,true,true)})}};a.fn.cycle.hopsFromLast=function(a,c){var e=a.lastSlide,f=a.currSlide;return c?f>e?f-e:a.slideCount-e:f<e?e-f:e+a.slideCount-f};a.fn.cycle.commonReset=function(b,c,e,f,i,j){a(e.elements).not(b).hide();if(typeof e.cssBefore.opacity=="undefined")e.cssBefore.opacity=1;e.cssBefore.display="block";if(e.slideResize&&f!==false&&c.cycleW>0)e.cssBefore.width=c.cycleW;if(e.slideResize&& i!==false&&c.cycleH>0)e.cssBefore.height=c.cycleH;e.cssAfter=e.cssAfter||{};e.cssAfter.display="none";a(b).css("zIndex",e.slideCount+(j===true?1:0));a(c).css("zIndex",e.slideCount+(j===true?0:1))};a.fn.cycle.custom=function(b,c,e,f,i,j){var g=a(b),l=a(c),o=e.speedIn,b=e.speedOut,q=e.easeIn,c=e.easeOut;l.css(e.cssBefore);j&&(o=typeof j=="number"?b=j:b=1,q=c=null);var r=function(){l.animate(e.animIn,o,q,function(){f()})};g.animate(e.animOut,b,c,function(){g.css(e.cssAfter);e.sync||r()});e.sync&&r()}; a.fn.cycle.transitions={fade:function(b,c,e){c.not(":eq("+e.currSlide+")").css("opacity",0);e.before.push(function(b,c,e){a.fn.cycle.commonReset(b,c,e);e.cssBefore.opacity=0});e.animIn={opacity:1};e.animOut={opacity:0};e.cssBefore={top:0,left:0}}};a.fn.cycle.ver=function(){return"2.9998"};a.fn.cycle.defaults={activePagerClass:"selected",after:null,allowPagerClickBubble:false,animIn:null,animOut:null,aspect:false,autostop:0,autostopCount:0,backwards:false,before:null,center:null,cleartype:!a.support.opacity, cleartypeNoBg:false,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:true,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:true,requeueTimeout:250,rev:0,shuffle:null, skipInitializationCallbacks:false,slideExpr:null,slideResize:1,speed:1E3,speedIn:null,speedOut:null,startingSlide:0,sync:1,timeout:4E3,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery); (function(a){a.fn.cycle.transitions.none=function(c,i,f){f.fxFn=function(c,f,i,q){a(f).show();a(c).hide();q()}};a.fn.cycle.transitions.fadeout=function(c,i,f){i.not(":eq("+f.currSlide+")").css({display:"block",opacity:1});f.before.push(function(c,f,i,q,r,u){a(c).css("zIndex",i.slideCount+(!u===true?1:0));a(f).css("zIndex",i.slideCount+(!u===true?0:1))});f.animIn.opacity=1;f.animOut.opacity=0;f.cssBefore.opacity=1;f.cssBefore.display="block";f.cssAfter.zIndex=0}})(jQuery);jQuery.easing.jswing=jQuery.easing.swing; jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,c,i,f,e){return jQuery.easing[jQuery.easing.def](a,c,i,f,e)},easeInQuad:function(a,c,i,f,e){return f*(c/=e)*c+i},easeOutQuad:function(a,c,i,f,e){return-f*(c/=e)*(c-2)+i},easeInOutQuad:function(a,c,i,f,e){return(c/=e/2)<1?f/2*c*c+i:-f/2*(--c*(c-2)-1)+i},easeInCubic:function(a,c,i,f,e){return f*(c/=e)*c*c+i},easeOutCubic:function(a,c,i,f,e){return f*((c=c/e-1)*c*c+1)+i},easeInOutCubic:function(a,c,i,f,e){return(c/=e/2)<1?f/2*c*c*c+i:f/ 2*((c-=2)*c*c+2)+i},easeInQuart:function(a,c,i,f,e){return f*(c/=e)*c*c*c+i},easeOutQuart:function(a,c,i,f,e){return-f*((c=c/e-1)*c*c*c-1)+i},easeInOutQuart:function(a,c,i,f,e){return(c/=e/2)<1?f/2*c*c*c*c+i:-f/2*((c-=2)*c*c*c-2)+i},easeInQuint:function(a,c,i,f,e){return f*(c/=e)*c*c*c*c+i},easeOutQuint:function(a,c,i,f,e){return f*((c=c/e-1)*c*c*c*c+1)+i},easeInOutQuint:function(a,c,i,f,e){return(c/=e/2)<1?f/2*c*c*c*c*c+i:f/2*((c-=2)*c*c*c*c+2)+i},easeInSine:function(a,c,i,f,e){return-f*Math.cos(c/ e*(Math.PI/2))+f+i},easeOutSine:function(a,c,i,f,e){return f*Math.sin(c/e*(Math.PI/2))+i},easeInOutSine:function(a,c,i,f,e){return-f/2*(Math.cos(Math.PI*c/e)-1)+i},easeInExpo:function(a,c,i,f,e){return c==0?i:f*Math.pow(2,10*(c/e-1))+i},easeOutExpo:function(a,c,i,f,e){return c==e?i+f:f*(-Math.pow(2,-10*c/e)+1)+i},easeInOutExpo:function(a,c,i,f,e){return c==0?i:c==e?i+f:(c/=e/2)<1?f/2*Math.pow(2,10*(c-1))+i:f/2*(-Math.pow(2,-10*--c)+2)+i},easeInCirc:function(a,c,i,f,e){return-f*(Math.sqrt(1-(c/=e)* c)-1)+i},easeOutCirc:function(a,c,i,f,e){return f*Math.sqrt(1-(c=c/e-1)*c)+i},easeInOutCirc:function(a,c,i,f,e){return(c/=e/2)<1?-f/2*(Math.sqrt(1-c*c)-1)+i:f/2*(Math.sqrt(1-(c-=2)*c)+1)+i},easeInElastic:function(a,c,i,f,e){var a=1.70158,j=0,o=f;if(c==0)return i;if((c/=e)==1)return i+f;j||(j=e*0.3);o<Math.abs(f)?(o=f,a=j/4):a=j/(2*Math.PI)*Math.asin(f/o);return-(o*Math.pow(2,10*(c-=1))*Math.sin((c*e-a)*2*Math.PI/j))+i},easeOutElastic:function(a,c,i,f,e){var a=1.70158,j=0,o=f;if(c==0)return i;if((c/= e)==1)return i+f;j||(j=e*0.3);o<Math.abs(f)?(o=f,a=j/4):a=j/(2*Math.PI)*Math.asin(f/o);return o*Math.pow(2,-10*c)*Math.sin((c*e-a)*2*Math.PI/j)+f+i},easeInOutElastic:function(a,c,i,f,e){var a=1.70158,j=0,o=f;if(c==0)return i;if((c/=e/2)==2)return i+f;j||(j=e*0.3*1.5);o<Math.abs(f)?(o=f,a=j/4):a=j/(2*Math.PI)*Math.asin(f/o);return c<1?-0.5*o*Math.pow(2,10*(c-=1))*Math.sin((c*e-a)*2*Math.PI/j)+i:o*Math.pow(2,-10*(c-=1))*Math.sin((c*e-a)*2*Math.PI/j)*0.5+f+i},easeInBack:function(a,c,i,f,e,j){j==void 0&& (j=1.70158);return f*(c/=e)*c*((j+1)*c-j)+i},easeOutBack:function(a,c,i,f,e,j){j==void 0&&(j=1.70158);return f*((c=c/e-1)*c*((j+1)*c+j)+1)+i},easeInOutBack:function(a,c,i,f,e,j){j==void 0&&(j=1.70158);return(c/=e/2)<1?f/2*c*c*(((j*=1.525)+1)*c-j)+i:f/2*((c-=2)*c*(((j*=1.525)+1)*c+j)+2)+i},easeInBounce:function(a,c,i,f,e){return f-jQuery.easing.easeOutBounce(a,e-c,0,f,e)+i},easeOutBounce:function(a,c,i,f,e){return(c/=e)<1/2.75?f*7.5625*c*c+i:c<2/2.75?f*(7.5625*(c-=1.5/2.75)*c+0.75)+i:c<2.5/2.75?f* (7.5625*(c-=2.25/2.75)*c+0.9375)+i:f*(7.5625*(c-=2.625/2.75)*c+0.984375)+i},easeInOutBounce:function(a,c,i,f,e){return c<e/2?jQuery.easing.easeInBounce(a,c*2,0,f,e)*0.5+i:jQuery.easing.easeOutBounce(a,c*2-e,0,f,e)*0.5+f*0.5+i}});
