PageSourceSearch

https://www.pepperdata.com/wp-content/themes/unicon/framework/js/functions.js

js pepperdata.com collected 2026-10-03 19:51:29 UTC 78,060 bytes, 1,362 lines download raw bytes

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,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},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>
388=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-v2 #search-btn').click(function(){
557		console.log('search');
558		$('#search-top').stop(true,true).fadeIn(100);
559		$('.header-v2__container').stop().animate({'opacity' : 0}, 100);
560		$('#search-top input[type=text]').focus();
561		return false;
562	});
563
564	function closeSearch(){
565		$('#search-top').stop(true,true).fadeOut(100);
566		$('.header-v2__container').stop().animate({'opacity' : 1}, 100);
567	}
568	
569	$('#close-search-btn').click(function(){
570		closeSearch();
571		return false;
572	});
573
574	$('#search-top input[type=text]').blur(function(e){
575		closeSearch();
576	});
577
578	$(window).resize(function() {
579		if ($(window).width() < 960) {
580			$('#search-top').hide();
581		}
582		else {
583			$('#mobile-navigation').hide();
584		}
585	});
586
587	// Shopping Cart Hover
588	$(".header-v1 #shopping-btn, .header .widget_shopping_cart, .cart-popup").on({
589	mouseenter: function () {
590		$('.widget_shopping_cart').stop(true, false).fadeIn(200);
591	},
592	mouseleave: function () {
593		$('.widget_shopping_cart').stop(true, false).fadeOut(200);
594	}
595	});
596
597	// Remove Top Margin when Slider is first element
598	function headerPadding(){
599		$(window).resize(function() {
600			if ($(window).width() < 945) {
601				var headerHeight = $('#header').height();
602				$('.header-is-transparent #page-wrap').has('#content > :first-child > .col > .wpb_column > .wpb_wrapper > .wpb_revslider_element').css({'padding-top': headerHeight});
603			} else {
604				$('.header-is-transparent #page-wrap').has('#content > :first-child > .col > .wpb_column > .wpb_wrapper > .wpb_revslider_element').css({'padding-top': '0'});
605			}
606		}).resize();
607	}
608
609	headerPadding();
610	
611	/* ------------------------------------------------------------------------ */
612	/* Mobile Navigation
613	/* ------------------------------------------------------------------------ */
614	$('#mobile-navigation-btn').click(function(){
615		$('#mobile-navigation').stop(true,true).slideToggle(300, 'easeOutBack'); //easeInOutSine works also nice at 200ms
616		$('body').toggleClass('mobile-nav__open');
617		return false;
618	});
619	
620	$('#mobile-navigation .container ul li').each(function(){
621		if($(this).find('> ul').length > 0) {
622			 $(this).addClass('has-ul');
623			 $(this).find('> a').append('<i class="fa fa-chevron-down"></i>');
624		}
625	});
626	
627	$('#mobile-navigation .container ul li:has(">ul") > a i').click(function(){
628		$(this).parent().parent().toggleClass('open');
629		$(this).parent().parent().find('> ul').stop(true,true).slideToggle(300, 'easeOutBack');
630		return false;
631	});
632
633	/* ------------------------------------------------------------------------ */
634	/* Smooth Anchor Scrolling & onePage Scroll Version 2.0
635	/* ------------------------------------------------------------------------ */
636	function onePage() {
637
638		if($("body").hasClass("pagescroll")){
639
640			var scrolleffect = "easeOutQuad",
641				scrollspeed	= 400,
642				onepage_offset = $("#header").height(),
643				onepage_offset2 = 150;
644		
645			if( window.location.hash ) {
646				if($.browser.webkit){
647					setTimeout ( function () {
648						$.scrollTo( window.location.hash , 260 , { easing: scrolleffect , offset: -onepage_offset , "axis":"y" } );											
649					}, 600);
650				}
651				else {
652					$.scrollTo( window.location.hash , 260 , { easing: scrolleffect , offset: -onepage_offset , "axis":"y" } );		
653				}
654			}
655
656			$("#nav li a[href*=\\#], a[href*=\\#].pagescroll").on("click", function(e){
657				var linkhref = $(this.hash);
658				$.scrollTo( linkhref, scrollspeed, { easing: scrolleffect , offset: -onepage_offset , 'axis':'y' } );	
659				$(this).blur();
660				e.preventDefault();
661				//window.location.hash = $(this).attr('href').split('#')[1];
662			})
663
664			var currentNode = null;
665
666			$('#nav li').removeClass('current-menu-item');
667			
668			$(window).scroll(function () {
669				$('.section').each(function(){		
670					if($(this).attr('id') != undefined && $(window).scrollTop() >= ($(this).offset().top - onepage_offset2)){
671						currentNode = $(this).attr('id');
672						$('#nav a').parent("li").removeClass('current-menu-item');
673						$('#nav a[href$="#'+currentNode+'"]').parent("li").addClass('current-menu-item');
674					}
675				});
676			});
677	
678		}
679
680	}
681
682	onePage();
683
684	/* ------------------------------------------------------------------------ */
685	/* Post Navigation
686	/* ------------------------------------------------------------------------ */
687	$('#post-navigation .prev').hover(
688		function() {
689			$(this).stop().animate({'left' : 0, 'opacity' : 1}, 160, 'easeOutSine');
690		}, function() {
691			$(this).stop().animate({'left' : -25, 'opacity' : 0.2}, 160, 'easeOutSine');
692		}
693	);
694
695	$('#post-navigation .next').hover(
696		function() {
697			$(this).stop().animate({'right' : 0, 'opacity' : 1}, 160, 'easeOutSine');
698		}, function() {
699			$(this).stop().animate({'right' : -25, 'opacity' : 0.2}, 160, 'easeOutSine');
700		}
701	);
702	
703	/* ------------------------------------------------------------------------ */
704	/* Back To Top
705	/* ------------------------------------------------------------------------ */
706	function backToTop() {
707
708		$(window).scroll(function(){
709			if($(window).scrollTop() > 200){
710				$("#back-to-top").fadeIn(200);
711			} else{
712				$("#back-to-top").fadeOut(200);
713			}
714		});
715		
716		$('#back-to-top, .back-to-top').click(function() {
717			  $('html, body').animate({ scrollTop:0 }, '800');
718			  return false;
719		});
720
721	}
722	
723	backToTop();
724
725	/* ------------------------------------------------------------------------ */
726	/* Blog
727	/* ------------------------------------------------------------------------ */
728	// Blog Image Overlay
729	$('.blog-item .blog-pic').hover(function() {
730		$(this).find('.blog-overlay').stop().animate({'opacity' : 0.94}, 160);
731		$(this).find('i').stop().animate({'margin-top' : '-33px', 'opacity' : 1}, 160, 'easeOutSine');
732	}, function(){
733		$(this).find('.blog-overlay').stop().animate({'opacity' : 0}, 160);
734		$(this).find('i').stop().animate({'margin-top' : '23px', 'opacity' : 0}, 160);
735	});
736
737	// Blog Image Overlay
738	$('.blog-wrap .post .entry-image a').append( '<div class="entry-overlay"><i class="icon-minti-plus"></i></div>' );
739	$('.blog-single .post .entry-image a').append( '<div class="entry-overlay"><i class="icon-minti-search"></i></div>' );
740	
741	$('.post .entry-image').hover(function() {
742		$(this).find('.entry-overlay').stop().animate({'opacity' : 0.94}, 160);
743	}, function(){
744		$(this).find('.entry-overlay').stop().animate({'opacity' : 0}, 160);
745	});
746
747	// Blog Isotope
748	function blogMasonry() {
749
750		var $blogcontainer = $('.blog-masonry .blog-wrap');
751
752		$blogcontainer.imagesLoaded( function() {
753			setTimeout(function(){
754				$blogcontainer.isotope({ layoutMode : 'masonry' });
755				$blogcontainer.animate({'opacity' : 1}, 600);
756				flexsliderLoad();
757			}, 500);
758		});
759		
760	}
761
762	blogMasonry();
763
764	/* ------------------------------------------------------------------------ */
765	/* Portfolio
766	/* ------------------------------------------------------------------------ */
767
768	// Portfolio Hover
769	$('.widget_portfolio .portfolio-widget-item').hover(function() {
770		$(this).find('.portfolio-overlay').stop().animate({'opacity' : 0.9}, 180);
771	}, function(){
772		$(this).find('.portfolio-overlay').stop().animate({'opacity' : 0}, 180);
773	});
774
775	// Overlay-Effect
776	$('.portfolio-overlay-effect .portfolio-item .portfolio-image').hover(function() {
777		$(this).find('.portfolio-overlay').stop().animate({'bottom' : 0}, 200,'easeOutCubic');
778		$(this).find('.portfolio-image-img').stop().animate({'top' : '-60px'}, 440,'easeOutCubic');
779	}, function(){
780		$(this).find('.portfolio-overlay').stop().animate({'bottom' : '-80px'}, 440,'easeOutCubic');
781		$(this).find('.portfolio-image-img').stop().animate({'top' : '0px'}, 200,'easeOutCubic');
782	});
783
784	// Overlay-Icon
785	$('.portfolio-overlay-icon .portfolio-item .portfolio-image').hover(function() {
786		$(this).find('.portfolio-overlay').stop().animate({'opacity' : 0.94}, 160);
787		$(this).find('i').stop().animate({'margin-top' : '-33px', 'opacity' : 1}, 160, 'easeOutSine');
788	}, function(){
789		$(this).find('.portfolio-overlay').stop().animate({'opacity' : 0}, 160);
790		$(this).find('i').stop().animate({'margin-top' : '23px', 'opacity' : 0}, 160);
791	});
792
793	// Overlay-Name
794	$('.portfolio-overlay-name .portfolio-item .portfolio-image').hover(function() {
795		$(this).find('.portfolio-overlay').stop().animate({'opacity' : 0.94}, 160);
796	}, function(){
797		$(this).find('.portfolio-overlay').stop().animate({'opacity' : 0}, 160);
798	});
799
800	// Portfolio Isotope
801	function portfolioIsotope(){
802		
803		var $portfoliocontainer = $('.portfolio-items');
804   		$('.portfolio-item').css({visibility: "visible", opacity: "0"});
805
806		$portfoliocontainer.imagesLoaded( function() {
807			$portfoliocontainer.fadeIn(1000).isotope({
808				transitionDuration: '0.6s',
809				itemSelector: '.portfolio-item',
810				resizable: false,
811				layoutMode: 'packery',
812				sortBy: 'origorder'
813			});
814
815			// Fade In
816			$('.portfolio-item').each(function(index){
817				$(this).delay(80*index).animate({opacity: 1}, 200);
818			});
819		});
820
821		/*$(window).resize(function() {
822			$portfoliocontainer.isotope('layout');
823		});*/
824
825		$('.portfolio-filters a').click(function(){
826			$('.portfolio-items').addClass('animatedcontainer');
827			$(this).closest('.portfolio-filters').find('a').removeClass('active');
828			$(this).addClass('active');
829			var selector = $(this).attr('data-filter');
830			var portfolioID = $(this).closest('.portfolio-filters').attr("data-id");
831			$('.portfolio-items[data-id=' + portfolioID + ']').isotope({ filter: selector });
832			return false;
833		});
834
835	}
836
837	portfolioIsotope();
838
839	/* ------------------------------------------------------------------------ */
840	/* FlexSlider
841	/* ------------------------------------------------------------------------ */
842	function flexsliderLoad() {
843
844		$('.flexslider:not(.blogslider_holder)').each(function() {
845
846			$(this).flexslider({
847				selector: ".slides > li",
848				animation: "slide", 
849				prevText: "",
850				nextText: "",
851				easing: "easeOutQuad", 
852				smoothHeight: true,
853				pauseOnHover: true,
854				animationSpeed: 300,
855				start: function(slider) {
856					$(slider).find('.slides')
857					.mousedown(function(e) {
858						$(this).attr('data-mousestart',e.screenX);
859					})
860					.mouseup(function(e) {
861						var mousestart = parseInt($(this).attr('data-mousestart'),10);
862						var mouseend = e.screenX;
863						$(this).parents('.flexslider').find('.flex-direction-nav .flex-' + (mousestart - mouseend >= 0 ? 'next' : 'prev')).trigger('click');
864					});
865				}
866			});
867
868		});
869
870	}
871   	
872   	flexsliderLoad();
873
874   	function blogsliderLoad() {
875
876   		$('.blogslider_holder.flexslider').each(function() {
877
878	   		var interval = 4000;
879	   		var autoslide = true;
880
881	   		interval = $(this).data("interval");
882	   		
883	   		if(interval == 0){
884	   			autoslide = false;
885	   		} else {
886				autoslide = true;
887	   		}
888
889			 $(this).flexslider({
890				selector: ".slides > li",
891				animation: "slide", 
892				prevText: "",
893				nextText: "",
894				smoothHeight: true,
895				pauseOnHover: true,
896				animationLoop: true,
897				animationSpeed: 300,
898				slideshowSpeed: interval,
899				slideshow: autoslide,
900				controlNav: false, 
901				start: function(slider) {
902					$(slider).find('.slides')
903					.mousedown(function(e) {
904						$(this).attr('data-mousestart',e.screenX);
905					})
906					.mouseup(function(e) {
907						var mousestart = parseInt($(this).attr('data-mousestart'),10);
908						var mouseend = e.screenX;
909						$(this).parents('.flexslider').find('.flex-direction-nav .flex-' + (mousestart - mouseend >= 0 ? 'next' : 'prev')).trigger('click');
910					});
911				}
912			});
913
914		});
915
916	}
917   	
918   	blogsliderLoad();
919
920   	function zoomingSlider() {
921		if ($('.minti_zooming_slider').length) {
922			$('.minti_zooming_slider').each(function() {
923				var $slider = $(this);
924				$slider.find('.minti_zooming_slider_item').eq(0).addClass('active');
925				$slider.flexslider({
926					animation: "slide",
927					animationSpeed: 400,
928					useCSS: true,
929					touch: true,
930					directionNav: true,
931					start: function(slider) {
932						$slider.find('.minti_zooming_slider_item').css({ 'opacity': '1', 'filter': 'alpha(opacity=100)' });
933						var $titles = $slider.find('li:not(.clone) .minti_zooming_slider_item .image_wrapper .minti_zooming_slider_title');
934						var $control_nav = $slider.find('.flex-control-nav');
935						$control_nav.addClass('clearfix').find('li').css('width', 100 / $control_nav.find('li').length + '%').prepend('<div class="backline"></div>');
936						var $control_links = $control_nav.find('li > a');
937						$control_links.each(function() {
938							$(this).html('');
939							$('<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() {
940								$(this).siblings('a').trigger('click');
941							});
942						});
943						$(slider).find('.slides').mousedown(function(e) {
944							$(this).attr('data-mousestart',e.screenX);
945						}).mouseup(function(e) {
946							var mousestart = parseInt($(this).attr('data-mousestart'),10);
947							var mouseend = e.screenX;
948							$(this).parents('.minti_zooming_slider').find('.flex-direction-nav .flex-' + (mousestart - mouseend >= 0 ? 'next' : 'prev')).trigger('click');
949						});
950					},
951					before: function(slider) {
952						var target = slider.animatingTo;
953						var current = slider.find('.flex-active').parent().index();
954						var $items = slider.find('.minti_zooming_slider_item').removeClass('active');
955						$items.eq(target+1).add((target==0) ? $items.last() : (target==$items.length-3 ? $items.first() : '')).addClass('active');
956						if (target==0) {
957							$('.minti_zooming_slider .slides li:first-child').next().next().clone().appendTo('.minti_zooming_slider .slides').removeClass('clone').addClass('clone_end');
958						}
959						else if (target==$items.length-3) {
960							$('.minti_zooming_slider .slides li:last-child').prev().prev().clone().appendTo('.minti_zooming_slider .slides').removeClass('clone').addClass('clone_start');
961						}
962						slider.find('.minti_zooming_slider_ghost.shown').css('left',(target-current)*100 + 50 + '%').removeClass('shown');
963						slider.find('.flex-control-nav li').eq(target).find('.minti_zooming_slider_ghost').addClass('shown');
964					},
965					after: function(slider) {
966						slider.find('.clone_start, .clone_end').remove();
967						slider.find('.flex-control-nav li .minti_zooming_slider_ghost').css('left','');
968					}
969				});
970			});
971		}
972	}
973
974	zoomingSlider();
975	
976	/* ------------------------------------------------------------------------ */
977	/* Alert Messages
978	/* ------------------------------------------------------------------------ */
979	$(".alert-message .close").click(function(){
980		$(this).parent().animate({'opacity' : '0'}, 300).slideUp(300);
981		return false;
982	});
983
984	/* ------------------------------------------------------------------------ */
985	/* Counter
986	/* ------------------------------------------------------------------------ */
987
988	function counterLoad() {
989
990		$(".counter-number").each(function() {
991			var $countNumber = parseInt($(this).text());
992			$(this).waypoint(function(){ 
993				$(this).countTo({
994					from: 0,
995					to: $countNumber,
996					speed: 900,
997					refreshInterval: 25
998				});
999			},{ 
1000				triggerOnce: true,
1001				offset: '99%' 
1002			}); 
1003		});
1004
1005	}
1006
1007	counterLoad();
1008
1009	/* ------------------------------------------------------------------------ */
1010	/* Parallax Background // By http://net.tutsplus.com/
1011	/* ------------------------------------------------------------------------ */
1012
1013	function parallaxLoad() {
1014
1015		if (/Android|BlackBerry|iPhone|iPad|iPod|webOS/i.test(navigator.userAgent) === false) {
1016			$('.section-parallax').each(function() {
1017				var speed = $(this).data('speed')*0.4;
1018				$(this).parallax("50%", speed);
1019			});
1020			$('.section-parallax').animate({'opacity': 1}, 600);
1021		} else {
1022			$('.section-parallax').animate({'opacity': 1}, 600);
1023			$('.section-parallax').addClass('on-mobile');
1024		}
1025
1026	}
1027
1028	parallaxLoad();
1029
1030	/* ------------------------------------------------------------------------ */
1031	/* Columns Height & Vertical Center
1032	/* ------------------------------------------------------------------------ */
1033	function columnAlign(){
1034
1035		$('.section:has(.vertical-center)').each(function(){
1036
1037			$(this).find('.vertical-center').animate({'opacity': 1}, 300);
1038			
1039			// Find tallest Column & set heights for all others
1040			var findTallest = 0;
1041			var columnHeight = 0;
1042			
1043			$(this).find('> .span_12 > .col').each(function(){
1044				var $padding = parseInt($(this).css('padding-top'));
1045				($(this).find('> .wpb_wrapper').height() + ($padding*2) > findTallest) ? findTallest = $(this).find('> .wpb_wrapper').height() + ($padding*2) : findTallest = findTallest;
1046			}); 
1047			
1048			$(this).find('> .span_12 > .col').each(function(){
1049				$(this).css('height', findTallest);
1050			});
1051
1052			// Vertical Center
1053			if($(this).find('> .span_12 > .col').hasClass('vertical-center') && window.innerWidth > 767){
1054				$(this).find('> .span_12 > .col').each(function(){
1055					columnHeight = $(this).find('> .wpb_wrapper').height();
1056					var $setMargins = ($(this).height()/2)-(columnHeight/2);
1057
1058					if($setMargins <= 0){
1059						$setMargins = 0;
1060					}
1061
1062					$(this).find('> .wpb_wrapper').css('margin-top', $setMargins);
1063					//$(this).find('> .wpb_wrapper').css('margin-bottom', $setMargins);
1064				});
1065			}
1066		   
1067		});
1068
1069	}
1070
1071	columnAlign();
1072
1073	// Late Column Align
1074	// setTimeout(columnAlign,500);
1075
1076	$(window).load(function(){
1077	 	 columnAlign();
1078	});
1079
1080	/* ------------------------------------------------------------------------ */
1081	/* Masonry Grid
1082	/* ------------------------------------------------------------------------ */
1083	function initMasonryGrid(){
1084
1085		resizeMasonryGrid($('.grid-sizer').width());
1086
1087		$('.minti_masonrygrid_item').hover(function(){
1088			$(this).find('.minti_masonrygrid_item_overlay').stop().animate({'opacity' : 1}, 140);
1089		}, function(){
1090			$(this).find('.minti_masonrygrid_item_overlay').stop().animate({'opacity' : 0}, 140);
1091		});
1092
1093		$('.minti_masonrygrid_item').css({visibility: "visible", opacity: "0"});
1094
1095		if($('.minti_masonrygrid').length){
1096
1097			$('.minti_masonrygrid').each(function(){
1098				var $this = $(this);
1099				$this.imagesLoaded(function(){
1100					$this.animate({opacity:1});
1101					$this.isotope({
1102						itemSelector: '.minti_masonrygrid_item',
1103						masonry: {
1104							columnWidth: '.grid-sizer'
1105						}
1106					});
1107				});
1108			
1109			});
1110
1111			// Fade In
1112			$('.minti_masonrygrid_item').each(function(index){
1113				$(this).delay(80*index).animate({opacity: 1}, 200);
1114			});
1115
1116			$(window).resize(function(){
1117				resizeMasonryGrid($('.grid-sizer').width());
1118				$('.minti_masonrygrid').isotope('reloadItems');
1119			});
1120
1121		}
1122	}
1123
1124	initMasonryGrid();
1125
1126	function resizeMasonryGrid(size){
1127
1128		var square_small = $('.masonry_ss .minti_masonrygrid_item_wrap');
1129		var square_big = $('.masonry_sb .minti_masonrygrid_item_wrap');
1130		var rectangle_portrait = $('.masonry_rp .minti_masonrygrid_item_wrap');
1131		var rectangle_landscape = $('.masonry_rl .minti_masonrygrid_item_wrap');
1132
1133		rectangle_portrait.css({'height': 2*size, 'width': size});
1134		rectangle_landscape.css({'height': size, 'width': 2*size});
1135		square_big.css({'height': 2*size, 'width': 2*size});
1136		square_small.css({'height': size, 'width': size});
1137
1138		if (window.innerWidth < 768) {
1139			square_big.css({'height': 2*size, 'width': size});
1140			rectangle_landscape.css({'height': size, 'width': size});
1141		}
1142	}
1143
1144	/* ------------------------------------------------------------------------ */
1145	/* Video Section
1146	/* ------------------------------------------------------------------------ */
1147	var min_w = 1200; // minimum video width allowed
1148	var video_width_original = 1280;  // original video dimensions
1149	var video_height_original = 720;
1150	var vid_ratio = 1280/720;
1151 
1152	function resizeToCover() {
1153		$('.video-wrap').each(function(i){
1154			
1155			var $sectionHeight = $(this).parents('.wpb_row').outerHeight();         
1156			var $sectionWidth = $(this).parents('.wpb_row').outerWidth();
1157
1158			$(this).width($sectionWidth);
1159			$(this).height($sectionHeight);
1160		
1161			// calculate scale ratio
1162			var scale_h = $sectionWidth / video_width_original;
1163			var scale_v = ($sectionHeight - $sectionHeight) / video_height_original; 
1164			var scale = scale_h > scale_v ? scale_h : scale_v;
1165			
1166			// limit minimum width
1167			min_w = vid_ratio * ($sectionHeight+20);
1168			
1169			if (scale * video_width_original < min_w) {scale = min_w / video_width_original;}
1170				
1171			$(this).find('video, .mejs-overlay, .mejs-poster').width(Math.ceil(scale * video_width_original + 20));
1172			$(this).find('video, .mejs-overlay, .mejs-poster').height(Math.ceil(scale * video_height_original + 20));
1173			
1174			$(this).scrollLeft(($(this).find('video').width() - $sectionWidth) / 2);
1175			$(this).scrollTop(($(this).find('video').height() - ($sectionHeight)) / 2);
1176
1177			$(this).find('.mejs-overlay, .mejs-poster').scrollTop(($(this).find('video').height() - ($sectionHeight)) / 2);
1178
1179		});
1180	}
1181	
1182	setTimeout(function(){
1183		resizeToCover();
1184		$('.video-wrap').animate({'opacity' : '1'}, 600);
1185	}, 600);
1186
1187	// Remove Video on mobile Devices
1188	if (/Android|BlackBerry|iPhone|iPad|iPod|webOS/i.test(navigator.userAgent) === true) {
1189		$('.video-wrap').remove();      
1190	}
1191	
1192	/* ------------------------------------------------------------------------ */
1193	/* Skillbar
1194	/* ------------------------------------------------------------------------ */
1195	function progressbarLoad(){
1196
1197		$('.progressbar').each(function() {
1198			$(this).waypoint(function(){ 
1199				var dataperc = $(this).attr('data-perc');
1200				$(this).find('.progress-percentage').animate({ "width" : dataperc + "%"}, dataperc*14);
1201			},{ offset: '96%' }); 
1202		});
1203
1204	}
1205
1206	progressbarLoad();
1207	
1208	/* ------------------------------------------------------------------------ */
1209	/* Toggle
1210	/* ------------------------------------------------------------------------ */
1211	if( $(".toggle .toggle-title").hasClass('active') ){
1212		$(".toggle .toggle-title.active").closest('.toggle').find('.toggle-inner').show();
1213	}
1214	
1215	$(".toggle .toggle-title").click(function(){
1216		if( $(this).hasClass('active') ){
1217			$(this).removeClass("active").closest('.toggle').find('.toggle-inner').slideUp(200,'easeOutQuad');
1218		}
1219		else{
1220			$(this).addClass("active").closest('.toggle').find('.toggle-inner').slideDown(200,'easeOutQuad');
1221		}
1222	});
1223
1224	/* ------------------------------------------------------------------------ */
1225	/* Misc
1226	/* ------------------------------------------------------------------------ */
1227  	// Number Field Stepper
1228  	$('.qty').bootstrapNumber({
1229		upClass: 'plus',
1230		downClass: 'minus'
1231	});
1232
1233  	// Open Sharebox links in Popup
1234	$('.sharebox a[target=_blank]').on('click', function(){
1235		newwindow=window.open($(this).attr('href'),'','height=450,width=700');
1236		if (window.focus) {newwindow.focus()}
1237		return false;
1238	});
1239
1240	// Prevent iPad from Double Clicking in Dropdowns
1241	function ipadClick() {
1242
1243		if (/Android|BlackBerry|iPhone|iPad|iPod|webOS/i.test(navigator.userAgent) === true) {
1244			$('#navigation li ul li a').on('click touchend', function(e) {
1245				var el = $(this);
1246				var link = el.attr('href');
1247				window.location = link;
1248			});
1249		}
1250
1251	}
1252
1253	ipadClick();
1254
1255	// Tipsy Tooltips
1256	function tipsyLoad() {
1257
1258		$('.meta-author a, .meta-comment a, .meta-category a, .portfolio-widget-item a, .sharebox li a').tipsy({
1259			fade: true,
1260			gravity: 's',
1261			offset: 2
1262		});
1263
1264		$('.tooltips a').tipsy({
1265			fade: true,
1266			gravity: 's',
1267			offset: 0,
1268		});
1269
1270	}
1271
1272	tipsyLoad();
1273
1274	// FitVids
1275	function fitvidsLoad(){
1276		$("#portfolio-embed, .format-video, .format-audio, .video-embed").fitVids();
1277	}
1278
1279	fitvidsLoad();
1280	
1281	// Animate Class
1282	function animateClass() {
1283
1284		if (/Android|BlackBerry|iPhone|iPad|iPod|webOS/i.test(navigator.userAgent) === false) {
1285			setTimeout(function(){ 
1286				$('.animate').each(function() {
1287					
1288					$(this).waypoint(function(){  
1289
1290						if($(this).attr('data-animation') == 'fade-in-from-left'){
1291							$(this).delay($(this).attr('data-delay')).animate({'opacity' : 1, 'left' : '0px'},400,'easeOutSine');
1292						} else if($(this).attr('data-animation') == 'fade-in-from-right'){
1293							$(this).delay($(this).attr('data-delay')).animate({'opacity' : 1, 'right' : '0px'},400,'easeOutSine');
1294						} else if($(this).attr('data-animation') == 'fade-in-from-bottom'){
1295							$(this).delay($(this).attr('data-delay')).animate({'opacity' : 1, 'bottom' : '0px'},400,'easeOutSine');
1296						} else if($(this).attr('data-animation') == 'fade-in-from-top'){
1297							$(this).delay($(this).attr('data-delay')).animate({'opacity' : 1, 'top' : '0px'},400,'easeOutSine');
1298						} else if($(this).attr('data-animation') == 'fade-in') {
1299							$(this).delay($(this).attr('data-delay')).animate({'opacity' : 1},400,'easeOutSine');   
1300						}
1301
1302					},{ offset: '90%' }); 
1303				
1304				});
1305			}, 100);
1306		} else {
1307			$('.animate').each(function() {
1308				if($(this).attr('data-animation') == 'fade-in-from-left'){
1309					$(this).delay($(this).attr('data-delay')).css({'opacity' : 1, 'left' : '0px'});
1310				} else if($(this).attr('data-animation') == 'fade-in-from-right'){
1311					$(this).delay($(this).attr('data-delay')).css({'opacity' : 1, 'right' : '0px'});
1312				} else if($(this).attr('data-animation') == 'fade-in-from-bottom'){
1313					$(this).delay($(this).attr('data-delay')).css({'opacity' : 1, 'bottom' : '0px'});
1314				} else if($(this).attr('data-animation') == 'fade-in-from-top'){
1315					$(this).delay($(this).attr('data-delay')).css({'opacity' : 1, 'top' : '0px'});
1316				} else if($(this).attr('data-animation') == 'fade-in') {
1317					$(this).delay($(this).attr('data-delay')).css({'opacity' : 1});   
1318				}
1319			});
1320		} 
1321
1322	}
1323
1324	animateClass();
1325	
1326	// Add Parameters to YouTube Videos oEmbed
1327	$('.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() {
1328		var url = $(this).attr("src")
1329		$(this).attr("src",url.substring(0,url.indexOf('?')) + '?autohide=1&modestbranding=1&rel=0&showinfo=0')
1330	});
1331
1332	// Window Resize Functions
1333	$(window).resize(function () { 
1334		resizeToCover(); 
1335		columnAlign();
1336		sfSubmenuPosition();
1337	});
1338
1339
1340	/* ------------------------------------------------------------------------ */
1341	/* Pricing Form Radio
1342	/* ------------------------------------------------------------------------ */
1343
1344	$('.pricing-form .gform_wrapper').first().fadeIn();
1345
1346	$('.pricing-form__radio-label-radio input').on('click', function() {
1347		var pricingFormID = $(this).parent().attr('data-id');
1348		$('.pricing-form').find('.gform_wrapper').fadeOut();
1349		$('.pricing-form').find('#' + pricingFormID).fadeIn();
1350	});
1351
1352	$('.bloglist-filter__dropdown-select').on('change', function(e){
1353		var optionText = $(".bloglist-filter__dropdown-select option:selected").val();
1354		if (optionText != '') {
1355			window.location.href = optionText;
1356		}
1357	});
1358	
1359}); // end document.ready()
1360/* ------------------------------------------------------------------------ */
1361/* EOF
1362/* ------------------------------------------------------------------------ */

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.