//(C) Sharefaith, sharefaith.com. All rights reserved. (function(){var a=navigator.userAgent.match(/MSIE (\d)+/);if(a&&a[1]<10)return;else jQuery(document.documentElement).append(''+'');jQuery(document.documentElement).append('');})();function is_parallax(){return jQuery('link[href$="60.css"], link[href$="61.css"], link[href$="62.css"], link[href$="63.css"], link[href$="64.css"], link[href$="65.css"], link[href$="66.css"], link[href$="67.css"], link[href$="68.css"], link[href$="69.css"], link[href$="70.css"], link[href$="71.css"],link[href$="72.css"],link[href$="73.css"]').length>0;}function isSubPageParallax(){return jQuery('link[href$="72.css"]').length>0;}jQuery(function(a){var b=a('.plFrontPage.plHome');var c=function(){return a('link[href$="61/61.css"], link[href$="62/62.css"], link[href$="63.css"], link[href$="64.css"], link[href$="67.css"], link[href$="71.css"], link[href$="73.css"]').length>0;};var d=function(){var b=a('#header'),c=0;if(parseInt(b.css('top'))===0&&b.height()#floatingBarsLG').show().css('visibility','visible');var j=a('').attr('src',b.css('background-image').replace(/^url\(['"]?([^'"]*)['"]?\).*?$/,'$1'));var k=g.html();g.html('');var l=true;j.on('load error',function(){var b=this.naturalWidth||this.width,d=this.naturalHeight||this.height,e=(this.src.indexOf('/custom/textures/')>-1),h=function(){var f=a('.plFrontPage.plHome');if(c()&&n()&&!e&&a('.plFrontPage.plHome .entry').height()+80.sflb_editor.entry'):a('.plFrontPage.plHome .entry');return(b.length&&b.height()+d()*2.sflb_editor.entry');if(n())b.css({'margin-top':b.height()/-2,position:'absolute',top:'50%',left:'10%'});else b.css({'margin-top':'',position:'',top:'',left:''});sf.layoutBuilder.positionEditor();}else{var c=a('.plFrontPage.plHome >.entry').attr('style','');if(c.length)if(n())c.css({'margin-top':c.height()/-2,position:'absolute',top:'50%',left:'10%'});else c.css('padding-top',d()+2);}a('.plBanner').each(function(){var b=a(this),c=a('.entry',this).filter(':last'),e=c.height();if(e==0)return;var f=sfBannerRatioSet();if(f>e)c.css({'margin-top':e/-2,'margin-left':c.width()/-2,position:'absolute',top:'50%',left:'50%','transform':'','-webkit-transform':'','transform-origin':'','-webkit-transform-origin':''});else if(_.isUndefined(document.body.style.transform)&&_.isUndefined(document.body.style.webkitTransform)){var g=20,h=5,i=10;while(b.height()+d()*').each(function(b,c){var d=a(c).css('font-size');if(d){c.style.fontSize=d.replace(/(\d+)/,Math.max(parseInt(d,10)-h,i));c.style.lineHeight=d.replace(/(\d+)/,Math.max(parseInt(d,10)-h,i));}a('[style]',c).each(function(){if(this.style.fontSize){var b=a(this).css('font-size');if(b){this.style.fontSize=b.replace(/(\d+)/,Math.max(parseInt(b,10)-h,i));this.style.lineHeight=b.replace(/(\d+)/,Math.max(parseInt(b,10)-h,i));}}});});c.attr('style','');}else{var j=f/2.01;if(allowCustomBGAlignSlider())j+=d();c.css({'margin-top':e/-2,'margin-left':c.width()/-2,position:'absolute',top:j,left:'50%'});c.css('transform','scale('+((f-10)/e)+')');c.css('-webkit-transform','scale('+((f-10)/e)+')');}});}o();a(window).one('PLimages',function(){a(window).one('PLimages',function(){a('#tmpBannerHide').remove();y();});});a(window).on('load',function(){if(document.createTouch)a('#tmpBannerHide').remove();_.delay(function(){if(a('#tmpBannerHide').length){a('#tmpBannerHide').remove();console.log('PLimages should have run');}},3000);});a(window).on('load sflb_save_finished resize ctrHome',o);var p=a('#header').css('position')==='fixed'?d():0;var q=a('#main_nav');a('.plFrontPage').waypoint(function(b,c){var d=a(this).data('url');a('li',q).removeClass('current_page_item');function e(b){return a('a[href="'+b+'"]',q).parent('li').addClass('current_page_item');}e(d);e(d+'/');},{offset:function(){return(a(this).hasClass('plHome'))?-1:p;}});r();a(window).scroll(r);function r(){if((window.pageYOffset||document.documentElement.scrollTop)!==0)a(document.body).removeClass('tiptop');else a(document.body).addClass('tiptop');}a('body').on('click','#plHomeVid',function(){this.play();});function s(){a('.SFPLOverlay.SFVideo >video').each(function(){var b=a(this),c=b.closest('[data-stellar-background-ratio]');if(b.height()=4)if(1*d[1]+1*d[2]+1*d[3]>383)a('.fl_l').addClass('black').removeClass('white');else a('.fl_l').addClass('white').removeClass('black');s();}).on('load',function(){var b=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(typeof b==='function')a('.plFrontPage').each(function(){var c=this;var d=function(){if(a(c).data('lastHeight')!==a(c).height()){a(window).trigger('resize');a(c).data('lastHeight',a(c).height());}if(a(c).hasClass('plFrontPage')&&a(c).hasClass('editing'))a(window).trigger('homechange');if(a(c).hasClass('plFrontPage'))a('.plFrontPage img, .plHome iframe').on('load',_.throttle(function(){a(window).trigger('homechange');},100));},e=new b(d);a(this).on('styleHeight',d);e.observe(c,{childList:true,subtree:true});});s();}).scroll(function(){if(!document.createTouch){var b=a(window).scrollTop();var c=a(window).height();a('.plFrontPage').each(function(){var d=a(this).offset().top-b-c;var e=d<-19?'removeClass':'addClass';a(this)[e]('PLFade');});a('.SFPLOverlay.SFVideo').each(function(){var d=a(this).parent().offset().top-b-c;var e=a(this).children('video')[0];if(d>=0||d<(-c-a(this).parent().height())){if(e.paused===false)e.pause();}else if(!e.ended)e.play();});}});function t(b){var c=a('#header').css('position')==='fixed'?d():0;if(a('#demo_header').is(':visible'))c+=84;a('html,body').animate({scrollTop:b.offset().top-c});}a('body').on('click','a',function(b){var c=a(this).attr('href');if(!c)return;var d=a('.plFrontPage[data-url="'+c+'"]:visible, .plFrontPage[data-url="'+(c.replace(/\/$/,''))+'"]:visible'),e=a('html,body');if(a(this).is('#logo a')&&isSubPageParallax())if(location.href.replace('?inAdmin=1','')!==a(this).attr('href'))return;if(a(this).is('#logo a')&&a('.plBannerContainer, .type-sfvideopage').length){e.animate({scrollTop:0},1000);b.preventDefault();}else if(d.length){t(d);b.preventDefault();}else if("#"===c.charAt(0)||c.indexOf(IEorigin(location)+location.pathname+'#')===0){var f=c.replace(/^[^#]*#/,'');if(f.length>0&&!a(this).closest('.ui-widget').length&&!a(this).hasClass('button')){var g=a('a[name="'+f+'"],#'+f);if(g.length){t(g);b.preventDefault();}}}else if(IEorigin(location)===IEorigin(this)&&location.pathname===this.pathname&&c.indexOf('?')===-1&&c.substr(0,1)!=='#'){if(a('.plFrontPage').length&&!a(this).closest('.ui-widget').length&&a(this).attr('href')!=='#'&&!a(this).hasClass('button')){e.animate({scrollTop:0},1000);b.preventDefault();}}else if(is_parallax()&&a(this).parent().parent().attr('id')==='main_nav'&&IEorigin(location)===IEorigin(this)&&!a(this).parent().is('.menu-item-object-custom')&&!isSubPageParallax()){var h=a('#logo a').attr('href');var i=this.href.replace(h,'');var j=h+(location.search.indexOf('inAdmin')===-1?'':'?inAdmin')+'#'+i;if(parent!==window){var k=a('').attr('href',j);a(document.documentElement).append(k);k.click();}else location.href=j;return false;}});var u=location.protocol+'//'+location.host+location.pathname+location.hash.replace('#','');var v=a('.plFrontPage[data-url="'+u+'"]');if(v.length&&v.data('url')!==a('#logo a').attr('href')){t(v);a('#main_nav a[href="'+u+'"]').parent('li').addClass('current-menu-item');a(window).on('load',function(){t(v);});}a(window).on('themeSet load resize updatedNav',x);a('#logo img').load(x);a('#tmpMenuHide').remove();x();var w=(navigator.platform&&navigator.platform.match(/^(iPad|iPod|iPhone.*)$/))?'click touchend':'click';a('body').on(w,function(b){if(b.type==='touchend'&&b.target.id!='main_nav'&&!a(b.target).is('.nav_wrapper'))return;var c=a(b.target);if(!c.parent().is('.menu_btn,.menu_btn a, .ui-wrapper')&&!c.is('.edit_button')&&c.closest('form.search_form').length===0)if(a('.menu_btn').is(':visible'))if(a('body.menuOverflow #main_nav:visible').sfToggle().length)a(document.body).toggleClass('menuDown');}).on('touchmove',function(b){if(a(this).is('.menuDown'))if(a('link[href$="67.css"], link[href$="69.css"]').length&&0===a(b.target).closest('.nav_wrapper').length)b.preventDefault();});function x(){if(a('#main_nav2').length===1){a('#main_nav2').html('');var b=6;var c=a('#main_nav >li').hide();a(c.splice(0,b)).css('display','');var d=_.map(a('#main_nav >li:visible >a'),_.property('textContent'));var e=_.map(d,_.property('length'));var f=0;var g=e.length;while(g--)f+=e[g];if(e.length>1&&f>4){partCount=Math.floor(d.length/2);var h=a(a('#main_nav >li:visible').splice(a('#main_nav >li:visible').length-partCount,partCount));h.clone().appendTo('#main_nav2');h.hide();}var i=200,j=a('#main_nav >:visible:last'),k=a('#main_nav >:visible:first');a('#main_nav >li >a').css('maxWidth','');while(j.length&&j.offset().top>k.offset().top&&i>20&&window.screen.width>480&&a(window).width()>480){a('#main_nav >li >a').css('maxWidth',i+'px');i-=10;}i=200;a('#main_nav2 >li >a').css('maxWidth','');j=a('#main_nav2 >:last');k=a('#main_nav2 >:first');while(j.length&&j.offset().top>k.offset().top&&i>20&&window.screen.width>480&&a(window).width()>480){a('#main_nav2 >li >a').css('maxWidth',i+'px');i-=10;}parent.jQuery('body').trigger('nav2view');}else{parent.jQuery('body').trigger('nav2view');var l=a(document.body),m=a('#main_nav'),n=m.length?m[0].style.display:'',o='menuOverflow';l.removeClass(o);m.css('display','');if(a(window).width()<481||m.height()>50||a('#logo').overlaps(m).length)l.addClass(o);m.css('display',n);}}var y=function(){if(a('.plBanner.cycle2-slide').length<=2)a('.sfPagePrev, .sfPageNext').hide();else a('.sfPagePrev, .sfPageNext').attr('style','').css('top',a('.plBannerContainer').position().top+a('.plBannerContainer').height()/2-29);};a('.plBannerContainer').on('cycle2-before',function(b,c,d,e,f){var g=a(e).css('display');a(e).show();a(window).trigger('scroll').trigger('ctrHome');a(e).css('display',g);}).on('cycle2-update-view cycle2-after cycle2-before',y);a(window).on('resize',y);});if(navigator.userAgent.indexOf('Android ')!==-1)jQuery(function(a){a('body').addClass('Android');});var iLastWidth=-1;jQuery(window).on('load resize styleHeight',function(a){var b=jQuery;if('styleHeight'===a.type){var c=b(a.target).closest('.plFrontPage');iLastWidth=-1;if(c.length)b('#iFix-'+c.attr('id')).remove();}if(navigator.platform&&navigator.platform.match(/^(iPad|iPod|iPhone.*)$/)&&b(window).width()!==iLastWidth){if('styleHeight'!==a.type)b('style[id^="iFix-"]').remove();iLastWidth=b(window).width();setTimeout(function(){var a=b('.plFrontPage.plHome');if(a.length)var c=b('').attr('src',a.css('background-image').replace(/^url\(['"]?([^'"]*)['"]?\).*?$/,'$1')).load(function(){var d=c[0].height/c[0].width*a.outerWidth();var e=a.outerHeight()/d;b('head').append('');});b('.plFrontPage').each(function(){var a=b(this);if(!a.is('.plHome')&&a.css('background-size')==='cover')var c=b('').attr('src',b(this).css('background-image').replace(/^url\(['"]?([^'"]*)['"]?\).*?$/,'$1')).load(function(){var d=c[0].height/c[0].width*a.outerWidth();var e=a.outerHeight()/d;var f=e*100;if(f<100)f=100;b('head').append('');});});b(window).trigger('homechange');},200);}});function sf_parallax(a){if(!document.createTouch&&typeof jQuery.stellar==='function')jQuery(window).stellar(jQuery.extend({responsive:true,horizontalScrolling:false},a));}jQuery(function(a){if(a('link[href$="64.css"], link[href$="65.css"]').length){var b=function(){a('.entry h1').each(function(){a(this).css('border-color',a(this).children().css('color'));});};b();a(window).on('sflb_save_finished reset-sf-tinyMCE',b);}if(a('link[href$="66.css"], link[href$="67.css"], link[href$="69.css"]').length){var c,d;if(!_.isUndefined(document.hidden)){c='hidden';d="visibilitychange";}else if(!_.isUndefined(document.msHidden)){c="msHidden";d="msvisibilitychange";}if(_.isFunction(window.addEventListener)&&d)window.addEventListener(d,function(){var b=document[c]?'pause':'play';a('.SFVideo video').each(function(){this[b]();});});}function e(){if(a('body').is('.logged-in'))return;var b=a('#header .container').width()-a('#logo a').width();if(b<60)centerTheLogo();}e();a(window).on('load resize',e);});function centerTheLogo(){var a=jQuery;if(is_parallax()){if(a('#header').height()>90)return;if(a('#header').height()