(function($){$.fn.equalHeightColumns=function(e){var J,a;e=$.extend({},$.equalHeightColumns.defaults,e);a=$(this);J=e.height;$(this).each(function(){if(e.children){a=$(this).children(e.children);}if(!e.height){if(e.children){a.each(function(){if($(this).height()>J){J=$(this).height();}});}else{if($(this).height()>J){J=$(this).height();}}}});if(e.minHeight&&J<e.minHeight){J=e.minHeight;}if(e.maxHeight&&J>e.maxHeight){J=e.maxHeight;}a.animate({height:J},e.speed);return $(this);};$.equalHeightColumns={version:1,defaults:{children:false,height:0,minHeight:0,maxHeight:0,speed:0}};})(jQuery);(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);(function($){$.fn.infinitescroll=function(options,callback){function debug(){if(opts.debug){window.console&&console.log.call(console,arguments);}}function areSelectorsValid(opts){for(var key in opts){if(key.indexOf&&key.indexOf("Selector")>-1&&$(opts[key]).length===0){debug("Your "+key+" found no elements.");return false;}return true;}}function determinePath(path){if(path.match(/^(.*?)\b2\b(.*?$)/)){path=path.match(/^(.*?)\b2\b(.*?$)/).slice(1);}else{if(path.match(/^(.*?)2(.*?$)/)){if(path.match(/^(.*?page=)2(\/.*|$)/)){path=path.match(/^(.*?page=)2(\/.*|$)/).slice(1);return path;}debug("Trying backup next selector parse technique. Treacherous waters here, matey.");path=path.match(/^(.*?)2(.*?$)/).slice(1);}else{if(path.match(/^(.*?page=)1(\/.*|$)/)){path=path.match(/^(.*?page=)1(\/.*|$)/).slice(1);return path;}if($.isFunction(opts.pathParse)){return[path];}else{debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.");props.isInvalidPage=true;}}}return path;}function filterNav(){opts.isFiltered=true;return $(window).trigger("error.infscr."+opts.infid,[302]);}function isNearBottom(){var pixelsFromWindowBottomToBottom=0+$(document).height()-($(props.container).scrollTop()||$(props.container.ownerDocument.body).scrollTop())-$(window).height();debug("math:",pixelsFromWindowBottomToBottom,props.pixelsFromNavToBottom);return(pixelsFromWindowBottomToBottom-opts.bufferPx<props.pixelsFromNavToBottom);}function showDoneMsg(){props.loadingMsg.find("img").hide().parent().find("div").html(opts.donetext).animate({opacity:1},2000,function(){$(this).parent().fadeOut("normal");});opts.errorCallback();}function infscrSetup(){if(opts.isDuringAjax||opts.isInvalidPage||opts.isDone||opts.isFiltered||opts.isPaused){return;}if(!isNearBottom(opts,props)){return;}$(document).trigger("retrieve.infscr."+opts.infid);}function kickOffAjax(){opts.isDuringAjax=true;props.loadingMsg.appendTo(opts.loadMsgSelector).show(opts.loadingMsgRevealSpeed,function(){$(opts.navSelector).hide();opts.currPage++;debug("heading into ajax",path);box=$(opts.contentSelector).is("table")?$("<tbody/>"):$("<div/>");frag=document.createDocumentFragment();if($.isFunction(opts.pathParse)){desturl=opts.pathParse(path.join("2"),opts.currPage);}else{desturl=path.join(opts.currPage);}box.load(desturl+" "+opts.itemSelector,null,loadCallback);});}function loadCallback(){if(opts.isDone){showDoneMsg();return false;}else{var children=box.children();if(children.length==0||children.hasClass("error404")){return $(window).trigger("error.infscr."+opts.infid,[404]);}while(box[0].firstChild){frag.appendChild(box[0].firstChild);}$(opts.contentSelector)[0].appendChild(frag);props.loadingMsg.fadeOut("normal");if(opts.animate){var scrollTo=$(window).scrollTop()+$("#infscr-loading").height()+opts.extraScrollPx+"px";$("html,body").animate({scrollTop:scrollTo},800,function(){opts.isDuringAjax=false;});}callback.call($(opts.contentSelector)[0],children.get());if(!opts.animate){opts.isDuringAjax=false;}}}function initPause(pauseValue){if(pauseValue=="pause"){opts.isPaused=true;}else{if(pauseValue=="resume"){opts.isPaused=false;}else{opts.isPaused=!opts.isPaused;}}debug("Paused: "+opts.isPaused);return false;}function infscrError(xhr){if(!opts.isDone&&xhr==404){debug("Page not found. Self-destructing...");showDoneMsg();opts.isDone=true;opts.currPage=1;$(window).unbind("scroll.infscr."+opts.infid);$(document).unbind("retrieve.infscr."+opts.infid);}if(opts.isFiltered&&xhr==302){debug("Filtered. Going to next instance...");opts.isDone=true;opts.currPage=1;opts.isPaused=false;$(window).unbind("scroll.infscr."+opts.infid,infscrSetup).unbind("pause.infscr."+opts.infid).unbind("filter.infscr."+opts.infid).unbind("error.infscr."+opts.infid);$(document).unbind("retrieve.infscr."+opts.infid,kickOffAjax);}}$.browser.ie6=$.browser.msie&&$.browser.version<7;var opts=$.extend({},$.infinitescroll.defaults,options),props=$.infinitescroll,box,frag,desturl,thisPause,errorStatus;callback=callback||function(){};if(!areSelectorsValid(opts)){return false;}props.container=document.documentElement;opts.contentSelector=opts.contentSelector||this;opts.loadMsgSelector=opts.loadMsgSelector||opts.contentSelector;var relurl=/(.*?\/\/).*?(\/.*)/,path=$(opts.nextSelector).attr("href");if(!path){debug("Navigation selector not found");return;}path=determinePath(path);props.pixelsFromNavToBottom=$(document).height()+(props.container==document.documentElement?0:$(props.container).offset().top)-$(opts.navSelector).offset().top;props.loadingMsg=$('<div id="infscr-loading" style="text-align: center;"><img alt="Loading..." src="'+opts.loadingImg+'" /><div>'+opts.loadingText+"</div></div>");(new Image()).src=opts.loadingImg;$(window).bind("scroll.infscr."+opts.infid,infscrSetup).bind("filter.infscr."+opts.infid,filterNav).bind("error.infscr."+opts.infid,function(event,errorStatus){infscrError(errorStatus);}).bind("pause.infscr."+opts.infid,function(event,thisPause){initPause(thisPause);}).trigger("scroll.infscr."+opts.infid);$(document).bind("retrieve.infscr."+opts.infid,kickOffAjax);return this;};$.infinitescroll={defaults:{debug:false,preload:false,nextSelector:"div.navigation a:first",loadingImg:"http://www.infinite-scroll.com/loading.gif",loadingText:"<em>Loading the next set of posts...</em>",donetext:"<em>Congratulations, you've reached the end of the internet.</em>",navSelector:"div.navigation",contentSelector:null,loadMsgSelector:null,loadingMsgRevealSpeed:"fast",extraScrollPx:150,itemSelector:"div.post",animate:false,pathParse:undefined,bufferPx:40,errorCallback:function(){},infid:1,currPage:1,isDuringAjax:false,isInvalidPage:false,isFiltered:false,isDone:false,isPaused:false},loadingImg:undefined,loadingMsg:undefined,container:undefined,currDOMChunk:null};})(jQuery);(function($){$.prettyPhoto={version:"3.0"};$.fn.prettyPhoto=function(pp_settings){pp_settings=jQuery.extend({animation_speed:"fast",slideshow:false,autoplay_slideshow:false,opacity:0.8,show_title:true,allow_resize:true,default_width:500,default_height:344,counter_separator_label:"/",theme:"light_square",hideflash:false,wmode:"transparent",autoplay:true,modal:false,overlay_gallery:true,keyboard_shortcuts:true,changepicturecallback:function(){},callback:function(){},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"> 											<p class="pp_description"></p> 											<a class="pp_close" href="#">Close</a> 											<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> 										</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> 								<ul> 									{gallery} 								</ul> 								<a href="#" class="pp_arrow_next">Next</a> 							</div>',image_markup:'<img id="fullResImage" src="" />',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 clearfix">{content}</div>',custom_markup:""},pp_settings);var matchedObjects=this,percentBased=false,correctSizes,pp_open,pp_contentHeight,pp_contentWidth,pp_containerHeight,pp_containerWidth,windowHeight=$(window).height(),windowWidth=$(window).width(),pp_slideshow;doresize=true,scroll_pos=_get_scroll();$(window).unbind("resize").resize(function(){_center_overlay();_resize_overlay();});if(pp_settings.keyboard_shortcuts){$(document).unbind("keydown").keydown(function(e){if(typeof $pp_pic_holder!="undefined"){if($pp_pic_holder.is(":visible")){switch(e.keyCode){case 37:$.prettyPhoto.changePage("previous");break;case 39:$.prettyPhoto.changePage("next");break;case 27:if(!settings.modal){$.prettyPhoto.close();}break;}return false;}}});}$.prettyPhoto.initialize=function(){settings=pp_settings;if($.browser.msie&&parseInt($.browser.version)==6){settings.theme="light_square";}_buildOverlay(this);if(settings.allow_resize){$(window).scroll(function(){_center_overlay();});}_center_overlay();set_position=jQuery.inArray($(this).attr("href"),pp_images);$.prettyPhoto.open();return false;};$.prettyPhoto.open=function(event){if(typeof settings=="undefined"){settings=pp_settings;if($.browser.msie&&$.browser.version==6){settings.theme="light_square";}_buildOverlay(event.target);pp_images=$.makeArray(arguments[0]);pp_titles=(arguments[1])?$.makeArray(arguments[1]):$.makeArray("");pp_descriptions=(arguments[2])?$.makeArray(arguments[2]):$.makeArray("");isSet=(pp_images.length>1)?true:false;set_position=0;}if($.browser.msie&&$.browser.version==6){$("select").css("visibility","hidden");}if(settings.hideflash){$("object,embed").css("visibility","hidden");}_checkPosition($(pp_images).size());$(".pp_loaderIcon").show();if($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+$(pp_images).size());$pp_pic_holder.find(".pp_description").show().html(unescape(pp_descriptions[set_position]));(settings.show_title&&pp_titles[set_position]!=""&&typeof pp_titles[set_position]!="undefined")?$ppt.html(unescape(pp_titles[set_position])):$ppt.html("&nbsp;");movie_width=(parseFloat(grab_param("width",pp_images[set_position])))?grab_param("width",pp_images[set_position]):settings.default_width.toString();movie_height=(parseFloat(grab_param("height",pp_images[set_position])))?grab_param("height",pp_images[set_position]):settings.default_height.toString();if(movie_width.indexOf("%")!=-1||movie_height.indexOf("%")!=-1){movie_height=parseFloat(($(window).height()*parseFloat(movie_height)/100)-150);movie_width=parseFloat(($(window).width()*parseFloat(movie_width)/100)-150);percentBased=true;}else{percentBased=false;}$pp_pic_holder.fadeIn(function(){imgPreloader="";switch(_getFileType(pp_images[set_position])){case"image":imgPreloader=new Image();nextImage=new Image();if(isSet&&set_position>$(pp_images).size()){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;$pp_pic_holder.find("#fullResImage").attr("src",pp_images[set_position]);imgPreloader.onload=function(){correctSizes=_fitToViewport(imgPreloader.width,imgPreloader.height);_showContent();};imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist.");$.prettyPhoto.close();};imgPreloader.src=pp_images[set_position];break;case"youtube":correctSizes=_fitToViewport(movie_width,movie_height);movie="http://www.youtube.com/v/"+grab_param("v",pp_images[set_position]);if(settings.autoplay){movie+="&autoplay=1";}toInject=settings.flash_markup.replace(/{width}/g,correctSizes["width"]).replace(/{height}/g,correctSizes["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":correctSizes=_fitToViewport(movie_width,movie_height);movie_id=pp_images[set_position];var regExp=/http:\/\/(www\.)?vimeo.com\/(\d+)/;var match=movie_id.match(regExp);movie="http://player.vimeo.com/video/"+match[2]+"?title=0&amp;byline=0&amp;portrait=0";if(settings.autoplay){movie+="&autoplay=1;";}vimeo_width=correctSizes["width"]+"/embed/?moog_width="+correctSizes["width"];toInject=settings.iframe_markup.replace(/{width}/g,vimeo_width).replace(/{height}/g,correctSizes["height"]).replace(/{path}/g,movie);break;case"quicktime":correctSizes=_fitToViewport(movie_width,movie_height);correctSizes["height"]+=15;correctSizes["contentHeight"]+=15;correctSizes["containerHeight"]+=15;toInject=settings.quicktime_markup.replace(/{width}/g,correctSizes["width"]).replace(/{height}/g,correctSizes["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[set_position]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":correctSizes=_fitToViewport(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,correctSizes["width"]).replace(/{height}/g,correctSizes["height"]).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":correctSizes=_fitToViewport(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,correctSizes["width"]).replace(/{height}/g,correctSizes["height"]).replace(/{path}/g,frame_url);break;case"custom":correctSizes=_fitToViewport(movie_width,movie_height);toInject=settings.custom_markup;break;case"inline":myClone=$(pp_images[set_position]).clone().css({"width":settings.default_width}).wrapInner('<div id="pp_full_res"><div class="pp_inline clearfix"></div></div>').appendTo($("body"));correctSizes=_fitToViewport($(myClone).width(),$(myClone).height());$(myClone).remove();toInject=settings.inline_markup.replace(/{content}/g,$(pp_images[set_position]).html());break;}if(!imgPreloader){$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject;_showContent();}});return false;};$.prettyPhoto.changePage=function(direction){currentGalleryPage=0;if(direction=="previous"){set_position--;if(set_position<0){set_position=0;return;}}else{if(direction=="next"){set_position++;if(set_position>$(pp_images).size()-1){set_position=0;}}else{set_position=direction;}}if(!doresize){doresize=true;}$(".pp_contract").removeClass("pp_contract").addClass("pp_expand");_hideContent(function(){$.prettyPhoto.open();});};$.prettyPhoto.changeGalleryPage=function(direction){if(direction=="next"){currentGalleryPage++;if(currentGalleryPage>totalPage){currentGalleryPage=0;}}else{if(direction=="previous"){currentGalleryPage--;if(currentGalleryPage<0){currentGalleryPage=totalPage;}}else{currentGalleryPage=direction;}}itemsToSlide=(currentGalleryPage==totalPage)?pp_images.length-((totalPage)*itemsPerPage):itemsPerPage;$pp_pic_holder.find(".pp_gallery li").each(function(i){$(this).animate({"left":(i*itemWidth)-((itemsToSlide*itemWidth)*currentGalleryPage)});});};$.prettyPhoto.startSlideshow=function(){if(typeof pp_slideshow=="undefined"){$pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){$.prettyPhoto.stopSlideshow();return false;});pp_slideshow=setInterval($.prettyPhoto.startSlideshow,settings.slideshow);}else{$.prettyPhoto.changePage("next");}};$.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){$.prettyPhoto.startSlideshow();return false;});clearInterval(pp_slideshow);pp_slideshow=undefined;};$.prettyPhoto.close=function(){clearInterval(pp_slideshow);$pp_pic_holder.stop().find("object,embed").css("visibility","hidden");$("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){$(this).remove();});$pp_overlay.fadeOut(settings.animation_speed,function(){if($.browser.msie&&$.browser.version==6){$("select").css("visibility","visible");}if(settings.hideflash){$("object,embed").css("visibility","visible");}$(this).remove();$(window).unbind("scroll");settings.callback();doresize=true;pp_open=false;delete settings;});};_showContent=function(){$(".pp_loaderIcon").hide();$ppt.fadeTo(settings.animation_speed,1);projectedTop=scroll_pos["scrollTop"]+((windowHeight/2)-(correctSizes["containerHeight"]/2));if(projectedTop<0){projectedTop=0;}$pp_pic_holder.find(".pp_content").animate({"height":correctSizes["contentHeight"]},settings.animation_speed);$pp_pic_holder.animate({"top":projectedTop,"left":(windowWidth/2)-(correctSizes["containerWidth"]/2),"width":correctSizes["containerWidth"]},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(correctSizes["height"]).width(correctSizes["width"]);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);if(isSet&&_getFileType(pp_images[set_position])=="image"){$pp_pic_holder.find(".pp_hoverContainer").show();}else{$pp_pic_holder.find(".pp_hoverContainer").hide();}if(correctSizes["resized"]){$("a.pp_expand,a.pp_contract").fadeIn(settings.animation_speed);}if(settings.autoplay_slideshow&&!pp_slideshow&&!pp_open){$.prettyPhoto.startSlideshow();}settings.changepicturecallback();pp_open=true;});_insert_gallery();};function _hideContent(callback){$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(){$(".pp_loaderIcon").show();callback();});}function _checkPosition(setCount){if(set_position==setCount-1){$pp_pic_holder.find("a.pp_next").css("visibility","hidden");$pp_pic_holder.find("a.pp_next").addClass("disabled").unbind("click");}else{$pp_pic_holder.find("a.pp_next").css("visibility","visible");$pp_pic_holder.find("a.pp_next.disabled").removeClass("disabled").bind("click",function(){$.prettyPhoto.changePage("next");return false;});}if(set_position==0){$pp_pic_holder.find("a.pp_previous").css("visibility","hidden").addClass("disabled").unbind("click");}else{$pp_pic_holder.find("a.pp_previous.disabled").css("visibility","visible").removeClass("disabled").bind("click",function(){$.prettyPhoto.changePage("previous");return false;});}(setCount>1)?$(".pp_nav").show():$(".pp_nav").hide();}function _fitToViewport(width,height){resized=false;_getDimensions(width,height);imageWidth=width,imageHeight=height;if(((pp_containerWidth>windowWidth)||(pp_containerHeight>windowHeight))&&doresize&&settings.allow_resize&&!percentBased){resized=true,fitting=false;while(!fitting){if((pp_containerWidth>windowWidth)){imageWidth=(windowWidth-200);imageHeight=(height/width)*imageWidth;}else{if((pp_containerHeight>windowHeight)){imageHeight=(windowHeight-200);imageWidth=(width/height)*imageHeight;}else{fitting=true;}}pp_containerHeight=imageHeight,pp_containerWidth=imageWidth;}_getDimensions(imageWidth,imageHeight);}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(pp_containerHeight),containerWidth:Math.floor(pp_containerWidth),contentHeight:Math.floor(pp_contentHeight),contentWidth:Math.floor(pp_contentWidth),resized:resized};}function _getDimensions(width,height){width=parseFloat(width);height=parseFloat(height);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(width);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().appendTo($("body")).css({"position":"absolute","top":-10000});detailsHeight+=$(".pp_details").height();detailsHeight=(detailsHeight<=34)?36:detailsHeight;if($.browser.msie&&$.browser.version==7){detailsHeight+=8;}$pp_details.remove();pp_contentHeight=height+detailsHeight;pp_contentWidth=width;pp_containerHeight=pp_contentHeight+$ppt.height()+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();pp_containerWidth=width;}function _getFileType(itemSrc){if(itemSrc.match(/youtube\.com\/watch/i)){return"youtube";}else{if(itemSrc.match(/vimeo\.com/i)){return"vimeo";}else{if(itemSrc.indexOf(".mov")!=-1){return"quicktime";}else{if(itemSrc.indexOf(".swf")!=-1){return"flash";}else{if(itemSrc.indexOf("iframe")!=-1){return"iframe";}else{if(itemSrc.indexOf("custom")!=-1){return"custom";}else{if(itemSrc.substr(0,1)=="#"){return"inline";}else{return"image";}}}}}}}}function _center_overlay(){if(doresize&&typeof $pp_pic_holder!="undefined"){scroll_pos=_get_scroll();titleHeight=$ppt.height(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width();projectedTop=(windowHeight/2)+scroll_pos["scrollTop"]-(contentHeight/2);$pp_pic_holder.css({"top":projectedTop,"left":(windowWidth/2)+scroll_pos["scrollLeft"]-(contentwidth/2)});}}function _get_scroll(){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 _resize_overlay(){windowHeight=$(window).height(),windowWidth=$(window).width();if(typeof $pp_overlay!="undefined"){$pp_overlay.height($(document).height());}}function _insert_gallery(){if(isSet&&settings.overlay_gallery&&_getFileType(pp_images[set_position])=="image"){itemWidth=52+5;navWidth=(settings.theme=="facebook")?58:38;itemsPerPage=Math.floor((correctSizes["containerWidth"]-100-navWidth)/itemWidth);itemsPerPage=(itemsPerPage<pp_images.length)?itemsPerPage:pp_images.length;totalPage=Math.ceil(pp_images.length/itemsPerPage)-1;if(totalPage==0){navWidth=0;$pp_pic_holder.find(".pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous").hide();}else{$pp_pic_holder.find(".pp_gallery .pp_arrow_next,.pp_gallery .pp_arrow_previous").show();}galleryWidth=itemsPerPage*itemWidth+navWidth;$pp_pic_holder.find(".pp_gallery").width(galleryWidth).css("margin-left",-(galleryWidth/2));$pp_pic_holder.find(".pp_gallery ul").width(itemsPerPage*itemWidth).find("li.selected").removeClass("selected");goToPage=(Math.floor(set_position/itemsPerPage)<=totalPage)?Math.floor(set_position/itemsPerPage):totalPage;if(itemsPerPage){$pp_pic_holder.find(".pp_gallery").hide().show().removeClass("disabled");}else{$pp_pic_holder.find(".pp_gallery").hide().addClass("disabled");}$.prettyPhoto.changeGalleryPage(goToPage);$pp_pic_holder.find(".pp_gallery ul li:eq("+set_position+")").addClass("selected");}else{$pp_pic_holder.find(".pp_content").unbind("mouseenter mouseleave");$pp_pic_holder.find(".pp_gallery").hide();}}function _buildOverlay(caller){theRel=$(caller).attr("rel");galleryRegExp=/\[(?:.*)\]/;isSet=(galleryRegExp.exec(theRel))?true:false;pp_images=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr("rel").indexOf(theRel)!=-1){return $(n).attr("href");}}):$.makeArray($(caller).attr("href"));pp_titles=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr("rel").indexOf(theRel)!=-1){return($(n).find("img").attr("alt"))?$(n).find("img").attr("alt"):"";}}):$.makeArray($(caller).find("img").attr("alt"));pp_descriptions=(isSet)?jQuery.map(matchedObjects,function(n,i){if($(n).attr("rel").indexOf(theRel)!=-1){return($(n).attr("title"))?$(n).attr("title"):"";}}):$.makeArray($(caller).attr("title"));$("body").append(settings.markup);$pp_pic_holder=$(".pp_pic_holder"),$ppt=$(".ppt"),$pp_overlay=$("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var i=0;i<pp_images.length;i++){var regex=new RegExp("(.*?).(jpg|jpeg|png|gif)$");var results=regex.exec(pp_images[i]);if(!results){classname="default";}else{classname="";}toInject+="<li class='"+classname+"'><a href='#'><img src='"+pp_images[i]+"' width='50' alt='' /></a></li>";}toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_pic_holder.find(".pp_gallery .pp_arrow_next").click(function(){$.prettyPhoto.changeGalleryPage("next");$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find(".pp_gallery .pp_arrow_previous").click(function(){$.prettyPhoto.changeGalleryPage("previous");$.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=52+5;$pp_pic_holder.find(".pp_gallery ul li").each(function(i){$(this).css({"position":"absolute","left":i*itemWidth});$(this).find("a").unbind("click").click(function(){$.prettyPhoto.changePage(i);$.prettyPhoto.stopSlideshow();return false;});});}if(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(){$.prettyPhoto.startSlideshow();return false;});}$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({"opacity":0,"height":$(document).height(),"width":$(document).width()}).bind("click",function(){if(!settings.modal){$.prettyPhoto.close();}});$("a.pp_close").bind("click",function(){$.prettyPhoto.close();return false;});$("a.pp_expand").bind("click",function(e){if($(this).hasClass("pp_expand")){$(this).removeClass("pp_expand").addClass("pp_contract");doresize=false;}else{$(this).removeClass("pp_contract").addClass("pp_expand");doresize=true;}_hideContent(function(){$.prettyPhoto.open();});return false;});$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){$.prettyPhoto.changePage("previous");$.prettyPhoto.stopSlideshow();return false;});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){$.prettyPhoto.changePage("next");$.prettyPhoto.stopSlideshow();return false;});_center_overlay();}return this.unbind("click").click($.prettyPhoto.initialize);};function grab_param(name,url){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);return(results==null)?"":results[1];}})(jQuery);(function($){$.fn.konami=function(callback,code){if(code==undefined){code="38,38,40,40,37,39,37,39,66,65";}return this.each(function(){var kkeys=[];$(this).keydown(function(e){kkeys.push(e.keyCode);if(kkeys.toString().length>code.length){kkeys.shift();}if(kkeys.toString().indexOf(code)>=0){kkeys=[];callback(e);}},true);});};})(jQuery);(function($){$.fn.lavaLamp=function(o){o=$.extend({fx:"linear",speed:500,click:function(){}},o||{});return this.each(function(){var me=$(this),noop=function(){},$back=$('<li class="back"><div class="left"></div></li>').appendTo(me),$li=$("li",this),curr=$("li.current",this)[0]||$($li[0]).addClass("current")[0];if($(".home").length){$back.hide();$li.removeClass("current");}$li.not(".back").mouseover(function(){if($(".home").length){$back.show();}move(this);},noop);$(this).hover(noop,function(){if($(".home").length){$back.hide();}move(curr);});$li.click(function(e){if(!$(".home").length){setCurr(this);$li.not(".back").removeClass("current");$(this).addClass("current");return o.click.apply(this,[e,this]);}});setCurr(curr);function setCurr(el){$back.css({"left":el.offsetLeft+"px","width":el.offsetWidth+"px"});curr=el;}function move(el){$back.each(function(){$(this).dequeue();}).animate({width:el.offsetWidth,left:el.offsetLeft},o.speed,o.fx);}});};})(jQuery);jQuery.extend({roundabout_shape:{def:"lazySusan",lazySusan:function(r,a,t){return{x:Math.sin(r+a),y:(Math.sin(r+3*Math.PI/2+a)/8)*t,z:(Math.cos(r+a)+1)/2,scale:(Math.sin(r+Math.PI/2+a)/2)+0.5};}}});jQuery.fn.roundabout=function(){var options=(typeof arguments[0]!="object")?{}:arguments[0];options={bearing:(typeof options.bearing=="undefined")?0:jQuery.roundabout_toFloat(options.bearing%360),tilt:(typeof options.tilt=="undefined")?0:jQuery.roundabout_toFloat(options.tilt),minZ:(typeof options.minZ=="undefined")?100:parseInt(options.minZ,10),maxZ:(typeof options.maxZ=="undefined")?400:parseInt(options.maxZ,10),minOpacity:(typeof options.minOpacity=="undefined")?0.4:jQuery.roundabout_toFloat(options.minOpacity),maxOpacity:(typeof options.maxOpacity=="undefined")?1:jQuery.roundabout_toFloat(options.maxOpacity),minScale:(typeof options.minScale=="undefined")?0.4:jQuery.roundabout_toFloat(options.minScale),maxScale:(typeof options.maxScale=="undefined")?1:jQuery.roundabout_toFloat(options.maxScale),duration:(typeof options.duration=="undefined")?600:parseInt(options.duration,10),btnNext:options.btnNext||null,btnPrev:options.btnPrev||null,easing:options.easing||"swing",clickToFocus:(options.clickToFocus!==false),focusBearing:(typeof options.focusBearing=="undefined")?0:jQuery.roundabout_toFloat(options.focusBearing%360),shape:options.shape||"lazySusan",debug:options.debug||false,childSelector:options.childSelector||"li",startingChild:(typeof options.startingChild=="undefined")?null:parseInt(options.startingChild,10),reflect:(typeof options.reflect=="undefined"||options.reflect===false)?false:true};this.each(function(i){var ref=jQuery(this);var period=jQuery.roundabout_toFloat(360/ref.children(options.childSelector).length);var startingBearing=(options.startingChild===null)?options.bearing:options.startingChild*period;ref.addClass("roundabout-holder").css("padding",0).css("position","relative").css("z-index",options.minZ);ref.data("roundabout",{"bearing":startingBearing,"tilt":options.tilt,"minZ":options.minZ,"maxZ":options.maxZ,"minOpacity":options.minOpacity,"maxOpacity":options.maxOpacity,"minScale":options.minScale,"maxScale":options.maxScale,"duration":options.duration,"easing":options.easing,"clickToFocus":options.clickToFocus,"focusBearing":options.focusBearing,"animating":0,"childInFocus":-1,"shape":options.shape,"period":period,"debug":options.debug,"childSelector":options.childSelector,"reflect":options.reflect});if(options.clickToFocus===true){ref.children(options.childSelector).each(function(i){jQuery(this).click(function(e){var degrees=(options.reflect===true)?360-(period*i):period*i;degrees=jQuery.roundabout_toFloat(degrees);if(!jQuery.roundabout_isInFocus(ref,degrees)){e.preventDefault();if(ref.data("roundabout").animating===0){ref.roundabout_animateAngleToFocus(degrees);}return false;}});});}if(options.btnNext){jQuery(options.btnNext).bind("click.roundabout",function(e){e.preventDefault();if(ref.data("roundabout").animating===0){ref.roundabout_animateToNextChild();}return false;});}if(options.btnPrev){jQuery(options.btnPrev).bind("click.roundabout",function(e){e.preventDefault();if(ref.data("roundabout").animating===0){ref.roundabout_animateToPreviousChild();}return false;});}});this.roundabout_startChildren();if(typeof arguments[1]==="function"){var callback=arguments[1],ref=this;setTimeout(function(){callback(ref);},0);}return this;};jQuery.fn.roundabout_startChildren=function(){this.each(function(i){var ref=jQuery(this);var data=ref.data("roundabout");var children=ref.children(data.childSelector);children.each(function(i){var degrees=(data.reflect===true)?360-(data.period*i):data.period*i;jQuery(this).addClass("roundabout-moveable-item").css("position","absolute");jQuery(this).data("roundabout",{"startWidth":jQuery(this).width(),"startHeight":jQuery(this).height(),"startFontSize":parseInt(jQuery(this).css("font-size"),10),"degrees":degrees});});ref.roundabout_updateChildPositions();});return this;};jQuery.fn.roundabout_setTilt=function(newTilt){this.each(function(i){jQuery(this).data("roundabout").tilt=newTilt;jQuery(this).roundabout_updateChildPositions();});if(typeof arguments[1]==="function"){var callback=arguments[1],ref=this;setTimeout(function(){callback(ref);},0);}return this;};jQuery.fn.roundabout_setBearing=function(newBearing){this.each(function(i){jQuery(this).data("roundabout").bearing=jQuery.roundabout_toFloat(newBearing%360,2);jQuery(this).roundabout_updateChildPositions();});if(typeof arguments[1]==="function"){var callback=arguments[1],ref=this;setTimeout(function(){callback(ref);},0);}return this;};jQuery.fn.roundabout_adjustBearing=function(delta){delta=jQuery.roundabout_toFloat(delta);if(delta!==0){this.each(function(i){jQuery(this).data("roundabout").bearing=jQuery.roundabout_getBearing(jQuery(this))+delta;jQuery(this).roundabout_updateChildPositions();});}if(typeof arguments[1]==="function"){var callback=arguments[1],ref=this;setTimeout(function(){callback(ref);},0);}return this;};jQuery.fn.roundabout_adjustTilt=function(delta){delta=jQuery.roundabout_toFloat(delta);if(delta!==0){this.each(function(i){jQuery(this).data("roundabout").tilt=jQuery.roundabout_toFloat(jQuery(this).roundabout_get("tilt")+delta);jQuery(this).roundabout_updateChildPositions();});}if(typeof arguments[1]==="function"){var callback=arguments[1],ref=this;setTimeout(function(){callback(ref);},0);}return this;};jQuery.fn.roundabout_animateToBearing=function(bearing){bearing=jQuery.roundabout_toFloat(bearing);var currentTime=new Date();var duration=(typeof arguments[1]=="undefined")?null:arguments[1];var easingType=(typeof arguments[2]=="undefined")?null:arguments[2];var passedData=(typeof arguments[3]!=="object")?null:arguments[3];this.each(function(i){var ref=jQuery(this),data=ref.data("roundabout"),timer,easingFn,newBearing;var thisDuration=(duration===null)?data.duration:duration;var thisEasingType=(easingType!==null)?easingType:data.easing||"swing";if(passedData===null){passedData={timerStart:currentTime,start:jQuery.roundabout_getBearing(ref),totalTime:thisDuration};}timer=currentTime-passedData.timerStart;if(timer<thisDuration){data.animating=1;if(typeof jQuery.easing.def=="string"){easingFn=jQuery.easing[thisEasingType]||jQuery.easing[jQuery.easing.def];newBearing=easingFn(null,timer,passedData.start,bearing-passedData.start,passedData.totalTime);}else{newBearing=jQuery.easing[thisEasingType]((timer/passedData.totalTime),timer,passedData.start,bearing-passedData.start,passedData.totalTime);}ref.roundabout_setBearing(newBearing,function(){ref.roundabout_animateToBearing(bearing,thisDuration,thisEasingType,passedData);});}else{bearing=(bearing<0)?bearing+360:bearing%360;data.animating=0;ref.roundabout_setBearing(bearing);}});return this;};jQuery.fn.roundabout_animateToDelta=function(delta){var duration=arguments[1],easing=arguments[2];this.each(function(i){delta=jQuery.roundabout_getBearing(jQuery(this))+jQuery.roundabout_toFloat(delta);jQuery(this).roundabout_animateToBearing(delta,duration,easing);});return this;};jQuery.fn.roundabout_animateToChild=function(childPos){var duration=arguments[1],easing=arguments[2];this.each(function(i){var ref=jQuery(this),data=ref.data("roundabout");if(data.childInFocus!==childPos&&data.animating===0){var child=jQuery(ref.children(data.childSelector)[childPos]);ref.roundabout_animateAngleToFocus(child.data("roundabout").degrees,duration,easing);}});return this;};jQuery.fn.roundabout_animateToNearbyChild=function(passedArgs,which){var duration=passedArgs[0],easing=passedArgs[1];this.each(function(i){var data=jQuery(this).data("roundabout");var bearing=jQuery.roundabout_toFloat(360-jQuery.roundabout_getBearing(jQuery(this)));var period=data.period,j=0,range;var reflect=data.reflect;var length=jQuery(this).children(data.childSelector).length;bearing=(reflect===true)?bearing%360:bearing;if(data.animating===0){if((reflect===false&&which==="next")||(reflect===true&&which!=="next")){bearing=(bearing===0)?360:bearing;while(true&&j<length){range={lower:jQuery.roundabout_toFloat(period*j),upper:jQuery.roundabout_toFloat(period*(j+1))};range.upper=(j==length-1)?360:range.upper;if(bearing<=range.upper&&bearing>range.lower){jQuery(this).roundabout_animateToDelta(bearing-range.lower,duration,easing);break;}j++;}}else{while(true){range={lower:jQuery.roundabout_toFloat(period*j),upper:jQuery.roundabout_toFloat(period*(j+1))};range.upper=(j==length-1)?360:range.upper;if(bearing>=range.lower&&bearing<range.upper){jQuery(this).roundabout_animateToDelta(bearing-range.upper,duration,easing);break;}j++;}}}});return this;};jQuery.fn.roundabout_animateToNextChild=function(){return this.roundabout_animateToNearbyChild(arguments,"next");};jQuery.fn.roundabout_animateToPreviousChild=function(){return this.roundabout_animateToNearbyChild(arguments,"previous");};jQuery.fn.roundabout_animateAngleToFocus=function(target){var duration=arguments[1],easing=arguments[2];this.each(function(i){var delta=jQuery.roundabout_getBearing(jQuery(this))-target;delta=(Math.abs(360-delta)<Math.abs(0-delta))?360-delta:0-delta;delta=(delta>180)?-(360-delta):delta;if(delta!==0){jQuery(this).roundabout_animateToDelta(delta,duration,easing);}});return this;};jQuery.fn.roundabout_updateChildPositions=function(){this.each(function(i){var ref=jQuery(this),data=ref.data("roundabout");var inFocus=-1;var info={bearing:jQuery.roundabout_getBearing(ref),tilt:data.tilt,stage:{width:Math.floor(ref.width()*0.9),height:Math.floor(ref.height()*0.9)},animating:data.animating,inFocus:data.childInFocus,focusBearingRad:jQuery.roundabout_degToRad(data.focusBearing),shape:jQuery.roundabout_shape[data.shape]||jQuery.roundabout_shape[jQuery.roundabout_shape.def]};info.midStage={width:info.stage.width/2,height:info.stage.height/2};info.nudge={width:info.midStage.width+info.stage.width*0.05,height:info.midStage.height+info.stage.height*0.05};info.zValues={min:data.minZ,max:data.maxZ,diff:data.maxZ-data.minZ};info.opacity={min:data.minOpacity,max:data.maxOpacity,diff:data.maxOpacity-data.minOpacity};info.scale={min:data.minScale,max:data.maxScale,diff:data.maxScale-data.minScale};ref.children(data.childSelector).each(function(i){if(jQuery.roundabout_updateChildPosition(jQuery(this),ref,info,i)&&info.animating===0){inFocus=i;jQuery(this).addClass("roundabout-in-focus");}else{jQuery(this).removeClass("roundabout-in-focus");}});if(inFocus!==info.inFocus){jQuery.roundabout_triggerEvent(ref,info.inFocus,"blur");if(inFocus!==-1){jQuery.roundabout_triggerEvent(ref,inFocus,"focus");}data.childInFocus=inFocus;}});return this;};jQuery.roundabout_getBearing=function(el){return jQuery.roundabout_toFloat(el.data("roundabout").bearing)%360;};jQuery.roundabout_degToRad=function(degrees){return(degrees%360)*Math.PI/180;};jQuery.roundabout_isInFocus=function(el,target){return(jQuery.roundabout_getBearing(el)%360===(target%360));};jQuery.roundabout_triggerEvent=function(el,child,eventType){return(child<0)?this:jQuery(el.children(el.data("roundabout").childSelector)[child]).trigger(eventType);};jQuery.roundabout_toFloat=function(number){number=Math.round(parseFloat(number)*1000)/1000;return parseFloat(number.toFixed(2));};jQuery.roundabout_updateChildPosition=function(child,container,info,childPos){var ref=jQuery(child),data=ref.data("roundabout"),out=[];var rad=jQuery.roundabout_degToRad((360-ref.data("roundabout").degrees)+info.bearing);while(rad<0){rad=rad+Math.PI*2;}while(rad>Math.PI*2){rad=rad-Math.PI*2;}var factors=info.shape(rad,info.focusBearingRad,info.tilt);factors.scale=(factors.scale>1)?1:factors.scale;factors.adjustedScale=(info.scale.min+(info.scale.diff*factors.scale)).toFixed(4);factors.width=(factors.adjustedScale*data.startWidth).toFixed(4);factors.height=(factors.adjustedScale*data.startHeight).toFixed(4);ref.css("left",((factors.x*info.midStage.width+info.nudge.width)-factors.width/2).toFixed(1)+"px").css("top",((factors.y*info.midStage.height+info.nudge.height)-factors.height/2).toFixed(1)+"px").css("width",factors.width+"px").css("height",factors.height+"px").css("opacity",(info.opacity.min+(info.opacity.diff*factors.scale)).toFixed(2)).css("z-index",Math.round(info.zValues.min+(info.zValues.diff*factors.z))).css("font-size",(factors.adjustedScale*data.startFontSize).toFixed(2)+"px").attr("current-scale",factors.adjustedScale);if(container.data("roundabout").debug===true){out.push('<div style="font-weight: normal; font-size: 10px; padding: 2px; width: '+ref.css("width")+'; background-color: #ffc;">');out.push('<strong style="font-size: 12px; white-space: nowrap;">Child '+childPos+"</strong><br />");out.push("<strong>left:</strong> "+ref.css("left")+"<br /><strong>top:</strong> "+ref.css("top")+"<br />");out.push("<strong>width:</strong> "+ref.css("width")+"<br /><strong>opacity:</strong> "+ref.css("opacity")+"<br />");out.push("<strong>z-index:</strong> "+ref.css("z-index")+"<br /><strong>font-size:</strong> "+ref.css("font-size")+"<br />");out.push("<strong>scale:</strong> "+ref.attr("current-scale"));out.push("</div>");ref.html(out.join(""));}return jQuery.roundabout_isInFocus(container,ref.data("roundabout").degrees);};(function($){$.fn.pngfix=function(options){var elements=this;var settings=$.extend({imageFixSrc:false,sizingMethod:false},options);if(!$.browser.msie){return(elements);}function setFilter(el,path,mode){var fs=el.attr("filters");var alpha="DXImageTransform.Microsoft.AlphaImageLoader";if(fs[alpha]){fs[alpha].enabled=true;fs[alpha].src=path;fs[alpha].sizingMethod=mode;}else{el.css("filter","progid:"+alpha+'(enabled="true", sizingMethod="'+mode+'", src="'+path+'")');}}function setDOMElementWidth(el){if(el.css("width")=="auto"&el.css("height")=="auto"){el.css("width",el.attr("offsetWidth")+"px");}}return(elements.each(function(){var el=$(this);if(el.attr("tagName").toUpperCase()=="IMG"&&(/\.png/i).test(el.attr("src"))){if(!settings.imageFixSrc){el.wrap("<span></span>");var par=el.parent();par.css({display:"inline-block"});setFilter(par,el.attr("src"),"scale");par.attr("title",el.attr("alt"));el.remove();}else{if((/\.gif/i).test(settings.imageFixSrc)){setDOMElementWidth(el);setFilter(el,el.attr("src"),"image");el.attr("src",settings.imageFixSrc);}}}else{var bg=new String(el.css("backgroundImage"));var matches=bg.match(/^url\("(.*)"\)$/);if(matches&&matches.length){setDOMElementWidth(el);el.css("backgroundImage","none");var sc="crop";if(settings.sizingMethod){sc=settings.sizingMethod;}setFilter(el,matches[1],sc);el.find("a").each(function(){$(this).css("position","relative");});}}}));};})(jQuery);(function($){var types=["DOMMouseScroll","mousewheel"];$.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var i=types.length;i;){this.addEventListener(types[--i],handler,false);}}else{this.onmousewheel=handler;}},teardown:function(){if(this.removeEventListener){for(var i=types.length;i;){this.removeEventListener(types[--i],handler,false);}}else{this.onmousewheel=null;}}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});function handler(event){var args=[].slice.call(arguments,1),delta=0,returnValue=true;event=$.event.fix(event||window.event);event.type="mousewheel";if(event.wheelDelta){delta=event.wheelDelta/120;}if(event.detail){delta=-event.detail/3;}args.unshift(event,delta);return $.event.handle.apply(this,args);}})(jQuery);(function($){$.fn.lofJSidernews=function(settings){return this.each(function(){new $.lofSidernews(this,settings);});};$.lofSidernews=function(obj,settings){this.settings={direction:"",mainItemSelector:"li",navInnerSelector:"ul",navSelector:"li",navigatorEvent:"click",wapperSelector:".wrapper-slide",interval:4000,auto:true,maxItemDisplay:3,startItem:0,navPosition:"vertical",navigatorHeight:100,navigatorWidth:310,duration:600,navItemsSelector:".nav-slide li",navOuterSelector:".nav-slide-outer",isPreloaded:true,easing:"easeInOutQuad"};$.extend(this.settings,settings||{});this.nextNo=null;this.previousNo=null;this.maxWidth=this.settings.mainWidth||600;this.wrapper=$(obj).find(this.settings.wapperSelector);this.slides=this.wrapper.find(this.settings.mainItemSelector);if(!this.wrapper.length||!this.slides.length){return;}if(this.settings.maxItemDisplay>this.slides.length){this.settings.maxItemDisplay=this.slides.length;}this.currentNo=isNaN(this.settings.startItem)||this.settings.startItem>this.slides.length?0:this.settings.startItem;this.navigatorOuter=$(obj).find(this.settings.navOuterSelector);this.navigatorItems=$(obj).find(this.settings.navItemsSelector);this.navigatorInner=this.navigatorOuter.find(this.settings.navInnerSelector);if(this.settings.navPosition=="horizontal"){this.navigatorInner.width(this.slides.length*this.settings.navigatorWidth);this.navigatorOuter.width(this.settings.maxItemDisplay*this.settings.navigatorWidth);this.navigatorOuter.height(this.settings.navigatorHeight);}else{this.navigatorInner.height(this.slides.length*this.settings.navigatorHeight);this.navigatorOuter.height(this.settings.maxItemDisplay*this.settings.navigatorHeight);this.navigatorOuter.width(this.settings.navigatorWidth);}this.navigratorStep=this.__getPositionMode(this.settings.navPosition);this.directionMode=this.__getDirectionMode();if(this.settings.direction=="opacity"){this.wrapper.addClass("lof-opacity");$(this.slides).css("opacity",0).eq(this.currentNo).css("opacity",1);}else{this.wrapper.css({"left":"-"+this.currentNo*this.maxSize+"px","width":(this.maxWidth)*this.slides.length});}if(this.settings.isPreloaded){this.preLoadImage(this.onComplete);}else{this.onComplete();}};$.lofSidernews.fn=$.lofSidernews.prototype;$.lofSidernews.fn.extend=$.lofSidernews.extend=$.extend;$.lofSidernews.fn.extend({startUp:function(obj,wrapper){var seft=this;this.navigatorItems.each(function(index,item){$(item).click(function(){seft.jumping(index,true);seft.setNavActive(index,item);});$(item).css({"height":seft.settings.navigatorHeight,"width":seft.settings.navigatorWidth});});this.registerWheelHandler(this.navigatorOuter,this);this.setNavActive(this.currentNo);if(this.settings.buttons&&typeof(this.settings.buttons)=="object"){this.registerButtonsControl("click",this.settings.buttons,this);}if(this.settings.auto){this.play(this.settings.interval,"next",true);}return this;},onComplete:function(){setTimeout(function(){$(".preload").fadeOut(900);},400);this.startUp();},preLoadImage:function(callback){var self=this;var images=this.wrapper.find("img");var count=0;images.each(function(index,image){if(!image.complete){image.onload=function(){count++;if(count>=images.length){self.onComplete();}};image.onerror=function(){count++;if(count>=images.length){self.onComplete();}};}else{count++;if(count>=images.length){self.onComplete();}}});},navivationAnimate:function(currentIndex){if(currentIndex<=this.settings.startItem||currentIndex-this.settings.startItem>=this.settings.maxItemDisplay-1){this.settings.startItem=currentIndex-this.settings.maxItemDisplay+2;if(this.settings.startItem<0){this.settings.startItem=0;}if(this.settings.startItem>this.slides.length-this.settings.maxItemDisplay){this.settings.startItem=this.slides.length-this.settings.maxItemDisplay;}}this.navigatorInner.stop().animate(eval("({"+this.navigratorStep[0]+":-"+this.settings.startItem*this.navigratorStep[1]+"})"),{duration:500,easing:"easeInOutQuad"});},setNavActive:function(index,item){if((this.navigatorItems)){this.navigatorItems.removeClass("active");if($("#slide-project").length){this.navigatorItems.css("opacity","0.5");$(this.navigatorItems.get(index)).css("opacity","1");}$(this.navigatorItems.get(index)).addClass("active");this.navivationAnimate(this.currentNo);}},__getPositionMode:function(position){if(position=="horizontal"){return["left",this.settings.navigatorWidth];}return["top",this.settings.navigatorHeight];},__getDirectionMode:function(){switch(this.settings.direction){case"opacity":this.maxSize=0;return["opacity","opacity"];default:this.maxSize=this.maxWidth;return["left","width"];}},registerWheelHandler:function(element,obj){element.bind("mousewheel",function(event,delta){var dir=delta>0?"Up":"Down",vel=Math.abs(delta);if(delta>0){obj.previous(true);}else{obj.next(true);}return false;});},registerButtonsControl:function(eventHandler,objects,self){for(var action in objects){switch(action.toString()){case"next":objects[action].click(function(){self.next(true);});break;case"previous":objects[action].click(function(){self.previous(true);});break;}}return this;},onProcessing:function(manual,start,end){this.previousNo=this.currentNo+(this.currentNo>0?-1:this.slides.length-1);this.nextNo=this.currentNo+(this.currentNo<this.slides.length-1?1:1-this.slides.length);return this;},finishFx:function(manual){if(manual){this.stop();}if(manual&&this.settings.auto){this.play(this.settings.interval,"next",true);}this.setNavActive(this.currentNo);},getObjectDirection:function(start,end){return eval("({'"+this.directionMode[0]+"':-"+(this.currentNo*start)+"})");},fxStart:function(index,obj,currentObj){if(this.settings.direction=="opacity"){$(this.slides).stop().animate({opacity:0},{duration:this.settings.duration,easing:this.settings.easing});$(this.slides).eq(index).stop().animate({opacity:1},{duration:this.settings.duration,easing:this.settings.easing});}else{this.wrapper.stop().animate(obj,{duration:this.settings.duration,easing:this.settings.easing});}return this;},jumping:function(no,manual){this.stop();if(this.currentNo==no){return;}var obj=eval("({'"+this.directionMode[0]+"':-"+(this.maxSize*no)+"})");this.onProcessing(null,manual,0,this.maxSize).fxStart(no,obj,this).finishFx(manual);this.currentNo=no;},next:function(manual,item){this.currentNo+=(this.currentNo<this.slides.length-1)?1:(1-this.slides.length);this.onProcessing(item,manual,0,this.maxSize).fxStart(this.currentNo,this.getObjectDirection(this.maxSize),this).finishFx(manual);},previous:function(manual,item){this.currentNo+=this.currentNo>0?-1:this.slides.length-1;this.onProcessing(item,manual).fxStart(this.currentNo,this.getObjectDirection(this.maxSize),this).finishFx(manual);},play:function(delay,direction,wait){this.stop();if(!wait){this[direction](false);}var self=this;this.isRun=setTimeout(function(){self[direction](true);},delay);},stop:function(){if(this.isRun==null){return;}clearTimeout(this.isRun);this.isRun=null;}});})(jQuery);function init(){$("<span>").appendTo(".shadows");pseudoChild();$("#agencies").accordion({autoHeight:false,navigation:true});$("#visual-accordion").accordion({autoHeight:false,navigation:true,header:"h4"});$("#steps-accordion").accordion({autoHeight:false,navigation:true});$("#tabs").tabs();$("#tabs-webdesign").tabs({show:function(){$(".panel").css("display","none");$(".btn-panel").removeClass("active");$(".btn-panel span").text($(".btn-panel span").text()=="+ D'infos"?"Réduire":"+ D'infos");}});$(".video dd a").append($("<span></span>")).hoverIntent(function(){$("img",this).animate({opacity:"0.4"});},function(){$("img",this).animate({opacity:"1"});});menu();$("#nav .first-level").lavaLamp();listProject();estimate();roundabouts();extranetPanel();equalize();sliders();menu();$(window).konami(function(){$("body").toggleClass("easter-egg");});}function menu(){$(".drop").hide();$("ul.first-level li").hover(function(){$("div.drop",this).stop(true,true).slideDown();$(this).addClass("hover");$("div.drop",this).css("width",$(this).width());},function(){$("div.drop",this).stop(true,true).slideUp();$(this).removeClass("hover");});$("ul.first-level li:nth-child(5)").hover(function(){$("div.drop",this).stop(true,true).slideDown();$(this).addClass("hover");$("div.drop",this).css({"width":$(this).width()+70,"margin-left":"-70px"});},function(){$("div.drop",this).stop(true,true).slideUp();$(this).removeClass("hover");});}function sliders(){var buttons={previous:$("#slide-clients .ico-prev"),next:$("#slide-clients .ico-next")};$("#slide-clients").lofJSidernews({wapperSelector:"#clientslal",interval:6000,direction:"horizontal",easing:"easeInOutQuad",duration:1200,startItem:0,auto:true,mainWidth:265,buttons:buttons});var buttons={previous:$("#slide-news .ico-prev"),next:$("#slide-news .ico-next")};$("#slide-news").lofJSidernews({interval:4000,direction:"horizontal",easing:"easeInOutQuad",duration:1200,startItem:0,auto:false,mainWidth:199,buttons:buttons,isPreloaded:false});var buttons={previous:$("#slide-solutions .ico-prev"),next:$("#slide-solutions .ico-next")};$("#slide-solutions").lofJSidernews({interval:4000,direction:"horizontal",easing:"easeInOutQuad",duration:1200,startItem:0,auto:false,mainWidth:407,buttons:buttons,isPreloaded:false});var buttons={previous:$("#slide-ecommerce .ico-prev"),next:$("#slide-ecommerce .ico-next")};$("#slide-ecommerce").lofJSidernews({interval:4000,direction:"horizontal",easing:"easeInOutQuad",duration:1200,startItem:0,auto:false,mainWidth:407,buttons:buttons,isPreloaded:false});var buttons={previous:$("#slide-nl .ico-prev"),next:$("#slide-nl .ico-next")};$("#slide-nl").lofJSidernews({interval:4000,direction:"horizontal",easing:"easeInOutQuad",duration:800,startItem:0,auto:false,mainWidth:716,buttons:buttons,isPreloaded:false});var buttons={previous:$("#slide-mini .ico-prev"),next:$("#slide-mini .ico-next")};$("#slide-mini").lofJSidernews({interval:4000,direction:"horizontal",easing:"easeInOutQuad",duration:800,startItem:0,auto:false,mainWidth:716,buttons:buttons,isPreloaded:false});var buttons={previous:$("#our-clients .ico-prev"),next:$("#our-clients .ico-next")};$("#our-clients").lofJSidernews({interval:4000,direction:"horizontal",easing:"easeInOutQuad",duration:800,startItem:0,auto:false,mainWidth:716,buttons:buttons,isPreloaded:false});$("#slide-prez").lofJSidernews({wapperSelector:"#wrapper-slide",navItemsSelector:"#nav-slide li",interval:7000,easing:"easeInOutQuad",duration:1200,auto:true,maxItemDisplay:4,startItem:0,navPosition:"horizontal",navigatorHeight:13,navigatorWidth:20,mainWidth:753});var buttons={previous:$("#slide-project .ico-prev"),next:$("#slide-project .ico-next")};$("#slide-project").lofJSidernews({wapperSelector:"#wrapper-slide",navItemsSelector:"#nav-slide li",interval:4000,direction:"opacity",easing:"easeInOutQuad",duration:1200,auto:false,maxItemDisplay:3,startItem:0,navPosition:"vertical",navigatorHeight:120,navigatorWidth:120,mainWidth:596,buttons:buttons});$("#slide-project #nav-slide li").css("opacity","0.5");$("#slide-project #nav-slide li.active").css("opacity","1");}function pseudoChild(){$("#details p:last-child").addClass("last");$(".stories p:last-child").addClass("last");$("#table-offers tbody td:nth-child(even)").addClass("even");$("#breadcrumb a:last-child").addClass("last");$(".errors li:last-child").addClass("last");$(".web-display p:last-child").addClass("last");$("#arbo li li li").addClass("last");$("#steps-accordion p:last-child").addClass("last");}function estimate(){}function testEstimate(){if($(this).attr("checked")){$(".sub-label").slideUp();$(this).parent().next(".sub-label").slideDown();}}function equalize(){if($(".equalize").length){$(".equalize").equalHeightColumns();}if($(".equalize-first").length){$(".equalize-first").equalHeightColumns();}if($(".equalize-bis").length){$(".equalize-bis").equalHeightColumns();}}function roundabouts(){$("#round-logos li").focus(function(){if($.browser.msie){var useText=$("span",this).attr("title");$(".round-description dt").html(useText);}var useText=$("img",this).attr("alt");var useLink=$("a",this).attr("href");$(".round-description dt").html(useText);if($("a",this).length){$(".round-description dd").html('<a href="'+useLink+'">Voir le projet</a>');}else{$(".round-description dd").html("&nbsp;");}$(".round-description dt").fadeIn(200);$(".round-description dd").fadeIn(200);}).blur(function(){$(".round-description dt").fadeOut(100);$(".round-description dd").fadeOut(100);});$("#round-graphic-line li").focus(function(){var useText=$("img",this).attr("alt");var useLink=$("a",this).attr("href");$("#roundabout-graphic-line .round-description dt").html(useText);$("#roundabout-graphic-line .round-description dd").html('<a href="'+useLink+'" target="_blank">Voir le projet</a>');$("#roundabout-graphic-line .round-description dt").fadeIn(200);$("#roundabout-graphic-line .round-description dd").fadeIn(200);}).blur(function(){$(".round-description dt").fadeOut(100);$(".round-description dd").fadeOut(100);}).append($("<img />").attr({"src":"images/bgd_visual_shadow.png","alt":""}).addClass("shadow"));$("#round-flash li").focus(function(){if($.browser.msie){var useText=$("span",this).attr("title");$("#roundabout-flash .round-description dt").html(useText);}var useText=$("img",this).attr("alt");var useLink=$("a",this).attr("href");$("a[href*=swf]",this).attr("rel","prettyPhoto").prettyPhoto();$("#roundabout-flash .round-description dt").html(useText);$("#roundabout-flash .round-description dd").html('<a href="'+useLink+'" target="_blank">Voir l\'animation</a>');$("#roundabout-flash .round-description dd a[href*=swf]").attr("rel","prettyPhoto").removeAttr("target").prettyPhoto();$("#roundabout-flash .round-description dt").fadeIn(200);$("#roundabout-flash .round-description dd").fadeIn(200);}).blur(function(){$(".round-description dt").fadeOut(100);$(".round-description dd").fadeOut(100);$("a[href*=swf]",this).unbind("click");});$(document).ready(function(){$("#round-logos").roundabout({duration:500,minScale:0.5});$("#round-graphic-line").roundabout({duration:500,tilt:-2.5,minScale:0.5});$("#round-flash").roundabout({duration:500,tilt:-2.5,minScale:0.5});$(".btn-panel").click(function(){$(".panel").slideToggle("slow");$(this).toggleClass("active");$("span",this).text($(this).text()=="+ D'infos"?"Réduire":"+ D'infos");return false;});$("#round-graphic-line .shadow").pngfix();$("#round-logos img").pngfix();$("#round-flash img").pngfix();});}function listProject(){$("#list-projects .project:nth-child(even)").css("float","right");var project=$("#list-projects .project");var projectTxt=project.children(".project-hover");var projectInfo=project.children(".project-info");var bgInfo="#DFDFDF";var fadeColor="#FFFFFF";project.children(".project-hover").css({left:"5px"});project.children().children(".project-hover-bgd").fadeTo(1,0);project.children().children(".project-hover-content").css({left:"-366px"});project.hover(function(){$(this).children(".project-hover").removeClass("offscreen");$(this).children().children(".project-hover-content").css({left:"-366px"});$(this).children().children(".project-hover-bgd").stop().fadeTo(600,0.6);$(this).children().children(".project-hover-content").stop().animate({left:"5px"},{queue:false,duration:450,easing:"easeOutQuint"});$(this).children(".project-info").stop().animate({backgroundColor:fadeColor},750);},function(){$(this).children(".project-hover").addClass("offscreen");$(this).children().children(".project-hover-bgd").stop().fadeTo(800,0);$(this).children().children(".project-hover-content").stop().animate({left:"366px"},{queue:false,duration:600,easing:"easeOutQuint"});$(this).children(".project-info").stop().animate({backgroundColor:bgInfo},850);});}function extranetPanel(){$("#btn-extranet").click(function(){var $lefty=$("#form-extranet");$lefty.animate({marginRight:parseInt($lefty.css("marginRight"),10)==0?-$lefty.outerWidth():0});return false;});}$(init);
