jQuery(function($){ var using_mobile_browser=false; if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)){ using_mobile_browser=true; } var nectarPageHeader; function fullscreenHeightCalc(){ var pageHeaderOffset=nectarPageHeader.offset().top; nectarPageHeader.css('height',(parseInt(window.innerHeight) - parseInt(pageHeaderOffset)) +'px'); } if(using_mobile_browser&&$('#page-header-bg.fullscreen-header').length > 0){ nectarPageHeader=$('#page-header-bg'); fullscreenHeightCalc(); var $windowDOMWidth=window.innerWidth, $windowDOMHeight=window.innerHeight; $(window).resize(function(){ if(($(window).width()!=$windowDOMWidth&&$(window).height!=$windowDOMHeight)){ fullscreenHeightCalc(); $windowDOMWidth=window.innerWidth; $windowDOMHeight=window.innerHeight; }}); } function portfolioFullScreenSliderCalcs(){ var $bodyBorderSize=($('.body-border-top').length > 0&&$(window).width() > 1000) ? $('.body-border-top').height(): 0; $('.nectar_fullscreen_zoom_recent_projects').each(function(){ if($(this).parents('.first-section').length > 0){ $(this).css('height',$(window).height() - $(this).offset().top - $bodyBorderSize); }else{ $(this).css('height',$(window).height()); }}); } if(using_mobile_browser&&$('.nectar_fullscreen_zoom_recent_projects').length > 0){ portfolioFullScreenSliderCalcs(); } function centeredNavBottomBarReposition(){ var $headerOuter=$('#header-outer'); var $headerSpan9=$('#header-outer[data-format="centered-menu-bottom-bar"] header#top .span_9'); var $headerSpan3=$('#header-outer[data-format="centered-menu-bottom-bar"] header#top .span_3'); var $secondaryHeader=$('#header-secondary-outer'); var $logoLinkClone=$headerSpan3.find('#logo').clone(); if($logoLinkClone.is('[data-supplied-ml="true"]')){ $logoLinkClone.find('img:not(.mobile-only-logo)').remove(); } $logoLinkClone.find('img.starting-logo').remove(); function centeredNavBottomBarSecondary(){ if($('body.mobile').length > 0){ $('#header-outer').css('margin-top',''); }else{ if($('#header-outer .span_9').css('display')=='none'){ $('#header-outer').css('margin-top',''); }else if($('#header-outer .span_9').css('display')!='none'&&parseInt($('#header-outer').css('top')) > 0){ $('#header-outer').css('top',''); }} } if($secondaryHeader.length > 0){ if($('#header-outer[data-remove-fixed="1"]').length==0&&$('#header-outer[data-condense="true"]').length > 0){ setTimeout(function(){ centeredNavBottomBarSecondary(); },50); } $secondaryHeader.addClass('centered-menu-bottom-bar'); } if($('#header-outer[data-condense="true"]').length > 0){ $headerSpan9.prepend($logoLinkClone); }} if($('#header-outer[data-format="centered-menu-bottom-bar"]').length > 0){ centeredNavBottomBarReposition(); } $('#page-header-bg[data-animate-in-effect="zoom-out"]').addClass('loaded'); function sliderFontOverrides(){ var $overrideCSS=''; $('.nectar-slider-wrap').each(function(i){ if($(this).find('.swiper-container[data-tho]').length > 0){ $tho=$(this).find('.swiper-container').attr('data-tho'); $tco=$(this).find('.swiper-container').attr('data-tco'); $pho=$(this).find('.swiper-container').attr('data-pho'); $pco=$(this).find('.swiper-container').attr('data-pco'); if($tho!='auto'||$tco!='auto'){ $overrideCSS +='@media only screen and (max-width: 1000px) and (min-width: 690px){'; if($tho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content h2, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content h2, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2 { font-size:' + $tho + 'px!important; line-height:' + (parseInt($tho) + 10) + 'px!important; }'; if($pho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content p, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content p, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p { font-size:' + $tco + 'px!important; line-height:' + (parseInt($tco) + 10) + 'px!important; }'; $overrideCSS +='}'; } if($pho!='auto'||$pco!='auto'){ $overrideCSS +='@media only screen and (max-width: 690px){'; if($pho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content h2, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content h2, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content h2, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content h2 { font-size:' + $pho + 'px!important; line-height:' + (parseInt($pho) + 10) + 'px!important; }'; if($pho!='auto') $overrideCSS +='#'+$(this).attr('id')+ '.nectar-slider-wrap[data-full-width="false"] .swiper-slide .content p, #boxed .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="true"] .swiper-slide .content p, body .nectar-slider-wrap#'+$(this).attr('id')+ '[data-full-width="boxed-full-width"] .swiper-slide .content p, body .full-width-content .vc_span12 .nectar-slider-wrap#'+$(this).attr('id')+ ' .swiper-slide .content p { font-size:' + $pco + 'px!important; line-height:' + (parseInt($pco) + 10) + 'px!important; }'; $overrideCSS +='}'; }} }); if($overrideCSS.length > 1){ var head=document.head||document.getElementsByTagName('head')[0]; var style=document.createElement('style'); style.type='text/css'; if(style.styleSheet){ style.styleSheet.cssText=$overrideCSS; }else{ style.appendChild(document.createTextNode($overrideCSS)); } head.appendChild(style); $('.nectar-slider-wrap .content').css('visibility','visible'); }} sliderFontOverrides(); function centeredLogoMargins(){ if($('#header-outer[data-format="centered-logo-between-menu"]').length > 0&&$(window).width() > 1000){ $midnightSelector=($('#header-outer .midnightHeader').length > 0) ? '> .midnightHeader:first-child':''; var $navItemLength=$('#header-outer[data-format="centered-logo-between-menu"] '+$midnightSelector+' nav > .sf-menu > li').length; if($('#header-outer #social-in-menu').length > 0){ $navItemLength--; } $centerLogoWidth=($('#header-outer .row .col.span_3 #logo img:visible').length==0) ? parseInt($('#header-outer .row .col.span_3').width()):parseInt($('#header-outer .row .col.span_3 img:visible').width()); $extraMenuSpace=($('#header-outer[data-lhe="animated_underline"]').length > 0) ? parseInt($('#header-outer header#top nav > ul > li:first-child > a').css('margin-right')):parseInt($('#header-outer header#top nav > ul > li:first-child > a').css('padding-right')); if($extraMenuSpace > 30){ $extraMenuSpace +=45; }else if($extraMenuSpace > 20){ $extraMenuSpace +=40; }else{ $extraMenuSpace +=30; } $('#header-outer[data-format="centered-logo-between-menu"] nav > .sf-menu > li:nth-child('+Math.floor($navItemLength/2)+')').css({'margin-right': ($centerLogoWidth+$extraMenuSpace) + 'px'}).addClass('menu-item-with-margin'); $leftMenuWidth=0; $rightMenuWidth=0; $('#header-outer[data-format="centered-logo-between-menu"] '+$midnightSelector+' nav > .sf-menu > li:not(#social-in-menu)').each(function(i){ if(i+1 <=Math.floor($navItemLength/2)){ $leftMenuWidth +=$(this).width(); }else{ $rightMenuWidth +=$(this).width(); }}); var $menuDiff=Math.abs($rightMenuWidth - $leftMenuWidth); if($leftMenuWidth > $rightMenuWidth) $('#header-outer .row > .col.span_9').css('padding-right',$menuDiff); else $('#header-outer .row > .col.span_9').css('padding-left',$menuDiff); $('#header-outer[data-format="centered-logo-between-menu"] nav').css('visibility','visible'); }} var usingLogoImage=($('#header-outer[data-using-logo="1"]').length > 0) ? true:false; if(!usingLogoImage){ centeredLogoMargins(); } else if(usingLogoImage&&$('#header-outer[data-format="centered-logo-between-menu"]').length > 0&&$('header#top #logo img:first-child[src]').length > 0){ var tempLogoImg=new Image(); tempLogoImg.src=$('header#top #logo img:first-child').attr('src'); tempLogoImg.onload=function(){ centeredLogoMargins(); };} function nectarFullWidthSections(){ var $windowInnerWidth=window.innerWidth; var $scrollBar=($('#ascrail2000').length > 0&&$windowInnerWidth > 1000) ? -13:0; var $bodyBorderWidth=($('.body-border-right').length > 0&&$windowInnerWidth > 1000) ? parseInt($('.body-border-right').width())*2:0; if($('#boxed').length==1){ $justOutOfSight=((parseInt($('.container-wrap').width()) - parseInt($('.main-content').width())) / 2) + 4; }else{ var $extResponsivePadding=($('body[data-ext-responsive="true"]').length > 0&&$windowInnerWidth >=1000) ? 180:0; var $leftHeaderSize=($('#header-outer[data-format="left-header"]').length > 0&&$windowInnerWidth >=1000) ? parseInt($('#header-outer[data-format="left-header"]').width()):0; if($(window).width() - $leftHeaderSize - $bodyBorderWidth <=parseInt($('.main-content').css('max-width'))){ var $windowWidth=parseInt($('.main-content').css('max-width')); if($extResponsivePadding==180) $windowWidth=$windowWidth - $scrollBar; }else{ var $windowWidth=$(window).width() - $leftHeaderSize - $bodyBorderWidth; } $contentWidth=parseInt($('.main-content').css('max-width')); if($('body.single-post[data-ext-responsive="true"]').length > 0&&$('.container-wrap.no-sidebar').length > 0){ $contentWidth=$('.post-area').width(); $extResponsivePadding=0; } $justOutOfSight=Math.ceil((($windowWidth + $extResponsivePadding + $scrollBar - $contentWidth) / 2)) } $('.carousel-wrap[data-full-width="true"], .portfolio-items[data-col-num="elastic"]:not(.fullwidth-constrained), .full-width-content').each(function(){ var $leftHeaderSize=($('#header-outer[data-format="left-header"]').length > 0&&$windowInnerWidth >=1000) ? parseInt($('#header-outer[data-format="left-header"]').width()):0; var $bodyBorderWidth=($('.body-border-right').length > 0&&$windowInnerWidth > 1000) ? parseInt($('.body-border-right').width())*2:0; if($('#boxed').length==1){ var $mainContentWidth=($('#nectar_fullscreen_rows').length==0) ? parseInt($('.main-content').width()):parseInt($(this).parents('.container').width()); if($('body.single-post[data-ext-responsive="true"]').length > 0&&$('.container-wrap.no-sidebar').length > 0&&$(this).parents('.post-area').length > 0){ $contentWidth=$('.post-area').width(); $extResponsivePadding=0; $windowWidth=$(window).width() - $bodyBorderWidth; $justOutOfSight=Math.ceil((($windowWidth + $extResponsivePadding + $scrollBar - $contentWidth) / 2)) }else{ if($(this).parents('.page-submenu').length > 0) $justOutOfSight=((parseInt($('.container-wrap').width()) - $mainContentWidth) / 2); else $justOutOfSight=((parseInt($('.container-wrap').width()) - $mainContentWidth) / 2) + 4; }}else{ if($('body.single-post[data-ext-responsive="true"]').length > 0&&$('.container-wrap.no-sidebar').length > 0&&$(this).parents('.post-area').length > 0){ $contentWidth=$('.post-area').width(); $extResponsivePadding=0; $windowWidth=$(window).width() - $leftHeaderSize - $bodyBorderWidth; }else{ var $mainContentMaxWidth=($('#nectar_fullscreen_rows').length==0) ? parseInt($('.main-content').css('max-width')):parseInt($(this).parents('.container').css('max-width')); if($('#boxed').length==0&&$(this).hasClass('portfolio-items')&&$(this).is('[data-gutter*="px"]')&&$(this).attr('data-gutter').length > 0&&$(this).attr('data-gutter')!='none'){ $scrollBar=($('#ascrail2000').length > 0&&$windowInnerWidth > 1000) ? -13:0; } if($(window).width() - $leftHeaderSize - $bodyBorderWidth <=$mainContentMaxWidth){ $windowWidth=$mainContentMaxWidth; if($extResponsivePadding==180) $windowWidth=$windowWidth - $scrollBar; } $contentWidth=$mainContentMaxWidth; $extResponsivePadding=($('body[data-ext-responsive="true"]').length > 0&&window.innerWidth >=1000) ? 180:0; if($leftHeaderSize > 0) $extResponsivePadding=($('body[data-ext-responsive="true"]').length > 0&&window.innerWidth >=1000) ? 120:0; } $justOutOfSight=Math.ceil((($windowWidth + $extResponsivePadding + $scrollBar - $contentWidth) / 2)) } $extraSpace=0; if($(this).hasClass('carousel-wrap')) $extraSpace=1; if($(this).hasClass('portfolio-items')) $extraSpace=5; $carouselWidth=($('#boxed').length==1) ? $mainContentWidth + parseInt($justOutOfSight*2):$(window).width() - $leftHeaderSize - $bodyBorderWidth +$extraSpace + $scrollBar ; if($('#boxed').length==0&&$(this).hasClass('portfolio-items')&&$(this).is('[data-gutter*="px"]')&&$(this).attr('data-gutter').length > 0&&$(this).attr('data-gutter')!='none'){ if($(window).width() > 1000) $carouselWidth=$(window).width() - $leftHeaderSize - $bodyBorderWidth + $scrollBar + 3 else $carouselWidth=$(window).width() - $leftHeaderSize - $bodyBorderWidth + $scrollBar } if($(this).parent().hasClass('default-style')){ var $mainContentWidth=($('#nectar_fullscreen_rows').length==0) ? parseInt($('.main-content').width()):parseInt($(this).parents('.container').width()); if($('#boxed').length!=0){ $carouselWidth=($('#boxed').length==1) ? $mainContentWidth + parseInt($justOutOfSight*2):$(window).width() - $leftHeaderSize + $extraSpace + $scrollBar ; }else{ $carouselWidth=($('#boxed').length==1) ? $mainContentWidth + parseInt($justOutOfSight*2):($(window).width() - $leftHeaderSize - $bodyBorderWidth) - (($(window).width()- $leftHeaderSize - $bodyBorderWidth)*.025) + $extraSpace + $scrollBar ; $windowWidth=($(window).width() - $leftHeaderSize - $bodyBorderWidth <=$mainContentWidth) ? $mainContentWidth:($(window).width() - $leftHeaderSize - $bodyBorderWidth) - (($(window).width()- $leftHeaderSize - $bodyBorderWidth)*.025); $justOutOfSight=Math.ceil((($windowWidth + $scrollBar - $mainContentWidth) / 2)) }} else if($(this).parent().hasClass('spaced')){ var $mainContentWidth=($('#nectar_fullscreen_rows').length==0) ? parseInt($('.main-content').width()):parseInt($(this).parents('.container').width()); if($('#boxed').length!=0){ $carouselWidth=($('#boxed').length==1) ? $mainContentWidth + parseInt($justOutOfSight*2) - ($(window).width()*.02):$(window).width() + $extraSpace + $scrollBar ; }else{ $carouselWidth=($('#boxed').length==1) ? $mainContentWidth + parseInt($justOutOfSight*2):($(window).width()- $leftHeaderSize - $bodyBorderWidth) - Math.ceil(($(window).width()- $leftHeaderSize - $bodyBorderWidth)*.02) + $extraSpace + $scrollBar ; var $windowWidth2=($(window).width() - $leftHeaderSize - $bodyBorderWidth <=$mainContentWidth) ? $mainContentWidth:($(window).width() - $leftHeaderSize - $bodyBorderWidth) - (($(window).width()- $leftHeaderSize - $bodyBorderWidth)*.02); $justOutOfSight=Math.ceil((($windowWidth2 + $scrollBar - $mainContentWidth) / 2) +2) }} if(!$(this).parents('.span_9').length > 0&&!$(this).parent().hasClass('span_3')&&$(this).parent().attr('id')!='sidebar-inner'&&$(this).parent().attr('id')!='portfolio-extra' && !$(this).find('.carousel-wrap[data-full-width="true"]').length > 0 && !$(this).find('.nectar-carousel-flickity-fixed-content').length > 0 && !$(this).find('.portfolio-items:not(".carousel")[data-col-num="elastic"]').length > 0){ if($('.single-product').length > 0&&$(this).parents('#tab-description').length > 0&&$(this).parents('.full-width-tabs').length==0){ $(this).css({ 'visibility': 'visible' }); }else{ if($(this).hasClass('portfolio-items')){ $(this).css({ 'transform': 'translateX(-'+ $justOutOfSight + 'px)', 'margin-left': 0, 'left': 0, 'width': $carouselWidth, 'visibility': 'visible' }); }else{ $(this).css({ 'left': 0, 'margin-left': - $justOutOfSight, 'width': $carouselWidth, 'visibility': 'visible' }); }} }else if($(this).parent().attr('id')=='portfolio-extra'&&$('#full_width_portfolio').length!=0){ $(this).css({ 'left': 0, 'margin-left': - $justOutOfSight, 'width': $carouselWidth, 'visibility': 'visible' }); }else{ $(this).css({ 'margin-left': 0, 'width': 'auto', 'left': '0', 'visibility': 'visible' }); }}); } if($('#nectar_fullscreen_rows').length==0){ nectarFullWidthSections(); }}); !function(e,t,n){function r(e,t){return typeof e===t}function a(){var e,t,n,a,o,i,s;for(var c in b)if(b.hasOwnProperty(c)){if(e=[],t=b[c],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nf;f++)if(g=e[f],h=W.style[g],c(g,"-")&&(g=s(g)),W.style[g]!==n){if(o||r(a,"undefined"))return d(),"pfx"==t?g:!0;try{W.style[g]=a}catch(y){}if(W.style[g]!=h)return d(),"pfx"==t?g:!0}return d(),!1}function h(e,t,n,a,o){var i=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+B.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?g(s,t,a,o):(s=(e+" "+P.join(i+" ")+i).split(" "),f(s,t,n))}function v(e,t,r){return h(e,n,n,t,r)}var y=[],b=[],x={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=x,Modernizr=new Modernizr,Modernizr.addTest("applicationcache","applicationCache"in e),Modernizr.addTest("geolocation","geolocation"in navigator),Modernizr.addTest("history",function(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")?e.history&&"pushState"in e.history:!1}),Modernizr.addTest("postmessage","postMessage"in e),Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var T=!1;try{T="WebSocket"in e&&2===e.WebSocket.CLOSING}catch(w){}Modernizr.addTest("websockets",T),Modernizr.addTest("localstorage",function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("sessionstorage",function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("websqldatabase","openDatabase"in e),Modernizr.addTest("webworkers","Worker"in e);var S=x._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];x._prefixes=S;var C=t.documentElement,E="svg"===C.nodeName.toLowerCase();E||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=b.elements;return"string"==typeof e?e.split(" "):e}function a(e,t){var n=b.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),b.elements=n+" "+e,d(t)}function o(e){var t=y[e[h]];return t||(t={},v++,e[h]=v,y[v]=t),t}function i(e,n,r){if(n||(n=t),u)return n.createElement(e);r||(r=o(n));var a;return a=r.cache[e]?r.cache[e].cloneNode():g.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!a.canHaveChildren||m.test(e)||a.tagUrn?a:r.frag.appendChild(a)}function s(e,n){if(e||(e=t),u)return e.createDocumentFragment();n=n||o(e);for(var a=n.frag.cloneNode(),i=0,s=r(),c=s.length;c>i;i++)a.createElement(s[i]);return a}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return b.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(b,t.frag)}function d(e){e||(e=t);var r=o(e);return!b.shivCSS||l||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),u||c(e,r),e}var l,u,f="3.7.3",p=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,g=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",v=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="",l="hidden"in e,u=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){l=!0,u=!0}}();var b={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:f,shivCSS:p.shivCSS!==!1,supportsUnknownElements:u,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:d,createElement:i,createDocumentFragment:s,addElements:a};e.html5=b,d(t),"object"==typeof module&&module.exports&&(module.exports=b)}("undefined"!=typeof e?e:this,t);var k="Moz O ms Webkit",P=x._config.usePrefixes?k.toLowerCase().split(" "):[];x._domPrefixes=P;var _=function(){function e(e,t){var a;return e?(t&&"string"!=typeof t||(t=i(t||"div")),e="on"+e,a=e in t,!a&&r&&(t.setAttribute||(t=i("div")),t.setAttribute(e,""),a="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),a):!1}var r=!("onblur"in t.documentElement);return e}();x.hasEvent=_,Modernizr.addTest("hashchange",function(){return _("hashchange",e)===!1?!1:t.documentMode===n||t.documentMode>7}),Modernizr.addTest("audio",function(){var e=i("audio"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),t.mp3=e.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/,""),t.opus=e.canPlayType('audio/ogg; codecs="opus"')||e.canPlayType('audio/webm; codecs="opus"').replace(/^no$/,""),t.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),t.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("canvas",function(){var e=i("canvas");return!(!e.getContext||!e.getContext("2d"))}),Modernizr.addTest("canvastext",function(){return Modernizr.canvas===!1?!1:"function"==typeof i("canvas").getContext("2d").fillText}),Modernizr.addTest("video",function(){var e=i("video"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),t.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("webgl",function(){var t=i("canvas"),n="probablySupportsContext"in t?"probablySupportsContext":"supportsContext";return n in t?t[n]("webgl")||t[n]("experimental-webgl"):"WebGLRenderingContext"in e}),Modernizr.addTest("cssgradients",function(){for(var e,t="background-image:",n="gradient(linear,left top,right bottom,from(#9f9),to(white));",r="",a=0,o=S.length-1;o>a;a++)e=0===a?"to ":"",r+=t+S[a]+"linear-gradient("+e+"left top, #9f9, white);";Modernizr._config.usePrefixes&&(r+=t+"-webkit-"+n);var s=i("a"),c=s.style;return c.cssText=r,(""+c.backgroundImage).indexOf("gradient")>-1}),Modernizr.addTest("multiplebgs",function(){var e=i("a").style;return e.cssText="background:url(https://),url(https://),red url(https://)",/(url\s*\(.*?){3}/.test(e.background)}),Modernizr.addTest("opacity",function(){var e=i("a").style;return e.cssText=S.join("opacity:.55;"),/^0.55$/.test(e.opacity)}),Modernizr.addTest("rgba",function(){var e=i("a").style;return e.cssText="background-color:rgba(150,255,150,.5)",(""+e.backgroundColor).indexOf("rgba")>-1}),Modernizr.addTest("inlinesvg",function(){var e=i("div");return e.innerHTML="","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&e.firstChild&&e.firstChild.namespaceURI)}),Modernizr.addTest("csspositionsticky",function(){var e="position:",t="sticky",n=i("a"),r=n.style;return r.cssText=e+S.join(t+";"+e).slice(0,-e.length),-1!==r.position.indexOf(t)});var N=i("input"),R="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),z={};Modernizr.input=function(t){for(var n=0,r=t.length;r>n;n++)z[t[n]]=!!(t[n]in N);return z.list&&(z.list=!(!i("datalist")||!e.HTMLDataListElement)),z}(R);var $="search tel url email datetime date month week time datetime-local number range color".split(" "),A={};Modernizr.inputtypes=function(e){for(var r,a,o,i=e.length,s="1)",c=0;i>c;c++)N.setAttribute("type",r=e[c]),o="text"!==N.type&&"style"in N,o&&(N.value=s,N.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&N.style.WebkitAppearance!==n?(C.appendChild(N),a=t.defaultView,o=a.getComputedStyle&&"textfield"!==a.getComputedStyle(N,null).WebkitAppearance&&0!==N.offsetHeight,C.removeChild(N)):/^(search|tel)$/.test(r)||(o=/^(url|email)$/.test(r)?N.checkValidity&&N.checkValidity()===!1:N.value!=s)),A[e[c]]=!!o;return A}($),Modernizr.addTest("hsla",function(){var e=i("a").style;return e.cssText="background-color:hsla(120,40%,100%,.5)",c(e.backgroundColor,"rgba")||c(e.backgroundColor,"hsla")});var O="CSS"in e&&"supports"in e.CSS,L="supportsCSS"in e;Modernizr.addTest("supports",O||L);var j={}.toString;Modernizr.addTest("svgclippaths",function(){return!!t.createElementNS&&/SVGClipPath/.test(j.call(t.createElementNS("http://www.w3.org/2000/svg","clipPath")))}),Modernizr.addTest("smil",function(){return!!t.createElementNS&&/SVGAnimate/.test(j.call(t.createElementNS("http://www.w3.org/2000/svg","animate")))});var B=x._config.usePrefixes?k.split(" "):[];x._cssomPrefixes=B;var F=function(t){var r,a=S.length,o=e.CSSRule;if("undefined"==typeof o)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in o)return"@"+t;for(var i=0;a>i;i++){var s=S[i],c=s.toUpperCase()+"_"+r;if(c in o)return"@-"+s.toLowerCase()+"-"+t}return!1};x.atRule=F;var M=x.testStyles=l,D=function(){var e=navigator.userAgent,t=e.match(/applewebkit\/([0-9]+)/gi)&&parseFloat(RegExp.$1),n=e.match(/w(eb)?osbrowser/gi),r=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,a=533>t&&e.match(/android/gi);return n||a||r}();D?Modernizr.addTest("fontface",!1):M('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),a=r.sheet||r.styleSheet,o=a?a.cssRules&&a.cssRules[0]?a.cssRules[0].cssText:a.cssText||"":"",i=/src/i.test(o)&&0===o.indexOf(n.split(" ")[0]);Modernizr.addTest("fontface",i)}),M('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}',function(e){Modernizr.addTest("generatedcontent",e.offsetHeight>=7)});var I={elem:i("modernizr")};Modernizr._q.push(function(){delete I.elem});var W={style:I.elem.style};Modernizr._q.unshift(function(){delete W.style});var V=x.testProp=function(e,t,r){return g([e],n,t,r)};Modernizr.addTest("textshadow",V("textShadow","1px 1px")),x.testAllProps=h;var H,U=x.prefixed=function(e,t,n){return 0===e.indexOf("@")?F(e):(-1!=e.indexOf("-")&&(e=s(e)),t?h(e,t,n):h(e,"pfx"))};try{H=U("indexedDB",e)}catch(w){}Modernizr.addTest("indexeddb",!!H),H&&Modernizr.addTest("indexeddb.deletedatabase","deleteDatabase"in H),x.testAllProps=v,Modernizr.addTest("cssanimations",v("animationName","a",!0)),Modernizr.addTest("backgroundsize",v("backgroundSize","100%",!0)),Modernizr.addTest("borderimage",v("borderImage","url() 1",!0)),Modernizr.addTest("borderradius",v("borderRadius","0px",!0)),Modernizr.addTest("boxshadow",v("boxShadow","1px 1px",!0)),function(){Modernizr.addTest("csscolumns",function(){var e=!1,t=v("columnCount");try{(e=!!t)&&(e=new Boolean(e))}catch(n){}return e});for(var e,t,n=["Width","Span","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","BreakBefore","BreakAfter","BreakInside"],r=0;r (winHeight||_window.height())); }, _setFocus: function(){ (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0):mfp.wrap).focus(); }, _onFocusIn: function(e){ if(e.target!==mfp.wrap[0]&&!$.contains(mfp.wrap[0], e.target)){ mfp._setFocus(); return false; }}, _parseMarkup: function(template, values, item){ var arr; if(item.data){ values=$.extend(item.data, values); } _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item]); $.each(values, function(key, value){ if(value===undefined||value===false){ return true; } arr=key.split('_'); if(arr.length > 1){ var el=template.find(EVENT_NS + '-'+arr[0]); if(el.length > 0){ var attr=arr[1]; if(attr==='replaceWith'){ if(el[0]!==value[0]){ el.replaceWith(value); }}else if(attr==='img'){ if(el.is('img')){ el.attr('src', value); }else{ el.replaceWith(''); }}else{ el.attr(arr[1], value); }} }else{ template.find(EVENT_NS + '-'+key).html(value); }}); }, _getScrollbarSize: function(){ if(mfp.scrollbarSize===undefined){ var scrollDiv=document.createElement("div"); scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;'; document.body.appendChild(scrollDiv); mfp.scrollbarSize=scrollDiv.offsetWidth - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); } return mfp.scrollbarSize; }}; $.magnificPopup={ instance: null, proto: MagnificPopup.prototype, modules: [], open: function(options, index){ _checkInstance(); if(!options){ options={};}else{ options=$.extend(true, {}, options); } options.isObj=true; options.index=index||0; return this.instance.open(options); }, close: function(){ return $.magnificPopup.instance&&$.magnificPopup.instance.close(); }, registerModule: function(name, module){ if(module.options){ $.magnificPopup.defaults[name]=module.options; } $.extend(this.proto, module.proto); this.modules.push(name); }, defaults: { disableOn: 0, key: null, midClick: false, mainClass: '', preloader: true, focus: '', closeOnContentClick: false, closeOnBgClick: true, closeBtnInside: true, showCloseBtn: true, enableEscapeKey: true, modal: false, alignTop: false, removalDelay: 0, prependTo: null, fixedContentPos: 'auto', fixedBgPos: 'auto', overflowY: 'auto', closeMarkup: '', tClose: 'Close (Esc)', tLoading: 'Loading...' }}; $.fn.magnificPopup=function(options){ _checkInstance(); var jqEl=$(this); if(typeof options==="string"){ if(options==='open'){ var items, itemOpts=_isJQ ? jqEl.data('magnificPopup'):jqEl[0].magnificPopup, index=parseInt(arguments[1], 10)||0; if(itemOpts.items){ items=itemOpts.items[index]; }else{ items=jqEl; if(itemOpts.delegate){ items=items.find(itemOpts.delegate); } items=items.eq(index); } mfp._openClick({mfpEl:items}, jqEl, itemOpts); }else{ if(mfp.isOpen) mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1)); }}else{ options=$.extend(true, {}, options); if(_isJQ){ jqEl.data('magnificPopup', options); }else{ jqEl[0].magnificPopup=options; } mfp.addGroup(jqEl, options); } return jqEl; }; var INLINE_NS='inline', _hiddenClass, _inlinePlaceholder, _lastInlineElement, _putInlineElementsBack=function(){ if(_lastInlineElement){ _inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach(); _lastInlineElement=null; }}; $.magnificPopup.registerModule(INLINE_NS, { options: { hiddenClass: 'hide', markup: '', tNotFound: 'Content not found' }, proto: { initInline: function(){ mfp.types.push(INLINE_NS); _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function(){ _putInlineElementsBack(); }); }, getInline: function(item, template){ _putInlineElementsBack(); if(item.src){ var inlineSt=mfp.st.inline, el=$(item.src); if(el.length){ var parent=el[0].parentNode; if(parent&&parent.tagName){ if(!_inlinePlaceholder){ _hiddenClass=inlineSt.hiddenClass; _inlinePlaceholder=_getEl(_hiddenClass); _hiddenClass='mfp-'+_hiddenClass; } _lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass); } mfp.updateStatus('ready'); }else{ mfp.updateStatus('error', inlineSt.tNotFound); el=$('
'); } item.inlineElement=el; return el; } mfp.updateStatus('ready'); mfp._parseMarkup(template, {}, item); return template; }} }); var AJAX_NS='ajax', _ajaxCur, _removeAjaxCursor=function(){ if(_ajaxCur){ $(document.body).removeClass(_ajaxCur); }}, _destroyAjaxRequest=function(){ _removeAjaxCursor(); if(mfp.req){ mfp.req.abort(); }}; $.magnificPopup.registerModule(AJAX_NS, { options: { settings: null, cursor: 'mfp-ajax-cur', tError: 'The content could not be loaded.' }, proto: { initAjax: function(){ mfp.types.push(AJAX_NS); _ajaxCur=mfp.st.ajax.cursor; _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest); _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest); }, getAjax: function(item){ if(_ajaxCur){ $(document.body).addClass(_ajaxCur); } mfp.updateStatus('loading'); var opts=$.extend({ url: item.src, success: function(data, textStatus, jqXHR){ var temp={ data:data, xhr:jqXHR }; _mfpTrigger('ParseAjax', temp); mfp.appendContent($(temp.data), AJAX_NS); item.finished=true; _removeAjaxCursor(); mfp._setFocus(); setTimeout(function(){ mfp.wrap.addClass(READY_CLASS); }, 16); mfp.updateStatus('ready'); _mfpTrigger('AjaxContentAdded'); }, error: function(){ _removeAjaxCursor(); item.finished=item.loadError=true; mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src)); }}, mfp.st.ajax.settings); mfp.req=$.ajax(opts); return ''; }} }); var _imgInterval, _getTitle=function(item){ if(item.data&&item.data.title!==undefined) return item.data.title; var src=mfp.st.image.titleSrc; if(src){ if($.isFunction(src)){ return src.call(mfp, item); }else if(item.el){ return item.el.attr(src)||''; }} return ''; }; $.magnificPopup.registerModule('image', { options: { markup: '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
', cursor: 'mfp-zoom-out-cur', titleSrc: 'title', verticalFit: true, tError: 'The image could not be loaded.' }, proto: { initImage: function(){ var imgSt=mfp.st.image, ns='.image'; mfp.types.push('image'); _mfpOn(OPEN_EVENT+ns, function(){ if(mfp.currItem.type==='image'&&imgSt.cursor){ $(document.body).addClass(imgSt.cursor); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(imgSt.cursor){ $(document.body).removeClass(imgSt.cursor); } _window.off('resize' + EVENT_NS); }); _mfpOn('Resize'+ns, mfp.resizeImage); if(mfp.isLowIE){ _mfpOn('AfterChange', mfp.resizeImage); }}, resizeImage: function(){ var item=mfp.currItem; if(!item||!item.img) return; if(mfp.st.image.verticalFit){ var decr=0; if(mfp.isLowIE){ decr=parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10); } item.img.css('max-height', mfp.wH-decr); }}, _onImageHasSize: function(item){ if(item.img){ item.hasSize=true; if(_imgInterval){ clearInterval(_imgInterval); } item.isCheckingImgSize=false; _mfpTrigger('ImageHasSize', item); if(item.imgHidden){ if(mfp.content) mfp.content.removeClass('mfp-loading'); item.imgHidden=false; }} }, findImageSize: function(item){ var counter=0, img=item.img[0], mfpSetInterval=function(delay){ if(_imgInterval){ clearInterval(_imgInterval); } _imgInterval=setInterval(function(){ if(img.naturalWidth > 0){ mfp._onImageHasSize(item); return; } if(counter > 200){ clearInterval(_imgInterval); } counter++; if(counter===3){ mfpSetInterval(10); }else if(counter===40){ mfpSetInterval(50); }else if(counter===100){ mfpSetInterval(500); }}, delay); }; mfpSetInterval(1); }, getImage: function(item, template){ var guard=0, onLoadComplete=function(){ if(item){ if(item.img[0].complete){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('ready'); } item.hasSize=true; item.loaded=true; _mfpTrigger('ImageLoadComplete'); }else{ guard++; if(guard < 200){ setTimeout(onLoadComplete,100); }else{ onLoadError(); }} }}, onLoadError=function(){ if(item){ item.img.off('.mfploader'); if(item===mfp.currItem){ mfp._onImageHasSize(item); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); } item.hasSize=true; item.loaded=true; item.loadError=true; }}, imgSt=mfp.st.image; var el=template.find('.mfp-img'); if(el.length){ var img=document.createElement('img'); img.className='mfp-img'; if(item.el&&item.el.find('img').length){ img.alt=item.el.find('img').attr('alt'); } item.img=$(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError); img.src=item.src; if(el.is('img')){ item.img=item.img.clone(); } img=item.img[0]; if(img.naturalWidth > 0){ item.hasSize=true; }else if(!img.width){ item.hasSize=false; }} mfp._parseMarkup(template, { title: _getTitle(item), img_replaceWith: item.img }, item); mfp.resizeImage(); if(item.hasSize){ if(_imgInterval) clearInterval(_imgInterval); if(item.loadError){ template.addClass('mfp-loading'); mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src)); }else{ template.removeClass('mfp-loading'); mfp.updateStatus('ready'); } return template; } mfp.updateStatus('loading'); item.loading=true; if(!item.hasSize){ item.imgHidden=true; template.addClass('mfp-loading'); mfp.findImageSize(item); } return template; }} }); var hasMozTransform, getHasMozTransform=function(){ if(hasMozTransform===undefined){ hasMozTransform=document.createElement('p').style.MozTransform!==undefined; } return hasMozTransform; }; $.magnificPopup.registerModule('zoom', { options: { enabled: false, easing: 'ease-in-out', duration: 300, opener: function(element){ return element.is('img') ? element:element.find('img'); }}, proto: { initZoom: function(){ var zoomSt=mfp.st.zoom, ns='.zoom', image; if(!zoomSt.enabled||!mfp.supportsTransition){ return; } var duration=zoomSt.duration, getElToAnimate=function(image){ var newImg=image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'), transition='all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing, cssObj={ position: 'fixed', zIndex: 9999, left: 0, top: 0, '-webkit-backface-visibility': 'hidden' }, t='transition'; cssObj['-webkit-'+t]=cssObj['-moz-'+t]=cssObj['-o-'+t]=cssObj[t]=transition; newImg.css(cssObj); return newImg; }, showMainContent=function(){ mfp.content.css('visibility', 'visible'); }, openTimeout, animatedImg; _mfpOn('BuildControls'+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.content.css('visibility', 'hidden'); image=mfp._getItemToZoom(); if(!image){ showMainContent(); return; } animatedImg=getElToAnimate(image); animatedImg.css(mfp._getOffset()); mfp.wrap.append(animatedImg); openTimeout=setTimeout(function(){ animatedImg.css(mfp._getOffset(true)); openTimeout=setTimeout(function(){ showMainContent(); setTimeout(function(){ animatedImg.remove(); image=animatedImg=null; _mfpTrigger('ZoomAnimationEnded'); }, 16); }, duration); }, 16); }}); _mfpOn(BEFORE_CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ clearTimeout(openTimeout); mfp.st.removalDelay=duration; if(!image){ image=mfp._getItemToZoom(); if(!image){ return; } animatedImg=getElToAnimate(image); } animatedImg.css(mfp._getOffset(true)); mfp.wrap.append(animatedImg); mfp.content.css('visibility', 'hidden'); setTimeout(function(){ animatedImg.css(mfp._getOffset()); }, 16); }}); _mfpOn(CLOSE_EVENT+ns, function(){ if(mfp._allowZoom()){ showMainContent(); if(animatedImg){ animatedImg.remove(); } image=null; }}); }, _allowZoom: function(){ return mfp.currItem.type==='image'; }, _getItemToZoom: function(){ if(mfp.currItem.hasSize){ return mfp.currItem.img; }else{ return false; }}, _getOffset: function(isLarge){ var el; if(isLarge){ el=mfp.currItem.img; }else{ el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem); } var offset=el.offset(); var paddingTop=parseInt(el.css('padding-top'),10); var paddingBottom=parseInt(el.css('padding-bottom'),10); offset.top -=($(window).scrollTop() - paddingTop); var obj={ width: el.width(), height: (_isJQ ? el.innerHeight():el[0].offsetHeight) - paddingBottom - paddingTop }; if(getHasMozTransform()){ obj['-moz-transform']=obj['transform']='translate(' + offset.left + 'px,' + offset.top + 'px)'; }else{ obj.left=offset.left; obj.top=offset.top; } return obj; }} }); var IFRAME_NS='iframe', _emptyPage='//about:blank', _fixIframeBugs=function(isShowing){ if(mfp.currTemplate[IFRAME_NS]){ var el=mfp.currTemplate[IFRAME_NS].find('iframe'); if(el.length){ if(!isShowing){ el[0].src=_emptyPage; } if(mfp.isIE8){ el.css('display', isShowing ? 'block':'none'); }} }}; $.magnificPopup.registerModule(IFRAME_NS, { options: { markup: '
'+ '
'+ ''+ '
', srcAction: 'iframe_src', patterns: { youtube: { index: 'youtube.com', id: 'v=', src: '//www.youtube.com/embed/%id%?autoplay=1' }, youtube_compressed_url: { index: 'youtu.be/', id: '/', src: '//www.youtube.com/embed/%id%?autoplay=1' }, vimeo: { index: 'vimeo.com/', id: '/', src: '//player.vimeo.com/video/%id%?autoplay=1' }, gmaps: { index: '//maps.google.', src: '%id%&output=embed' }} }, proto: { initIframe: function(){ mfp.types.push(IFRAME_NS); _mfpOn('BeforeChange', function(e, prevType, newType){ if(prevType!==newType){ if(prevType===IFRAME_NS){ _fixIframeBugs(); }else if(newType===IFRAME_NS){ _fixIframeBugs(true); }} }); _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function(){ _fixIframeBugs(); }); }, getIframe: function(item, template){ var embedSrc=item.src; var iframeSt=mfp.st.iframe; $.each(iframeSt.patterns, function(){ if(embedSrc.indexOf(this.index) > -1){ if(this.id){ if(typeof this.id==='string'){ embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length); }else{ embedSrc=this.id.call(this, embedSrc); }} embedSrc=this.src.replace('%id%', embedSrc); return false; }}); var dataObj={}; if(iframeSt.srcAction){ dataObj[iframeSt.srcAction]=embedSrc; } mfp._parseMarkup(template, dataObj, item); mfp.updateStatus('ready'); return template; }} }); var _getLoopedId=function(index){ var numSlides=mfp.items.length; if(index > numSlides - 1){ return index - numSlides; }else if(index < 0){ return numSlides + index; } return index; }, _replaceCurrTotal=function(text, curr, total){ return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total); }; $.magnificPopup.registerModule('gallery', { options: { enabled: false, arrowMarkup: '', preload: [0,2], navigateByImgClick: true, arrows: true, tPrev: 'Previous (Left arrow key)', tNext: 'Next (Right arrow key)', tCounter: '%curr% of %total%' }, proto: { initGallery: function(){ var gSt=mfp.st.gallery, ns='.mfp-gallery', supportsFastClick=Boolean($.fn.mfpFastClick); mfp.direction=true; if(!gSt||!gSt.enabled) return false; _wrapClasses +=' mfp-gallery'; _mfpOn(OPEN_EVENT+ns, function(){ if(gSt.navigateByImgClick){ mfp.wrap.on('click'+ns, '.mfp-img', function(){ if(mfp.items.length > 1){ mfp.next(); return false; }}); } _document.on('keydown'+ns, function(e){ if(e.keyCode===37){ mfp.prev(); }else if(e.keyCode===39){ mfp.next(); }}); }); _mfpOn('UpdateStatus'+ns, function(e, data){ if(data.text){ data.text=_replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length); }}); _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item){ var l=mfp.items.length; values.counter=l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l):''; }); _mfpOn('BuildControls' + ns, function(){ if(mfp.items.length > 1&&gSt.arrows&&!mfp.arrowLeft){ var markup=gSt.arrowMarkup, arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left')).addClass(PREVENT_CLOSE_CLASS), arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right')).addClass(PREVENT_CLOSE_CLASS); var eName=supportsFastClick ? 'mfpFastClick':'click'; arrowLeft[eName](function(){ mfp.prev(); }); arrowRight[eName](function(){ mfp.next(); }); if(mfp.isIE7){ _getEl('b', arrowLeft[0], false, true); _getEl('a', arrowLeft[0], false, true); _getEl('b', arrowRight[0], false, true); _getEl('a', arrowRight[0], false, true); } mfp.container.append(arrowLeft.add(arrowRight)); }}); _mfpOn(CHANGE_EVENT+ns, function(){ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout); mfp._preloadTimeout=setTimeout(function(){ mfp.preloadNearbyImages(); mfp._preloadTimeout=null; }, 16); }); _mfpOn(CLOSE_EVENT+ns, function(){ _document.off(ns); mfp.wrap.off('click'+ns); if(mfp.arrowLeft&&supportsFastClick){ mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick(); } mfp.arrowRight=mfp.arrowLeft=null; }); }, next: function(){ mfp.direction=true; mfp.index=_getLoopedId(mfp.index + 1); mfp.updateItemHTML(); }, prev: function(){ mfp.direction=false; mfp.index=_getLoopedId(mfp.index - 1); mfp.updateItemHTML(); }, goTo: function(newIndex){ mfp.direction=(newIndex >=mfp.index); mfp.index=newIndex; mfp.updateItemHTML(); }, preloadNearbyImages: function(){ var p=mfp.st.gallery.preload, preloadBefore=Math.min(p[0], mfp.items.length), preloadAfter=Math.min(p[1], mfp.items.length), i; for(i=1; i <=(mfp.direction ? preloadAfter:preloadBefore); i++){ mfp._preloadItem(mfp.index+i); } for(i=1; i <=(mfp.direction ? preloadBefore:preloadAfter); i++){ mfp._preloadItem(mfp.index-i); }}, _preloadItem: function(index){ index=_getLoopedId(index); if(mfp.items[index].preloaded){ return; } var item=mfp.items[index]; if(!item.parsed){ item=mfp.parseEl(index); } _mfpTrigger('LazyLoad', item); if(item.type==='image'){ item.img=$('').on('load.mfploader', function(){ item.hasSize=true; }).on('error.mfploader', function(){ item.hasSize=true; item.loadError=true; _mfpTrigger('LazyLoadError', item); }).attr('src', item.src); } item.preloaded=true; }} }); /* Touch Support that might be implemented some day addSwipeGesture: function(){ var startX, moved, multipleTouches; return; var namespace='.mfp', addEventNames=function(pref, down, move, up, cancel){ mfp._tStart=pref + down + namespace; mfp._tMove=pref + move + namespace; mfp._tEnd=pref + up + namespace; mfp._tCancel=pref + cancel + namespace; }; if(window.navigator.msPointerEnabled){ addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel'); }else if('ontouchstart' in window){ addEventNames('touch', 'start', 'move', 'end', 'cancel'); }else{ return; } _window.on(mfp._tStart, function(e){ var oE=e.originalEvent; multipleTouches=moved=false; startX=oE.pageX||oE.changedTouches[0].pageX; }).on(mfp._tMove, function(e){ if(e.originalEvent.touches.length > 1){ multipleTouches=e.originalEvent.touches.length; }else{ moved=true; }}).on(mfp._tEnd + ' ' + mfp._tCancel, function(e){ if(moved&&!multipleTouches){ var oE=e.originalEvent, diff=startX - (oE.pageX||oE.changedTouches[0].pageX); if(diff > 20){ mfp.next(); }else if(diff < -20){ mfp.prev(); }} }); }, */ var RETINA_NS='retina'; $.magnificPopup.registerModule(RETINA_NS, { options: { replaceSrc: function(item){ return item.src.replace(/\.\w+$/, function(m){ return '@2x' + m; }); }, ratio: 1 }, proto: { initRetina: function(){ if(window.devicePixelRatio > 1){ var st=mfp.st.retina, ratio=st.ratio; ratio = !isNaN(ratio) ? ratio:ratio(); if(ratio > 1){ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item){ item.img.css({ 'max-width': item.img[0].naturalWidth / ratio, 'width': '100%' }); }); _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item){ item.src=st.replaceSrc(item, ratio); }); }} }} }); /** * FastClick event implementation. (removes 300ms delay on touch devices) * Based on https://developers.google.com/mobile/articles/fast_buttons * * You may use it outside the Magnific Popup by calling just: * * $('.your-el').mfpFastClick(function(){ * console.log('Clicked!'); * }); * * To unbind: * $('.your-el').destroyMfpFastClick(); * * * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound. * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick * */ (function(){ var ghostClickDelay=1000, supportsTouch='ontouchstart' in window, unbindTouchMove=function(){ _window.off('touchmove'+ns+' touchend'+ns); }, eName='mfpFastClick', ns='.'+eName; $.fn.mfpFastClick=function(callback){ return $(this).each(function(){ var elem=$(this), lock; if(supportsTouch){ var timeout, startX, startY, pointerMoved, point, numPointers; elem.on('touchstart' + ns, function(e){ pointerMoved=false; numPointers=1; point=e.originalEvent ? e.originalEvent.touches[0]:e.touches[0]; startX=point.clientX; startY=point.clientY; _window.on('touchmove'+ns, function(e){ point=e.originalEvent ? e.originalEvent.touches:e.touches; numPointers=point.length; point=point[0]; if(Math.abs(point.clientX - startX) > 10 || Math.abs(point.clientY - startY) > 10){ pointerMoved=true; unbindTouchMove(); }}).on('touchend'+ns, function(e){ unbindTouchMove(); if(pointerMoved||numPointers > 1){ return; } lock=true; e.preventDefault(); clearTimeout(timeout); timeout=setTimeout(function(){ lock=false; }, ghostClickDelay); callback(); }); }); } elem.on('click' + ns, function(){ if(!lock){ callback(); }}); }); }; $.fn.destroyMfpFastClick=function(){ $(this).off('touchstart' + ns + ' click' + ns); if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns); };})(); _checkInstance(); })); (function(g,q,f){function p(a,b){this.wrapper="string"==typeof a?q.querySelector(a):a;this.scroller=this.wrapper.children[0];this.scrollerStyle=this.scroller.style;this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!d.hasPointer,disableTouch:d.hasPointer||!d.hasTouch,disableMouse:d.hasPointer||d.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/}, HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:"undefined"===typeof g.onmousedown};for(var c in b)this.options[c]=b[c];this.translateZ=this.options.HWCompositing&&d.hasPerspective?" translateZ(0)":"";this.options.useTransition=d.hasTransition&&this.options.useTransition;this.options.useTransform=d.hasTransform&&this.options.useTransform;this.options.eventPassthrough=!0===this.options.eventPassthrough?"vertical":this.options.eventPassthrough;this.options.preventDefault=!this.options.eventPassthrough&& this.options.preventDefault;this.options.scrollY="vertical"==this.options.eventPassthrough?!1:this.options.scrollY;this.options.scrollX="horizontal"==this.options.eventPassthrough?!1:this.options.scrollX;this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough;this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold;this.options.bounceEasing="string"==typeof this.options.bounceEasing?d.ease[this.options.bounceEasing]||d.ease.circular: this.options.bounceEasing;this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling;!0===this.options.tap&&(this.options.tap="tap");this.options.useTransition||this.options.useTransform||/relative|absolute/i.test(this.scrollerStyle.position)||(this.scrollerStyle.position="relative");"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1);this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1;this.directionY=this.directionX=this.y= this.x=0;this._events={};this._init();this.refresh();this.scrollTo(this.options.startX,this.options.startY);this.enable()}function u(a,b,c){var e=q.createElement("div"),d=q.createElement("div");!0===c&&(e.style.cssText="position:absolute;z-index:9999",d.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px");d.className="iScrollIndicator";"h"==a?(!0===c&&(e.style.cssText+= ";height:7px;left:2px;right:2px;bottom:0",d.style.height="100%"),e.className="iScrollHorizontalScrollbar"):(!0===c&&(e.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",d.style.width="100%"),e.className="iScrollVerticalScrollbar");e.style.cssText+=";overflow:hidden";b||(e.style.pointerEvents="none");e.appendChild(d);return e}function v(a,b){this.wrapper="string"==typeof b.el?q.querySelector(b.el):b.el;this.wrapperStyle=this.wrapper.style;this.indicator=this.wrapper.children[0];this.indicatorStyle= this.indicator.style;this.scroller=a;this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0};for(var c in b)this.options[c]=b[c];this.sizeRatioY=this.sizeRatioX=1;this.maxPosY=this.maxPosX=0;this.options.interactive&&(this.options.disableTouch||(d.addEvent(this.indicator,"touchstart",this),d.addEvent(g,"touchend",this)),this.options.disablePointer||(d.addEvent(this.indicator,d.prefixPointerEvent("pointerdown"),this),d.addEvent(g, d.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(d.addEvent(this.indicator,"mousedown",this),d.addEvent(g,"mouseup",this)));if(this.options.fade){this.wrapperStyle[d.style.transform]=this.scroller.translateZ;var e=d.style.transitionDuration;if(e){this.wrapperStyle[e]=d.isBadAndroid?"0.0001ms":"0ms";var f=this;d.isBadAndroid&&t(function(){"0.0001ms"===f.wrapperStyle[e]&&(f.wrapperStyle[e]="0s")});this.wrapperStyle.opacity="0"}}}var t=g.requestAnimationFrame||g.webkitRequestAnimationFrame|| g.mozRequestAnimationFrame||g.oRequestAnimationFrame||g.msRequestAnimationFrame||function(a){g.setTimeout(a,1E3/60)},d=function(){function a(a){return!1===e?!1:""===e?a:e+a.charAt(0).toUpperCase()+a.substr(1)}var b={},c=q.createElement("div").style,e=function(){for(var a=["t","webkitT","MozT","msT","OT"],b,e=0,d=a.length;eb?-1:1);k=c/k;gparseFloat(a[1]):!0:!1}();b.extend(b.style={},{transform:d,transitionTimingFunction:a("transitionTimingFunction"),transitionDuration:a("transitionDuration"), transitionDelay:a("transitionDelay"),transformOrigin:a("transformOrigin")});b.hasClass=function(a,b){return(new RegExp("(^|\\s)"+b+"(\\s|$)")).test(a.className)};b.addClass=function(a,c){if(!b.hasClass(a,c)){var e=a.className.split(" ");e.push(c);a.className=e.join(" ")}};b.removeClass=function(a,c){b.hasClass(a,c)&&(a.className=a.className.replace(new RegExp("(^|\\s)"+c+"(\\s|$)","g")," "))};b.offset=function(a){for(var b=-a.offsetLeft,c=-a.offsetTop;a=a.offsetParent;)b-=a.offsetLeft,c-=a.offsetTop; return{left:b,top:c}};b.preventDefaultException=function(a,b){for(var c in b)if(b[c].test(a[c]))return!0;return!1};b.extend(b.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3});b.extend(b.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(a){return a*(2-a)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(a){return f.sqrt(1- --a*a)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)", fn:function(a){return--a*a*(5*a+4)+1}},bounce:{style:"",fn:function(a){return(a/=1)<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}},elastic:{style:"",fn:function(a){return 0===a?0:1==a?1:.4*f.pow(2,-10*a)*f.sin(2*(a-.055)*f.PI/.22)+1}}});b.tap=function(a,b){var c=q.createEvent("Event");c.initEvent(b,!0,!0);c.pageX=a.pageX;c.pageY=a.pageY;a.target.dispatchEvent(c)};b.click=function(a){var b=a.target,c;/(SELECT|INPUT|TEXTAREA)/i.test(b.tagName)|| (c=q.createEvent(g.MouseEvent?"MouseEvents":"Event"),c.initEvent("click",!0,!0),c.view=a.view||g,c.detail=1,c.screenX=b.screenX||0,c.screenY=b.screenY||0,c.clientX=b.clientX||0,c.clientY=b.clientY||0,c.ctrlKey=!!a.ctrlKey,c.altKey=!!a.altKey,c.shiftKey=!!a.shiftKey,c.metaKey=!!a.metaKey,c.button=0,c.relatedTarget=null,c._constructed=!0,b.dispatchEvent(c))};return b}();p.prototype={version:"5.2.0",_init:function(){this._initEvents();(this.options.scrollbars||this.options.indicators)&&this._initIndicators(); this.options.mouseWheel&&this._initWheel();this.options.snap&&this._initSnap();this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0);clearTimeout(this.resizeTimeout);this.resizeTimeout=null;this._execEvent("destroy")},_transitionEnd:function(a){a.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(a){if(!(1!=d.eventType[a.type]&&0!==(a.which? a.button:2>a.button?0:4==a.button?1:2)||!this.enabled||this.initiated&&d.eventType[a.type]!==this.initiated)){!this.options.preventDefault||d.isBadAndroid||d.preventDefaultException(a.target,this.options.preventDefaultException)||a.preventDefault();var b=a.touches?a.touches[0]:a;this.initiated=d.eventType[a.type];this.moved=!1;this.directionLocked=this.directionY=this.directionX=this.distY=this.distX=0;this.startTime=d.getTime();this.options.useTransition&&this.isInTransition?(this._transitionTime(), this.isInTransition=!1,a=this.getComputedPosition(),this._translate(f.round(a.x),f.round(a.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd"));this.startX=this.x;this.startY=this.y;this.absStartX=this.x;this.absStartY=this.y;this.pointX=b.pageX;this.pointY=b.pageY;this._execEvent("beforeScrollStart")}},_move:function(a){if(this.enabled&&d.eventType[a.type]===this.initiated){this.options.preventDefault&&a.preventDefault(); var b=a.touches?a.touches[0]:a,c=b.pageX-this.pointX,e=b.pageY-this.pointY,k=d.getTime(),h;this.pointX=b.pageX;this.pointY=b.pageY;this.distX+=c;this.distY+=e;b=f.abs(this.distX);h=f.abs(this.distY);if(!(300b&&10>h)){this.directionLocked||this.options.freeScroll||(this.directionLocked=b>h+this.options.directionLockThreshold?"h":h>=b+this.options.directionLockThreshold?"v":"n");if("h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)a.preventDefault();else if("horizontal"==this.options.eventPassthrough){this.initiated=!1;return}e=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)a.preventDefault();else if("vertical"==this.options.eventPassthrough){this.initiated=!1;return}c=0}c=this.hasHorizontalScroll?c:0;e=this.hasVerticalScroll?e:0;a=this.x+c;b=this.y+e;if(0c?1:0;this.directionY=0e?1:0;this.moved||this._execEvent("scrollStart");this.moved=!0;this._translate(a,b);300c&&100>h&&100>g)this._execEvent("flick");else if(this.options.momentum&&300>c&&(b=this.hasHorizontalScroll?d.momentum(this.x,this.startX,c,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:e,duration:0},c=this.hasVerticalScroll?d.momentum(this.y,this.startY, c,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:k,duration:0},e=b.destination,k=c.destination,b=f.max(b.duration,c.duration),this.isInTransition=1),this.options.snap&&(this.currentPage=l=this._nearestSnap(e,k),b=this.options.snapSpeed||f.max(f.max(f.min(f.abs(e-l.x),1E3),f.min(f.abs(k-l.y),1E3)),300),e=l.x,k=l.y,this.directionY=this.directionX=0,l=this.options.bounceEasing),e!=this.x||k!=this.y){if(0this.maxScrollX;this.hasVerticalScroll=this.options.scrollY&&0>this.maxScrollY;this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth);this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight);this.directionY=this.directionX=this.endTime=0;this.wrapperOffset=d.offset(this.wrapper);this._execEvent("refresh");this.resetPosition()},on:function(a,b){this._events[a]||(this._events[a]=[]);this._events[a].push(b)}, off:function(a,b){if(this._events[a]){var c=this._events[a].indexOf(b);-1b&&c++,0a&&e++,this.goToPage(c,e)):(c=this.x+f.round(this.hasHorizontalScroll?b:0),e=this.y+f.round(this.hasVerticalScroll?a:0),this.directionX=0b?1:0,this.directionY=0a?1:0,0-this.scrollerWidth;){this.pages[a]=[];for(l=b=0;l>-this.scrollerHeight;)this.pages[a][b]={x:f.max(n,this.maxScrollX),y:f.max(l, this.maxScrollY),width:e,height:m,cx:n-d,cy:l-g},l-=m,b++;n-=e;a++}else for(m=this.options.snap,b=m.length,e=-1;athis.maxScrollX&&c++}this.goToPage(this.currentPage.pageX|| 0,this.currentPage.pageY||0,0);0===this.options.snapThreshold%1?this.snapThresholdY=this.snapThresholdX=this.options.snapThreshold:(this.snapThresholdX=f.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=f.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}});this.on("flick",function(){var a=this.options.snapSpeed||f.max(f.max(f.min(f.abs(this.x-this.startX),1E3),f.min(f.abs(this.y- this.startY),1E3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,a)})},_nearestSnap:function(a,b){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var c=0,e=this.pages.length,d=0;if(f.abs(a-this.absStartX)=this.pages[c][0].cx){a=this.pages[c][0].x; break}for(e=this.pages[c].length;d=this.pages[0][d].cy){b=this.pages[0][d].y;break}c==this.currentPage.pageX&&(c+=this.directionX,0>c?c=0:c>=this.pages.length&&(c=this.pages.length-1),a=this.pages[c][0].x);d==this.currentPage.pageY&&(d+=this.directionY,0>d?d=0:d>=this.pages[0].length&&(d=this.pages[0].length-1),b=this.pages[0][d].y);return{x:a,y:b,pageX:c,pageY:d}},goToPage:function(a,b,c,d){d=d||this.options.bounceEasing;a>=this.pages.length?a=this.pages.length-1:0>a&&(a=0);b>=this.pages[a].length? b=this.pages[a].length-1:0>b&&(b=0);var g=this.pages[a][b].x,h=this.pages[a][b].y;c=void 0===c?this.options.snapSpeed||f.max(f.max(f.min(f.abs(g-this.x),1E3),f.min(f.abs(h-this.y),1E3)),300):c;this.currentPage={x:g,y:h,pageX:a,pageY:b};this.scrollTo(g,h,c,d)},next:function(a,b){var c=this.currentPage.pageX,d=this.currentPage.pageY;c++;c>=this.pages.length&&this.hasVerticalScroll&&(c=0,d++);this.goToPage(c,d,a,b)},prev:function(a,b){var c=this.currentPage.pageX,d=this.currentPage.pageY;c--;0>c&&this.hasVerticalScroll&& (c=0,d--);this.goToPage(c,d,a,b)},_initKeys:function(a){a={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};var b;if("object"==typeof this.options.keyBindings)for(b in this.options.keyBindings)"string"==typeof this.options.keyBindings[b]&&(this.options.keyBindings[b]=this.options.keyBindings[b].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(b in a)this.options.keyBindings[b]=this.options.keyBindings[b]||a[b];d.addEvent(g,"keydown",this);this.on("destroy",function(){d.removeEvent(g, "keydown",this)})},_key:function(a){if(this.enabled){var b=this.options.snap,c=b?this.currentPage.pageX:this.x,e=b?this.currentPage.pageY:this.y,g=d.getTime(),h=this.keyTime||0,n;this.options.useTransition&&this.isInTransition&&(n=this.getComputedPosition(),this._translate(f.round(n.x),f.round(n.y)),this.isInTransition=!1);this.keyAcceleration=200>g-h?f.min(this.keyAcceleration+.25,50):0;switch(a.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?c+=b? 1:this.wrapperWidth:e+=b?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?c-=b?1:this.wrapperWidth:e-=b?1:this.wrapperHeight;break;case this.options.keyBindings.end:c=b?this.pages.length-1:this.maxScrollX;e=b?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:e=c=0;break;case this.options.keyBindings.left:c+=b?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:e+=b?1:5+this.keyAcceleration>> 0;break;case this.options.keyBindings.right:c-=b?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:e-=b?1:5+this.keyAcceleration>>0;break;default:return}b?this.goToPage(c,e):(0=q?(g.isAnimating=!1,g._translate(a, b),g.resetPosition(g.options.bounceTime)||g._execEvent("scrollEnd")):(r=(r-m)/c,p=e(r),r=(a-n)*p+n,p=(b-l)*p+l,g._translate(r,p),g.isAnimating&&t(f))}var g=this,n=this.x,l=this.y,m=d.getTime(),q=m+c;this.isAnimating=!0;f()},handleEvent:function(a){switch(a.type){case "touchstart":case "pointerdown":case "MSPointerDown":case "mousedown":this._start(a);break;case "touchmove":case "pointermove":case "MSPointerMove":case "mousemove":this._move(a);break;case "touchend":case "pointerup":case "MSPointerUp":case "mouseup":case "touchcancel":case "pointercancel":case "MSPointerCancel":case "mousecancel":this._end(a); break;case "orientationchange":case "resize":this._resize();break;case "transitionend":case "webkitTransitionEnd":case "oTransitionEnd":case "MSTransitionEnd":this._transitionEnd(a);break;case "wheel":case "DOMMouseScroll":case "mousewheel":this._wheel(a);break;case "keydown":this._key(a);break;case "click":this.enabled&&!a._constructed&&(a.preventDefault(),a.stopPropagation())}}};v.prototype={handleEvent:function(a){switch(a.type){case "touchstart":case "pointerdown":case "MSPointerDown":case "mousedown":this._start(a); break;case "touchmove":case "pointermove":case "MSPointerMove":case "mousemove":this._move(a);break;case "touchend":case "pointerup":case "MSPointerUp":case "mouseup":case "touchcancel":case "pointercancel":case "MSPointerCancel":case "mousecancel":this._end(a)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null);this.options.interactive&&(d.removeEvent(this.indicator,"touchstart",this),d.removeEvent(this.indicator,d.prefixPointerEvent("pointerdown"), this),d.removeEvent(this.indicator,"mousedown",this),d.removeEvent(g,"touchmove",this),d.removeEvent(g,d.prefixPointerEvent("pointermove"),this),d.removeEvent(g,"mousemove",this),d.removeEvent(g,"touchend",this),d.removeEvent(g,d.prefixPointerEvent("pointerup"),this),d.removeEvent(g,"mouseup",this));this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(a){var b=a.touches?a.touches[0]:a;a.preventDefault();a.stopPropagation();this.transitionTime();this.initiated= !0;this.moved=!1;this.lastPointX=b.pageX;this.lastPointY=b.pageY;this.startTime=d.getTime();this.options.disableTouch||d.addEvent(g,"touchmove",this);this.options.disablePointer||d.addEvent(g,d.prefixPointerEvent("pointermove"),this);this.options.disableMouse||d.addEvent(g,"mousemove",this);this.scroller._execEvent("beforeScrollStart")},_move:function(a){var b=a.touches?a.touches[0]:a,c,e;d.getTime();this.moved||this.scroller._execEvent("scrollStart");this.moved=!0;c=b.pageX-this.lastPointX;this.lastPointX= b.pageX;e=b.pageY-this.lastPointY;this.lastPointY=b.pageY;this._pos(this.x+c,this.y+e);a.preventDefault();a.stopPropagation()},_end:function(a){if(this.initiated){this.initiated=!1;a.preventDefault();a.stopPropagation();d.removeEvent(g,"touchmove",this);d.removeEvent(g,d.prefixPointerEvent("pointermove"),this);d.removeEvent(g,"mousemove",this);if(this.scroller.options.snap){a=this.scroller._nearestSnap(this.scroller.x,this.scroller.y);var b=this.options.snapSpeed||f.max(f.max(f.min(f.abs(this.scroller.x- a.x),1E3),f.min(f.abs(this.scroller.y-a.y),1E3)),300);if(this.scroller.x!=a.x||this.scroller.y!=a.y)this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=a,this.scroller.scrollTo(a.x,a.y,b,this.scroller.options.bounceEasing)}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(a){a=a||0;var b=d.style.transitionDuration;if(b&&(this.indicatorStyle[b]=a+"ms",!a&&d.isBadAndroid)){this.indicatorStyle[b]="0.0001ms";var c=this;t(function(){"0.0001ms"===c.indicatorStyle[b]&& (c.indicatorStyle[b]="0s")})}},transitionTimingFunction:function(a){this.indicatorStyle[d.style.transitionTimingFunction]=a},refresh:function(){this.transitionTime();this.indicatorStyle.display=this.options.listenX&&!this.options.listenY?this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.scroller.hasVerticalScroll?"block":"none":this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none";this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll? (d.addClass(this.wrapper,"iScrollBothScrollbars"),d.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(d.removeClass(this.wrapper,"iScrollBothScrollbars"),d.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.options.listenX&& (this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=f.max(f.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=-this.indicatorWidth+8,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX), this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX);this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=f.max(f.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink? (this.minBoundaryY=-this.indicatorHeight+8,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY);this.updatePosition()},updatePosition:function(){var a=this.options.listenX&&f.round(this.sizeRatioX*this.scroller.x)||0,b=this.options.listenY&&f.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries|| (athis.maxBoundaryX?"scale"==this.options.shrink?(this.width=f.max(this.indicatorWidth-(a-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",a=this.maxPosX+this.indicatorWidth-this.width):a=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+ "px"),bthis.maxBoundaryY?"scale"==this.options.shrink?(this.height=f.max(this.indicatorHeight-3*(b-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",b=this.maxPosY+this.indicatorHeight-this.height):b=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height= this.height+"px"));this.x=a;this.y=b;this.scroller.options.useTransform?this.indicatorStyle[d.style.transform]="translate("+a+"px,"+b+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=a+"px",this.indicatorStyle.top=b+"px")},_pos:function(a,b){0>a?a=0:a>this.maxPosX&&(a=this.maxPosX);0>b?b=0:b>this.maxPosY&&(b=this.maxPosY);a=this.options.listenX?f.round(a/this.sizeRatioX):this.scroller.x;b=this.options.listenY?f.round(b/this.sizeRatioY):this.scroller.y;this.scroller.scrollTo(a,b)},fade:function(a, b){if(!b||this.visible){clearTimeout(this.fadeTimeout);this.fadeTimeout=null;var c=a?0:300;this.wrapperStyle[d.style.transitionDuration]=(a?250:500)+"ms";this.fadeTimeout=setTimeout(function(a){this.wrapperStyle.opacity=a;this.visible=+a}.bind(this,a?"1":"0"),c)}}};p.utils=d;"undefined"!=typeof module&&module.exports?module.exports=p:"function"==typeof define&&define.amd?define(function(){return p}):g.IScroll=p})(window,document,Math); (function(global, factory){ 'use strict'; if(typeof define==='function'&&define.amd){ define(['jquery'], function($){ return factory($, global, global.document, global.Math); }); }else if(typeof exports!=='undefined'){ module.exports=factory(require('jquery'), global, global.document, global.Math); }else{ factory(jQuery, global, global.document, global.Math); }})(typeof window!=='undefined' ? window:this, function($, window, document, Math, undefined){ 'use strict'; var WRAPPER='fullpage-wrapper'; var WRAPPER_SEL='.' + WRAPPER; var SCROLLABLE='fp-scrollable'; var SCROLLABLE_SEL='.' + SCROLLABLE; var RESPONSIVE='fp-responsive'; var NO_TRANSITION='fp-notransition'; var DESTROYED='fp-destroyed'; var ENABLED='fp-enabled'; var VIEWING_PREFIX='fp-viewing'; var ACTIVE='active'; var ACTIVE_SEL='.' + ACTIVE; var COMPLETELY='fp-completely'; var COMPLETELY_SEL='.' + COMPLETELY; var SECTION_DEFAULT_SEL='.section'; var SECTION='fp-section'; var SECTION_SEL='.' + SECTION; var SECTION_ACTIVE_SEL=SECTION_SEL + ACTIVE_SEL; var SECTION_FIRST_SEL=SECTION_SEL + ':first'; var SECTION_LAST_SEL=SECTION_SEL + ':last'; var TABLE_CELL='fp-tableCell'; var TABLE_CELL_SEL='.' + TABLE_CELL; var AUTO_HEIGHT='fp-auto-height'; var AUTO_HEIGHT_SEL='.fp-auto-height'; var NORMAL_SCROLL='fp-normal-scroll'; var NORMAL_SCROLL_SEL='.fp-normal-scroll'; var SECTION_NAV='fp-nav'; var SECTION_NAV_SEL='#' + SECTION_NAV; var SECTION_NAV_TOOLTIP='fp-tooltip'; var SECTION_NAV_TOOLTIP_SEL='.'+SECTION_NAV_TOOLTIP; var SHOW_ACTIVE_TOOLTIP='fp-show-active'; var SLIDE_DEFAULT_SEL='.slide'; var SLIDE='fp-slide'; var SLIDE_SEL='.' + SLIDE; var SLIDE_ACTIVE_SEL=SLIDE_SEL + ACTIVE_SEL; var SLIDES_WRAPPER='fp-slides'; var SLIDES_WRAPPER_SEL='.' + SLIDES_WRAPPER; var SLIDES_CONTAINER='fp-slidesContainer'; var SLIDES_CONTAINER_SEL='.' + SLIDES_CONTAINER; var TABLE='fp-table'; var SLIDES_NAV='fp-slidesNav'; var SLIDES_NAV_SEL='.' + SLIDES_NAV; var SLIDES_NAV_LINK_SEL=SLIDES_NAV_SEL + ' a'; var SLIDES_ARROW='fp-controlArrow'; var SLIDES_ARROW_SEL='.' + SLIDES_ARROW; var SLIDES_PREV='fp-prev'; var SLIDES_PREV_SEL='.' + SLIDES_PREV; var SLIDES_ARROW_PREV=SLIDES_ARROW + ' ' + SLIDES_PREV; var SLIDES_ARROW_PREV_SEL=SLIDES_ARROW_SEL + SLIDES_PREV_SEL; var SLIDES_NEXT='fp-next'; var SLIDES_NEXT_SEL='.' + SLIDES_NEXT; var SLIDES_ARROW_NEXT=SLIDES_ARROW + ' ' + SLIDES_NEXT; var SLIDES_ARROW_NEXT_SEL=SLIDES_ARROW_SEL + SLIDES_NEXT_SEL; var HASHCHANGE=false; var HASHCHANGETIMEOUT; var $window=$(window); var $document=$(document); if('ontouchstart' in document.documentElement){ var iscrollOptions={ scrollbars: true, mouseWheel: true, hideScrollbars: false, disableMouse: true, useTransition: true, interactiveScrollbars: true, click: true };}else{ var iscrollOptions={ scrollbars: true, mouseWheel: true, hideScrollbars: false, disableMouse: true, useTransition: true, interactiveScrollbars: true, click: false };} $.fn.fullpage=function(options){ if($('html').hasClass(ENABLED)){ displayWarnings(); return; } var $htmlBody=$('html, body'); var $body=$('body'); var FP=$.fn.fullpage; options=$.extend({ menu: false, anchors:[], lockAnchors: false, navigation: false, navigationPosition: 'right', navigationTooltips: [], showActiveTooltip: false, slidesNavigation: false, slidesNavPosition: 'bottom', scrollBar: false, hybrid: false, css3: true, scrollingSpeed: 700, autoScrolling: true, fitToSection: true, fitToSectionDelay: 1000, easing: 'easeInOutCubic', easingcss3: 'ease', loopBottom: false, loopTop: false, loopHorizontal: true, continuousVertical: false, normalScrollElements: null, scrollOverflow: false, scrollOverflowHandler: iscrollHandler, scrollOverflowOptions: null, touchSensitivity: 5, normalScrollElementTouchThreshold: 5, keyboardScrolling: true, animateAnchor: true, recordHistory: true, controlArrows: true, controlArrowColor: '#fff', verticalCentered: true, sectionsColor:[], paddingTop: 0, paddingBottom: 0, fixedElements: null, responsive: 0, responsiveWidth: 0, responsiveHeight: 0, sectionSelector: SECTION_DEFAULT_SEL, slideSelector: SLIDE_DEFAULT_SEL, afterLoad: null, onLeave: null, afterRender: null, afterResize: null, afterReBuild: null, afterSlideLoad: null, onSlideLeave: null }, options); displayWarnings(); iscrollOptions=$.extend(iscrollOptions, options.scrollOverflowOptions); $.extend($.easing,{ easeInOutCubic: function (x, t, b, c, d){if((t/=d/2) < 1) return c/2*t*t*t + b;return c/2*((t-=2)*t*t + 2) + b;}}); FP.setAutoScrolling=function(value, type){ setVariableState('autoScrolling', value, type); var element=$(SECTION_ACTIVE_SEL); if(options.autoScrolling&&!options.scrollBar){ $htmlBody.css({ 'overflow':'hidden', 'height':'100%' }); FP.setRecordHistory(originals.recordHistory, 'internal'); container.css({ '-ms-touch-action': 'none', 'touch-action': 'none' }); if(element.length){ silentScroll(element.position().top); }}else{ $htmlBody.css({ 'overflow':'visible', 'height':'initial' }); FP.setRecordHistory(false, 'internal'); container.css({ '-ms-touch-action': '', 'touch-action': '' }); silentScroll(0); if(element.length){ $htmlBody.scrollTop(element.position().top); }} }; FP.setRecordHistory=function(value, type){ setVariableState('recordHistory', value, type); }; FP.setScrollingSpeed=function(value, type){ setVariableState('scrollingSpeed', value, type); }; FP.setFitToSection=function(value, type){ setVariableState('fitToSection', value, type); }; FP.setLockAnchors=function(value){ options.lockAnchors=value; }; FP.setMouseWheelScrolling=function (value){ if(value){ addMouseWheelHandler(); addMiddleWheelHandler(); }else{ removeMouseWheelHandler(); removeMiddleWheelHandler(); }}; FP.setAllowScrolling=function (value, directions){ if(typeof directions!=='undefined'){ directions=directions.replace(/ /g,'').split(','); $.each(directions, function (index, direction){ setIsScrollAllowed(value, direction, 'm'); }); } else if(value){ FP.setMouseWheelScrolling(true); addTouchHandler(); }else{ FP.setMouseWheelScrolling(false); removeTouchHandler(); }}; FP.setKeyboardScrolling=function (value, directions){ if(typeof directions!=='undefined'){ directions=directions.replace(/ /g,'').split(','); $.each(directions, function (index, direction){ setIsScrollAllowed(value, direction, 'k'); }); }else{ options.keyboardScrolling=value; }}; FP.moveSectionUp=function(){ if(canScroll==false) return false; var prev=$(SECTION_ACTIVE_SEL).prev(SECTION_SEL); if(!prev.length&&(options.loopTop||options.continuousVertical)){ prev=$(SECTION_SEL).last(); } if(prev.length){ scrollPage(prev, null, true); }}; FP.moveSectionDown=function (){ if(canScroll==false) return false; var next=$(SECTION_ACTIVE_SEL).next(SECTION_SEL); if(!next.length && (options.loopBottom||options.continuousVertical)){ next=$(SECTION_SEL).first(); } if(next.length){ scrollPage(next, null, false); }}; FP.silentMoveTo=function(sectionAnchor, slideAnchor){ FP.setScrollingSpeed (0, 'internal'); FP.moveTo(sectionAnchor, slideAnchor); FP.setScrollingSpeed (originals.scrollingSpeed, 'internal'); }; FP.moveTo=function (sectionAnchor, slideAnchor){ var destiny=getSectionByAnchor(sectionAnchor); if(typeof slideAnchor!=='undefined'){ scrollPageAndSlide(sectionAnchor, slideAnchor); }else if(destiny.length > 0){ scrollPage(destiny); }}; FP.moveSlideRight=function(section){ moveSlide('next', section); }; FP.moveSlideLeft=function(section){ moveSlide('prev', section); }; FP.reBuild=function(resizing){ if(container.hasClass(DESTROYED)){ return; } isResizing=true; var $headerNavSpace=($('body[data-header-format="left-header"]').length > 0&&$(window).width() > 1000) ? 0:$('#header-outer').outerHeight(); var $adminBar=($('#wpadminbar').length > 0) ? $('#wpadminbar').height():0; var $headerHeight=($('#header-outer.transparent').length==0||($(window).width() < 1000&&$('#header-outer[data-permanent-transparent="true"]').length==0)) ? $headerNavSpace:0 ; var $borderMultiplier=($('.body-border-right').length > 0&&$('#header-outer').css('background-color')==$('.body-border-right').css('background-color')) ? 1:2; var $borderHeight=($('.body-border-right').length > 0&&$(window).width()>1000) ? $('.body-border-right').width()*$borderMultiplier:0; var windowsWidth=$window.outerWidth(); var $materialExtra=($('body.material .ocm-effect-wrap').length > 0) ? 2:0; windowsHeight=$window.height() - $adminBar - $headerHeight - $borderHeight + $materialExtra; $(SECTION_SEL).each(function(){ var slidesWrap=$(this).find(SLIDES_WRAPPER_SEL); var slides=$(this).find(SLIDE_SEL); if(options.verticalCentered){ $(this).find(TABLE_CELL_SEL).css('height', getTableHeight($(this)) + 'px'); } $(this).css('height', windowsHeight + 'px'); if(slides.length > 1){ landscapeScroll(slidesWrap, slidesWrap.find(SLIDE_ACTIVE_SEL)); }}); if($('#nectar_fullscreen_rows[data-animation="none"]').length==0){ $('#nectar_fullscreen_rows').css('height', windowsHeight + 'px'); } if($('#nectar_fullscreen_rows[data-content-overflow="hidden"]').length > 0){ $('#nectar_fullscreen_rows>.vc_row.vc_row-flex:not(#footer-outer)>.fp-tableCell>.full-page-inner-wrap-outer>.full-page-inner-wrap[data-content-pos="middle"] > .full-page-inner>.container>.span_12').css('height', windowsHeight + 'px'); $('#nectar_fullscreen_rows>.vc_row.vc_row-flex:not(#footer-outer)>.fp-tableCell>.full-page-inner-wrap-outer>.full-page-inner-wrap[data-content-pos="middle"]').css('overflow', 'hidden'); } var activeSection=$(SECTION_ACTIVE_SEL); var sectionIndex=activeSection.index(SECTION_SEL); if(sectionIndex){ FP.silentMoveTo(sectionIndex + 1); } isResizing=false; $.isFunction(options.afterResize)&&resizing&&options.afterResize.call(container); $.isFunction(options.afterReBuild)&&!resizing&&options.afterReBuild.call(container); }; FP.setResponsive=function (active){ var isResponsive=$body.hasClass(RESPONSIVE); if(active){ if(!isResponsive){ FP.setAutoScrolling(false, 'internal'); FP.setFitToSection(false, 'internal'); $(SECTION_NAV_SEL).hide(); $body.addClass(RESPONSIVE); }} else if(isResponsive){ FP.setAutoScrolling(originals.autoScrolling, 'internal'); FP.setFitToSection(originals.autoScrolling, 'internal'); $(SECTION_NAV_SEL).show(); $body.removeClass(RESPONSIVE); }}; var slideMoving=false; var isTouchDevice=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/); var isTouch=(('ontouchstart' in window)||(navigator.msMaxTouchPoints > 0)||(navigator.maxTouchPoints)); var container=$(this); var $headerNavSpace=($('body[data-header-format="left-header"]').length > 0&&$(window).width() > 1000) ? 0:$('#header-outer').outerHeight(); var $adminBar=($('#wpadminbar').length > 0) ? $('#wpadminbar').height():0; var $borderMultiplier=($('.body-border-right').length > 0&&$('#header-outer').css('background-color')==$('.body-border-right').css('background-color')) ? 1:2; var $borderHeight=($('.body-border-right').length > 0&&$(window).width()>1000) ? $('.body-border-right').width()*$borderMultiplier:0; var $headerHeight=($('#header-outer.transparent').length==0||($(window).width() < 1000&&$('#header-outer[data-permanent-transparent="true"]').length==0)) ? $headerNavSpace:0 ; var $materialExtra=($('body.material .ocm-effect-wrap').length > 0) ? 2:0; var windowsHeight=$window.height() - $adminBar - $headerHeight - $borderHeight + $materialExtra; var isResizing=false; var isWindowFocused=true; var lastScrolledDestiny; var lastScrolledSlide; var canScroll=true; var scrollings=[]; var nav; var controlPressed; var isScrollAllowed={}; isScrollAllowed.m={ 'up':true, 'down':true, 'left':true, 'right':true }; isScrollAllowed.k=$.extend(true,{}, isScrollAllowed.m); var originals=$.extend(true, {}, options); var resizeId; var afterSectionLoadsId; var afterSlideLoadsId; var scrollId; var scrollId2; var keydownId; if($(this).length){ init(); bindEvents(); } function init(){ if(options.css3){ options.css3=support3d(); } options.scrollBar=options.scrollBar||options.hybrid; setOptionsFromDOM(); prepareDom(); FP.setAllowScrolling(true); FP.setAutoScrolling(options.autoScrolling, 'internal'); var activeSlide=$(SECTION_ACTIVE_SEL).find(SLIDE_ACTIVE_SEL); if(activeSlide.length&&($(SECTION_ACTIVE_SEL).index(SECTION_SEL)!==0||($(SECTION_ACTIVE_SEL).index(SECTION_SEL)===0&&activeSlide.index()!==0))){ silentLandscapeScroll(activeSlide); } responsive(); setBodyClass(); if(document.readyState==='complete'){ scrollToAnchor(); } $window.on('load', scrollToAnchor); } function bindEvents(){ $window .on('scroll', scrollHandler) .on('hashchange', hashChangeHandler) .blur(blurHandler) .resize(resizeHandler) .smartresize(checkScrollOverflow); $document .keydown(keydownHandler) .keyup(keyUpHandler) .on('click touchstart', SECTION_NAV_SEL + ' a', sectionBulletHandler) .on('click touchstart', SLIDES_NAV_LINK_SEL, slideBulletHandler) .on('click', SECTION_NAV_TOOLTIP_SEL, tooltipTextHandler); $(SECTION_SEL).on('click touchstart', SLIDES_ARROW_SEL, slideArrowHandler); if(options.normalScrollElements){ $document.on('mouseenter', options.normalScrollElements, function (){ FP.setMouseWheelScrolling(false); }); $document.on('mouseleave', options.normalScrollElements, function(){ FP.setMouseWheelScrolling(true); }); }} function setOptionsFromDOM(){ var sections=container.find(options.sectionSelector); if(!options.anchors.length){ options.anchors=sections.filter('[data-anchor]').map(function(){ return $(this).data('anchor').toString(); }).get(); } if(!options.navigationTooltips.length){ options.navigationTooltips=sections.filter('[data-tooltip]').map(function(){ return $(this).data('tooltip').toString(); }).get(); }} function prepareDom(){ container.css({ 'height': '100%', 'position': 'relative' }); container.addClass(WRAPPER); $('html').addClass(ENABLED); var $headerNavSpace=($('body[data-header-format="left-header"]').length > 0&&$(window).width() > 1000) ? 0:$('#header-outer').outerHeight(); var $adminBar=($('#wpadminbar').length > 0) ? $('#wpadminbar').height():0; var $borderMultiplier=($('.body-border-right').length > 0&&$('#header-outer').css('background-color')==$('.body-border-right').css('background-color')) ? 1:2; var $borderHeight=($('.body-border-right').length > 0&&$(window).width()>1000) ? $('.body-border-right').width()*$borderMultiplier:0; var $headerHeight=($('#header-outer.transparent').length==0||($(window).width() < 1000&&$('#header-outer[data-permanent-transparent="true"]').length==0)) ? $headerNavSpace:0 ; var $materialExtra=($('body.material .ocm-effect-wrap').length > 0) ? 2:0; windowsHeight=$window.height() - $adminBar - $headerHeight - $borderHeight + $materialExtra; container.removeClass(DESTROYED); addInternalSelectors(); $(SECTION_SEL).each(function(index){ var section=$(this); var slides=section.find(SLIDE_SEL); var numSlides=slides.length; styleSection(section, index); styleMenu(section, index); if(numSlides > 0){ styleSlides(section, slides, numSlides); }else{ if(options.verticalCentered){ addTableClass(section); }} }); if(options.fixedElements&&options.css3){ $(options.fixedElements).appendTo($body); } if(options.navigation){ addVerticalNavigation(); } enableYoutubeAPI(); enableVidemoAPI(); if(options.scrollOverflow){ if(document.readyState==='complete'){ createSlimScrollingHandler(); } afterRenderActions(); $window.on('load', function(){ setTimeout(function(){ $(SECTION_SEL).each(function(){ var slides=$(this).find(SLIDE_SEL); if(slides.length){ slides.each(function(){ createSlimScrolling($(this)); }); }else{ createSlimScrolling($(this)); }}); },100); }); }else{ afterRenderActions(); }} function styleSlides(section, slides, numSlides){ var sliderWidth=numSlides * 100; var slideWidth=100 / numSlides; slides.wrapAll('
'); slides.parent().wrap('
'); section.find(SLIDES_CONTAINER_SEL).css('width', sliderWidth + '%'); if(numSlides > 1){ if(options.controlArrows){ createSlideArrows(section); } if(options.slidesNavigation){ addSlidesNavigation(section, numSlides); }} slides.each(function(index){ $(this).css('width', slideWidth + '%'); if(options.verticalCentered){ addTableClass($(this)); }}); var startingSlide=section.find(SLIDE_ACTIVE_SEL); if(startingSlide.length&&($(SECTION_ACTIVE_SEL).index(SECTION_SEL)!==0||($(SECTION_ACTIVE_SEL).index(SECTION_SEL)===0&&startingSlide.index()!==0))){ silentLandscapeScroll(startingSlide); }else{ slides.eq(0).addClass(ACTIVE); }} function styleSection(section, index){ if(!index&&$(SECTION_ACTIVE_SEL).length===0){ section.addClass(ACTIVE); } section.css('height', windowsHeight + 'px'); if($('#nectar_fullscreen_rows[data-animation="none"]').length==0){ $('#nectar_fullscreen_rows').css('height', windowsHeight + 'px'); } if($('#nectar_fullscreen_rows[data-content-overflow="hidden"]').length > 0) $('#nectar_fullscreen_rows>.vc_row.vc_row-flex:not(#footer-outer)>.fp-tableCell>.full-page-inner-wrap-outer>.full-page-inner-wrap[data-content-pos="middle"] > .full-page-inner>.container>.span_12').css('height', windowsHeight + 'px'); if(options.paddingTop){ section.css('padding-top', options.paddingTop); } if(options.paddingBottom){ section.css('padding-bottom', options.paddingBottom); } if(typeof options.sectionsColor[index]!=='undefined'){ section.css('background-color', options.sectionsColor[index]); } if(typeof options.anchors[index]!=='undefined'){ section.attr('data-anchor', options.anchors[index]); } $(window).load(function(){ $(window).trigger('resize'); }); } function styleMenu(section, index){ if(typeof options.anchors[index]!=='undefined'){ if(section.hasClass(ACTIVE)){ activateMenuAndNav(options.anchors[index], index); }} if(options.menu&&options.css3&&$(options.menu).closest(WRAPPER_SEL).length){ $(options.menu).appendTo($body); }} function addInternalSelectors(){ $(options.sectionSelector).each(function(){ $(this).addClass(SECTION); }); $(options.slideSelector).each(function(){ $(this).addClass(SLIDE); }); } function createSlideArrows(section){ section.find(SLIDES_WRAPPER_SEL).after('
'); if(options.controlArrowColor!='#fff'){ section.find(SLIDES_ARROW_NEXT_SEL).css('border-color', 'transparent transparent transparent '+options.controlArrowColor); section.find(SLIDES_ARROW_PREV_SEL).css('border-color', 'transparent '+ options.controlArrowColor + ' transparent transparent'); } if(!options.loopHorizontal){ section.find(SLIDES_ARROW_PREV_SEL).hide(); }} function addVerticalNavigation(){ if($('#nectar_fullscreen_rows').attr('data-dot-navigation')=='hidden') return; if($('#boxed').length > 0) $('#boxed').append('
    '); else $body.append('
      '); var nav=$(SECTION_NAV_SEL); nav.addClass(function(){ return options.showActiveTooltip ? SHOW_ACTIVE_TOOLTIP + ' ' + options.navigationPosition:options.navigationPosition; }); for (var i=0; i < $(SECTION_SEL).length; i++){ var link=''; if(options.anchors.length){ link=options.anchors[i]; } var li='
    • '; var tooltip=options.navigationTooltips[i]; if(typeof tooltip!=='undefined'&&tooltip!==''){ if(tooltip.length==1) li +='
      '; else li +='
      ' + tooltip + '
      '; } li +='
    • '; nav.find('ul').append(li); } $(SECTION_NAV_SEL).css('margin-top', '-' + (($(SECTION_NAV_SEL).height()/2) - $adminBar - $headerHeight/2) + 'px'); $(SECTION_NAV_SEL).find('li').eq($(SECTION_ACTIVE_SEL).index(SECTION_SEL)).find('a').addClass(ACTIVE); if($('#nectar_fullscreen_rows[data-footer="last_row"]').length > 0||$('#nectar_fullscreen_rows[data-footer="default"]').length > 0) nav.find('ul li:last-child').remove(); } function createSlimScrollingHandler(){ $(SECTION_SEL).each(function(){ var slides=$(this).find(SLIDE_SEL); if(slides.length){ slides.each(function(){ createSlimScrolling($(this)); }); }else{ createSlimScrolling($(this)); }}); afterRenderActions(); } function enableYoutubeAPI(){ container.find('iframe[src*="youtube.com/embed/"]').each(function(){ var sign=getUrlParamSign($(this).attr('src')); $(this).attr('src', $(this).attr('src') + sign + 'enablejsapi=1'); }); } function enableVidemoAPI(){ container.find('iframe[src*="player.vimeo.com/"]').each(function(){ var sign=getUrlParamSign($(this).attr('src')); $(this).attr('src', $(this).attr('src') + sign + 'api=1'); }); } function getUrlParamSign(url){ return(!/\?/.test(url)) ? '?':'&'; } function afterRenderActions(){ var section=$(SECTION_ACTIVE_SEL); section.addClass(COMPLETELY); if(options.scrollOverflowHandler.afterRender){ options.scrollOverflowHandler.afterRender(section); } lazyLoad(section); playMedia(section); $.isFunction(options.afterLoad)&&options.afterLoad.call(section, section.data('anchor'), (section.index(SECTION_SEL) + 1)); $.isFunction(options.afterRender)&&options.afterRender.call(container); } var isScrolling=false; var lastScroll=0; function scrollHandler(){ var currentSection; if(!options.autoScrolling||options.scrollBar){ var currentScroll=$window.scrollTop(); var scrollDirection=getScrollDirection(currentScroll); var visibleSectionIndex=0; var screen_mid=currentScroll + ($window.height() / 2.0); var sections=document.querySelectorAll(SECTION_SEL); for (var i=0; i < sections.length; ++i){ var section=sections[i]; if(section.offsetTop <=screen_mid){ visibleSectionIndex=i; }} if(isCompletelyInViewPort(scrollDirection)){ if(!$(SECTION_ACTIVE_SEL).hasClass(COMPLETELY)){ $(SECTION_ACTIVE_SEL).addClass(COMPLETELY).siblings().removeClass(COMPLETELY); }} currentSection=$(sections).eq(visibleSectionIndex); if(!currentSection.hasClass(ACTIVE)){ isScrolling=true; var leavingSection=$(SECTION_ACTIVE_SEL); var leavingSectionIndex=leavingSection.index(SECTION_SEL) + 1; var yMovement=getYmovement(currentSection); var anchorLink=currentSection.data('anchor'); var sectionIndex=currentSection.index(SECTION_SEL) + 1; var activeSlide=currentSection.find(SLIDE_ACTIVE_SEL); if(activeSlide.length){ var slideAnchorLink=activeSlide.data('anchor'); var slideIndex=activeSlide.index(); } if(canScroll){ currentSection.addClass(ACTIVE).siblings().removeClass(ACTIVE); $.isFunction(options.onLeave)&&options.onLeave.call(leavingSection, leavingSectionIndex, sectionIndex, yMovement); $.isFunction(options.afterLoad)&&options.afterLoad.call(currentSection, anchorLink, sectionIndex); lazyLoad(currentSection); activateMenuAndNav(anchorLink, sectionIndex - 1); if(options.anchors.length){ lastScrolledDestiny=anchorLink; setState(slideIndex, slideAnchorLink, anchorLink, sectionIndex); }} clearTimeout(scrollId); scrollId=setTimeout(function(){ isScrolling=false; }, 100); } if(options.fitToSection){ clearTimeout(scrollId2); scrollId2=setTimeout(function(){ if(canScroll&&options.fitToSection){ if($(SECTION_ACTIVE_SEL).is(currentSection)){ isResizing=true; } scrollPage($(SECTION_ACTIVE_SEL)); isResizing=false; }}, options.fitToSectionDelay); }} } function isCompletelyInViewPort(movement){ var top=$(SECTION_ACTIVE_SEL).position().top; var bottom=top + $window.height(); if(movement=='up'){ return bottom >=($window.scrollTop() + $window.height()); } return top <=$window.scrollTop(); } function getScrollDirection(currentScroll){ var direction=currentScroll > lastScroll ? 'down':'up'; lastScroll=currentScroll; return direction; } function scrolling(type, scrollable){ if(!isScrollAllowed.m[type]||$('#slide-out-widget-area.open[class*="fullscreen"]').length > 0){ return; } var check, scrollSection; if(type=='down'){ check='bottom'; scrollSection=FP.moveSectionDown; }else{ check='top'; scrollSection=FP.moveSectionUp; } if(scrollable.length > 0){ if(options.scrollOverflowHandler.isScrolled(check, scrollable)){ if($('#nectar_fullscreen_rows.nextSectionAllowed').length > 0){ scrollSection(); } setTimeout(function(){ $('#nectar_fullscreen_rows').addClass('nextSectionAllowed'); },150); }else{ return true; }}else{ scrollSection(); }} var touchStartY=0; var touchStartX=0; var touchEndY=0; var touchEndX=0; function touchMoveHandler(event){ var e=event.originalEvent; if(!checkParentForNormalScrollElement(event.target)&&isReallyTouch(e)){ if(options.autoScrolling){ event.preventDefault(); } var activeSection=$(SECTION_ACTIVE_SEL); var scrollable=options.scrollOverflowHandler.scrollable(activeSection); if(canScroll&&!slideMoving){ var touchEvents=getEventsPage(e); touchEndY=touchEvents.y; touchEndX=touchEvents.x; if(activeSection.find(SLIDES_WRAPPER_SEL).length&&Math.abs(touchStartX - touchEndX) > (Math.abs(touchStartY - touchEndY))){ if(Math.abs(touchStartX - touchEndX) > ($window.outerWidth() / 100 * options.touchSensitivity)){ if(touchStartX > touchEndX){ if(isScrollAllowed.m.right){ FP.moveSlideRight(); }}else{ if(isScrollAllowed.m.left){ FP.moveSlideLeft(); }} }} else if(options.autoScrolling){ if(Math.abs(touchStartY - touchEndY) > ($window.height() / 100 * options.touchSensitivity)){ if(touchStartY > touchEndY){ scrolling('down', scrollable); }else if(touchEndY > touchStartY){ scrolling('up', scrollable); }} }} }} function checkParentForNormalScrollElement (el, hop){ hop=hop||0; var parent=$(el).parent(); if(hop < options.normalScrollElementTouchThreshold && parent.is(options.normalScrollElements)){ return true; }else if(hop==options.normalScrollElementTouchThreshold){ return false; }else{ return checkParentForNormalScrollElement(parent, ++hop); }} function isReallyTouch(e){ return typeof e.pointerType==='undefined'||e.pointerType!='mouse'; } function touchStartHandler(event){ var e=event.originalEvent; if(options.fitToSection){ $htmlBody.stop(); } if(isReallyTouch(e)){ var touchEvents=getEventsPage(e); touchStartY=touchEvents.y; touchStartX=touchEvents.x; }} function getAverage(elements, number){ var sum=0; var lastElements=elements.slice(Math.max(elements.length - number, 1)); for(var i=0; i < lastElements.length; i++){ sum=sum + lastElements[i]; } return Math.ceil(sum/number); } var prevTime=new Date().getTime(); function MouseWheelHandler(e){ var curTime=new Date().getTime(); var isNormalScroll=$(COMPLETELY_SEL).hasClass(NORMAL_SCROLL); if(options.autoScrolling&&!controlPressed&&!isNormalScroll){ e=e||window.event; var value=e.wheelDelta||-e.deltaY||-e.detail; var delta=Math.max(-1, Math.min(1, value)); var horizontalDetection=typeof e.wheelDeltaX!=='undefined'||typeof e.deltaX!=='undefined'; var isScrollingVertically=(Math.abs(e.wheelDeltaX) < Math.abs(e.wheelDelta))||(Math.abs(e.deltaX) < Math.abs(e.deltaY)||!horizontalDetection); if(scrollings.length > 149){ scrollings.shift(); } scrollings.push(Math.abs(value)); if(options.scrollBar){ e.preventDefault ? e.preventDefault():e.returnValue=false; } var activeSection=$(SECTION_ACTIVE_SEL); var scrollable=options.scrollOverflowHandler.scrollable(activeSection); var timeDiff=curTime-prevTime; prevTime=curTime; if(timeDiff > 200){ scrollings=[]; } if(canScroll){ var averageEnd=getAverage(scrollings, 10); var averageMiddle=getAverage(scrollings, 70); var isAccelerating=averageEnd >=averageMiddle; if(isAccelerating&&isScrollingVertically&&$('.next-current').length==0){ if(delta < 0){ scrolling('down', scrollable); }else{ scrolling('up', scrollable); }} } return false; } if(options.fitToSection){ $htmlBody.stop(); }} function moveSlide(direction, section){ var activeSection=typeof section==='undefined' ? $(SECTION_ACTIVE_SEL):section; var slides=activeSection.find(SLIDES_WRAPPER_SEL); var numSlides=slides.find(SLIDE_SEL).length; if(!slides.length||slideMoving||numSlides < 2){ return; } var currentSlide=slides.find(SLIDE_ACTIVE_SEL); var destiny=null; if(direction==='prev'){ destiny=currentSlide.prev(SLIDE_SEL); }else{ destiny=currentSlide.next(SLIDE_SEL); } if(!destiny.length){ if(!options.loopHorizontal) return; if(direction==='prev'){ destiny=currentSlide.siblings(':last'); }else{ destiny=currentSlide.siblings(':first'); }} slideMoving=true; landscapeScroll(slides, destiny); } function keepSlidesPosition(){ $(SLIDE_ACTIVE_SEL).each(function(){ silentLandscapeScroll($(this), 'internal'); }); } var previousDestTop=0; function getDestinationPosition(element){ var elemPosition=element.position(); var position=elemPosition.top; var isScrollingDown=elemPosition.top > previousDestTop; var sectionBottom=position - windowsHeight + element.outerHeight(); if(element.outerHeight() > windowsHeight){ if(!isScrollingDown){ position=sectionBottom; }} else if(isScrollingDown||(isResizing&&element.is(':last-child'))){ position=sectionBottom; } previousDestTop=position; return position; } function scrollPage(element, callback, isMovementUp){ if(typeof element==='undefined'||canScroll==false||$('.ocm-effect-wrap.material-ocm-open').length > 0){ return; } var dtop=getDestinationPosition(element); var v={ element: element, callback: callback, isMovementUp: isMovementUp, dtop: dtop, yMovement: getYmovement(element), anchorLink: element.data('anchor'), sectionIndex: element.index(SECTION_SEL), activeSlide: element.find(SLIDE_ACTIVE_SEL), activeSection: $(SECTION_ACTIVE_SEL), leavingSection: $(SECTION_ACTIVE_SEL).index(SECTION_SEL) + 1, localIsResizing: isResizing }; if((v.activeSection.is(element)&&!isResizing)||(options.scrollBar&&$window.scrollTop()===v.dtop&&!element.hasClass(AUTO_HEIGHT))){ return; } if(v.activeSlide.length){ var slideAnchorLink=v.activeSlide.data('anchor'); var slideIndex=v.activeSlide.index(); } if(options.autoScrolling&&options.continuousVertical&&typeof (v.isMovementUp)!=="undefined" && ((!v.isMovementUp&&v.yMovement=='up') || (v.isMovementUp&&v.yMovement=='down'))){ v=createInfiniteSections(v); } if($.isFunction(options.onLeave)&&!v.localIsResizing){ if(options.onLeave.call(v.activeSection, v.leavingSection, (v.sectionIndex + 1), v.yMovement)===false){ return; }} stopMedia(v.activeSection); lazyLoad(element); options.scrollOverflowHandler.onLeave(); canScroll=false; setState(slideIndex, slideAnchorLink, v.anchorLink, v.sectionIndex); performMovement(v); lastScrolledDestiny=v.anchorLink; activateMenuAndNav(v.anchorLink, v.sectionIndex); } function performMovement(v){ scrollings=[]; if($('#nectar_fullscreen_rows[data-animation-speed="medium"]').length > 0) var $timeOutDur=($('.last-before-footer').length==0) ? 910:530; else if($('#nectar_fullscreen_rows[data-animation-speed="slow"]').length > 0) var $timeOutDur=($('.last-before-footer').length==0) ? 1200:530; else var $timeOutDur=($('.last-before-footer').length==0) ? 720:530; if(options.css3&&!options.scrollBar&&$('#nectar_fullscreen_rows[data-animation="none"]').length==0){ var translate3d='translate3d(0px, -' + v.dtop + 'px, 0px)'; if(options.scrollingSpeed){ afterSectionLoadsId=setTimeout(function (){ afterSectionLoads(v); HASHCHANGE=false; }, $timeOutDur); }else{ afterSectionLoads(v); }}else{ var scrollSettings=getScrollSettings(v); if($('#nectar_fullscreen_rows[data-animation="none"]').length > 0){ if($('.last-before-footer').length==0){ var translate3d='translate3d(0px, -' + v.dtop + 'px, 0px)'; transformContainer(translate3d, true); if(options.scrollingSpeed){ afterSectionLoadsId=setTimeout(function (){ afterSectionLoads(v); }, options.scrollingSpeed); }else{ afterSectionLoads(v); }}else{ setTimeout(function(){ if(options.scrollBar){ setTimeout(function(){ afterSectionLoads(v); },30); }else{ afterSectionLoads(v); }},$timeOutDur); }}else{ setTimeout(function(){ if(options.scrollBar){ setTimeout(function(){ afterSectionLoads(v); },30); }else{ afterSectionLoads(v); } HASHCHANGE=false; },$timeOutDur); }} } function getScrollSettings(v){ var scroll={}; if(options.autoScrolling&&!options.scrollBar){ scroll.options={ 'top': -v.dtop}; scroll.element=WRAPPER_SEL; }else{ scroll.options={ 'scrollTop': v.dtop}; scroll.element='html, body'; } return scroll; } function createInfiniteSections(v){ if(!v.isMovementUp){ $(SECTION_ACTIVE_SEL).after(v.activeSection.prevAll(SECTION_SEL).get().reverse()); }else{ $(SECTION_ACTIVE_SEL).before(v.activeSection.nextAll(SECTION_SEL)); } silentScroll($(SECTION_ACTIVE_SEL).position().top); keepSlidesPosition(); v.wrapAroundElements=v.activeSection; v.dtop=v.element.position().top; v.yMovement=getYmovement(v.element); return v; } function continuousVerticalFixSectionOrder (v){ if(!v.wrapAroundElements||!v.wrapAroundElements.length){ return; } if(v.isMovementUp){ $(SECTION_FIRST_SEL).before(v.wrapAroundElements); }else{ $(SECTION_LAST_SEL).after(v.wrapAroundElements); } silentScroll($(SECTION_ACTIVE_SEL).position().top); keepSlidesPosition(); } function afterSectionLoads (v){ continuousVerticalFixSectionOrder(v); $('#nectar_fullscreen_rows').removeClass('trans-animation-active'); v.element.addClass(ACTIVE).siblings().removeClass(ACTIVE); $.isFunction(options.afterLoad)&&!v.localIsResizing&&options.afterLoad.call(v.element, v.anchorLink, (v.sectionIndex + 1)); options.scrollOverflowHandler.afterLoad(); playMedia(v.element); v.element.addClass(COMPLETELY).siblings().removeClass(COMPLETELY); $.isFunction(v.callback)&&v.callback.call(this); canScroll=true; } function lazyLoad(destiny){ var destiny=getSlideOrSection(destiny); destiny.find('img[data-src], source[data-src], audio[data-src], iframe[data-src]').each(function(){ $(this).attr('src', $(this).data('src')); $(this).removeAttr('data-src'); if($(this).is('source')){ $(this).closest('video').get(0).load(); }}); } function playMedia(destiny){ var destiny=getSlideOrSection(destiny); destiny.find('video.nectar-video-bg').each(function(){ var element=$(this).get(0); var videoBGStored=$(this); if(typeof element.play==='function'){ if(navigator.userAgent.match(/(Android|iPod|iPhone|iPad|BlackBerry|IEMobile|Opera Mini)/)){ element.onplay=function(){ videoBGStored.parents('.nectar-video-wrap').animate({'opacity':'1'},200); }} element.play(); }}); destiny.find('.nectar-youtube-bg iframe[src*="youtube.com/embed/"]').each(function(){ var element=$(this).get(0); if(/youtube\.com\/embed\//.test($(this).attr('src'))){ element.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*'); }}); } function stopMedia(destiny){ var destiny=getSlideOrSection(destiny); destiny.find('video, audio').each(function(){ var element=$(this).get(0); if(!element.hasAttribute('data-keepplaying')&&typeof element.pause==='function'){ }}); destiny.find('.nectar-youtube-bg iframe[src*="youtube.com/embed/"]').each(function(){ var element=$(this).get(0); if(/youtube\.com\/embed\//.test($(this).attr('src'))&&!element.hasAttribute('data-keepplaying')){ $(this).get(0).contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*'); }}); } function getSlideOrSection(destiny){ var slide=destiny.find(SLIDE_ACTIVE_SEL); if(slide.length){ destiny=$(slide); } return destiny; } function scrollToAnchor(){ var value=window.location.hash.replace('#', '').split('/'); var section=decodeURIComponent(value[0]); var slide=decodeURIComponent(value[1]); if(section&&$('.vc_row[data-fullscreen-anchor-id="'+section+'"]').length > 0){ if(options.animateAnchor){ scrollPageAndSlide(section, slide); }else{ FP.silentMoveTo(section, slide); }} } function hashChangeHandler(){ if(!isScrolling&&!options.lockAnchors){ var value=window.location.hash.replace('#', '').split('/'); var section=decodeURIComponent(value[0]); var slide=decodeURIComponent(value[1]); var isFirstSlideMove=(typeof lastScrolledDestiny==='undefined'); var isFirstScrollMove=(typeof lastScrolledDestiny==='undefined'&&typeof slide==='undefined'&&!slideMoving); if(section.length){ if((section&§ion!==lastScrolledDestiny)&&!isFirstSlideMove||isFirstScrollMove||(!slideMoving&&lastScrolledSlide!=slide)){ scrollPageAndSlide(section, slide); }} } if($('#nectar_fullscreen_rows[data-animation-speed="medium"]').length > 0) var $timeOutDur=($('.last-before-footer').length==0) ? 900:530; else if($('#nectar_fullscreen_rows[data-animation-speed="slow"]').length > 0) var $timeOutDur=($('.last-before-footer').length==0) ? 1180:530; else var $timeOutDur=($('.last-before-footer').length==0) ? 710:530; if(HASHCHANGE==true){ clearInterval(HASHCHANGETIMEOUT); HASHCHANGETIMEOUT=setInterval(function(){ if(canScroll){ hashChangeHandler(); clearInterval(HASHCHANGETIMEOUT); }},100); } HASHCHANGE=true; } function keydownHandler(e){ clearTimeout(keydownId); var activeElement=$(':focus'); if(!activeElement.is('textarea')&&!activeElement.is('input')&&!activeElement.is('select') && activeElement.attr('contentEditable')!=="true"&&activeElement.attr('contentEditable')!=='' && options.keyboardScrolling&&options.autoScrolling){ var keyCode=e.which; var keyControls=[40, 38, 32, 33, 34]; if($.inArray(keyCode, keyControls) > -1){ e.preventDefault(); } controlPressed=e.ctrlKey; keydownId=setTimeout(function(){ onkeydown(e); },150); }} function tooltipTextHandler(){ $(this).prev().trigger('click'); } function keyUpHandler(e){ if(isWindowFocused){ controlPressed=e.ctrlKey; }} function mouseDownHandler(e){ if(e.which==2){ oldPageY=e.pageY; container.on('mousemove', mouseMoveHandler); }} function mouseUpHandler(e){ if(e.which==2){ container.off('mousemove'); }} function slideArrowHandler(){ var section=$(this).closest(SECTION_SEL); if($(this).hasClass(SLIDES_PREV)){ if(isScrollAllowed.m.left){ FP.moveSlideLeft(section); }}else{ if(isScrollAllowed.m.right){ FP.moveSlideRight(section); }} } function blurHandler(){ isWindowFocused=false; controlPressed=false; } function sectionBulletHandler(e){ e.preventDefault(); if($('#nectar_fullscreen_rows .wpb_row.transition-out').length==0){ var index=$(this).parent().index(); scrollPage($(SECTION_SEL).eq(index)); }} function slideBulletHandler(e){ e.preventDefault(); var slides=$(this).closest(SECTION_SEL).find(SLIDES_WRAPPER_SEL); var destiny=slides.find(SLIDE_SEL).eq($(this).closest('li').index()); landscapeScroll(slides, destiny); } function onkeydown(e){ var shiftPressed=e.shiftKey; switch (e.which){ case 38: case 33: if(isScrollAllowed.k.up){ FP.moveSectionUp(); } break; case 32: if(shiftPressed&&isScrollAllowed.k.up){ FP.moveSectionUp(); break; } case 40: case 34: if(isScrollAllowed.k.down){ FP.moveSectionDown(); } break; case 36: if(isScrollAllowed.k.up){ FP.moveTo(1); } break; case 35: if(isScrollAllowed.k.down){ FP.moveTo($(SECTION_SEL).length); } break; case 37: if(isScrollAllowed.k.left){ FP.moveSlideLeft(); } break; case 39: if(isScrollAllowed.k.right){ FP.moveSlideRight(); } break; default: return; }} var oldPageY=0; function mouseMoveHandler(e){ if(canScroll){ if(e.pageY < oldPageY&&isScrollAllowed.m.up){ FP.moveSectionUp(); } else if(e.pageY > oldPageY&&isScrollAllowed.m.down){ FP.moveSectionDown(); }} oldPageY=e.pageY; } function landscapeScroll(slides, destiny){ var destinyPos=destiny.position(); var slideIndex=destiny.index(); var section=slides.closest(SECTION_SEL); var sectionIndex=section.index(SECTION_SEL); var anchorLink=section.data('anchor'); var slidesNav=section.find(SLIDES_NAV_SEL); var slideAnchor=getAnchor(destiny); var prevSlide=section.find(SLIDE_ACTIVE_SEL); var localIsResizing=isResizing; if(options.onSlideLeave){ var prevSlideIndex=prevSlide.index(); var xMovement=getXmovement(prevSlideIndex, slideIndex); if(!localIsResizing&&xMovement!=='none'){ if($.isFunction(options.onSlideLeave)){ if(options.onSlideLeave.call(prevSlide, anchorLink, (sectionIndex + 1), prevSlideIndex, xMovement, slideIndex)===false){ slideMoving=false; return; }} }} stopMedia(prevSlide); destiny.addClass(ACTIVE).siblings().removeClass(ACTIVE); if(!localIsResizing){ lazyLoad(destiny); } if(!options.loopHorizontal&&options.controlArrows){ section.find(SLIDES_ARROW_PREV_SEL).toggle(slideIndex!==0); section.find(SLIDES_ARROW_NEXT_SEL).toggle(!destiny.is(':last-child')); } if(section.hasClass(ACTIVE)){ setState(slideIndex, slideAnchor, anchorLink, sectionIndex); } var afterSlideLoads=function(){ if(!localIsResizing){ $.isFunction(options.afterSlideLoad)&&options.afterSlideLoad.call(destiny, anchorLink, (sectionIndex + 1), slideAnchor, slideIndex); } playMedia(destiny); slideMoving=false; }; if(options.css3){ var translate3d='translate3d(-' + Math.round(destinyPos.left) + 'px, 0px, 0px)'; addAnimation(slides.find(SLIDES_CONTAINER_SEL), options.scrollingSpeed>0).css(getTransforms(translate3d)); afterSlideLoadsId=setTimeout(function(){ afterSlideLoads(); }, options.scrollingSpeed, options.easing); }else{ slides.animate({ scrollLeft:Math.round(destinyPos.left) }, options.scrollingSpeed, options.easing, function(){ afterSlideLoads(); }); } slidesNav.find(ACTIVE_SEL).removeClass(ACTIVE); slidesNav.find('li').eq(slideIndex).find('a').addClass(ACTIVE); } var previousHeight=windowsHeight; function resizeHandler(){ if($('#nectar_fullscreen_rows.afterLoaded').length==0) return false; responsive(); if(isTouchDevice){ var activeElement=$(document.activeElement); if(!activeElement.is('textarea')&&!activeElement.is('input')&&!activeElement.is('select')){ var currentHeight=$window.height(); FP.reBuild(true); previousHeight=currentHeight; }}else{ clearTimeout(resizeId); FP.reBuild(true); }} function checkScrollOverflow(){ if($('#nectar_fullscreen_rows.afterLoaded').length==0) return false; $(SECTION_SEL).each(function(){ if(options.scrollOverflow){ createSlimScrolling($(this)); }}); } function responsive(){ var widthLimit=options.responsive||options.responsiveWidth; var heightLimit=options.responsiveHeight; var isBreakingPointWidth=widthLimit&&$window.outerWidth() < widthLimit; var isBreakingPointHeight=heightLimit&&$window.height() < heightLimit; if(widthLimit&&heightLimit){ FP.setResponsive(isBreakingPointWidth||isBreakingPointHeight); } else if(widthLimit){ FP.setResponsive(isBreakingPointWidth); } else if(heightLimit){ FP.setResponsive(isBreakingPointHeight); } $(SECTION_NAV_SEL).css('margin-top', '-' + (($(SECTION_NAV_SEL).height()/2) - $adminBar - $headerHeight/2) + 'px'); } function addAnimation(element){ var transition='all ' + options.scrollingSpeed + 'ms ' + options.easingcss3; element.removeClass(NO_TRANSITION); return element.css({ '-webkit-transition': transition, 'transition': transition }); } function removeAnimation(element){ return element.addClass(NO_TRANSITION); } function activateNavDots(name, sectionIndex){ if(options.navigation){ $(SECTION_NAV_SEL).find(ACTIVE_SEL).removeClass(ACTIVE); if(name){ $(SECTION_NAV_SEL).find('a[href="#' + name + '"]').addClass(ACTIVE); }else{ $(SECTION_NAV_SEL).find('li').eq(sectionIndex).find('a').addClass(ACTIVE); }} } function activateMenuElement(name){ if(options.menu){ $(options.menu).find(ACTIVE_SEL).removeClass(ACTIVE); $(options.menu).find('[data-menuanchor="'+name+'"]').addClass(ACTIVE); }} function activateMenuAndNav(anchor, index){ activateMenuElement(anchor); activateNavDots(anchor, index); } function getYmovement(destiny){ var fromIndex=$(SECTION_ACTIVE_SEL).index(SECTION_SEL); var toIndex=destiny.index(SECTION_SEL); if(fromIndex==toIndex){ return 'none'; } if(fromIndex > toIndex){ return 'up'; } return 'down'; } function getXmovement(fromIndex, toIndex){ if(fromIndex==toIndex){ return 'none'; } if(fromIndex > toIndex){ return 'left'; } return 'right'; } function createSlimScrolling(element){ var $fpScrollOverflow=($('#nectar_fullscreen_rows').attr('data-content-overflow')=='hidden') ? false:true; if(element.hasClass('fp-noscroll')) return; element.css('overflow', 'hidden'); var scrollOverflowHandler=options.scrollOverflowHandler; var wrap=scrollOverflowHandler.wrapContent(); var section=element.closest(SECTION_SEL); var scrollable=scrollOverflowHandler.scrollable(element); var contentHeight; if(scrollable.length){ contentHeight=(element.find('.full-page-inner-wrap > .full-page-inner > .container > .span_12').length > 0) ? element.find('.full-page-inner-wrap > .full-page-inner > .container > .span_12').outerHeight(true):element.find('.full-page-inner-wrap > .full-page-inner > .span_12').outerHeight(true); }else{ contentHeight=(element.find('.full-page-inner-wrap > .full-page-inner > .container > .span_12').length > 0) ? element.find('.full-page-inner-wrap > .full-page-inner > .container > .span_12').outerHeight(true):element.find('.full-page-inner-wrap > .full-page-inner > .span_12').outerHeight(true); if(options.verticalCentered){ contentHeight=(element.find('.full-page-inner-wrap > .full-page-inner > .container > .span_12').length > 0) ? element.find('.full-page-inner-wrap > .full-page-inner > .container > .span_12').outerHeight(true):element.find('.full-page-inner-wrap > .full-page-inner > .span_12').outerHeight(true); }} var $headerNavSpace=($('body[data-header-format="left-header"]').length > 0&&$(window).width() > 1000) ? 0:$('#header-outer').outerHeight(); var $adminBar=($('#wpadminbar').length > 0) ? $('#wpadminbar').height():0; var $headerHeight=($('#header-outer.transparent').length==0||($(window).width() < 1000&&$('#header-outer[data-permanent-transparent="true"]').length==0)) ? $headerNavSpace:0 ; var $borderMultiplier=($('.body-border-right').length > 0&&$('#header-outer').css('background-color')==$('.body-border-right').css('background-color')) ? 1:2; var $borderHeight=($('.body-border-right').length > 0&&$(window).width()>1000) ? $('.body-border-right').width()*$borderMultiplier:0; var $materialExtra=($('body.material .ocm-effect-wrap').length > 0) ? 2:0; windowsHeight=$window.height() - $adminBar - $headerHeight - $borderHeight + $materialExtra; var scrollHeight=windowsHeight - parseInt(section.css('padding-bottom')) - parseInt(section.css('padding-top')); if(contentHeight > windowsHeight+5&&$(element).find('.nectar-slider-wrap[data-fullscreen="true"]').length==0&&!($(window).width() > 1000&&$fpScrollOverflow==false)){ if(scrollable.length){ scrollOverflowHandler.update(element, scrollHeight); }else{ if(options.verticalCentered){ element.find(TABLE_CELL_SEL).wrapInner(wrap); }else{ element.wrapInner(wrap); } scrollOverflowHandler.create(element, scrollHeight); }}else{ scrollOverflowHandler.remove(element); } element.css('overflow', ''); } function addTableClass(element){ element.addClass(TABLE).wrapInner('
      '); } function getTableHeight(element){ var sectionHeight=windowsHeight; if(options.paddingTop||options.paddingBottom){ var section=element; if(!section.hasClass(SECTION)){ section=element.closest(SECTION_SEL); } var paddings=parseInt(section.css('padding-top')) + parseInt(section.css('padding-bottom')); sectionHeight=(windowsHeight - paddings); } return sectionHeight; } function transformContainer(translate3d, animated){ if(animated){ addAnimation(container); }else{ removeAnimation(container); } container.css(getTransforms(translate3d)); setTimeout(function(){ container.removeClass(NO_TRANSITION); },10); } function getSectionByAnchor(sectionAnchor){ var section=container.find(SECTION_SEL + '[data-anchor="'+sectionAnchor+'"]'); if(!section.length){ section=$(SECTION_SEL).eq((sectionAnchor -1)); } return section; } function getSlideByAnchor(slideAnchor, section){ var slides=section.find(SLIDES_WRAPPER_SEL); var slide=slides.find(SLIDE_SEL + '[data-anchor="'+slideAnchor+'"]'); if(!slide.length){ slide=slides.find(SLIDE_SEL).eq(slideAnchor); } return slide; } function scrollPageAndSlide(destiny, slide){ var section=getSectionByAnchor(destiny); if(typeof slide==='undefined'){ slide=0; } if(destiny!==lastScrolledDestiny&&!section.hasClass(ACTIVE)){ scrollPage(section, function(){ scrollSlider(section, slide); }); }else{ scrollSlider(section, slide); }} function scrollSlider(section, slideAnchor){ if(typeof slideAnchor!=='undefined'){ var slides=section.find(SLIDES_WRAPPER_SEL); var destiny=getSlideByAnchor(slideAnchor, section); if(destiny.length){ landscapeScroll(slides, destiny); }} } function addSlidesNavigation(section, numSlides){ section.append('
        '); var nav=section.find(SLIDES_NAV_SEL); nav.addClass(options.slidesNavPosition); for(var i=0; i< numSlides; i++){ nav.find('ul').append('
      • '); } nav.css('margin-left', '-' + (nav.width()/2) + 'px'); nav.find('li').first().find('a').addClass(ACTIVE); } function setState(slideIndex, slideAnchor, anchorLink, sectionIndex){ var sectionHash=''; if(options.anchors.length&&!options.lockAnchors){ if(slideIndex){ if(typeof anchorLink!=='undefined'){ sectionHash=anchorLink; } if(typeof slideAnchor==='undefined'){ slideAnchor=slideIndex; } lastScrolledSlide=slideAnchor; setUrlHash(sectionHash + '/' + slideAnchor); }else if(typeof slideIndex!=='undefined'){ lastScrolledSlide=slideAnchor; setUrlHash(anchorLink); }else{ setUrlHash(anchorLink); }} setBodyClass(); } function setUrlHash(url){ if(options.recordHistory){ location.hash=url; }else{ if(isTouchDevice||isTouch){ window.history.replaceState(undefined, undefined, '#' + url); }else{ var baseUrl=window.location.href.split('#')[0]; window.location.replace(baseUrl + '#' + url); }} } function getAnchor(element){ var anchor=element.data('anchor'); var index=element.index(); if(typeof anchor==='undefined'){ anchor=index; } return anchor; } function setBodyClass(){ /* var section=$(SECTION_ACTIVE_SEL); var slide=section.find(SLIDE_ACTIVE_SEL); var sectionAnchor=getAnchor(section); var slideAnchor=getAnchor(slide); var text=String(sectionAnchor); if(slide.length){ text=text + '-' + slideAnchor; } text=text.replace('/', '-').replace('#',''); var classRe=new RegExp('\\b\\s?' + VIEWING_PREFIX + '-[^\\s]+\\b', "g"); $body[0].className=$body[0].className.replace(classRe, ''); $body.addClass(VIEWING_PREFIX + '-' + text); */ } function support3d(){ var el=document.createElement('p'), has3d, transforms={ 'webkitTransform':'-webkit-transform', 'OTransform':'-o-transform', 'msTransform':'-ms-transform', 'MozTransform':'-moz-transform', 'transform':'transform' }; document.body.insertBefore(el, null); for (var t in transforms){ if(el.style[t]!==undefined){ el.style[t]='translate3d(1px,1px,1px)'; has3d=window.getComputedStyle(el).getPropertyValue(transforms[t]); }} document.body.removeChild(el); return (has3d!==undefined&&has3d.length > 0&&has3d!=='none'); } function removeMouseWheelHandler(){ if(document.addEventListener){ document.removeEventListener('mousewheel', MouseWheelHandler, false); document.removeEventListener('wheel', MouseWheelHandler, false); document.removeEventListener('MozMousePixelScroll', MouseWheelHandler, false); }else{ document.detachEvent('onmousewheel', MouseWheelHandler); }} function addMouseWheelHandler(){ var prefix=''; var _addEventListener; if(window.addEventListener){ _addEventListener="addEventListener"; }else{ _addEventListener="attachEvent"; prefix='on'; } var support='onwheel' in document.createElement('div') ? 'wheel' : document.onmousewheel!==undefined ? 'mousewheel' : 'DOMMouseScroll'; if(support=='DOMMouseScroll'){ document[ _addEventListener ](prefix + 'MozMousePixelScroll', MouseWheelHandler, false); }else{ document[ _addEventListener ](prefix + support, MouseWheelHandler, false); }} function addMiddleWheelHandler(){ container .on('mousedown', mouseDownHandler) .on('mouseup', mouseUpHandler); } function removeMiddleWheelHandler(){ container .off('mousedown', mouseDownHandler) .off('mouseup', mouseUpHandler); } function addTouchHandler(){ if(isTouchDevice||isTouch){ var MSPointer=getMSPointer(); $(WRAPPER_SEL).off('touchstart ' + MSPointer.down).on('touchstart ' + MSPointer.down, touchStartHandler); $(WRAPPER_SEL).off('touchmove ' + MSPointer.move).on('touchmove ' + MSPointer.move, touchMoveHandler); }} function removeTouchHandler(){ if(isTouchDevice||isTouch){ var MSPointer=getMSPointer(); $(WRAPPER_SEL).off('touchstart ' + MSPointer.down); $(WRAPPER_SEL).off('touchmove ' + MSPointer.move); }} function getMSPointer(){ var pointer; if(window.PointerEvent){ pointer={ down: 'pointerdown', move: 'pointermove'};}else{ pointer={ down: 'MSPointerDown', move: 'MSPointerMove'};} return pointer; } function getEventsPage(e){ var events=[]; events.y=(typeof e.pageY!=='undefined'&&(e.pageY||e.pageX) ? e.pageY:e.touches[0].pageY); events.x=(typeof e.pageX!=='undefined'&&(e.pageY||e.pageX) ? e.pageX:e.touches[0].pageX); if(isTouch&&isReallyTouch(e)&&options.scrollBar){ events.y=e.touches[0].pageY; events.x=e.touches[0].pageX; } return events; } function silentLandscapeScroll(activeSlide, noCallbacks){ FP.setScrollingSpeed (0, 'internal'); if(typeof noCallbacks!=='undefined'){ isResizing=true; } landscapeScroll(activeSlide.closest(SLIDES_WRAPPER_SEL), activeSlide); if(typeof noCallbacks!=='undefined'){ isResizing=false; } FP.setScrollingSpeed(originals.scrollingSpeed, 'internal'); } function silentScroll(top){ if(options.scrollBar){ container.scrollTop(top); } else if(options.css3){ var translate3d='translate3d(0px, -' + top + 'px, 0px)'; transformContainer(translate3d, false); }else{ container.css('top', -top); }} function getTransforms(translate3d){ return { '-webkit-transform': translate3d, '-moz-transform': translate3d, '-ms-transform':translate3d, 'transform': translate3d };} function setIsScrollAllowed(value, direction, type){ switch (direction){ case 'up': isScrollAllowed[type].up=value; break; case 'down': isScrollAllowed[type].down=value; break; case 'left': isScrollAllowed[type].left=value; break; case 'right': isScrollAllowed[type].right=value; break; case 'all': if(type=='m'){ FP.setAllowScrolling(value); }else{ FP.setKeyboardScrolling(value); }} } FP.destroy=function(all){ FP.setAutoScrolling(false, 'internal'); FP.setAllowScrolling(false); FP.setKeyboardScrolling(false); container.addClass(DESTROYED); clearTimeout(afterSlideLoadsId); clearTimeout(afterSectionLoadsId); clearTimeout(resizeId); clearTimeout(scrollId); clearTimeout(scrollId2); $window .off('scroll', scrollHandler) .off('hashchange', hashChangeHandler) .off('resize', resizeHandler); $document .off('click', SECTION_NAV_SEL + ' a') .off('mouseenter', SECTION_NAV_SEL + ' li') .off('mouseleave', SECTION_NAV_SEL + ' li') .off('click', SLIDES_NAV_LINK_SEL) .off('mouseover', options.normalScrollElements) .off('mouseout', options.normalScrollElements); $(SECTION_SEL) .off('click', SLIDES_ARROW_SEL); clearTimeout(afterSlideLoadsId); clearTimeout(afterSectionLoadsId); if(all){ destroyStructure(); }}; function destroyStructure(){ silentScroll(0); $(SECTION_NAV_SEL + ', ' + SLIDES_NAV_SEL + ', ' + SLIDES_ARROW_SEL).remove(); $(SECTION_SEL).css({ 'height': '', 'background-color':'', 'padding': '' }); $(SLIDE_SEL).css({ 'width': '' }); container.css({ 'height': '', 'position': '', '-ms-touch-action': '', 'touch-action': '' }); $htmlBody.css({ 'overflow': '', 'height': '' }); $('html').removeClass(ENABLED); $.each($body.get(0).className.split(/\s+/), function (index, className){ if(className.indexOf(VIEWING_PREFIX)===0){ $body.removeClass(className); }}); $(SECTION_SEL + ', ' + SLIDE_SEL).each(function(){ options.scrollOverflowHandler.remove($(this)); $(this).removeClass(TABLE + ' ' + ACTIVE); }); removeAnimation(container); container.find(TABLE_CELL_SEL + ', ' + SLIDES_CONTAINER_SEL + ', ' + SLIDES_WRAPPER_SEL).each(function(){ $(this).replaceWith(this.childNodes); }); $htmlBody.scrollTop(0); var usedSelectors=[SECTION, SLIDE, SLIDES_CONTAINER]; $.each(usedSelectors, function(index, value){ $('.' + value).removeClass(value); }); } function setVariableState(variable, value, type){ options[variable]=value; if(type!=='internal'){ originals[variable]=value; }} function displayWarnings(){ if($('html').hasClass(ENABLED)){ showError('error', 'Fullpage.js can only be initialized once and you are doing it multiple times!'); return; } if(options.continuousVertical && (options.loopTop||options.loopBottom)){ options.continuousVertical=false; showError('warn', 'Option `loopTop/loopBottom` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled'); } if(options.scrollBar&&options.scrollOverflow){ showError('warn', 'Option `scrollBar` is mutually exclusive with `scrollOverflow`. Sections with scrollOverflow might not work well in Firefox'); } if(options.continuousVertical&&options.scrollBar){ options.continuousVertical=false; showError('warn', 'Option `scrollBar` is mutually exclusive with `continuousVertical`; `continuousVertical` disabled'); } $.each(options.anchors, function(index, name){ var nameAttr=$document.find('[name]').filter(function(){ return $(this).attr('name')&&$(this).attr('name').toLowerCase()==name.toLowerCase(); }); var idAttr=$document.find('[id]').filter(function(){ return $(this).attr('id')&&$(this).attr('id').toLowerCase()==name.toLowerCase(); }); if(idAttr.length||nameAttr.length){ showError('error', 'data-anchor tags can not have the same value as any `id` element on the site (or `name` element for IE).'); idAttr.length&&showError('error', '"' + name + '" is is being used by another element `id` property'); nameAttr.length&&showError('error', '"' + name + '" is is being used by another element `name` property'); }}); } function showError(type, text){ console&&console[type]&&console[type]('fullPage: ' + text); }}; if(typeof IScroll!=='undefined'){ IScroll.prototype.wheelOn=function (){ this.wrapper.addEventListener('wheel', this); this.wrapper.addEventListener('mousewheel', this); this.wrapper.addEventListener('DOMMouseScroll', this); }; IScroll.prototype.wheelOff=function (){ this.wrapper.removeEventListener('wheel', this); this.wrapper.removeEventListener('mousewheel', this); this.wrapper.removeEventListener('DOMMouseScroll', this); };} var iscrollHandler={ refreshId: null, iScrollInstances: [], onLeave: function(){ var scroller=$(SECTION_ACTIVE_SEL).find(SCROLLABLE_SEL).data('iscrollInstance'); if(typeof scroller!=='undefined'&&scroller){ scroller.wheelOff(); }}, afterLoad: function(){ var scroller=$(SECTION_ACTIVE_SEL).find(SCROLLABLE_SEL).data('iscrollInstance'); if(typeof scroller!=='undefined'&&scroller){ scroller.wheelOn(); }}, create: function(element, scrollHeight){ var scrollable=element.find(SCROLLABLE_SEL); scrollable.height(scrollHeight); scrollable.each(function(){ var $this=jQuery(this); var iScrollInstance=$this.data('iscrollInstance'); if(iScrollInstance){ $.each(iscrollHandler.iScrollInstances, function(){ $(this).destroy(); }); } iScrollInstance=new IScroll($this.get(0), iscrollOptions); iscrollHandler.iScrollInstances.push(iScrollInstance); $this.data('iscrollInstance', iScrollInstance); }); }, isScrolled: function(type, scrollable){ var scroller=scrollable.data('iscrollInstance'); if(!scroller){ return false; } if(type==='top'){ $('#nectar_fullscreen_rows').addClass('nextSectionAllowed'); return scroller.y >=0&&!scrollable.scrollTop(); }else if(type==='bottom'){ return (0 - scroller.y) + scrollable.scrollTop() + 1 + scrollable.innerHeight() >=scrollable.find('.fp-scroller').height() - 4; } }, scrollable: function(activeSection){ if(activeSection.find(SLIDES_WRAPPER_SEL).length){ return activeSection.find(SLIDE_ACTIVE_SEL).find(SCROLLABLE_SEL); } return activeSection.find(SCROLLABLE_SEL); }, scrollHeight: function(element){ return element.find(SCROLLABLE_SEL).children().first().get(0).scrollHeight; }, remove: function(element){ var scrollable=element.find(SCROLLABLE_SEL); if(scrollable.length){ var iScrollInstance=scrollable.data('iscrollInstance'); iScrollInstance.destroy(); scrollable.data('iscrollInstance', 'undefined'); } element.find(SCROLLABLE_SEL).children().first().children().first().unwrap().unwrap(); }, update: function(element, scrollHeight){ clearTimeout(iscrollHandler.refreshId); iscrollHandler.refreshId=setTimeout(function(){ $.each(iscrollHandler.iScrollInstances, function(){ $(this).get(0).refresh(); }); }, 150); element.find(SCROLLABLE_SEL).css('height', scrollHeight + 'px').parent().css('height', scrollHeight + 'px'); }, wrapContent: function(){ return '
        '; }};}); ;(function ($){ "use strict"; var methods=(function (){ var c={ bcClass: 'sf-breadcrumb', menuClass: 'sf-js-enabled', anchorClass: 'sf-with-ul', menuArrowClass: 'sf-arrows' }, ios=(function (){ var ios=/iPhone|iPad|iPod/i.test(navigator.userAgent); if(ios){ $(window).load(function (){ $('body').children().on('click', $.noop); }); } return ios; })(), wp7=(function (){ var style=document.documentElement.style; return ('behavior' in style&&'fill' in style&&/iemobile/i.test(navigator.userAgent)); })(), toggleMenuClasses=function ($menu, o){ var classes=c.menuClass; if(o.cssArrows){ classes +=' ' + c.menuArrowClass; } $menu.toggleClass(classes); }, setPathToCurrent=function ($menu, o){ return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels) .addClass(o.hoverClass + ' ' + c.bcClass) .filter(function (){ return ($(this).children(o.popUpSelector).hide().show().length); }).removeClass(o.pathClass); }, toggleAnchorClass=function ($li){ $li.children('a').toggleClass(c.anchorClass); }, toggleTouchAction=function ($menu){ var touchAction=$menu.css('ms-touch-action'); touchAction=(touchAction==='pan-y') ? 'auto':'pan-y'; $menu.css('ms-touch-action', touchAction); }, applyHandlers=function ($menu, o){ var targets='li:has(' + o.popUpSelector + ')'; if($.fn.hoverIntent&&!o.disableHI){ $menu.hoverIntent(over, out, targets); }else{ $menu .on('mouseenter.superfish', targets, over) .on('mouseleave.superfish', targets, out); } var touchevent='MSPointerDown.superfish'; if(!ios){ touchevent +=' touchend.superfish'; } if(wp7){ touchevent +=' mousedown.superfish'; } $menu .on('focusin.superfish', 'li', over) .on('focusout.superfish', 'li', out) .on(touchevent, 'a', o, touchHandler); }, touchHandler=function (e){ var $this=$(this), $ul=$this.siblings(e.data.popUpSelector); if($ul.length > 0&&$ul.is(':hidden')){ $this.one('click.superfish', false); if(e.type==='MSPointerDown'){ $this.trigger('focus'); }else{ $.proxy(over, $this.parent('li'))(); }} }, over=function (){ var $this=$(this), o=getOptions($this); if($(this).parents('.megamenu').length > 0) return; clearTimeout(o.sfTimer); $this.siblings().superfish('hide').end().superfish('show'); }, out=function (){ var $this=$(this), o=getOptions($this); if(ios){ $.proxy(close, $this, o)(); }else{ clearTimeout(o.sfTimer); o.sfTimer=setTimeout($.proxy(close, $this, o), o.delay); }}, close=function (o){ o.retainPath=($.inArray(this[0], o.$path) > -1); this.superfish('hide'); if(!this.parents('.' + o.hoverClass).length){ o.onIdle.call(getMenu(this)); if(o.$path.length){ $.proxy(over, o.$path)(); }} }, getMenu=function ($el){ return $el.closest('.' + c.menuClass); }, getOptions=function ($el){ return getMenu($el).data('sf-options'); }; return { hide: function (instant){ if(this.length){ var $this=this, o=getOptions($this); if(!o){ return this; } if($(this).hasClass('menu-item-over')&&$(this).hasClass('megamenu')){ return true; } var not=(o.retainPath===true) ? o.$path:'', $ul=$this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector), speed=o.speedOut; if(instant){ $ul.show(); speed=0; } o.retainPath=false; o.onBeforeHide.call($ul); if(o.dropdownStyle=='minimal'){ var $this=$(this); o.onHide.call($this); }else{ $ul.stop(true, true).animate(o.animationOut, speed, function (){ var $this=$(this); o.onHide.call($this); }); } if($(this).parents('.megamenu').length > 0) return; if($('#header-outer[data-megamenu-rt="1"]').length > 0&&$('#header-outer[data-transparent-header="true"]').length > 0){ if($('#header-outer.scrolled-down').length==0&&$('#header-outer.small-nav').length==0&&$('#header-outer.detached').length==0&&$('#header-outer.fixed-menu').length==0){ $('#header-outer').addClass('transparent'); }} } return this; }, show: function (){ if($(this).parents('.megamenu').length > 0) return; var o=getOptions(this); if(!o){ return this; } var $this=this.addClass(o.hoverClass), $ul=$this.children(o.popUpSelector); if($('#header-outer[data-megamenu-rt="1"]').length > 0&&$(this).hasClass('megamenu')){ $('#header-outer').addClass('no-transition'); $('#header-outer').removeClass('transparent'); } o.onBeforeShow.call($ul); if(!$($ul).parents('li').hasClass('megamenu')&&!$($ul).parents('ul').hasClass('sub-menu')&&$ul.offset()){ $ul.addClass('temp-hidden-display'); var docW=$("#top .container").width(); var elm=$ul; var off=elm.offset(); var l=off.left - ($(window).width() - docW)/2; var w=elm.width(); var isEntirelyVisible=(l+w <=$(window).width()-100); if(! isEntirelyVisible){ $ul.parents('li').addClass('edge'); }else{ $ul.parents('li').removeClass('edge'); } $ul.removeClass('temp-hidden-display'); } if(o.dropdownStyle=='minimal'){ o.onShow.call($ul); }else{ $ul.stop(true, true).animate(o.animation, o.speed, function (){ o.onShow.call($ul); }); } if($ul.length > 0&&$ul.parents('.sub-menu').length > 0&&$ul.parent().parent().parent().parent().hasClass('sf-menu')){ if($ul.offset().left + $ul.outerWidth() > $(window).width()){ $ul.addClass('on-left-side'); $ul.find('ul').addClass('on-left-side'); }} return this; }, destroy: function (){ return this.each(function (){ var $this=$(this), o=$this.data('sf-options'), $hasPopUp; if(!o){ return false; } $hasPopUp=$this.find(o.popUpSelector).parent('li'); clearTimeout(o.sfTimer); toggleMenuClasses($this, o); toggleAnchorClass($hasPopUp); toggleTouchAction($this); $this.off('.superfish').off('.hoverIntent'); $hasPopUp.children(o.popUpSelector).attr('style', function (i, style){ return style.replace(/display[^;]+;?/g, ''); }); o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass); $this.find('.' + o.hoverClass).removeClass(o.hoverClass); o.onDestroy.call($this); $this.removeData('sf-options'); }); }, init: function (op){ return this.each(function (){ var $this=$(this); if($this.data('sf-options')){ return false; } var o=$.extend({}, $.fn.superfish.defaults, op), $hasPopUp=$this.find(o.popUpSelector).parent('li'); o.$path=setPathToCurrent($this, o); $this.data('sf-options', o); toggleMenuClasses($this, o); toggleAnchorClass($hasPopUp); toggleTouchAction($this); applyHandlers($this, o); $hasPopUp.not('.' + c.bcClass).superfish('hide', true); o.onInit.call(this); }); }};})(); $.fn.superfish=function (method, args){ if(methods[method]){ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); } else if(typeof method==='object'||! method){ return methods.init.apply(this, arguments); }else{ return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish'); }}; $.fn.superfish.defaults={ popUpSelector: 'ul,.sf-mega', hoverClass: 'sfHover', pathClass: 'overrideThisToUse', pathLevels: 1, delay: 800, animation: {opacity: 'show'}, animationOut: {opacity: 'hide'}, speed: 'normal', speedOut: 'fast', cssArrows: true, disableHI: false, onInit: $.noop, onBeforeShow: $.noop, onShow: $.noop, onBeforeHide: $.noop, onHide: $.noop, onIdle: $.noop, onDestroy: $.noop, dropdownStyle: ($('body[data-dropdown-style="minimal"]').length > 0) ? 'minimal':'classic' }; $.fn.extend({ hideSuperfishUl: methods.hide, showSuperfishUl: methods.show }); })(jQuery);