Last active
August 29, 2015 14:07
-
-
Save paulmason/b7305e5b8f68222ce13f to your computer and use it in GitHub Desktop.
Blockshop Theme - 2.0, 2.0.1 Product page bug fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* | |
* foundation.js | |
*/ | |
var libFuncName=null;if("undefined"==typeof jQuery&&"undefined"==typeof Zepto&&"function"==typeof $)libFuncName=$;else if("function"==typeof jQuery)libFuncName=jQuery;else{if("function"!=typeof Zepto)throw new TypeError;libFuncName=Zepto}!function(a,b){"use strict";Array.prototype.filter||(Array.prototype.filter=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"==typeof a){for(var d=[],e=arguments[1],f=0;c>f;f++)if(f in b){var g=b[f];a&&a.call(e,g,f,b)&&d.push(g)}return d}}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&1/0!=d&&d!=-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),a.fn.stop=a.fn.stop||function(){return this},b.Foundation={name:"Foundation",version:"4.1.5",cache:{},init:function(b,c,d,e,f,g){var h,i=[b,d,e,f],j=[],g=g||!1;if(g&&(this.nc=g),this.rtl=/rtl/i.test(a("html").attr("dir")),this.scope=b||this.scope,c&&"string"==typeof c){if(/off/i.test(c))return this.off();if(h=c.split(" "),h.length>0)for(var k=h.length-1;k>=0;k--)j.push(this.init_lib(h[k],i))}else for(var l in this.libs)j.push(this.init_lib(l,i));return"function"==typeof c&&i.unshift(c),this.response_obj(j,i)},response_obj:function(a,b){for(var c=0,d=b.length;d>c;c++)if("function"==typeof b[c])return b[c]({errors:a.filter(function(a){return"string"==typeof a?a:void 0})});return a},init_lib:function(a,b){return this.trap(function(){return this.libs.hasOwnProperty(a)?(this.patch(this.libs[a]),this.libs[a].init.apply(this.libs[a],b)):void 0}.bind(this),a)},trap:function(a,b){if(!this.nc)try{return a()}catch(c){return this.error({name:b,message:"could not be initialized",more:c.name+" "+c.message})}return a()},patch:function(a){this.fix_outer(a),a.scope=this.scope,a.rtl=this.rtl},inherit:function(a,b){for(var c=b.split(" "),d=c.length-1;d>=0;d--)this.lib_methods.hasOwnProperty(c[d])&&(this.libs[a.name][c[d]]=this.lib_methods[c[d]])},random_str:function(a){var b="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split("");a||(a=Math.floor(Math.random()*b.length));for(var c="",d=0;a>d;d++)c+=b[Math.floor(Math.random()*b.length)];return c},libs:{},lib_methods:{set_data:function(a,b){var c=[this.name,+new Date,Foundation.random_str(5)].join("-");return Foundation.cache[c]=b,a.attr("data-"+this.name+"-id",c),b},get_data:function(a){return Foundation.cache[a.attr("data-"+this.name+"-id")]},remove_data:function(b){b?(delete Foundation.cache[b.attr("data-"+this.name+"-id")],b.attr("data-"+this.name+"-id","")):a("[data-"+this.name+"-id]").each(function(){delete Foundation.cache[a(this).attr("data-"+this.name+"-id")],a(this).attr("data-"+this.name+"-id","")})},throttle:function(a,b){var c=null;return function(){var d=this,e=arguments;clearTimeout(c),c=setTimeout(function(){a.apply(d,e)},b)}},data_options:function(b){function c(a){return!isNaN(a-0)&&null!==a&&""!==a&&a!==!1&&a!==!0}function d(b){return"string"==typeof b?a.trim(b):b}var e,f,g={},h=(b.attr("data-options")||":").split(";"),i=h.length;for(e=i-1;e>=0;e--)f=h[e].split(":"),/true/i.test(f[1])&&(f[1]=!0),/false/i.test(f[1])&&(f[1]=!1),c(f[1])&&(f[1]=parseInt(f[1],10)),2===f.length&&f[0].length>0&&(g[d(f[0])]=d(f[1]));return g},delay:function(a,b){return setTimeout(a,b)},scrollTo:function(c,d,e){if(!(0>e)){var f=d-a(b).scrollTop(),g=10*(f/e);this.scrollToTimerCache=setTimeout(function(){isNaN(parseInt(g,10))||(b.scrollTo(0,a(b).scrollTop()+g),this.scrollTo(c,d,e-10))}.bind(this),10)}},scrollLeft:function(a){return a.length?"scrollLeft"in a[0]?a[0].scrollLeft:a[0].pageXOffset:void 0},empty:function(a){if(a.length&&a.length>0)return!1;if(a.length&&0===a.length)return!0;for(var b in a)if(hasOwnProperty.call(a,b))return!1;return!0}},fix_outer:function(a){a.outerHeight=function(a,b){return"function"==typeof Zepto?a.height():"undefined"!=typeof b?a.outerHeight(b):a.outerHeight()},a.outerWidth=function(a){return"function"==typeof Zepto?a.width():"undefined"!=typeof bool?a.outerWidth(bool):a.outerWidth()}},error:function(a){return a.name+" "+a.message+"; "+a.more},off:function(){return a(this.scope).off(".fndtn"),a(b).off(".fndtn"),!0},zj:function(){try{return Zepto}catch(a){return jQuery}}()},a.fn.foundation=function(){var a=Array.prototype.slice.call(arguments,0);return this.each(function(){return Foundation.init.apply(Foundation,[this].concat(a)),this})}}(libFuncName,this,this.document),/*! | |
* | |
* foundation.forms.js | |
*/ | |
function(a,b,c,d){"use strict";Foundation.libs.forms={name:"forms",version:"4.1.6",cache:{},settings:{disable_class:"no-custom",last_combo:null},init:function(b,c,d){return"object"==typeof c&&a.extend(!0,this.settings,c),"string"!=typeof c?(this.settings.init||this.events(),this.assemble(),this.settings.init):this[c].call(this,d)},assemble:function(){a('form.custom input[type="radio"]',a(this.scope)).not('[data-customforms="disabled"]').each(this.append_custom_markup),a('form.custom input[type="checkbox"]',a(this.scope)).not('[data-customforms="disabled"]').each(this.append_custom_markup),a("form.custom select",a(this.scope)).not('[data-customforms="disabled"]').not("[multiple=multiple]").each(this.append_custom_select)},events:function(){var d=this;a(this.scope).on("click.fndtn.forms","form.custom span.custom.checkbox",function(b){b.preventDefault(),b.stopPropagation(),d.toggle_checkbox(a(this))}).on("click.fndtn.forms","form.custom span.custom.radio",function(b){b.preventDefault(),b.stopPropagation(),d.toggle_radio(a(this))}).on("change.fndtn.forms",'form.custom select:not([data-customforms="disabled"])',function(b,c){d.refresh_custom_select(a(this),c)}).on("click.fndtn.forms","form.custom label",function(b){if(a(b.target).is("label")){var c,e,f=a("#"+d.escape(a(this).attr("for"))+':not([data-customforms="disabled"])');0!==f.length&&("checkbox"===f.attr("type")?(b.preventDefault(),c=a(this).find("span.custom.checkbox"),0==c.length&&(c=f.add(this).siblings("span.custom.checkbox").first()),d.toggle_checkbox(c)):"radio"===f.attr("type")&&(b.preventDefault(),e=a(this).find("span.custom.radio"),0==e.length&&(e=f.add(this).siblings("span.custom.radio").first()),d.toggle_radio(e)))}}).on("click.fndtn.forms","form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector",function(b){var c=a(this),f=c.closest("div.custom.dropdown"),g=e(f,"select");return f.hasClass("open")||a(d.scope).trigger("click"),b.preventDefault(),!1===g.is(":disabled")?(f.toggleClass("open"),f.hasClass("open")?a(d.scope).on("click.fndtn.forms.customdropdown",function(){f.removeClass("open"),a(d.scope).off(".fndtn.forms.customdropdown")}):a(d.scope).on(".fndtn.forms.customdropdown"),!1):void 0}).on("click.fndtn.forms touchend.fndtn.forms","form.custom div.custom.dropdown li",function(b){var c=a(this),d=c.closest("div.custom.dropdown"),f=e(d,"select"),g=0;if(b.preventDefault(),b.stopPropagation(),!a(this).hasClass("disabled")){a("div.dropdown").not(d).removeClass("open");var h=c.closest("ul").find("li.selected");h.removeClass("selected"),c.addClass("selected"),d.removeClass("open").find("a.current").text(c.text()),c.closest("ul").find("li").each(function(a){c[0]==this&&(g=a)}),f[0].selectedIndex=g,f.data("prevalue",h.html()),f.trigger("change")}}),a(b).on("keydown",function(b){var d=(c.activeElement,Foundation.libs.forms),e=a(".custom.dropdown.open");if(e.length>0){if(b.preventDefault(),13===b.which&&e.find("li.selected").trigger("click"),27===b.which&&e.removeClass("open"),b.which>=65&&b.which<=90){var f=d.go_to(e,b.which),g=e.find("li.selected");f&&(g.removeClass("selected"),d.scrollTo(f.addClass("selected"),300))}if(38===b.which){var g=e.find("li.selected"),h=g.prev(":not(.disabled)");h.length>0&&(h.parent()[0].scrollTop=h.parent().scrollTop()-d.outerHeight(h),g.removeClass("selected"),h.addClass("selected"))}else if(40===b.which){var g=e.find("li.selected"),f=g.next(":not(.disabled)");f.length>0&&(f.parent()[0].scrollTop=f.parent().scrollTop()+d.outerHeight(f),g.removeClass("selected"),f.addClass("selected"))}}}),this.settings.init=!0},go_to:function(a,b){var c=a.find("li"),d=c.length;if(d>0)for(var e=0;d>e;e++){var f=c.eq(e).text().charAt(0).toLowerCase();if(f===String.fromCharCode(b).toLowerCase())return c.eq(e)}},scrollTo:function(a,b){if(!(0>b)){var c=a.parent(),d=this.outerHeight(a),e=d*a.index()-c.scrollTop(),f=10*(e/b);this.scrollToTimerCache=setTimeout(function(){isNaN(parseInt(f,10))||(c[0].scrollTop=c.scrollTop()+f,this.scrollTo(a,b-10))}.bind(this),10)}},append_custom_markup:function(b,c){var d=a(c),e=d.attr("type"),f=d.next("span.custom."+e);d.parent().hasClass("switch")||d.addClass("hidden-field"),0===f.length&&(f=a('<span class="custom '+e+'"></span>').insertAfter(d)),f.toggleClass("checked",d.is(":checked")),f.toggleClass("disabled",d.is(":disabled"))},append_custom_select:function(b,c){var d,e=Foundation.libs.forms,f=a(c),g=f.next("div.custom.dropdown"),h=g.find("ul"),i=(g.find(".current"),g.find(".selector")),j=f.find("option"),k=j.filter(":selected"),l=f.attr("class")?f.attr("class").split(" "):[],m=0,n="",o=!1;if(!f.hasClass(e.settings.disable_class)){if(0===g.length){var p=f.hasClass("small")?"small":f.hasClass("medium")?"medium":f.hasClass("large")?"large":f.hasClass("expand")?"expand":"";g=a('<div class="'+["custom","dropdown",p].concat(l).filter(function(a,b,c){return""==a?!1:c.indexOf(a)==b}).join(" ")+'"><a href="#" class="selector"></a><ul /></div>'),i=g.find(".selector"),h=g.find("ul"),n=j.map(function(){return"<li>"+a(this).html()+"</li>"}).get().join(""),h.append(n),o=g.prepend('<a href="#" class="current">'+k.html()+"</a>").find(".current"),f.after(g).addClass("hidden-field")}else n=j.map(function(){return"<li>"+a(this).html()+"</li>"}).get().join(""),h.html("").append(n);if(e.assign_id(f,g),g.toggleClass("disabled",f.is(":disabled")),d=h.find("li"),e.cache[g.data("id")]=d.length,j.each(function(b){this.selected&&(d.eq(b).addClass("selected"),o&&o.html(a(this).html())),a(this).is(":disabled")&&d.eq(b).addClass("disabled")}),!g.is(".small, .medium, .large, .expand")){g.addClass("open");var e=Foundation.libs.forms;e.hidden_fix.adjust(h),m=e.outerWidth(d)>m?e.outerWidth(d):m,Foundation.libs.forms.hidden_fix.reset(),g.removeClass("open")}}},assign_id:function(a,b){var c=[+new Date,Foundation.random_str(5)].join("-");a.attr("data-id",c),b.attr("data-id",c)},refresh_custom_select:function(b,c){var d=this,e=0,f=b.next(),g=b.find("option"),h=f.find("li");(h.length!=this.cache[f.data("id")]||c)&&(f.find("ul").html(""),g.each(function(){var b=a("<li>"+a(this).html()+"</li>");f.find("ul").append(b)}),g.each(function(b){this.selected&&(f.find("li").eq(b).addClass("selected"),f.find(".current").html(a(this).html())),a(this).is(":disabled")&&f.find("li").eq(b).addClass("disabled")}),f.removeAttr("style").find("ul").removeAttr("style"),f.find("li").each(function(){f.addClass("open"),d.outerWidth(a(this))>e&&(e=d.outerWidth(a(this))),f.removeClass("open")}),h=f.find("li"),this.cache[f.data("id")]=h.length)},toggle_checkbox:function(a){var b=a.prev(),c=b[0];!1===b.is(":disabled")&&(c.checked=c.checked?!1:!0,a.toggleClass("checked"),b.trigger("change"))},toggle_radio:function(a){var b=a.prev(),c=b.closest("form.custom"),d=b[0];!1===b.is(":disabled")&&(c.find('input[type="radio"][name="'+this.escape(b.attr("name"))+'"]').next().not(a).removeClass("checked"),a.hasClass("checked")||a.toggleClass("checked"),d.checked=a.hasClass("checked"),b.trigger("change"))},escape:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},hidden_fix:{tmp:[],hidden:null,adjust:function(b){var c=this;c.hidden=b.parents().andSelf().filter(":hidden"),c.hidden.each(function(){var b=a(this);c.tmp.push(b.attr("style")),b.css({visibility:"hidden",display:"block"})})},reset:function(){var b=this;b.hidden.each(function(c){var e=a(this),f=b.tmp[c];f===d?e.removeAttr("style"):e.attr("style",f)}),b.tmp=[],b.hidden=null}},off:function(){a(this.scope).off(".fndtn.forms")}};var e=function(b,c){for(var b=b.prev();b.length;){if(b.is(c))return b;b=b.prev()}return a()}}(Foundation.zj,this,this.document),/*! | |
* | |
* jquery.imageslaoded.min.js | |
*/ | |
function(a,b){var c="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";a.fn.imagesLoaded=function(d){function e(){var b=a(m),c=a(n);i&&(n.length?i.reject(k,b,c):i.resolve(k)),a.isFunction(d)&&d.call(h,k,b,c)}function f(a){g(a.target,"error"===a.type)}function g(b,d){b.src===c||-1!==a.inArray(b,l)||(l.push(b),d?n.push(b):m.push(b),a.data(b,"imagesLoaded",{isBroken:d,src:b.src}),j&&i.notifyWith(a(b),[d,k,a(m),a(n)]),k.length===l.length&&(setTimeout(e),k.unbind(".imagesLoaded",f)))}var h=this,i=a.isFunction(a.Deferred)?a.Deferred():0,j=a.isFunction(i.notify),k=h.find("img").add(h.filter("img")),l=[],m=[],n=[];return a.isPlainObject(d)&&a.each(d,function(a,b){"callback"===a?d=b:i&&i[a](b)}),k.length?k.bind("load.imagesLoaded error.imagesLoaded",f).each(function(d,e){var f=e.src,h=a.data(e,"imagesLoaded");h&&h.src===f?g(e,h.isBroken):e.complete&&e.naturalWidth!==b?g(e,0===e.naturalWidth||0===e.naturalHeight):(e.readyState||e.complete)&&(e.src=c,e.src=f)}):e(),i?i.promise(h):h}}(jQuery),/*! | |
* | |
* jquery.natural-res.js | |
*/ | |
function(a){for(var b,c=["Width","Height"];b=c.pop();)!function(b,c){a.fn[b]=b in new Image?function(){return this[0][b]}:function(){var a,b,d=this[0];return"img"===d.tagName.toLowerCase()&&(a=new Image,a.src=d.src,b=a[c]),b}}("natural"+b,b.toLowerCase())}(jQuery),/*! | |
Zoom v1.7.8 - 2013-07-30 | |
Enlarge images on click or mouseover. | |
(c) 2013 Jack Moore - http://www.jacklmoore.com/zoom | |
license: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
function(a){var b={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",onZoomIn:!1,onZoomOut:!1};a.zoom=function(b,c,d){var e,f,g,h,i,j=a(b).css("position");return a(b).css({position:/(absolute|fixed)/.test(j)?j:"relative",overflow:"hidden"}),d.style.width=d.style.height="",a(d).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:d.width,height:d.height,border:"none",maxWidth:"none"}).appendTo(b),{init:function(){e=a(b).outerWidth(),f=a(b).outerHeight(),g=(d.width-e)/a(c).outerWidth(),h=(d.height-f)/a(c).outerHeight(),i=a(c).offset()},move:function(a){var b=a.pageX-i.left,c=a.pageY-i.top;c=Math.max(Math.min(c,f),0),b=Math.max(Math.min(b,e),0),d.style.left=b*-g+"px",d.style.top=c*-h+"px"}}},a.fn.zoom=function(c){return this.each(function(){var d,e=a.extend({},b,c||{}),f=e.target||this,g=this,h=document.createElement("img"),i=a(h),j="mousemove.zoom",k=!1;(e.url||(d=a(g).find("img"),d[0]&&(e.url=d.data("src")||d.attr("src")),e.url))&&(h.onload=function(){function b(b){d.init(),d.move(b),i.stop().fadeTo(a.support.opacity?e.duration:0,1,a.isFunction(e.onZoomIn)?e.onZoomIn.call(h):!1)}function c(){i.stop().fadeTo(e.duration,0,a.isFunction(e.onZoomOut)?e.onZoomOut.call(h):!1)}var d=a.zoom(f,g,h);"grab"===e.on?a(g).on("mousedown.zoom",function(e){1===e.which&&(a(document).one("mouseup.zoom",function(){c(),a(document).off(j,d.move)}),b(e),a(document).on(j,d.move),e.preventDefault())}):"click"===e.on?a(g).on("click.zoom",function(e){return k?void 0:(k=!0,b(e),a(document).on(j,d.move),a(document).one("click.zoom",function(){c(),k=!1,a(document).off(j,d.move)}),!1)}):"toggle"===e.on?a(g).on("click.zoom",function(a){k?c():b(a),k=!k}):(d.init(),a(g).on("mouseenter.zoom",b).on("mouseleave.zoom",c).on(j,d.move)),a.isFunction(e.callback)&&e.callback.call(h)},h.src=e.url,a(g).one("zoom.destroy",function(){a(g).off(".zoom"),i.remove()}))})},a.fn.zoom.defaults=b}(window.jQuery),/*! | |
matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license | |
*/ | |
window.matchMedia||(window.matchMedia=function(){"use strict";var a=window.styleMedia||window.media;if(!a){var b=document.createElement("style"),c=document.getElementsByTagName("script")[0],d=null;b.type="text/css",b.id="matchmediajs-test",c.parentNode.insertBefore(b,c),d="getComputedStyle"in window&&window.getComputedStyle(b,null)||b.currentStyle,a={matchMedium:function(a){var c="@media "+a+"{ #matchmediajs-test { width: 1px; } }";return b.styleSheet?b.styleSheet.cssText=c:b.textContent=c,"1px"===d.width}}}return function(b){return{matches:a.matchMedium(b||"all"),media:b||"all"}}}()),/*! | |
* jQuery OwlCarousel v1.31 | |
* | |
* Copyright (c) 2013 Bartosz Wojciechowski | |
* http://www.owlgraphic.com/owlcarousel/ | |
* | |
* Licensed under MIT | |
* | |
*/ | |
"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a,b,c,d){var e={init:function(b,c){var d=this;d.$elem=a(c),d.options=a.extend({},a.fn.owlCarousel.options,d.$elem.data(),b),d.userOptions=b,d.loadContent()},loadContent:function(){function b(a){if("function"==typeof c.options.jsonSuccess)c.options.jsonSuccess.apply(this,[a]);else{var b="";for(var d in a.owl)b+=a.owl[d].item;c.$elem.html(b)}c.logIn()}var c=this;if("function"==typeof c.options.beforeInit&&c.options.beforeInit.apply(this,[c.$elem]),"string"==typeof c.options.jsonPath){var d=c.options.jsonPath;a.getJSON(d,b)}else c.logIn()},logIn:function(){var a=this;a.$elem.data("owl-originalStyles",a.$elem.attr("style")).data("owl-originalClasses",a.$elem.attr("class")),a.$elem.css({opacity:0}),a.orignalItems=a.options.items,a.checkBrowser(),a.wrapperWidth=0,a.checkVisible,a.setVars()},setVars:function(){var a=this;return 0===a.$elem.children().length?!1:(a.baseClass(),a.eventTypes(),a.$userItems=a.$elem.children(),a.itemsAmount=a.$userItems.length,a.wrapItems(),a.$owlItems=a.$elem.find(".owl-item"),a.$owlWrapper=a.$elem.find(".owl-wrapper"),a.playDirection="next",a.prevItem=0,a.prevArr=[0],a.currentItem=0,a.customEvents(),a.onStartup(),void 0)},onStartup:function(){var a=this;a.updateItems(),a.calculateAll(),a.buildControls(),a.updateControls(),a.response(),a.moveEvents(),a.stopOnHover(),a.owlStatus(),a.options.transitionStyle!==!1&&a.transitionTypes(a.options.transitionStyle),a.options.autoPlay===!0&&(a.options.autoPlay=5e3),a.play(),a.$elem.find(".owl-wrapper").css("display","block"),a.$elem.is(":visible")?a.$elem.css("opacity",1):a.watchVisibility(),a.onstartup=!1,a.eachMoveUpdate(),"function"==typeof a.options.afterInit&&a.options.afterInit.apply(this,[a.$elem])},eachMoveUpdate:function(){var a=this;a.options.lazyLoad===!0&&a.lazyLoad(),a.options.autoHeight===!0&&a.autoHeight(),a.onVisibleItems(),"function"==typeof a.options.afterAction&&a.options.afterAction.apply(this,[a.$elem])},updateVars:function(){var a=this;"function"==typeof a.options.beforeUpdate&&a.options.beforeUpdate.apply(this,[a.$elem]),a.watchVisibility(),a.updateItems(),a.calculateAll(),a.updatePosition(),a.updateControls(),a.eachMoveUpdate(),"function"==typeof a.options.afterUpdate&&a.options.afterUpdate.apply(this,[a.$elem])},reload:function(){var a=this;setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;return a.$elem.is(":visible")!==!1?!1:(a.$elem.css({opacity:0}),clearInterval(a.autoPlayInterval),clearInterval(a.checkVisible),a.checkVisible=setInterval(function(){a.$elem.is(":visible")&&(a.reload(),a.$elem.animate({opacity:1},200),clearInterval(a.checkVisible))},500),void 0)},wrapItems:function(){var a=this;a.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>'),a.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">'),a.wrapperOuter=a.$elem.find(".owl-wrapper-outer"),a.$elem.css("display","block")},baseClass:function(){var a=this,b=a.$elem.hasClass(a.options.baseClass),c=a.$elem.hasClass(a.options.theme);b||a.$elem.addClass(a.options.baseClass),c||a.$elem.addClass(a.options.theme)},updateItems:function(){var b=this;if(b.options.responsive===!1)return!1;if(b.options.singleItem===!0)return b.options.items=b.orignalItems=1,b.options.itemsCustom=!1,b.options.itemsDesktop=!1,b.options.itemsDesktopSmall=!1,b.options.itemsTablet=!1,b.options.itemsTabletSmall=!1,b.options.itemsMobile=!1,!1;var c=a(b.options.responsiveBaseWidth).width();if(c>(b.options.itemsDesktop[0]||b.orignalItems)&&(b.options.items=b.orignalItems),"undefined"!=typeof b.options.itemsCustom&&b.options.itemsCustom!==!1){b.options.itemsCustom.sort(function(a,b){return a[0]-b[0]});for(var d in b.options.itemsCustom)"undefined"!=typeof b.options.itemsCustom[d]&&b.options.itemsCustom[d][0]<=c&&(b.options.items=b.options.itemsCustom[d][1])}else c<=b.options.itemsDesktop[0]&&b.options.itemsDesktop!==!1&&(b.options.items=b.options.itemsDesktop[1]),c<=b.options.itemsDesktopSmall[0]&&b.options.itemsDesktopSmall!==!1&&(b.options.items=b.options.itemsDesktopSmall[1]),c<=b.options.itemsTablet[0]&&b.options.itemsTablet!==!1&&(b.options.items=b.options.itemsTablet[1]),c<=b.options.itemsTabletSmall[0]&&b.options.itemsTabletSmall!==!1&&(b.options.items=b.options.itemsTabletSmall[1]),c<=b.options.itemsMobile[0]&&b.options.itemsMobile!==!1&&(b.options.items=b.options.itemsMobile[1]);b.options.items>b.itemsAmount&&b.options.itemsScaleUp===!0&&(b.options.items=b.itemsAmount)},response:function(){var c,d=this;if(d.options.responsive!==!0)return!1;var e=a(b).width();d.resizer=function(){a(b).width()!==e&&(d.options.autoPlay!==!1&&clearInterval(d.autoPlayInterval),clearTimeout(c),c=setTimeout(function(){e=a(b).width(),d.updateVars()},d.options.responsiveRefreshRate))},a(b).resize(d.resizer)},updatePosition:function(){var a=this;a.jumpTo(a.currentItem),a.options.autoPlay!==!1&&a.checkAp()},appendItemsSizes:function(){var b=this,c=0,d=b.itemsAmount-b.options.items;b.$owlItems.each(function(e){var f=a(this);f.css({width:b.itemWidth}).data("owl-item",Number(e)),(0===e%b.options.items||e===d)&&(e>d||(c+=1)),f.data("owl-roundPages",c)})},appendWrapperSizes:function(){var a=this,b=0,b=a.$owlItems.length*a.itemWidth;a.$owlWrapper.css({width:2*b,left:0}),a.appendItemsSizes()},calculateAll:function(){var a=this;a.calculateWidth(),a.appendWrapperSizes(),a.loops(),a.max()},calculateWidth:function(){var a=this;a.itemWidth=Math.round(a.$elem.width()/a.options.items)},max:function(){var a=this,b=-1*(a.itemsAmount*a.itemWidth-a.options.items*a.itemWidth);return a.options.items>a.itemsAmount?(a.maximumItem=0,b=0,a.maximumPixels=0):(a.maximumItem=a.itemsAmount-a.options.items,a.maximumPixels=b),b},min:function(){return 0},loops:function(){var b=this;b.positionsInArray=[0],b.pagesInArray=[];for(var c=0,d=0,e=0;e<b.itemsAmount;e++)if(d+=b.itemWidth,b.positionsInArray.push(-d),b.options.scrollPerPage===!0){var f=a(b.$owlItems[e]),g=f.data("owl-roundPages");g!==c&&(b.pagesInArray[c]=b.positionsInArray[e],c=g)}},buildControls:function(){var b=this;(b.options.navigation===!0||b.options.pagination===!0)&&(b.owlControls=a('<div class="owl-controls"/>').toggleClass("clickable",!b.browser.isTouch).appendTo(b.$elem)),b.options.pagination===!0&&b.buildPagination(),b.options.navigation===!0&&b.buildButtons()},buildButtons:function(){var b=this,c=a('<div class="owl-buttons"/>');b.owlControls.append(c),b.buttonPrev=a("<div/>",{"class":"owl-prev",html:b.options.navigationText[0]||""}),b.buttonNext=a("<div/>",{"class":"owl-next",html:b.options.navigationText[1]||""}),c.append(b.buttonPrev).append(b.buttonNext),c.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()}),c.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(c){c.preventDefault(),a(this).hasClass("owl-next")?b.next():b.prev()})},buildPagination:function(){var b=this;b.paginationWrapper=a('<div class="owl-pagination"/>'),b.owlControls.append(b.paginationWrapper),b.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(c){c.preventDefault(),Number(a(this).data("owl-page"))!==b.currentItem&&b.goTo(Number(a(this).data("owl-page")),!0)})},updatePagination:function(){var b=this;if(b.options.pagination===!1)return!1;b.paginationWrapper.html("");for(var c=0,d=b.itemsAmount-b.itemsAmount%b.options.items,e=0;e<b.itemsAmount;e++)if(0===e%b.options.items){if(c+=1,d===e)var f=b.itemsAmount-b.options.items;var g=a("<div/>",{"class":"owl-page"}),h=a("<span></span>",{text:b.options.paginationNumbers===!0?c:"","class":b.options.paginationNumbers===!0?"owl-numbers":""});g.append(h),g.data("owl-page",d===e?f:e),g.data("owl-roundPages",c),b.paginationWrapper.append(g)}b.checkPagination()},checkPagination:function(){var b=this;return b.options.pagination===!1?!1:(b.paginationWrapper.find(".owl-page").each(function(){a(this).data("owl-roundPages")===a(b.$owlItems[b.currentItem]).data("owl-roundPages")&&(b.paginationWrapper.find(".owl-page").removeClass("active"),a(this).addClass("active"))}),void 0)},checkNavigation:function(){var a=this;return a.options.navigation===!1?!1:(a.options.rewindNav===!1&&(0===a.currentItem&&0===a.maximumItem?(a.buttonPrev.addClass("disabled"),a.buttonNext.addClass("disabled")):0===a.currentItem&&0!==a.maximumItem?(a.buttonPrev.addClass("disabled"),a.buttonNext.removeClass("disabled")):a.currentItem===a.maximumItem?(a.buttonPrev.removeClass("disabled"),a.buttonNext.addClass("disabled")):0!==a.currentItem&&a.currentItem!==a.maximumItem&&(a.buttonPrev.removeClass("disabled"),a.buttonNext.removeClass("disabled"))),void 0)},updateControls:function(){var a=this;a.updatePagination(),a.checkNavigation(),a.owlControls&&(a.options.items>=a.itemsAmount?a.owlControls.hide():a.owlControls.show())},destroyControls:function(){var a=this;a.owlControls&&a.owlControls.remove()},next:function(a){var b=this;if(b.isTransition)return!1;if(b.currentItem+=b.options.scrollPerPage===!0?b.options.items:1,b.currentItem>b.maximumItem+(1==b.options.scrollPerPage?b.options.items-1:0)){if(b.options.rewindNav!==!0)return b.currentItem=b.maximumItem,!1;b.currentItem=0,a="rewind"}b.goTo(b.currentItem,a)},prev:function(a){var b=this;if(b.isTransition)return!1;if(b.options.scrollPerPage===!0&&b.currentItem>0&&b.currentItem<b.options.items?b.currentItem=0:b.currentItem-=b.options.scrollPerPage===!0?b.options.items:1,b.currentItem<0){if(b.options.rewindNav!==!0)return b.currentItem=0,!1;b.currentItem=b.maximumItem,a="rewind"}b.goTo(b.currentItem,a)},goTo:function(a,b,c){var d=this;if(d.isTransition)return!1;if("function"==typeof d.options.beforeMove&&d.options.beforeMove.apply(this,[d.$elem]),a>=d.maximumItem?a=d.maximumItem:0>=a&&(a=0),d.currentItem=d.owl.currentItem=a,d.options.transitionStyle!==!1&&"drag"!==c&&1===d.options.items&&d.browser.support3d===!0)return d.swapSpeed(0),d.browser.support3d===!0?d.transition3d(d.positionsInArray[a]):d.css2slide(d.positionsInArray[a],1),d.afterGo(),d.singleItemTransition(),!1;var e=d.positionsInArray[a];d.browser.support3d===!0?(d.isCss3Finish=!1,b===!0?(d.swapSpeed("paginationSpeed"),setTimeout(function(){d.isCss3Finish=!0},d.options.paginationSpeed)):"rewind"===b?(d.swapSpeed(d.options.rewindSpeed),setTimeout(function(){d.isCss3Finish=!0},d.options.rewindSpeed)):(d.swapSpeed("slideSpeed"),setTimeout(function(){d.isCss3Finish=!0},d.options.slideSpeed)),d.transition3d(e)):b===!0?d.css2slide(e,d.options.paginationSpeed):"rewind"===b?d.css2slide(e,d.options.rewindSpeed):d.css2slide(e,d.options.slideSpeed),d.afterGo()},jumpTo:function(a){var b=this;"function"==typeof b.options.beforeMove&&b.options.beforeMove.apply(this,[b.$elem]),a>=b.maximumItem||-1===a?a=b.maximumItem:0>=a&&(a=0),b.swapSpeed(0),b.browser.support3d===!0?b.transition3d(b.positionsInArray[a]):b.css2slide(b.positionsInArray[a],1),b.currentItem=b.owl.currentItem=a,b.afterGo()},afterGo:function(){var a=this;a.prevArr.push(a.currentItem),a.prevItem=a.owl.prevItem=a.prevArr[a.prevArr.length-2],a.prevArr.shift(0),a.prevItem!==a.currentItem&&(a.checkPagination(),a.checkNavigation(),a.eachMoveUpdate(),a.options.autoPlay!==!1&&a.checkAp()),"function"==typeof a.options.afterMove&&a.prevItem!==a.currentItem&&a.options.afterMove.apply(this,[a.$elem])},stop:function(){var a=this;a.apStatus="stop",clearInterval(a.autoPlayInterval)},checkAp:function(){var a=this;"stop"!==a.apStatus&&a.play()},play:function(){var a=this;return a.apStatus="play",a.options.autoPlay===!1?!1:(clearInterval(a.autoPlayInterval),a.autoPlayInterval=setInterval(function(){a.next(!0)},a.options.autoPlay),void 0)},swapSpeed:function(a){var b=this;"slideSpeed"===a?b.$owlWrapper.css(b.addCssSpeed(b.options.slideSpeed)):"paginationSpeed"===a?b.$owlWrapper.css(b.addCssSpeed(b.options.paginationSpeed)):"string"!=typeof a&&b.$owlWrapper.css(b.addCssSpeed(a))},addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){var b=this;b.$owlWrapper.css(b.doTranslate(a))},css2move:function(a){var b=this;b.$owlWrapper.css({left:a})},css2slide:function(a,b){var c=this;c.isCssFinish=!1,c.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||c.options.slideSpeed,complete:function(){c.isCssFinish=!0}})},checkBrowser:function(){var a=this,d="translate3d(0px, 0px, 0px)",e=c.createElement("div");e.style.cssText=" -moz-transform:"+d+"; -ms-transform:"+d+"; -o-transform:"+d+"; -webkit-transform:"+d+"; transform:"+d;var f=/translate3d\(0px, 0px, 0px\)/g,g=e.style.cssText.match(f),h=null!==g&&1===g.length,i="ontouchstart"in b||navigator.msMaxTouchPoints;a.browser={support3d:h,isTouch:i}},moveEvents:function(){var a=this;(a.options.mouseDrag!==!1||a.options.touchDrag!==!1)&&(a.gestures(),a.disabledEvents())},eventTypes:function(){var a=this,b=["s","e","x"];a.ev_types={},a.options.mouseDrag===!0&&a.options.touchDrag===!0?b=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:a.options.mouseDrag===!1&&a.options.touchDrag===!0?b=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:a.options.mouseDrag===!0&&a.options.touchDrag===!1&&(b=["mousedown.owl","mousemove.owl","mouseup.owl"]),a.ev_types.start=b[0],a.ev_types.move=b[1],a.ev_types.end=b[2]},disabledEvents:function(){var b=this;b.$elem.on("dragstart.owl",function(a){a.preventDefault()}),b.$elem.on("mousedown.disableTextSelect",function(b){return a(b.target).is("input, textarea, select, option")})},gestures:function(){function e(a){return a.touches?{x:a.touches[0].pageX,y:a.touches[0].pageY}:a.pageX!==d?{x:a.pageX,y:a.pageY}:{x:a.clientX,y:a.clientY}}function f(b){"on"===b?(a(c).on(j.ev_types.move,h),a(c).on(j.ev_types.end,i)):"off"===b&&(a(c).off(j.ev_types.move),a(c).off(j.ev_types.end))}function g(c){var c=c.originalEvent||c||b.event;if(3===c.which)return!1;if(!(j.itemsAmount<=j.options.items)){if(j.isCssFinish===!1&&!j.options.dragBeforeAnimFinish)return!1;if(j.isCss3Finish===!1&&!j.options.dragBeforeAnimFinish)return!1;j.options.autoPlay!==!1&&clearInterval(j.autoPlayInterval),j.browser.isTouch===!0||j.$owlWrapper.hasClass("grabbing")||j.$owlWrapper.addClass("grabbing"),j.newPosX=0,j.newRelativeX=0,a(this).css(j.removeTransition());var d=a(this).position();k.relativePos=d.left,k.offsetX=e(c).x-d.left,k.offsetY=e(c).y-d.top,f("on"),k.sliding=!1,k.targetElement=c.target||c.srcElement}}function h(d){var d=d.originalEvent||d||b.event;j.newPosX=e(d).x-k.offsetX,j.newPosY=e(d).y-k.offsetY,j.newRelativeX=j.newPosX-k.relativePos,"function"==typeof j.options.startDragging&&k.dragging!==!0&&0!==j.newRelativeX&&(k.dragging=!0,j.options.startDragging.apply(j,[j.$elem])),(j.newRelativeX>8||j.newRelativeX<-8&&j.browser.isTouch===!0)&&(d.preventDefault?d.preventDefault():d.returnValue=!1,k.sliding=!0),(j.newPosY>10||j.newPosY<-10)&&k.sliding===!1&&a(c).off("touchmove.owl");var f=function(){return j.newRelativeX/5},g=function(){return j.maximumPixels+j.newRelativeX/5};j.newPosX=Math.max(Math.min(j.newPosX,f()),g()),j.browser.support3d===!0?j.transition3d(j.newPosX):j.css2move(j.newPosX)}function i(c){var c=c.originalEvent||c||b.event;if(c.target=c.target||c.srcElement,k.dragging=!1,j.browser.isTouch!==!0&&j.$owlWrapper.removeClass("grabbing"),j.dragDirection=j.owl.dragDirection=j.newRelativeX<0?"left":"right",0!==j.newRelativeX){var d=j.getNewPosition();if(j.goTo(d,!1,"drag"),k.targetElement===c.target&&j.browser.isTouch!==!0){a(c.target).on("click.disable",function(b){b.stopImmediatePropagation(),b.stopPropagation(),b.preventDefault(),a(c.target).off("click.disable")});var e=a._data(c.target,"events").click,g=e.pop();e.splice(0,0,g)}}f("off")}var j=this,k={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};j.isCssFinish=!0,j.$elem.on(j.ev_types.start,".owl-wrapper",g)},getNewPosition:function(){var a,b=this;return a=b.closestItem(),a>b.maximumItem?(b.currentItem=b.maximumItem,a=b.maximumItem):b.newPosX>=0&&(a=0,b.currentItem=0),a},closestItem:function(){var b=this,c=b.options.scrollPerPage===!0?b.pagesInArray:b.positionsInArray,d=b.newPosX,e=null;return a.each(c,function(f,g){d-b.itemWidth/20>c[f+1]&&d-b.itemWidth/20<g&&"left"===b.moveDirection()?(e=g,b.currentItem=b.options.scrollPerPage===!0?a.inArray(e,b.positionsInArray):f):d+b.itemWidth/20<g&&d+b.itemWidth/20>(c[f+1]||c[f]-b.itemWidth)&&"right"===b.moveDirection()&&(b.options.scrollPerPage===!0?(e=c[f+1]||c[c.length-1],b.currentItem=a.inArray(e,b.positionsInArray)):(e=c[f+1],b.currentItem=f+1))}),b.currentItem},moveDirection:function(){var a,b=this;return b.newRelativeX<0?(a="right",b.playDirection="next"):(a="left",b.playDirection="prev"),a},customEvents:function(){var a=this;a.$elem.on("owl.next",function(){a.next()}),a.$elem.on("owl.prev",function(){a.prev()}),a.$elem.on("owl.play",function(b,c){a.options.autoPlay=c,a.play(),a.hoverStatus="play"}),a.$elem.on("owl.stop",function(){a.stop(),a.hoverStatus="stop"}),a.$elem.on("owl.goTo",function(b,c){a.goTo(c)}),a.$elem.on("owl.jumpTo",function(b,c){a.jumpTo(c)})},stopOnHover:function(){var a=this;a.options.stopOnHover===!0&&a.browser.isTouch!==!0&&a.options.autoPlay!==!1&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var b=this;if(b.options.lazyLoad===!1)return!1;for(var c=0;c<b.itemsAmount;c++){var e=a(b.$owlItems[c]);if("loaded"!==e.data("owl-loaded")){var f,g=e.data("owl-item"),h=e.find(".lazyOwl");"string"==typeof h.data("src")?(e.data("owl-loaded")===d&&(h.hide(),e.addClass("loading").data("owl-loaded","checked")),f=b.options.lazyFollow===!0?g>=b.currentItem:!0,f&&g<b.currentItem+b.options.items&&h.length&&b.lazyPreload(e,h)):e.data("owl-loaded","loaded")}}},lazyPreload:function(a,b){function c(){f+=1,e.completeImg(b.get(0))||g===!0?d():100>=f?setTimeout(c,100):d()}function d(){a.data("owl-loaded","loaded").removeClass("loading"),b.removeAttr("data-src"),"fade"===e.options.lazyEffect?b.fadeIn(400):b.show(),"function"==typeof e.options.afterLazyLoad&&e.options.afterLazyLoad.apply(this,[e.$elem])}var e=this,f=0;if("DIV"===b.prop("tagName")){b.css("background-image","url("+b.data("src")+")");var g=!0}else b[0].src=b.data("src");c()},autoHeight:function(){function b(){g+=1,e.completeImg(f.get(0))?c():100>=g?setTimeout(b,100):e.wrapperOuter.css("height","")}function c(){var b=a(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css("height",b+"px"),e.wrapperOuter.hasClass("autoHeight")||setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}var e=this,f=a(e.$owlItems[e.currentItem]).find("img");if(f.get(0)!==d){var g=0;b()}else c()},completeImg:function(a){return a.complete?"undefined"!=typeof a.naturalWidth&&0==a.naturalWidth?!1:!0:!1},onVisibleItems:function(){var b=this;b.options.addClassActive===!0&&b.$owlItems.removeClass("active"),b.visibleItems=[];for(var c=b.currentItem;c<b.currentItem+b.options.items;c++)b.visibleItems.push(c),b.options.addClassActive===!0&&a(b.$owlItems[c]).addClass("active");b.owl.visibleItems=b.visibleItems},transitionTypes:function(a){var b=this;b.outClass="owl-"+a+"-out",b.inClass="owl-"+a+"-in"},singleItemTransition:function(){function a(a){return{position:"relative",left:a+"px"}}var b=this;b.isTransition=!0;var c=b.outClass,d=b.inClass,e=b.$owlItems.eq(b.currentItem),f=b.$owlItems.eq(b.prevItem),g=Math.abs(b.positionsInArray[b.currentItem])+b.positionsInArray[b.prevItem],h=Math.abs(b.positionsInArray[b.currentItem])+b.itemWidth/2;b.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":h+"px","-moz-perspective-origin":h+"px","perspective-origin":h+"px"});var i="webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend";f.css(a(g,10)).addClass(c).on(i,function(){b.endPrev=!0,f.off(i),b.clearTransStyle(f,c)}),e.addClass(d).on(i,function(){b.endCurrent=!0,e.off(i),b.clearTransStyle(e,d)})},clearTransStyle:function(a,b){var c=this;a.css({position:"",left:""}).removeClass(b),c.endPrev&&c.endCurrent&&(c.$owlWrapper.removeClass("owl-origin"),c.endPrev=!1,c.endCurrent=!1,c.isTransition=!1)},owlStatus:function(){var a=this;a.owl={userOptions:a.userOptions,baseElement:a.$elem,userItems:a.$userItems,owlItems:a.$owlItems,currentItem:a.currentItem,prevItem:a.prevItem,visibleItems:a.visibleItems,isTouch:a.browser.isTouch,browser:a.browser,dragDirection:a.dragDirection}},clearEvents:function(){var d=this;d.$elem.off(".owl owl mousedown.disableTextSelect"),a(c).off(".owl owl"),a(b).off("resize",d.resizer)},unWrap:function(){var a=this;0!==a.$elem.children().length&&(a.$owlWrapper.unwrap(),a.$userItems.unwrap().unwrap(),a.owlControls&&a.owlControls.remove()),a.clearEvents(),a.$elem.attr("style",a.$elem.data("owl-originalStyles")||"").attr("class",a.$elem.data("owl-originalClasses"))},destroy:function(){var a=this;a.stop(),clearInterval(a.checkVisible),a.unWrap(),a.$elem.removeData()},reinit:function(b){var c=this,d=a.extend({},c.userOptions,b);c.unWrap(),c.init(d,c.$elem)},addItem:function(a,b){var c,e=this;return a?0===e.$elem.children().length?(e.$elem.append(a),e.setVars(),!1):(e.unWrap(),c=b===d||-1===b?-1:b,c>=e.$userItems.length||-1===c?e.$userItems.eq(-1).after(a):e.$userItems.eq(c).before(a),e.setVars(),void 0):!1},removeItem:function(a){var b,c=this;return 0===c.$elem.children().length?!1:(b=a===d||-1===a?-1:a,c.unWrap(),c.$userItems.eq(b).remove(),c.setVars(),void 0)}};a.fn.owlCarousel=function(b){return this.each(function(){if(a(this).data("owl-init")===!0)return!1;a(this).data("owl-init",!0);var c=Object.create(e);c.init(b,this),a.data(this,"owlCarousel",c)})},a.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1e3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:b,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}}(jQuery,window,document),/*! | |
* | |
* responsive-tables.js | |
*/ | |
$(document).ready(function(){function a(a){a.wrap("<div class='table-wrapper' />");var b=a.clone();b.find("td:not(:first-child), th:not(:first-child)").css("display","none"),b.removeClass("responsive"),a.closest(".table-wrapper").append(b),b.wrap("<div class='pinned' />"),a.wrap("<div class='scrollable' />"),c(a,b)}function b(a){a.closest(".table-wrapper").find(".pinned").remove(),a.unwrap(),a.unwrap()}function c(a,b){var c=a.find("tr"),d=b.find("tr"),e=[];c.each(function(a){var b=$(this),c=b.find("th, td");c.each(function(){var b=$(this).outerHeight(!0);e[a]=e[a]||0,b>e[a]&&(e[a]=b)})}),d.each(function(a){$(this).height(e[a])})}var d=!1,e=function(){return $(window).width()<767&&!d?(d=!0,$("table.responsive").each(function(b,c){a($(c))}),!0):(d&&$(window).width()>767&&(d=!1,$("table.responsive").each(function(a,c){b($(c))})),void 0)};$(window).load(e),$(window).on("redraw",function(){d=!1,e()}),$(window).on("resize",e)}),/*! | |
* | |
* Spin.js | |
* Copyright (c) 2011-2013 Felix Gnass | |
* Licensed under the MIT license | |
*/ | |
function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+100*(c/d),g=Math.max(1-(1-a)/b*(100-f),a),h=k.substring(0,k.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(n.insertRule("@"+i+"keyframes "+e+"{"+"0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}"+"100%{opacity:"+g+"}"+"}",n.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<l.length;d++)if(c=l[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a){for(var b={x:a.offsetLeft,y:a.offsetTop};a=a.offsetParent;)b.x+=a.offsetLeft,b.y+=a.offsetTop;return b}function h(a,b){return"string"==typeof a?a:a[b%a.length]}function i(a){return"undefined"==typeof this?new i(a):(this.opts=f(a||{},i.defaults,o),void 0)}function j(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}n.addRule(".spin-vml","behavior:url(#default#VML)"),i.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function g(a,g,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~g}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:h(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)g(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)g(i);return b(a,m)},i.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var k,l=["webkit","Moz","ms","O"],m={},n=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),o={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"};i.defaults={},f(i.prototype,{spin:function(b){this.stop();var c,d,f=this,h=f.opts,i=f.el=e(a(0,{className:h.className}),{position:h.position,width:0,zIndex:h.zIndex}),j=h.radius+h.length+h.width;if(b&&(b.insertBefore(i,b.firstChild||null),d=g(b),c=g(i),e(i,{left:("auto"==h.left?d.x-c.x+(b.offsetWidth>>1):parseInt(h.left,10)+j)+"px",top:("auto"==h.top?d.y-c.y+(b.offsetHeight>>1):parseInt(h.top,10)+j)+"px"})),i.setAttribute("role","progressbar"),f.lines(i,f.opts),!k){var l,m=0,n=(h.lines-1)*(1-h.direction)/2,o=h.fps,p=o/h.speed,q=(1-h.opacity)/(p*h.trail/100),r=p/h.lines;!function s(){m++;for(var a=0;a<h.lines;a++)l=Math.max(1-(m+(h.lines-a)*r)%p*q,h.opacity),f.opacity(i,a*h.direction+n,l,h);f.timeout=f.el&&setTimeout(s,~~(1e3/o))}()}return f},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function g(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*j+f.rotate)+"deg) translate("+f.radius+"px"+",0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,j=0,l=(f.lines-1)*(1-f.direction)/2;j<f.lines;j++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:k&&c(f.opacity,f.trail,l+j*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(g("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,g(h(f.color,j),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var p=e(a("group"),{behavior:"url(#default#VML)"});return!d(p,"transform")&&p.adj?j():k=d(p,"animation"),i}),function(a){if("object"==typeof exports)a(require("jquery"),require("spin"));else if("function"==typeof define&&define.amd)define(["jquery","spin"],a);else{if(!window.Spinner)throw new Error("Spin.js not present");a(window.jQuery,window.Spinner)}}(function(a,b){a.fn.spin=function(c,d){return this.each(function(){var e=a(this),f=e.data();f.spinner&&(f.spinner.stop(),delete f.spinner),c!==!1&&(c=a.extend({color:d||e.css("color")},a.fn.spin.presets[c]||c),f.spinner=new b(c).spin(this))})},a.fn.spin.presets={tiny:{lines:8,length:2,width:2,radius:3},small:{lines:8,length:4,width:3,radius:5},large:{lines:10,length:8,width:4,radius:8}}}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
$(document).foundation(); | |
jQuery(function($) { | |
var FullscreenSlider, HEADER, PAGE, VideoModal, addToCart, addToCartFail, addToCartPass, cart_dropdown_timer, current_window, fadeOutCartDropdown, fullscreen_slider, imgZoom, instagramFeed, isFirefox, log, mainMenu, mediaQueries, mobileMenu, mq_large, mq_medium, mq_small, page_content, photos, positions, productModal, recentCartItemPopUp, retinaLogo, searchAndAccount, selectCallback, slideDownCartDropdown, smallPromos, startTimer, stickyFooter, stopResetTimer, thumbs, toggleCartDropdown, updateActiveImg, validateSize; | |
PAGE = $('body'); | |
HEADER = $('.main-header'); | |
mq_small = 768; | |
mq_medium = 1280; | |
mq_large = 1440; | |
log = function(value) { | |
if (typeof console !== "undefined") { | |
return console.log(value); | |
} | |
}; | |
stickyFooter = function() { | |
var total_content_height; | |
total_content_height = $('.main-header').outerHeight() + $('.main-content').outerHeight() + $('.main-footer').outerHeight(); | |
if ($(window).outerHeight() > total_content_height) { | |
return $('.main-content').css({ | |
'min-height': $(window).outerHeight() - $('.main-header').outerHeight() - $('.main-footer').outerHeight() | |
}); | |
} | |
}; | |
stickyFooter(); | |
$(window).resize(function() { | |
return stickyFooter(); | |
}); | |
if (general_external_links_enabled) { | |
$('a[href^="http"]').not('a[href^="' + shop_url + '"]').attr('target', '_blank'); | |
} | |
retinaLogo = function() { | |
if ($('.main-header .title img').length && window.devicePixelRatio >= 2) { | |
if ($('.main-header .title img').length) { | |
return $('.main-header .title img').imagesLoaded(function() { | |
$(this).width($(this).naturalWidth()); | |
return $(this).attr('src', $(this).attr('data-retina')); | |
}); | |
} | |
} | |
}; | |
retinaLogo(); | |
searchAndAccount = function() { | |
$('.searchbar-open').click(function() { | |
$(this).closest('.menu').fadeOut(100, function() { | |
$('.main-header .searchbar-container').fadeIn(200); | |
return $('.main-header .searchbar-container .search-box').focus(); | |
}); | |
return false; | |
}); | |
$('.searchbar-close').click(function() { | |
$('.main-header .searchbar-container').fadeOut(100, function() { | |
return $('.search-account .menu').fadeIn(200); | |
}); | |
return false; | |
}); | |
$('.account-open').click(function() { | |
$(this).closest('.menu').fadeOut(100, function() { | |
return $('.account-container').fadeIn(200); | |
}); | |
return false; | |
}); | |
return $('.account-close').click(function() { | |
$('.account-container').fadeOut(100, function() { | |
return $('.search-account .menu').fadeIn(200); | |
}); | |
return false; | |
}); | |
}; | |
searchAndAccount(); | |
mainMenu = function() { | |
var dropdown_panel, main_header, main_menu_dropdown_timer, slideUpPanel, startTimer, stopResetTimer; | |
dropdown_panel = $(".main-menu-dropdown-panel .row"); | |
main_header = $(".template-index .main-header"); | |
HEADER.find(".main-menu .widescreen .dropdown > a").click(function() { | |
var autoHeight, curHeight, dropdown, sub_nav; | |
dropdown = $(this).parent(); | |
sub_nav = dropdown.find(".sub-nav .columns"); | |
if (PAGE.hasClass('template-index') && PAGE.hasClass('transparent-menu') && Modernizr.touch) { | |
if ($('.main-header').hasClass('dropdown-open')) { | |
if (dropdown.hasClass("active")) { | |
startTimer(); | |
} | |
} else { | |
$('.main-header .bg').fadeIn(); | |
} | |
} | |
if (dropdown.hasClass("active")) { | |
slideUpPanel(); | |
} else if ($('.main-header').hasClass('dropdown-open')) { | |
dropdown_panel.find(".columns").animate({ | |
opacity: 0 | |
}, 200); | |
dropdown_panel.find('.columns').remove(); | |
HEADER.find(".main-menu .dropdown").removeClass('active'); | |
dropdown.addClass("active"); | |
sub_nav.clone().appendTo(".main-menu-dropdown-panel .row"); | |
dropdown_panel.find(".columns").delay(200).animate({ | |
opacity: 1 | |
}, 200); | |
curHeight = dropdown_panel.height(); | |
autoHeight = dropdown_panel.css('height', 'auto').outerHeight(); | |
dropdown_panel.height(curHeight).animate({ | |
height: autoHeight | |
}, 400); | |
} else { | |
dropdown_panel.find('.columns').remove(); | |
$('.main-header').addClass('dropdown-open'); | |
dropdown.addClass("active"); | |
sub_nav.clone().appendTo(".main-menu-dropdown-panel .row"); | |
dropdown_panel.slideDown(400, function() { | |
return dropdown_panel.css("height", dropdown_panel.outerHeight()); | |
}); | |
dropdown_panel.find(".columns").delay(200).animate({ | |
opacity: 1 | |
}, 200); | |
} | |
return false; | |
}); | |
slideUpPanel = function() { | |
$('.main-header').removeClass('dropdown-open'); | |
dropdown_panel.find(".columns").animate({ | |
opacity: 0 | |
}, 200); | |
return dropdown_panel.delay(200).slideUp(function() { | |
HEADER.find(".main-menu .dropdown").removeClass('active'); | |
dropdown_panel.find('.columns').remove(); | |
return dropdown_panel.css('height', 'auto'); | |
}); | |
}; | |
main_menu_dropdown_timer = ''; | |
if (Modernizr.touch === false) { | |
$('.main-header').mouseenter(function() { | |
if (PAGE.hasClass('template-index') && PAGE.hasClass('transparent-menu')) { | |
$('.main-header .bg').fadeIn(); | |
} | |
return stopResetTimer(); | |
}).mouseleave(function() { | |
if ($('.main-header').hasClass('dropdown-open')) { | |
return startTimer(); | |
} else { | |
if (PAGE.hasClass('template-index') && main_header.css("position") === "absolute") { | |
return $('.main-header .bg').stop(true, true).fadeOut(); | |
} | |
} | |
}); | |
} | |
startTimer = function() { | |
return main_menu_dropdown_timer = setTimeout((function() { | |
slideUpPanel(); | |
if (PAGE.hasClass('template-index') && PAGE.hasClass('transparent-menu')) { | |
return $('.main-header .bg').delay(300).fadeOut(); | |
} | |
}), 500); | |
}; | |
return stopResetTimer = function() { | |
return clearTimeout(main_menu_dropdown_timer); | |
}; | |
}; | |
mainMenu(); | |
mobileMenu = function() { | |
var dropdown_links, mobile_menu, mobile_menu_link; | |
mobile_menu_link = $('.mobile-tools .menu'); | |
mobile_menu = $('.mobile-menu'); | |
dropdown_links = mobile_menu.find("a.dropdown-link"); | |
mobile_menu_link.click(function() { | |
mobile_menu.toggle(); | |
return false; | |
}); | |
return dropdown_links.click(function() { | |
var sub_menu; | |
sub_menu = $(this).closest('li').find('.sub-nav:eq(0)'); | |
sub_menu.slideToggle(); | |
$(this).find('.glyph.plus').toggle(); | |
$(this).find('.glyph.minus').toggle(); | |
return false; | |
}); | |
}; | |
mobileMenu(); | |
instagramFeed = function() { | |
var feed_url, getImages, items_to_load, username, username_url; | |
username = $('.instagram-widget').attr('data-username'); | |
username_url = 'https://api.instagram.com/v1/users/search?q=fatandfuriousburger&client_id=5ee50bb276c54efebf83323faac4a82e'; | |
feed_url = 'https://api.instagram.com/v1/users/296922654/media/recent/?client_id=5ee50bb276c54efebf83323faac4a82e'; | |
items_to_load = 5; | |
if (!home_widget_twitter_enabled && !home_widget_blog_enabled) { | |
items_to_load += 6; | |
$('.instagram-widget .items').addClass('wide'); | |
} | |
$.ajax({ | |
dataType: "jsonp", | |
url: 'https://api.instagram.com/v1/users/search?q=' + username + '&client_id=5ee50bb276c54efebf83323faac4a82e', | |
success: function(response) {} | |
}).done(function(data) { | |
var user_id; | |
user_id = data.data[0].id; | |
return getImages(user_id); | |
}); | |
return getImages = function(user_id) { | |
return $.ajax({ | |
dataType: "jsonp", | |
url: 'https://api.instagram.com/v1/users/' + user_id + '/media/recent/?client_id=5ee50bb276c54efebf83323faac4a82e', | |
success: function(response) {} | |
}).done(function(data) { | |
var i, _i, _results; | |
_results = []; | |
for (i = _i = 0; 0 <= items_to_load ? _i <= items_to_load : _i >= items_to_load; i = 0 <= items_to_load ? ++_i : --_i) { | |
_results.push($('.instagram-widget .items').append('<a class="item" target="_blank" href="' + data.data[i].link + '"><img src="' + data.data[i].images.low_resolution.url + '" /></a>')); | |
} | |
return _results; | |
}); | |
}; | |
}; | |
VideoModal = (function() { | |
function VideoModal(video) { | |
this.createIframe = __bind(this.createIframe, this); | |
this.extractVideoId = __bind(this.extractVideoId, this); | |
this.extractVideoType = __bind(this.extractVideoType, this); | |
this.eventListeners = __bind(this.eventListeners, this); | |
this.centerPosition = __bind(this.centerPosition, this); | |
this.close = __bind(this.close, this); | |
this.open = __bind(this.open, this); | |
this.opened = false; | |
this.video = video; | |
this.modal = $('.video.modal'); | |
this.player_button = video.find('.player-button'); | |
this.src_url = video.find('.play-button').attr('href'); | |
this.type = this.extractVideoType(); | |
this.id = this.extractVideoId(); | |
this.iframe = this.createIframe(); | |
this.caption = video.find('.caption'); | |
} | |
VideoModal.prototype.open = function() { | |
this.opened = true; | |
this.modal.find(".flex-video").append(this.iframe); | |
if (this.caption.length > 0) { | |
this.modal.find(".caption").append(this.caption.html()); | |
this.modal.addClass("wide"); | |
} else { | |
this.modal.find(".player").removeClass('large-8'); | |
this.modal.find('.caption').hide(); | |
this.modal.removeClass("wide"); | |
} | |
this.player_button.hide(); | |
$('.modal-mask').show(); | |
this.modal.find('.close').show(); | |
this.modal.fadeIn(); | |
this.centerPosition(); | |
$(".modal").fadeIn(0); | |
return this.eventListeners(); | |
}; | |
VideoModal.prototype.close = function() { | |
this.opened = false; | |
this.modal.find(".flex-video").empty(); | |
this.modal.find(".caption").empty(); | |
this.modal.hide(); | |
$('.modal-mask').fadeOut(); | |
if (this.caption.length === 0) { | |
this.modal.find(".player").addClass('large-8'); | |
return this.modal.find('.caption').show(); | |
} | |
}; | |
VideoModal.prototype.centerPosition = function() { | |
if ($(window).height() < this.modal.outerHeight()) { | |
return this.modal.css({ | |
'position': 'absolute', | |
'top': '30px', | |
'margin-top': 0, | |
'margin-left': -(this.modal.outerWidth() / 2) | |
}); | |
} else { | |
return this.modal.css({ | |
'position': 'fixed', | |
'top': '50%', | |
'margin-top': -(this.modal.outerHeight() / 2), | |
'margin-left': -(this.modal.outerWidth() / 2) | |
}); | |
} | |
}; | |
VideoModal.prototype.eventListeners = function() { | |
var modal; | |
modal = this; | |
this.modal.find('.close').on('click', function() { | |
return modal.close(); | |
}); | |
$(window).resize(function() { | |
return modal.centerPosition(); | |
}); | |
$(document).keydown(function(e) { | |
if (modal.opened) { | |
if (e.keyCode === 27) { | |
return modal.close(); | |
} | |
} | |
}); | |
$('.modal-mask').on('click', function() { | |
return modal.close(); | |
}); | |
return this.player_button.on('click', function() { | |
return false; | |
}); | |
}; | |
VideoModal.prototype.extractVideoType = function() { | |
var matches, re; | |
re = /\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9_\-]+)/i; | |
matches = re.exec(this.src_url); | |
if (matches) { | |
return 'youtube'; | |
} else { | |
re = /^.*(vimeo)\.com\/(?:watch\?v=)?(.*?)(?:\z|$|&)/; | |
matches = re.exec(this.src_url); | |
if (matches) { | |
return 'vimeo'; | |
} | |
} | |
return false; | |
}; | |
VideoModal.prototype.extractVideoId = function() { | |
var match, regExp; | |
if (this.type === 'youtube') { | |
regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/; | |
match = this.src_url.match(regExp); | |
if (match && match[2].length === 11) { | |
return match[2]; | |
} | |
} else if (this.type === "vimeo") { | |
regExp = /^.*(vimeo)\.com\/(?:watch\?v=)?(.*?)(?:\z|$|&)/; | |
match = this.src_url.match(regExp); | |
if (match) { | |
return match[2]; | |
} | |
} | |
}; | |
VideoModal.prototype.createIframe = function() { | |
if (this.type === "youtube") { | |
return '<iframe src="//www.youtube.com/embed/' + this.id + '?autoplay=1&rel=0" frameborder="0" allowfullscreen></iframe>'; | |
} else if (this.type === "vimeo") { | |
return '<iframe src="//player.vimeo.com/video/' + this.id + '?title=0&byline=0&portrait=0&color=ffffff&autoplay=1?" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'; | |
} | |
}; | |
return VideoModal; | |
})(); | |
productModal = function() { | |
var changeModal, closeModal, modal, modal_controls, modal_init, modal_length, modal_open, openModal, resizeModal; | |
modal = $('.modal'); | |
if ($('.modal').length && product_modal_enabled) { | |
modal_length = $("article .photos .photo").length; | |
modal_init = false; | |
modal_open = false; | |
modal.find('.loading').spin('small'); | |
if (modal_length > 1) { | |
modal.addClass("with-nav"); | |
modal_controls = modal.find('.glyph'); | |
} else { | |
modal_controls = modal.find('.close'); | |
} | |
resizeModal = function() { | |
var active_photo, height_ratio, image_height, image_width, width_ratio, window_height, window_width; | |
active_photo = modal.find('.photo.active'); | |
image_width = active_photo.naturalWidth(); | |
image_height = active_photo.naturalHeight(); | |
window_width = $(window).width(); | |
window_height = $(window).height(); | |
width_ratio = image_width / window_width; | |
height_ratio = image_height / window_height; | |
if (width_ratio > height_ratio && width_ratio > .90) { | |
image_width = image_width * .90 / width_ratio; | |
image_height = image_height * .90 / width_ratio; | |
} else if (width_ratio < height_ratio && height_ratio > .90) { | |
image_width = image_width * .90 / height_ratio; | |
image_height = image_height * .90 / height_ratio; | |
} | |
modal.css({ | |
'width': image_width, | |
'height': image_height, | |
'margin-top': -(image_height / 2), | |
'margin-left': -(image_width / 2) | |
}); | |
return active_photo.css({ | |
'height': image_height | |
}); | |
}; | |
openModal = function(index) { | |
var active_photo; | |
modal_open = true; | |
if (!modal_init) { | |
$("article .photos .photo").each(function() { | |
return modal.find(".slides").append($('<img />').attr('src', $(this).attr('href')).addClass('photo')); | |
}); | |
modal_init = true; | |
} | |
$('.modal-mask').show(); | |
modal.fadeIn(); | |
active_photo = $(".modal img").eq(index); | |
active_photo.addClass('active'); | |
return modal.find(".photo.active").imagesLoaded(function() { | |
modal.find(".loading").hide(); | |
modal_controls.show(); | |
modal.find(".slides").show(); | |
return resizeModal(); | |
}); | |
}; | |
$('.photos .container').on('click', function() { | |
var index; | |
if (current_window === 'small') { | |
return false; | |
} | |
index = $(this).find('.photo.active').index(); | |
return openModal(index); | |
}); | |
closeModal = function() { | |
modal_open = false; | |
modal.find(".photo.active").removeClass("active"); | |
modal.css('display', 'none'); | |
return $('.modal-mask').fadeOut(); | |
}; | |
modal.find('.close').on('click', function() { | |
return closeModal(); | |
}); | |
$('.modal-mask').on('click', function() { | |
return closeModal(); | |
}); | |
changeModal = function(direction) { | |
var active_index, active_photo, new_index, photo_length; | |
active_photo = modal.find('.photo.active'); | |
active_index = modal.find('.photo.active').index(); | |
photo_length = modal.find('.photo').length; | |
if (direction === 'prev') { | |
if (active_index === 0) { | |
new_index = photo_length - 1; | |
} else { | |
new_index = active_index - 1; | |
} | |
} | |
if (direction === 'next') { | |
if (active_index === photo_length - 1) { | |
new_index = 0; | |
} else { | |
new_index = active_index + 1; | |
} | |
} | |
active_photo.removeClass('active'); | |
modal_controls.hide(); | |
modal.find(".loading").delay(50).fadeIn(0); | |
return modal.find('.photo').eq(new_index).imagesLoaded(function() { | |
modal.find(".loading").stop(true, true).fadeOut(0); | |
modal_controls.show(); | |
modal.find('.photo').eq(new_index).addClass('active'); | |
return resizeModal(); | |
}); | |
}; | |
modal.find('.prev').on('click', function() { | |
return changeModal('prev'); | |
}); | |
modal.find('.next').on('click', function() { | |
return changeModal('next'); | |
}); | |
modal.find('.slides').on('click', function() { | |
return changeModal('next'); | |
}); | |
$(document).keydown(function(e) { | |
if (modal_open) { | |
if (e.keyCode === 37 && modal_length > 1) { | |
changeModal('prev'); | |
} | |
if (e.keyCode === 39 && modal_length > 1) { | |
changeModal('next'); | |
} | |
if (e.keyCode === 27) { | |
return closeModal(); | |
} | |
} | |
}); | |
if (modal_init) { | |
return $(window).resize(function() { | |
return resizeModal(); | |
}); | |
} | |
} | |
}; | |
$('.accordion.headings').each(function() { | |
return $(this).add($(this).next('.accordion.content')).wrapAll("<div class='accordion-wrapper'/>"); | |
}); | |
$('.accordion.headings li').wrapInner('<div class="trigger"></div>'); | |
$('.accordion.headings li .trigger').append('<div class="bg"></div>'); | |
$('.accordion-wrapper').each(function() { | |
var accordion_content, accordion_heading; | |
accordion_heading = $(this).find('.accordion.headings > li'); | |
accordion_content = $(this).find('.accordion.content > li'); | |
accordion_heading.first().addClass('active'); | |
accordion_content.each(function(index) { | |
var content; | |
content = $('<div class="content">' + $(this).html() + '</div>'); | |
return content.appendTo(accordion_heading.eq(index)); | |
}); | |
accordion_content.remove(); | |
$(this).find('.content').first().show(); | |
return $(this).find('.trigger').on("click", function() { | |
var panels, this_panel; | |
panels = $(this).closest(".accordion").find('.content'); | |
this_panel = $(this).closest("li").find(".content"); | |
panels.not(this_panel).slideUp(200); | |
this_panel.slideDown(200, function() { | |
if (general_scroll_to_active_item) { | |
return $('html, body').animate({ | |
scrollTop: this_panel.offset().top - 100 | |
}); | |
} | |
}); | |
$(this).closest(".accordion").find("li").removeClass("active"); | |
return $(this).closest("li").addClass("active"); | |
}); | |
}); | |
$('.tabs-horizontal.headings').each(function() { | |
return $(this).add($(this).next('.tabs.content')).wrapAll("<div class='tabs-wrapper horizontal'/>"); | |
}); | |
$('.tabs-horizontal.headings li').wrapInner('<div class="trigger"></div>'); | |
$('.tabs-horizontal.headings li .trigger').append('<div class="bg"></div>'); | |
$('.tabs-wrapper.horizontal').each(function() { | |
var tab_content, tab_headings; | |
tab_headings = $(this).find('.headings > li'); | |
tab_content = $(this).find('.tabs.content > li'); | |
tab_content.first().addClass('active'); | |
tab_headings.first().addClass('active'); | |
return tab_headings.on('click', function() { | |
tab_headings.removeClass('active'); | |
tab_content.removeClass('active'); | |
$(this).addClass('active'); | |
return tab_content.eq($(this).index()).addClass('active'); | |
}); | |
}); | |
$('.tabs-vertical.headings').each(function() { | |
return $(this).add($(this).next('.tabs.content')).wrapAll("<div class='tabs-wrapper vertical'/>"); | |
}); | |
$('.tabs-vertical.headings li').wrapInner('<div class="trigger"></div>'); | |
$('.tabs-vertical.headings li .trigger').append('<div class="bg"></div>'); | |
$('.tabs-wrapper.vertical').each(function() { | |
var tab_content, tab_headings, tab_wrapper; | |
tab_wrapper = $(this); | |
tab_headings = $(this).find('.headings > li'); | |
tab_content = $(this).find('.tabs.content > li'); | |
tab_content.first().addClass('active'); | |
tab_headings.first().addClass('active'); | |
return tab_headings.on('click', function() { | |
tab_headings.removeClass('active'); | |
tab_content.removeClass('active'); | |
$(this).addClass('active'); | |
tab_content.eq($(this).index()).addClass('active'); | |
if (general_scroll_to_active_item) { | |
if (matchMedia('only screen and (min-width: ' + mq_small + 'px)').matches || $("html").hasClass("lt-ie9")) { | |
return $('html, body').animate({ | |
scrollTop: tab_wrapper.offset().top - 50 | |
}, 'slow'); | |
} else { | |
return $('html, body').animate({ | |
scrollTop: tab_wrapper.offset().top + tab_wrapper.find('.headings').outerHeight() - 50 | |
}, 'slow'); | |
} | |
} | |
}); | |
}); | |
$('.cart-form').submit(function() { | |
$("html, body").animate({ | |
scrollTop: 0 | |
}); | |
addToCart($(this)); | |
return false; | |
}); | |
cart_dropdown_timer = ''; | |
toggleCartDropdown = function() { | |
return $('.main-header .recently-added').slideToggle('fast'); | |
}; | |
slideDownCartDropdown = function() { | |
return $('.main-header .recently-added').slideDown('fast'); | |
}; | |
fadeOutCartDropdown = function() { | |
return $('.main-header .recently-added').fadeOut('fast'); | |
}; | |
$('.main-header .recently-added').mouseenter(function() { | |
return stopResetTimer(); | |
}); | |
$('.main-header .recently-added').mouseleave(function() { | |
return startTimer(); | |
}); | |
startTimer = function() { | |
return cart_dropdown_timer = setTimeout((function() { | |
return fadeOutCartDropdown(); | |
}), 4000); | |
}; | |
stopResetTimer = function() { | |
return clearTimeout(cart_dropdown_timer); | |
}; | |
validateSize = function(cart_form) { | |
if (cart_form.find('select option:selected').is(':disabled')) { | |
cart_form.find('.dropdown').effect('shake', { | |
'times': 2, | |
'distance': 5 | |
}, 400); | |
return false; | |
} | |
return true; | |
}; | |
addToCart = function(cart_form) { | |
return $.ajax({ | |
type: "POST", | |
url: "/cart/add.js", | |
dataType: "json", | |
data: cart_form.serialize(), | |
success: addToCartPass, | |
error: addToCartFail | |
}); | |
}; | |
addToCartPass = function(product) { | |
return recentCartItemPopUp(); | |
}; | |
addToCartFail = function(obj, status) { | |
$('.recently-added .error').show(); | |
$('.recently-added table').hide(); | |
$('.recently-added div.row').hide(); | |
slideDownCartDropdown(); | |
return startTimer(); | |
}; | |
recentCartItemPopUp = function() { | |
var cart_item, cart_total, currency_symbol; | |
cart_item = {}; | |
cart_total = {}; | |
currency_symbol = $('.actual-price').html(); | |
currency_symbol = $.trim(currency_symbol.slice(0, currency_symbol.search(/\d/))); | |
Shopify.money_format = currency_symbol + " {{amount}}"; | |
return $.getJSON("/cart.js", function(cart, textStatus) { | |
var current_raw_total, item, new_cart_row, new_mobile_item, _i, _len, _ref; | |
cart_item.image_url = Shopify.resizeImage(cart.items[0].image, "small"); | |
cart_item.url = cart.items[0].url; | |
cart_item.title = cart.items[0].title; | |
cart_item.price_raw = cart.items[0].price; | |
cart_item.price = Shopify.formatMoney(cart_item.price_raw, Shopify.money_with_currency_format); | |
current_raw_total = parseInt($('.recently-added .raw-total').html()) * 100; | |
cart_total.quantity = 0; | |
cart_total.price = 0; | |
_ref = cart.items; | |
for (_i = 0, _len = _ref.length; _i < _len; _i++) { | |
item = _ref[_i]; | |
cart_total.quantity += item.quantity; | |
cart_total.price += item.price * item.quantity; | |
} | |
$('.cart-link .number').html(cart_total.quantity); | |
$('.recently-added .items-count .number').html(cart_total.quantity); | |
$('.recently-added .total-price').html(Shopify.formatMoney(cart_total.price, Shopify.money_format)); | |
new_cart_row = '<tr>'; | |
new_cart_row += '<td class="cart-item">'; | |
new_cart_row += '<a href="' + cart_item.url + '">'; | |
new_cart_row += '<img src="' + cart_item.image_url + '" alt="' + cart_item.title + '">'; | |
new_cart_row += '</a>'; | |
new_cart_row += '</td>'; | |
new_cart_row += '<td class="cart-detail">'; | |
new_cart_row += '<h2><a href="' + cart_item.url + '">' + cart_item.title + '</a></h2>'; | |
new_cart_row += '</td>'; | |
new_cart_row += '<td class="cart-price">' + cart_item.price + '</td>'; | |
new_cart_row += '</tr>'; | |
new_mobile_item = '<a href="' + cart_item.url + '">'; | |
new_mobile_item += '<img src="' + cart_item.image_url + '" alt="' + cart_item.title + '">'; | |
new_mobile_item += '</a>'; | |
$('.recently-added tbody').html(new_cart_row); | |
$('.recently-added .mobile-item').html(new_mobile_item); | |
$('.recently-added .error').hide(); | |
$('.recently-added table').show(); | |
$('.recently-added div.row').show(); | |
slideDownCartDropdown(); | |
return startTimer(); | |
}); | |
}; | |
if (Modernizr.touch === false) { | |
$('.product-grid .product-item').mouseenter(function() { | |
return $(this).find('.image-wrapper').animate({ | |
opacity: 0.5 | |
}, 100); | |
}).mouseleave(function() { | |
return $(this).find('.image-wrapper').stop(true, true).animate({ | |
opacity: 1 | |
}, 300); | |
}); | |
} | |
if (PAGE.hasClass('template-page')) { | |
page_content = $('.page-content .rte-content'); | |
if (page_content.find('.left-side-column').length || page_content.find('.right-side-column').length) { | |
if (page_content.find('.left-side-column').length && page_content.find('.right-side-column').length) { | |
page_content.wrapInner("<div class='main-column with-2-sidebars'></div>"); | |
$('.left-side-column').addClass('with-2-sidebars'); | |
$('.right-side-column').addClass('with-2-sidebars'); | |
} else { | |
page_content.wrapInner("<div class='main-column'></div>"); | |
} | |
$('.left-side-column').prependTo(page_content); | |
$('.right-side-column').appendTo(page_content); | |
} | |
} | |
if (PAGE.hasClass('template-index')) { | |
FullscreenSlider = (function() { | |
function FullscreenSlider(slider_element, autoplay_enabled, autoplay_frequency) { | |
this.eventListeners = __bind(this.eventListeners, this); | |
this.alignPlayButton = __bind(this.alignPlayButton, this); | |
this.alignCaption = __bind(this.alignCaption, this); | |
this.getActiveIndex = __bind(this.getActiveIndex, this); | |
this.autoplay = __bind(this.autoplay, this); | |
this.createSlider = __bind(this.createSlider, this); | |
this.el = slider_element; | |
this.autoplay_enabled = autoplay_enabled; | |
this.autoplay_frequency = autoplay_frequency; | |
this.createSlider(); | |
this.owl = $(".owl-carousel").data('owlCarousel'); | |
} | |
FullscreenSlider.prototype.createSlider = function() { | |
var slider; | |
slider = this; | |
return slider.el.owlCarousel({ | |
singleItem: true, | |
navigation: false, | |
paginationNumbers: false, | |
scrollPerPageNav: true, | |
slideSpeed: 800, | |
pagination: true, | |
autoHeight: true, | |
autoPlay: slider.autoplay(), | |
afterInit: function() { | |
return slider.eventListeners(); | |
}, | |
afterAction: function() { | |
slider.alignCaption(); | |
return slider.alignPlayButton(); | |
} | |
}); | |
}; | |
FullscreenSlider.prototype.autoplay = function() { | |
if (this.autoplay_enabled) { | |
return this.autoplay_frequency; | |
} | |
return false; | |
}; | |
FullscreenSlider.prototype.getActiveIndex = function() { | |
return this.el.find('.owl-pagination .owl-page.active').index(); | |
}; | |
FullscreenSlider.prototype.alignCaption = function() { | |
var caption, caption_height, caption_width, slide, slide_padding, top_offset; | |
slide = this.el.find('.owl-item').eq(this.getActiveIndex()); | |
caption = slide.find('.caption'); | |
caption.css('visibility', 'hidden'); | |
caption_height = caption.outerHeight(); | |
caption_width = caption.outerWidth(); | |
slide_padding = 30; | |
if (PAGE.hasClass('transparent-menu')) { | |
top_offset = $('.main-header').outerHeight(); | |
} else { | |
top_offset = 0; | |
} | |
return slide.find('img').first().imagesLoaded(function() { | |
var left_offset, middle_top, slide_height, slide_width; | |
slide_height = slide.outerHeight(); | |
slide_width = slide.outerWidth(); | |
if (caption.hasClass('top')) { | |
caption.css('top', top_offset + slide_padding); | |
} else if (caption.hasClass('middle')) { | |
middle_top = top_offset + (slide_height - top_offset - caption_height) / 2; | |
caption.css('top', middle_top); | |
} | |
if (caption.hasClass('center')) { | |
left_offset = (slide_width - caption_width) / 2; | |
caption.css('left', left_offset); | |
} | |
return caption.css('visibility', 'visible'); | |
}); | |
}; | |
FullscreenSlider.prototype.alignPlayButton = function() { | |
var play_button, slide; | |
slide = this.el.find('.owl-item').eq(this.getActiveIndex()); | |
play_button = slide.find('.play-button'); | |
play_button.css('visibility', 'hidden'); | |
if (PAGE.hasClass('transparent-menu') && $('.main-header').css('position') === 'absolute') { | |
slide.find('img').first().imagesLoaded(function() { | |
var play_button_height, slide_height, video_offset; | |
slide_height = slide.outerHeight(); | |
play_button_height = play_button.outerHeight(); | |
video_offset = (slide_height - play_button_height) / 2; | |
return play_button.css({ | |
'margin-top': 0, | |
'top': video_offset | |
}); | |
}); | |
} else { | |
play_button.css({ | |
'margin-top': '-40px', | |
'top': '50%' | |
}); | |
} | |
return play_button.css('visibility', 'visible'); | |
}; | |
FullscreenSlider.prototype.eventListeners = function() { | |
var slider; | |
slider = this; | |
this.el.find(".play-button").on('click', function() { | |
var video_modal; | |
video_modal = new VideoModal($(this).closest('.video')); | |
video_modal.open(); | |
slider.owl.stop(); | |
return false; | |
}); | |
return this.el.find('.owl-pagination .owl-page').on('click', function() { | |
return slider.owl.stop(); | |
}); | |
}; | |
return FullscreenSlider; | |
})(); | |
fullscreen_slider = new FullscreenSlider($('.slider .slides'), home_slider_auto_enabled, home_slider_rotate_frequency); | |
$('.product-slider').slice(1).css('padding-top', 0); | |
$('.product-slider .product-grid').owlCarousel({ | |
items: 4, | |
navigation: true, | |
scrollPerPage: true, | |
slideSpeed: 800, | |
lazyLoad: true, | |
pagination: false, | |
navigationText: false | |
}); | |
$('.product-slider .product-item').show(); | |
smallPromos = function() { | |
return $('.small-promos .image-text-widget').mouseenter(function() { | |
return $(this).find('.caption').fadeIn(300); | |
}).mouseleave(function() { | |
return $(this).find('.caption').stop(true, true).fadeOut(300); | |
}); | |
}; | |
smallPromos(); | |
instagramFeed(); | |
} | |
if (PAGE.hasClass('template-list-collections')) { | |
$('.collection-item').mouseenter(function() { | |
return $(this).find('.caption').fadeIn(300); | |
}).mouseleave(function() { | |
return $(this).find('.caption').stop(true, true).fadeOut(300); | |
}); | |
} | |
if (PAGE.hasClass('template-product')) { | |
positions = function() { | |
var insertPosition; | |
insertPosition = function(position_target) { | |
var positions_src, target; | |
positions_src = $('.positions.active'); | |
target = position_target; | |
positions_src.find('[data-position]').each(function() { | |
var elem_src, elem_target, position; | |
position = $(this).attr('data-position'); | |
if (position.length) { | |
elem_src = positions_src.find('[data-position="' + position + '"]'); | |
elem_target = target.find('[data-position="' + position + '"]'); | |
return elem_src.children().appendTo(elem_target); | |
} | |
}); | |
positions_src.removeClass('active'); | |
return position_target.addClass('active'); | |
}; | |
$(document).on("smallWindow", function() { | |
return insertPosition($('.positions.show-for-small')); | |
}); | |
$(document).on("mediumWindow", function() { | |
return insertPosition($('.positions.show-for-medium-only')); | |
}); | |
$(document).on("largeWindow", function() { | |
return insertPosition($('.positions.show-for-large-up')); | |
}); | |
}; | |
positions(); | |
photos = $('article .photos'); | |
thumbs = $('article .thumbs'); | |
photos.on('click', function() { | |
return false; | |
}); | |
imgZoom = function(index) { | |
if (Modernizr.touch === false && product_zoom_enabled) { | |
return photos.find('.container').zoom({ | |
url: photos.find('.photo').eq(index).attr('data-zoom') | |
}); | |
} | |
}; | |
if (Modernizr.touch === false && product_zoom_enabled) { | |
photos.find('.container').on("mouseover", function() { | |
$(this).css('outline-width', 1); | |
return photos.find('.zoomImg').css({ | |
opacity: 1 | |
}); | |
}).on("mouseleave", function() { | |
return $(this).css('outline-width', 0); | |
}); | |
} | |
updateActiveImg = function(index) { | |
var transition_time; | |
if (photos.find('.photo').eq(index).find('img').length < 1) { | |
return; | |
} | |
if (photos.find('.photo.active').index() === index) { | |
return; | |
} | |
thumbs.find('.thumb').removeClass('active'); | |
thumbs.find('.thumb').eq(index).addClass('active'); | |
photos.find('.zoomImg').remove(); | |
transition_time = 0; | |
if (photos.find('.photo.active').length) { | |
transition_time = 300; | |
photos.find('.photo.active').fadeOut(transition_time).removeClass('active'); | |
} | |
photos.find('.photo').eq(index).delay(transition_time).imagesLoaded(function() { | |
var container_width, height, width; | |
imgZoom(index); | |
height = photos.find('.photo').eq(index).find('img').naturalHeight(); | |
width = photos.find('.photo').eq(index).find('img').naturalWidth(); | |
container_width = photos.outerWidth(); | |
if (container_width < width) { | |
height = container_width / width * height; | |
width = container_width; | |
} | |
photos.find('.container').animate({ | |
"height": height, | |
"width": width | |
}, transition_time, function() { | |
return photos.find('.container').css({ | |
'height': 'auto', | |
'width': 'auto' | |
}); | |
}); | |
return photos.find('.photo').eq(index).addClass('active').fadeIn(transition_time); | |
}); | |
}; | |
thumbs.find('.thumb').click(function() { | |
return updateActiveImg($(this).index()); | |
}); | |
// selectCallback - Triggered each time a variant is selected on the Product page; | |
selectCallback = function(variant, selector) { | |
var variant_image_index; | |
$(".compare-price").html(""); | |
if (variant && variant.available) { | |
$(".quanity-cart-row").show(); | |
$('.product-unavailable').hide(); | |
} else { | |
$(".quanity-cart-row").hide(); | |
$('.product-unavailable').show(); | |
if (product_variant_size > 1 && variant) { | |
$('.product-unavailable form .email-body').attr('value', 'Please notify me when this is back in stock: ' + product_title + ' - ' + variant.title); | |
} | |
} | |
if (variant) { | |
$(".actual-price").html(Shopify.formatMoney(variant.price, shop_money_format)); | |
if (variant.compare_at_price > variant.price) { | |
$(".compare-price").html("Was " + Shopify.formatMoney(variant.compare_at_price, shop_money_format)); | |
} | |
if (variant.featured_image) { | |
variant_image_index = $('article .photos .photo[data-image-id="' + variant.featured_image.id + '"]').index(); | |
updateActiveImg(variant_image_index); | |
} else { | |
updateActiveImg(0); | |
} | |
} | |
}; | |
// end of selectCallback; | |
new Shopify.OptionSelectors("variant-listbox", { | |
product: product_json, | |
onVariantSelected: selectCallback, | |
enableHistoryState: true | |
}); | |
$(".custom.dropdown").hide(); | |
if (product_options_size === 1 && product_options_first !== "Title") { | |
$(".selector-wrapper:eq(0)").prepend("<label>" + product_options_first + "</label>"); | |
} | |
$(".selector-wrapper .single-option-selector").each(Foundation.libs.forms.append_custom_select); | |
$("select.single-option-selector").change(function() { | |
Foundation.libs.forms.refresh_custom_select($(this), true); | |
}); | |
productModal(); | |
} | |
isFirefox = typeof InstallTrigger !== "undefined"; | |
if (isFirefox) { | |
$('img').addClass('image-scale-hack'); | |
} | |
current_window = ''; | |
mediaQueries = function() { | |
if ($("html").hasClass("lt-ie9")) { | |
$.event.trigger("mediumWindow"); | |
return current_window = 'medium'; | |
} else if (window.matchMedia('only screen and (min-width: ' + mq_medium + 'px)').matches) { | |
if (current_window !== 'large') { | |
$.event.trigger("largeWindow"); | |
return current_window = 'large'; | |
} | |
} else if (window.matchMedia('only screen and (min-width: ' + mq_small + 'px)').matches) { | |
if (current_window !== 'medium') { | |
$.event.trigger("mediumWindow"); | |
return current_window = 'medium'; | |
} | |
} else { | |
if (current_window !== 'small') { | |
$.event.trigger("smallWindow"); | |
return current_window = 'small'; | |
} | |
} | |
}; | |
mediaQueries(); | |
$(window).resize(function() { | |
return mediaQueries(); | |
}); | |
return $('.hide-until-js').show(); | |
}); | |
return false; | |
}).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment