(function(){(function(){if(typeof window.console=="undefined"){var e=function(){};window.console={log:e,error:e,trace:e,dir:e,warning:e}}})();window.PROPHOTO=window.PROPHOTO||{};PROPHOTO.AMD={};PROPHOTO.site={URL:"http://www.fionapearlphotography.com.au",wpURL:"http://www.fionapearlphotography.com.au",wpUploadURL:"http://www.fionapearlphotography.com.au/wp-content/uploads",themeURL:"http://www.fionapearlphotography.com.au/wp-content/themes/prophoto4",ajaxURL:"http://www.fionapearlphotography.com.au/wp-admin/admin-ajax.php",renderingMobile:false,isDev:false};PROPHOTO.browser={isTech:navigator.userAgent.indexOf("(prophototech)")!==-1,isTouchDevice:"ontouchstart"in document.documentElement};PROPHOTO.requireCacheBuster=PROPHOTO.site.isDev?(new Date()).getTime():1448;var imgDir=PROPHOTO.site.imgDir='http://www.fionapearlphotography.com.au/wp-content/uploads/p4/images/';(function(){var e=window.PROPHOTO=window.PROPHOTO||{};e.AMD=e.AMD||{};e.AMD.modules={waiting:[]};var i=function(i){var n=jQuery,t=[],u=true;if(i.length===0){return[]}n.each(i,function(i,f){if(f in e.AMD.modules){t.push(e.AMD.modules[f])}else{if(n.inArray(f,e.AMD.modules.waiting)===-1){n.ajax({url:e.site.themeURL+"/js/"+f+".js?_="+e.requireCacheBuster,dataType:"script",cache:true});e.AMD.modules.waiting.push(f)}u=false}});return u?t:false};e.define=function(n,t,u){var f=i(t),r;if(arguments.length!==3){return}if(f){if(typeof u==="function"){r=u.apply(null,f);if(typeof r==="undefined"){r="loaded"}}else if(typeof u==="object"){r=u}e.AMD.modules[n]=r}else{setTimeout(function(){e.define(n,t,u)},100)}};e.require=function(n,t){var u=i(n);if(u){if(typeof t==="function"){t.apply(null,u)}}else{setTimeout(function(){e.require(n,t)},100)}};if(e.site&&e.site.isDev){window.require=e.require;window.define=e.define}})();PROPHOTO.define("jquery",[],function(){return jQuery;});PROPHOTO.define("util",["jquery"],function(e){return Function.prototype.bind||(Function.prototype.bind=function(e){if(typeof this!="function")throw new TypeError("Function.prototype.bind - not callable");var t=Array.prototype.slice.call(arguments,1),n=this,r=function(){},i=function(){return n.apply(this instanceof r&&e?this:e,t.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype,i.prototype=new r,i}),e.fn.toInt=function(t){t=t||"text";var n=parseInt(e(this)[t](),10);return isNaN(n)?0:n},{objectCreate:function(e){function t(){}return t.prototype=e,new t},initObjectsWithWrap:function(t,n,r){t.each(function(t,i){var s=this.objectCreate(n);s[r||"wrap"]=e(i),s.init()}.bind(this))},initFormValidation:function(e){PROPHOTO.require(["form-validator"],function(t){var n=this.objectCreate(t);n.form=e,n.init()}.bind(this))},cssLoaded:function(){var t=e("body").css("border-left-color");return t==="rgb(255, 0, 0)"||t==="#ff0000"},scrollToBelowHeader:function(t){var n=e("header.sc:first"),r=n.height()+n.offset().top;e("html,body").animate({scrollTop:r+"px"},450,function(){this.nodeName==="HTML"&&typeof t=="function"&&t()})},GET:function(e,t){var n=(t||window.location.href).match(new RegExp("(?:\\?|&)"+e+"=([^&#]+)"));return n&&n[1]?n[1]:!1}}});PROPHOTO.define("plugins/easing",["jquery"],function(e){return e.easing.jswing=e.easing.swing,e.extend(e.easing,{def:"easeOutQuad",swing:function(t,n,r,i,s){return e.easing[e.easing.def](t,n,r,i,s)},easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n},easeInQuart:function(e,t,n,r,i){return r*(t/=i)*t*t*t+n},easeOutExpo:function(e,t,n,r,i){return t==i?n+r:r*(-Math.pow(2,-10*t/i)+1)+n},easeOutElastic:function(e,t,n,r,i){var s=1.70158,o=0,u=r;if(t==0)return n;if((t/=i)==1)return n+r;o||(o=i*.3);if(u<Math.abs(r)){u=r;var s=o/4}else var s=o/(2*Math.PI)*Math.asin(r/u);return u*Math.pow(2,-10*t)*Math.sin((t*i-s)*2*Math.PI/o)+r+n},easeOutBounce:function(e,t,n,r,i){return(t/=i)<1/2.75?r*7.5625*t*t+n:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+n:r*(7.5625*(t-=2.625/2.75)*t+.984375)+n}}),"easing"});PROPHOTO.define("plugins/image-loaded",["jquery"],function(e){e.fn.imageLoaded=function(e){var t=this.filter("img"),n=t.length;return t.bind("load error",function(){e.call(this)}).each(function(){if(this.complete||this.complete===undefined||this.complete===!1&&navigator.appVersion.indexOf("MSIE 9")!==-1){var e=this.src;this.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",this.src=e}}),this}});PROPHOTO.define("grids-overlay",["jquery"],function(e){var t,n=navigator.userAgent.indexOf("Android 4.2.")!==-1;return e(document).ready(function(e){t=e("body")}),e(window).on({scrollstart:function(){t.addClass("scrolling")},scrollstop:function(){setTimeout(t.removeClass.bind(t,"scrolling"),100)}}),function(r){r.find(".grid-style-img_rollover_text .grid-item").on({click:function(t){var r=e(this).find(".grid-overlay"),i=r.find("a:first"),s=i.attr("href");if(n&&r.hasClass("mouseentered"))return!1;if(i.hasClass("popup-slideshow"))return i.trigger("click"),!1;if(s==="#contact-form")return e("body").trigger("show_contact_form"),!1;if(i.attr("target")==="_blank")return window.open(s),!1;window.location.href=s},mouseenter:function(t){var r=e(this).find(".grid-overlay");r.addClass("overlay-shown").fadeIn(200),n&&(r.addClass("mouseentered"),setTimeout(function(){r.removeClass("mouseentered")},1e3))},mouseleave:function(){e(this).find(".grid-overlay").removeClass("overlay-shown").fadeOut("fast")},touchend:function(n){var r=e(this),i=r.find(".grid-overlay");if(t.hasClass("scrolling"))return!1;if(n.target.nodeName==="A")return!0;if(!i.hasClass("overlay-shown"))return r.trigger("mouseenter"),setTimeout(r.trigger.bind(r,"mouseleave"),4e3),!1;r.trigger("click")}})}});PROPHOTO.define("grids-masonry",["jquery"],function(e){var t={},n=function(r){r.find(".grid-format-masonry").each(function(){var i=e(this),s=i.attr("id"),o=i.attr("class").match(/grid-style-([a-z_]+)/).pop(),u=parseInt(i.attr("data-column-count"),10),a=parseInt(i.attr("data-column-width"),10),f=parseInt(i.attr("data-gutter-width"),10),l=[],c;for(var h=0;h<u;h++)l.push(0);e(".grid-item",this).each(function(){var t=e(this),n=Math.min.apply(Math,l),r=e.inArray(n,l),i=r*(a+f),s;t.css({position:"absolute",left:i+"px",top:n+"px"});if(o==="img_rollover_text")s=parseInt(t.attr("data-item-height"),10);else{var u=t.find("img.grid-img"),h=t.find(".text-below"),p=t.hasClass("using-fallback-img")?0:parseInt(u.attr("height"),10);c||(c=parseInt(t.find(".img-above").css("margin-top"),0)+parseInt(u.css("margin-top"),10)+parseInt(u.css("border-top-width"),10)+parseInt(u.css("border-bottom-width"),10)+parseInt(h.css("margin-top"),10)+parseInt(h.css("margin-bottom"),10)),s=p+parseInt(h.outerHeight(),10)+c}l[r]=n+s+f}),i.css("height",Math.max.apply(Math,l)+"px"),s in t?t[s]++:t[s]=1,t[s]<=5&&setTimeout(function(){n(r)},500)})};return n});PROPHOTO.define("element-throbber",["jquery"],function(e){return{start:function(e){var t=!1;e.addClass("throbbing").fadeTo(350,.001).attr("data-throb-interval",setInterval(function(){e.fadeTo(350,t?.001:1),t=!t},350))},stop:function(e){clearInterval(parseInt(e.attr("data-throb-interval"),10)),e.removeClass("throbbing").removeAttr("data-throb-interval").fadeTo(350,1)}}});PROPHOTO.define("contact-form",["jquery","util","element-throbber"],function(e,t,n){var r=function(r,s){r.find("#contactform").length?(r.find("form").hasClass("validation-initialized")||t.initFormValidation(r.find("form#contactform")),r.is(":visible")?r.slideUp(500):i(r)):(s&&n.start(s),e.ajax({type:"POST",url:PROPHOTO.site.ajaxURL,data:{action:"pp_nopriv",contact_form:"render",ajax:"1"},success:function(n){r.html(n).find("#referpage").val(window.location.href.replace(/#.+/,"")),e("body").trigger("new_page_content_added",[r]),t.initFormValidation(r.find("form#contactform")),i(r)},complete:function(){s&&n.stop(s)}}))},i=function(e){t.scrollToBelowHeader(function(){e.slideToggle(500,function(){e.is(":visible")&&e.find("#lastname").trigger("focus")})})};return{handleHash:function(t){if(t==="#success"){var n=e("#pp-contact-success-msg");n.html("<p>"+n.attr("data-msg")+"</p>").show().delay(3500).slideUp()}else if(t==="#error"){var i=e("#pp-contact-error-msg");i.html("<p>"+i.attr("data-msg")+"</p>").show(),setTimeout(function(){r(this.formWrap)}.bind(this),3500)}else t==="#contact-form"&&r(this.formWrap)},bindClickEvents:function(){e(document).on("click","a.show-hidden-contact_form,a[href$='#contact-form']",function(t){return r(this.formWrap,e(t.target)),!1}.bind(this))}}});PROPHOTO.define("unobfuscate-emails",["jquery"],function(e){var t=function(e){var t=e.split(","),n="";for(var r=0;r<=t.length;r++)t[r]&&(n+=String.fromCharCode(t[r]));return n};return function(n){n.find(".jsobf").each(function(){var n=e(this),r=n.parents("a"),i=n.hasClass("img")?n.html():t(n.text());r.attr("href",t(r.attr("href"))),r.html(i)})}});PROPHOTO.define("plugins/lazyloader",["jquery"],function(e){e.fn.lazyload=function(){var t=2250,n=this,r={},i=e("body").hasClass("cant-fade-imgs-with-black"),s=function(e){return i?e.show():e.css("opacity",0).animate({opacity:1},300)};return e(window).bind("scroll",function(i){var s=e(window).scrollTop(),o=s+e(window).height()+t;for(var u in r)if(u<=o){for(var a in r[u])a=r[u][a],e(a).addClass("lazyload-loading").trigger("appear");r[u]=[]}var f=e.grep(n,function(e){return!e.loaded});n=e(f)}),this.each(function(){var t=this;t.loaded=!1,e(t).one("appear",function(){this.loaded||e("<img />").bind("load",function(){e(t).attr("src",e(t).attr("data-lazyload-src")).removeClass("lazyload-loading"),s(e(t)),t.loaded=!0}).attr("src",e(t).attr("data-lazyload-src"))})}),n.each(function(){var t=e(this).offset().top;r[t]===undefined&&(r[t]=[]),r[t].push(this)}),e(window).trigger("scroll"),this}});PROPHOTO.define("nav-menu-util",["jquery"],function(e){var t=function(e,t){e.find("li ul").css({opacity:t}).find("ul").css({opacity:1})},n=function(){return navigator.userAgent.match(/MSIE (6|7|8)\.0/i)!==null},r=e("body");return{modifyFormat:function(){e(".suckerfish li ul a").removeAttr("title"),e(".suckerfish li ul li:has(ul)").each(function(){var t=e(this).children("a");t.html(t.html()+" &raquo;")}),e(".suckerfish li ul li ul").hover(function(){e(this).parent().children("a").css("text-decoration","underline")},function(){e(this).parent().children("a").css("text-decoration","none")})},setDropdownOpacities:function(){n()||(this.primaryNavDropdownOpacity<100&&t(e("#primary-nav"),this.primaryNavDropdownOpacity),this.secondaryNavDropdownOpactity<100&&t(e("#secondary-nav"),this.secondaryNavDropdownOpactity))},handleSuckerfishTouch:function(){var t=!1,n=e(".suckerfish li");n.on("touchstart",function(i){var s=e(this);return clearTimeout(t),n.not(s.parents()).removeClass("sfhover"),s.addClass("sfhover"),t=setTimeout(function(){n.removeClass("sfhover"),r.focus()},6e3),e(i.target).parent().hasClass("has-children")?(i.stopPropagation(),!1):(i.stopPropagation(),!0)}),e(document).on("touchstart",function(){n.filter(".sfhover").length&&n.removeClass("sfhover")})}}});PROPHOTO.define("slideshow",["jquery","util","plugins/easing"],function(e,t){return e(document).on("click","a.no-link",function(){return!1}),{visibleImgIndex:0,stagedImgIndex:1,superInit:function(){this.startImg.off("load error"),this.wrap.removeClass("not-loaded"),this.visibleImg=this.startImg,this.visibleImgWrap=this.startImg.parent(),this.stagedImgWrap=this.wrap.find("a.nextImg"),this.stagedImg=this.stagedImgWrap.find("img:last"),this.loadingSpinner=this.wrap.find("img.loadingSpinner"),this.invoke("postSuperInit")},invoke:function(e){typeof this[e]=="function"&&this[e]()},preparePreloading:function(){this.conf.imgs[0].ready=!0,this.conf.imgs[0].width=this.startImg.attr("width"),this.conf.imgs[0].height=this.startImg.attr("height"),this.setImgDisplayDims(this.startImg[0],0),this.applyImgDisplayDims(this.startImg,0);for(var e=1;e<this.conf.imgs.length;e++)this.conf.imgs[e].ready=!1},preloadImg:function(e,t){if(!this.conf.imgs[e])return;typeof t=="undefined"&&(t=!0);var n=this.getPreloader(e);n.on("load",function(){this.conf.imgs[e].ready=!0,this.setImgDisplayDims(n[0],e),t&&this.keepPreloading(e)&&setTimeout(function(){this.preloadImg(e+1)}.bind(this),1)}.bind(this)),n.attr("src",this.conf.imgs[e].src)},keepPreloading:function(e){return e+1===this.conf.imgs.length&&this.conf.loopImages?(this.getPreloader(0).trigger("load").attr("src",this.conf.imgs[0].src),!1):e>0},getPreloader:function(t){var n=new Image;return e(n)},setImgDisplayDims:function(e,t){var n=this.prepImgDisplayDims(e,t);this.conf.viewingAreaWidth-n.width==1&&(n.width=this.conf.viewingAreaWidth),this.conf.viewingAreaHeight-n.height==1&&(n.height=this.conf.viewingAreaHeight),this.conf.imgs[t].displayWidth=n.width,this.conf.imgs[t].displayHeight=n.height,this.conf.imgs[t].topPadding=(this.conf.viewingAreaHeight-n.height)/2},prepImgDisplayDims:function(e,t){var n,r;return n=this.conf.imgs[t].width=e.width,r=this.conf.imgs[t].height=e.height,n>this.conf.viewingAreaWidth&&(n=this.conf.viewingAreaWidth,r=Math.round(n/(e.width/e.height))),r>this.conf.viewingAreaHeight&&(r=this.conf.viewingAreaHeight,n=Math.round(r/(e.height/e.width))),{width:n,height:r}},applyImgDisplayDims:function(e,t){e.attr("width",this.conf.imgs[t].displayWidth),e.attr("height",this.conf.imgs[t].displayHeight),e.parent().css("padding-top",this.conf.imgs[t].topPadding+"px")},triggerTimedAdvance:function(){this.nextAdvance=setTimeout(function(){this.showImg(this.nextImgIndex())}.bind(this),this.conf.holdTime),typeof this.startTimer=="function"&&this.startTimer()},showImg:function(e){this.conf.imgs[e].ready?(this.hideLoadingSpinner(),this.stageImgForTransition(e),this.animateTransition()):(this.showLoadingSpinner(),this.showImgDelayTimeout&&clearTimeout(this.showImgDelayTimeout),this.showImgDelayTimeout=setTimeout(function(){this.showImg(e)}.bind(this),500))},stageImgForTransition:function(e){this.stagedImgWrap.css(this.setupStagedCSS()),this.stagedImg.attr("src",this.conf.imgs[e].src),typeof this.prepImgWrap=="function"&&this.prepImgWrap(this.stagedImgWrap,e),this.applyImgDisplayDims(this.stagedImg,e),this.stagedImgIndex=e},animateTransition:function(){this.transitioning=!0,this.hideVisibleImg(),this.delayBeforeShowStaged()?setTimeout(this.showStagedImg.bind(this),this.delayBeforeShowStaged()):this.showStagedImg(),setTimeout(this.transitionHalfComplete.bind(this),this.transitionTime()/2)},transitionHalfComplete:function(){this.visibleImgIndex=this.stagedImgIndex},hideVisibleImg:function(){this.visibleImgWrap.animate(this.hideVisibleCSS(),this.transitionTime(),this.transitionEasing())},showStagedImg:function(){this.stagedImgWrap.animate(this.showStagedCSS(),this.transitionTime(),this.transitionEasing(),this.transitionComplete.bind(this))},transitionTime:function(){return this.conf.transitionTime},delayBeforeShowStaged:function(){return this.animations.delayBeforeShowStaged},transitionEasing:function(){return this.animations.easing},setupStagedCSS:function(){return this.animations.setupStaged},showStagedCSS:function(){return this.animations.showStaged},hideVisibleCSS:function(){return this.animations.hideVisible},transitionComplete:function(){this.transitioning=!1,this.switchVisibleStaged(),this.showContinues()?this.triggerTimedAdvance():typeof this.stopShow=="function"&&this.stopShow(),this.invoke("postTransitionComplete")},switchVisibleStaged:function(){var e,t,n,r;e=this.stagedImgWrap,t=this.visibleImgWrap,this.visibleImgWrap=e,this.stagedImgWrap=t,n=this.stagedImg,r=this.visibleImg,this.visibleImg=n,this.stagedImg=r,this.visibleImgWrap.addClass("currentImg").removeClass("nextImg").css("z-index","1"),this.stagedImgWrap.addClass("nextImg").removeClass("currentImg").hide()},setupAnimationObjects:function(){var e=this.conf;this.animations={};switch(e.transitionType){case"steadyslide":case"slide":this.animations.setupStaged={left:e.viewingAreaWidth+"px"},this.animations.showStaged={left:"0"},this.animations.hideVisible={left:"-"+e.viewingAreaWidth+"px"},e.transitionType==="steadyslide"&&e.holdTime!==0&&(this.conf.transitionTime=this.conf.holdTime,this.conf.holdTime=0);break;case"topslide":this.animations.setupStaged={top:"-"+e.viewingAreaHeight+"px"},this.animations.showStaged={top:"0"},this.animations.hideVisible={top:e.viewingAreaHeight+"px"};break;case"fade":case"crossfade":default:this.animations.setupStaged={top:"0",left:"0",opacity:"0"},this.animations.hideVisible={opacity:0},this.animations.showStaged={opacity:1},e.transitionType=="fade"&&(this.midTransitionDelay=e.transitionTime)}this.animations.setupStaged.display="block",this.animations.setupStaged.zIndex="2",this.animations.easing=e.transitionType.indexOf("slide")!==-1?"linear":"jswing",this.animations.delayBeforeShowStaged=e.transitionType==="fade"?e.transitionTime:0},hideLoadingSpinner:function(){this.loadingSpinner.fadeOut("fast"),this.wrap.removeClass("delaying")},showLoadingSpinner:function(){this.loadingSpinner.fadeIn("fast"),this.wrap.addClass("delaying")},nextImgIndex:function(){return this.visibleImgIndex+1>this.conf.imgs.length-1?0:this.visibleImgIndex+1},showContinues:function(){return this.playing?this.conf.loopImages?!0:this.nextImgIndex()!==0:!1}}});PROPHOTO.define("slideshow-masthead",["jquery","util","slideshow"],function(e,t,n){var r={isGallery:!1,init:function(){this.superInit(),this.frame=e("img#masthead-frame"),this.hasFrame=this.frame.length,this.hasFrame&&e(document).on("click","#masthead-frame.has-link",function(){window.location.href=this.visibleImgWrap.attr("href")}.bind(this)),this.prepImgWrap(this.stagedImgWrap,1),this.prepImgWrap(this.visibleImgWrap,0),this.conf.imageOrder==="random"&&this.randomizeImgs(),this.initImgPreloading(),this.applyImgDisplayDims(this.visibleImg,0),this.setupAnimationObjects(),this.conf.transitionType==="crossfade"&&(this.animations.hideVisible.opacity=1),this.triggerTimedAdvance(),this.playing=!0,this.invoke("postInit")},prepImgWrap:function(e,t){var n=this.conf.imgs[t];n.linkURL?(e.attr("href",n.linkURL).removeClass("no-link"),this.frame.addClass("has-link")):(e.attr("href","#").addClass("no-link"),this.frame.removeClass("has-link")),n.src.indexOf(".png")!==-1?e.addClass("png"):e.removeClass("png")},randomizeImgs:function(){var t=this.conf.imgs,n=[],r=[],i=this.startImg.attr("src"),s=i.replace("."+i.split(".").pop(),""),o=function(e){e.sort(function(){return.5-Math.random()})};e.each(t,function(e,i){t[e].src.indexOf(s)===0?(n.push(t[e]),t[e].linkURL&&this.prepImgWrap(this.visibleImgWrap,e)):r.push(t[e])}.bind(this)),o(r),o(r),this.conf.imgs=n.concat(r)},initImgPreloading:function(){this.preparePreloading(),this.preloadImg(1)}};return e.extend({},n,r)});PROPHOTO.define("protect-images",["jquery"],function(e){var t=function(){return!1};return PROPHOTO.browser.isTech||e(document).on("contextmenu","#lightbox-nav a,#lightbox-nav,.pp-slideshow,img#lightbox-image",t),function(e){e.find(".article-content img").not(".thumbnail,.attachment-thumbnail,.allow-right-click,.psp-active,.img-as-is").add(".pp-lightbox-thumbs img").on("contextmenu",t)}});PROPHOTO.require(["jquery","util","grids-overlay","grids-masonry","contact-form","unobfuscate-emails","nav-menu-util","protect-images"],function($,a,b,c,d,e,f,g){$(document).ready(function(){var body=$("body");var onNewContent=function(callback){body.on("new_page_content_added",function(e,newContent){callback(newContent);});};b(body);onNewContent(b);c(body);onNewContent(c);var initLightboxGalleries=function(context){var lightboxGalleries=context.find(".pp-lightbox.not-loaded");if(lightboxGalleries.length){PROPHOTO.require(["plugins/lightbox"],function(){lightboxGalleries.each(function(){var gallery=$(this);gallery.find("a").prophotoLightbox({img_blank:PROPHOTO.site.themeURL+"/images/blank.gif",img_loading:'http://www.fionapearlphotography.com.au/wp-content/uploads/p4/images/ajax-loading-bar.gif',img_btn_prev:'http://www.fionapearlphotography.com.au/wp-content/uploads/p4/images/lightbox-btn-prev.gif',img_btn_next:'http://www.fionapearlphotography.com.au/wp-content/uploads/p4/images/lightbox-btn-next.gif',img_btn_close:'http://www.fionapearlphotography.com.au/wp-content/uploads/p4/images/lightbox-btn-close.png',img_fadespeed:400,border_width:10,resize_speed:400,fixed_navigation:false,btns_opacity:0.65,btn_fadespeed:200,overlay_color:'#ffffff',overlay_opacity:0.8,translate_image:"Image",translate_of:"of"},gallery.attr("id"));gallery.find(".pp-lightbox-thumbs a").css("opacity",0.65).hover(function(){$(this).stop().animate({opacity:1},200);},function(){$(this).stop().animate({opacity:0.65},200);});gallery.removeClass(".not-loaded");});});}};initLightboxGalleries(body);onNewContent(initLightboxGalleries);body.on("pagebeforeshow",initLightboxGalleries.bind({},body));var contactForm=a.objectCreate(d);contactForm.formWrap=$("#contact-form");contactForm.handleHash(window.location.hash);contactForm.bindClickEvents();body.on("show_contact_form",function(){contactForm.handleHash("#contact-form");});e(body);onNewContent(e);var initGallerySlideshows=function(){var slideshows=$(".pp-slideshow-gallery.not-loaded");if(slideshows.length){PROPHOTO.require(["slideshow"]);PROPHOTO.require(["slideshow-gallery"],function(slideshowGalleryProto){slideshows.each(function(){var wrap=$(this),startImg=wrap.find("img.ss-first-img");startImg.imageLoaded(function(){var slideshow=a.objectCreate(slideshowGalleryProto);slideshow.wrap=wrap;slideshow.startImg=startImg;slideshow.conf=$.extend({},{"thumbPadding":10,"thumbOpacity":0.75,"activeThumbOpacity":1,"startPlaying":false,"controlsOverlaid":false,"controlsAutoHide":true,"controlsAutoHideTime":2200,"holdTime":2500,"transitionTime":1200,"loopImages":true,"transitionType":"fade","thumbsPagingAnimation":{"easing":"easeOutExpo","speed":900}},$.parseJSON(slideshow.wrap.find("script").html()));slideshow.init();});});});}};initGallerySlideshows(body);onNewContent(initGallerySlideshows);body.on("pagebeforeshow",initGallerySlideshows.bind({},body));var bindSlideshowPopupClicks=function(context){context.find("a.popup-slideshow").on("click",function(){var clicked=$(this),width,height,params,dims,offset,href;if(PROPHOTO.browser.isTouchDevice){href=clicked.attr("href");if(body.hasClass("ipad")){window.location.href=href+"&fullscreen=1";}else{window.location.href=href.replace("slideshow_popup=1","gallery_page=slideshow");}}else{if(clicked.hasClass("fullscreen")){width=screen.availWidth;height=screen.availHeight;}else{dims=clicked.attr("rel").split("x");width=dims[0];height=dims[1];offset=",left=20,screenX=20,top=20,screenY=20";}
params="location=0,menubar=0,height="+height+",width="+width+",toolbar=0,scrollbars=0,status=0,resizable=0"+offset;window.open(clicked.attr("href"),"PopupWindow",params);}
return false;});};bindSlideshowPopupClicks(body);onNewContent(bindSlideshowPopupClicks);body.on("pagebeforeshow",bindSlideshowPopupClicks.bind({},body));var initSlideshowMusicPlayers=function(context){var slideshowsWithMusic=context.find(".pp-slideshow-gallery").has(".mp3player.not-initialized");if(slideshowsWithMusic.length){PROPHOTO.require(["music-player"],function(musicPlayerProto){slideshowsWithMusic.each(function(){var musicPlayer=a.objectCreate(musicPlayerProto);musicPlayer.slideshow=$(this);musicPlayer.conf={"loop":true,"autoStart":true};musicPlayer.init();});});}};initSlideshowMusicPlayers(body);onNewContent(initSlideshowMusicPlayers);if(!body.hasClass("mobile")){$(".article-content img[data-lazyload-src]").lazyload();}
f.primaryNavDropdownOpacity=1;f.secondaryNavDropdownOpacity=0.93;f.setDropdownOpacities();f.modifyFormat();if(PROPHOTO.browser.isTouchDevice){f.handleSuckerfishTouch();}
var mhModule=PROPHOTO.site.renderingMobile?"slideshow-masthead-mobile":"slideshow-masthead";PROPHOTO.require([mhModule],function(mhsProto){var initMastheadSlideshow=function(){var mhsWrap=$("#masthead-slideshow.not-loaded");if(mhsWrap.length){var mhsImg=mhsWrap.find("img.ss-first-img");mhsImg.imageLoaded(function(){var mhs=a.objectCreate(mhsProto);mhs.wrap=mhsWrap;mhs.startImg=mhsImg;mhs.conf={"imgs":[{"src":imgDir+"masthead_image1_1341046434.jpg","linkURL":false},{"src":imgDir+"masthead_image2_1341038508.jpg","linkURL":false},{"src":imgDir+"masthead_image3_1341046092.jpg","linkURL":false},{"src":imgDir+"masthead_image4_1344943930.jpg","linkURL":false}],"holdTime":4000,"transitionTime":2000,"imageOrder":"sequential","loopImages":true,"transitionType":"crossfade","viewingAreaWidth":980,"viewingAreaHeight":600};mhs.init();});}};initMastheadSlideshow();body.on("pagebeforeshow",initMastheadSlideshow);});if(!PROPHOTO.browser.isTech){g(body);onNewContent(g);}
$("article:last").addClass("last-post");$(document).on("click","a[href='#top']",function(){$("html,body").animate({scrollTop:0},500,"easeOutExpo");return false;});$("a.type-share_on_facebook,a.type-tweet_this_url,a.type-subscribe_by_email").on("click",function(){var clicked=$(this),height=clicked.hasClass("type-subscribe_by_email")?550:275,width=clicked.hasClass("type-share_on_facebook")?665:600,href=clicked.attr("href");window.open(href,href,'location=0,menubar=0,height='+height+',width='+width+',toolbar=0,scrollbars=0,status=0');return false;});});});}());