window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);var t=function(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1};C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);t=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return t}(e),o=0,i=d.length;o"),m.no_overlay||s.append("
");var c=s.find("img:first"),d=s.find("img:last");s.append("
");var l=s.find(".twentytwenty-handle");l.append(""),l.append(""),s.addClass("twentytwenty-container"),c.addClass("twentytwenty-before"),d.addClass("twentytwenty-after");var i=s.find(".twentytwenty-overlay");i.append("
"),i.append("
");var a=function(t){var e,n,i,a,o=(e=t,n=c.width(),i=c.height(),{w:n+"px",h:i+"px",cw:e*n+"px",ch:e*i+"px"});l.css("vertical"===r?"top":"left","vertical"===r?o.ch:o.cw),a=o,"vertical"===r?(c.css("clip","rect(0,"+a.w+","+a.ch+",0)"),d.css("clip","rect("+a.ch+","+a.w+","+a.h+",0)")):(c.css("clip","rect(0,"+a.cw+","+a.h+",0)"),d.css("clip","rect(0,"+a.w+","+a.h+","+a.cw+")")),s.css("height",a.h)},o=function(t,e){var n,i,a;return n="vertical"===r?(e-v)/p:(t-w)/f,i=0,a=1,Math.max(i,Math.min(a,n))};g(window).on("resize.twentytwenty",function(t){a(e)});var w=0,v=0,f=0,p=0,y=function(t){(t.distX>t.distY&&t.distX<-t.distY||t.distX-t.distY)&&"vertical"!==r?t.preventDefault():(t.distXt.distY&&t.distX>-t.distY)&&"vertical"===r&&t.preventDefault(),s.addClass("active"),w=s.offset().left,v=s.offset().top,f=c.width(),p=c.height()},h=function(t){s.hasClass("active")&&(e=o(t.pageX,t.pageY),a(e))},u=function(){s.removeClass("active")},_=m.move_with_handle_only?l:s;_.on("movestart",y),_.on("move",h),_.on("moveend",u),m.move_slider_on_hover&&(s.on("mouseenter",y),s.on("mousemove",h),s.on("mouseleave",u)),l.on("touchmove",function(t){t.preventDefault()}),s.find("img").on("mousedown",function(t){t.preventDefault()}),m.click_to_move&&s.on("click",function(t){w=s.offset().left,v=s.offset().top,f=c.width(),p=c.height(),e=o(t.pageX,t.pageY),a(e)}),g(window).trigger("resize.twentytwenty")})}}(jQuery); !function(e){"function"==typeof define&&define.amd?define([],e):"undefined"!=typeof module&&null!==module&&module.exports?module.exports=e:e()}(function(){var i=Object.assign||window.jQuery&&jQuery.extend,p=8,a=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){return window.setTimeout(function(){e()},25)};!function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e}();var o={textarea:!0,input:!0,select:!0,button:!0},u={move:"mousemove",cancel:"mouseup dragstart",end:"mouseup"},r={move:"touchmove",cancel:"touchend",end:"touchend"},d=/\s+/,c={bubbles:!0,cancelable:!0},t="function"==typeof Symbol?Symbol("events"):{};function m(e){return e[t]||(e[t]={})}function v(e,t,n,o,i){t=t.split(d);var a,c=m(e),u=t.length;function r(e){n(e,o)}for(;u--;)(c[a=t[u]]||(c[a]=[])).push([n,r]),e.addEventListener(a,r)}function f(e,t,n,o){t=t.split(d);var i,a,c,u=m(e),r=t.length;if(u)for(;r--;)if(a=u[i=t[r]])for(c=a.length;c--;)a[c][0]===n&&(e.removeEventListener(i,a[c][1]),a.splice(c,1))}function g(e,t,n){var o=new CustomEvent(t,c);n&&i(o,n),e.dispatchEvent(o)}function n(e){var n=e,o=!1,i=!1;function t(e){o?(n(),a(t),o=!(i=!0)):i=!1}this.kick=function(e){o=!0,i||t()},this.end=function(e){var t=n;e&&(i?(n=o?function(){t(),e()}:e,o=!0):e())}}function h(){}function s(e){e.preventDefault()}function l(e,t){var n,o;if(e.identifiedTouch)return e.identifiedTouch(t);for(n=-1,o=e.length;++n-v&&f.left<=r+h&&f.right>-h}if(u){s.on(z,k),B("show",s);var A=d.srcAttr,g=E(A)?A(s):l.getAttribute(A);g&&(l.src=g),c=!0}else i=X()||(r||setTimeout(s,0),r=2))}function l(){a.lazyLoadXT()}function f(){i(!0)}m[p]=d(b,n,m[p]),m.fn[p]=function(a){var e,r=c(a=a||{},"blankImage"),i=c(a,"checkDuplicates"),t=c(a,"scrollContainer"),s=c(a,"show"),l={};for(e in m(t).on("scroll",u),n)l[e]=c(a,e);return this.each(function(e,t){if(t===y)m(b.selector).lazyLoadXT(a);else{var o=i&&T(t,w),n=m(t).data(w,s?-1:1);if(o)return void u();r&&"IMG"===t.tagName&&!t.src&&(t.src=r),n[p]=d({},l),B("init",n),L.push(n),u()}})},m(e).ready(function(){B("start",a),a.on(b.updateEvent,u).on(b.forceEvent,f),m(e).on(b.updateEvent,u),b.autoInit&&(a.on(b.loadEvent,l),l())})}(window.jQuery||window.Zepto||window.$,window,document),function(s){var o=s.lazyLoadXT;o.selector+=",video,iframe[data-src],embed[data-src]",o.videoPoster="data-poster",s(document).on("lazyshow","video",function(e,t){var a=t.lazyLoadXT.srcAttr,r=s.isFunction(a),i=!1;t.attr("poster",t.attr(o.videoPoster)),t.children("source,track").each(function(e,t){var o=s(t),n=r?a(o):o.attr(a);n&&(o.attr("src",n),i=!0)}),i&&void 0!==s(this).attr("preload")&&"none"!=s(this).attr("preload")&&this.load(),s(this).removeClass("lazy-hidden")}),s(document).on("lazyshow","embed",function(e,t){s(this).removeClass("lazy-hidden")})}(window.jQuery||window.Zepto||window.$); !function(t,r,e,s){var n,a,c=t.lazyLoadXT,i="srcset"in new Image,o=/^\s*(\S*)/,d=/\S\s+(\d+)w/,u=/\S\s+(\d+)h/,l=/\S\s+([\d\.]+)x/,x=[0,1/0],w=[0,1],h={srcsetAttr:"data-srcset",srcsetExtended:!0,srcsetBaseAttr:"data-srcset-base",srcsetExtAttr:"data-srcset-ext"},f={w:0,h:0,x:0};for(n in h)void 0===c[n]&&(c[n]=h[n]);function p(r,e){return Math[e].apply(null,t.map(r,function(t){return t[n]}))}function A(t){return t[n]>=f[n]||t[n]===a}function m(t){return t[n]===a}function g(s){var i=s.attr(c.srcsetAttr);if(!i)return!1;var h=t.map(i.replace(/(\s[\d.]+[whx]),/g,"$1 @,@ ").split(" @,@ "),function(t){return{url:o.exec(t)[1],w:parseFloat((d.exec(t)||x)[1]),h:parseFloat((u.exec(t)||x)[1]),x:parseFloat((l.exec(t)||w)[1])}});if(!h.length)return!1;var g,v,y=e.documentElement;for(g in f={w:r.innerWidth||y.clientWidth,h:r.innerHeight||y.clientHeight,x:r.devicePixelRatio||1})n=g,a=p(h,"max"),h=t.grep(h,A);for(g in f)n=g,a=p(h,"min"),h=t.grep(h,m);return v=h[0].url,c.srcsetExtended&&(v=(s.attr(c.srcsetBaseAttr)||"")+v+(s.attr(c.srcsetExtAttr)||"")),v}c.selector+=",img["+c.srcsetAttr+"],source["+c.srcsetAttr+"]",t(e).on("lazyshow","img",function(t,r){var e=r.attr(c.srcsetAttr);e&&(!c.srcsetExtended&&i?(r.attr("srcset",e),r.attr("data-srcset","")):r.lazyLoadXT.srcAttr=g)}),t(e).on("lazyshow","source",function(r,e){t(this).removeClass("lazy-hidden");var s=e.attr(c.srcsetAttr);s&&(!c.srcsetExtended&&i?(e.attr("srcset",s),e.attr("data-srcset","")):e.lazyLoadXT.srcAttr=g)})}(window.jQuery||window.Zepto||window.$,window,document); jQuery.lazyLoadXT.updateEvent='load orientationchange resize scroll touchmove focus click customlazyloadxtevent'; jQuery.lazyLoadXT.edgeY=a3_lazyload_extend_params.edgeY; jQuery.lazyLoadXT.srcsetExtended=false; if(typeof a3_lazyload_extend_params.horizontal_container_classnames!=='undefined'&&''!==a3_lazyload_extend_params.horizontal_container_classnames){ jQuery.lazyLoadXT.scrollContainer=a3_lazyload_extend_params.horizontal_container_classnames; } jQuery(document).ready(function($){ jQuery(document).on('mouseenter', '.site-header-cart', function(){ jQuery(document).trigger('customlazyloadxtevent'); }); jQuery(document).on('mouseenter', '.widget_shopping_cart', function(){ jQuery(document).trigger('customlazyloadxtevent'); }); jQuery(document).on('mouseover', '#wp-admin-bar-top-secondary', function(){ jQuery(document).trigger('customlazyloadxtevent'); }); }); jQuery(window).on('ajaxComplete', function(){ setTimeout(function(){ jQuery(window).lazyLoadXT(); }, 1000); }); jQuery(function($){ var $testProp=$('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').find('qty'); if($testProp&&$testProp.prop('type')!='date'){ $('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('').prepend(''); $('input.qty:not(.product-quantity input.qty)').each(function(){ var min=parseFloat($(this).attr('min')); if(min&&min > 0&&parseFloat($(this).val()) < min){ $(this).val(min); }}); $(document).on('click', '.plus, .minus', function(){ var $qty=$(this).closest('.quantity').find('.qty'), currentVal=parseFloat($qty.val()), max=parseFloat($qty.attr('max')), min=parseFloat($qty.attr('min')), step=$qty.attr('step'); if(! currentVal||currentVal===''||currentVal==='NaN') currentVal=0; if(max===''||max==='NaN') max=''; if(min===''||min==='NaN') min=0; if(step==='any'||step===''||step===undefined||parseFloat(step)==='NaN') step=1; if($(this).is('.plus')){ if(max&&(max==currentVal||currentVal > max)){ $qty.val(max); }else{ $qty.val(currentVal + parseFloat(step)); }}else{ if(min&&(min==currentVal||currentVal < min)){ $qty.val(min); }else if(currentVal > 0){ $qty.val(currentVal - parseFloat(step)); }} $qty.trigger('change'); }); }}); if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[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 e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.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 e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(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},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); (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); (function($){ var $window=$(window); var windowHeight=$window.height(); $window.resize(function (){ windowHeight=$window.height(); }); $.fn.parallax=function(xpos, speedFactor, outerHeight){ var $this=$(this); var getHeight; var firstTop; var paddingTop=0; function update (){ $this.each(function(){ firstTop=$this.offset().top; }); if(outerHeight){ getHeight=function(jqo){ return jqo.outerHeight(true); };}else{ getHeight=function(jqo){ return jqo.height(); };} if(arguments.length < 1||xpos===null) xpos="50%"; if(arguments.length < 2||speedFactor===null) speedFactor=0.5; if(arguments.length < 3||outerHeight===null) outerHeight=true; var pos=$window.scrollTop(); $this.each(function(){ var $element=$(this); var top=$element.offset().top; var height=getHeight($element); if(top + height < pos||top > pos + windowHeight){ return; } $this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px"); }); } $window.bind('scroll', update).resize(update); update(); };})(jQuery); ;(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 '
' + iframe + '
'; }, 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));