");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'
The content could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'
The image could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",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(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'
',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('
').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()});
;(function(window, document, $, undefined){
$.swipebox=function(elem, options){
var ui,
defaults={
useCSS:true,
useSVG:true,
initialIndexOnArray:0,
removeBarsOnMobile:true,
hideCloseButtonOnMobile:false,
hideBarsDelay:3000,
videoMaxWidth:1140,
vimeoColor:'cccccc',
beforeOpen: null,
afterOpen: null,
afterClose: null,
nextSlide: null,
prevSlide: null,
loopAtEnd: false,
autoplayVideos: false,
queryStringData: {},
toggleClassOnLoad: ''
},
plugin=this,
elements=[],
$elem,
selector=elem.selector,
$selector=$(selector),
isMobile=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),
isTouch=isMobile!==null||document.createTouch!==undefined||('ontouchstart' in window)||('onmsgesturechange' in window)||navigator.msMaxTouchPoints,
supportSVG = !! document.createElementNS&&!! document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect,
winWidth=window.innerWidth ? window.innerWidth:$(window).width(),
winHeight=window.innerHeight ? window.innerHeight:$(window).height(),
currentX=0,
html='
';
plugin.settings={};
$.swipebox.close=function (){
ui.closeSlide();
};
$.swipebox.extend=function (){
return ui;
};
plugin.init=function(){
plugin.settings=$.extend({}, defaults, options);
if($.isArray(elem)){
elements=elem;
ui.target=$(window);
ui.init(plugin.settings.initialIndexOnArray);
}else{
$(document).on('click', selector, function(event){
if(event.target.parentNode.className==='slide current'){
return false;
}
if(! $.isArray(elem)){
ui.destroy();
$elem=$(selector);
ui.actions();
}
elements=[];
var index , relType, relVal;
if(! relVal){
relType='data-rel';
relVal=$(this).attr(relType);
}
if(! relVal){
relType='rel';
relVal=$(this).attr(relType);
}
if(relVal&&relVal!==''&&relVal!=='nofollow'){
$elem=$selector.filter('[' + relType + '="' + relVal + '"]');
}else{
$elem=$(selector);
}
$elem.each(function(){
var title=null,
href=null;
if($(this).attr('title')){
title=$(this).attr('title');
}
if($(this).attr('href')){
href=$(this).attr('href');
}
elements.push({
href: href,
title: title
});
});
index=$elem.index($(this));
event.preventDefault();
event.stopPropagation();
ui.target=$(event.target);
ui.init(index);
});
}};
ui={
init:function(index){
if(plugin.settings.beforeOpen){
plugin.settings.beforeOpen();
}
this.target.trigger('swipebox-start');
$.swipebox.isOpen=true;
this.build();
this.openSlide(index);
this.openMedia(index);
this.preloadMedia(index+1);
this.preloadMedia(index-1);
if(plugin.settings.afterOpen){
plugin.settings.afterOpen();
}},
build:function (){
var $this=this, bg;
$('body').append(html);
if(supportSVG&&plugin.settings.useSVG===true){
bg=$('#swipebox-close').css('background-image');
bg=bg.replace('png', 'svg');
$('#swipebox-prev, #swipebox-next, #swipebox-close').css({
'background-image':bg
});
}
if(isMobile&&plugin.settings.removeBarsOnMobile){
$('#swipebox-bottom-bar, #swipebox-top-bar').remove();
}
$.each(elements, function(){
$('#swipebox-slider').append('
');
});
$this.setDim();
$this.actions();
if(isTouch){
$this.gesture();
}
$this.keyboard();
$this.animBars();
$this.resize();
},
setDim:function (){
var width, height, sliderCss={};
if('onorientationchange' in window){
window.addEventListener('orientationchange', function(){
if(window.orientation===0){
width=winWidth;
height=winHeight;
}else if(window.orientation===90||window.orientation===-90){
width=winHeight;
height=winWidth;
}}, false);
}else{
width=window.innerWidth ? window.innerWidth:$(window).width();
height=window.innerHeight ? window.innerHeight:$(window).height();
}
sliderCss={
width:width,
height:height
};
$('#swipebox-overlay').css(sliderCss);
},
resize:function (){
var $this=this;
$(window).resize(function(){
$this.setDim();
}).resize();
},
supportTransition:function (){
var prefixes='transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition'.split(' '),
i;
for(i=0; i < prefixes.length; i++){
if(document.createElement('div').style[ prefixes[i] ]!==undefined){
return prefixes[i];
}}
return false;
},
doCssTrans:function (){
if(plugin.settings.useCSS&&this.supportTransition()){
return true;
}},
gesture:function (){
var $this=this,
index,
hDistance,
vDistance,
hDistanceLast,
vDistanceLast,
hDistancePercent,
vSwipe=false,
hSwipe=false,
hSwipMinDistance=10,
vSwipMinDistance=50,
startCoords={},
endCoords={},
bars=$('#swipebox-top-bar, #swipebox-bottom-bar'),
slider=$('#swipebox-slider');
bars.addClass('visible-bars');
$this.setTimeout();
$('body').bind('touchstart', function(event){
$(this).addClass('touching');
index=$('#swipebox-slider .slide').index($('#swipebox-slider .slide.current'));
endCoords=event.originalEvent.targetTouches[0];
startCoords.pageX=event.originalEvent.targetTouches[0].pageX;
startCoords.pageY=event.originalEvent.targetTouches[0].pageY;
$('#swipebox-slider').css({
'-webkit-transform':'translate3d(' + currentX +'%, 0, 0)',
'transform':'translate3d(' + currentX + '%, 0, 0)'
});
$('.touching').bind('touchmove',function(event){
event.preventDefault();
event.stopPropagation();
endCoords=event.originalEvent.targetTouches[0];
if(! hSwipe){
vDistanceLast=vDistance;
vDistance=endCoords.pageY - startCoords.pageY;
if(Math.abs(vDistance) >=vSwipMinDistance||vSwipe){
var opacity=0.75 - Math.abs(vDistance) / slider.height();
slider.css({ 'top': vDistance + 'px' });
slider.css({ 'opacity': opacity });
vSwipe=true;
}}
hDistanceLast=hDistance;
hDistance=endCoords.pageX - startCoords.pageX;
hDistancePercent=hDistance * 100 / winWidth;
if(! hSwipe&&! vSwipe&&Math.abs(hDistance) >=hSwipMinDistance){
$('#swipebox-slider').css({
'-webkit-transition':'',
'transition':''
});
hSwipe=true;
}
if(hSwipe){
if(0 < hDistance){
if(0===index){
$('#swipebox-overlay').addClass('leftSpringTouch');
}else{
$('#swipebox-overlay').removeClass('leftSpringTouch').removeClass('rightSpringTouch');
$('#swipebox-slider').css({
'-webkit-transform':'translate3d(' +(currentX + hDistancePercent) +'%, 0, 0)',
'transform':'translate3d(' +(currentX + hDistancePercent) + '%, 0, 0)'
});
}}else if(0 > hDistance){
if(elements.length===index +1){
$('#swipebox-overlay').addClass('rightSpringTouch');
}else{
$('#swipebox-overlay').removeClass('leftSpringTouch').removeClass('rightSpringTouch');
$('#swipebox-slider').css({
'-webkit-transform':'translate3d(' +(currentX + hDistancePercent) +'%, 0, 0)',
'transform':'translate3d(' +(currentX + hDistancePercent) + '%, 0, 0)'
});
}}
}});
return false;
}).bind('touchend',function(event){
event.preventDefault();
event.stopPropagation();
$('#swipebox-slider').css({
'-webkit-transition':'-webkit-transform 0.4s ease',
'transition':'transform 0.4s ease'
});
vDistance=endCoords.pageY - startCoords.pageY;
hDistance=endCoords.pageX - startCoords.pageX;
hDistancePercent=hDistance*100/winWidth;
if(vSwipe){
vSwipe=false;
if(Math.abs(vDistance) >=2 * vSwipMinDistance&&Math.abs(vDistance) > Math.abs(vDistanceLast)){
var vOffset=vDistance > 0 ? slider.height():- slider.height();
slider.animate({ top: vOffset + 'px', 'opacity': 0 },
300,
function (){
$this.closeSlide();
});
}else{
slider.animate({ top: 0, 'opacity': 1 }, 300);
}}else if(hSwipe){
hSwipe=false;
if(hDistance >=hSwipMinDistance&&hDistance >=hDistanceLast){
$this.getPrev();
}else if(hDistance <=-hSwipMinDistance&&hDistance <=hDistanceLast){
$this.getNext();
}}else{
if(! bars.hasClass('visible-bars')){
$this.showBars();
$this.setTimeout();
}else{
$this.clearTimeout();
$this.hideBars();
}}
$('#swipebox-slider').css({
'-webkit-transform':'translate3d(' + currentX + '%, 0, 0)',
'transform':'translate3d(' + currentX + '%, 0, 0)'
});
$('#swipebox-overlay').removeClass('leftSpringTouch').removeClass('rightSpringTouch');
$('.touching').off('touchmove').removeClass('touching');
});
},
setTimeout: function (){
if(plugin.settings.hideBarsDelay > 0){
var $this=this;
$this.clearTimeout();
$this.timeout=window.setTimeout(function(){
$this.hideBars();
},
plugin.settings.hideBarsDelay
);
}},
clearTimeout: function (){
window.clearTimeout(this.timeout);
this.timeout=null;
},
showBars:function (){
var bars=$('#swipebox-top-bar, #swipebox-bottom-bar');
if(this.doCssTrans()){
bars.addClass('visible-bars');
}else{
$('#swipebox-top-bar').animate({ top:0 }, 500);
$('#swipebox-bottom-bar').animate({ bottom:0 }, 500);
setTimeout(function(){
bars.addClass('visible-bars');
}, 1000);
}},
hideBars:function (){
var bars=$('#swipebox-top-bar, #swipebox-bottom-bar');
if(this.doCssTrans()){
bars.removeClass('visible-bars');
}else{
$('#swipebox-top-bar').animate({ top:'-50px' }, 500);
$('#swipebox-bottom-bar').animate({ bottom:'-50px' }, 500);
setTimeout(function(){
bars.removeClass('visible-bars');
}, 1000);
}},
animBars:function (){
var $this=this,
bars=$('#swipebox-top-bar, #swipebox-bottom-bar');
bars.addClass('visible-bars');
$this.setTimeout();
$('#swipebox-slider').click(function(){
if(! bars.hasClass('visible-bars')){
$this.showBars();
$this.setTimeout();
}});
$('#swipebox-bottom-bar').hover(function(){
$this.showBars();
bars.addClass('visible-bars');
$this.clearTimeout();
}, function(){
if(plugin.settings.hideBarsDelay > 0){
bars.removeClass('visible-bars');
$this.setTimeout();
}});
},
keyboard:function (){
var $this=this;
$(window).bind('keyup', function(event){
event.preventDefault();
event.stopPropagation();
if(event.keyCode===37){
$this.getPrev();
}else if(event.keyCode===39){
$this.getNext();
}else if(event.keyCode===27){
$this.closeSlide();
}});
},
actions:function (){
var $this=this,
action='touchend click';
if(elements.length < 2){
$('#swipebox-bottom-bar').hide();
if(undefined===elements[ 1 ]){
$('#swipebox-top-bar').hide();
}}else{
$('#swipebox-prev').bind(action, function(event){
event.preventDefault();
event.stopPropagation();
$this.getPrev();
$this.setTimeout();
});
$('#swipebox-next').bind(action, function(event){
event.preventDefault();
event.stopPropagation();
$this.getNext();
$this.setTimeout();
});
}
$('#swipebox-close').bind(action, function(){
$this.closeSlide();
});
},
setSlide:function(index, isFirst){
isFirst=isFirst||false;
var slider=$('#swipebox-slider');
currentX=-index*100;
if(this.doCssTrans()){
slider.css({
'-webkit-transform':'translate3d(' + (-index*100)+'%, 0, 0)',
'transform':'translate3d(' + (-index*100)+'%, 0, 0)'
});
}else{
slider.animate({ left:(-index*100)+'%' });
}
$('#swipebox-slider .slide').removeClass('current');
$('#swipebox-slider .slide').eq(index).addClass('current');
this.setTitle(index);
if(isFirst){
slider.fadeIn();
}
$('#swipebox-prev, #swipebox-next').removeClass('disabled');
if(index===0){
$('#swipebox-prev').addClass('disabled');
}else if(index===elements.length - 1&&plugin.settings.loopAtEnd!==true){
$('#swipebox-next').addClass('disabled');
}},
openSlide:function(index){
$('html').addClass('swipebox-html');
if(isTouch){
$('html').addClass('swipebox-touch');
if(plugin.settings.hideCloseButtonOnMobile){
$('html').addClass('swipebox-no-close-button');
}}else{
$('html').addClass('swipebox-no-touch');
}
$(window).trigger('resize');
this.setSlide(index, true);
},
preloadMedia:function(index){
var $this=this,
src=null;
if(elements[ index ]!==undefined){
src=elements[ index ].href;
}
if(! $this.isVideo(src)){
setTimeout(function(){
$this.openMedia(index);
}, 1000);
}else{
$this.openMedia(index);
}},
openMedia:function(index){
var $this=this,
src,
slide;
if(elements[ index ]!==undefined){
src=elements[ index ].href;
}
if(index < 0||index >=elements.length){
return false;
}
slide=$('#swipebox-slider .slide').eq(index);
if(! $this.isVideo(src)){
slide.addClass('slide-loading');
$this.loadMedia(src, function(){
slide.removeClass('slide-loading');
slide.html(this);
});
}else{
slide.html($this.getVideo(src));
}},
setTitle:function(index){
var title=null;
$('#swipebox-title').empty();
if(elements[ index ]!==undefined){
title=elements[ index ].title;
}
if(title){
$('#swipebox-top-bar').show();
$('#swipebox-title').append(title);
}else{
$('#swipebox-top-bar').hide();
}},
isVideo:function(src){
if(src){
if(src.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||src.match(/vimeo\.com\/([0-9]*)/)||src.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)){
return true;
}
if(src.toLowerCase().indexOf('swipeboxvideo=1') >=0){
return true;
}}
},
parseUri:function (uri, customData){
var a=document.createElement('a'),
qs={};
a.href=decodeURIComponent(uri);
if(a.search){
qs=JSON.parse('{"' + a.search.toLowerCase().replace('?','').replace(/&/g,'","').replace(/=/g,'":"') + '"}');
}
if($.isPlainObject(customData)){
qs=$.extend(qs, customData, plugin.settings.queryStringData);
}
return $
.map(qs, function (val, key){
if(val&&val > ''){
return encodeURIComponent(key) + '=' + encodeURIComponent(val);
}})
.join('&');
},
getVideo:function(url){
var iframe='',
youtubeUrl=url.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),
youtubeShortUrl=url.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),
vimeoUrl=url.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),
qs='';
if(youtubeUrl||youtubeShortUrl){
if(youtubeShortUrl){
youtubeUrl=youtubeShortUrl;
}
qs=ui.parseUri(url, {
'autoplay':(plugin.settings.autoplayVideos ? '1':'0'),
'v':''
});
iframe='
';
}else if(vimeoUrl){
qs=ui.parseUri(url, {
'autoplay':(plugin.settings.autoplayVideos ? '1':'0'),
'byline':'0',
'portrait':'0',
'color': plugin.settings.vimeoColor
});
iframe='
';
}else{
iframe='
';
}
return '
';
},
loadMedia:function(src, callback){
if(src.trim().indexOf('#')===0){
callback.call($('
', {
'class':'swipebox-inline-container'
})
.append($(src)
.clone()
.toggleClass(plugin.settings.toggleClassOnLoad)
)
);
}else{
if(! this.isVideo(src)){
var img=$('
').on('load', function(){
callback.call(img);
});
img.attr('src', src);
}}
},
getNext:function (){
var $this=this,
src,
index=$('#swipebox-slider .slide').index($('#swipebox-slider .slide.current'));
if(index + 1 < elements.length){
src=$('#swipebox-slider .slide').eq(index).contents().find('iframe').attr('src');
$('#swipebox-slider .slide').eq(index).contents().find('iframe').attr('src', src);
index++;
$this.setSlide(index);
$this.preloadMedia(index+1);
if(plugin.settings.nextSlide){
plugin.settings.nextSlide();
}}else{
if(plugin.settings.loopAtEnd===true){
src=$('#swipebox-slider .slide').eq(index).contents().find('iframe').attr('src');
$('#swipebox-slider .slide').eq(index).contents().find('iframe').attr('src', src);
index=0;
$this.preloadMedia(index);
$this.setSlide(index);
$this.preloadMedia(index + 1);
if(plugin.settings.nextSlide){
plugin.settings.nextSlide();
}}else{
$('#swipebox-overlay').addClass('rightSpring');
setTimeout(function(){
$('#swipebox-overlay').removeClass('rightSpring');
}, 500);
}}
},
getPrev:function (){
var index=$('#swipebox-slider .slide').index($('#swipebox-slider .slide.current')),
src;
if(index > 0){
src=$('#swipebox-slider .slide').eq(index).contents().find('iframe').attr('src');
$('#swipebox-slider .slide').eq(index).contents().find('iframe').attr('src', src);
index--;
this.setSlide(index);
this.preloadMedia(index-1);
if(plugin.settings.prevSlide){
plugin.settings.prevSlide();
}}else{
$('#swipebox-overlay').addClass('leftSpring');
setTimeout(function(){
$('#swipebox-overlay').removeClass('leftSpring');
}, 500);
}},
nextSlide:function (){
},
prevSlide:function (){
},
closeSlide:function (){
$('html').removeClass('swipebox-html');
$('html').removeClass('swipebox-touch');
$(window).trigger('resize');
this.destroy();
},
destroy:function (){
$(window).unbind('keyup');
$('body').unbind('touchstart');
$('body').unbind('touchmove');
$('body').unbind('touchend');
$('#swipebox-slider').unbind();
$('#swipebox-overlay').remove();
if(! $.isArray(elem)){
elem.removeData('_swipebox');
}
if(this.target){
this.target.trigger('swipebox-destroy');
}
$.swipebox.isOpen=false;
if(plugin.settings.afterClose){
plugin.settings.afterClose();
}}
};
plugin.init();
};
$.fn.swipebox=function(options){
if(! $.data(this, '_swipebox')){
var swipebox=new $.swipebox(this, options);
this.data('_swipebox', swipebox);
}
return this.data('_swipebox');
};}(window, document, jQuery));
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new o(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',o=function(e){t(e).on("click",i,this.close)};o.VERSION="3.3.6",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function i(){a.detach().trigger("closed.bs.alert").remove()}var n=t(this),s=n.attr("data-target");s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var a=t(s);e&&e.preventDefault(),a.length||(a=n.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,o.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.button"),s="object"==typeof e&&e;n||o.data("bs.button",n=new i(this,s)),"toggle"==e?n.toggle():e&&n.setState(e)})}var i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.isLoading=!1};i.VERSION="3.3.6",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",o=this.$element,n=o.is("input")?"val":"html",s=o.data();e+="Text",null==s.resetText&&o.data("resetText",o[n]()),setTimeout(t.proxy(function(){o[n](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,o.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var o=t(i.target);o.hasClass("btn")||(o=o.closest(".btn")),e.call(o,"toggle"),t(i.target).is('input[type="radio"]')||t(i.target).is('input[type="checkbox"]')||i.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.carousel"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e),a="string"==typeof e?e:s.slide;n||o.data("bs.carousel",n=new i(this,s)),"number"==typeof e?n.to(e):a?n[a]():s.interval&&n.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.6",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),o="prev"==t&&0===i||"next"==t&&i==this.$items.length-1;if(o&&!this.options.wrap)return e;var n="prev"==t?-1:1,s=(i+n)%this.$items.length;return this.$items.eq(s)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,o){var n=this.$element.find(".item.active"),s=o||this.getItemForDirection(e,n),a=this.interval,r="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var h=s[0],d=t.Event("slide.bs.carousel",{relatedTarget:h,direction:r});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=t(this.$indicators.children()[this.getItemIndex(s)]);p&&p.addClass("active")}var c=t.Event("slid.bs.carousel",{relatedTarget:h,direction:r});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,n.addClass(r),s.addClass(r),n.one("bsTransitionEnd",function(){s.removeClass([e,r].join(" ")).addClass("active"),n.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(c)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(n.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(c)),a&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var n=function(i){var o,n=t(this),s=t(n.attr("data-target")||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var a=t.extend({},s.data(),n.data()),r=n.attr("data-slide-to");r&&(a.interval=!1),e.call(s,a),r&&s.data("bs.carousel").to(r),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",n).on("click.bs.carousel.data-api","[data-slide-to]",n),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}function i(i){i&&3===i.which||(t(n).remove(),t(s).each(function(){var o=t(this),n=e(o),s={relatedTarget:this};n.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(n[0],i.target)||(n.trigger(i=t.Event("hide.bs.dropdown",s)),i.isDefaultPrevented()||(o.attr("aria-expanded","false"),n.removeClass("open").trigger(t.Event("hidden.bs.dropdown",s)))))}))}function o(e){return this.each(function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new a(this)),"string"==typeof e&&o[e].call(i)})}var n=".dropdown-backdrop",s='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.6",a.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=e(n),a=s.hasClass("open");if(i(),!a){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var r={relatedTarget:this};if(s.trigger(o=t.Event("show.bs.dropdown",r)),o.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger(t.Event("shown.bs.dropdown",r))}return!1}},a.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var o=t(this);if(i.preventDefault(),i.stopPropagation(),!o.is(".disabled, :disabled")){var n=e(o),a=n.hasClass("open");if(!a&&27!=i.which||a&&27==i.which)return 27==i.which&&n.find(s).trigger("focus"),o.trigger("click");var r=" li:not(.disabled):visible a",l=n.find(".dropdown-menu"+r);if(l.length){var h=l.index(i.target);38==i.which&&h>0&&h--,40==i.which&&h
document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,o){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var n=this.options.trigger.split(" "),s=n.length;s--;){var a=n[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var n=this,s=this.tip(),a=this.getUID(this.type);this.setContent(),s.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&s.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,h=l.test(r);h&&(r=r.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var d=this.getPosition(),p=s[0].offsetWidth,c=s[0].offsetHeight;if(h){var f=r,u=this.getPosition(this.$viewport);r="bottom"==r&&d.bottom+c>u.bottom?"top":"top"==r&&d.top-c
u.width?"left":"left"==r&&d.left-pa.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;ha.right&&(n.left=a.left+a.width-d)}return n},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.popover"),s="object"==typeof e&&e;(n||!/destroy|hide/.test(e))&&(n||o.data("bs.popover",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.6",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tab");n||o.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.6",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),o=e.data("target");if(o||(o=e.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(s),e.trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){var r=t(o);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,o,n){function s(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var a=o.find("> .active"),r=n&&t.support.transition&&(a.length&&a.hasClass("fade")||!!o.find("> .fade").length);a.length&&r?a.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.affix"),s="object"==typeof e&&e;n||o.data("bs.affix",n=new i(this,s)),"string"==typeof e&&n[e]()})}var i=function(e,o){this.options=t.extend({},i.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.6",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return i>n?"top":!1;if("bottom"==this.affixed)return null!=i?n+this.unpin<=s.top?!1:"bottom":t-o>=n+a?!1:"bottom";var r=null==this.affixed,l=r?n:s.top,h=r?a:e;return null!=i&&i>=n?"top":null!=o&&l+h>=t-o?"bottom":!1},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),o=this.options.offset,n=o.top,s=o.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof o&&(s=n=o),"function"==typeof n&&(n=o.top(this.$element)),"function"==typeof s&&(s=o.bottom(this.$element));var r=this.getState(a,e,n,s);if(this.affixed!=r){null!=this.unpin&&this.$element.css("top","");var l="affix"+(r?"-"+r:""),h=t.Event(l+".bs.affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=r,this.unpin="bottom"==r?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==r&&this.$element.offset({top:a-e-s})}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),o=i.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),e.call(i,o)})})}(jQuery),+function(t){"use strict";function e(e){var i,o=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),s=t.extend({},o.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),n||i.data("bs.collapse",n=new o(this,s)),"string"==typeof e&&n[e]()})}var o=function(e,i){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.6",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(e=n.data("bs.collapse"),e&&e.transitioning))){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l]);
}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(o.TRANSITION_DURATION):n.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,o){var n=t(o);this.addAriaAndCollapsedClass(e(n),n)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var n=t(this);n.attr("data-target")||o.preventDefault();var s=e(n),a=s.data("bs.collapse"),r=a?"toggle":n.data();i.call(s,r)})}(jQuery),+function(t){"use strict";function e(i,o){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,o),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var o=t(this),n=o.data("bs.scrollspy"),s="object"==typeof i&&i;n||o.data("bs.scrollspy",n=new e(this,s)),"string"==typeof i&&n[i]()})}e.VERSION="3.3.6",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),n=e.data("target")||e.attr("href"),s=/^#./.test(n)&&t(n);return s&&s.length&&s.is(":visible")&&[[s[i]().top+o,n]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=o)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e=n[t]&&(void 0===n[t+1]||e=(365.25 * 86400)){
dateData.years=Math.floor(diff / (365.25 * 86400));
diff -=dateData.years * 365.25 * 86400;
}
if(diff >=86400){
dateData.days=Math.floor(diff / 86400);
diff -=dateData.days * 86400;
}
if(diff >=3600){
dateData.hours=Math.floor(diff / 3600);
diff -=dateData.hours * 3600;
}
if(diff >=60){
dateData.min=Math.floor(diff / 60);
diff -=dateData.min * 60;
}
dateData.sec=Math.round(diff);
dateData.millisec=diff % 1 * 1000;
return dateData;
}.bind(this);
this.leadingZeros=function(num, length){
length=length||2;
num=String(num);
if(num.length > length){
return num;
}
return (Array(length + 1).join('0') + num).substr(-length);
};
this.update=function(newDate){
if(typeof newDate!=='object'){
newDate=new Date(newDate);
}
this.options.date=newDate;
this.render();
return this;
}.bind(this);
this.stop=function(){
if(this.interval){
clearInterval(this.interval);
this.interval=false;
}
return this;
}.bind(this);
this.render=function(){
this.options.render(this.getDiffDate());
return this;
}.bind(this);
this.start=function(){
if(this.interval){ return; }
this.render();
if(this.options.refresh){
this.interval=setInterval(this.render, this.options.refresh);
}
return this;
}.bind(this);
this.updateOffset=function(offset){
this.options.offset=offset;
return this;
}.bind(this);
this.start();
};
module.exports=Countdown;
},{}],2:[function(require,module,exports){
var Countdown=require('./countdown.js');
var NAME='countdown';
var DATA_ATTR='date';
jQuery.fn.countdown=function(options){
return jQuery.each(this, function(i, el){
var $el=jQuery(el);
if(!$el.data(NAME)){
if($el.data(DATA_ATTR)){
options.date=$el.data(DATA_ATTR);
}
$el.data(NAME, new Countdown(el, options));
}});
};
module.exports=Countdown;
},{"./countdown.js":1}]},{},[2])(2)
});
(function(){
var MutationObserver, Util, WeakMap, getComputedStyle, getComputedStyleRX,
bind=function(fn, me){ return function(){ return fn.apply(me, arguments); };},
indexOf=[].indexOf||function(item){ for (var i=0, l=this.length; i < l; i++){ if(i in this&&this[i]===item) return i; } return -1; };
Util=(function(){
function Util(){}
Util.prototype.extend=function(custom, defaults){
var key, value;
for (key in defaults){
value=defaults[key];
if(custom[key]==null){
custom[key]=value;
}}
return custom;
};
Util.prototype.isMobile=function(agent){
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(agent);
};
Util.prototype.createEvent=function(event, bubble, cancel, detail){
var customEvent;
if(bubble==null){
bubble=false;
}
if(cancel==null){
cancel=false;
}
if(detail==null){
detail=null;
}
if(document.createEvent!=null){
customEvent=document.createEvent('CustomEvent');
customEvent.initCustomEvent(event, bubble, cancel, detail);
}else if(document.createEventObject!=null){
customEvent=document.createEventObject();
customEvent.eventType=event;
}else{
customEvent.eventName=event;
}
return customEvent;
};
Util.prototype.emitEvent=function(elem, event){
if(elem.dispatchEvent!=null){
return elem.dispatchEvent(event);
}else if(event in (elem!=null)){
return elem[event]();
}else if(("on" + event) in (elem!=null)){
return elem["on" + event]();
}};
Util.prototype.addEvent=function(elem, event, fn){
if(elem.addEventListener!=null){
return elem.addEventListener(event, fn, false);
}else if(elem.attachEvent!=null){
return elem.attachEvent("on" + event, fn);
}else{
return elem[event]=fn;
}};
Util.prototype.removeEvent=function(elem, event, fn){
if(elem.removeEventListener!=null){
return elem.removeEventListener(event, fn, false);
}else if(elem.detachEvent!=null){
return elem.detachEvent("on" + event, fn);
}else{
return delete elem[event];
}};
Util.prototype.innerHeight=function(){
if('innerHeight' in window){
return window.innerHeight;
}else{
return document.documentElement.clientHeight;
}};
return Util;
})();
WeakMap=this.WeakMap||this.MozWeakMap||(WeakMap=(function(){
function WeakMap(){
this.keys=[];
this.values=[];
}
WeakMap.prototype.get=function(key){
var i, item, j, len, ref;
ref=this.keys;
for (i=j = 0, len=ref.length; j < len; i=++j){
item=ref[i];
if(item===key){
return this.values[i];
}}
};
WeakMap.prototype.set=function(key, value){
var i, item, j, len, ref;
ref=this.keys;
for (i=j = 0, len=ref.length; j < len; i=++j){
item=ref[i];
if(item===key){
this.values[i]=value;
return;
}}
this.keys.push(key);
return this.values.push(value);
};
return WeakMap;
})());
MutationObserver=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(MutationObserver=(function(){
function MutationObserver(){
if(typeof console!=="undefined"&&console!==null){
console.warn('MutationObserver is not supported by your browser.');
}
if(typeof console!=="undefined"&&console!==null){
console.warn('WOW.js cannot detect dom mutations, please call .sync() after loading new content.');
}}
MutationObserver.notSupported=true;
MutationObserver.prototype.observe=function(){};
return MutationObserver;
})());
getComputedStyle=this.getComputedStyle||function(el, pseudo){
this.getPropertyValue=function(prop){
var ref;
if(prop==='float'){
prop='styleFloat';
}
if(getComputedStyleRX.test(prop)){
prop.replace(getComputedStyleRX, function(_, _char){
return _char.toUpperCase();
});
}
return ((ref=el.currentStyle)!=null ? ref[prop]:void 0)||null;
};
return this;
};
getComputedStyleRX=/(\-([a-z]){1})/g;
this.WOW=(function(){
WOW.prototype.defaults={
boxClass: 'wow',
animateClass: 'animated',
offset: 0,
mobile: true,
live: true,
callback: null,
scrollContainer: null
};
function WOW(options){
if(options==null){
options={};}
this.scrollCallback=bind(this.scrollCallback, this);
this.scrollHandler=bind(this.scrollHandler, this);
this.resetAnimation=bind(this.resetAnimation, this);
this.start=bind(this.start, this);
this.scrolled=true;
this.config=this.util().extend(options, this.defaults);
if(options.scrollContainer!=null){
this.config.scrollContainer=document.querySelector(options.scrollContainer);
}
this.animationNameCache=new WeakMap();
this.wowEvent=this.util().createEvent(this.config.boxClass);
}
WOW.prototype.init=function(){
var ref;
this.element=window.document.documentElement;
if((ref=document.readyState)==="interactive"||ref==="complete"){
this.start();
}else{
this.util().addEvent(document, 'DOMContentLoaded', this.start);
}
return this.finished=[];
};
WOW.prototype.start=function(){
var box, j, len, ref;
this.stopped=false;
this.boxes=(function(){
var j, len, ref, results;
ref=this.element.querySelectorAll("." + this.config.boxClass);
results=[];
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
results.push(box);
}
return results;
}).call(this);
this.all=(function(){
var j, len, ref, results;
ref=this.boxes;
results=[];
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
results.push(box);
}
return results;
}).call(this);
if(this.boxes.length){
if(this.disabled()){
this.resetStyle();
}else{
ref=this.boxes;
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
this.applyStyle(box, true);
}}
}
if(!this.disabled()){
this.util().addEvent(this.config.scrollContainer||window, 'scroll', this.scrollHandler);
this.util().addEvent(window, 'resize', this.scrollHandler);
this.interval=setInterval(this.scrollCallback, 50);
}
if(this.config.live){
return new MutationObserver((function(_this){
return function(records){
var k, len1, node, record, results;
results=[];
for (k=0, len1=records.length; k < len1; k++){
record=records[k];
results.push((function(){
var l, len2, ref1, results1;
ref1=record.addedNodes||[];
results1=[];
for (l=0, len2=ref1.length; l < len2; l++){
node=ref1[l];
results1.push(this.doSync(node));
}
return results1;
}).call(_this));
}
return results;
};})(this)).observe(document.body, {
childList: true,
subtree: true
});
}};
WOW.prototype.stop=function(){
this.stopped=true;
this.util().removeEvent(this.config.scrollContainer||window, 'scroll', this.scrollHandler);
this.util().removeEvent(window, 'resize', this.scrollHandler);
if(this.interval!=null){
return clearInterval(this.interval);
}};
WOW.prototype.sync=function(element){
if(MutationObserver.notSupported){
return this.doSync(this.element);
}};
WOW.prototype.doSync=function(element){
var box, j, len, ref, results;
if(element==null){
element=this.element;
}
if(element.nodeType!==1){
return;
}
element=element.parentNode||element;
ref=element.querySelectorAll("." + this.config.boxClass);
results=[];
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
if(indexOf.call(this.all, box) < 0){
this.boxes.push(box);
this.all.push(box);
if(this.stopped||this.disabled()){
this.resetStyle();
}else{
this.applyStyle(box, true);
}
results.push(this.scrolled=true);
}else{
results.push(void 0);
}}
return results;
};
WOW.prototype.show=function(box){
this.applyStyle(box);
box.className=box.className + " " + this.config.animateClass;
if(this.config.callback!=null){
this.config.callback(box);
}
this.util().emitEvent(box, this.wowEvent);
this.util().addEvent(box, 'animationend', this.resetAnimation);
this.util().addEvent(box, 'oanimationend', this.resetAnimation);
this.util().addEvent(box, 'webkitAnimationEnd', this.resetAnimation);
this.util().addEvent(box, 'MSAnimationEnd', this.resetAnimation);
return box;
};
WOW.prototype.applyStyle=function(box, hidden){
var delay, duration, iteration;
duration=box.getAttribute('data-wow-duration');
delay=box.getAttribute('data-wow-delay');
iteration=box.getAttribute('data-wow-iteration');
return this.animate((function(_this){
return function(){
return _this.customStyle(box, hidden, duration, delay, iteration);
};})(this));
};
WOW.prototype.animate=(function(){
if('requestAnimationFrame' in window){
return function(callback){
return window.requestAnimationFrame(callback);
};}else{
return function(callback){
return callback();
};}})();
WOW.prototype.resetStyle=function(){
var box, j, len, ref, results;
ref=this.boxes;
results=[];
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
results.push(box.style.visibility='visible');
}
return results;
};
WOW.prototype.resetAnimation=function(event){
var target;
if(event.type.toLowerCase().indexOf('animationend') >=0){
target=event.target||event.srcElement;
return target.className=target.className.replace(this.config.animateClass, '').trim();
}};
WOW.prototype.customStyle=function(box, hidden, duration, delay, iteration){
if(hidden){
this.cacheAnimationName(box);
}
box.style.visibility=hidden ? 'hidden':'visible';
if(duration){
this.vendorSet(box.style, {
animationDuration: duration
});
}
if(delay){
this.vendorSet(box.style, {
animationDelay: delay
});
}
if(iteration){
this.vendorSet(box.style, {
animationIterationCount: iteration
});
}
this.vendorSet(box.style, {
animationName: hidden ? 'none':this.cachedAnimationName(box)
});
return box;
};
WOW.prototype.vendors=["moz", "webkit"];
WOW.prototype.vendorSet=function(elem, properties){
var name, results, value, vendor;
results=[];
for (name in properties){
value=properties[name];
elem["" + name]=value;
results.push((function(){
var j, len, ref, results1;
ref=this.vendors;
results1=[];
for (j=0, len=ref.length; j < len; j++){
vendor=ref[j];
results1.push(elem["" + vendor + (name.charAt(0).toUpperCase()) + (name.substr(1))]=value);
}
return results1;
}).call(this));
}
return results;
};
WOW.prototype.vendorCSS=function(elem, property){
var j, len, ref, result, style, vendor;
style=getComputedStyle(elem);
result=style.getPropertyCSSValue(property);
ref=this.vendors;
for (j=0, len=ref.length; j < len; j++){
vendor=ref[j];
result=result||style.getPropertyCSSValue("-" + vendor + "-" + property);
}
return result;
};
WOW.prototype.animationName=function(box){
var animationName;
try {
animationName=this.vendorCSS(box, 'animation-name').cssText;
} catch (_error){
animationName=getComputedStyle(box).getPropertyValue('animation-name');
}
if(animationName==='none'){
return '';
}else{
return animationName;
}};
WOW.prototype.cacheAnimationName=function(box){
return this.animationNameCache.set(box, this.animationName(box));
};
WOW.prototype.cachedAnimationName=function(box){
return this.animationNameCache.get(box);
};
WOW.prototype.scrollHandler=function(){
return this.scrolled=true;
};
WOW.prototype.scrollCallback=function(){
var box;
if(this.scrolled){
this.scrolled=false;
this.boxes=(function(){
var j, len, ref, results;
ref=this.boxes;
results=[];
for (j=0, len=ref.length; j < len; j++){
box=ref[j];
if(!(box)){
continue;
}
if(this.isVisible(box)){
this.show(box);
continue;
}
results.push(box);
}
return results;
}).call(this);
if(!(this.boxes.length||this.config.live)){
return this.stop();
}}
};
WOW.prototype.offsetTop=function(element){
var top;
while (element.offsetTop===void 0){
element=element.parentNode;
}
top=element.offsetTop;
while (element=element.offsetParent){
top +=element.offsetTop;
}
return top;
};
WOW.prototype.isVisible=function(box){
var bottom, offset, top, viewBottom, viewTop;
offset=box.getAttribute('data-wow-offset')||this.config.offset;
viewTop=(this.config.scrollContainer&&this.config.scrollContainer.scrollTop)||window.pageYOffset;
viewBottom=viewTop + Math.min(this.element.clientHeight, this.util().innerHeight()) - offset;
top=this.offsetTop(box);
bottom=top + box.clientHeight;
return top <=viewBottom&&bottom >=viewTop;
};
WOW.prototype.util=function(){
return this._util!=null ? this._util:this._util=new Util();
};
WOW.prototype.disabled=function(){
return !this.config.mobile&&this.util().isMobile(navigator.userAgent);
};
return WOW;
})();
}).call(this);
(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("wolfy87-eventemitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(window,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function f(e){this.img=e}function c(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);var i=n.nodeType;if(i&&(1===i||9===i||11===i))for(var r=n.querySelectorAll("img"),o=0,s=r.length;s>o;o++){var f=r[o];this.addImage(f)}}},s.prototype.addImage=function(e){var t=new f(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),f.prototype=new t,f.prototype.check=function(){var e=v[this.img.src]||new c(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},f.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return c.prototype=new t,c.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},c.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s});
;(function($){
'use strict';
$.fn.fitVids=function(options){
var settings={
customSelector: null,
ignore: null
};
if(!document.getElementById('fit-vids-style')){
var head=document.head||document.getElementsByTagName('head')[0];
var css='.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
var div=document.createElement("div");
div.innerHTML='x
';
head.appendChild(div.childNodes[1]);
}
if(options){
$.extend(settings, options);
}
return this.each(function(){
var selectors=[
'iframe[src*="player.vimeo.com"]',
'iframe[src*="youtube.com"]',
'iframe[src*="youtube-nocookie.com"]',
'iframe[src*="kickstarter.com"][src*="video.html"]',
'object',
'embed'
];
if(settings.customSelector){
selectors.push(settings.customSelector);
}
var ignoreList='.fitvidsignore';
if(settings.ignore){
ignoreList=ignoreList + ', ' + settings.ignore;
}
var $allVideos=$(this).find(selectors.join(','));
$allVideos=$allVideos.not('object object');
$allVideos=$allVideos.not(ignoreList);
$allVideos.each(function(count){
var $this=$(this);
if($this.parents(ignoreList).length > 0){
return;
}
if(this.tagName.toLowerCase()==='embed'&&$this.parent('object').length||$this.parent('.fluid-width-video-wrapper').length){ return; }
if((!$this.css('height')&&!$this.css('width'))&&(isNaN($this.attr('height'))||isNaN($this.attr('width')))){
$this.attr('height', 9);
$this.attr('width', 16);
}
var height=(this.tagName.toLowerCase()==='object'||($this.attr('height')&&!isNaN(parseInt($this.attr('height'), 10)))) ? parseInt($this.attr('height'), 10):$this.height(),
width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10):$this.width(),
aspectRatio=height / width;
if(!$this.attr('id')){
var videoID='fitvid' + count;
$this.attr('id', videoID);
}
$this.wrap('').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
$this.removeAttr('height').removeAttr('width');
});
});
};})(window.jQuery||window.Zepto);
jQuery(document).ready(function($){
'use strict';
$('.saturnthemes-toggle .saturnthemes-toggle-btn').on('click', function(){
$('.saturnthemes-toggle').toggleClass('open');
});
$('[data-toggle="tooltip"]').tooltip();
var $search_btn=$('.header-search > i'),
$search_form=$('.header-search .search-form');
$search_btn.on('click', function(){
$search_form.toggleClass('open');
});
var wow=new WOW({
boxClass: 'wow-animation',
animateClass: 'animated',
offset: 0,
mobile: true,
live: true
});
wow.init();
$('.mobile-menu .mobile-menu-toggle').on('click', function(){
$(this).parent('.menu-item').toggleClass('open');
return false;
});
$(".mobile-search").on("click", function(){
$("#search-mobile-toggle").toggle(200);
});
var $searchContainer=$('.full-screen-search-container ');
$('#js-search-overlay').on('click', function(evt){
evt.preventDefault();
$searchContainer.addClass('open');
$searchContainer.find('.search-field')[0].focus();
});
$searchContainer.on('click', function(evt){
if(!$(evt.target).parents('.search-form').length){
evt.preventDefault();
$searchContainer.removeClass('open');
}});
$(".container").fitVids();
$(".post-gallery").slick({
dots: false,
infinite: true,
arrows: true,
prevArrow: '',
nextArrow: '',
speed: 500,
adaptiveHeight: true
});
if($.fn.waypoint){
$('.counter-container').waypoint(function(){
var $this=$(this);
if($this.data('waypoint-run')){
return;
}
var $counter=$(this).find('.counter'),
value=$counter.data('value'),
decimalCount=value.toString().split('.'),
duration=$counter.data('speed'),
separator=$counter.data('separator'),
decimalPoint=$counter.data('decimal');
if(decimalCount[1]){
decimalCount=decimalCount[1].length - 1;
}else{
decimalCount=0;
}
var counter=new CountUp($counter.attr('id'), 0, value, decimalCount, duration, {
separator: separator,
decimal: decimalPoint
});
counter.start();
$this.data('waypoint-run', true);
}, { offset: '85%' });
}
$('.testimonial-container').each(function(){
var $testimonialContainer=$(this);
$testimonialContainer.find('.testimonial-list').slick({
mobileFirst: true,
fade: ($testimonialContainer.data('items')==1) ? true:false,
dots: $testimonialContainer.data('dots') ? true:false,
arrows: $testimonialContainer.data('nav') ? true:false,
prevArrow: '',
nextArrow: '',
autoplay: $testimonialContainer.data('autoplay') ? true:false,
responsive: [{
breakpoint: 1024,
settings: {
slidesToShow: $testimonialContainer.data('items'),
slidesToScroll: $testimonialContainer.data('items'),
}},
{
breakpoint: 766,
settings: {
slidesToShow: 2,
slidesToScroll: 1,
}},
{
breakpoint: 481,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
}}
]
});
});
if(saturnthemes_industry_params.promo_popup_show==1){
var cookieKey='promo_popup_hide',
hidePopupRegex=new RegExp(cookieKey + '=1');
if(!hidePopupRegex.test(document.cookie)){
$.magnificPopup.open({
items: {
src: '#promo-popup',
type: 'inline'
},
removalDelay: 300
});
}
$('#promo-popup-checkbox').on('click', function(){
if($(this).prop('checked')){
document.cookie=cookieKey + '=1;expires=1;path=/';
}else{
document.cookie=cookieKey + '=0;expires=1;path=/';
}});
}
var $window=$(window);
var $scrollup=$('.scrollup');
$window.scroll(function(){
if($window.scrollTop() > 2500){
$scrollup.addClass('show');
}else{
$scrollup.removeClass('show');
}});
$scrollup.on('click', function(evt){
$("html, body").animate({ scrollTop: 0 }, 600);
evt.preventDefault();
});
var $quantityContainer=$('.quantity-container');
if($quantityContainer.length){
$quantityContainer.find('.quantity-up, .quantity-down').on('click', function(){
var $input=$(this).closest('.quantity-container').find('input'),
step=$input.data('step'),
min=$input.data('min')||1,
max=$input.data('max'),
value=parseInt($input.val());
if($(this).is('.quantity-up')&&(!max||max >=value + step)){
value +=step;
}else if($(this).is('.quantity-down')&&(min <=value - step)){
value -=step;
}
$input.val(value);
$input.trigger('change');
return false;
});
}});
/*function func_click(namen, namep){
var carbutnext=document.getElementById("car_but_next");
var carbutprev=document.getElementById("car_but_prev");
if(carbutprev!==null&&carbutnext!==null){
var n=document.getElementsByClassName("perform-sys")[0];
carbutnext.onclick=function(){
n.getElementsByClassName(namen)[0].click();
}
carbutprev.onclick=function(){
n.getElementsByClassName(namep)[0].click();
}}
}
*/
function cBool(m){
if(isNaN(m)){
if(typeof(m)==="string"){
return m.toLowerCase()==="true";
}}else{
return Number(m) > 0;
}
return m;
}
addEventListener('load', function(){
ns_preload_animation.remove();
document.body.classList.remove("body-hidden");
jQuery(function($){
var elements=document.getElementsByClassName("vc_owlcarousel");
for (var i=0; i < elements.length; i++){
var element=elements[i];
console.log(element.dataset);
$(element).owlCarousel({
margin: element.dataset.margin!==undefined ? parseInt(element.dataset.margin):10,
loop: element.dataset.loop!==undefined ? cBool(element.dataset.loop):false,
nav: element.dataset.nav!==undefined ? cBool(element.dataset.nav):false,
mouseDrag: element.dataset.mousedrag!==undefined ? cBool(element.dataset.mousedrag):false,
dots: element.dataset.dots!==undefined ? cBool(element.dataset.dots):false,
autoplay: element.dataset.autoplay!==undefined ? cBool(element.dataset.autoplay):false,
center: element.dataset.center!==undefined ? cBool(element.dataset.center):false,
navText: ['', ''],
responsive: {
0: {
items: 1
},
600: {
items: 2
},
1000: {
items: element.dataset.num_items!==undefined ? parseInt(element.dataset.num_items):4
}},
});
}});
});
!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
function vc_js(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_googleplus(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_google_fonts(),vc_gridBehaviour(),vc_rowBehaviour(),vc_googleMapsPointer(),vc_ttaActivation(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}function getSizeName(){var screen_w=jQuery(window).width();return 1170screen_w?"desktop":768screen_w?"tablet":300screen_w?"mobile":300>screen_w?"mobile_portrait":""}function loadScript(url,$obj,callback){var script=document.createElement("script");script.type="text/javascript",script.readyState&&(script.onreadystatechange=function(){"loaded"!==script.readyState&&"complete"!==script.readyState||(script.onreadystatechange=null,callback())}),script.src=url,$obj.get(0).appendChild(script)}function vc_ttaActivation(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var $=window.jQuery,ui={};ui.newPanel=$(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,ui)})}function vc_accordionActivate(event,ui){if(ui.newPanel.length&&ui.newHeader.length){var $pie_charts=ui.newPanel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=ui.newPanel.find(".vc_round-chart"),$line_charts=ui.newPanel.find(".vc_line-chart"),$carousel=ui.newPanel.find('[data-ride="vc_carousel"]');void 0!==jQuery.fn.isotope&&ui.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),vc_carouselBehaviour(ui.newPanel),vc_plugin_flexslider(ui.newPanel),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),ui.newPanel.parents(".isotope").length&&ui.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}}function initVideoBackgrounds(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}function vc_initVideoBackgrounds(){jQuery("[data-vc-video-bg]").each(function(){var youtubeUrl,youtubeId,$element=jQuery(this);$element.data("vcVideoBg")?(youtubeUrl=$element.data("vcVideoBg"),youtubeId=vcExtractYoutubeId(youtubeUrl),youtubeId&&($element.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground($element,youtubeId)),jQuery(window).on("grid:items:added",function(event,$grid){$element.has($grid).length&&vcResizeVideoBackground($element)})):$element.find(".vc_video-bg").remove()})}function insertYoutubeVideoAsBackground($element,youtubeId,counter){if("undefined"==typeof YT||void 0===YT.Player)return 100<(counter=void 0===counter?0:counter)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground($element,youtubeId,counter++)},100);var $container=$element.prepend('').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}function vcResizeVideoBackground($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px",iframeW+="px",iframeH+="px"):(iframeW=containerW,iframeH=containerW*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px",iframeW+="px",iframeH+="px"),$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}function vcExtractYoutubeId(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}function vc_googleMapsPointer(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.click(function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.mouseleave(function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",function(){for(var prefix=["-webkit-","-moz-","-ms-","-o-",""],i=0;iparseInt(ver[1]);$call.each(function(index){var $tabs,interval=jQuery(this).attr("data-interval"),tabs_array=[];if($tabs=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(event,ui){wpb_prepare_tab_content(event,ui)},beforeActivate:function(event,ui){1!==ui.newPanel.index()&&ui.newPanel.find(".vc_pie_chart:not(.vc_ready)")},activate:function(event,ui){wpb_prepare_tab_content(event,ui)}}),interval&&0index?index=$tabs.tabs("length")-1:index>=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)}else{var index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length;index=jQuery(this).parent().hasClass("wpb_next_slide")?index+1>=length?0:index+1:0>index-1?length-1:index-1,$tabs.tabs("option","active",index)}})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,$this=jQuery(this),active_tab=($this.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).click(function(e){e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1");var carousele_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousele_li.css({"margin-right":carousele_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).resize(function(){var before_resize=screen_size;screen_size=getSizeName(),before_resize!=screen_size&&window.setTimeout("location.reload()",20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){location.href.indexOf("#!prettyPhoto")>-1&&(location.hash="")},social_tools:""})}catch(err){window.console&&window.console.log&&console.log(err)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){function fullWidthRow(){var $elements=$('[data-vc-full-width="true"]');$.each($elements,function(key,item){var $el=$(this);$el.addClass("vc_hidden");var $el_full=$el.next(".vc_row-full-width");if($el_full.length||($el_full=$el.parent().next(".vc_row-full-width")),$el_full.length){var el_margin_left=parseInt($el.css("margin-left"),10),el_margin_right=parseInt($el.css("margin-right"),10),offset=0-$el_full.offset().left-el_margin_left,width=$(window).width();if($el.css({position:"relative",left:offset,"box-sizing":"border-box",width:$(window).width()}),!$el.data("vcStretchContent")){var padding=-1*offset;0>padding&&(padding=0);var paddingRight=width-padding-$el_full.width()+el_margin_left+el_margin_right;0>paddingRight&&(paddingRight=0),$el.css({"padding-left":padding+"px","padding-right":paddingRight+"px"})}$el.attr("data-vc-full-width-init","true"),$el.removeClass("vc_hidden"),$(document).trigger("vc-full-width-row-single",{el:$el,offset:offset,marginLeft:el_margin_left,marginRight:el_margin_right,elFull:$el_full,width:width})}}),$(document).trigger("vc-full-width-row",$elements)}function fullHeightRow(){var $element=$(".vc_row-o-full-height:first");if($element.length){var $window,windowHeight,offsetTop,fullHeight;$window=$(window),windowHeight=$window.height(),offsetTop=$element.offset().top,offsetTop0||navigator.userAgent.match(/Trident.*rv\:11\./))&&$(".vc_row-o-full-height").each(function(){"flex"===$(this).css("display")&&$(this).wrap('')})}(),vc_initVideoBackgrounds(),function(){var vcSkrollrOptions,callSkrollInit=!1;window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSpeed,skrollrSize,skrollrStart,skrollrEnd,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),$parallaxElement=$("").addClass("vc_parallax-inner").appendTo($(this)),$parallaxElement.height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),youtubeId=vcExtractYoutubeId(parallaxImage),youtubeId?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrSpeed=skrollrSize-100,skrollrStart=-skrollrSpeed,skrollrEnd=0,$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: "+skrollrEnd+"%;")}),!(!callSkrollInit||!window.skrollr)&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}()}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(event,ui){var $ui_panel,$google_maps,panel=ui.panel||ui.newPanel,$pie_charts=panel.find(".vc_pie_chart:not(.vc_ready)"),$round_charts=panel.find(".vc_round-chart"),$line_charts=panel.find(".vc_line-chart"),$carousel=panel.find('[data-ride="vc_carousel"]');if(vc_carouselBehaviour(),vc_plugin_flexslider(panel),ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&ui.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),panel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&panel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var grid=jQuery(this).data("vcGrid");grid&&grid.gridBuilder&&grid.gridBuilder.setMasonry&&grid.gridBuilder.setMasonry()}),$pie_charts.length&&jQuery.fn.vcChat&&$pie_charts.vcChat(),$round_charts.length&&jQuery.fn.vcRoundChart&&$round_charts.vcRoundChart({reload:!1}),$line_charts.length&&jQuery.fn.vcLineChart&&$line_charts.vcLineChart({reload:!1}),$carousel.length&&jQuery.fn.carousel&&$carousel.carousel("resizeAction"),$ui_panel=panel.find(".isotope, .wpb_image_grid_ul"),$google_maps=panel.find(".wpb_gmaps_widget"),0<$ui_panel.length&&$ui_panel.isotope("layout"),$google_maps.length&&!$google_maps.is(".map_ready")){var $frame=$google_maps.find("iframe");$frame.attr("src",$frame.attr("src")),$google_maps.addClass("map_ready")}panel.parents(".isotope").length&&panel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),window.vc_googleMapsPointer,jQuery(document).ready(function($){window.vc_js()});
(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(et.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);