//(C) Sharefaith, sharefaith.com. All rights reserved. function SFinvalid(a){return(a.indexOf('/custom/bg/?img=BandMainImg.jpg')>-1||a.indexOf('/?img=template70Guitar.jpg')>-1||a.indexOf('/BandMainIMG2-1.jpg')>-1||a.indexOf('/2014/06/Bandpic-1.jpg')>-1||a.indexOf('/custom/bg/?img=Bandpic-1.jpg')>-1||a.indexOf('/custom/bg/?img=MissionMainBG-1.jpg')>-1||a.indexOf('/custom/bg/?img=MissionGirl-2.jpg')>-1||a.indexOf('/custom/bg/?img=CornerStone-Girl.jpg')>-1||a.indexOf('/custom/bg/?img=template63')>-1||a.indexOf('/custom/bg/template63')>-1);}if(window.mejs&&mejs.MediaFeatures)mejs.MediaFeatures.isChromium=false;var closeClass=function(a,b){var c;while(a&&a!==document.body&&a.nodeType==1){c=a.getAttribute('class');if(c&&c.indexOf(b)!==-1)return a;a=a.parentNode;}};function IEorigin(a){return a.protocol+"//"+a.hostname;}(function(a){var b=false;a.fn.sfToggle=function(){var b='toggle';var c={height:b,marginBottom:b,marginTop:b,paddingBottom:b,paddingTop:b};if(a('link[href$="67/67.css"]').length>0)c={width:b,minWidth:b,marginLeft:b,marginRight:b,paddingLeft:b,paddingRight:b};return this.animate(c,400,'swing',function(){if('none'===this.style.display)this.style.display='';a(this).trigger('sfToggled');});};a.fn.lheight=function(){var b=a(this),c=b.children('p,div,h1,h2,h3'),d=0;while(c.length){b=c.eq(0);d+=parseInt(b.css('paddingTop'),10);c=b.children('p,div,h1,h2,h3');}return{height:b.css('lineHeight'),font:b.css('fontSize'),top:d};};window.simpleBtnCustom=function(b,c){a(function(a){var d=a(b).closest('.mejs-container');function e(a){if(a.length){a.css({background:c.sbpbackground,borderColor:c.sbpinner}).hover(function(){a.css({background:c.sbphbackground,borderColor:c.sbphinner});b.css('backgroundImage','url("'+c.innerh+'")');},function(){a.css({background:c.sbpbackground,borderColor:c.sbpinner});b.css('backgroundImage','url("'+c.inner+'")');});var b=a.find('button').css('background-image','url("'+c.inner+'")');}}e(d);_.defer(function(){d=a(b).closest('.mejs-container');e(d);});});};a(function(a){a(document).on('click','.sflb_section[data-sflink]',function(b){var c=a(b.target);if(c.is('a, .sermon_playlist *'))return;if('_blank'===c.closest('[data-sflink]').attr('data-sflinktarget'))window.open(c.closest('[data-sflink]').attr('data-sflink'));else if(parent!==window){var d=a('').attr('href',c.closest('[data-sflink]').attr('data-sflink'));a(document.documentElement).append(d);d.click();}else location.href=c.closest('[data-sflink]').attr('data-sflink');});a(window).on('load sflb_exit',function(){_.defer(function(){a('.sflb_section[data-bg]').each(function(){var b=a(this),c=JSON.parse(b.attr('data-bg')),d=b.outerWidth(),e=b.outerHeight(),f=window.devicePixelRatio?window.devicePixelRatio:1;var g=_.filter(c.imgs,function(a){return a.width>=d*f&&a.height>=e*f;});if(g.length>0){g=_.sortBy(g,'width');this.style.backgroundImage='url("'+wpbasehome+c.base+g[0].file+'")';this.style.backgroundSize='cover';}else{this.style.backgroundImage='url("'+wpbasehome+c.base+c.imgs[0].file+'")';this.style.backgroundSize='cover';}});});});function c(){if(a(window).width()<500){a('img[data-mobile]').each(function(){var b=a(this),c=b.attr('data-mobilesizes');if(c){var d=JSON.parse(c);_.each(d,function(a){var c=a[0],d=a[1],e=a[2];if(b.height()'+b+'');}).on('ready UCChange sflb_exit sflb_save_finished',function(){var b='',c={};a('[data-under]').each(function(){var a=this.getAttribute('data-under');if(!c.hasOwnProperty(a)){b+='[data-under="'+a+'"]:after{background:'+a+'; color:'+a+';}';c[a]=true;}var d='',e='';if(this.children.length>0){for(var f=0;fparseFloat(d)))d=g;var h=this.children[f].style.lineHeight;if(h&&(e===''||parseFloat(h)>parseFloat(e)))e=h;}this.style.fontSize=d;this.style.lineHeight=e;}});a('head #underlinecolors').remove();a('head').append('');});function e(){a('img[data-imghover]').each(function(){if(this.parentNode.getAttribute('class')==='imgeffectwrap'){}else{a(this).wrap('');var b={display:a(this).css('display')==='inline'?'':a(this).css('display'),marginLeft:a(this).css('marginLeft'),marginRight:a(this).css('marginRight')};if(a(this).attr('data-sfclip')==='circle')b.borderRadius=a(this).width()/2;a(this).parent().css(b);this.parentNode.setAttribute('data-imghover',this.getAttribute('data-imghover'));}});}a(e);a(window).on('sflb_exit',e);var f=function(){var b=a('body').css('backgroundImage');a('.menu, .sub-menu').each(function(){var b=a(this).offset();this.style.backgroundPosition=(-b.left)+'px '+(-b.top)+'px';});};f();a(window).on('load resize',f);a('body').on('mouseover','.menu li',f);a('#main_nav >li').on('touchstart MSPointerDown touchend MSPointerUp',function(b){var c=a('ul',this);if(c.length&&!c.data('shown')){c.show().data('shown',true);a(this).addClass('hover').data('noclick',true);b.preventDefault();}}).click(function(b){var c=a(b.target).parent();if(c.data('noclick')&&!a('body').is('.iOS')){c.data('noclick',false);return false;}});a('#main_nav, #main_nav2').on('touchstart MSPointerDown mouseover','li',function(b){var c=a('ul',this);c.css('marginLeft','');if(c.length&&0===a('body.menuOverflow.menuDown').length){var d=window.innerWidth-(c.offset().left+c.outerWidth());if(d<-1){d-=parseInt(c.css('paddingLeft'),10)||0;c.css('marginLeft',d);}}});a('.menu-item.menu-item-has-children, .menu-item.menu-item-has-children >a').attr("aria-haspopup","true");a(window).on('load',function(){b=true;});var g,h;function i(b){a('iframe[height][width][src*="vimeo.com"], iframe[height][width][src*="youtube.com"]').filter(':not(.tubular-player)').each(function(){var b=a(this);if(b.width()500){var d=a('.mobile_toggle').is(':visible')?'show':'hide';a('meta[name=viewport]').attr('content','width='+c+'px');_.defer(function(){a('.mobile_toggle')[d]();});}g=a(window).width();h=a(window).height();}}a(window).on('load resize',i);a(i);function j(){if(a('body').is('.mobileOn')&&a('#slideshow img').length){var b=a('#slideshow').width();a('#slideshow').height(b*323/950);}}a(window).on('load resize',j);a('.slideshow_container span').filter(':visible').click(function(b){var c=a('#slideshow >.cycle2-slide-active a').attr('href');if(typeof c!=="undefined")if(b.which==1)window.location=c;else window.open(c);}).mouseover(function(){var b=a('#slideshow >.cycle2-slide-active a').attr('href');a(this).css('cursor',(typeof b!=="undefined")?'pointer':'');});a('#slideshow').on('cycle2-update-view',function(){var b=a('#slideshow >.cycle2-slide-active').attr('href');var c=a('.slideshow_container >span:visible');if(typeof b!=="undefined")c.css('cursor','pointer');else c.css('cursor','auto');});var k=false;a(window).scroll(function(){var b=a('#slideshow, .plBannerContainer');if(b.length===1){var c=a(window).scrollTop();var d=a(window).height();var e=b.offset().top-c-d;if(e>=0||e<(-d-b.height())){if(!b.is('.cycle2-paused')){k=true;b.cycle2('pause');}}else if(k&&0===b.find('.editing').length&&0===a('.PLDialog').length){b.cycle2('resume');k=false;}}});a('#mobile_nav .menu_btn a').click(function(b){b.preventDefault();a('#main_nav').sfToggle();a(document.body).toggleClass('menuDown').trigger('menuDown');});a('#mobile_nav .search_btn a').click(function(b){b.preventDefault();a('#header .search').one('sfToggled',function(){if(a(this).is(':visible'))a('.search_inp').focus();}).sfToggle();});a('.search_form').submit(function(){if(''===a('.search_form [name=s]').val()){a(document.body).addClass('searchPushed');_.defer(function(){a('.search_inp').focus();});a('.search_inp').focus();return false;}});if(a(document.body).is('.mobileOn'))a('.mergeDown').each(function(){var b=a(this).children();var c=0;while(c-1&&b[c].innerHTML===' ')c--;c++;b.slice((c+b.length)/2,b.length).addClass('extraSpace');});window.sf=window.sf||{};sf.minis=[];var l=2000;var m=0;var n=function(b){if(window.NoResizeEvt)return;var c=false;var d=!(b instanceof jQuery);if(a(window).width()-1)return;var i=['SCRIPT','BR','STYLE','SELECT'];var j=0,k=false;if(g.children&&g.children.length){var l=g.childNodes.length;while(l--){if(g.childNodes[l].tagName&&g.childNodes[l].tagName==='BR')j++;if(g.childNodes[l].tagName&&g.childNodes[l].tagName!=='SPAN')k=true;if(!k&&3===g.childNodes[l].nodeType&&g.childNodes[l].data.indexOf(' ')!==-1)k=true;}}if(!k&&g.children&&g.children.length===1)k=true;if(g.children&&g.children.length>j&&k){for(var l=0;lf&&parseInt(g.style.fontSize||a(g).css('font-size'),10)>b){var p=g.style.fontSize||a(g).css('font-size');if(m){var q={el:g,fs:g.style.fontSize||g.parentNode.style.fontSize,lh:g.style.lineHeight||g.parentNode.style.lineHeight};sf.minis.push(q);m=false;}var r=parseInt(p,10)-2;g.style.fontSize=p.replace(/(\d+)\.?(\d*)/,r);g.style.lineHeight=p.replace(/(\d+)\.?(\d*)/,r*1.3);c=true;o=true;f=e.width();}var s=g.parentNode;if(o&&s.childNodes.length===1){if(s.style.fontSize)s.style.fontSize='';if(s.style.lineHeight)s.style.lineHeight='';}var t;if(g.tagName&&'H1'===g.tagName)t=g;else if(g.parentNode.tagName&&'H1'===g.parentNode.tagName)t=g.parentNode;if(t&&'table'===a(t).css('display'))if(a(t).width()>f){t.style.minWidth='60px';c=true;}}};h(this);a(this).closest('.page').attr('style',g);});h.removeClass('inlining');}else if(a(window).width()>l)i();else if(a(window).width()===l&&l!==m)i();m=a(window).width();function i(){var b=sf.minis.length;while(b--){var c=sf.minis[b].el;c.style.lineHeight=sf.minis[b].lh;c.style.fontSize=sf.minis[b].fs;n(a(c).closest('.sflb_section'));}}};var o=_.throttle(n,1900);o();a(window).on('load resize',o).on('sflb_save_finished',function(){l=2000;}).on('orientationchange',function(){setTimeout(o,100);});a('body.home .plBannerContainer').on('cycle2-after',function(b,c,e,f){d=true;o(a(f));d=false;a('.plBanner .sfeditbackground, .plBanner .edit_button').removeAttr('style');});function p(b){var c=false;if(b)if(b.data&&a.trim(b.data))c=true;else{var d=b.childNodes,e=b.childNodes.length;while(c===false&&e>=0)c=p(d[--e]);}return c;}a(window).on('load sflb_save_finished',function(){a('#content .sflb_section[data-overcolor]').each(function(){if(a(this).css('paddingLeft')==='0px')a(this).children().each(function(){var b=p(this)?'addClass':'removeClass';a(this)[b]('somePadding');});});});function q(){a('.simplebutton').each(function(){var b,c,d;b=a(this).next();if(b.length===0)b=a(this).parent().next();c=b.lheight();d=parseInt(c.height,10)-parseInt(c.font,10)+3;this.style.marginTop=d+'px';});}q();a(window).on('load sflb_save_finished',q);a(document.body).on('mouseover','.lnkpre,.lnkbtn',function(){var b=this;var c=b.style.backgroundColor;if(b.getAttribute('data-hoverbackgroundcolor'))b.style.backgroundColor=b.getAttribute('data-hoverbackgroundcolor');a(b).one('mouseout',function(){b.style.backgroundColor=c;});if(b.getAttribute('data-hovercolor')){var d=b.style.color;b.style.color=b.getAttribute('data-hovercolor');a(b).one('mouseout',function(){b.style.color=d;});}if(b.getAttribute('data-hoverbordercolor')){var e=b.style.borderColor;b.style.borderColor=b.getAttribute('data-hoverbordercolor');a(b).one('mouseout',function(){b.style.borderColor=e;});}});var r=[];var s=[];var t=[];function u(){_.each(r,function(a){a.style.marginBottom='';});_.each(s,function(a,b){a.textContent=t[b];});s=[];t=[];a('.lnkbtn').not('.editing .lnkbtn').each(function(){if(this.nextSibling&&this.nextSibling.textContent)if(this.nextSibling.nextSibling){if(a.trim(this.nextSibling.textContent)===''&&this.nextSibling.nextSibling.tagName&&'A'===this.nextSibling.nextSibling.tagName){var b=a(this.nextSibling.nextSibling).position(),c=a(this).position();if(c.top+5').parent().append('
');});var b=jQuery('.gmapBlock');var c;a(window).scroll(function(){b.show();if(c)clearTimeout(c);c=setTimeout(function(){b.hide();},500);});}x();jQuery(window).on('sflb_exit',x);if(navigator.platform&&navigator.platform.match(/^(iPad)$/))a('body').addClass('iPad');var y=function(){var b=(a(window).width()<480),c='data-was-padding';if(b)a('body.mobileOn .sflb_section[style*="border-box"]').each(function(){a(this).attr(c,this.style.paddingLeft).css({padding:'','-webkit-box-sizing':'','-moz-box-sizing':'','box-sizing':''});});else a('body.mobileOn .sflb_section[data-was-padding]').each(function(){var b=a(this).attr(c);a(this).css({paddingLeft:b,paddingRight:b,'-webkit-box-sizing':'border-box','-moz-box-sizing':'border-box','box-sizing':'border-box'}).removeAttr(c);});};y();a(window).resize(y);var z=function(){a('.SFembedWrap >iframe').each(function(b,c){a(c).parent().css({height:'',width:''}).css({height:a(c).height(),width:a(c).width()});});a('.thumbnail >img, .SFembedWrap >img').each(function(b,c){var d=a(c).parent();if(this.height*(d.width()/this.width)=pageYOffset+A)a(this).addClass('hid');});a('.cycle2-slideshow').on('cycle2-after',function(b,c,d,e){a('[data-appear]',e).removeClass('hid');a('[data-appear]',d).addClass('hid');});a(window).scroll(function(){a('[data-appear]').each(function(){if(a(this).closest('.cycle2-slideshow').length===0&&a(this).hasClass('hid'))if(a(this).offset().top#full_bg').remove();b.prepend('
');}}else{}if((navigator.userAgent.indexOf('Android')!=-1||navigator.userAgent.indexOf('Silk/')!=-1||a('body').is('.iOS'))&&navigator.userAgent.indexOf('AppleWebKit/')!=-1){var d=a(window),e=a('body');var f=function(){a('html')[0].style.minHeight='';while(d.height()==e.height()&&d.width()0;var l=closeClass(b,'entry');if(l)l=a(l);else return;d=true;if(c)l.css('height',l.height());_.each(h,function(a){a.style.height='';});var m=h.eq(0).height();if(h.children('.type-post').length===0){if(h.length+i.length>1){m=_.max(_.map(h,function(b){return a(b).height();}));if(m>1)h.height(m);}_.each(i,function(a){a.style.height='';});if(i.length>0){_.each(i,function(a){a.style.display='none';});var n=i.eq(0).parent().next(),o=n.height(),p=i.eq(0).parent().height();_.each(i,function(a){a.style.display='';});if(o>0){var q=_.max(_.map(i,function(b){return a(b).outerHeight();}));var r=o+p;var s=(parseInt(g.css('marginBottom'),10)||0)+(parseInt(g.next().css('top'),10)||0)-(parseInt(g.css('top'),10)||0);r+=s;if(r-1)g(o);}}});a(function(){a(document.body).on('addRowObserver',function(b){if(a(b.target).is('.sflb_row'))k.observe(b.target,{childList:true,subtree:true,attributes:true});else console.error('Not a row!');});a(window).on('load',function(){a('.sflb_row').trigger('addRowObserver');});});}else var k={observe:a.noop,disconnect:a.noop};a(window).on('sflb_exit reset-sf-tinyMCE nfFormReady',function(){_.delay(i,99);a('.entry img, .sf_editable img').off('load.forheight').on('load.forheight',i).on('load.forheight',footerChangeThrottled);_.delay(function(){a('.entry img, .sf_editable img').off('load.forheight').on('load.forheight',i).on('load.forheight',footerChangeThrottled);},100);});if(navigator.userAgent.indexOf(' Edge/')!=-1)a(function(){var a=document.getElementsByClassName('menu');if(a.length>0)setInterval(function(){if(a.length){var b=a[0].style.marginLeft;a[0].style.marginLeft='-0.2px';setTimeout(function(){a[0].style.marginLeft=b;},1);}},1000);});var l=_.throttle(function(b){var c=a('body').is('.withFootPage');a('.fl_l, #footerPage').css({position:'',bottom:'',top:'',left:'',right:''});var d={position:'fixed',bottom:0,top:'auto',left:0,right:0};var e=a('.fl_l').offset();if(e&&e.top&&(c||is_parallax())){if(e.top.plHome').outerHeight();if(g)f+=g;var h=jQuery('.top_panel_title_inner').outerHeight();if(jQuery('.top_panel_title').css('visibility')==='hidden')h=jQuery('.top_panel_title').height();if(h)f+=h;if(is_parallax()&&a('#footerPage').outerHeight()+f1){a('#content').css('height','');var i=a(window).height(),j=a('#footerPage'),k=j.outerHeight(),l=j.offset().top,m=i-k-l;if(m>0)a('#content').height(m+a('#content').height());}}},100);a(l);a(window).on('load resize sflb_save_finished sflb_exit reset-sf-tinyMCE footerChange updated_wc_div',l);a(window).on('load resize',function(){var b=40,c=a('#logo a span'),d=parseInt(jQuery('.sfheaderpage').css('maxWidth'));if(is_parallax()||d>60){var e=a('#logo img');if(e.length===1){e.css({maxHeight:'',marginTop:''});var f=e.width(),g=e.height();if(Math.abs(f/g-e[0].naturalWidth/e[0].naturalHeight)>.1){var h=e[0].naturalHeight/e[0].naturalWidth*f;e.css({maxHeight:h,marginTop:parseInt(e.css('marginTop'),10)+(g-h)/2});}}else if(c.length===1){c[0].style.lineHeight='';c[0].style.fontSize='';var i=60;if(d>60&&a('.sfheaderpage').width()>60){i=a('.sfheaderpage').width()+a('.menu_btn').width();var j=a('.search');if(j.css('display')!=='none'){var k=j.width()+(parseInt(j.css('marginRight'))||0);i+=k;}}while((c.height()>a('#header').height()||c.width()>(a('#header .container').width()-i))&&a('#header').height()<92.1&&b-->0){var l=c.css('fontSize'),m=parseInt(l,10),n=c.css('lineHeight'),o=parseInt(n,10);c[0].style.fontSize=l.replace(m,m-2);c[0].style.lineHeight=n.replace(o,o-2);}}}});var m=function(){a('body.excerpting .sflb_section >.type-post >.entry, body.archive.excerpting #content >.type-post >.entry').each(function(){var b=a(this).height()*').css({display:''});var b=45;a('.chess .more-link').each(function(){var c=a(this).siblings('.entry');if(a(this).is(':visible')){var d=false;if(a(this).position().top+a(this).outerHeight()+20>a(this).closest('.type-post').height()){c.hide();d=true;}if(a(this).position().top+a(this).outerHeight()+20>a(this).closest('.type-post').height()){a(this).hide();var e=a(this).siblings('.postmeta');if(e.position().top+e.outerHeight()>a(this).closest('.type-post').height())e.hide();d=true;}if(!d){var f=a(this).siblings('.posttitle').css('marginTop',0).outerHeight()+c.outerHeight()+a(this).siblings('.postmeta').outerHeight()+parseInt(a(this).siblings('.postmeta').css('marginTop'),10)+parseInt(a(this).siblings('.postmeta').css('marginBottom'),10)+a(this).outerHeight()+parseInt(a(this).css('marginTop'));if(f){var g=a(this).closest('.type-post').height()-f;if(g<0)g=0;a(this).siblings('.posttitle').css('marginTop',g/2);}}}else{var h=a(this).siblings('.posttitle').css('marginTop',0);c.css('maxHeight','none');var f=a(this).siblings('.posttitle').outerHeight()+c.outerHeight()+a(this).siblings('.postmeta').outerHeight();if(f){a(this).closest('.type-post').css('height','');var i=Math.max(f+b,a(this).siblings('.thumbnail.Top').outerHeight());a(this).closest('.type-post').height(i);var g=f+b-c.position().top-c.height();if(g<0)g=0;h.css('marginTop',g/2);}else a(window).trigger('fixThumbnails');}});a('.chess .entry').each(function(){var c=a(this);if(c.siblings('.more-link').length===0){var d=c.siblings('.posttitle').outerHeight()+c.outerHeight()+c.siblings('.postmeta').outerHeight();a(this).closest('.type-post').height(d+b);}});};a(window).on('load resize sflb_save_finished themeSet blogChange',m);a(m);a(function(){a('body').on('click','.innerBlog .page-numbers',function(b){if(this.href){var c=a(this).closest('.innerBlog').addClass('blogLoading'),d=c.index('.innerBlog');a.get(this.href,'',function(b){var e=a('.innerBlog',b).eq(d);c.replaceWith(e);e.trigger('blogChange');a(window).trigger('blogFormat');},'text');b.preventDefault();}}).on('click','.innerSermons .page-numbers',function(b){if(this.href){var c=a(this).closest('.innerSermons').addClass('blogLoading'),d=c.index('.innerSermons');a.get(this.href,'',function(b){var e=a('.innerSermons',b).eq(d);c.replaceWith(e);e.trigger('blogChange');a(window).trigger('blogFormat');a('audio').mediaelementplayer({m:1,features:['playpause','current','progress','duration','volume','tracks','fullscreen'],classPrefix:'mejs-',audioHeight:30,audioWidth:1024}).trigger('sfDidMEJS');},'text');b.preventDefault();}});});if(window.addEventListener&&window.postMessage)addEventListener("message",function(b){var c=["####","####"];var d=b.origin||b.originalEvent.origin;if(c.indexOf(d)>-1)a("iframe").each(function(){if(this.contentWindow===b.source)a(this).stop(true,false).animate({height:b.data.height+35});});},false);})(jQuery);