vendor: 4,134 bytes, lines 1-13
1/* ------------------------------------------------------------------------ */ 2/* Plugins 3/* ------------------------------------------------------------------------ */ 4/* 5 * jQuery Superfish Menu Plugin - v1.7.8 6 * Copyright (c) 2016 Joel Birch 7 * 8 * Dual licensed under the MIT and GPL licenses: 9 * http://www.opensource.org/licenses/mit-license.php 10 * http://www.gnu.org/licenses/gpl.html 11 */ 12 13;!function(a,b){"use strict";var c=function(){var c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",menuArrowClass:"sf-arrows"},d=function(){var b=/^(?![\w\W]*Windows Phone)[\w\W]*(iPhone|iPad|iPod)/i.test(navigator.userAgent);return b&&a("html").css("cursor","pointer").on("click",a.noop),b}(),e=function(){var a=document.documentElement.style;return"behavior"in a&&"fill"in a&&/iemobile/i.test(navigator.userAgent)}(),f=function(){return!!b.PointerEvent}(),g=function(a,b,d){var e,f=c.menuClass;b.cssArrows&&(f+=" "+c.menuArrowClass),e=d?"addClass":"removeClass",a[e](f)},h=function(b,d){return b.find("li."+d.pathClass).slice(0,d.pathLevels).addClass(d.hoverClass+" "+c.bcClass).filter(function(){return a(this).children(d.popUpSelector).hide().show().length}).removeClass(d.pathClass)},i=function(a,b){var d=b?"addClass":"removeClass";a.children("a")[d](c.anchorClass)},j=function(a){var b=a.css("ms-touch-action"),c=a.css("touch-action");c=c||b,c="pan-y"===c?"auto":"pan-y",a.css({"ms-touch-action":c,"touch-action":c})},k=function(a){return a.closest("."+c.menuClass)},l=function(a){return k(a).data("sfOptions")},m=function(){var b=a(this),c=l(b);clearTimeout(c.sfTimer),b.siblings().superfish("hide").end().superfish("show")},n=function(b){b.retainPath=a.inArray(this[0],b.$path)>-1,this.superfish("hide"),this.parents("."+b.hoverClass).length||(b.onIdle.call(k(this)),b.$path.length&&a.proxy(m,b.$path)())},o=function(){var b=a(this),c=l(b);d?a.proxy(n,b,c)():(clearTimeout(c.sfTimer),c.sfTimer=setTimeout(a.proxy(n,b,c),c.delay))},p=function(b){var c=a(this),d=l(c),e=c.siblings(b.data.popUpSelector);return d.onHandleTouch.call(e)===!1?this:void(e.length>0&&e.is(":hidden")&&(c.one("click.superfish",!1),"MSPointerDown"===b.type||"pointerdown"===b.type?c.trigger("focus"):a.proxy(m,c.parent("li"))()))},q=function(b,c){var g="li:has("+c.popUpSelector+")";a.fn.hoverIntent&&!c.disableHI?b.hoverIntent(m,o,g):b.on("mouseenter.superfish",g,m).on("mouseleave.superfish",g,o);var h="MSPointerDown.superfish";f&&(h="pointerdown.superfish"),d||(h+=" touchend.superfish"),e&&(h+=" mousedown.superfish"),b.on("focusin.superfish","li",m).on("focusout.superfish","li",o).on(h,"a",c,p)};return{hide:function(b){if(this.length){var c=this,d=l(c);if(!d)return this;var e=d.retainPath===!0?d.$path:"",f=c.find("li."+d.hoverClass).add(this).not(e).removeClass(d.hoverClass).children(d.popUpSelector),g=d.speedOut;if(b&&(f.show(),g=0),d.retainPath=!1,d.onBeforeHide.call(f)===!1)return this;f.stop(!0,!0).animate(d.animationOut,g,function(){var b=a(this);d.onHide.call(b)})}return this},show:function(){var a=l(this);if(!a)return this;var b=this.addClass(a.hoverClass),c=b.children(a.popUpSelector);return a.onBeforeShow.call(c)===!1?this:(c.stop(!0,!0).animate(a.animation,a.speed,function(){a.onShow.call(c)}),this)},destroy:function(){return this.each(function(){var b,d=a(this),e=d.data("sfOptions");return e?(b=d.find(e.popUpSelector).parent("li"),clearTimeout(e.sfTimer),g(d,e),i(b),j(d),d.off(".superfish").off(".hoverIntent"),b.children(e.popUpSelector).attr("style",function(a,b){return b.replace(/display[^;]+;?/g,"")}),e.$path.removeClass(e.hoverClass+" "+c.bcClass).addClass(e.pathClass),d.find("."+e.hoverClass).removeClass(e.hoverClass),e.onDestroy.call(d),void d.removeData("sfOptions")):!1})},init:function(b){return this.each(function(){var d=a(this);if(d.data("sfOptions"))return!1;var e=a.extend({},a.fn.superfish.defaults,b),f=d.find(e.popUpSelector).parent("li");e.$path=h(d,e),d.data("sfOptions",e),g(d,e,!0),i(f,!0),j(d),q(d,e),f.not("."+c.bcClass).superfish("hide",!0),e.onInit.call(this)})}}}();a.fn.superfish=function(b,d){return c[b]?c[b].apply(this,Array.prototype.slice.call(arguments,1
13)):"object"!=typeof b&&b?a.error("Method "+b+" does not exist on jQuery.fn.superfish"):c.init.apply(this,arguments)},a.fn.superfish.defaults={popUpSelector:"ul,.sf-mega",hoverClass:"sfHover",pathClass:"overrideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},animationOut:{opacity:"hide"},speed:"normal",speedOut:"fast",cssArrows:!0,disableHI:!1,onInit:a.noop,onBeforeShow:a.noop,onShow:a.noop,onBeforeHide:a.noop,onHide:a.noop,onIdle:a.noop,onDestroy:a.noop,onHandleTouch:a.noop}}(jQuery,window); 14 15/* 16 * hoverIntent 17 */ 18 !function(e){e.fn.hoverIntent=function(t,n,o){var r={interval:100,sensitivity:6,timeout:0};r="object"==typeof t?e.extend(r,t):e.isFunction(n)?e.extend(r,{over:t,out:n,selector:o}):e.extend(r,{over:t,out:t,selector:n});var v,i,u,s,h=function(e){v=e.pageX,i=e.pageY},I=function(t,n){return n.hoverIntent_t=clearTimeout(n.hoverIntent_t),Math.sqrt((u-v)*(u-v)+(s-i)*(s-i))<r.sensitivity?(e(n).off("mousemove.hoverIntent",h),n.hoverIntent_s=!0,r.over.apply(n,[t])):(u=v,s=i,n.hoverIntent_t=setTimeout(function(){I(t,n)},r.interval),void 0)},a=function(e,t){return t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=!1,r.out.apply(t,[e])},c=function(t){var n=e.extend({},t),o=this;o.hoverIntent_t&&(o.hoverIntent_t=clearTimeout(o.hoverIntent_t)),"mouseenter"===t.type?(u=n.pageX,s=n.pageY,e(o).on("mousemove.hoverIntent",h),o.hoverIntent_s||(o.hoverIntent_t=setTimeout(function(){I(n,o)},r.interval))):(e(o).off("mousemove.hoverIntent",h),o.hoverIntent_s&&(o.hoverIntent_t=setTimeout(function(){a(n,o)},r.timeout)))};return this.on({"mouseenter.hoverIntent":c,"mouseleave.hoverIntent":c},r.selector)}}(jQuery); 19 20/*! 21 * jQuery SimpleSelect 22 * http://pioul.fr/jquery-simpleselect 23 * 24 * Copyright 2014, Philippe Masset 25 * Dual licensed under the MIT or GPL Version 2 licenses 26 */ 27!function(a){"use strict";var b=null,c=null,d=[],e=!1,f=!1,g=function(b){b=a.extend({},{fadingDuration:b&&b.fadeSpeed||0,containerMargin:5,displayContainerInside:"window"},b),this.each(function(){var c=a(this).addClass("simpleselected"),d=a('<div class="simpleselect"></div>'),f=a('<div class="placeholder"></div>').appendTo(d),g=a('<div class="options"></div>').appendTo(d),h=c.attr("id");h&&d.attr("id","simpleselect_"+h),c.off("change"),c.attr("size",2);var i={select:c,selectOptions:null,simpleselect:d,ssPlaceholder:f,ssOptionsContainer:g,ssOptionsContainerHeight:null,ssOptions:null,canBeClosed:!0,isActive:!1,isScrollable:!1,isDisabled:!1,options:b};d.data("simpleselect",i).on({mousedown:function(){i.canBeClosed=!1},click:function(b){var c=a(b.target);c.hasClass("placeholder")?t.setActive.call(i):c.hasClass("option")&&(e=!0,o.call(i,c),t.setInactive.call(i))},mouseup:function(){i.canBeClosed=!0},mouseover:function(b){var c=a(b.target);c.hasClass("option")&&m.call(i,c)}}),c.data("simpleselect",i).on({keydown:function(a){13==a.keyCode&&t.setInactive.call(i)},focus:function(){e||t.setActive.call(i)},blur:function(){i.canBeClosed&&t.setInactive.call(i)},change:function(a,b){b||a.stopImmediatePropagation();var c=n.call(i);m.call(i,c,!0)},click:function(a){a.stopPropagation()}}),c.after(d);var j=a('<div class="hidden_select_container"></div>');c.after(j).appendTo(j),k.call(i),l.call(i),t.updatePresentationDependentVariables.call(i)})},h=function(){b=a(window).height()},i=function(a){d.push(a)},j=function(b){d=a.grep(d,function(a){return a!==b})},k=function(){this.selectOptions=this.select.find("option");var b="",c=function(a){b+='<div class="option">'+a.text()+"</div>"},d=function(d){b+='<div class="optgroup">';var f=d.attr("label");f&&(b+='<div class="optgroup-label">'+e(f)+"</div>"),d.children("option").each(function(){c(a(this))}),b+="</div>"},e=function(a){return a.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")},f=this.select.children("optgroup, option"),g=!1;f.each(function(){var b=a(this);b.is("optgroup")?(d(b),g=!0):c(b)}),this.ssOptions=this.ssOptionsContainer.html(b).find(".option"),this.ssPlaceholder.text(n.call(this).text())},l=function(){this.isDisabled=this.select.prop("disabled"),this.simpleselect[this.isDisabled?"addClass":"removeClass"]("disabled")},m=function(a,b){if(this.ssOptions.removeClass("active"),a.addClass("active"),b&&this.isScrollable){var g,c=a.position(),d=this.ssOptionsContainer.scrollTop(),e=c.top,f=this.ssOptionsContainer.height()-(c.top+a.outerHeight());0>e?g=d+e:0>f&&(g=d-f),this.ssOptionsContainer.scrollTop(g)}},n=function(){var b=p.call(this),c=b.length?this.selectOptions.index(b):0;return a(this.ssOptions[c])},o=function(b){var c=a(this.selectOptions[this.ssOptions.index(b)]);this.select.val(c.val())},p=function(){return this.selectOptions.filter(":selected").first()},q=function(){this.ssOptionsContainer.css({height:"auto","overflow-y":"visible"})},r=function(){this.ssOptionsContainer.hide(),this.ssOptionsContainer[0].offsetHeight,this.ssOptionsContainer.show()},s=function(d){q.call(this);var e,f,g,h,i,j,k,l="window"==this.options.displayContainerInside,m=a.proxy(function(){e=d.position(),f=this.ssPlaceholderOffset.top-this.options.containerMargin-(l?a(window).scrollTop():0),g=(l?b:c)-f-this.ssPlaceholderHeight-2*this.options.containerMargin,h=f-e.top,i=g-(this.ssOptionsContainerOuterHeight-e.top-this.ssPlaceholderHeight),j=0>h?Math.abs(h):0,k=0>i?Math.abs(i):0},this);m();var n=this.isScrollable;if(this.isScrollable=0>h||0>i,this.isScrollable){this.ssOptionsContainer.css({height:"auto","overflow-y":"scroll"}),this.ssOptionsContainer.height()!=this.ssOptionsContainerHeight&&(r.call(this),t.updatePresentationDependentVariables.call(this,"ssOptionsContainer",!1),m());var o=this.ssOptionsContainer.height()-j-k;this.ssOptionsContainer.css({top:-(e.top-j)}).height(o).scrollTop(j)}else this.ssOptionsContainer.css({top:-e.top}),n&&r.call(this)},t={updatePresentationDependentVariables:function(a,b){a&&"ssPlaceholder"!=a||(this.ssPlaceholderOffset=this.ssPlaceholder.offset(),this.ssPlaceholderHeight=this.ssPlaceholder.outerHeight()),a&&"ssOptionsContainer"!=a||(b!==!1&&q.call(this),this.ssOptionsContainerOuterHeight=this.ssOptionsContainer.outerHeight(!0),this.ssOptionsContainerHeight=this.ssOptionsContainer.height())},refreshContents:function(){k.call(this),t.updatePresentationDependentVariables.call(this)},refreshState:function(){l.call(this)},disable:function(){this.select.prop("disabled",!0),t.refreshState.call(this)},enable:function(){this.select.prop("disabled",!1),t.refreshState.call(this)}
27,setActive:function(){if(!this.isActive&&!this.isDisabled&&this.ssOptions.length){this.lastValue=this.select.val(),this.simpleselect.addClass("active"),this.isActive=!0,i.call(this,this.simpleselect);var b=n.call(this);m.call(this,b),c=a(document).height(),this.ssOptionsContainer.fadeTo(0,0).fadeTo(this.options.fadingDuration,1),this.select.is(":focus")||this.select.focus(),s.call(this,b),f=!0}},setInactive:function(){if(this.isActive){this.simpleselect.removeClass("active"),this.isActive=!1,j.call(this,this.simpleselect),this.ssOptionsContainer.fadeOut(this.options.fadingDuration),this.select.is(":focus")&&this.select.blur();var a=this.select.val();this.lastValue!=a&&(this.ssPlaceholder.text(p.call(this).text()),this.select.trigger("change",[!0]))}}};a.fn.simpleselect=function(b){if(t[b]){var c=Array.prototype.slice.call(arguments,1);this.each(function(){t[b].apply(a(this).data("simpleselect"),c)})}else g.apply(this,arguments);return this},a(document).ready(function(){h(),a(window).on("resize.simpleselect",function(){h()}),a(document).on("click.simpleselect keyup.simpleselect",function(a){if("click"==a.type&&(setTimeout(function(){e=!1},0),f))return f=!1,void 0;if("click"==a.type||"keyup"==a.type&&27==a.keyCode){var b=d.length;if(b)for(var c=d.slice(0),g=0;b>g;g++)c[g].simpleselect("setInactive")}})})}(jQuery); 28 29/*! 30 * imagesLoaded PACKAGED v3.1.8 31 * JavaScript is all like "You images are done yet or what?" 32 * MIT License 33 */ 34(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;
34if(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}); 35 36/*! 37 * FitVids 1.1 38 * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com 39 * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ 40 * Released under the WTFPL license - http://sam.zoy.org/wtfpl/ 41 */ 42!function($){"use strict";$.fn.fitVids=function(options){var settings={customSelector:null};if(!document.getElementById("fit-vids-style")){var head=document.head||document.getElementsByTagName("head")[0],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%;}",div=document.createElement("div");div.innerHTML='<p>x</p><style id="fit-vids-style">'+css+"</style>",head.appendChild(div.childNodes[1])}return options&&$.extend(settings,options),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"];settings.customSelector&&selectors.push(settings.customSelector);var $allVideos=$(this).find(selectors.join(","));$allVideos=$allVideos.not("object object"),$allVideos.each(function(){var $this=$(this);if(!("embed"===this.tagName.toLowerCase()&&$this.parent("object").length||$this.parent(".fluid-width-video-wrapper").length)){$this.css("height")||$this.css("width")||!isNaN($this.attr("height"))&&!isNaN($this.attr("width"))||($this.attr("height",9),$this.attr("width",16));var height="object"===this.tagName.toLowerCase()||$this.attr("height")&&!isNaN(parseInt($this.attr("height"),10))?parseInt($this.attr("height"),10):$this.height(),width=isNaN(parseInt($this.attr("width"),10))?$this.width():parseInt($this.attr("width"),10),aspectRatio=height/width;if(!$this.attr("id")){var videoID="fitvid"+Math.floor(999999*Math.random());$this.attr("id",videoID)}$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*aspectRatio+"%"),$this.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto); 43 44/*! 45 * scrollTo 46 * Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com 47 * Licensed under MIT 48 * @author Ariel Flesler 49 * @version 2.1.1 50 */ 51;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);if(!e.length)return;case "object":if(e.is||e.style)t=(e=$(e)).offset()}
51var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&& "%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p}); 52 53// tipsy, facebook style tooltips for jquery 54// version 1.0.0a 55// (c) 2008-2010 jason frame [[email protected]] 56// released under the MIT license 57(function($) { 58 59 function maybeCall(thing, ctx) { 60 return (typeof thing == 'function') ? (thing.call(ctx)) : thing; 61 }; 62 63 function isElementInDOM(ele) { 64 while (ele = ele.parentNode) { 65 if (ele == document) return true; 66 } 67 return false; 68 }; 69 70 function Tipsy(element, options) { 71 this.$element = $(element); 72 this.options = options; 73 this.enabled = true; 74 this.fixTitle(); 75 }; 76 77 Tipsy.prototype = { 78 show: function() { 79 var title = this.getTitle(); 80 if (title && this.enabled) { 81 var $tip = this.tip(); 82 83 $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); 84 $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity 85 $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body); 86 87 var pos = $.extend({}, this.$element.offset(), { 88 width: this.$element[0].offsetWidth, 89 height: this.$element[0].offsetHeight 90 }); 91 92 var actualWidth = $tip[0].offsetWidth, 93 actualHeight = $tip[0].offsetHeight, 94 gravity = maybeCall(this.options.gravity, this.$element[0]); 95 96 var tp; 97 switch (gravity.charAt(0)) { 98 case 'n': 99 tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; 100 break; 101 case 's': 102 tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; 103 break; 104 case 'e': 105 tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; 106 break; 107 case 'w': 108 tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}; 109 break; 110 } 111 112 if (gravity.length == 2) { 113 if (gravity.charAt(1) == 'w') { 114 tp.left = pos.left + pos.width / 2 - 15; 115 } else { 116 tp.left = pos.left + pos.width / 2 - actualWidth + 15; 117 } 118 } 119 120 $tip.css(tp).addClass('tipsy-' + gravity); 121 $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0); 122 if (this.options.className) { 123 $tip.addClass(maybeCall(this.options.className, this.$element[0])); 124 } 125 126 if (this.options.fade) { 127 $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}); 128 } else { 129 $tip.css({visibility: 'visible', opacity: this.options.opacity}); 130 } 131 } 132 }, 133 134 hide: function() { 135 if (this.options.fade) { 136 this.tip().stop().fadeOut(function() { $(this).remove(); }); 137 } else { 138 this.tip().remove(); 139 } 140 }, 141 142 fixTitle: function() { 143 var $e = this.$element; 144 if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') { 145 $e.attr('original-title', $e.attr('title') || '').removeAttr('title'); 146 } 147 }, 148 149 getTitle: function() { 150 var title, $e = this.$element, o = this.options; 151 this.fixTitle(); 152 var title, o = this.options; 153 if (typeof o.title == 'string') { 154 title = $e.attr(o.title == 'title' ? 'original-title' : o.title); 155 } else if (typeof o.title == 'function') { 156 title = o.title.call($e[0]); 157 } 158 title = ('' + title).replace(/(^\s*|\s*$)/, ""); 159 return title || o.fallback; 160 }, 161 162 tip: function() { 163 if (!this.$tip) { 164 this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>'); 165 this.$tip.data('tipsy-pointee', this.$element[0]); 166 } 167 return this.$tip; 168 }, 169 170 validate: function() { 171 if (!this.$element[0].parentNode) { 172 this.hide(); 173 this.$element = null; 174 this.options = null; 175 } 176 }, 177 178 enable: function() { this.enabled = true; }, 179 disable: function() { this.enabled = false; }, 180 toggleEnabled: function() { this.enabled = !this.enabled; } 181 }; 182 183 $.fn.tipsy = function(options) { 184 185 if (options === true) { 186 return this.data('tipsy'); 187 } else if (typeof options == 'string') { 188 var tipsy = this.data('tipsy'); 189 if (tipsy) tipsy[options](); 190 return this; 191 } 192 193 options = $.extend({}, $.fn.tipsy.defaults, options); 194 195 function get(ele) { 196 var tipsy = $.data(ele, 'tipsy'); 197 if (!tipsy) { 198 tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options)); 199 $.data(ele, 'tipsy', tipsy); 200 } 201 return tipsy; 202 } 203 204 function enter() { 205 var tipsy = get(this); 206 tipsy.hoverState = 'in'; 207 if (options.delayIn == 0) { 208 tipsy.show(); 209 } else { 210 tipsy.fixTitle(); 211 setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn); 212 } 213 }; 214 215 function leave() { 216 var tipsy = get(this); 217 tipsy.hoverState = 'out'; 218 if (options.delayOut == 0) { 219 tipsy.hide(); 220 } else { 221 setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut); 222 } 223 }; 224 225 if (!options.live) this.each(function() { get(this); }); 226 227 if (options.trigger != 'manual') { 228 var binder = options.live ? 'live' : 'bind', 229 eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', 230 eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; 231 this[binder](eventIn, enter)[binder](eventOut, leave); 232 } 233 234 return this; 235 236 }; 237 238 $.fn.tipsy.defaults = { 239 className: null, 240 delayIn: 0, 241 delayOut: 0, 242 fade: false, 243 fallback: '', 244 gravity: 'n', 245 html: false, 246 live: false, 247 offset: 0, 248 opacity: 0.8, 249 title: 'title', 250 trigger: 'hover' 251 }; 252 253 $.fn.tipsy.revalidate = function() { 254 $('.tipsy').each(function() { 255 var pointee = $.data(this, 'tipsy-pointee'); 256 if (!pointee || !isElementInDOM(pointee)) { 257 $(this).remove(); 258 } 259 }); 260 }; 261 262 // Overwrite this method to provide options on a per-element basis. 263 // For example, you could store the gravity in a 'tipsy-gravity' attribute: 264 // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); 265 // (remember - do not modify 'options' in place!) 266 $.fn.tipsy.elementOptions = function(ele, options) { 267 return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; 268 }; 269 270 $.fn.tipsy.autoNS = function() { 271 return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; 272 }; 273 274 $.fn.tipsy.autoWE = function() { 275 return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; 276 }; 277 278 /** 279 * yields a closure of the supplied parameters, producing a function that takes 280 * no arguments and is suitable for use as an autogravity function like so: 281 * 282 * @param margin (int) - distance from the viewable region edge that an 283 * element should be before setting its tooltip's gravity to be away 284 * from that edge. 285 * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer 286 * if there are no viewable region edges effecting the tooltip's 287 * gravity. It will try to vary from this minimally, for example, 288 * if 'sw' is preferred and an element is near the right viewable 289 * region edge, but not the top edge, it will set the gravity for 290 * that element's tooltip to be 'se', preserving the southern 291 * component. 292 */ 293 $.fn.tipsy.autoBounds = function(margin, prefer) { 294 return function() { 295 var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)}, 296 boundTop = $(document).scrollTop() + margin, 297 boundLeft = $(document).scrollLeft() + margin, 298 $this = $(this); 299 300 if ($this.offset().top < boundTop) dir.ns = 'n'; 301 if ($this.offset().left < boundLeft) dir.ew = 'w'; 302 if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e'; 303 if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's'; 304 305 return dir.ns + (dir.ew ? dir.ew : ''); 306 } 307 }; 308 309})(jQuery); 310 311/* 312Plugin: jQuery Parallax 313Version 1.1.3 314Author: Ian Lunn 315Twitter: @IanLunn 316Author URL: http://www.ianlunn.co.uk/ 317Plugin URL: http://www.ianlunn.co.uk/plugins/jquery-parallax/ 318 319Dual licensed under the MIT and GPL licenses: 320http://www.opensource.org/licenses/mit-license.php 321http://www.gnu.org/licenses/gpl.html 322*/ 323 324(function( $ ){ 325 var $window = $(window); 326 var windowHeight = $window.height(); 327 328 $window.resize(function () { 329 windowHeight = $window.height(); 330 }); 331 332 $.fn.parallax = function(xpos, speedFactor, outerHeight) { 333 var $this = $(this); 334 var getHeight; 335 var firstTop; 336 var paddingTop = 0; 337 338 //get the starting position of each element to have parallax applied to it 339 $this.each(function(){ 340 firstTop = $this.offset().top; 341 }); 342 343 if (outerHeight) { 344 getHeight = function(jqo) { 345 return jqo.outerHeight(true); 346 }; 347 } else { 348 getHeight = function(jqo) { 349 return jqo.height(); 350 }; 351 } 352 353 // setup defaults if arguments aren't specified 354 if (arguments.length < 1 || xpos === null) xpos = "50%"; 355 if (arguments.length < 2 || speedFactor === null) speedFactor = 0.1; 356 if (arguments.length < 3 || outerHeight === null) outerHeight = true; 357 358 // function to be called whenever the window is scrolled or resized
359 function update(){ 360 var pos = $window.scrollTop(); 361 362 $this.each(function(){ 363 var $element = $(this); 364 var top = $element.offset().top; 365 var height = getHeight($element); 366 367 // Check if totally above or totally below viewport 368 // if (top + height < pos || top > pos + windowHeight) { 369 // return; 370 // } 371 372 $this.css('backgroundPosition', xpos + " " + Math.round((firstTop - pos) * speedFactor) + "px"); 373 }); 374 } 375 376 $window.bind('scroll', update).resize(update); 377 update(); 378 }; 379})(jQuery); 380 381/*! 382 * jquery.countTo() 383 * https://github.com/mhuggins/jquery-countTo 384 * 385 * Copyright 2013 Adam Coulombe 386 * @license http://www.opensource.org/licenses/mit-license.html MIT License 387 */ 388(function(e){function t(e,t){return e.toFixed(t.decimals)}e.fn.countTo=function(t){t=t||{};return e(this).each(function(){function l(){a+=i;u++;c(a);if(typeof n.onUpdate=="function"){n.onUpdate.call(s,a)}if(u>=r){o.removeData("countTo");clearInterval(f.interval);a=n.to;if(typeof n.onComplete=="function"){n.onComplete.call(s,a)}}}function c(e){var t=n.formatter.call(s,e,n);o.text(t)}var n=e.extend({},e.fn.countTo.defaults,{from:e(this).data("from"),to:e(this).data("to"),speed:e(this).data("speed"),refreshInterval:e(this).data("refresh-interval"),decimals:e(this).data("decimals")},t);var r=Math.ceil(n.speed/n.refreshInterval),i=(n.to-n.from)/r;var s=this,o=e(this),u=0,a=n.from,f=o.data("countTo")||{};o.data("countTo",f);if(f.interval){clearInterval(f.interval)}f.interval=setInterval(l,n.refreshInterval);c(a)})};e.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:t,onUpdate:null,onComplete:null}})(jQuery) 389 390/*! 391 * Packery layout mode PACKAGED v1.1.0 392 * sub-classes Packery 393 * http://packery.metafizzy.com 394 */ 395!function(a){function b(a){return new RegExp("(^|\\s+)"+a+"(\\s+|$)")}function c(a,b){var c=d(a,b)?f:e;c(a,b)}var d,e,f;"classList"in document.documentElement?(d=function(a,b){return a.classList.contains(b)},e=function(a,b){a.classList.add(b)},f=function(a,b){a.classList.remove(b)}):(d=function(a,c){return b(c).test(a.className)},e=function(a,b){d(a,b)||(a.className=a.className+" "+b)},f=function(a,c){a.className=a.className.replace(b(c)," ")});var g={hasClass:d,addClass:e,removeClass:f,toggleClass:c,has:d,add:e,remove:f,toggle:c};"function"==typeof define&&define.amd?define("classie/classie",g):"object"==typeof exports?module.exports=g:a.classie=g}(window),function(a){function b(){function a(b){for(var c in a.defaults)this[c]=a.defaults[c];for(c in b)this[c]=b[c]}return c.Rect=a,a.defaults={x:0,y:0,width:0,height:0},a.prototype.contains=function(a){var b=a.width||0,c=a.height||0;return this.x<=a.x&&this.y<=a.y&&this.x+this.width>=a.x+b&&this.y+this.height>=a.y+c},a.prototype.overlaps=function(a){var b=this.x+this.width,c=this.y+this.height,d=a.x+a.width,e=a.y+a.height;return this.x<d&&b>a.x&&this.y<e&&c>a.y},a.prototype.getMaximalFreeRects=function(b){if(!this.overlaps(b))return!1;var c,d=[],e=this.x+this.width,f=this.y+this.height,g=b.x+b.width,h=b.y+b.height;return this.y<b.y&&(c=new a({x:this.x,y:this.y,width:this.width,height:b.y-this.y}),d.push(c)),e>g&&(c=new a({x:g,y:this.y,width:e-g,height:this.height}),d.push(c)),f>h&&(c=new a({x:this.x,y:h,width:this.width,height:f-h}),d.push(c)),this.x<b.x&&(c=new a({x:this.x,y:this.y,width:b.x-this.x,height:this.height}),d.push(c)),d},a.prototype.canFit=function(a){return this.width>=a.width&&this.height>=a.height},a}var c=a.Packery=function(){};"function"==typeof define&&define.amd?define("packery/js/rect",b):"object"==typeof exports?module.exports=b():(a.Packery=a.Packery||{},a.Packery.Rect=b())}(window),function(a){function b(a){function b(a,b,c){this.width=a||0,this.height=b||0,this.sortDirection=c||"downwardLeftToRight",this.reset()}b.prototype.reset=function(){this.spaces=[],this.newSpaces=[];var b=new a({x:0,y:0,width:this.width,height:this.height});this.spaces.push(b),this.sorter=c[this.sortDirection]||c.downwardLeftToRight},b.prototype.pack=function(a){for(var b=0,c=this.spaces.length;c>b;b++){var d=this.spaces[b];if(d.canFit(a)){this.placeInSpace(a,d);break}}},b.prototype.placeInSpace=function(a,b){a.x=b.x,a.y=b.y,this.placed(a)},b.prototype.placed=function(a){for(var b=[],c=0,d=this.spaces.length;d>c;c++){var e=this.spaces[c],f=e.getMaximalFreeRects(a);f?b.push.apply(b,f):b.push(e)}this.spaces=b,this.mergeSortSpaces()},b.prototype.mergeSortSpaces=function(){b.mergeRects(this.spaces),this.spaces.sort(this.sorter)},b.prototype.addSpace=function(a){this.spaces.push(a),this.mergeSortSpaces()},b.mergeRects=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];if(d){var e=a.slice(0);e.splice(b,1);for(var f=0,g=0,h=e.length;h>g;g++){var i=e[g],j=b>g?0:1;d.contains(i)&&(a.splice(g+j-f,1),f++)}}}return a};var c={downwardLeftToRight:function(a,b){return a.y-b.y||a.x-b.x},rightwardTopToBottom:function(a,b){return a.x-b.x||a.y-b.y}};return b}if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],b);
395else if("object"==typeof exports)module.exports=b(require("./rect"));else{var c=a.Packery=a.Packery||{};c.Packer=b(c.Rect)}}(window),function(a){function b(a,b,c){var d=a("transform"),e=function(){b.Item.apply(this,arguments)};e.prototype=new b.Item;var f=e.prototype._create;return e.prototype._create=function(){f.call(this),this.rect=new c,this.placeRect=new c},e.prototype.dragStart=function(){this.getPosition(),this.removeTransitionStyles(),this.isTransitioning&&d&&(this.element.style[d]="none"),this.getSize(),this.isPlacing=!0,this.needsPositioning=!1,this.positionPlaceRect(this.position.x,this.position.y),this.isTransitioning=!1,this.didDrag=!1},e.prototype.dragMove=function(a,b){this.didDrag=!0;var c=this.layout.size;a-=c.paddingLeft,b-=c.paddingTop,this.positionPlaceRect(a,b)},e.prototype.dragStop=function(){this.getPosition();var a=this.position.x!==this.placeRect.x,b=this.position.y!==this.placeRect.y;this.needsPositioning=a||b,this.didDrag=!1},e.prototype.positionPlaceRect=function(a,b,c){this.placeRect.x=this.getPlaceRectCoord(a,!0),this.placeRect.y=this.getPlaceRectCoord(b,!1,c)},e.prototype.getPlaceRectCoord=function(a,b,c){var d=b?"Width":"Height",e=this.size["outer"+d],f=this.layout[b?"columnWidth":"rowHeight"],g=this.layout.size["inner"+d];b||(g=Math.max(g,this.layout.maxY),this.layout.rowHeight||(g-=this.layout.gutter));var h;if(f){f+=this.layout.gutter,g+=b?this.layout.gutter:0,a=Math.round(a/f);var i;i=this.layout.options.isHorizontal?b?"ceil":"floor":b?"floor":"ceil";var j=Math[i](g/f);j-=Math.ceil(e/f),h=j}else h=g-e;return a=c?a:Math.min(a,h),a*=f||1,Math.max(0,a)},e.prototype.copyPlaceRectPosition=function(){this.rect.x=this.placeRect.x,this.rect.y=this.placeRect.y},e.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},e}"function"==typeof define&&define.amd?define("packery/js/item",["get-style-property/get-style-property","outlayer/outlayer","./rect"],b):"object"==typeof exports?module.exports=b(require("desandro-get-style-property"),require("outlayer"),require("./rect")):a.Packery.Item=b(a.getStyleProperty,a.Outlayer,a.Packery.Rect)}(window),function(a){function b(a,b,c,d,e,f){function g(a,b){return a.position.y-b.position.y||a.position.x-b.position.x}function h(a,b){return a.position.x-b.position.x||a.position.y-b.position.y}var i=c.create("packery");return i.Item=f,i.prototype._create=function(){c.prototype._create.call(this),this.packer=new e,this.stamp(this.options.stamped);var a=this;this.handleDraggabilly={dragStart:function(b){a.itemDragStart(b.element)},dragMove:function(b){a.itemDragMove(b.element,b.position.x,b.position.y)},dragEnd:function(b){a.itemDragEnd(b.element)}},this.handleUIDraggable={start:function(b){a.itemDragStart(b.currentTarget)},drag:function(b,c){a.itemDragMove(b.currentTarget,c.position.left,c.position.top)},stop:function(b){a.itemDragEnd(b.currentTarget)}}},i.prototype._resetLayout=function(){this.getSize(),this._getMeasurements();var a=this.packer;this.options.isHorizontal?(a.width=Number.POSITIVE_INFINITY,a.height=this.size.innerHeight+this.gutter,a.sortDirection="rightwardTopToBottom"):(a.width=this.size.innerWidth+this.gutter,a.height=Number.POSITIVE_INFINITY,a.sortDirection="downwardLeftToRight"),a.reset(),this.maxY=0,this.maxX=0},i.prototype._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},i.prototype._getItemLayoutPosition=function(a){return this._packItem(a),a.rect},i.prototype._packItem=function(a){this._setRectSize(a.element,a.rect),this.packer.pack(a.rect),this._setMaxXY(a.rect)},i.prototype._setMaxXY=function(a){this.maxX=Math.max(a.x+a.width,this.maxX),this.maxY=Math.max(a.y+a.height,this.maxY)},i.prototype._setRectSize=function(a,c){var d=b(a),e=d.outerWidth,f=d.outerHeight;if(e||f){var g=this.columnWidth+this.gutter,h=this.rowHeight+this.gutter;e=this.columnWidth?Math.ceil(e/g)*g:e+this.gutter,f=this.rowHeight?Math.ceil(f/h)*h:f+this.gutter}c.width=Math.min(e,this.packer.width),c.height=Math.min(f,this.packer.height)},i.prototype._getContainerSize=function(){return this.options.isHorizontal?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},i.prototype._manageStamp=function(a){var b,c=this.getItem(a);if(c&&c.isPlacing)b=c.placeRect;else{var e=this._getElementOffset(a);b=new d({x:this.options.isOriginLeft?e.left:e.right,y:this.options.isOriginTop?e.top:e.bottom})}this._setRectSize(a,b),this.packer.placed(b),this._setMaxXY(b)}
395,i.prototype.sortItemsByPosition=function(){var a=this.options.isHorizontal?h:g;this.items.sort(a)},i.prototype.fit=function(a,b,c){var d=this.getItem(a);d&&(this._getMeasurements(),this.stamp(d.element),d.getSize(),d.isPlacing=!0,b=void 0===b?d.rect.x:b,c=void 0===c?d.rect.y:c,d.positionPlaceRect(b,c,!0),this._bindFitEvents(d),d.moveTo(d.placeRect.x,d.placeRect.y),this.layout(),this.unstamp(d.element),this.sortItemsByPosition(),d.isPlacing=!1,d.copyPlaceRectPosition())},i.prototype._bindFitEvents=function(a){function b(){d++,2===d&&c.emitEvent("fitComplete",[c,a])}var c=this,d=0;a.on("layout",function(){return b(),!0}),this.on("layoutComplete",function(){return b(),!0})},i.prototype.resize=function(){var a=b(this.element),c=this.size&&a,d=this.options.isHorizontal?"innerHeight":"innerWidth";c&&a[d]===this.size[d]||this.layout()},i.prototype.itemDragStart=function(a){this.stamp(a);var b=this.getItem(a);b&&b.dragStart()},i.prototype.itemDragMove=function(a,b,c){function d(){f.layout(),delete f.dragTimeout}var e=this.getItem(a);e&&e.dragMove(b,c);var f=this;this.clearDragTimeout(),this.dragTimeout=setTimeout(d,40)},i.prototype.clearDragTimeout=function(){this.dragTimeout&&clearTimeout(this.dragTimeout)},i.prototype.itemDragEnd=function(b){var c,d=this.getItem(b);if(d&&(c=d.didDrag,d.dragStop()),!d||!c&&!d.needsPositioning)return void this.unstamp(b);a.add(d.element,"is-positioning-post-drag");var e=this._getDragEndLayoutComplete(b,d);d.needsPositioning?(d.on("layout",e),d.moveTo(d.placeRect.x,d.placeRect.y)):d&&d.copyPlaceRectPosition(),this.clearDragTimeout(),this.on("layoutComplete",e),this.layout()},i.prototype._getDragEndLayoutComplete=function(b,c){var d=c&&c.needsPositioning,e=0,f=d?2:1,g=this;return function(){return e++,e!==f?!0:(c&&(a.remove(c.element,"is-positioning-post-drag"),c.isPlacing=!1,
395c.copyPlaceRectPosition()),g.unstamp(b),g.sortItemsByPosition(),d&&g.emitEvent("dragItemPositioned",[g,c]),!0)}},i.prototype.bindDraggabillyEvents=function(a){a.on("dragStart",this.handleDraggabilly.dragStart),a.on("dragMove",this.handleDraggabilly.dragMove),a.on("dragEnd",this.handleDraggabilly.dragEnd)},i.prototype.bindUIDraggableEvents=function(a){a.on("dragstart",this.handleUIDraggable.start).on("drag",this.handleUIDraggable.drag).on("dragstop",this.handleUIDraggable.stop)},i.Rect=d,i.Packer=e,i}"function"==typeof define&&define.amd?define("packery/js/packery",["classie/classie","get-size/get-size","outlayer/outlayer","./rect","./packer","./item"],b):"object"==typeof exports?module.exports=b(require("desandro-classie"),require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):a.Packery=b(a.classie,a.getSize,a.Outlayer,a.Packery.Rect,a.Packery.Packer,a.Packery.Item)}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a,c,d){var e=a.create("packery"),f=e.prototype._getElementOffset,g=e.prototype._getMeasurement;b(e.prototype,c.prototype),e.prototype._getElementOffset=f,e.prototype._getMeasurement=g;var h=e.prototype._resetLayout;e.prototype._resetLayout=function(){this.packer=this.packer||new c.Packer,h.apply(this,arguments)};var i=e.prototype._getItemLayoutPosition;e.prototype._getItemLayoutPosition=function(a){return a.rect=a.rect||new c.Rect,i.call(this,a)};var j=e.prototype._manageStamp;return e.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,j.apply(this,arguments)},e.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a,c=this.options.isHorizontal?"innerHeight":"innerWidth";return b&&a[c]!==this.size[c]},e}"function"==typeof define&&define.amd?define(["isotope/js/layout-mode","packery/js/packery","get-size/get-size"],c):"object"==typeof exports?module.exports=c(require("isotope-layout/js/layout-mode"),require("packery"),require("get-size")):c(a.Isotope.LayoutMode,a.Packery,a.getSize)}(window); 396 397/* ======================================================================== 398 * bootstrap-spin - v1.0 399 * https://github.com/wpic/bootstrap-spin 400 * ======================================================================== 401 * Copyright 2014 WPIC, Hamed Abdollahpour 402 * 403 * ======================================================================== 404 * Licensed under the Apache License, Version 2.0 (the "License"); 405 * you may not use this file except in compliance with the License. 406 * You may obtain a copy of the License at 407 * 408 * http://www.apache.org/licenses/LICENSE-2.0 409 * 410 * Unless required by applicable law or agreed to in writing, software 411 * distributed under the License is distributed on an "AS IS" BASIS, 412 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 413 * See the License for the specific language governing permissions and 414 * limitations under the License. 415 * ======================================================================== 416 */ 417(function ( $ ) { 418 419 $.fn.bootstrapNumber = function( options ) { 420 421 var settings = $.extend({ 422 upClass: 'default', 423 downClass: 'default', 424 center: true 425 }, options ); 426 427 return this.each(function(e) { 428 var self = $(this); 429 var clone = self.clone(); 430 431 var min = self.attr('min'); 432 var max = self.attr('max'); 433 434 function setText(n) { 435 if((min && n < min) || (max && n > max)) { 436 return false; 437 } 438 439 clone.val(n); 440 clone.trigger('change'); 441 return true; 442 } 443 444 var group = $("<div class='input-group'></div>"); 445 var down = $("<button type='button'>-</button>").attr('class', 'btn btn-' + settings.downClass).click(function() { 446 setText(parseInt(clone.val()) - 1); 447 }); 448 var up = $("<button type='button'>+</button>").attr('class', 'btn btn-' + settings.upClass).click(function() { 449 setText(parseInt(clone.val()) + 1); 450 }); 451 $("<span class='input-group-btn'></span>").append(down).appendTo(group); 452 clone.appendTo(group); 453 if(clone && settings.center) { 454 clone.css('text-align', 'center'); 455 } 456 $("<span class='input-group-btn'></span>").append(up).appendTo(group); 457 458 // remove spins from original 459 clone.attr('type', 'text').keydown(function (e) { 460 if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 || 461 (e.keyCode == 65 && e.ctrlKey === true) || 462 (e.keyCode >= 35 && e.keyCode <= 39)) { 463 return; 464 } 465 if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) { 466 e.preventDefault(); 467 } 468 469 var c = String.fromCharCode(e.which); 470 var n = parseInt(clone.val() + c); 471 472 if((min && n < min) || (max && n > max)) { 473 e.preventDefault(); 474 } 475 }); 476 477 self.replaceWith(group); 478 }); 479 }; 480} ( jQuery )); 481 482/* ------------------------------------------------------------------------ */ 483/* Main JS File - functions.js 1.0 484/* ------------------------------------------------------------------------ */ 485jQuery(document).ready(function($){ 486 'use strict'; 487 488 /* ------------------------------------------------------------------------ */
489 /* Add .on-mobile Class for mobile devices 490 /* ------------------------------------------------------------------------ */ 491 function mobileClass() { 492 if (/Android|BlackBerry|iPhone|iPad|iPod|IEMobile|Opera Mini|webOS/i.test(navigator.userAgent) === true) { 493 $('body').addClass('on-mobile'); 494 } 495 } 496 497 mobileClass(); 498 499 500 /* ------------------------------------------------------------------------ */ 501 /* Menu 502 /* ------------------------------------------------------------------------ */ 503 function sfLoad() { 504 505 $("#navigation ul.menu").superfish({ 506 delay: 300, 507 hoverClass: 'sfHover', 508 animation: {opacity:'show'}, 509 animationOut: {opacity:'hide'}, 510 speed: 'normal', 511 speedOut: 'fast', 512 cssArrows: true 513 }); 514 515 } 516 517 sfLoad(); 518 519 /* Open Submenu on left side when Screen is too small */ 520 var wapoMainWindowWidth; 521 var subMenuExist; 522 var subMenuWidth; 523 var subMenuOffset; 524 var newSubMenuPosition; 525 526 function sfSubmenuPosition() { 527 wapoMainWindowWidth = $(window).width(); 528 $('#navigation ul li ul').mouseover(function(){ 529 subMenuExist = $(this).find('.sub-menu').length; 530 if( subMenuExist > 0){ 531 subMenuWidth = $(this).find('.sub-menu').width(); 532 subMenuOffset = $(this).find('.sub-menu').parent().offset().left + subMenuWidth; 533 534 // if sub menu is off screen, give new position 535 if((subMenuOffset + subMenuWidth) > wapoMainWindowWidth){ 536 newSubMenuPosition = subMenuWidth + 3; 537 $(this).find('.sub-menu').css({ 538 left: -newSubMenuPosition, 539 top: '0', 540 }); 541 } else { 542 $(this).find('.sub-menu').css({ 543 left: newSubMenuPosition, 544 top: '0', 545 }); 546 } 547 } 548 }); 549 } 550 551 sfSubmenuPosition(); 552 553 /* ------------------------------------------------------------------------ */ 554 /* Header 555 /* ------------------------------------------------------------------------ */ 556 $('.header-v1 #search-btn').click(function(){ 557 $('#search-top').stop(true,true).fadeIn(100); 558 $('#logo-navigation, .header-icons-divider').stop().animate({'opacity' : 0}, 100); 559 $('#search-top input[type=text]').focus(); 560 return false; 561 }); 562 563 function closeSearch(){ 564 $('#search-top').stop(true,true).fadeOut(100); 565 $('#logo-navigation, .header-icons-divider').stop().animate({'opacity' : 1}, 100); 566 } 567 568 $('#close-search-btn').click(function(){ 569 closeSearch(); 570 return false; 571 }); 572 573 $('#search-top input[type=text]').blur(function(e){ 574 closeSearch(); 575 }); 576 577 $(window).resize(function() { 578 if ($(window).width() < 960) { 579 $('#search-top').hide(); 580 } 581 else { 582 $('#mobile-navigation').hide(); 583 } 584 }); 585 586 // Shopping Cart Hover 587 $(".header-v1 #shopping-btn, .header .widget_shopping_cart, .cart-popup").on({ 588 mouseenter: function () { 589 $('.widget_shopping_cart').stop(true, false).fadeIn(200); 590 }, 591 mouseleave: function () { 592 $('.widget_shopping_cart').stop(true, false).fadeOut(200); 593 } 594 }); 595 596 // Remove Top Margin when Slider is first element 597 function headerPadding(){ 598 $(window).resize(function() { 599 if ($(window).width() < 945) { 600 var headerHeight = $('#header').height(); 601 $('.header-is-transparent #page-wrap').has('#content > :first-child > .col > .wpb_column > .wpb_wrapper > .wpb_revslider_element').css({'padding-top': headerHeight}); 602 } else { 603 $('.header-is-transparent #page-wrap').has('#content > :first-child > .col > .wpb_column > .wpb_wrapper > .wpb_revslider_element').css({'padding-top': '0'}); 604 } 605 }).resize(); 606 } 607 608 headerPadding(); 609 610 /* ------------------------------------------------------------------------ */ 611 /* Mobile Navigation 612 /* ------------------------------------------------------------------------ */ 613 $('#mobile-navigation-btn').click(function(){ 614 $('#mobile-navigation').stop(true,true).slideToggle(300, 'easeOutBack'); //easeInOutSine works also nice at 200ms 615 return false; 616 }); 617 618 $('#mobile-navigation .container ul li').each(function(){ 619 if($(this).find('> ul').length > 0) { 620 $(this).addClass('has-ul'); 621 $(this).find('> a').append('<i class="fa fa-chevron-down"></i>'); 622 } 623 }); 624 625 $('#mobile-navigation .container ul li:has(">ul") > a i').click(function(){ 626 $(this).parent().parent().toggleClass('open'); 627 $(this).parent().parent().find('> ul').stop(true,true).slideToggle(300, 'easeOutBack'); 628 return false;
629 }); 630 631 /* ------------------------------------------------------------------------ */ 632 /* Smooth Anchor Scrolling & onePage Scroll Version 2.0 633 /* ------------------------------------------------------------------------ */ 634 function onePage() { 635 636 if($("body").hasClass("pagescroll")){ 637 638 var scrolleffect = "easeOutQuad", 639 scrollspeed = 400, 640 onepage_offset = $("#header").height(), 641 onepage_offset2 = 150; 642 643 if( window.location.hash ) { 644 if($.browser.webkit){ 645 setTimeout ( function () { 646 $.scrollTo( window.location.hash , 260 , { easing: scrolleffect , offset: -onepage_offset , "axis":"y" } ); 647 }, 600); 648 } 649 else { 650 $.scrollTo( window.location.hash , 260 , { easing: scrolleffect , offset: -onepage_offset , "axis":"y" } ); 651 } 652 } 653 654 $("#nav li a[href*=\\#], a[href*=\\#].pagescroll").on("click", function(e){ 655 var linkhref = $(this.hash); 656 $.scrollTo( linkhref, scrollspeed, { easing: scrolleffect , offset: -onepage_offset , 'axis':'y' } ); 657 $(this).blur(); 658 e.preventDefault(); 659 //window.location.hash = $(this).attr('href').split('#')[1]; 660 }) 661 662 var currentNode = null; 663 664 $('#nav li').removeClass('current-menu-item'); 665 666 $(window).scroll(function () { 667 $('.section').each(function(){ 668 if($(this).attr('id') != undefined && $(window).scrollTop() >= ($(this).offset().top - onepage_offset2)){ 669 currentNode = $(this).attr('id'); 670 $('#nav a').parent("li").removeClass('current-menu-item'); 671 $('#nav a[href$="#'+currentNode+'"]').parent("li").addClass('current-menu-item'); 672 } 673 }); 674 }); 675 676 } 677 678 } 679 680 onePage(); 681 682 /* ------------------------------------------------------------------------ */ 683 /* Post Navigation 684 /* ------------------------------------------------------------------------ */ 685 $('#post-navigation .prev').hover( 686 function() { 687 $(this).stop().animate({'left' : 0, 'opacity' : 1}, 160, 'easeOutSine'); 688 }, function() { 689 $(this).stop().animate({'left' : -25, 'opacity' : 0.2}, 160, 'easeOutSine'); 690 } 691 ); 692 693 $('#post-navigation .next').hover( 694 function() { 695 $(this).stop().animate({'right' : 0, 'opacity' : 1}, 160, 'easeOutSine'); 696 }, function() { 697 $(this).stop().animate({'right' : -25, 'opacity' : 0.2}, 160, 'easeOutSine'); 698 } 699 ); 700 701 /* ------------------------------------------------------------------------ */ 702 /* Back To Top 703 /* ------------------------------------------------------------------------ */ 704 function backToTop() { 705 706 $(window).scroll(function(){ 707 if($(window).scrollTop() > 200){ 708 $("#back-to-top").fadeIn(200); 709 } else{ 710 $("#back-to-top").fadeOut(200); 711 } 712 }); 713 714 $('#back-to-top, .back-to-top').click(function() { 715 $('html, body').animate({ scrollTop:0 }, '800'); 716 return false; 717 }); 718 719 } 720 721 backToTop(); 722 723 /* ------------------------------------------------------------------------ */ 724 /* Blog 725 /* ------------------------------------------------------------------------ */ 726 // Blog Image Overlay 727 $('.blog-item .blog-pic').hover(function() { 728 $(this).find('.blog-overlay').stop().animate({'opacity' : 0.94}, 160); 729 $(this).find('i').stop().animate({'margin-top' : '-33px', 'opacity' : 1}, 160, 'easeOutSine'); 730 }, function(){ 731 $(this).find('.blog-overlay').stop().animate({'opacity' : 0}, 160); 732 $(this).find('i').stop().animate({'margin-top' : '23px', 'opacity' : 0}, 160); 733 }); 734 735 // Blog Image Overlay 736 $('.blog-wrap .post .entry-image a').append( '<div class="entry-overlay"><i class="icon-minti-plus"></i></div>' ); 737 $('.blog-single .post .entry-image a').append( '<div class="entry-overlay"><i class="icon-minti-search"></i></div>' ); 738 739 $('.post .entry-image').hover(function() { 740 $(this).find('.entry-overlay').stop().animate({'opacity' : 0.94}, 160); 741 }, function(){ 742 $(this).find('.entry-overlay').stop().animate({'opacity' : 0}, 160); 743 }); 744 745 // Blog Isotope 746 function blogMasonry() { 747 748 var $blogcontainer = $('.blog-masonry .blog-wrap'); 749 750 $blogcontainer.imagesLoaded( function() { 751 setTimeout(function(){ 752 $blogcontainer.isotope({ layoutMode : 'masonry' }); 753 $blogcontainer.animate({'opacity' : 1}, 600); 754 flexsliderLoad(); 755 }, 500); 756 }); 757 758 } 759 760 blogMasonry(); 761 762 /* ------------------------------------------------------------------------ */ 763 /* Portfolio 764 /* ------------------------------------------------------------------------ */ 765 766 // Portfolio Hover 767 $('.widget_portfolio .portfolio-widget-item').hover(function() { 768 $(this).find('.portfolio-overlay').stop().animate({'opacity' : 0.9}, 180); 769 }, function(){ 770 $(this).find('.portfolio-overlay').stop().animate({'opacity' : 0}, 180); 771 }); 772 773 // Overlay-Effect 774 $('.portfolio-overlay-effect .portfolio-item .portfolio-image').hover(function() { 775 $(this).find('.portfolio-overlay').stop().animate({'bottom' : 0}, 200,'easeOutCubic'); 776 $(this).find('.portfolio-image-img').stop().animate({'top' : '-60px'}, 440,'easeOutCubic'); 777 }, function(){ 778 $(this).find('.portfolio-overlay').stop().animate({'bottom' : '-80px'}, 440,'easeOutCubic'); 779 $(this).find('.portfolio-image-img').stop().animate({'top' : '0px'}, 200,'easeOutCubic'); 780 }); 781 782 // Overlay-Icon 783 $('.portfolio-overlay-icon .portfolio-item .portfolio-image').hover(function() { 784 $(this).find('.portfolio-overlay').stop().animate({'opacity' : 0.94}, 160); 785 $(this).find('i').stop().animate({'margin-top' : '-33px', 'opacity' : 1}, 160, 'easeOutSine'); 786 }, function(){ 787 $(this).find('.portfolio-overlay').stop().animate({'opacity' : 0}, 160); 788 $(this).find('i').stop().animate({'margin-top' : '23px', 'opacity' : 0}, 160); 789 }); 790 791 // Overlay-Name 792 $('.portfolio-overlay-name .portfolio-item .portfolio-image').hover(function() { 793 $(this).find('.portfolio-overlay').stop().animate({'opacity' : 0.94}, 160); 794 }, function(){ 795 $(this).find('.portfolio-overlay').stop().animate({'opacity' : 0}, 160); 796 }); 797 798 // Portfolio Isotope 799 function portfolioIsotope(){ 800 801 var $portfoliocontainer = $('.portfolio-items'); 802 $('.portfolio-item').css({visibility: "visible", opacity: "0"}); 803 804 $portfoliocontainer.imagesLoaded( function() { 805 $portfoliocontainer.fadeIn(1000).isotope({ 806 transitionDuration: '0.6s', 807 itemSelector: '.portfolio-item', 808 resizable: false, 809 layoutMode: 'packery', 810 sortBy: 'origorder' 811 }); 812 813 // Fade In 814 $('.portfolio-item').each(function(index){ 815 $(this).delay(80*index).animate({opacity: 1}, 200); 816 }); 817 }); 818 819 /*$(window).resize(function() { 820 $portfoliocontainer.isotope('layout'); 821 });*/ 822 823 $('.portfolio-filters a').click(function(){ 824 $('.portfolio-items').addClass('animatedcontainer'); 825 $(this).closest('.portfolio-filters').find('a').removeClass('active'); 826 $(this).addClass('active'); 827 var selector = $(this).attr('data-filter'); 828 var portfolioID = $(this).closest('.portfolio-filters').attr("data-id"); 829 $('.portfolio-items[data-id=' + portfolioID + ']').isotope({ filter: selector }); 830 return false;
831 }); 832 833 } 834 835 portfolioIsotope(); 836 837 /* ------------------------------------------------------------------------ */ 838 /* FlexSlider 839 /* ------------------------------------------------------------------------ */ 840 function flexsliderLoad() { 841 842 $('.flexslider:not(.blogslider_holder)').each(function() { 843 844 $(this).flexslider({ 845 selector: ".slides > li", 846 animation: "slide", 847 prevText: "", 848 nextText: "", 849 easing: "easeOutQuad", 850 smoothHeight: true, 851 pauseOnHover: true, 852 animationSpeed: 300, 853 start: function(slider) { 854 $(slider).find('.slides') 855 .mousedown(function(e) { 856 $(this).attr('data-mousestart',e.screenX); 857 }) 858 .mouseup(function(e) { 859 var mousestart = parseInt($(this).attr('data-mousestart'),10); 860 var mouseend = e.screenX; 861 $(this).parents('.flexslider').find('.flex-direction-nav .flex-' + (mousestart - mouseend >= 0 ? 'next' : 'prev')).trigger('click'); 862 }); 863 } 864 }); 865 866 }); 867 868 } 869 870 flexsliderLoad(); 871 872 function blogsliderLoad() { 873 874 $('.blogslider_holder.flexslider').each(function() { 875 876 var interval = 4000; 877 var autoslide = true; 878 879 interval = $(this).data("interval"); 880 881 if(interval == 0){ 882 autoslide = false; 883 } else { 884 autoslide = true; 885 } 886 887 $(this).flexslider({ 888 selector: ".slides > li", 889 animation: "slide", 890 prevText: "", 891 nextText: "", 892 smoothHeight: true, 893 pauseOnHover: true, 894 animationLoop: true, 895 animationSpeed: 300, 896 slideshowSpeed: interval, 897 slideshow: autoslide, 898 controlNav: false, 899 start: function(slider) { 900 $(slider).find('.slides') 901 .mousedown(function(e) { 902 $(this).attr('data-mousestart',e.screenX); 903 }) 904 .mouseup(function(e) { 905 var mousestart = parseInt($(this).attr('data-mousestart'),10); 906 var mouseend = e.screenX; 907 $(this).parents('.flexslider').find('.flex-direction-nav .flex-' + (mousestart - mouseend >= 0 ? 'next' : 'prev')).trigger('click'); 908 }); 909 } 910 }); 911 912 }); 913 914 } 915 916 blogsliderLoad(); 917 918 function zoomingSlider() { 919 if ($('.minti_zooming_slider').length) { 920 $('.minti_zooming_slider').each(function() { 921 var $slider = $(this); 922 $slider.find('.minti_zooming_slider_item').eq(0).addClass('active'); 923 $slider.flexslider({ 924 animation: "slide", 925 animationSpeed: 400, 926 useCSS: true, 927 touch: true, 928 directionNav: true, 929 start: function(slider) { 930 $slider.find('.minti_zooming_slider_item').css({ 'opacity': '1', 'filter': 'alpha(opacity=100)' }); 931 var $titles = $slider.find('li:not(.clone) .minti_zooming_slider_item .image_wrapper .minti_zooming_slider_title'); 932 var $control_nav = $slider.find('.flex-control-nav'); 933 $control_nav.addClass('clearfix').find('li').css('width', 100 / $control_nav.find('li').length + '%').prepend('<div class="backline"></div>'); 934 var $control_links = $control_nav.find('li > a'); 935 $control_links.each(function() { 936 $(this).html(''); 937 $('<div class="minti_zooming_slider_ghost'+($(this).parent().is(':first-child') ? ' shown' : '')+'"></div><div class="nav_title"><h6>' + $titles.eq($control_links.index($(this))).html() + '</h6></div>').insertAfter($(this)).click(function() { 938 $(this).siblings('a').trigger('click'); 939 }); 940 }); 941 $(slider).find('.slides').mousedown(function(e) { 942 $(this).attr('data-mousestart',e.screenX); 943 }).mouseup(function(e) { 944 var mousestart = parseInt($(this).attr('data-mousestart'),10); 945 var mouseend = e.screenX; 946 $(this).parents('.minti_zooming_slider').find('.flex-direction-nav .flex-' + (mousestart - mouseend >= 0 ? 'next' : 'prev')).trigger('click'); 947 }); 948 }, 949 before: function(slider) { 950 var target = slider.animatingTo; 951 var current = slider.find('.flex-active').parent().index(); 952 var $items = slider.find('.minti_zooming_slider_item').removeClass('active');
953 $items.eq(target+1).add((target==0) ? $items.last() : (target==$items.length-3 ? $items.first() : '')).addClass('active'); 954 if (target==0) { 955 $('.minti_zooming_slider .slides li:first-child').next().next().clone().appendTo('.minti_zooming_slider .slides').removeClass('clone').addClass('clone_end'); 956 } 957 else if (target==$items.length-3) { 958 $('.minti_zooming_slider .slides li:last-child').prev().prev().clone().appendTo('.minti_zooming_slider .slides').removeClass('clone').addClass('clone_start'); 959 } 960 slider.find('.minti_zooming_slider_ghost.shown').css('left',(target-current)*100 + 50 + '%').removeClass('shown'); 961 slider.find('.flex-control-nav li').eq(target).find('.minti_zooming_slider_ghost').addClass('shown'); 962 }, 963 after: function(slider) { 964 slider.find('.clone_start, .clone_end').remove(); 965 slider.find('.flex-control-nav li .minti_zooming_slider_ghost').css('left',''); 966 } 967 }); 968 }); 969 } 970 } 971 972 zoomingSlider(); 973 974 /* ------------------------------------------------------------------------ */ 975 /* Alert Messages 976 /* ------------------------------------------------------------------------ */ 977 $(".alert-message .close").click(function(){ 978 $(this).parent().animate({'opacity' : '0'}, 300).slideUp(300); 979 return false; 980 }); 981 982 /* ------------------------------------------------------------------------ */ 983 /* Counter 984 /* ------------------------------------------------------------------------ */ 985 986 function counterLoad() { 987 988 $(".counter-number").each(function() { 989 var $countNumber = parseInt($(this).text()); 990 $(this).waypoint(function(){ 991 $(this).countTo({ 992 from: 0, 993 to: $countNumber, 994 speed: 900, 995 refreshInterval: 25 996 }); 997 },{ 998 triggerOnce: true, 999 offset: '99%' 1000 }); 1001 }); 1002 1003 } 1004 1005 counterLoad(); 1006 1007 /* ------------------------------------------------------------------------ */ 1008 /* Parallax Background // By http://net.tutsplus.com/ 1009 /* ------------------------------------------------------------------------ */ 1010 1011 function parallaxLoad() { 1012 1013 if (/Android|BlackBerry|iPhone|iPad|iPod|webOS/i.test(navigator.userAgent) === false) { 1014 $('.section-parallax').each(function() { 1015 var speed = $(this).data('speed')*0.4; 1016 $(this).parallax("50%", speed); 1017 }); 1018 $('.section-parallax').animate({'opacity': 1}, 600); 1019 } else { 1020 $('.section-parallax').animate({'opacity': 1}, 600); 1021 $('.section-parallax').addClass('on-mobile'); 1022 } 1023 1024 } 1025 1026 parallaxLoad(); 1027 1028 /* ------------------------------------------------------------------------ */ 1029 /* Columns Height & Vertical Center 1030 /* ------------------------------------------------------------------------ */ 1031 function columnAlign(){ 1032 1033 $('.section:has(.vertical-center)').each(function(){ 1034 1035 $(this).find('.vertical-center').animate({'opacity': 1}, 300); 1036 1037 // Find tallest Column & set heights for all others 1038 var findTallest = 0; 1039 var columnHeight = 0; 1040 1041 $(this).find('> .span_12 > .col').each(function(){ 1042 var $padding = parseInt($(this).css('padding-top')); 1043 ($(this).find('> .wpb_wrapper').height() + ($padding*2) > findTallest) ? findTallest = $(this).find('> .wpb_wrapper').height() + ($padding*2) : findTallest = findTallest; 1044 }); 1045 1046 $(this).find('> .span_12 > .col').each(function(){ 1047 $(this).css('height', findTallest); 1048 }); 1049 1050 // Vertical Center 1051 if($(this).find('> .span_12 > .col').hasClass('vertical-center') && window.innerWidth > 767){ 1052 $(this).find('> .span_12 > .col').each(function(){ 1053 columnHeight = $(this).find('> .wpb_wrapper').height(); 1054 var $setMargins = ($(this).height()/2)-(columnHeight/2); 1055 1056 if($setMargins <= 0){ 1057 $setMargins = 0; 1058 } 1059 1060 $(this).find('> .wpb_wrapper').css('margin-top', $setMargins); 1061 //$(this).find('> .wpb_wrapper').css('margin-bottom', $setMargins); 1062 }); 1063 } 1064 1065 }); 1066 1067 } 1068 1069 columnAlign(); 1070 1071 // Late Column Align 1072 // setTimeout(columnAlign,500); 1073 1074 $(window).load(function(){ 1075 columnAlign(); 1076 }); 1077 1078 /* ------------------------------------------------------------------------ */ 1079 /* Masonry Grid 1080 /* ------------------------------------------------------------------------ */ 1081 function initMasonryGrid(){ 1082 1083 resizeMasonryGrid($('.grid-sizer').width()); 1084 1085 $('.minti_masonrygrid_item').hover(function(){ 1086 $(this).find('.minti_masonrygrid_item_overlay').stop().animate({'opacity' : 1}, 140); 1087 }, function(){ 1088 $(this).find('.minti_masonrygrid_item_overlay').stop().animate({'opacity' : 0}, 140); 1089 }); 1090 1091 $('.minti_masonrygrid_item').css({visibility: "visible", opacity: "0"}); 1092 1093 if($('.minti_masonrygrid').length){ 1094 1095 $('.minti_masonrygrid').each(function(){ 1096 var $this = $(this); 1097 $this.imagesLoaded(function(){ 1098 $this.animate({opacity:1}); 1099 $this.isotope({ 1100 itemSelector: '.minti_masonrygrid_item', 1101 masonry: { 1102 columnWidth: '.grid-sizer' 1103 } 1104 }); 1105 }); 1106 1107 }); 1108 1109 // Fade In 1110 $('.minti_masonrygrid_item').each(function(index){ 1111 $(this).delay(80*index).animate({opacity: 1}, 200); 1112 }); 1113 1114 $(window).resize(function(){ 1115 resizeMasonryGrid($('.grid-sizer').width()); 1116 $('.minti_masonrygrid').isotope('reloadItems'); 1117 }); 1118 1119 } 1120 } 1121 1122 initMasonryGrid(); 1123 1124 function resizeMasonryGrid(size){ 1125 1126 var square_small = $('.masonry_ss .minti_masonrygrid_item_wrap'); 1127 var square_big = $('.masonry_sb .minti_masonrygrid_item_wrap'); 1128 var rectangle_portrait = $('.masonry_rp .minti_masonrygrid_item_wrap'); 1129 var rectangle_landscape = $('.masonry_rl .minti_masonrygrid_item_wrap'); 1130 1131 rectangle_portrait.css({'height': 2*size, 'width': size}); 1132 rectangle_landscape.css({'height': size, 'width': 2*size}); 1133 square_big.css({'height': 2*size, 'width': 2*size}); 1134 square_small.css({'height': size, 'width': size}); 1135 1136 if (window.innerWidth < 768) { 1137 square_big.css({'height': 2*size, 'width': size}); 1138 rectangle_landscape.css({'height': size, 'width': size}); 1139 } 1140 } 1141 1142 /* ------------------------------------------------------------------------ */ 1143 /* Video Section 1144 /* ------------------------------------------------------------------------ */ 1145 var min_w = 1200; // minimum video width allowed 1146 var video_width_original = 1280; // original video dimensions 1147 var video_height_original = 720; 1148 var vid_ratio = 1280/720; 1149 1150 function resizeToCover() { 1151 $('.video-wrap').each(function(i){ 1152 1153 var $sectionHeight = $(this).parents('.wpb_row').outerHeight(); 1154 var $sectionWidth = $(this).parents('.wpb_row').outerWidth(); 1155 1156 $(this).width($sectionWidth); 1157 $(this).height($sectionHeight); 1158 1159 // calculate scale ratio 1160 var scale_h = $sectionWidth / video_width_original; 1161 var scale_v = ($sectionHeight - $sectionHeight) / video_height_original; 1162 var scale = scale_h > scale_v ? scale_h : scale_v; 1163 1164 // limit minimum width 1165 min_w = vid_ratio * ($sectionHeight+20); 1166 1167 if (scale * video_width_original < min_w) {scale = min_
1167w / video_width_original;} 1168 1169 $(this).find('video, .mejs-overlay, .mejs-poster').width(Math.ceil(scale * video_width_original + 20)); 1170 $(this).find('video, .mejs-overlay, .mejs-poster').height(Math.ceil(scale * video_height_original + 20)); 1171 1172 $(this).scrollLeft(($(this).find('video').width() - $sectionWidth) / 2); 1173 $(this).scrollTop(($(this).find('video').height() - ($sectionHeight)) / 2); 1174 1175 $(this).find('.mejs-overlay, .mejs-poster').scrollTop(($(this).find('video').height() - ($sectionHeight)) / 2); 1176 1177 }); 1178 } 1179 1180 setTimeout(function(){ 1181 resizeToCover(); 1182 $('.video-wrap').animate({'opacity' : '1'}, 600); 1183 }, 600); 1184 1185 // Remove Video on mobile Devices 1186 if (/Android|BlackBerry|iPhone|iPad|iPod|webOS/i.test(navigator.userAgent) === true) { 1187 $('.video-wrap').remove(); 1188 } 1189 1190 /* ------------------------------------------------------------------------ */ 1191 /* Skillbar 1192 /* ------------------------------------------------------------------------ */ 1193 function progressbarLoad(){ 1194 1195 $('.progressbar').each(function() { 1196 $(this).waypoint(function(){ 1197 var dataperc = $(this).attr('data-perc'); 1198 $(this).find('.progress-percentage').animate({ "width" : dataperc + "%"}, dataperc*14); 1199 },{ offset: '96%' }); 1200 }); 1201 1202 } 1203 1204 progressbarLoad(); 1205 1206 /* ------------------------------------------------------------------------ */ 1207 /* Toggle 1208 /* ------------------------------------------------------------------------ */ 1209 if( $(".toggle .toggle-title").hasClass('active') ){ 1210 $(".toggle .toggle-title.active").closest('.toggle').find('.toggle-inner').show(); 1211 } 1212 1213 $(".toggle .toggle-title").click(function(){ 1214 if( $(this).hasClass('active') ){ 1215 $(this).removeClass("active").closest('.toggle').find('.toggle-inner').slideUp(200,'easeOutQuad'); 1216 } 1217 else{ 1218 $(this).addClass("active").closest('.toggle').find('.toggle-inner').slideDown(200,'easeOutQuad'); 1219 } 1220 }); 1221 1222 /* ------------------------------------------------------------------------ */ 1223 /* Misc 1224 /* ------------------------------------------------------------------------ */ 1225 // Number Field Stepper 1226 $('.qty').bootstrapNumber({ 1227 upClass: 'plus', 1228 downClass: 'minus' 1229 }); 1230 1231 // Open Sharebox links in Popup 1232 $('.sharebox a[target=_blank]').on('click', function(){ 1233 newwindow=window.open($(this).attr('href'),'','height=450,width=700'); 1234 if (window.focus) {newwindow.focus()} 1235 return false; 1236 }); 1237 1238 // Prevent iPad from Double Clicking in Dropdowns 1239 function ipadClick() { 1240 1241 if (/Android|BlackBerry|iPhone|iPad|iPod|webOS/i.test(navigator.userAgent) === true) { 1242 $('#navigation li ul li a').on('click touchend', function(e) { 1243 var el = $(this); 1244 var link = el.attr('href'); 1245 window.location = link; 1246 }); 1247 } 1248 1249 } 1250 1251 ipadClick(); 1252 1253 // Tipsy Tooltips 1254 function tipsyLoad() { 1255 1256 $('.meta-author a, .meta-comment a, .meta-category a, .portfolio-widget-item a, .sharebox li a').tipsy({ 1257 fade: true, 1258 gravity: 's', 1259 offset: 2 1260 }); 1261 1262 $('.tooltips a').tipsy({ 1263 fade: true, 1264 gravity: 's', 1265 offset: 0, 1266 }); 1267 1268 } 1269 1270 tipsyLoad(); 1271 1272 // FitVids 1273 function fitvidsLoad(){ 1274 $("#portfolio-embed, .format-video, .format-audio, .video-embed").fitVids(); 1275 } 1276 1277 fitvidsLoad(); 1278 1279 // Animate Class 1280 function animateClass() { 1281 1282 if (/Android|BlackBerry|iPhone|iPad|iPod|webOS/i.test(navigator.userAgent) === false) { 1283 setTimeout(function(){ 1284 $('.animate').each(function() { 1285 1286 $(this).waypoint(function(){ 1287 1288 if($(this).attr('data-animation') == 'fade-in-from-left'){ 1289 $(this).delay($(this).attr('data-delay')).animate({'opacity' : 1, 'left' : '0px'},400,'easeOutSine'); 1290 } else if($(this).attr('data-animation') == 'fade-in-from-right'){ 1291 $(this).delay($(this).attr('data-delay')).animate({'opacity' : 1, 'right' : '0px'},400,'easeOutSine'); 1292 } else if($(this).attr('data-animation') == 'fade-in-from-bottom'){ 1293 $(this).delay($(this).attr('data-delay')).animate({'opacity' : 1, 'bottom' : '0px'},400,'easeOutSine'); 1294 } else if($(this).attr('data-animation') == 'fade-in-from-top'){ 1295 $(this).delay($(this).attr('data-delay')).animate({'opacity' : 1, 'top' : '0px'},400,'easeOutSine'); 1296 } else if($(this).attr('data-animation') == 'fade-in') { 1297 $(this).delay($(this).attr('data-delay')).animate({'opacity' : 1},400,'easeOutSine'); 1298 } 1299 1300 },{ offset: '90%' }); 1301 1302 }); 1303 }, 100); 1304 } else { 1305 $('.animate').each(function() { 1306 if($(this).attr('data-animation') == 'fade-in-from-left'){ 1307 $(this).delay($(this).attr('data-delay')).css({'opacity' : 1, 'left' : '0px'}); 1308 } else if($(this).attr('data-animation') == 'fade-in-from-right'){ 1309 $(this).delay($(this).attr('data-delay')).css({'opacity' : 1, 'right' : '0px'}); 1310 } else if($(this).attr('data-animation') == 'fade-in-from-bottom'){ 1311 $(this).delay($(this).attr('data-delay')).css({'opacity' : 1, 'bottom' : '0px'}); 1312 } else if($(this).attr('data-animation') == 'fade-in-from-top'){ 1313 $(this).delay($(this).attr('data-delay')).css({'opacity' : 1, 'top' : '0px'}); 1314 } else if($(this).attr('data-animation') == 'fade-in') { 1315 $(this).delay($(this).attr('data-delay')).css({'opacity' : 1}); 1316 } 1317 }); 1318 } 1319 1320 } 1321 1322 animateClass(); 1323 1324 // Add Parameters to YouTube Videos oEmbed 1325 $('.video-embed iframe[src^="http://www.youtube.com"], .video-embed iframe[src^="https://www.youtube.com"], .entry-video iframe[src^="http://www.youtube.com"], .entry-video iframe[src^="https://www.youtube.com"]').each(function() { 1326 var url = $(this).attr("src") 1327 $(this).attr("src",url.substring(0,url.indexOf('?')) + '?auto
1327hide=1&modestbranding=1&rel=0&showinfo=0') 1328 }); 1329 1330 // Window Resize Functions 1331 $(window).resize(function () { 1332 resizeToCover(); 1333 columnAlign(); 1334 sfSubmenuPosition(); 1335 }); 1336 1337 /* ---------------------------- */ 1338 1339}); // end document.ready() 1340/* ------------------------------------------------------------------------ */ 1341/* EOF 1342/* ------------------------------------------------------------------------ */
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.