!function(u){function v(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==i?"":i[1]}u.prettyPhoto={version:"3.0"},u.fn.prettyPhoto=function(t){t=jQuery.extend({animationSpeed:"fast",slideshow:!1,autoplay_slideshow:!1,opacity:.6,showTitle:!0,allowresize:!0,default_width:500,default_height:344,counter_separator_label:"/",theme:"facebook",hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,overlay_gallery:!0,changepicturecallback:function(){},callback:function(){},markup:'
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
Expand
next \t\t\t\t\t\t\t\t\t\t\tprevious \t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\tClose \t\t\t\t\t\t\t\t\t\t\t

\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\t\tPrevious \t\t\t\t\t\t\t\t\t\t\t\t

0/0

\t\t\t\t\t\t\t\t\t\t\t\tNext \t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t\t
\t\t\t\t\t\t
\t\t\t\t\t
\t\t\t\t\t
',gallery_markup:'',image_markup:'',flash_markup:'',quicktime_markup:'',iframe_markup:'',inline_markup:'
{content}
'},t);var e,i,p,o,a,s,r=this,n=!1,l=u(window).height(),d=u(window).width();function h(t){$pp_pic_holder.find("#pp_full_res object,#pp_full_res embed").css("visibility","hidden"),$pp_pic_holder.find(".pp_fade").fadeOut(settings.animationSpeed,function(){u(".pp_loaderIcon").show(),t()})}function c(t,e){if(resized=!1,_(t,e),imageWidth=t,imageHeight=e,(d"}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(){return u.prettyPhoto.changeGalleryPage("next"),u.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_gallery .pp_arrow_previous").click(function(){return u.prettyPhoto.changeGalleryPage("previous"),u.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery").fadeOut()}),itemWidth=57,$pp_pic_holder.find(".pp_gallery ul li").each(function(t){u(this).css({position:"absolute",left:t*itemWidth}),u(this).find("a").unbind("click").click(function(){return u.prettyPhoto.changePage(t),u.prettyPhoto.stopSlideshow(),!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('Play'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){return u.prettyPhoto.startSlideshow(),!1})),$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme),$pp_overlay.css({opacity:0,height:u(document).height(),width:u(document).width()}).bind("click",function(){settings.modal||u.prettyPhoto.close()}),u("a.pp_close").bind("click",function(){return u.prettyPhoto.close(),!1}),u("a.pp_expand").bind("click",function(t){return u(this).hasClass("pp_expand")?(u(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(u(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0),h(function(){u.prettyPhoto.open()}),!1}),$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){return u.prettyPhoto.changePage("previous"),u.prettyPhoto.stopSlideshow(),!1}),$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){return u.prettyPhoto.changePage("next"),u.prettyPhoto.stopSlideshow(),!1}),m()}return doresize=!0,scrollPos=function(){{if(self.pageYOffset)return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};if(document.documentElement&&document.documentElement.scrollTop)return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};if(document.body)return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}}(),u(window).unbind("resize").resize(function(){m(),l=u(window).height(),d=u(window).width(),"undefined"!=typeof $pp_overlay&&$pp_overlay.height(u(document).height())}),u(document).unbind("keydown").keydown(function(t){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(t.keyCode){case 37:u.prettyPhoto.changePage("previous");break;case 39:u.prettyPhoto.changePage("next");break;case 27:settings.modal||u.prettyPhoto.close()}}),u.prettyPhoto.initialize=function(){return settings=t,u.browser.msie&&6==parseInt(u.browser.version)&&(settings.theme="light_square"),f(this),setItem="youtube"!=g(u(this).attr("href"))?u(this).attr("href").toLowerCase():u(this).attr("href"),setPosition=jQuery.inArray(setItem,pp_images),u.prettyPhoto.open(),!1},u.prettyPhoto.open=function(){return"undefined"==typeof settings&&(settings=t,f(this),pp_images=u.makeArray(arguments[0]),pp_titles=arguments[1]?u.makeArray(arguments[1]):u.makeArray(""),pp_descriptions=arguments[2]?u.makeArray(arguments[2]):u.makeArray(""),isSet=1u(pp_images).size()&&(nextImage.src=pp_images[setPosition+1]),prevImage=new Image,isSet&&pp_images[setPosition-1]&&(prevImage.src=pp_images[setPosition-1]),$pp_pic_holder.find("#pp_full_res")[0].innerHTML=settings.image_markup,$pp_pic_holder.find("#fullResImage").attr("src",pp_images[setPosition]),imgPreloader.onload=function(){e=c(imgPreloader.width,imgPreloader.height),_showContent()},imgPreloader.onerror=function(){alert("Image cannot be loaded. Make sure the path is correct and image exist."),u.prettyPhoto.close()},imgPreloader.src=pp_images[setPosition];break;case"youtube":e=c(movie_width,movie_height),movie="http://www.youtube.com/v/"+v("v",pp_images[setPosition]),settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.flash_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"vimeo":e=c(movie_width,movie_height),movie_id=pp_images[setPosition],movie="http://vimeo.com/moogaloop.swf?clip_id="+movie_id.replace("http://vimeo.com/",""),settings.autoplay&&(movie+="&autoplay=1"),toInject=settings.flash_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,movie);break;case"quicktime":(e=c(movie_width,movie_height)).height+=15,e.contentHeight+=15,e.containerHeight+=15,toInject=settings.quicktime_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,pp_images[setPosition]).replace(/{autoplay}/g,settings.autoplay);break;case"flash":e=c(movie_width,movie_height),flash_vars=pp_images[setPosition],flash_vars=flash_vars.substring(pp_images[setPosition].indexOf("flashvars")+10,pp_images[setPosition].length),filename=pp_images[setPosition],filename=filename.substring(0,filename.indexOf("?")),toInject=settings.flash_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{wmode}/g,settings.wmode).replace(/{path}/g,filename+"?"+flash_vars);break;case"iframe":e=c(movie_width,movie_height),frame_url=pp_images[setPosition],frame_url=frame_url.substr(0,frame_url.indexOf("iframe")-1),toInject=settings.iframe_markup.replace(/{width}/g,e.width).replace(/{height}/g,e.height).replace(/{path}/g,frame_url);break;case"inline":myClone=u(pp_images[setPosition]).clone().css({width:settings.default_width}).wrapInner('
').appendTo(u("body")),e=c(u(myClone).width(),u(myClone).height()),u(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,u(pp_images[setPosition]).html())}imgPreloader||("iframe"!=g(pp_images[setPosition])?$pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject:$pp_pic_holder.find("#pp_full_res")[0].innerHTML=" ",_showContent())}),!1},u.prettyPhoto.changePage=function(t){if(currentGalleryPage=0,"previous"==t){if(setPosition--,setPosition<0)return void(setPosition=0)}else if("next"==t){if(s&&u(".pp_arrow_next").is(".disabled"))setPosition=-1;else if(u(".pp_arrow_next").is(".disabled"))return;setPosition++}else setPosition=t;doresize||(doresize=!0),h(function(){u.prettyPhoto.open()})},u.prettyPhoto.changeGalleryPage=function(t){"next"==t?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==t&&(currentGalleryPage--,currentGalleryPage<0&&(currentGalleryPage=totalPage)),$pp_pic_holder.find(".pp_gallery li").each(function(t){u(this).animate({left:t*itemWidth-itemsPerPage*itemWidth*currentGalleryPage})})},u.prettyPhoto.startSlideshow=function(){void 0===s?$pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){return u.prettyPhoto.stopSlideshow(),!1}):u.prettyPhoto.changePage("next"),s=setTimeout(u.prettyPhoto.startSlideshow,settings.slideshow)},u.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){return u.prettyPhoto.startSlideshow(),!1}),clearTimeout(s)},u.prettyPhoto.close=function(){clearTimeout(s),$pp_pic_holder.find("object,embed").css("visibility","hidden"),u("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animationSpeed,function(){u(this).remove()}),u.browser.msie&&6==u.browser.version&&u("select").css("visibility","visible"),settings.hideflash&&u("object,embed").css("visibility","visible"),u(this).remove(),$pp_overlay.remove(),settings.callback(),doresize=!0,delete settings},_showContent=function(){u(".pp_loaderIcon").hide(),$ppt.fadeTo(settings.animationSpeed,1),projectedTop=scrollPos.scrollTop+(l/2-e.containerHeight/2),projectedTop=l/2-e.containerHeight/2,projectedTop<0&&(projectedTop=0),$pp_pic_holder.find(".pp_content").animate({height:e.contentHeight},settings.animationSpeed),$pp_pic_holder.animate({top:projectedTop,left:d/2-e.containerWidth/2,width:e.containerWidth},settings.animationSpeed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(e.height).width(e.width),$pp_pic_holder.find(".pp_fade").fadeIn(settings.animationSpeed),isSet&&"image"==g(pp_images[setPosition])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide(),e.resized&&u("a.pp_expand,a.pp_contract").fadeIn(settings.animationSpeed),settings.changepicturecallback(),"iframe"==g(pp_images[setPosition])&&($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject)}),isSet&&settings.overlay_gallery&&"image"==g(pp_images[setPosition])?(itemWidth=57,navWidth="facebook"==settings.theme?58:38,itemsPerPage=Math.floor((e.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPage