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