!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],e):e(jQuery)}(function(o){"use strict";var n=!1;return o(document).on("mouseup",function(){n=!1}),o.widget("ui.mouse",{version:"1.13.3",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===o.data(e.target,t.widgetName+".preventClickEvent"))return o.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){var t,i,s;if(!n)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),i=1===(this._mouseDownEvent=e).which,s=!("string"!=typeof(t=this).options.cancel||!e.target.nodeName)&&o(e.target).closest(this.options.cancel).length,i&&!s&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?e.preventDefault():(!0===o.data(e.target,this.widgetName+".preventClickEvent")&&o.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0)),!0},_mouseMove:function(e){if(this._mouseMoved){if(o.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&o.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})});
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../keycode","../version","../widget"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.slider",o.ui.mouse,{version:"1.13.3",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t=this.options,i=this.element.find(".ui-slider-handle"),s=[],a=t.values&&t.values.length||1;for(i.length>a&&(i.slice(a).remove(),i=i.slice(0,a)),e=i.length;e<a;e++)s.push("<span tabindex='0'></span>");this.handles=i.add(o(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){o(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:Array.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=o("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,a,n,t,h,l=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(i-l.values(e));(t<s||s===t&&(e===l._lastChangedValue||l.values(e)===u.min))&&(s=t,a=o(this),n=e)}),!1!==this._start(e,n))&&(this._mouseSliding=!0,this._handleIndex=n,this._addClass(a,null,"ui-state-active"),a.trigger("focus"),t=a.offset(),h=!o(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-t.left-a.width()/2,top:e.pageY-t.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,n,i),this._animateOff=!0)},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},t=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,t),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,e="horizontal"===this.orientation?(t=this.elementSize.width,e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),e=e/t;return(e=1<e?1:e)<0&&(e=0),"vertical"===this.orientation&&(e=1-e),t=this._valueMax()-this._valueMin(),e=this._valueMin()+e*t,this._trimAlignValue(e)},_uiHash:function(e,t,i){var s={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==t?t:this.values(e),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,i){var s,a=this.value(),n=this.values();this._hasMultipleValues()&&(s=this.values(t?0:1),a=this.values(t),2===this.options.values.length&&!0===this.options.range&&(i=0===t?Math.min(s,i):Math.max(s,i)),n[t]=i),i!==a&&!1!==this._trigger("slide",e,this._uiHash(t,i,n))&&(this._hasMultipleValues()?this.values(t,i):this.value(i))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){if(!arguments.length)return this._value();this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0)},values:function(e,t){var i,s,a;if(1<arguments.length)this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),this._change(null,e);else{if(!arguments.length)return this._values();if(!Array.isArray(e))return this._hasMultipleValues()?this._values(e):this.value();for(i=this.options.values,s=e,a=0;a<i.length;a+=1)i[a]=this._trimAlignValue(s[a]),this._change(null,a);this._refreshValue()}},_setOption:function(e,t){var i,s=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(e,t),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(t),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return this._trimAlignValue(e)},_values:function(e){var t,i;if(arguments.length)return e=this.options.values[e],this._trimAlignValue(e);if(this._hasMultipleValues()){for(t=this.options.values.slice(),i=0;i<t.length;i+=1)t[i]=this._trimAlignValue(t[i]);return t}return[]},_trimAlignValue:function(e){var t,i;return e<=this._valueMin()?this._valueMin():e>=this._valueMax()?this._valueMax():(t=0<this.options.step?this.options.step:1,i=e-(e=(e-this._valueMin())%t),2*Math.abs(e)>=t&&(i+=0<e?t:-t),parseFloat(i.toFixed(5)))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step;(e=Math.round((e-t)/i)*i+t)>this.options.max&&(e-=i),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return e=null!==this.options.min?Math.max(e,this._precisionOf(this.options.min)):e},_precisionOf:function(e){var e=e.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,i,e,s,a,n=this.options.range,h=this.options,l=this,u=!this._animateOff&&h.animate,r={};this._hasMultipleValues()?this.handles.each(function(e){i=(l.values(e)-l._valueMin())/(l._valueMax()-l._valueMin())*100,r["horizontal"===l.orientation?"left":"bottom"]=i+"%",o(this).stop(1,1)[u?"animate":"css"](r,h.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===e&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},h.animate),1===e&&l.range[u?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:h.animate})):(0===e&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},h.animate),1===e&&l.range[u?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:h.animate}))),t=i}):(e=this.value(),s=this._valueMin(),a=this._valueMax(),i=a!==s?(e-s)/(a-s)*100:0,r["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](r,h.animate),"min"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},h.animate),"max"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:100-i+"%"},h.animate),"min"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},h.animate),"max"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:100-i+"%"},h.animate))},_handleEvents:{keydown:function(e){var t,i,s,a=o(e.target).data("ui-slider-handle-index");switch(e.keyCode){case o.ui.keyCode.HOME:case o.ui.keyCode.END:case o.ui.keyCode.PAGE_UP:case o.ui.keyCode.PAGE_DOWN:case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(e.preventDefault(),this._keySliding||(this._keySliding=!0,this._addClass(o(e.target),null,"ui-state-active"),!1!==this._start(e,a)))break;return}switch(s=this.options.step,t=i=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case o.ui.keyCode.HOME:i=this._valueMin();break;case o.ui.keyCode.END:i=this._valueMax();break;case o.ui.keyCode.PAGE_UP:i=this._trimAlignValue(t+(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(t-(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:if(t===this._valueMax())return;i=this._trimAlignValue(t+s);break;case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(t===this._valueMin())return;i=this._trimAlignValue(t-s)}this._slide(e,a,i)},keyup:function(e){var t=o(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,t),this._change(e,t),this._removeClass(o(e.target),null,"ui-state-active"))}}})});
(function($){
"use strict";
class Elementor_Js_Wpbingo {
static getInstance(){
if(!Elementor_Js_Wpbingo.instance){
Elementor_Js_Wpbingo.instance=new Elementor_Js_Wpbingo();
}
return Elementor_Js_Wpbingo.instance;
}
constructor(){
$(window).on('elementor/frontend/init', ()=> {
this.init();
});
}
init(){
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_instagram.default', ($scope)=> {
let bwpInstagramsElem=$scope.find('.bwp-instagram');
bwpInstagramsElem.each(function(){
var $element=$(this);
var value_user_id=$element.data("user_id");
var value_access_token=$element.data("access_token");
var value_limit=$element.data("limit");
var $item_row=$element.data("rows") ? $element.data("rows"):1;
if(value_user_id&&value_access_token){
var media_users_recent="https://api.instagram.com/v1/users/" + value_user_id + "/media/recent?access_token=" + value_access_token + "&count=" + value_limit;
$.ajax({
method: "GET",
dataType: "jsonp",
cache: false,
url: media_users_recent,
success: function (response){
var data_image=response.data;
if(typeof (data_image)=='undefined'){
$(".content_instagram",$element).append("<li>"+$element.data("text_check_user")+"</li>");
return;
}
if(data_image.length > 0){
var html='';
for (var i=0; i < data_image.length; i++){
if(i < data_image.length){
var $j=i + 1;
if((($j==1)||($j % $item_row==1))&&($item_row!=1)){
html +='<div class="item-instagram">';
}
html +='<div class="image-instagram '+($(".content_instagram",$element).data("attributes") ? $(".content_instagram",$element).data("attributes"):'')+'">'
+ '<a class="instagram" target="_blank"  href="' + data_image[i].link + ' ">'
+	'<img src="' + data_image[i].images.standard_resolution.url + '" alt="" title="" width="'+$element.data("width")+'" height="'+$element.data("height")+'">'
+ '</a>'
+'</div>';
if(($j==data_image.length)||($j % $item_row==0)||($item_row==1)){
html +='</div>';
}}
}
$(".content_instagram",$element).html(html);
if($(".content_instagram",$element).hasClass("slick-carousel")){
_wpbingo_slick_carousel($(".content_instagram",$element));
}}else{
$(".content_instagram",$element).append("<li>"+$(this).data("text_image_show")+"</li>");
return;
}},
error: function (){
$(".content_instagram",$element).append("<li>"+$(this).data("text_image_show")+"</li>");
}})
}});
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_filter_homepage.default', ($scope)=> {
let bwpFilterHomepageElem=$scope.find('.bwp-filter-homepage');
bwpFilterHomepageElem.each(function(){
var $element=$(this);
$(".bwp-filter-toggle",$element).click(function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
$(".bwp-filter-attribute",$element).slideUp();
}else{
$(this).addClass('active');
$(".bwp-filter-attribute",$element).slideDown();
}});
$("li",$element).click(function(){
var $parent=$(this).parent();
if($parent.hasClass('filter-orderby')){
var order_text=$(this).text();
$('.text-orderby').html(order_text);
}
if($parent.hasClass('filter-category')||$parent.hasClass('filter-orderby'))
$("li",$parent).removeClass('active');
else
$(this).removeClass('active');
if($(this).hasClass('active')){
$(this).removeClass('active');
}else{
$(this).addClass('active');
}
var count_loadmore=$(".count_loadmore",$element).data("default");
$(".count_loadmore",$element).val(parseInt(count_loadmore));
if($element.hasClass("tab-category")||$element.hasClass("tab-product")){
var $value=$(this).data("value");
if($(".content-products-"+$value,$element).length > 0){
$('.content-product-list',$element).addClass("hidden");
$(".content-products-"+$value,$element).removeClass("hidden");
}else{
_eventFilterHomePage($element);
}}else{
_eventFilterHomePage($element);
}});
$(".loadmore",$element).click(function(){
_eventFilterHomePage($element,true);
});
$('.clear_all',$element).click(function(e){
var $content_filter=$(".bwp-filter-attribute",$element);
var bwp_slider_price=$(".bwp_slider_price",$element);
$("li",$content_filter).removeClass('active');
$(".price-filter-min-text",$element).val(bwp_slider_price.data("min"));
$(".price-filter-max-text",$element).val(bwp_slider_price.data("max"));
$(".text-price-filter-min-text",$element).html(bwp_slider_price.data("min"));
$(".text-price-filter-max-text",$element).html(bwp_slider_price.data("max"));
$(".ui-slider-range",bwp_slider_price).css({"left": "0px", "width": "100%"});
$("span",bwp_slider_price).first().css("left","0px");
$("span",bwp_slider_price).last().css("left","100%");
_eventFilterHomePage($element);
});
var min_price=$(".price-filter-min-text",$element).val();
var max_price=$(".price-filter-max-text",$element).val();
$(".bwp_slider_price",$element).slider({
range:true,
min: $(".bwp_slider_price",$element).data('min'),
max: $(".bwp_slider_price",$element).data('max'),
values: [min_price,max_price],
slide:function(event, ui){
$(".text-price-filter-min-text",$element).html(ui.values[0]);
$(".text-price-filter-max-text",$element).html(ui.values[1]);
$(".price-filter-min-text",$element).val(ui.values[0]);
$(".price-filter-max-text",$element).val(ui.values[1]);
},
change: function(event, ui){
_eventFilterHomePage($element);
}});
});
});
}}
Elementor_Js_Wpbingo.getInstance();
function _eventFilterHomePage($element,loadmore=false){
if(loadmore){
$('.loadmore',$element).addClass('loading');
}else{
$('.bwp-filter-content',$element).addClass('active');
$('.bwp-filter-content',$element).append('<div class="loading"><div class="chasing-dots"><div></div><div></div><div></div><div></div></div></div>');
}
var $filter=new Object();
var $ajax_url=filter_ajax.ajaxurl;
$filter.content_product=$element.data("content_product") ? $element.data("content_product"):"",
$filter.category=$(".filter-category li.active",$element).data("value");
$filter.orderby=$(".filter-orderby li.active",$element).data("value");
$filter.min_price=$(".price-filter-min-text",$element).val();
$filter.max_price=$(".price-filter-max-text",$element).val();
$filter.class_col=(!$element.hasClass("slider")) ? $element.data("class_col"):"";
$filter.loadmore=(loadmore) ? 1:0;
$filter.item_row=$(".products-list",$element).data("item_row") ? $(".products-list",$element).data("item_row"):1;
if(loadmore){
$filter.paged=$(".count_loadmore",$element).val();
$filter.product_count=$element.data("showmore");
}else{
$filter.paged=1;
$filter.product_count=$element.data("numberposts");
}
var atributes=$element.data("atributes");
if(atributes){
var atributes=atributes.split(',');
for(var i=0;i<atributes.length;i++){
var atr=[];
$("."+atributes[i]+" li.active",$element).each(function(index){
atr[index]=$(this).data("value");
});
$filter[atributes[i]]=atr;
}}
var brands=[];
$(".filter-brand li.active",$element).each(function(index){
brands[index]=$(this).data("value");
});
$filter.brand=brands;
jQuery.ajax({
type: "POST",
url: $ajax_url,
dataType: 'json',
data: {
filter:$filter,
action:"bwp_filter_homepage_callback",
},
success: function (result){
if(loadmore){
if(result.products)
$('.products-list',$element).append(result.products);
var count_loadmore=$(".count_loadmore",$element).val();
$(".count_loadmore",$element).val(parseInt(count_loadmore) + 1);
}else{
if(result.products){
if($element.hasClass("tab-category")||$element.hasClass("tab-product")){
if($element.hasClass("tab-category")){
var $value=$filter.category;
}else{
var $value=$filter.orderby;
}
var $child_product=$('.content-product-list',$element).first();
var $product_list=$('.products-list',$child_product).clone().html(result.products);
$('.content-product-list',$element).addClass("hidden");
$(".content-product-list",$element).last().after('<div class="content-product-list content-products-'+$value+'"></div>');
$(".content-products-"+$value,$element).html($product_list);
_wpbingo_countdown_product($(".products-list",$parent));
if($element.hasClass("slider")){
var $parent=$(".content-products-"+$value,$element);
$(".products-list",$parent).removeClass("slick-slider slick-initialized");
_wpbingo_slick_carousel($(".products-list",$parent));
_check_nav_slick($(".products-list",$parent));
}}else{
$('.products-list',$element).html(result.products);
_wpbingo_countdown_product($(".products-list",$element));
if($element.hasClass("slider")){
$('.products-list',$element).removeClass("slick-slider slick-initialized");
_wpbingo_slick_carousel($('.products-list',$element));
_check_nav_slick($('.products-list',$element));
}}
_wpbingo_click_atribute_image();
_wpbingo_click_add_to_cart();
}else{
$('.products-list',$element).html('');
}}
_wpbingo_click_quickview_button();
if(result.loadmore&&result.loadmore==1)
$(".products_loadmore",$element).show();
else
$(".products_loadmore",$element).hide();
if(loadmore){
$('.loadmore',$element).removeClass('loading');
}else{
$('.bwp-filter-content',$element).removeClass('active');
$('.loading',$element).remove();
}
var $content_filter=$(".bwp-filter-attribute",$element);
if($("li.active",$content_filter).length > 0||($(".price-filter-min-text",$element).val()!=$(".bwp_slider_price",$element).data("min"))||($(".price-filter-max-text",$element).val()!=$(".bwp_slider_price",$element).data("max")))
$(".clear_all",$element).show();
else
$(".clear_all",$element).hide();
},
error:function(jqXHR, textStatus, errorThrown){
console.log("error " + textStatus);
console.log("incoming Text " + jqXHR.responseText);
}});
return false;
}
function _wpbingo_click_atribute_image(){
$(".image-attribute",".product-attribute").on("click", function(){
if(!$(this).hasClass("active")){
$(".image-attribute",".product-attribute").removeClass("active");
$(this).addClass("active");
var $parent=$(this).closest(".products-entry");
var $thumb=$(".product-thumb-hover", $parent);
var $image=$(this).data("image");
$("img",$thumb).last().attr("src", $image);
}});
}
function _wpbingo_click_add_to_cart(){
$(".add_to_cart_button").on("click", function(){
if(!$(".vitic-topcart.popup").hasClass("active")){
$(".vitic-topcart.popup").addClass("active");
}
if(!$("body").hasClass("not-scroll")&&$(".vitic-topcart").hasClass("popup")){
$("body").addClass("not-scroll");
}
$(".cart-popup").addClass("active");
});
$(".cart-remove").on("click", function(){
if($(".vitic-topcart.popup").hasClass("active")){
$(".vitic-topcart.popup").removeClass("active");
}
if($("body").hasClass("not-scroll")){
$("body").removeClass("not-scroll");
}});
$(".cart-icon").on("click", function(){
if(!$("body").hasClass("not-scroll")){
$("body").addClass("not-scroll");
}});
$(".remove-cart-shadow").on("click", function(){
if($(".vitic-topcart.popup").hasClass("active")){
$(".vitic-topcart.popup").removeClass("active");
}
if($("body").hasClass("not-scroll")){
$("body").removeClass("not-scroll");
}});
}
function _wpbingo_slick_carousel($element){
var _body=$('body');
$element.slick({
arrows: $element.data("nav") ? true:false ,
dots: $element.data("dots") ? true:false ,
draggable:$element.data("draggable") ? false:true ,
prevArrow: '<i class="slick-arrow fa fa-angle-left"></i>',
nextArrow: '<i class="slick-arrow fa fa-angle-right"></i>',
slidesToScroll:$element.data("slidestoscroll") ? $element.data("columns"):1,
slidesToShow: $element.data("columns"),
asNavFor: $element.data("asnavfor") ? $element.data("asnavfor"):false ,
vertical: $element.data("vertical") ? true:false ,
verticalSwiping: $element.data("verticalswiping") ? $element.data("verticalswiping"):false ,
rtl: (_body.hasClass("rtl")&&!$element.data("vertical")) ? true:false ,
centerMode: $element.data("centermode") ? $element.data("centermode"):false ,
focusOnSelect: $element.data("focusonselect") ? $element.data("focusonselect"):false ,
responsive: [
{
breakpoint: 1441,
settings: {
slidesToShow: $element.data("columns1440") ? $element.data("columns1440"):$element.data("columns"),
slidesToScroll: $element.data("columns1440") ? $element.data("columns1440"):$element.data("columns"),
}},
{
breakpoint: 1200,
settings: {
slidesToShow: $element.data("columns1"),
slidesToScroll: $element.data("columns1"),
}},
{
breakpoint: 1024,
settings: {
slidesToShow: $element.data("columns2"),
slidesToScroll: $element.data("columns2"),
}},
{
breakpoint: 768,
settings: {
slidesToShow: $element.data("columns3"),
slidesToScroll: $element.data("columns3"),
vertical: false,
verticalSwiping:false,
}},
{
breakpoint: 480,
vertical: false,
verticalSwiping:false,
settings: {
slidesToShow: $element.data("columns4"),
slidesToScroll: $element.data("columns4"),
vertical: false,
verticalSwiping:false,
}}
]
});
}
function _check_nav_slick($element){
if($(".slick-arrow",$element).length > 0){
var $prev=$(".fa-angle-left",$element).clone();
$(".fa-angle-left",$element).remove();
if($element.parent().find(".fa-angle-left").length==0){
$prev.prependTo($element.parent());
}
$prev.click(function(){
$element.slick('slickPrev');
});
var $next=$(".fa-angle-right",$element).clone();
$(".fa-angle-right",$element).remove();
if($element.parent().find(".fa-angle-right").length==0){
$next.appendTo($element.parent());
}
$next.click(function(){
$element.slick('slickNext');
});
}else{
$(".fa-angle-left",$element.parent()).remove();
$(".fa-angle-right",$element.parent()).remove();
}}
function _wpbingo_click_quickview_button(){
$('.quickview-button').on("click", function(e){
e.preventDefault();
var product_id=$(this).data('product_id');
$(".quickview-"+product_id).addClass("loading");
$.ajax({
url: filter_ajax.ajaxurl,
data: {
"action":"vitic_quickviewproduct",
'product_id':product_id
},
success: function(results){
$('.bwp-quick-view').empty().html(results).addClass("active");
$(".quickview-"+product_id).removeClass("loading");
$("#quickview-slick-carousel .slick-carousel").each(function(){
_wpbingo_slick_carousel($(this));
});
if(typeof jQuery.fn.tawcvs_variation_swatches_form!='undefined'){
jQuery('.variations_form').tawcvs_variation_swatches_form();
jQuery(document.body).trigger('tawcvs_initialized');
}else{
var form_variation=$(".bwp-quick-view").find('.variations_form');
var form_variation_select=$(".bwp-quick-view").find('.variations_form .variations select');
form_variation.wc_variation_form();
form_variation_select.change();
}
_wpbingo_click_close_quickview();
},
error: function(errorThrown){ console.log(errorThrown); },
});
});
}
function _wpbingo_click_close_quickview(){
$('.quickview-close').on("click", function(e){
e.preventDefault();
$('.bwp-quick-view').empty().removeClass("active");
});
}
function _wpbingo_countdown_product($element){
$('.product-countdown',$element).each(function(event){
var $this=$(this);
var $id=$(this).data("id");
var $current_time=new Date().getTime();
var $sttime=$(this).data('sttime');
var $countdown_time=$this.data('cdtime');
var $day=$this.data('day') ? $this.data('day'):"D";
var $hour=$this.data('hour') ? $this.data('hour'):"H";
var $min=$this.data('min') ? $this.data('min'):"M";
var $sec=$this.data('sec') ? $this.data('sec'):"S";
var $austDay=new Date();
$austDay=new Date($countdown_time * 1000);
if($sttime > $current_time){
$this.remove();
return ;
}
if($countdown_time.length > 0&&$current_time > $countdown_time){
$this.remove();
return ;
}
if($countdown_time.length <=0){
$this.remove();
return ;
}
$this.countdown($austDay, function(event){
$(this).html(event.strftime('<span class="countdown-content"><span class="days"><span class="countdown-amount">%D</span><span class="countdown-text">'+$day+'</span></span><span class="countdown-section hours"><span class="countdown-amount">%H</span><span class="countdown-text">'+$hour+'</span></span><span class="countdown-section mins"><span class="countdown-amount">%M</span><span class="countdown-text">'+$min+'</span></span><span class="countdown-section secs"><span class="countdown-amount">%S</span><span class="countdown-text">'+$sec+'</span></span></span>')
);
}).on('finish.countdown', function(event){
$this.remove();
$id=$this.data('id');
$target=this;
$this.hide('slow', function(){ $(this).remove(); });
$price=$this.data('price');
$('#' + $id + ' .item-price > span').hide('slow', function(){ $('#' + $id + ' .item-price > span').remove(); });
$('#' + $id + ' .item-price').append('<span><span class="amount">' + $price + '</span></span>');
});
});
}})(jQuery);
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(e){var n=/\+/g;function o(e){return r.raw?e:encodeURIComponent(e)}function i(e,o){var i=r.raw?e:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(n," ")),r.json?JSON.parse(e):e}catch(o){}}(e);return"function"==typeof o?o(i):i}var r=e.cookie=function(n,t,u){if(t!==undefined&&"function"!=typeof t){if("number"==typeof(u=e.extend({},r.defaults,u)).expires){var c=u.expires,f=u.expires=new Date;f.setTime(+f+864e5*c)}return document.cookie=[o(n),"=",function(e){return o(r.json?JSON.stringify(e):String(e))}(t),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join("")}for(var d,a=n?undefined:{},p=document.cookie?document.cookie.split("; "):[],s=0,m=p.length;s<m;s++){var x=p[s].split("="),y=(d=x.shift(),r.raw?d:decodeURIComponent(d)),k=x.join("=");if(n&&n===y){a=i(k,t);break}n||(k=i(k))===undefined||(a[y]=k)}return a};r.defaults={},e.removeCookie=function(n,o){return e.cookie(n)!==undefined&&(e.cookie(n,"",e.extend({},o,{expires:-1})),!e.cookie(n))}});
(function($){
"use strict";
$(document).ready(function(){
$('.newsletterpopup .close-popup').on("click", function(){
wpbingo_HideNLPopup();
});
$('.popupshadow').on("click", function(){
wpbingo_HideNLPopup();
});
});
$(window).load(function(){
wpbingo_ShowNLPopup();
});
function wpbingo_ShowNLPopup(){
if($('.newsletterpopup').length){
var cookieValue=$.cookie("vitic_lpopup");
if(cookieValue==1){
$('.newsletterpopup').hide();
$('.popupshadow').hide();
}else{
$('.newsletterpopup').show();
$('.popupshadow').show();
}}
}
function wpbingo_HideNLPopup(){
$('.newsletterpopup').hide();
$('.popupshadow').hide();
if($('input:checked','.hidden-popup-newsletter').length > 0){
$.cookie("vitic_lpopup", 1, { expires:24 * 60 * 60 * 1000 });
}}
})(jQuery);
(function($){
$.fn.binFilterProduct=function(opts){
var config=$.extend({}, {
widget_id:null,
id_category:null,
base_url: null,
attribute:null,
showcount:null,
show_price:null,
relation:null,
show_only_sale:null,
show_in_stock:null,
show_brand:null,
array_value_url:null
}, opts);
$(document).ready(function(){
_event_dropdown_filter();
_event_filter_product();
_event_click_pagination();
_eventFilter(1,false);
_event_clear_all();
_event_click_sub_categories();
$("li",".woocommerce-sort-count").click(function(){
$("li",".woocommerce-sort-count").removeClass("active");
$(this).addClass("active");
_eventFilter();
return false;
});
$("li",".woocommerce-ordering").click(function(){
_eventFilter();
return false;
});
var view_products=$(".display",".bwp-top-bar");
$("a",view_products).click(function(e){
e.preventDefault();
if(!$(this).hasClass("active")){
$("a",view_products).removeClass('active');
var this_class=$("ul.products").data("col");
$(this).addClass('active');
_eventFilter();
}
return false;
});
$(".back-to-shop").click(function(){
var $text=$(this).text();
$(".text-title-heading").text($text);
$("li",".woocommerce-product-subcategories").removeClass("active");
$("input",config.widget_id).attr('checked', false);
$("#price-filter-min-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('min'));
$("#price-filter-max-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('max'));
_eventFilter(1,true,true,true);
return false;
});
});
function _event_click_sub_categories(){
var $subcategories=$(".woocommerce-product-subcategories");
$("li",$subcategories).click(function(){
$("li",$subcategories).removeClass("active");
$(this).addClass("active");
var $text=$(".woocommerce-loop-category__title a",$(this)).text();
$(".text-title-heading").text($text);
$("input",config.widget_id).attr('checked', false);
$("#price-filter-min-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('min'));
$("#price-filter-max-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('max'));
_eventFilter(1,true,true);
return false;
});
}
function _event_dropdown_filter(){
var $form_filter=$("#bwp_form_filter_product",".filter_dropdown");
$("h3",$form_filter).click(function(){
if($(this).parent().hasClass("active")){
$(this).parent().removeClass("active");
}else{
$(this).parent().addClass("active");
}});
}
function _event_clear_all(){
$(".filter_clear_all",".woocommerce-filter-title").click(function(e){
$("input",config.widget_id).attr('checked', false);
$("#price-filter-min-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('min'));
$("#price-filter-max-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('max'));
_eventFilter();
});
}
function _event_click_pagination(){
$("nav.woocommerce-pagination a.page-numbers").click(function(e){
e.preventDefault();
$('ul.products','.main-archive-product').scrollTop(300);
var status_id=$(this).attr('href').split('=');
var paged=(status_id[1]) ? status_id[1]:1;
_eventFilter(paged);
return false;
});
}
function _event_filter_product(){
min_price=$("#price-filter-min-text",config.widget_id).val();
max_price=$("#price-filter-max-text",config.widget_id).val();
$("#bwp_slider_price").slider({
range:true,
min: $("#bwp_slider_price",config.widget_id).data('min'),
max: $("#bwp_slider_price",config.widget_id).data('max'),
values: [min_price,max_price],
slide:function(event, ui){
$("#text-price-filter-min-text",config.widget_id).html(ui.values[0]);
$("#text-price-filter-max-text",config.widget_id).html(ui.values[1]);
$("#price-filter-min-text",config.widget_id).val(ui.values[0]);
$("#price-filter-max-text",config.widget_id).val(ui.values[1]);
},
change: function(event, ui){
_eventFilter();
return false;
}});
$("#button-price-slider",config.widget_id).click(function(e){
e.preventDefault();
_eventFilter();
return false;
});
$("input:checkbox",config.widget_id).on('click', function(){
_eventFilter();
return false;
});
$("li",config.widget_id).on('click', function(){
if($("input",$(this)).is(':checked'))
$("input",$(this)).attr("checked", false);
else
$("input",$(this)).attr("checked", true);
_eventFilter();
return false;
});
$("span",".woocommerce-filter-title").on('click', function(){
if($(this).hasClass("text-price")){
$("#price-filter-min-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('min'));
$("#price-filter-max-text",config.widget_id).val($("#bwp_slider_price",config.widget_id).data('max'));
}else{
var $name=$(this).data("name");
var $value=$(this).data("value");
$("input[value="+$value+"]","#"+$name+"").attr("checked", false);
}
_eventFilter();
return false;
});
}
function _eventFilter(paged=1,load=true,direction=false,back=false){
if(load){
$('html, body').animate({
scrollTop: 300
}, 300);
$('.content-products-list','.main-archive-product').addClass('active');
$('.content-products-list','.main-archive-product').append('<div class="loading loading-filter"><div class="chasing-dots"><div></div><div></div><div></div><div></div></div></div>');
}
var $filter=new Object();
var $ajax_url=filter_ajax.ajaxurl;
if($('.woocommerce-product-subcategories').length > 0){
var $id_category=$('.woocommerce-product-subcategories').find('li.active').data("id_category") ? $('.woocommerce-product-subcategories').find('li.active').data("id_category"):0;
}else{
var $id_category=config.id_category;
}
if(back){
$id_category=0;
}
$filter.orderby=$('.woocommerce-ordering').find('li.active').data("value");
$filter.product_count=$('.woocommerce-sort-count').find('li.active').data("value");
$filter.views=($('.view-grid.active').length > 0) ?  'grid':'list';
$filter.data=$("#bwp_form_filter_product",config.widget_id).serializeArray();
$filter.default_min_price=$("#bwp_slider_price",config.widget_id).data("min");
$filter.default_max_price=$("#bwp_slider_price",config.widget_id).data("max");
$filter.min_price=$("#price-filter-min-text",config.widget_id).val();
$filter.max_price=$("#price-filter-max-text",config.widget_id).val();
$filter.paged=paged;
jQuery.ajax({
type: "POST",
url: $ajax_url,
dataType: 'json',
data: {
filter:$filter,
action:"bwp_filter_products_callback",
id_category:$id_category,
base_url:config.base_url,
attribute:config.attribute,
relation:config.relation,
show_price:config.show_price,
showcount:config.showcount,
show_only_sale:config.show_only_sale,
show_in_stock:config.show_in_stock,
show_brand:config.show_brand,
show_bestseller:config.show_bestseller,
show_banner:config.show_banner,
array_value_url:config.array_value_url
},
success: function (result){
if(result.products){
$('.content-products-list','.main-archive-product').html(result.products);
_event_click_quickview_button($ajax_url);
_wpbingo_countdown_product($('ul.products','.main-archive-product'));
_wpbingo_click_atribute_image();
_wpbingo_click_add_to_cart();
}else{
$('.content-products-list','.main-archive-product').html('');
}
if($id_category > 0){
$(".back-to-shop").addClass("active");
}else{
$(".back-to-shop").removeClass("active");
}
if(direction){
if($(".page-title").data("bg_default")){
if(result.result_background){
$(".page-title").css("background-image", "url(" + result.result_background + ")");
}else{
$(".page-title").css("background-image", "url(" + $(".page-title").data("bg_default") + ")");
}}
}
if($('.bestseller-product','.content-products-list').length > 0){
_event_load_slick_carousel($('.bestseller-product .slick-carousel','.content-products-list'));
_event_check_nav_slick($('.bestseller-product .slick-carousel','.content-products-list'));
_wpbingo_countdown_product($('.bestseller-product','.content-products-list'));
}
_event_after_sucsess_ajax(result,config);
if(load){
setTimeout(function(){
$('.content-products-list','.main-archive-product').removeClass('active');
$('.loading','.main-archive-product').remove();
}, 400);
}},
error:function(jqXHR, textStatus, errorThrown){
console.log("error " + textStatus);
console.log("incoming Text " + jqXHR.responseText);
}});
return false;
}
function _event_click_quickview_button($ajax_url){
$('.quickview-button').on("click", function(e){
e.preventDefault();
var product_id=$(this).data('product_id');
$(".quickview-"+product_id).addClass("loading");
$.ajax({
url: $ajax_url,
data: {
"action":"vitic_quickviewproduct",
'product_id':product_id
},
success: function(results){
$('.bwp-quick-view').empty().html(results).addClass("active");
$(".quickview-"+product_id).removeClass("loading");
$("#quickview-slick-carousel .slick-carousel").each(function(){
_event_load_slick_carousel($(this));
_event_check_nav_slick($(this));
});
if(typeof jQuery.fn.tawcvs_variation_swatches_form!='undefined'){
$('.variations_form').wc_variation_form();
$('.variations_form').tawcvs_variation_swatches_form();
}else{
var form_variation=$(".bwp-quick-view").find('.variations_form');
var form_variation_select=$(".bwp-quick-view").find('.variations_form .variations select');
form_variation.wc_variation_form();
form_variation_select.change();
}
if($(".product-countdown",".bwp-quick-view").length > 0){
_event_countdown_quickview($(".product-countdown",".bwp-quick-view"));
}
_event_close_quickview();
},
error: function(errorThrown){ console.log(errorThrown); },
});
});
}
function _event_check_nav_slick($element){
if($(".slick-arrow",$element).length > 0){
var $prev=$(".fa-angle-left",$element).clone();
$(".fa-angle-left",$element).remove();
if($element.parent().find(".fa-angle-left").length==0){
$prev.prependTo($element.parent());
}
$prev.on("click", function(){
$element.slick('slickPrev');
});
var $next=$(".fa-angle-right",$element).clone();
$(".fa-angle-right",$element).remove();
if($element.parent().find(".fa-angle-right").length==0){
$next.appendTo($element.parent());
}
$next.on("click", function(){
$element.slick('slickNext');
});
}}
function _event_countdown_quickview($element){
$this=$element;
$id=$(this).data("id");
$current_time=new Date().getTime();
$sttime=$(this).data('sttime');
$countdown_time=$this.data('cdtime');
$day=$this.data('day') ? $this.data('day'):"D";
$hour=$this.data('hour') ? $this.data('hour'):"H";
$min=$this.data('min') ? $this.data('min'):"M";
$sec=$this.data('sec') ? $this.data('sec'):"S";
var $austDay=new Date();
$austDay=new Date($countdown_time * 1000);
if($sttime > $current_time){
$this.remove();
return ;
}
if($countdown_time.length > 0&&$current_time > $countdown_time){
$this.remove();
return ;
}
if($countdown_time.length <=0){
$this.remove();
return ;
}
$this.countdown($austDay, function(event){
$(this).html(event.strftime('<span class="countdown-content"><span class="days"><span class="countdown-amount">%D</span><span class="countdown-text">'+$day+'</span></span><span class="countdown-section hours"><span class="countdown-amount">%H</span><span class="countdown-text">'+$hour+'</span></span><span class="countdown-section mins"><span class="countdown-amount">%M</span><span class="countdown-text">'+$min+'</span></span><span class="countdown-section secs"><span class="countdown-amount">%S</span><span class="countdown-text">'+$sec+'</span></span></span>')
);
}).on('finish.countdown', function(event){
$this.remove();
$id=$this.data('id');
$target=this;
$this.hide('slow', function(){ $(this).remove(); });
$price=$this.data('price');
$('#' + $id + ' .item-price > span').hide('slow', function(){ $('#' + $id + ' .item-price > span').remove(); });
$('#' + $id + ' .item-price').append('<span><span class="amount">' + $price + '</span></span>');
});
}
function _event_close_quickview(){
$('.quickview-close').on("click", function(e){
e.preventDefault();
$('.bwp-quick-view').empty().removeClass("active");
});
}
function _wpbingo_click_atribute_image(){
$(".image-attribute",".product-attribute").on("click", function(){
if(!$(this).hasClass("active")){
$(".image-attribute",".product-attribute").removeClass("active");
$(this).addClass("active");
var $parent=$(this).closest(".products-entry");
var $thumb=$(".product-thumb-hover", $parent);
var $image=$(this).data("image");
$("img",$thumb).last().attr("src", $image);
}});
}
function _wpbingo_click_add_to_cart(){
$(".add_to_cart_button").on("click", function(){
if(!$(".vitic-topcart.popup").hasClass("active")){
$(".vitic-topcart.popup").addClass("active");
}
if(!$("body").hasClass("not-scroll")&&$(".vitic-topcart").hasClass("popup")){
$("body").addClass("not-scroll");
}
$(".cart-popup").addClass("active");
});
$(".cart-remove").on("click", function(){
if($(".vitic-topcart.popup").hasClass("active")){
$(".vitic-topcart.popup").removeClass("active");
}
if($("body").hasClass("not-scroll")){
$("body").removeClass("not-scroll");
}});
$(".cart-icon").on("click", function(){
if(!$("body").hasClass("not-scroll")){
$("body").addClass("not-scroll");
}});
$(".remove-cart-shadow").on("click", function(){
if($(".vitic-topcart.popup").hasClass("active")){
$(".vitic-topcart.popup").removeClass("active");
}
if($("body").hasClass("not-scroll")){
$("body").removeClass("not-scroll");
}});
}
function _event_load_slick_carousel($element){
$element.slick({
arrows: $element.data("nav") ? true:false ,
dots: $element.data("dots") ? true:false ,
prevArrow: '<i class="slick-arrow fa fa-angle-left"></i>',
nextArrow: '<i class="slick-arrow fa fa-angle-right"></i>',
draggable:$element.data("draggable") ? false:true ,
slidesToShow: $element.data("columns"),
asNavFor: $element.data("asnavfor") ? $element.data("asnavfor"):false ,
vertical: $element.data("vertical") ? true:false ,
verticalSwiping: $element.data("verticalswiping") ? $element.data("verticalswiping"):false ,
rtl: ($("body").hasClass("rtl")&&!$element.data("vertical")) ? true:false ,
centerMode: $element.data("centermode") ? $element.data("centermode"):false ,
focusOnSelect: $element.data("focusonselect") ? $element.data("focusonselect"):false ,
responsive: [
{
breakpoint: 1200,
settings: {
slidesToShow: $element.data("columns1"),
}},
{
breakpoint: 1024,
settings: {
slidesToShow: $element.data("columns2"),
}},
{
breakpoint: 768,
settings: {
slidesToShow: $element.data("columns3"),
vertical: false,
verticalSwiping:false,
}},
{
breakpoint: 480,
vertical: false,
verticalSwiping:false,
settings: {
slidesToShow: $element.data("columns4"),
vertical: false,
verticalSwiping:false,
}}
]
});
}
function _event_after_sucsess_ajax(result,config){
if(result.pagination)
$('nav.woocommerce-pagination').replaceWith(result.pagination);
else
$('nav.woocommerce-pagination').html('');
if(result.result_count)
$('.woocommerce-result-count').replaceWith(result.result_count);
else
$('.woocommerce-result-count').html('');
if(result.total_html)
$('.woocommerce-found-posts').replaceWith(result.total_html);
else
$('.woocommerce-found-posts').html('');
if(result.result_breadcrumb){
$('.breadcrumb').html(result.result_breadcrumb);
}
$('.woocommerce-filter-title').html(result.result_title);
$('.bwp-filter-ajax',config.widget_id).replaceWith(result.left_nav);
if(($("#price-filter-min-text",config.widget_id).val()!=$("#bwp_slider_price",config.widget_id).data("min"))||($("#price-filter-max-text",config.widget_id).val()!=$("#bwp_slider_price",config.widget_id).data("max")))
check_price=true;
else
check_price=false;
_event_dropdown_filter();
_event_filter_product();
_addClassProductList();
_event_clear_all();
_event_click_pagination();
_event_ajax_add_to_cart();
if(result.base_url!='')
history.pushState({}, "", result.base_url.replace(/&amp;/g, '&').replace(/%2C/g, ','));
}
function _event_ajax_add_to_cart(){
$("a.ajax_add_to_cart").on("click", function(){
setTimeout(function(){
if(!$(".top-cart",".wpbingoCartTop").hasClass("open"))
$(".top-cart",".wpbingoCartTop").addClass("open");
}, 2000);
});
}
function _addClassProductList(){
var class_product_default=$("ul.products-list").data("col") ? $("ul.products-list").data("col"):"";
var class_product_item=$('.view-grid.active').data('col') ? $('.view-grid.active').data('col'):class_product_default;
if(class_product_item){
var list_class="col-lg-12 col-md-12 col-xs-12";
if($('.view-grid').hasClass('active')){
$("ul.products-list").removeClass('list').addClass('grid');
$("ul.products-list li").removeClass(list_class).addClass(class_product_item);
}
if($('.view-list').hasClass('active')){
$("ul.products-list").removeClass('grid').addClass('list');
$("ul.products-list li").removeClass(class_product_item).addClass(list_class);
}}
}
return false;
};
function _wpbingo_countdown_product($element){
$('.product-countdown',$element).each(function(event){
var $this=$(this);
var $id=$(this).data("id");
var $current_time=new Date().getTime();
var $sttime=$(this).data('sttime');
var $countdown_time=$this.data('cdtime');
var $day=$this.data('day') ? $this.data('day'):"D";
var $hour=$this.data('hour') ? $this.data('hour'):"H";
var $min=$this.data('min') ? $this.data('min'):"M";
var $sec=$this.data('sec') ? $this.data('sec'):"S";
var $austDay=new Date();
$austDay=new Date($countdown_time * 1000);
if($sttime > $current_time){
$this.remove();
return ;
}
if($countdown_time.length > 0&&$current_time > $countdown_time){
$this.remove();
return ;
}
if($countdown_time.length <=0){
$this.remove();
return ;
}
$this.countdown($austDay, function(event){
$(this).html(event.strftime('<span class="countdown-content"><span class="days"><span class="countdown-amount">%D</span><span class="countdown-text">'+$day+'</span></span><span class="countdown-section hours"><span class="countdown-amount">%H</span><span class="countdown-text">'+$hour+'</span></span><span class="countdown-section mins"><span class="countdown-amount">%M</span><span class="countdown-text">'+$min+'</span></span><span class="countdown-section secs"><span class="countdown-amount">%S</span><span class="countdown-text">'+$sec+'</span></span></span>')
);
}).on('finish.countdown', function(event){
$this.remove();
$id=$this.data('id');
$target=this;
$this.hide('slow', function(){ $(this).remove(); });
$price=$this.data('price');
$('#' + $id + ' .item-price > span').hide('slow', function(){ $('#' + $id + ' .item-price > span').remove(); });
$('#' + $id + ' .item-price').append('<span><span class="amount">' + $price + '</span></span>');
});
});
}})(jQuery);
+function ($){
'use strict';
var Affix=function (element, options){
this.options=$.extend({}, Affix.DEFAULTS, options)
this.$target=$(this.options.target)
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
.on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))
this.$element=$(element)
this.affixed      =
this.unpin        =
this.pinnedOffset=null
this.checkPosition()
}
Affix.VERSION='3.2.0'
Affix.RESET='affix affix-top affix-bottom'
Affix.DEFAULTS={
offset: 0,
target: window
}
Affix.prototype.getPinnedOffset=function (){
if(this.pinnedOffset) return this.pinnedOffset
this.$element.removeClass(Affix.RESET).addClass('affix')
var scrollTop=this.$target.scrollTop()
var position=this.$element.offset()
return (this.pinnedOffset=position.top - scrollTop)
}
Affix.prototype.checkPositionWithEventLoop=function (){
setTimeout($.proxy(this.checkPosition, this), 1)
}
Affix.prototype.checkPosition=function (){
if(!this.$element.is(':visible')) return
var scrollHeight=$(document).height()
var scrollTop=this.$target.scrollTop()
var position=this.$element.offset()
var offset=this.options.offset
var offsetTop=offset.top
var offsetBottom=offset.bottom
if(typeof offset!='object')         offsetBottom=offsetTop=offset
if(typeof offsetTop=='function')    offsetTop=offset.top(this.$element)
if(typeof offsetBottom=='function') offsetBottom=offset.bottom(this.$element)
var affix=this.unpin!=null&&(scrollTop + this.unpin <=position.top) ? false :
offsetBottom!=null&&(position.top + this.$element.height() >=scrollHeight - offsetBottom) ? 'bottom' :
offsetTop!=null&&(scrollTop <=offsetTop) ? 'top':false
if(this.affixed===affix) return
if(this.unpin!=null) this.$element.css('top', '')
var affixType='affix' + (affix ? '-' + affix:'')
var e=$.Event(affixType + '.bs.affix')
this.$element.trigger(e)
if(e.isDefaultPrevented()) return
this.affixed=affix
this.unpin=affix=='bottom' ? this.getPinnedOffset():null
this.$element
.removeClass(Affix.RESET)
.addClass(affixType)
.trigger($.Event(affixType.replace('affix', 'affixed')))
if(affix=='bottom'){
this.$element.offset({
top: scrollHeight - this.$element.height() - offsetBottom
})
}}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.affix')
var options=typeof option=='object'&&option
if(!data) $this.data('bs.affix', (data=new Affix(this, options)))
if(typeof option=='string') data[option]()
})
}
var old=$.fn.affix
$.fn.affix=Plugin
$.fn.affix.Constructor=Affix
$.fn.affix.noConflict=function (){
$.fn.affix=old
return this
}
$(window).on('load', function (){
$('[data-spy="affix"]').each(function (){
var $spy=$(this)
var data=$spy.data()
data.offset=data.offset||{}
if(data.offsetBottom) data.offset.bottom=data.offsetBottom
if(data.offsetTop)    data.offset.top=data.offsetTop
Plugin.call($spy, data)
})
})
}(jQuery);
+function ($){
'use strict';
var dismiss='[data-dismiss="alert"]'
var Alert=function (el){
$(el).on('click', dismiss, this.close)
}
Alert.VERSION='3.2.0'
Alert.prototype.close=function (e){
var $this=$(this)
var selector=$this.attr('data-target')
if(!selector){
selector=$this.attr('href')
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/, '')
}
var $parent=$(selector)
if(e) e.preventDefault()
if(!$parent.length){
$parent=$this.hasClass('alert') ? $this:$this.parent()
}
$parent.trigger(e=$.Event('close.bs.alert'))
if(e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement(){
$parent.detach().trigger('closed.bs.alert').remove()
}
$.support.transition&&$parent.hasClass('fade') ?
$parent
.one('bsTransitionEnd', removeElement)
.emulateTransitionEnd(150) :
removeElement()
}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.alert')
if(!data) $this.data('bs.alert', (data=new Alert(this)))
if(typeof option=='string') data[option].call($this)
})
}
var old=$.fn.alert
$.fn.alert=Plugin
$.fn.alert.Constructor=Alert
$.fn.alert.noConflict=function (){
$.fn.alert=old
return this
}
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
}(jQuery);
+function ($){
'use strict';
var Button=function (element, options){
this.$element=$(element)
this.options=$.extend({}, Button.DEFAULTS, options)
this.isLoading=false
}
Button.VERSION='3.2.0'
Button.DEFAULTS={
loadingText: 'loading...'
}
Button.prototype.setState=function (state){
var d='disabled'
var $el=this.$element
var val=$el.is('input') ? 'val':'html'
var data=$el.data()
state=state + 'Text'
if(data.resetText==null) $el.data('resetText', $el[val]())
$el[val](data[state]==null ? this.options[state]:data[state])
setTimeout($.proxy(function (){
if(state=='loadingText'){
this.isLoading=true
$el.addClass(d).attr(d, d)
}else if(this.isLoading){
this.isLoading=false
$el.removeClass(d).removeAttr(d)
}}, this), 0)
}
Button.prototype.toggle=function (){
var changed=true
var $parent=this.$element.closest('[data-toggle="buttons"]')
if($parent.length){
var $input=this.$element.find('input')
if($input.prop('type')=='radio'){
if($input.prop('checked')&&this.$element.hasClass('active')) changed=false
else $parent.find('.active').removeClass('active')
}
if(changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
}
if(changed) this.$element.toggleClass('active')
}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.button')
var options=typeof option=='object'&&option
if(!data) $this.data('bs.button', (data=new Button(this, options)))
if(option=='toggle') data.toggle()
else if(option) data.setState(option)
})
}
var old=$.fn.button
$.fn.button=Plugin
$.fn.button.Constructor=Button
$.fn.button.noConflict=function (){
$.fn.button=old
return this
}
$(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e){
var $btn=$(e.target)
if(!$btn.hasClass('btn')) $btn=$btn.closest('.btn')
Plugin.call($btn, 'toggle')
e.preventDefault()
})
}(jQuery);
+function ($){
'use strict';
var Carousel=function (element, options){
this.$element=$(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
this.$indicators=this.$element.find('.carousel-indicators')
this.options=options
this.paused      =
this.sliding     =
this.interval    =
this.$active     =
this.$items=null
this.options.pause=='hover'&&this.$element
.on('mouseenter.bs.carousel', $.proxy(this.pause, this))
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Carousel.VERSION='3.2.0'
Carousel.DEFAULTS={
interval: 5000,
pause: 'hover',
wrap: true
}
Carousel.prototype.keydown=function (e){
switch (e.which){
case 37: this.prev(); break
case 39: this.next(); break
default: return
}
e.preventDefault()
}
Carousel.prototype.cycle=function (e){
e||(this.paused=false)
this.interval&&clearInterval(this.interval)
this.options.interval
&& !this.paused
&& (this.interval=setInterval($.proxy(this.next, this), this.options.interval))
return this
}
Carousel.prototype.getItemIndex=function (item){
this.$items=item.parent().children('.item')
return this.$items.index(item||this.$active)
}
Carousel.prototype.to=function (pos){
var that=this
var activeIndex=this.getItemIndex(this.$active=this.$element.find('.item.active'))
if(pos > (this.$items.length - 1)||pos < 0) return
if(this.sliding)       return this.$element.one('slid.bs.carousel', function (){ that.to(pos) })
if(activeIndex==pos) return this.pause().cycle()
return this.slide(pos > activeIndex ? 'next':'prev', $(this.$items[pos]))
}
Carousel.prototype.pause=function (e){
e||(this.paused=true)
if(this.$element.find('.next, .prev').length&&$.support.transition){
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
this.interval=clearInterval(this.interval)
return this
}
Carousel.prototype.next=function (){
if(this.sliding) return
return this.slide('next')
}
Carousel.prototype.prev=function (){
if(this.sliding) return
return this.slide('prev')
}
Carousel.prototype.slide=function (type, next){
var $active=this.$element.find('.item.active')
var $next=next||$active[type]()
var isCycling=this.interval
var direction=type=='next' ? 'left':'right'
var fallback=type=='next' ? 'first':'last'
var that=this
if(!$next.length){
if(!this.options.wrap) return
$next=this.$element.find('.item')[fallback]()
}
if($next.hasClass('active')) return (this.sliding=false)
var relatedTarget=$next[0]
var slideEvent=$.Event('slide.bs.carousel', {
relatedTarget: relatedTarget,
direction: direction
})
this.$element.trigger(slideEvent)
if(slideEvent.isDefaultPrevented()) return
this.sliding=true
isCycling&&this.pause()
if(this.$indicators.length){
this.$indicators.find('.active').removeClass('active')
var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)])
$nextIndicator&&$nextIndicator.addClass('active')
}
var slidEvent=$.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction })
if($.support.transition&&this.$element.hasClass('slide')){
$next.addClass(type)
$next[0].offsetWidth
$active.addClass(direction)
$next.addClass(direction)
$active
.one('bsTransitionEnd', function (){
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding=false
setTimeout(function (){
that.$element.trigger(slidEvent)
}, 0)
})
.emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
}else{
$active.removeClass('active')
$next.addClass('active')
this.sliding=false
this.$element.trigger(slidEvent)
}
isCycling&&this.cycle()
return this
}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.carousel')
var options=$.extend({}, Carousel.DEFAULTS, $this.data(), typeof option=='object'&&option)
var action=typeof option=='string' ? option:options.slide
if(!data) $this.data('bs.carousel', (data=new Carousel(this, options)))
if(typeof option=='number') data.to(option)
else if(action) data[action]()
else if(options.interval) data.pause().cycle()
})
}
var old=$.fn.carousel
$.fn.carousel=Plugin
$.fn.carousel.Constructor=Carousel
$.fn.carousel.noConflict=function (){
$.fn.carousel=old
return this
}
$(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e){
var href
var $this=$(this)
var $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/, ''))
if(!$target.hasClass('carousel')) return
var options=$.extend({}, $target.data(), $this.data())
var slideIndex=$this.attr('data-slide-to')
if(slideIndex) options.interval=false
Plugin.call($target, options)
if(slideIndex){
$target.data('bs.carousel').to(slideIndex)
}
e.preventDefault()
})
$(window).on('load', function (){
$('[data-ride="carousel"]').each(function (){
var $carousel=$(this)
Plugin.call($carousel, $carousel.data())
})
})
}(jQuery);
+function ($){
'use strict';
var Collapse=function (element, options){
this.$element=$(element)
this.options=$.extend({}, Collapse.DEFAULTS, options)
this.transitioning=null
if(this.options.parent) this.$parent=$(this.options.parent)
if(this.options.toggle) this.toggle()
}
Collapse.VERSION='3.2.0'
Collapse.DEFAULTS={
toggle: true
}
Collapse.prototype.dimension=function (){
var hasWidth=this.$element.hasClass('width')
return hasWidth ? 'width':'height'
}
Collapse.prototype.show=function (){
if(this.transitioning||this.$element.hasClass('in')) return
var startEvent=$.Event('show.bs.collapse')
this.$element.trigger(startEvent)
if(startEvent.isDefaultPrevented()) return
var actives=this.$parent&&this.$parent.find('> .panel > .in')
if(actives&&actives.length){
var hasData=actives.data('bs.collapse')
if(hasData&&hasData.transitioning) return
Plugin.call(actives, 'hide')
hasData||actives.data('bs.collapse', null)
}
var dimension=this.dimension()
this.$element
.removeClass('collapse')
.addClass('collapsing')[dimension](0)
this.transitioning=1
var complete=function (){
this.$element
.removeClass('collapsing')
.addClass('collapse in')[dimension]('')
this.transitioning=0
this.$element
.trigger('shown.bs.collapse')
}
if(!$.support.transition) return complete.call(this)
var scrollSize=$.camelCase(['scroll', dimension].join('-'))
this.$element
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
}
Collapse.prototype.hide=function (){
if(this.transitioning||!this.$element.hasClass('in')) return
var startEvent=$.Event('hide.bs.collapse')
this.$element.trigger(startEvent)
if(startEvent.isDefaultPrevented()) return
var dimension=this.dimension()
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
this.$element
.addClass('collapsing')
.removeClass('collapse')
.removeClass('in')
this.transitioning=1
var complete=function (){
this.transitioning=0
this.$element
.trigger('hidden.bs.collapse')
.removeClass('collapsing')
.addClass('collapse')
}
if(!$.support.transition) return complete.call(this)
this.$element
[dimension](0)
.one('bsTransitionEnd', $.proxy(complete, this))
.emulateTransitionEnd(350)
}
Collapse.prototype.toggle=function (){
this[this.$element.hasClass('in') ? 'hide':'show']()
}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.collapse')
var options=$.extend({}, Collapse.DEFAULTS, $this.data(), typeof option=='object'&&option)
if(!data&&options.toggle&&option=='show') option = !option
if(!data) $this.data('bs.collapse', (data=new Collapse(this, options)))
if(typeof option=='string') data[option]()
})
}
var old=$.fn.collapse
$.fn.collapse=Plugin
$.fn.collapse.Constructor=Collapse
$.fn.collapse.noConflict=function (){
$.fn.collapse=old
return this
}
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e){
var href
var $this=$(this)
var target=$this.attr('data-target')
|| e.preventDefault()
|| (href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/, '')
var $target=$(target)
var data=$target.data('bs.collapse')
var option=data ? 'toggle':$this.data()
var parent=$this.attr('data-parent')
var $parent=parent&&$(parent)
if(!data||!data.transitioning){
if($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
$this[$target.hasClass('in') ? 'addClass':'removeClass']('collapsed')
}
Plugin.call($target, option)
})
}(jQuery);
+function ($){
'use strict';
var backdrop='.dropdown-backdrop'
var toggle='[data-toggle="dropdown"]'
var Dropdown=function (element){
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION='3.2.0'
Dropdown.prototype.toggle=function (e){
var $this=$(this)
if($this.is('.disabled, :disabled')) return
var $parent=getParent($this)
var isActive=$parent.hasClass('open')
clearMenus()
if(!isActive){
if('ontouchstart' in document.documentElement&&!$parent.closest('.navbar-nav').length){
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
}
var relatedTarget={ relatedTarget: this }
$parent.trigger(e=$.Event('show.bs.dropdown', relatedTarget))
if(e.isDefaultPrevented()) return
$this.trigger('focus')
$parent
.toggleClass('open')
.trigger('shown.bs.dropdown', relatedTarget)
}
return false
}
Dropdown.prototype.keydown=function (e){
if(!/(38|40|27)/.test(e.keyCode)) return
var $this=$(this)
e.preventDefault()
e.stopPropagation()
if($this.is('.disabled, :disabled')) return
var $parent=getParent($this)
var isActive=$parent.hasClass('open')
if(!isActive||(isActive&&e.keyCode==27)){
if(e.which==27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}
var desc=' li:not(.divider):visible a'
var $items=$parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
if(!$items.length) return
var index=$items.index($items.filter(':focus'))
if(e.keyCode==38&&index > 0)                 index--
if(e.keyCode==40&&index < $items.length - 1) index++
if(!~index)                                      index=0
$items.eq(index).trigger('focus')
}
function clearMenus(e){
if(e&&e.which===3) return
$(backdrop).remove()
$(toggle).each(function (){
var $parent=getParent($(this))
var relatedTarget={ relatedTarget: this }
if(!$parent.hasClass('open')) return
$parent.trigger(e=$.Event('hide.bs.dropdown', relatedTarget))
if(e.isDefaultPrevented()) return
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}
function getParent($this){
var selector=$this.attr('data-target')
if(!selector){
selector=$this.attr('href')
selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/, '')
}
var $parent=selector&&$(selector)
return $parent&&$parent.length ? $parent:$this.parent()
}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.dropdown')
if(!data) $this.data('bs.dropdown', (data=new Dropdown(this)))
if(typeof option=='string') data[option].call($this)
})
}
var old=$.fn.dropdown
$.fn.dropdown=Plugin
$.fn.dropdown.Constructor=Dropdown
$.fn.dropdown.noConflict=function (){
$.fn.dropdown=old
return this
}
$(document)
.on('click.bs.dropdown.data-api', clearMenus)
.on('click.bs.dropdown.data-api', '.dropdown form', function (e){ e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
}(jQuery);
+function ($){
'use strict';
var Tab=function (element){
this.element=$(element)
}
Tab.VERSION='3.2.0'
Tab.prototype.show=function (){
var $this=this.element
var $ul=$this.closest('ul:not(.dropdown-menu)')
var selector=$this.data('target')
if(!selector){
selector=$this.attr('href')
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/, '')
}
if($this.parent('li').hasClass('active')) return
var previous=$ul.find('.active:last a')[0]
var e=$.Event('show.bs.tab', {
relatedTarget: previous
})
$this.trigger(e)
if(e.isDefaultPrevented()) return
var $target=$(selector)
this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function (){
$this.trigger({
type: 'shown.bs.tab',
relatedTarget: previous
})
})
}
Tab.prototype.activate=function (element, container, callback){
var $active=container.find('> .active')
var transition=callback
&& $.support.transition
&& $active.hasClass('fade')
function next(){
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if(transition){
element[0].offsetWidth
element.addClass('in')
}else{
element.removeClass('fade')
}
if(element.parent('.dropdown-menu')){
element.closest('li.dropdown').addClass('active')
}
callback&&callback()
}
transition ?
$active
.one('bsTransitionEnd', next)
.emulateTransitionEnd(150) :
next()
$active.removeClass('in')
}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.tab')
if(!data) $this.data('bs.tab', (data=new Tab(this)))
if(typeof option=='string') data[option]()
})
}
var old=$.fn.tab
$.fn.tab=Plugin
$.fn.tab.Constructor=Tab
$.fn.tab.noConflict=function (){
$.fn.tab=old
return this
}
$(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e){
e.preventDefault()
Plugin.call($(this), 'show')
})
}(jQuery);
+function ($){
'use strict';
function transitionEnd(){
var el=document.createElement('bootstrap')
var transEndEventNames={
WebkitTransition:'webkitTransitionEnd',
MozTransition:'transitionend',
OTransition:'oTransitionEnd otransitionend',
transition:'transitionend'
}
for (var name in transEndEventNames){
if(el.style[name]!==undefined){
return { end: transEndEventNames[name] }}
}
return false
}
$.fn.emulateTransitionEnd=function (duration){
var called=false
var $el=this
$(this).one('bsTransitionEnd', function (){ called=true })
var callback=function (){ if(!called) $($el).trigger($.support.transition.end) }
setTimeout(callback, duration)
return this
}
$(function (){
$.support.transition=transitionEnd()
if(!$.support.transition) return
$.event.special.bsTransitionEnd={
bindType: $.support.transition.end,
delegateType: $.support.transition.end,
handle: function (e){
if($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
}}
})
}(jQuery);
+function ($){
'use strict';
function ScrollSpy(element, options){
var process=$.proxy(this.process, this)
this.$body=$('body')
this.$scrollElement=$(element).is('body') ? $(window):$(element)
this.options=$.extend({}, ScrollSpy.DEFAULTS, options)
this.selector=(this.options.target||'') + ' .nav li > a'
this.offsets=[]
this.targets=[]
this.activeTarget=null
this.scrollHeight=0
this.$scrollElement.on('scroll.bs.scrollspy', process)
this.refresh()
this.process()
}
ScrollSpy.VERSION='3.2.0'
ScrollSpy.DEFAULTS={
offset: 10
}
ScrollSpy.prototype.getScrollHeight=function (){
return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
}
ScrollSpy.prototype.refresh=function (){
var offsetMethod='offset'
var offsetBase=0
if(!$.isWindow(this.$scrollElement[0])){
offsetMethod='position'
offsetBase=this.$scrollElement.scrollTop()
}
this.offsets=[]
this.targets=[]
this.scrollHeight=this.getScrollHeight()
var self=this
this.$body
.find(this.selector)
.map(function (){
var $el=$(this)
var href=$el.data('target')||$el.attr('href')
var $href=/^#./.test(href)&&$(href)
return ($href
&& $href.length
&& $href.is(':visible')
&& [[$href[offsetMethod]().top + offsetBase, href]])||null
})
.sort(function (a, b){ return a[0] - b[0] })
.each(function (){
self.offsets.push(this[0])
self.targets.push(this[1])
})
}
ScrollSpy.prototype.process=function (){
var scrollTop=this.$scrollElement.scrollTop() + this.options.offset
var scrollHeight=this.getScrollHeight()
var maxScroll=this.options.offset + scrollHeight - this.$scrollElement.height()
var offsets=this.offsets
var targets=this.targets
var activeTarget=this.activeTarget
var i
if(this.scrollHeight!=scrollHeight){
this.refresh()
}
if(scrollTop >=maxScroll){
return activeTarget!=(i=targets[targets.length - 1])&&this.activate(i)
}
if(activeTarget&&scrollTop <=offsets[0]){
return activeTarget!=(i=targets[0])&&this.activate(i)
}
for (i=offsets.length; i--;){
activeTarget!=targets[i]
&& scrollTop >=offsets[i]
&& (!offsets[i + 1]||scrollTop <=offsets[i + 1])
&& this.activate(targets[i])
}}
ScrollSpy.prototype.activate=function (target){
this.activeTarget=target
$(this.selector)
.parentsUntil(this.options.target, '.active')
.removeClass('active')
var selector=this.selector +
'[data-target="' + target + '"],' +
this.selector + '[href="' + target + '"]'
var active=$(selector)
.parents('li')
.addClass('active')
if(active.parent('.dropdown-menu').length){
active=active
.closest('li.dropdown')
.addClass('active')
}
active.trigger('activate.bs.scrollspy')
}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.scrollspy')
var options=typeof option=='object'&&option
if(!data) $this.data('bs.scrollspy', (data=new ScrollSpy(this, options)))
if(typeof option=='string') data[option]()
})
}
var old=$.fn.scrollspy
$.fn.scrollspy=Plugin
$.fn.scrollspy.Constructor=ScrollSpy
$.fn.scrollspy.noConflict=function (){
$.fn.scrollspy=old
return this
}
$(window).on('load.bs.scrollspy.data-api', function (){
$('[data-spy="scroll"]').each(function (){
var $spy=$(this)
Plugin.call($spy, $spy.data())
})
})
}(jQuery);
+function ($){
'use strict';
var Modal=function (element, options){
this.options=options
this.$body=$(document.body)
this.$element=$(element)
this.$backdrop      =
this.isShown=null
this.scrollbarWidth=0
if(this.options.remote){
this.$element
.find('.modal-content')
.load(this.options.remote, $.proxy(function (){
this.$element.trigger('loaded.bs.modal')
}, this))
}}
Modal.VERSION='3.2.0'
Modal.DEFAULTS={
backdrop: true,
keyboard: true,
show: true
}
Modal.prototype.toggle=function (_relatedTarget){
return this.isShown ? this.hide():this.show(_relatedTarget)
}
Modal.prototype.show=function (_relatedTarget){
var that=this
var e=$.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
if(this.isShown||e.isDefaultPrevented()) return
this.isShown=true
this.checkScrollbar()
this.$body.addClass('modal-open')
this.setScrollbar()
this.escape()
this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
this.backdrop(function (){
var transition=$.support.transition&&that.$element.hasClass('fade')
if(!that.$element.parent().length){
that.$element.appendTo(that.$body)
}
that.$element
.show()
.scrollTop(0)
if(transition){
that.$element[0].offsetWidth
}
that.$element
.addClass('in')
.attr('aria-hidden', false)
that.enforceFocus()
var e=$.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
transition ?
that.$element.find('.modal-dialog')
.one('bsTransitionEnd', function (){
that.$element.trigger('focus').trigger(e)
})
.emulateTransitionEnd(300) :
that.$element.trigger('focus').trigger(e)
})
}
Modal.prototype.hide=function (e){
if(e) e.preventDefault()
e=$.Event('hide.bs.modal')
this.$element.trigger(e)
if(!this.isShown||e.isDefaultPrevented()) return
this.isShown=false
this.$body.removeClass('modal-open')
this.resetScrollbar()
this.escape()
$(document).off('focusin.bs.modal')
this.$element
.removeClass('in')
.attr('aria-hidden', true)
.off('click.dismiss.bs.modal')
$.support.transition&&this.$element.hasClass('fade') ?
this.$element
.one('bsTransitionEnd', $.proxy(this.hideModal, this))
.emulateTransitionEnd(300) :
this.hideModal()
}
Modal.prototype.enforceFocus=function (){
$(document)
.off('focusin.bs.modal')
.on('focusin.bs.modal', $.proxy(function (e){
if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){
this.$element.trigger('focus')
}}, this))
}
Modal.prototype.escape=function (){
if(this.isShown&&this.options.keyboard){
this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e){
e.which==27&&this.hide()
}, this))
}else if(!this.isShown){
this.$element.off('keyup.dismiss.bs.modal')
}}
Modal.prototype.hideModal=function (){
var that=this
this.$element.hide()
this.backdrop(function (){
that.$element.trigger('hidden.bs.modal')
})
}
Modal.prototype.removeBackdrop=function (){
this.$backdrop&&this.$backdrop.remove()
this.$backdrop=null
}
Modal.prototype.backdrop=function (callback){
var that=this
var animate=this.$element.hasClass('fade') ? 'fade':''
if(this.isShown&&this.options.backdrop){
var doAnimate=$.support.transition&&animate
this.$backdrop=$('<div class="modal-backdrop ' + animate + '" />')
.appendTo(this.$body)
this.$element.on('click.dismiss.bs.modal', $.proxy(function (e){
if(e.target!==e.currentTarget) return
this.options.backdrop=='static'
? this.$element[0].focus.call(this.$element[0])
: this.hide.call(this)
}, this))
if(doAnimate) this.$backdrop[0].offsetWidth
this.$backdrop.addClass('in')
if(!callback) return
doAnimate ?
this.$backdrop
.one('bsTransitionEnd', callback)
.emulateTransitionEnd(150) :
callback()
}else if(!this.isShown&&this.$backdrop){
this.$backdrop.removeClass('in')
var callbackRemove=function (){
that.removeBackdrop()
callback&&callback()
}
$.support.transition&&this.$element.hasClass('fade') ?
this.$backdrop
.one('bsTransitionEnd', callbackRemove)
.emulateTransitionEnd(150) :
callbackRemove()
}else if(callback){
callback()
}}
Modal.prototype.checkScrollbar=function (){
if(document.body.clientWidth >=window.innerWidth) return
this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar()
}
Modal.prototype.setScrollbar=function (){
var bodyPad=parseInt((this.$body.css('padding-right')||0), 10)
if(this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
}
Modal.prototype.resetScrollbar=function (){
this.$body.css('padding-right', '')
}
Modal.prototype.measureScrollbar=function (){
var scrollDiv=document.createElement('div')
scrollDiv.className='modal-scrollbar-measure'
this.$body.append(scrollDiv)
var scrollbarWidth=scrollDiv.offsetWidth - scrollDiv.clientWidth
this.$body[0].removeChild(scrollDiv)
return scrollbarWidth
}
function Plugin(option, _relatedTarget){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.modal')
var options=$.extend({}, Modal.DEFAULTS, $this.data(), typeof option=='object'&&option)
if(!data) $this.data('bs.modal', (data=new Modal(this, options)))
if(typeof option=='string') data[option](_relatedTarget)
else if(options.show) data.show(_relatedTarget)
})
}
var old=$.fn.modal
$.fn.modal=Plugin
$.fn.modal.Constructor=Modal
$.fn.modal.noConflict=function (){
$.fn.modal=old
return this
}
$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e){
var $this=$(this)
var href=$this.attr('href')
var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/, '')))
var option=$target.data('bs.modal') ? 'toggle':$.extend({ remote: !/#/.test(href)&&href }, $target.data(), $this.data())
if($this.is('a')) e.preventDefault()
$target.one('show.bs.modal', function (showEvent){
if(showEvent.isDefaultPrevented()) return
$target.one('hidden.bs.modal', function (){
$this.is(':visible')&&$this.trigger('focus')
})
})
Plugin.call($target, option, this)
})
}(jQuery);
+function ($){
'use strict';
var Tooltip=function (element, options){
this.type       =
this.options    =
this.enabled    =
this.timeout    =
this.hoverState =
this.$element=null
this.init('tooltip', element, options)
}
Tooltip.VERSION='3.2.0'
Tooltip.DEFAULTS={
animation: true,
placement: 'top',
selector: false,
template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
trigger: 'hover focus',
title: '',
delay: 0,
html: false,
container: false,
viewport: {
selector: 'body',
padding: 0
}}
Tooltip.prototype.init=function (type, element, options){
this.enabled=true
this.type=type
this.$element=$(element)
this.options=this.getOptions(options)
this.$viewport=this.options.viewport&&$(this.options.viewport.selector||this.options.viewport)
var triggers=this.options.trigger.split(' ')
for (var i=triggers.length; i--;){
var trigger=triggers[i]
if(trigger=='click'){
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
}else if(trigger!='manual'){
var eventIn=trigger=='hover' ? 'mouseenter':'focusin'
var eventOut=trigger=='hover' ? 'mouseleave':'focusout'
this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}}
this.options.selector ?
(this._options=$.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
}
Tooltip.prototype.getDefaults=function (){
return Tooltip.DEFAULTS
}
Tooltip.prototype.getOptions=function (options){
options=$.extend({}, this.getDefaults(), this.$element.data(), options)
if(options.delay&&typeof options.delay=='number'){
options.delay={
show: options.delay,
hide: options.delay
}}
return options
}
Tooltip.prototype.getDelegateOptions=function (){
var options={}
var defaults=this.getDefaults()
this._options&&$.each(this._options, function (key, value){
if(defaults[key]!=value) options[key]=value
})
return options
}
Tooltip.prototype.enter=function (obj){
var self=obj instanceof this.constructor ?
obj:$(obj.currentTarget).data('bs.' + this.type)
if(!self){
self=new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
clearTimeout(self.timeout)
self.hoverState='in'
if(!self.options.delay||!self.options.delay.show) return self.show()
self.timeout=setTimeout(function (){
if(self.hoverState=='in') self.show()
}, self.options.delay.show)
}
Tooltip.prototype.leave=function (obj){
var self=obj instanceof this.constructor ?
obj:$(obj.currentTarget).data('bs.' + this.type)
if(!self){
self=new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self)
}
clearTimeout(self.timeout)
self.hoverState='out'
if(!self.options.delay||!self.options.delay.hide) return self.hide()
self.timeout=setTimeout(function (){
if(self.hoverState=='out') self.hide()
}, self.options.delay.hide)
}
Tooltip.prototype.show=function (){
var e=$.Event('show.bs.' + this.type)
if(this.hasContent()&&this.enabled){
this.$element.trigger(e)
var inDom=$.contains(document.documentElement, this.$element[0])
if(e.isDefaultPrevented()||!inDom) return
var that=this
var $tip=this.tip()
var tipId=this.getUID(this.type)
this.setContent()
$tip.attr('id', tipId)
this.$element.attr('aria-describedby', tipId)
if(this.options.animation) $tip.addClass('fade')
var placement=typeof this.options.placement=='function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
var autoToken=/\s?auto?\s?/i
var autoPlace=autoToken.test(placement)
if(autoPlace) placement=placement.replace(autoToken, '')||'top'
$tip
.detach()
.css({ top: 0, left: 0, display: 'block' })
.addClass(placement)
.data('bs.' + this.type, this)
this.options.container ? $tip.appendTo(this.options.container):$tip.insertAfter(this.$element)
var pos=this.getPosition()
var actualWidth=$tip[0].offsetWidth
var actualHeight=$tip[0].offsetHeight
if(autoPlace){
var orgPlacement=placement
var $parent=this.$element.parent()
var parentDim=this.getPosition($parent)
placement=placement=='bottom'&&pos.top   + pos.height       + actualHeight - parentDim.scroll > parentDim.height ? 'top'    :
placement=='top'&&pos.top   - parentDim.scroll - actualHeight < 0                                   ? 'bottom' :
placement=='right'&&pos.right + actualWidth      > parentDim.width                                    ? 'left'   :
placement=='left'&&pos.left  - actualWidth      < parentDim.left                                     ? 'right'  :
placement
$tip
.removeClass(orgPlacement)
.addClass(placement)
}
var calculatedOffset=this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
this.applyPlacement(calculatedOffset, placement)
var complete=function (){
that.$element.trigger('shown.bs.' + that.type)
that.hoverState=null
}
$.support.transition&&this.$tip.hasClass('fade') ?
$tip
.one('bsTransitionEnd', complete)
.emulateTransitionEnd(150) :
complete()
}}
Tooltip.prototype.applyPlacement=function (offset, placement){
var $tip=this.tip()
var width=$tip[0].offsetWidth
var height=$tip[0].offsetHeight
var marginTop=parseInt($tip.css('margin-top'), 10)
var marginLeft=parseInt($tip.css('margin-left'), 10)
if(isNaN(marginTop))  marginTop=0
if(isNaN(marginLeft)) marginLeft=0
offset.top=offset.top  + marginTop
offset.left=offset.left + marginLeft
$.offset.setOffset($tip[0], $.extend({
using: function (props){
$tip.css({
top: Math.round(props.top),
left: Math.round(props.left)
})
}}, offset), 0)
$tip.addClass('in')
var actualWidth=$tip[0].offsetWidth
var actualHeight=$tip[0].offsetHeight
if(placement=='top'&&actualHeight!=height){
offset.top=offset.top + height - actualHeight
}
var delta=this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
if(delta.left) offset.left +=delta.left
else offset.top +=delta.top
var arrowDelta=delta.left ? delta.left * 2 - width + actualWidth:delta.top * 2 - height + actualHeight
var arrowPosition=delta.left ? 'left':'top'
var arrowOffsetPosition=delta.left ? 'offsetWidth':'offsetHeight'
$tip.offset(offset)
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
}
Tooltip.prototype.replaceArrow=function (delta, dimension, position){
this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%'):'')
}
Tooltip.prototype.setContent=function (){
var $tip=this.tip()
var title=this.getTitle()
$tip.find('.tooltip-inner')[this.options.html ? 'html':'text'](title)
$tip.removeClass('fade in top bottom left right')
}
Tooltip.prototype.hide=function (){
var that=this
var $tip=this.tip()
var e=$.Event('hide.bs.' + this.type)
this.$element.removeAttr('aria-describedby')
function complete(){
if(that.hoverState!='in') $tip.detach()
that.$element.trigger('hidden.bs.' + that.type)
}
this.$element.trigger(e)
if(e.isDefaultPrevented()) return
$tip.removeClass('in')
$.support.transition&&this.$tip.hasClass('fade') ?
$tip
.one('bsTransitionEnd', complete)
.emulateTransitionEnd(150) :
complete()
this.hoverState=null
return this
}
Tooltip.prototype.fixTitle=function (){
var $e=this.$element
if($e.attr('title')||typeof ($e.attr('data-original-title'))!='string'){
$e.attr('data-original-title', $e.attr('title')||'').attr('title', '')
}}
Tooltip.prototype.hasContent=function (){
return this.getTitle()
}
Tooltip.prototype.getPosition=function ($element){
$element=$element||this.$element
var el=$element[0]
var isBody=el.tagName=='BODY'
return $.extend({}, (typeof el.getBoundingClientRect=='function') ? el.getBoundingClientRect():null, {
scroll: isBody ? document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop(),
width:  isBody ? $(window).width():$element.outerWidth(),
height: isBody ? $(window).height():$element.outerHeight()
}, isBody ? { top: 0, left: 0 }:$element.offset())
}
Tooltip.prototype.getCalculatedOffset=function (placement, pos, actualWidth, actualHeight){
return placement=='bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2  } :
placement=='top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2  } :
placement=='left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
{ top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width   }}
Tooltip.prototype.getViewportAdjustedDelta=function (placement, pos, actualWidth, actualHeight){
var delta={ top: 0, left: 0 }
if(!this.$viewport) return delta
var viewportPadding=this.options.viewport&&this.options.viewport.padding||0
var viewportDimensions=this.getPosition(this.$viewport)
if(/right|left/.test(placement)){
var topEdgeOffset=pos.top - viewportPadding - viewportDimensions.scroll
var bottomEdgeOffset=pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
if(topEdgeOffset < viewportDimensions.top){
delta.top=viewportDimensions.top - topEdgeOffset
}else if(bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height){
delta.top=viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
}}else{
var leftEdgeOffset=pos.left - viewportPadding
var rightEdgeOffset=pos.left + viewportPadding + actualWidth
if(leftEdgeOffset < viewportDimensions.left){
delta.left=viewportDimensions.left - leftEdgeOffset
}else if(rightEdgeOffset > viewportDimensions.width){
delta.left=viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
}}
return delta
}
Tooltip.prototype.getTitle=function (){
var title
var $e=this.$element
var o=this.options
title=$e.attr('data-original-title')
|| (typeof o.title=='function' ? o.title.call($e[0]):o.title)
return title
}
Tooltip.prototype.getUID=function (prefix){
do prefix +=~~(Math.random() * 1000000)
while (document.getElementById(prefix))
return prefix
}
Tooltip.prototype.tip=function (){
return (this.$tip=this.$tip||$(this.options.template))
}
Tooltip.prototype.arrow=function (){
return (this.$arrow=this.$arrow||this.tip().find('.tooltip-arrow'))
}
Tooltip.prototype.validate=function (){
if(!this.$element[0].parentNode){
this.hide()
this.$element=null
this.options=null
}}
Tooltip.prototype.enable=function (){
this.enabled=true
}
Tooltip.prototype.disable=function (){
this.enabled=false
}
Tooltip.prototype.toggleEnabled=function (){
this.enabled = !this.enabled
}
Tooltip.prototype.toggle=function (e){
var self=this
if(e){
self=$(e.currentTarget).data('bs.' + this.type)
if(!self){
self=new this.constructor(e.currentTarget, this.getDelegateOptions())
$(e.currentTarget).data('bs.' + this.type, self)
}}
self.tip().hasClass('in') ? self.leave(self):self.enter(self)
}
Tooltip.prototype.destroy=function (){
clearTimeout(this.timeout)
this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.tooltip')
var options=typeof option=='object'&&option
if(!data&&option=='destroy') return
if(!data) $this.data('bs.tooltip', (data=new Tooltip(this, options)))
if(typeof option=='string') data[option]()
})
}
var old=$.fn.tooltip
$.fn.tooltip=Plugin
$.fn.tooltip.Constructor=Tooltip
$.fn.tooltip.noConflict=function (){
$.fn.tooltip=old
return this
}}(jQuery);
+function ($){
'use strict';
var Popover=function (element, options){
this.init('popover', element, options)
}
if(!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION='3.2.0'
Popover.DEFAULTS=$.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
})
Popover.prototype=$.extend({}, $.fn.tooltip.Constructor.prototype)
Popover.prototype.constructor=Popover
Popover.prototype.getDefaults=function (){
return Popover.DEFAULTS
}
Popover.prototype.setContent=function (){
var $tip=this.tip()
var title=this.getTitle()
var content=this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html':'text'](title)
$tip.find('.popover-content').empty()[
this.options.html ? (typeof content=='string' ? 'html':'append'):'text'
](content)
$tip.removeClass('fade top bottom left right in')
if(!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
}
Popover.prototype.hasContent=function (){
return this.getTitle()||this.getContent()
}
Popover.prototype.getContent=function (){
var $e=this.$element
var o=this.options
return $e.attr('data-content')
|| (typeof o.content=='function' ?
o.content.call($e[0]) :
o.content)
}
Popover.prototype.arrow=function (){
return (this.$arrow=this.$arrow||this.tip().find('.arrow'))
}
Popover.prototype.tip=function (){
if(!this.$tip) this.$tip=$(this.options.template)
return this.$tip
}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.popover')
var options=typeof option=='object'&&option
if(!data&&option=='destroy') return
if(!data) $this.data('bs.popover', (data=new Popover(this, options)))
if(typeof option=='string') data[option]()
})
}
var old=$.fn.popover
$.fn.popover=Plugin
$.fn.popover.Constructor=Popover
$.fn.popover.noConflict=function (){
$.fn.popover=old
return this
}}(jQuery);
;(function(root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], factory);
}else if(typeof exports==='object'){
module.exports=factory(require('jquery'));
}else{
root.jquery_mmenu_all_min_js=factory(root.jQuery);
}}(this, function(jQuery){
!function(e){function t(){e[n].glbl||(r={$wndw:e(window),$docu:e(document),$html:e("html"),$body:e("body")},s={},a={},o={},e.each([s,a,o],function(e,t){t.add=function(e){e=e.split(" ");for(var n=0,i=e.length;n<i;n++)t[e[n]]=t.mm(e[n])}}),s.mm=function(e){return"mm-"+e},s.add("wrapper menu panels panel nopanel highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen noanimation"),s.umm=function(e){return"mm-"==e.slice(0,3)&&(e=e.slice(3)),e},a.mm=function(e){return"mm-"+e},a.add("parent child"),o.mm=function(e){return e+".mm"},o.add("transitionend webkitTransitionEnd click scroll resize keydown mousedown mouseup touchstart touchmove touchend orientationchange"),e[n]._c=s,e[n]._d=a,e[n]._e=o,e[n].glbl=r)}var n="mmenu",i="6.0.2";if(!(e[n]&&e[n].version>i)){e[n]=function(e,t,n){return this.$menu=e,this._api=["bind","getInstance","initPanels","openPanel","closePanel","closeAllPanels","setSelected"],this.opts=t,this.conf=n,this.vars={},this.cbck={},this.mtch={},"function"==typeof this.___deprecated&&this.___deprecated(),this._initAddons(),this._initExtensions(),this._initMenu(),this._initPanels(),this._initOpened(),this._initAnchors(),this._initMatchMedia(),"function"==typeof this.___debug&&this.___debug(),this},e[n].version=i,e[n].addons={},e[n].uniqueId=0,e[n].defaults={extensions:[],initMenu:function(){},initPanels:function(){},navbar:{add:!0,title:"Menu",titleLink:"parent"},onClick:{setSelected:!0},slidingSubmenus:!0},e[n].configuration={classNames:{divider:"Divider",inset:"Inset",nolistview:"NoListview",nopanel:"NoPanel",panel:"Panel",selected:"Selected",spacer:"Spacer",vertical:"Vertical"},clone:!1,openingInterval:25,panelNodetype:"ul, ol, div",transitionDuration:400},e[n].prototype={getInstance:function(){return this},initPanels:function(e){this._initPanels(e)},openPanel:function(t,i){if(this.trigger("openPanel:before",t),t&&t.length&&(t.is("."+s.panel)||(t=t.closest("."+s.panel)),t.is("."+s.panel))){var o=this;if("boolean"!=typeof i&&(i=!0),t.hasClass(s.vertical))t.add(t.parents("."+s.vertical)).removeClass(s.hidden).parent("li").addClass(s.opened),this.openPanel(t.parents("."+s.panel).not("."+s.vertical).first()),this.trigger("openPanel:start",t),this.trigger("openPanel:finish",t);else{if(t.hasClass(s.opened))return;var r=this.$pnls.children("."+s.panel),l=r.filter("."+s.opened);if(!e[n].support.csstransitions)return l.addClass(s.hidden).removeClass(s.opened),t.removeClass(s.hidden).addClass(s.opened),this.trigger("openPanel:start",t),void this.trigger("openPanel:finish",t);r.not(t).removeClass(s.subopened);for(var d=t.data(a.parent);d;)d=d.closest("."+s.panel),d.is("."+s.vertical)||d.addClass(s.subopened),d=d.data(a.parent);r.removeClass(s.highest).not(l).not(t).addClass(s.hidden),t.removeClass(s.hidden);var c=function(){l.removeClass(s.opened),t.addClass(s.opened),t.hasClass(s.subopened)?(l.addClass(s.highest),t.removeClass(s.subopened)):(l.addClass(s.subopened),t.addClass(s.highest)),this.trigger("openPanel:start",t)},h=function(){l.removeClass(s.highest).addClass(s.hidden),t.removeClass(s.highest),this.trigger("openPanel:finish",t)};i&&!t.hasClass(s.noanimation)?setTimeout(function(){o.__transitionend(t,function(){h.call(o)},o.conf.transitionDuration),c.call(o)},this.conf.openingInterval):(c.call(this),h.call(this))}this.trigger("openPanel:after",t)}},closePanel:function(e){this.trigger("closePanel:before",e);var t=e.parent();t.hasClass(s.vertical)&&(t.removeClass(s.opened),this.trigger("closePanel",e)),this.trigger("closePanel:after",e)},closeAllPanels:function(){this.trigger("closeAllPanels:before"),this.$pnls.find("."+s.listview).children().removeClass(s.selected).filter("."+s.vertical).removeClass(s.opened);var e=this.$pnls.children("."+s.panel),t=e.first();this.$pnls.children("."+s.panel).not(t).removeClass(s.subopened).removeClass(s.opened).removeClass(s.highest).addClass(s.hidden),this.openPanel(t),this.trigger("closeAllPanels:after")},togglePanel:function(e){var t=e.parent();t.hasClass(s.vertical)&&this[t.hasClass(s.opened)?"closePanel":"openPanel"](e)},setSelected:function(e){this.trigger("setSelected:before",e),this.$menu.find("."+s.listview).children("."+s.selected).removeClass(s.selected),e.addClass(s.selected),this.trigger("setSelected:after",e)},bind:function(e,t){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(t)},trigger:function(){var e=this,t=Array.prototype.slice.call(arguments),n=t.shift();if(this.cbck[n])for(var i=0,s=this.cbck[n].length;i<s;i++)this.cbck[n][i].apply(e,t)},matchMedia:function(e,t,n){var i={yes:t,no:n};this.mtch[e]=this.mtch[e]||[],this.mtch[e].push(i)},_initAddons:function(){this.trigger("initAddons:before");var t;for(t in e[n].addons)e[n].addons[t].add.call(this),e[n].addons[t].add=function(){};for(t in e[n].addons)e[n].addons[t].setup.call(this);this.trigger("initAddons:after")},_initExtensions:function(){this.trigger("initExtensions:before");var e=this;this.opts.extensions.constructor===Array&&(this.opts.extensions={all:this.opts.extensions});for(var t in this.opts.extensions)this.opts.extensions[t]=this.opts.extensions[t].length?"mm-"+this.opts.extensions[t].join(" mm-"):"",this.opts.extensions[t]&&!function(t){e.matchMedia(t,function(){this.$menu.addClass(this.opts.extensions[t])},function(){this.$menu.removeClass(this.opts.extensions[t])})}(t);this.trigger("initExtensions:after")},_initMenu:function(){this.trigger("initMenu:before");this.conf.clone&&(this.$orig=this.$menu,this.$menu=this.$orig.clone(),this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function(){e(this).attr("id",s.mm(e(this).attr("id")))})),this.opts.initMenu.call(this,this.$menu,this.$orig),this.$menu.attr("id",this.$menu.attr("id")||this.__getUniqueId()),this.$pnls=e('<div class="'+s.panels+'" />').append(this.$menu.children(this.conf.panelNodetype)).prependTo(this.$menu);var t=[s.menu];this.opts.slidingSubmenus||t.push(s.vertical),this.$menu.addClass(t.join(" ")).parent().addClass(s.wrapper),this.trigger("initMenu:after")},_initPanels:function(t){this.trigger("initPanels:before",t),t=t||this.$pnls.children(this.conf.panelNodetype);var n=e(),i=this,a=function(t){t.filter(this.conf.panelNodetype).each(function(){if($panel=i._initPanel(e(this)),$panel){i._initNavbar($panel),i._initListview($panel),n=n.add($panel);var t=$panel.children("."+s.listview).children("li").children(i.conf.panelNodeType).add($panel.children("."+i.conf.classNames.panel));t.length&&a.call(i,t)}})};a.call(this,t),this.opts.initPanels.call(this,n),this.trigger("initPanels:after",n)},_initPanel:function(e){this.trigger("initPanel:before",e);if(this.__refactorClass(e,this.conf.classNames.panel,"panel"),this.__refactorClass(e,this.conf.classNames.nopanel,"nopanel"),this.__refactorClass(e,this.conf.classNames.vertical,"vertical"),this.__refactorClass(e,this.conf.classNames.inset,"inset"),e.filter("."+s.inset).addClass(s.nopanel),e.hasClass(s.nopanel))return!1;if(e.hasClass(s.panel))return e;var t=e.hasClass(s.vertical)||!this.opts.slidingSubmenus;e.removeClass(s.vertical);var n=e.attr("id")||this.__getUniqueId();e.removeAttr("id"),e.is("ul, ol")&&(e.wrap("<div />"),e=e.parent()),e.addClass(s.panel+" "+s.hidden).attr("id",n);var i=e.parent("li");return t?e.add(i).addClass(s.vertical):e.appendTo(this.$pnls),i.length&&(i.data(a.child,e),e.data(a.parent,i)),this.trigger("initPanel:after",e),e},_initNavbar:function(t){if(this.trigger("initNavbar:before",t),!t.children("."+s.navbar).length){var i=t.data(a.parent),o=e('<div class="'+s.navbar+'" />'),r=e[n].i18n(this.opts.navbar.title),l=!1;if(i&&i.length){if(i.hasClass(s.vertical))return;if(i.parent().is("."+s.listview))var d=i.children("a, span").not("."+s.next);else var d=i.closest("."+s.panel).find('a[href="#'+t.attr("id")+'"]');d=d.first(),i=d.closest("."+s.panel);var c=i.attr("id");switch(r=d.text(),this.opts.navbar.titleLink){case"anchor":l=d.attr("href");break;case"parent":l="#"+c}o.append('<a class="'+s.btn+" "+s.prev+'" href="#'+c+'" />')}else if(!this.opts.navbar.title)return;this.opts.navbar.add&&t.addClass(s.hasnavbar),o.append('<a class="'+s.title+'"'+(l?' href="'+l+'"':"")+">"+r+"</a>").prependTo(t),this.trigger("initNavbar:after",t)}},_initListview:function(t){this.trigger("initListview:before",t);var n=this.__childAddBack(t,"ul, ol");this.__refactorClass(n,this.conf.classNames.nolistview,"nolistview"),n.filter("."+this.conf.classNames.inset).addClass(s.nolistview);var i=n.not("."+s.nolistview).addClass(s.listview).children();this.__refactorClass(i,this.conf.classNames.selected,"selected"),this.__refactorClass(i,this.conf.classNames.divider,"divider"),this.__refactorClass(i,this.conf.classNames.spacer,"spacer");var o=t.data(a.parent);if(o&&o.parent().is("."+s.listview)&&!o.children("."+s.next).length){var r=o.children("a, span").first(),l=e('<a class="'+s.next+'" href="#'+t.attr("id")+'" />').insertBefore(r);r.is("span")&&l.addClass(s.fullsubopen)}this.trigger("initListview:after",t)},_initOpened:function(){this.trigger("initOpened:before");var e=this.$pnls.find("."+s.listview).children("."+s.selected).removeClass(s.selected).last().addClass(s.selected),t=e.length?e.closest("."+s.panel):this.$pnls.children("."+s.panel).first();this.openPanel(t,!1),this.trigger("initOpened:after")},_initAnchors:function(){var t=this;r.$body.on(o.click+"-oncanvas","a[href]",function(i){var a=e(this),o=!1,r=t.$menu.find(a).length;for(var l in e[n].addons)if(e[n].addons[l].clickAnchor.call(t,a,r)){o=!0;break}var d=a.attr("href");if(!o&&r&&d.length>1&&"#"==d.slice(0,1))try{var c=e(d,t.$menu);c.is("."+s.panel)&&(o=!0,t[a.parent().hasClass(s.vertical)?"togglePanel":"openPanel"](c))}catch(h){}if(o&&i.preventDefault(),!o&&r&&a.is("."+s.listview+" > li > a")&&!a.is('[rel="external"]')&&!a.is('[target="_blank"]')){t.__valueOrFn(t.opts.onClick.setSelected,a)&&t.setSelected(e(i.target).parent());var f=t.__valueOrFn(t.opts.onClick.preventDefault,a,"#"==d.slice(0,1));f&&i.preventDefault(),t.__valueOrFn(t.opts.onClick.close,a,f)&&t.close()}})},_initMatchMedia:function(){var e=this;this._fireMatchMedia(),r.$wndw.on(o.resize,function(t){e._fireMatchMedia()})},_fireMatchMedia:function(){for(var e in this.mtch)for(var t=window.matchMedia&&window.matchMedia(e).matches?"yes":"no",n=0;n<this.mtch[e].length;n++)this.mtch[e][n][t].call(this)},_getOriginalMenuId:function(){var e=this.$menu.attr("id");return this.conf.clone&&e&&e.length&&(e=s.umm(e)),e},__api:function(){var t=this,n={};return e.each(this._api,function(e){var i=this;n[i]=function(){var e=t[i].apply(t,arguments);return"undefined"==typeof e?n:e}}),n},__valueOrFn:function(e,t,n){return"function"==typeof e?e.call(t[0]):"undefined"==typeof e&&"undefined"!=typeof n?n:e},__refactorClass:function(e,t,n){return e.filter("."+t).removeClass(t).addClass(s[n])},__findAddBack:function(e,t){return e.find(t).add(e.filter(t))},__childAddBack:function(e,t){return e.children(t).add(e.filter(t))},__filterListItems:function(e){return e.not("."+s.divider).not("."+s.hidden)},__filterListItemAnchors:function(e){return this.__filterListItems(e).children("a").not("."+s.next)},__transitionend:function(e,t,n){var i=!1,s=function(n){"undefined"!=typeof n&&n.target!=e[0]||(i||(e.unbind(o.transitionend),e.unbind(o.webkitTransitionEnd),t.call(e[0])),i=!0)};e.on(o.transitionend,s),e.on(o.webkitTransitionEnd,s),setTimeout(s,1.1*n)},__getUniqueId:function(){return s.mm(e[n].uniqueId++)}},e.fn[n]=function(i,s){t(),i=e.extend(!0,{},e[n].defaults,i),s=e.extend(!0,{},e[n].configuration,s);var a=e();return this.each(function(){var t=e(this);if(!t.data(n)){var o=new e[n](t,i,s);o.$menu.data(n,o.__api()),a=a.add(o.$menu)}}),a},e[n].i18n=function(){var t={};return function(n){switch(typeof n){case"object":return e.extend(t,n),t;case"string":return t[n]||n;case"undefined":default:return t}}}(),e[n].support={touch:"ontouchstart"in window||navigator.msMaxTouchPoints||!1,csstransitions:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransitions||Modernizr.csstransitions}(),csstransforms:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransforms||Modernizr.csstransforms}(),csstransforms3d:function(){return"undefined"==typeof Modernizr||"undefined"==typeof Modernizr.csstransforms3d||Modernizr.csstransforms3d}()};var s,a,o,r}}(jQuery),
function(e){var t="mmenu",n="offCanvas";e[t].addons[n]={setup:function(){if(this.opts[n]){var s=this,a=this.opts[n],r=this.conf[n];o=e[t].glbl,this._api=e.merge(this._api,["open","close","setPage"]),"object"!=typeof a&&(a={}),"top"!=a.position&&"bottom"!=a.position||(a.zposition="front"),a=this.opts[n]=e.extend(!0,{},e[t].defaults[n],a),"string"!=typeof r.pageSelector&&(r.pageSelector="> "+r.pageNodetype),o.$allMenus=(o.$allMenus||e()).add(this.$menu),this.vars.opened=!1;var l=[i.offcanvas];"left"!=a.position&&l.push(i.mm(a.position)),"back"!=a.zposition&&l.push(i.mm(a.zposition)),e[t].support.csstransforms||l.push(i["no-csstransforms"]),e[t].support.csstransforms3d||l.push(i["no-csstransforms3d"]),this.bind("initMenu:after",function(){this.setPage(o.$page),this._initBlocker(),this["_initWindow_"+n](),this.$menu.addClass(l.join(" ")).parent("."+i.wrapper).removeClass(i.wrapper),this.$menu[r.menuInsertMethod](r.menuInsertSelector);var e=window.location.hash;if(e){var t=this._getOriginalMenuId();t&&t==e.slice(1)&&this.open()}}),this.bind("initExtensions:after",function(){for(var e=[i.mm("widescreen"),i.mm("iconbar")],t=0;t<e.length;t++)for(var n in this.opts.extensions)if(this.opts.extensions[n].indexOf(e[t])>-1){!function(t,n){s.matchMedia(t,function(){o.$html.addClass(e[n])},function(){o.$html.removeClass(e[n])})}(n,t);break}}),this.bind("open:start:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!1)}),this.bind("close:finish:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!0)}),this.bind("initMenu:after:sr-aria",function(){this.__sr_aria(this.$menu,"hidden",!0)})}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("offcanvas slideout blocking modal background opening blocker page no-csstransforms3d"),s.add("style")},clickAnchor:function(e,t){var s=this;if(this.opts[n]){var a=this._getOriginalMenuId();if(a&&e.is('[href="#'+a+'"]')){if(t)return!0;var r=e.closest("."+i.menu);if(r.length){var l=r.data("mmenu");if(l&&l.close)return l.close(),s.__transitionend(r,function(){s.open()},s.conf.transitionDuration),!0}return this.open(),!0}if(o.$page)return a=o.$page.first().attr("id"),a&&e.is('[href="#'+a+'"]')?(this.close(),!0):void 0}}},e[t].defaults[n]={position:"left",zposition:"back",blockUI:!0,moveBackground:!0},e[t].configuration[n]={pageNodetype:"div",pageSelector:null,noPageSelector:[],wrapPageIfNeeded:!0,menuInsertMethod:"prependTo",menuInsertSelector:"body"},e[t].prototype.open=function(){if(this.trigger("open:before"),!this.vars.opened){var e=this;this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),this.trigger("open:after")}},e[t].prototype._openSetup=function(){var t=this,r=this.opts[n];this.closeAllOthers(),o.$page.each(function(){e(this).data(s.style,e(this).attr("style")||"")}),o.$wndw.trigger(a.resize+"-"+n,[!0]);var l=[i.opened];r.blockUI&&l.push(i.blocking),"modal"==r.blockUI&&l.push(i.modal),r.moveBackground&&l.push(i.background),"left"!=r.position&&l.push(i.mm(this.opts[n].position)),"back"!=r.zposition&&l.push(i.mm(this.opts[n].zposition)),o.$html.addClass(l.join(" ")),setTimeout(function(){t.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(i.opened)},e[t].prototype._openFinish=function(){var e=this;this.__transitionend(o.$page.first(),function(){e.trigger("open:finish")},this.conf.transitionDuration),this.trigger("open:start"),o.$html.addClass(i.opening)},e[t].prototype.close=function(){if(this.trigger("close:before"),this.vars.opened){var t=this;this.__transitionend(o.$page.first(),function(){t.$menu.removeClass(i.opened);var a=[i.opened,i.blocking,i.modal,i.background,i.mm(t.opts[n].position),i.mm(t.opts[n].zposition)];o.$html.removeClass(a.join(" ")),o.$page.each(function(){e(this).attr("style",e(this).data(s.style))}),t.vars.opened=!1,t.trigger("close:finish")},this.conf.transitionDuration),this.trigger("close:start"),o.$html.removeClass(i.opening),this.trigger("close:after")}},e[t].prototype.closeAllOthers=function(){o.$allMenus.not(this.$menu).each(function(){var n=e(this).data(t);n&&n.close&&n.close()})},e[t].prototype.setPage=function(t){this.trigger("setPage:before",t);var s=this,a=this.conf[n];t&&t.length||(t=o.$body.find(a.pageSelector),a.noPageSelector.length&&(t=t.not(a.noPageSelector.join(", "))),t.length>1&&a.wrapPageIfNeeded&&(t=t.wrapAll("<"+this.conf[n].pageNodetype+" />").parent())),t.each(function(){e(this).attr("id",e(this).attr("id")||s.__getUniqueId())}),t.addClass(i.page+" "+i.slideout),o.$page=t,this.trigger("setPage:after",t)},e[t].prototype["_initWindow_"+n]=function(){o.$wndw.off(a.keydown+"-"+n).on(a.keydown+"-"+n,function(e){if(o.$html.hasClass(i.opened)&&9==e.keyCode)return e.preventDefault(),!1});var e=0;o.$wndw.off(a.resize+"-"+n).on(a.resize+"-"+n,function(t,n){if(1==o.$page.length&&(n||o.$html.hasClass(i.opened))){var s=o.$wndw.height();(n||s!=e)&&(e=s,o.$page.css("minHeight",s))}})},e[t].prototype._initBlocker=function(){var t=this;this.opts[n].blockUI&&(o.$blck||(o.$blck=e('<div id="'+i.blocker+'" class="'+i.slideout+'" />')),o.$blck.appendTo(o.$body).off(a.touchstart+"-"+n+" "+a.touchmove+"-"+n).on(a.touchstart+"-"+n+" "+a.touchmove+"-"+n,function(e){e.preventDefault(),e.stopPropagation(),o.$blck.trigger(a.mousedown+"-"+n)}).off(a.mousedown+"-"+n).on(a.mousedown+"-"+n,function(e){e.preventDefault(),o.$html.hasClass(i.modal)||(t.closeAllOthers(),t.close())}))};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="scrollBugFix";e[t].addons[n]={setup:function(){var s=this.opts[n];this.conf[n];o=e[t].glbl,e[t].support.touch&&this.opts.offCanvas&&this.opts.offCanvas.blockUI&&("boolean"==typeof s&&(s={fix:s}),"object"!=typeof s&&(s={}),s=this.opts[n]=e.extend(!0,{},e[t].defaults[n],s),s.fix&&(this.bind("open:start",function(){this.$pnls.children("."+i.opened).scrollTop(0)}),this.bind("initMenu:after",function(){this["_initWindow_"+n]()})))},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e},clickAnchor:function(e,t){}},e[t].defaults[n]={fix:!0},e[t].prototype["_initWindow_"+n]=function(){o.$docu.off(a.touchmove+"-"+n).on(a.touchmove+"-"+n,function(e){o.$html.hasClass(i.opened)&&e.preventDefault()});var t=!1;o.$body.off(a.touchstart+"-"+n).on(a.touchstart+"-"+n,"."+i.panels+"> ."+i.opened,function(e){o.$html.hasClass(i.opened)&&(t||(t=!0,0===e.currentTarget.scrollTop?e.currentTarget.scrollTop=1:e.currentTarget.scrollHeight===e.currentTarget.scrollTop+e.currentTarget.offsetHeight&&(e.currentTarget.scrollTop-=1),t=!1))}).off(a.touchmove+"-"+n).on(a.touchmove+"-"+n,"."+i.panels+"> ."+i.opened,function(t){o.$html.hasClass(i.opened)&&e(this)[0].scrollHeight>e(this).innerHeight()&&t.stopPropagation()}),o.$wndw.off(a.orientationchange+"-"+n).on(a.orientationchange+"-"+n,function(){that.$pnls.children("."+i.opened).scrollTop(0).css({"-webkit-overflow-scrolling":"auto"}).css({"-webkit-overflow-scrolling":"touch"})})};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="screenReader";e[t].addons[n]={setup:function(){var s=this,a=this.opts[n],r=this.conf[n];o=e[t].glbl,"boolean"==typeof a&&(a={aria:a,text:a}),"object"!=typeof a&&(a={}),a=this.opts[n]=e.extend(!0,{},e[t].defaults[n],a),a.aria&&(this.bind("initAddons:after",function(){this.bind("initMenu:after",function(){this.trigger("initMenu:after:sr-aria")}),this.bind("initNavbar:after",function(){this.trigger("initNavbar:after:sr-aria",arguments[0])}),this.bind("openPanel:start",function(){this.trigger("openPanel:start:sr-aria",arguments[0])}),this.bind("close:start",function(){this.trigger("close:start:sr-aria")}),this.bind("close:finish",function(){this.trigger("close:finish:sr-aria")}),this.bind("open:start",function(){this.trigger("open:start:sr-aria")}),this.bind("open:finish",function(){this.trigger("open:finish:sr-aria")})}),this.bind("updateListview",function(){this.$pnls.find("."+i.listview).children().each(function(){s.__sr_aria(e(this),"hidden",e(this).is("."+i.hidden))})}),this.bind("openPanel:start",function(e){var t=this.$menu.find("."+i.panel).not(e).not(e.parents("."+i.panel)),n=e.add(e.find("."+i.vertical+"."+i.opened).children("."+i.panel));this.__sr_aria(t,"hidden",!0),this.__sr_aria(n,"hidden",!1)}),this.bind("closePanel",function(e){this.__sr_aria(e,"hidden",!0)}),this.bind("initPanels:after",function(t){var n=t.find("."+i.prev+", ."+i.next).each(function(){s.__sr_aria(e(this),"owns",e(this).attr("href").replace("#",""))});this.__sr_aria(n,"haspopup",!0)}),this.bind("initNavbar:after",function(e){var t=e.children("."+i.navbar);this.__sr_aria(t,"hidden",!e.hasClass(i.hasnavbar))}),a.text&&(this.bind("initlistview:after",function(e){var t=e.find("."+i.listview).find("."+i.fullsubopen).parent().children("span");this.__sr_aria(t,"hidden",!0)}),"parent"==this.opts.navbar.titleLink&&this.bind("initNavbar:after",function(e){var t=e.children("."+i.navbar),n=!!t.children("."+i.prev).length;this.__sr_aria(t.children("."+i.title),"hidden",n)}))),a.text&&(this.bind("initAddons:after",function(){this.bind("setPage:after",function(){this.trigger("setPage:after:sr-text",arguments[0])})}),this.bind("initNavbar:after",function(n){var s=n.children("."+i.navbar),a=s.children("."+i.title).text(),o=e[t].i18n(r.text.closeSubmenu);a&&(o+=" ("+a+")"),s.children("."+i.prev).html(this.__sr_text(o))}),this.bind("initlistview:after",function(n){n.find("."+i.listview).children("li").children("."+i.next).each(function(){var n=e(this),a=$prev.nextAll("span, a").first().text(),o=e[t].i18n(r.text[$prev.parent().is("."+i.vertical)?"toggleSubmenu":"openSubmenu"]);a&&(o+=" ("+a+")"),n.html(s.__sr_text(o))})}))},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("sronly")},clickAnchor:function(e,t){}},e[t].defaults[n]={aria:!0,text:!0},e[t].configuration[n]={text:{closeMenu:"Close menu",closeSubmenu:"Close submenu",openSubmenu:"Open submenu",toggleSubmenu:"Toggle submenu"}},e[t].prototype.__sr_aria=function(e,t,n){e.prop("aria-"+t,n)[n?"attr":"removeAttr"]("aria-"+t,n)},e[t].prototype.__sr_text=function(e){return'<span class="'+i.sronly+'">'+e+"</span>"};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="autoHeight";e[t].addons[n]={setup:function(){var s=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof s&&s&&(s={height:"auto"}),"string"==typeof s&&(s={height:s}),"object"!=typeof s&&(s={}),s=this.opts[n]=e.extend(!0,{},e[t].defaults[n],s),"auto"==s.height||"highest"==s.height){this.bind("initMenu:after",function(){this.$menu.addClass(i.autoheight)});var a=function(t){if(!this.opts.offCanvas||this.vars.opened){var n=Math.max(parseInt(this.$pnls.css("top"),10),0)||0,a=Math.max(parseInt(this.$pnls.css("bottom"),10),0)||0,o=0;this.$menu.addClass(i.measureheight),"auto"==s.height?(t=t||this.$pnls.children("."+i.opened),t.is("."+i.vertical)&&(t=t.parents("."+i.panel).not("."+i.vertical).first()),o=t.outerHeight()):"highest"==s.height&&this.$pnls.children().each(function(){var t=e(this);t.is("."+i.vertical)&&(t=t.parents("."+i.panel).not("."+i.vertical).first()),o=Math.max(o,t.outerHeight())}),this.$menu.height(o+n+a).removeClass(i.measureheight)}};this.opts.offCanvas&&this.bind("open:start",a),"highest"==s.height&&this.bind("initPanels:after",a),"auto"==s.height&&(this.bind("updateListview",a),this.bind("openPanel:start",a),this.bind("closePanel:finish",a))}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("autoheight measureheight"),a.add("resize")},clickAnchor:function(e,t){}},e[t].defaults[n]={height:"default"};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="backButton";e[t].addons[n]={setup:function(){if(this.opts.offCanvas){var s=this,a=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof a&&(a={close:a}),"object"!=typeof a&&(a={}),a=e.extend(!0,{},e[t].defaults[n],a),a.close){var r="#"+s.$menu.attr("id");this.bind("open:finish",function(e){location.hash!=r&&history.pushState(null,document.title,r)}),e(window).on("popstate",function(e){o.$html.hasClass(i.opened)?(e.stopPropagation(),s.close()):location.hash==r&&(e.stopPropagation(),s.open())})}}},add:function(){return window.history&&window.history.pushState?(i=e[t]._c,s=e[t]._d,void(a=e[t]._e)):void(e[t].addons[n].setup=function(){})},clickAnchor:function(e,t){}},e[t].defaults[n]={close:!1};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="columns";e[t].addons[n]={setup:function(){var s=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof s&&(s={add:s}),"number"==typeof s&&(s={add:!0,visible:s}),"object"!=typeof s&&(s={}),"number"==typeof s.visible&&(s.visible={min:s.visible,max:s.visible}),s=this.opts[n]=e.extend(!0,{},e[t].defaults[n],s),s.add){s.visible.min=Math.max(1,Math.min(6,s.visible.min)),s.visible.max=Math.max(s.visible.min,Math.min(6,s.visible.max));for(var a=this.opts.offCanvas?this.$menu.add(o.$html):this.$menu,r=[],l=0;l<=s.visible.max;l++)r.push(i.columns+"-"+l);r=r.join(" ");var d=function(e){var t=this.$pnls.children("."+i.subopened).length;e&&!e.hasClass(i.subopened)&&t++,t=Math.min(s.visible.max,Math.max(s.visible.min,t)),a.removeClass(r).addClass(i.columns+"-"+t)},c=function(){a.removeClass(r)},h=function(t){this.$pnls.children("."+i.panel).removeClass(r).filter("."+i.subopened).add(t).slice(-s.visible.max).each(function(t){e(this).addClass(i.columns+"-"+t)})};this.bind("initMenu:after",function(){this.$menu.addClass(i.columns)}),this.bind("initPanels:after",function(e){h.call(this,this.$pnls.children("."+i.opened))}),this.bind("open:start",d),this.bind("openPanel:start",d),this.bind("openPanel:start",h),this.bind("close:finish",c),this.opts.offCanvas||openMenu.call(this)}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("columns")},clickAnchor:function(t,s){if(!this.opts[n].add)return!1;if(s){var a=t.attr("href");if(a.length>1&&"#"==a.slice(0,1))try{var o=e(a,this.$menu);if(o.is("."+i.panel))for(var r=parseInt(t.closest("."+i.panel).attr("class").split(i.columns+"-")[1].split(" ")[0],10)+1;r!==!1;){var l=this.$pnls.children("."+i.columns+"-"+r);if(!l.length){r=!1;break}r++,l.removeClass(i.subopened).removeClass(i.opened).removeClass(i.highest).addClass(i.hidden)}}catch(d){}}}},e[t].defaults[n]={add:!1,visible:{min:1,max:3}};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="dividers";e[t].addons[n]={setup:function(){var s=this,r=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof r&&(r={add:r,fixed:r}),"object"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),this.bind("initListview:after",function(e){this.__refactorClass(e.find("li"),this.conf.classNames[n].collapsed,"collapsed")}),r.add&&this.bind("initListview:after",function(t){var n;switch(r.addTo){case"panels":n=t;break;default:n=t.filter(r.addTo)}n.length&&n.find("."+i.listview).find("."+i.divider).remove().end().each(function(){var t="";s.__filterListItems(e(this).children()).each(function(){var n=e.trim(e(this).children("a, span").text()).slice(0,1).toLowerCase();n!=t&&n.length&&(t=n,e('<li class="'+i.divider+'">'+n+"</li>").insertBefore(this))})})}),r.collapse&&this.bind("initListview:after",function(t){t.find("."+i.divider).each(function(){var t=e(this),n=t.nextUntil("."+i.divider,"."+i.collapsed);n.length&&(t.children("."+i.next).length||(t.wrapInner("<span />"),t.prepend('<a href="#" class="'+i.next+" "+i.fullsubopen+'" />')))})}),r.fixed){this.bind("initPanels:after",function(){"undefined"==typeof this.$fixeddivider&&(this.$fixeddivider=e('<ul class="'+i.listview+" "+i.fixeddivider+'"><li class="'+i.divider+'"></li></ul>').prependTo(this.$pnls).children())});var l=function(t){if(t=t||this.$pnls.children("."+i.opened),!t.is(":hidden")){var n=t.children("."+i.listview).children("."+i.divider).not("."+i.hidden),s=t.scrollTop()||0,a="";n.each(function(){e(this).position().top+s<s+1&&(a=e(this).text())}),this.$fixeddivider.text(a),this.$pnls[a.length?"addClass":"removeClass"](i.hasdividers)}};this.bind("open:start",l),this.bind("openPanel:start",l),this.bind("updateListview",l),this.bind("initPanel:after",function(e){e.off(a.scroll+"-"+n+" "+a.touchmove+"-"+n).on(a.scroll+"-"+n+" "+a.touchmove+"-"+n,function(t){l.call(s,e)})})}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("collapsed uncollapsed fixeddivider hasdividers"),a.add("scroll")},clickAnchor:function(e,t){if(this.opts[n].collapse&&t){var s=e.parent();if(s.is("."+i.divider)){var a=s.nextUntil("."+i.divider,"."+i.collapsed);return s.toggleClass(i.opened),a[s.hasClass(i.opened)?"addClass":"removeClass"](i.uncollapsed),!0}}return!1}},e[t].defaults[n]={add:!1,addTo:"panels",fixed:!1,collapse:!1},e[t].configuration.classNames[n]={collapsed:"Collapsed"};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="counters";e[t].addons[n]={setup:function(){var a=this,r=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof r&&(r={add:r,update:r}),"object"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),this.bind("initListview:after",function(t){this.__refactorClass(e("em",t),this.conf.classNames[n].counter,"counter")}),r.add&&this.bind("initListview:after",function(t){var n;switch(r.addTo){case"panels":n=t;break;default:n=t.filter(r.addTo)}n.each(function(){var t=e(this).data(s.parent);t&&(t.children("em."+i.counter).length||t.prepend(e('<em class="'+i.counter+'" />')))})}),r.update){var l=function(t){t=t||this.$pnls.children("."+i.panel),t.each(function(){var t=e(this),n=t.data(s.parent);if(n){var o=n.children("em."+i.counter);o.length&&(t=t.children("."+i.listview),t.length&&o.html(a.__filterListItems(t.children()).length))}})};this.bind("initListview:after",l),this.bind("updateListview",l)}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("counter search noresultsmsg")},clickAnchor:function(e,t){}},e[t].defaults[n]={add:!1,addTo:"panels",count:!1},e[t].configuration.classNames[n]={counter:"Counter"};var i,s,a,o}(jQuery),
function(e){function t(e,t,n){return e<t&&(e=t),e>n&&(e=n),e}function n(n,i,s){var r,l,d,c,h,f=this,u={},p=0,v=!1,m=!1,b=0,g=0;switch(this.opts.offCanvas.position){case"left":case"right":u.events="panleft panright",u.typeLower="x",u.typeUpper="X",m="width";break;case"top":case"bottom":u.events="panup pandown",u.typeLower="y",u.typeUpper="Y",m="height"}switch(this.opts.offCanvas.position){case"right":case"bottom":u.negative=!0,c=function(e){e>=s.$wndw[m]()-n.maxStartPos&&(p=1)};break;default:u.negative=!1,c=function(e){e<=n.maxStartPos&&(p=1)}}switch(this.opts.offCanvas.position){case"left":u.open_dir="right",u.close_dir="left";break;case"right":u.open_dir="left",u.close_dir="right";break;case"top":u.open_dir="down",u.close_dir="up";break;case"bottom":u.open_dir="up",u.close_dir="down"}switch(this.opts.offCanvas.zposition){case"front":h=function(){return this.$menu};break;default:h=function(){return e("."+o.slideout)}}var _=this.__valueOrFn(n.node,this.$menu,s.$page);"string"==typeof _&&(_=e(_));var C=new Hammer(_[0],this.opts[a].vendors.hammer);C.on("panstart",function(e){c(e.center[u.typeLower]),s.$slideOutNodes=h(),v=u.open_dir}).on(u.events+" panend",function(e){p>0&&e.preventDefault()}).on(u.events,function(e){if(r=e["delta"+u.typeUpper],u.negative&&(r=-r),r!=b&&(v=r>=b?u.open_dir:u.close_dir),b=r,b>n.threshold&&1==p){if(s.$html.hasClass(o.opened))return;p=2,f._openSetup(),f.trigger("open:start"),s.$html.addClass(o.dragging),g=t(s.$wndw[m]()*i[m].perc,i[m].min,i[m].max)}2==p&&(l=t(b,10,g)-("front"==f.opts.offCanvas.zposition?g:0),u.negative&&(l=-l),d="translate"+u.typeUpper+"("+l+"px)",s.$slideOutNodes.css({"-webkit-transform":"-webkit-"+d,transform:d}))}).on("panend",function(e){2==p&&(s.$html.removeClass(o.dragging),s.$slideOutNodes.css("transform",""),f[v==u.open_dir?"_openFinish":"close"]()),p=0})}function i(e,t,n,i){var s=this,l=e.data(r.parent);if(l){l=l.closest("."+o.panel);var d=new Hammer(e[0],s.opts[a].vendors.hammer),c=null;d.on("panright",function(e){c||(s.openPanel(l),c=setTimeout(function(){clearTimeout(c),c=null},s.conf.openingInterval+s.conf.transitionDuration))})}}var s="mmenu",a="drag";e[s].addons[a]={setup:function(){if(this.opts.offCanvas){var t=this.opts[a],o=this.conf[a];d=e[s].glbl,"boolean"==typeof t&&(t={menu:t,panels:t}),"object"!=typeof t&&(t={}),"boolean"==typeof t.menu&&(t.menu={open:t.menu}),"object"!=typeof t.menu&&(t.menu={}),"boolean"==typeof t.panels&&(t.panels={close:t.panels}),"object"!=typeof t.panels&&(t.panels={}),t=this.opts[a]=e.extend(!0,{},e[s].defaults[a],t),t.menu.open&&this.bind("setPage:after",function(){n.call(this,t.menu,o.menu,d)}),t.panels.close&&this.bind("initPanel:after",function(e){i.call(this,e,t.panels,o.panels,d)})}},add:function(){return"function"!=typeof Hammer||Hammer.VERSION<2?(e[s].addons[a].add=function(){},void(e[s].addons[a].setup=function(){})):(o=e[s]._c,r=e[s]._d,l=e[s]._e,void o.add("dragging"))},clickAnchor:function(e,t){}},e[s].defaults[a]={menu:{open:!1,maxStartPos:100,threshold:50},panels:{close:!1},vendors:{hammer:{}}},e[s].configuration[a]={menu:{width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}},panels:{}};var o,r,l,d}(jQuery),
function(e){var t="mmenu",n="dropdown";e[t].addons[n]={setup:function(){if(this.opts.offCanvas){var r=this,l=this.opts[n],d=this.conf[n];if(o=e[t].glbl,"boolean"==typeof l&&l&&(l={drop:l}),"object"!=typeof l&&(l={}),"string"==typeof l.position&&(l.position={of:l.position}),l=this.opts[n]=e.extend(!0,{},e[t].defaults[n],l),l.drop){var c;this.bind("initMenu:after",function(){if(this.$menu.addClass(i.dropdown),l.tip&&this.$menu.addClass(i.tip),"string"!=typeof l.position.of){var t=this._getOriginalMenuId();t&&t.length&&(l.position.of='[href="#'+t+'"]')}"string"==typeof l.position.of&&(c=e(l.position.of),l.event=l.event.split(" "),1==l.event.length&&(l.event[1]=l.event[0]),"hover"==l.event[0]&&c.on(a.mouseenter+"-"+n,function(){r.open()}),"hover"==l.event[1]&&this.$menu.on(a.mouseleave+"-"+n,function(){r.close()}))}),this.bind("open:start",function(){this.$menu.data(s.style,this.$menu.attr("style")||""),o.$html.addClass(i.dropdown)}),this.bind("close:finish",function(){this.$menu.attr("style",this.$menu.data(s.style)),o.$html.removeClass(i.dropdown)});var h=function(e,t){var n=t[0],s=t[1],a="x"==e?"scrollLeft":"scrollTop",r="x"==e?"outerWidth":"outerHeight",h="x"==e?"left":"top",f="x"==e?"right":"bottom",u="x"==e?"width":"height",p="x"==e?"maxWidth":"maxHeight",v=null,m=o.$wndw[a](),b=c.offset()[h]-=m,g=b+c[r](),_=o.$wndw[u](),C=d.offset.button[e]+d.offset.viewport[e];if(l.position[e])switch(l.position[e]){case"left":case"bottom":v="after";break;case"right":case"top":v="before"}null===v&&(v=b+(g-b)/2<_/2?"after":"before");var y,w;return"after"==v?(y="x"==e?b:g,w=_-(y+C),n[h]=y+d.offset.button[e],n[f]="auto",s.push(i["x"==e?"tipleft":"tiptop"])):(y="x"==e?g:b,w=y-C,n[f]="calc(100% - "+(y-d.offset.button[e])+"px)",n[h]="auto",s.push(i["x"==e?"tipright":"tipbottom"])),n[p]=Math.min(d[u].max,w),[n,s]},f=function(e){if(this.vars.opened){this.$menu.attr("style",this.$menu.data(s.style));var t=[{},[]];t=h.call(this,"y",t),t=h.call(this,"x",t),this.$menu.css(t[0]),l.tip&&this.$menu.removeClass(i.tipleft+" "+i.tipright+" "+i.tiptop+" "+i.tipbottom).addClass(t[1].join(" "))}};this.bind("open:start",f),o.$wndw.on(a.resize+"-"+n,function(e){f.call(r)}),this.opts.offCanvas.blockUI||o.$wndw.on(a.scroll+"-"+n,function(e){f.call(r)})}}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("dropdown tip tipleft tipright tiptop tipbottom"),a.add("mouseenter mouseleave resize scroll")},clickAnchor:function(e,t){}},e[t].defaults[n]={drop:!1,event:"click",position:{},tip:!0},e[t].configuration[n]={offset:{button:{x:-10,y:10},viewport:{x:20,y:20}},height:{max:880},width:{max:440}};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="fixedElements";e[t].addons[n]={setup:function(){if(this.opts.offCanvas){var i=this.opts[n],s=this.conf[n];o=e[t].glbl,i=this.opts[n]=e.extend(!0,{},e[t].defaults[n],i);var a=function(e){var t=this.conf.classNames[n].fixed;this.__refactorClass(e.find("."+t),t,"slideout")[s.elemInsertMethod](s.elemInsertSelector)};this.bind("setPage:after",a)}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("fixed")},clickAnchor:function(e,t){}},e[t].configuration[n]={elemInsertMethod:"appendTo",elemInsertSelector:"body"},e[t].configuration.classNames[n]={fixed:"Fixed"};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="iconPanels";e[t].addons[n]={setup:function(){var s=this,a=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof a&&(a={add:a}),"number"==typeof a&&(a={add:!0,visible:a}),"object"!=typeof a&&(a={}),a=this.opts[n]=e.extend(!0,{},e[t].defaults[n],a),a.visible++,a.add){for(var r=[],l=0;l<=a.visible;l++)r.push(i.iconpanel+"-"+l);r=r.join(" ");var d=function(t){t.hasClass(i.vertical)||s.$pnls.children("."+i.panel).removeClass(r).filter("."+i.subopened).removeClass(i.hidden).add(t).not("."+i.vertical).slice(-a.visible).each(function(t){e(this).addClass(i.iconpanel+"-"+t)})};this.bind("initMenu:after",function(){this.$menu.addClass(i.iconpanel)}),this.bind("openPanel:start",d),this.bind("initPanels:after",function(e){d.call(s,s.$pnls.children("."+i.opened))}),this.bind("initListview:after",function(e){e.hasClass(i.vertical)||e.children("."+i.subblocker).length||e.prepend('<a href="#'+e.closest("."+i.panel).attr("id")+'" class="'+i.subblocker+'" />')})}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("iconpanel subblocker")},clickAnchor:function(e,t){}},e[t].defaults[n]={add:!1,visible:3};var i,s,a,o}(jQuery),
function(e){function t(t,n){t=t||this.$pnls.children("."+a.opened);var i=e(),s=this.$menu.children("."+a.mm("navbars-top")+", ."+a.mm("navbars-bottom")).children("."+a.navbar);s.find(d).filter(":focus").length||("default"==n&&(i=t.children("."+a.listview).find("a[href]").not("."+a.hidden),i.length||(i=t.find(d).not("."+a.hidden)),i.length||(i=s.find(d).not("."+a.hidden))),i.length||(i=this.$menu.children("."+a.tabstart)),i.first().focus())}function n(e){e||(e=this.$pnls.children("."+a.opened));var t=this.$pnls.children("."+a.panel),n=t.not(e);n.find(d).attr("tabindex",-1),e.find(d).attr("tabindex",0),e.find("."+a.mm("toggle")+", ."+a.mm("check")).attr("tabindex",-1),e.children("."+a.navbar).children("."+a.title).attr("tabindex",-1)}var i="mmenu",s="keyboardNavigation";e[i].addons[s]={setup:function(){var o=this.opts[s];this.conf[s];if(l=e[i].glbl,"boolean"!=typeof o&&"string"!=typeof o||(o={enable:o}),"object"!=typeof o&&(o={}),o=this.opts[s]=e.extend(!0,{},e[i].defaults[s],o),o.enable){var r=e('<button class="'+a.tabstart+'" tabindex="0" type="button" />'),d=e('<button class="'+a.tabend+'" tabindex="0" type="button" />');this.bind("initMenu:after",function(){o.enhance&&this.$menu.addClass(a.keyboardfocus),this["_initWindow_"+s](o.enhance)}),this.bind("initOpened:before",function(){this.$menu.prepend(r).append(d).children("."+a.mm("navbars-top")+", ."+a.mm("navbars-bottom")).children("."+a.navbar).children("a."+a.title).attr("tabindex",-1)}),this.bind("open:start",function(){n.call(this)}),this.bind("open:finish",function(){t.call(this,null,o.enable)}),this.bind("openPanel:start",function(e){n.call(this,e)}),this.bind("openPanel:finish",function(e){t.call(this,e,o.enable)}),this.bind("initOpened:after",function(){this.__sr_aria(this.$menu.children("."+a.mm("tabstart")+", ."+a.mm("tabend")),"hidden",!0)})}},add:function(){a=e[i]._c,o=e[i]._d,r=e[i]._e,a.add("tabstart tabend keyboardfocus"),r.add("focusin keydown")},clickAnchor:function(e,t){}},e[i].defaults[s]={enable:!1,enhance:!1},e[i].configuration[s]={},e[i].prototype["_initWindow_"+s]=function(t){l.$wndw.off(r.keydown+"-offCanvas"),l.$wndw.off(r.focusin+"-"+s).on(r.focusin+"-"+s,function(t){if(l.$html.hasClass(a.opened)){var n=e(t.target);n.is("."+a.tabend)&&n.parent().find("."+a.tabstart).focus()}}),l.$wndw.off(r.keydown+"-"+s).on(r.keydown+"-"+s,function(t){var n=e(t.target),i=n.closest("."+a.menu);if(i.length){i.data("mmenu");if(n.is("input, textarea"));else switch(t.keyCode){case 13:(n.is(".mm-toggle")||n.is(".mm-check"))&&n.trigger(r.click);break;case 32:case 37:case 38:case 39:case 40:t.preventDefault()}}}),t&&l.$wndw.off(r.keydown+"-"+s).on(r.keydown+"-"+s,function(t){var n=e(t.target),i=n.closest("."+a.menu);if(i.length){var s=i.data("mmenu");if(n.is("input, textarea"))switch(t.keyCode){case 27:n.val("")}else switch(t.keyCode){case 8:var r=n.closest("."+a.panel).data(o.parent);r&&r.length&&s.openPanel(r.closest("."+a.panel));break;case 27:i.hasClass(a.offcanvas)&&s.close()}}})};var a,o,r,l,d="input, select, textarea, button, label, a[href]"}(jQuery),
function(e){var t="mmenu",n="lazySubmenus";e[t].addons[n]={setup:function(){var s=this.opts[n];this.conf[n];o=e[t].glbl,"boolean"==typeof s&&(s={load:s}),"object"!=typeof s&&(s={}),s=this.opts[n]=e.extend(!0,{},e[t].defaults[n],s),s.load&&(this.bind("initMenu:after",function(){this.$pnls.find("li").children(this.conf.panelNodetype).not("."+i.inset).not("."+i.nolistview).not("."+i.nopanel).addClass(i.lazysubmenu+" "+i.nolistview+" "+i.nopanel)}),this.bind("initPanels:before",function(e){e=e||this.$pnls.children(this.conf.panelNodetype),this.__findAddBack(e,"."+i.lazysubmenu).not("."+i.lazysubmenu+" ."+i.lazysubmenu).removeClass(i.lazysubmenu+" "+i.nolistview+" "+i.nopanel)}),this.bind("initOpened:before",function(){var e=this.$pnls.find("."+this.conf.classNames.selected).closest("."+i.lazysubmenu);e.length&&this.initPanels(e)}),this.bind("openPanel:before",function(e){$panels=this.__findAddBack(e,"."+i.lazysubmenu).not("."+i.lazysubmenu+" ."+i.lazysubmenu),$panels.length&&this.initPanels($panels)}))},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("lazysubmenu"),s.add("lazysubmenu")},clickAnchor:function(e,t){}},e[t].defaults[n]={load:!1},e[t].configuration[n]={};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="navbars";e[t].addons[n]={setup:function(){var s=this,a=this.opts[n],r=this.conf[n];if(o=e[t].glbl,"undefined"!=typeof a){a instanceof Array||(a=[a]);var l={},d={};a.length&&(e.each(a,function(o){var c=a[o];"boolean"==typeof c&&c&&(c={}),"object"!=typeof c&&(c={}),"undefined"==typeof c.content&&(c.content=["prev","title"]),c.content instanceof Array||(c.content=[c.content]),c=e.extend(!0,{},s.opts.navbar,c);var h=e('<div class="'+i.navbar+'" />'),f=c.height;"number"!=typeof f&&(f=1),f=Math.min(4,Math.max(1,f)),h.addClass(i.navbar+"-size-"+f);var u=c.position;"bottom"!=u&&(u="top"),l[u]||(l[u]=0),l[u]+=f,d[u]||(d[u]=e('<div class="'+i.navbars+"-"+u+'" />')),d[u].append(h);for(var p=0,v=0,m=c.content.length;v<m;v++){var b=e[t].addons[n][c.content[v]]||!1;b?p+=b.call(s,h,c,r):(b=c.content[v],b instanceof e||(b=e(c.content[v])),h.append(b))}p+=Math.ceil(h.children().not("."+i.btn).length/f),p>1&&h.addClass(i.navbar+"-content-"+p),h.children("."+i.btn).length&&h.addClass(i.hasbtns)}),this.bind("initMenu:after",function(){for(var e in l)this.$menu.addClass(i.hasnavbar+"-"+e+"-"+l[e]),this.$menu["bottom"==e?"append":"prepend"](d[e])}))}},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("navbars close hasbtns")},clickAnchor:function(e,t){}},e[t].configuration[n]={breadcrumbSeparator:"/"},e[t].configuration.classNames[n]={};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="navbars",i="breadcrumbs";e[t].addons[n][i]=function(n,i,s){var a=this,o=e[t]._c,r=e[t]._d;o.add("breadcrumbs separator");var l=e('<span class="'+o.breadcrumbs+'" />').appendTo(n);return this.bind("initNavbar:after",function(t){t.removeClass(o.hasnavbar);for(var n=[],i=e('<span class="'+o.breadcrumbs+'"></span>'),a=t,l=!0;a&&a.length;){if(a.is("."+o.panel)||(a=a.closest("."+o.panel)),!a.hasClass(o.vertical)){var d=a.children("."+o.navbar).children("."+o.title).text();n.unshift(l?"<span>"+d+"</span>":'<a href="#'+a.attr("id")+'">'+d+"</a>"),l=!1}a=a.data(r.parent)}i.append(n.join('<span class="'+o.separator+'">'+s.breadcrumbSeparator+"</span>")).appendTo(t.children("."+o.navbar))}),this.bind("openPanel:start",function(e){l.html(e.children("."+o.navbar).children("."+o.breadcrumbs).html()||"")}),this.bind("initNavbar:after:sr-aria",function(t){t.children("."+o.navbar).children("."+o.breadcrumbs).children("a").each(function(){a.__sr_aria(e(this),"owns",e(this).attr("href").slice(1))})}),0}}(jQuery),
function(e){var t="mmenu",n="navbars",i="close";e[t].addons[n][i]=function(n,i){var s=e[t]._c,a=(e[t].glbl,e('<a class="'+s.close+" "+s.btn+'" href="#" />').appendTo(n));return this.bind("setPage:after",function(e){a.attr("href","#"+e.attr("id"))}),this.bind("setPage:after:sr-text",function(n){a.html(this.__sr_text(e[t].i18n(this.conf.screenReader.text.closeMenu))),this.__sr_aria(a,"owns",a.attr("href").slice(1))}),-1}}(jQuery),
function(e){var t="mmenu",n="navbars",i="next";e[t].addons[n][i]=function(i,s){var a,o,r,l=e[t]._c,d=e('<a class="'+l.next+" "+l.btn+'" href="#" />').appendTo(i);return this.bind("openPanel:start",function(e){a=e.find("."+this.conf.classNames[n].panelNext),o=a.attr("href"),r=a.html(),d[o?"attr":"removeAttr"]("href",o),d[o||r?"removeClass":"addClass"](l.hidden),d.html(r)}),this.bind("openPanel:start:sr-aria",function(e){this.__sr_aria(d,"hidden",d.hasClass(l.hidden)),this.__sr_aria(d,"owns",(d.attr("href")||"").slice(1))}),-1},e[t].configuration.classNames[n].panelNext="Next"}(jQuery),
function(e){var t="mmenu",n="navbars",i="prev";e[t].addons[n][i]=function(i,s){var a=e[t]._c,o=e('<a class="'+a.prev+" "+a.btn+'" href="#" />').appendTo(i);this.bind("initNavbar:after",function(e){e.removeClass(a.hasnavbar)});var r,l,d;return this.bind("openPanel:start",function(e){e.hasClass(a.vertical)||(r=e.find("."+this.conf.classNames[n].panelPrev),r.length||(r=e.children("."+a.navbar).children("."+a.prev)),l=r.attr("href"),d=r.html(),o[l?"attr":"removeAttr"]("href",l),o[l||d?"removeClass":"addClass"](a.hidden),o.html(d))}),this.bind("initNavbar:after:sr-aria",function(e){var t=e.children("."+a.navbar);this.__sr_aria(t,"hidden",!0)}),this.bind("openPanel:start:sr-aria",function(e){this.__sr_aria(o,"hidden",o.hasClass(a.hidden)),this.__sr_aria(o,"owns",(o.attr("href")||"").slice(1))}),-1},e[t].configuration.classNames[n].panelPrev="Prev"}(jQuery),
function(e){var t="mmenu",n="navbars",i="searchfield";e[t].addons[n][i]=function(n,i){var s=e[t]._c,a=e('<div class="'+s.search+'" />').appendTo(n);return"object"!=typeof this.opts.searchfield&&(this.opts.searchfield={}),this.opts.searchfield.add=!0,this.opts.searchfield.addTo=a,0}}(jQuery),
function(e){var t="mmenu",n="navbars",i="title";e[t].addons[n][i]=function(i,s){var a,o,r,l=e[t]._c,d=e('<a class="'+l.title+'" />').appendTo(i);this.bind("openPanel:start",function(e){e.hasClass(l.vertical)||(r=e.find("."+this.conf.classNames[n].panelTitle),r.length||(r=e.children("."+l.navbar).children("."+l.title)),a=r.attr("href"),o=r.html()||s.title,d[a?"attr":"removeAttr"]("href",a),d[a||o?"removeClass":"addClass"](l.hidden),d.html(o))});var c;return this.bind("openPanel:start:sr-aria",function(e){if(this.opts.screenReader.text&&(c||(c=this.$menu.children("."+l.navbars+"-top, ."+l.navbars+"-bottom").children("."+l.navbar).children("."+l.prev)),c.length)){var t=!0;"parent"==this.opts.navbar.titleLink&&(t=!c.hasClass(l.hidden)),this.__sr_aria(d,"hidden",t)}}),0},e[t].configuration.classNames[n].panelTitle="Title"}(jQuery),
function(e){function t(e){d&&d.length&&d.is(":visible")&&l.$html.add(l.$body).animate({scrollTop:d.offset().top+e}),d=!1}function n(e){try{return!("#"==e||"#"!=e.slice(0,1)||!l.$page.find(e).length)}catch(t){return!1}}var i="mmenu",s="pageScroll";e[i].addons[s]={setup:function(){var o=this,d=this.opts[s],c=this.conf[s];if(l=e[i].glbl,"boolean"==typeof d&&(d={scroll:d}),d=this.opts[s]=e.extend(!0,{},e[i].defaults[s],d),d.scroll&&this.bind("close:finish",function(){t(c.scrollOffset)}),d.update){var o=this,h=[],f=[];o.bind("initListview:after",function(t){o.__filterListItemAnchors(t.find("."+a.listview).children("li")).each(function(){var t=e(this).attr("href");n(t)&&h.push(t)}),f=h.reverse()});var u=-1;l.$wndw.on(r.scroll+"-"+s,function(t){for(var n=l.$wndw.scrollTop(),i=0;i<f.length;i++)if(e(f[i]).offset().top<n+c.updateOffset){u!==i&&(u=i,o.setSelected(o.__filterListItemAnchors(o.$pnls.children("."+a.opened).find("."+a.listview).children("li")).filter('[href="'+f[i]+'"]').parent()));break}})}},add:function(){a=e[i]._c,o=e[i]._d,r=e[i]._e},clickAnchor:function(i,o){if(d=!1,o&&this.opts[s].scroll&&this.opts.offCanvas&&l.$page&&l.$page.length){var r=i.attr("href");n(r)&&(d=e(r),l.$html.hasClass(a.mm("widescreen"))&&t(this.conf[s].scrollOffset))}}},e[i].defaults[s]={scroll:!1,update:!1},e[i].configuration[s]={scrollOffset:0,updateOffset:50};var a,o,r,l,d=!1}(jQuery),
function(e){var t="mmenu",n="rtl";e[t].addons[n]={setup:function(){var s=this.opts[n];this.conf[n];o=e[t].glbl,"object"!=typeof s&&(s={use:s}),s=this.opts[n]=e.extend(!0,{},e[t].defaults[n],s),"boolean"!=typeof s.use&&(s.use="rtl"==(o.$html.attr("dir")||"").toLowerCase()),s.use&&this.bind("initMenu:after",function(){this.$menu.addClass(i.rtl)})},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("rtl")},clickAnchor:function(e,t){}},e[t].defaults[n]={use:"detect"};var i,s,a,o}(jQuery),
function(e){function t(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var n="mmenu",i="searchfield";e[n].addons[i]={setup:function(){var l=this,d=this.opts[i],c=this.conf[i];r=e[n].glbl,"boolean"==typeof d&&(d={add:d}),"object"!=typeof d&&(d={}),"boolean"==typeof d.resultsPanel&&(d.resultsPanel={add:d.resultsPanel}),d=this.opts[i]=e.extend(!0,{},e[n].defaults[i],d),c=this.conf[i]=e.extend(!0,{},e[n].configuration[i],c),this.bind("close:start",function(){this.$menu.find("."+s.search).find("input").blur()}),this.bind("initPanels:after",function(r){if(d.add){var h;switch(d.addTo){case"panels":h=r;break;default:h=this.$menu.find(d.addTo)}if(h.each(function(){var t=e(this);if(!t.is("."+s.panel)||!t.is("."+s.vertical)){if(!t.children("."+s.search).length){var i=l.__valueOrFn(c.clear,t),a=l.__valueOrFn(c.form,t),r=l.__valueOrFn(c.input,t),h=l.__valueOrFn(c.submit,t),f=e("<"+(a?"form":"div")+' class="'+s.search+'" />'),u=e('<input placeholder="'+e[n].i18n(d.placeholder)+'" type="text" autocomplete="off" />');f.append(u);var p;if(r)for(p in r)u.attr(p,r[p]);if(i&&e('<a class="'+s.btn+" "+s.clear+'" href="#" />').appendTo(f).on(o.click+"-searchfield",function(e){e.preventDefault(),u.val("").trigger(o.keyup+"-searchfield")}),a){for(p in a)f.attr(p,a[p]);h&&!i&&e('<a class="'+s.btn+" "+s.next+'" href="#" />').appendTo(f).on(o.click+"-searchfield",function(e){e.preventDefault(),f.submit()})}t.hasClass(s.search)?t.replaceWith(f):t.prepend(f).addClass(s.hassearch)}if(d.noResults){var v=t.closest("."+s.panel).length;if(v||(t=l.$pnls.children("."+s.panel).first()),!t.children("."+s.noresultsmsg).length){var m=t.children("."+s.listview).first();e('<div class="'+s.noresultsmsg+" "+s.hidden+'" />').append(e[n].i18n(d.noResults))[m.length?"insertAfter":"prependTo"](m.length?m:t)}}}}),d.search){if(d.resultsPanel.add){d.showSubPanels=!1;var f=this.$pnls.children("."+s.resultspanel);f.length||(f=e('<div class="'+s.panel+" "+s.resultspanel+" "+s.noanimation+" "+s.hidden+'" />').appendTo(this.$pnls).append('<div class="'+s.navbar+" "+s.hidden+'"><a class="'+s.title+'">'+e[n].i18n(d.resultsPanel.title)+"</a></div>").append('<ul class="'+s.listview+'" />').append(this.$pnls.find("."+s.noresultsmsg).first().clone()),this.initPanels(f))}this.$menu.find("."+s.search).each(function(){var n,r,c=e(this),h=c.closest("."+s.panel).length;h?(n=c.closest("."+s.panel),r=n):(n=e("."+s.panel,l.$menu),r=l.$menu),d.resultsPanel.add&&(n=n.not(f));var u=c.children("input"),p=l.__findAddBack(n,"."+s.listview).children("li"),v=p.filter("."+s.divider),m=l.__filterListItems(p),b="a",g=b+", span",_="",C=function(){var t=u.val().toLowerCase();if(t!=_){if(_=t,d.resultsPanel.add&&f.children("."+s.listview).empty(),n.scrollTop(0),m.add(v).addClass(s.hidden).find("."+s.fullsubopensearch).removeClass(s.fullsubopen+" "+s.fullsubopensearch),m.each(function(){var t=e(this),n=b;(d.showTextItems||d.showSubPanels&&t.find("."+s.next))&&(n=g);var i=t.data(a.searchtext)||t.children(n).text();i.toLowerCase().indexOf(_)>-1&&t.add(t.prevAll("."+s.divider).first()).removeClass(s.hidden)}),d.showSubPanels&&n.each(function(t){var n=e(this);l.__filterListItems(n.find("."+s.listview).children()).each(function(){var t=e(this),n=t.data(a.child);t.removeClass(s.nosubresults),n&&n.find("."+s.listview).children().removeClass(s.hidden)})}),d.resultsPanel.add)if(""===_)this.closeAllPanels(),this.openPanel(this.$pnls.children("."+s.subopened).last());else{var i=e();n.each(function(){var t=l.__filterListItems(e(this).find("."+s.listview).children()).not("."+s.hidden).clone(!0);t.length&&(d.resultsPanel.dividers&&(i=i.add('<li class="'+s.divider+'">'+e(this).children("."+s.navbar).children("."+s.title).text()+"</li>")),i=i.add(t))}),i.find("."+s.next).remove(),f.children("."+s.listview).append(i),this.openPanel(f)}else e(n.get().reverse()).each(function(t){var n=e(this),i=n.data(a.parent);i&&(l.__filterListItems(n.find("."+s.listview).children()).length?(i.hasClass(s.hidden)&&i.children("."+s.next).not("."+s.fullsubopen).addClass(s.fullsubopen).addClass(s.fullsubopensearch),i.removeClass(s.hidden).removeClass(s.nosubresults).prevAll("."+s.divider).first().removeClass(s.hidden)):h||(n.hasClass(s.opened)&&setTimeout(function(){l.openPanel(i.closest("."+s.panel))},(t+1)*(1.5*l.conf.openingInterval)),i.addClass(s.nosubresults)))});r.find("."+s.noresultsmsg)[m.not("."+s.hidden).length?"addClass":"removeClass"](s.hidden),this.trigger("updateListview")}};u.off(o.keyup+"-"+i+" "+o.change+"-"+i).on(o.keyup+"-"+i,function(e){t(e.keyCode)||C.call(l)}).on(o.change+"-"+i,function(e){C.call(l)});var y=c.children("."+s.btn);y.length&&u.on(o.keyup+"-"+i,function(e){y[u.val().length?"removeClass":"addClass"](s.hidden)}),u.trigger(o.keyup+"-"+i)})}}})},add:function(){s=e[n]._c,a=e[n]._d,o=e[n]._e,s.add("clear search hassearch resultspanel noresultsmsg noresults nosubresults fullsubopensearch"),a.add("searchtext"),o.add("change keyup")},clickAnchor:function(e,t){}},e[n].defaults[i]={add:!1,addTo:"panels",placeholder:"Search",noResults:"No results found.",resultsPanel:{add:!1,dividers:!0,title:"Search results"},search:!0,showTextItems:!1,showSubPanels:!0},e[n].configuration[i]={clear:!1,form:!1,input:!1,submit:!1};var s,a,o,r}(jQuery),
function(e){var t="mmenu",n="sectionIndexer";e[t].addons[n]={setup:function(){var s=this,r=this.opts[n];this.conf[n];o=e[t].glbl,"boolean"==typeof r&&(r={add:r}),"object"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),this.bind("initPanels:after",function(t){if(r.add){var o;switch(r.addTo){case"panels":o=t;break;default:o=e(r.addTo,this.$menu).filter("."+i.panel)}o.find("."+i.divider).closest("."+i.panel).addClass(i.hasindexer),this.$indexer||(this.$indexer=e('<div class="'+i.indexer+'" />').prependTo(this.$pnls).append('<a href="#a">a</a><a href="#b">b</a><a href="#c">c</a><a href="#d">d</a><a href="#e">e</a><a href="#f">f</a><a href="#g">g</a><a href="#h">h</a><a href="#i">i</a><a href="#j">j</a><a href="#k">k</a><a href="#l">l</a><a href="#m">m</a><a href="#n">n</a><a href="#o">o</a><a href="#p">p</a><a href="#q">q</a><a href="#r">r</a><a href="#s">s</a><a href="#t">t</a><a href="#u">u</a><a href="#v">v</a><a href="#w">w</a><a href="#x">x</a><a href="#y">y</a><a href="#z">z</a>'),this.$indexer.children().on(a.mouseover+"-"+n+" "+i.touchstart+"-"+n,function(t){var n=e(this).attr("href").slice(1),a=s.$pnls.children("."+i.opened),o=a.find("."+i.listview),r=!1,l=a.scrollTop();a.scrollTop(0),o.children("."+i.divider).not("."+i.hidden).each(function(){r===!1&&n==e(this).text().slice(0,1).toLowerCase()&&(r=e(this).position().top)}),a.scrollTop(r!==!1?r:l)}));var l=function(e){e=e||this.$pnls.children("."+i.opened),this.$menu[(e.hasClass(i.hasindexer)?"add":"remove")+"Class"](i.hasindexer)};this.bind("openPanel:start",l),this.bind("initPanels:after",l)}})},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("indexer hasindexer"),a.add("mouseover touchstart")},clickAnchor:function(e,t){if(e.parent().is("."+i.indexer))return!0}},e[t].defaults[n]={add:!1,addTo:"panels"};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="setSelected";e[t].addons[n]={setup:function(){var a=this,r=this.opts[n];this.conf[n];if(o=e[t].glbl,"boolean"==typeof r&&(r={hover:r,parent:r}),"object"!=typeof r&&(r={}),r=this.opts[n]=e.extend(!0,{},e[t].defaults[n],r),"detect"==r.current){var l=function(e){e=e.split("?")[0].split("#")[0];var t=a.$menu.find('a[href="'+e+'"], a[href="'+e+'/"]');t.length?a.setSelected(t.parent(),!0):(e=e.split("/").slice(0,-1),e.length&&l(e.join("/")))};this.bind("initMenu:after",function(){l(window.location.href)})}else r.current||this.bind("initListview:after",function(e){$panels.find("."+i.listview).children("."+i.selected).removeClass(i.selected)});r.hover&&this.bind("initMenu:after",function(){this.$menu.addClass(i.hoverselected)}),r.parent&&(this.bind("openPanel:finish",function(e){this.$pnls.find("."+i.listview).find("."+i.next).removeClass(i.selected);for(var t=e.data(s.parent);t;)t.not("."+i.vertical).children("."+i.next).addClass(i.selected),t=t.closest("."+i.panel).data(s.parent)}),this.bind("initMenu:after",function(){this.$menu.addClass(i.parentselected)}))},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("hoverselected parentselected")},clickAnchor:function(e,t){}},e[t].defaults[n]={current:!0,hover:!1,parent:!1};var i,s,a,o}(jQuery),
function(e){var t="mmenu",n="toggles";e[t].addons[n]={setup:function(){var s=this;this.opts[n],this.conf[n];o=e[t].glbl,this.bind("initListview:after",function(t){this.__refactorClass(t.find("input"),this.conf.classNames[n].toggle,"toggle"),this.__refactorClass(t.find("input"),this.conf.classNames[n].check,"check"),t.find("input."+i.toggle+", input."+i.check).each(function(){var t=e(this),n=t.closest("li"),a=t.hasClass(i.toggle)?"toggle":"check",o=t.attr("id")||s.__getUniqueId();n.children('label[for="'+o+'"]').length||(t.attr("id",o),n.prepend(t),e('<label for="'+o+'" class="'+i[a]+'"></label>').insertBefore(n.children("a, span").last()))})})},add:function(){i=e[t]._c,s=e[t]._d,a=e[t]._e,i.add("toggle check")},clickAnchor:function(e,t){}},e[t].configuration.classNames[n]={toggle:"Toggle",check:"Check"};var i,s,a,o}(jQuery);
return true;
}));
!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.options.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"},e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0},100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});
(function(){var e,t;e=function(){function e(e,t){var n,r;this.options={target:"instafeed",get:"popular",resolution:"thumbnail",sortBy:"none",links:!0,mock:!1,useHttp:!1};if(typeof e=="object")for(n in e)r=e[n],this.options[n]=r;this.context=t!=null?t:this,this.unique=this._genKey()}return e.prototype.hasNext=function(){return typeof this.context.nextUrl=="string"&&this.context.nextUrl.length>0},e.prototype.next=function(){return this.hasNext()?this.run(this.context.nextUrl):!1},e.prototype.run=function(t){var n,r,i;if(typeof this.options.clientId!="string"&&typeof this.options.accessToken!="string")throw new Error("Missing clientId or accessToken.");if(typeof this.options.accessToken!="string"&&typeof this.options.clientId!="string")throw new Error("Missing clientId or accessToken.");return this.options.before!=null&&typeof this.options.before=="function"&&this.options.before.call(this),typeof document!="undefined"&&document!==null&&(i=document.createElement("script"),i.id="instafeed-fetcher",i.src=t||this._buildUrl(),n=document.getElementsByTagName("head"),n[0].appendChild(i),r="instafeedCache"+this.unique,window[r]=new e(this.options,this),window[r].unique=this.unique),!0},e.prototype.parse=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S;if(typeof e!="object"){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,"Invalid JSON data"),!1;throw new Error("Invalid JSON response")}if(e.meta.code!==200){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,e.meta.error_message),!1;throw new Error("Error from Instagram: "+e.meta.error_message)}if(e.data.length===0){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,"No images were returned from Instagram"),!1;throw new Error("No images were returned from Instagram")}this.options.success!=null&&typeof this.options.success=="function"&&this.options.success.call(this,e),this.context.nextUrl="",e.pagination!=null&&(this.context.nextUrl=e.pagination.next_url);if(this.options.sortBy!=="none"){this.options.sortBy==="random"?d=["","random"]:d=this.options.sortBy.split("-"),p=d[0]==="least"?!0:!1;switch(d[1]){case"random":e.data.sort(function(){return.5-Math.random()});break;case"recent":e.data=this._sortBy(e.data,"created_time",p);break;case"liked":e.data=this._sortBy(e.data,"likes.count",p);break;case"commented":e.data=this._sortBy(e.data,"comments.count",p);break;default:throw new Error("Invalid option for sortBy: '"+this.options.sortBy+"'.")}}if(typeof document!="undefined"&&document!==null&&this.options.mock===!1){a=e.data,this.options.limit!=null&&a.length>this.options.limit&&(a=a.slice(0,this.options.limit+1||9e9)),n=document.createDocumentFragment(),this.options.filter!=null&&typeof this.options.filter=="function"&&(a=this._filter(a,this.options.filter));if(this.options.template!=null&&typeof this.options.template=="string"){i="",o="",l="",v=document.createElement("div");for(m=0,b=a.length;m<b;m++)s=a[m],u=s.images[this.options.resolution].url,this.options.useHttp||(u=u.replace("http://","//")),o=this._makeTemplate(this.options.template,{model:s,id:s.id,link:s.link,image:u,caption:this._getObjectProperty(s,"caption.text"),likes:s.likes.count,comments:s.comments.count,location:this._getObjectProperty(s,"location.name")}),i+=o;v.innerHTML=i,S=[].slice.call(v.childNodes);for(g=0,w=S.length;g<w;g++)h=S[g],n.appendChild(h)}else for(y=0,E=a.length;y<E;y++)s=a[y],f=document.createElement("img"),u=s.images[this.options.resolution].url,this.options.useHttp||(u=u.replace("http://","//")),f.src=u,this.options.links===!0?(t=document.createElement("a"),t.href=s.link,t.appendChild(f),n.appendChild(t)):n.appendChild(f);document.getElementById(this.options.target).appendChild(n),r=document.getElementsByTagName("head")[0],r.removeChild(document.getElementById("instafeed-fetcher")),c="instafeedCache"+this.unique,window[c]=void 0;try{delete window[c]}catch(x){}}return this.options.after!=null&&typeof this.options.after=="function"&&this.options.after.call(this),!0},e.prototype._buildUrl=function(){var e,t,n;e="https://api.instagram.com/v1";switch(this.options.get){case"popular":t="media/popular";break;case"tagged":if(typeof this.options.tagName!="string")throw new Error("No tag name specified. Use the 'tagName' option.");t="tags/"+this.options.tagName+"/media/recent";break;case"location":if(typeof this.options.locationId!="number")throw new Error("No location specified. Use the 'locationId' option.");t="locations/"+this.options.locationId+"/media/recent";break;case"user":if(typeof this.options.userId!="number")throw new Error("No user specified. Use the 'userId' option.");if(typeof this.options.accessToken!="string")throw new Error("No access token. Use the 'accessToken' option.");t="users/"+this.options.userId+"/media/recent";break;default:throw new Error("Invalid option for get: '"+this.options.get+"'.")}return n=""+e+"/"+t,this.options.accessToken!=null?n+="?access_token="+this.options.accessToken:n+="?client_id="+this.options.clientId,this.options.limit!=null&&(n+="&count="+this.options.limit),n+="&callback=instafeedCache"+this.unique+".parse",n},e.prototype._genKey=function(){var e;return e=function(){return((1+Math.random())*65536|0).toString(16).substring(1)},""+e()+e()+e()+e()},e.prototype._makeTemplate=function(e,t){var n,r,i,s,o;r=/(?:\{{2})([\w\[\]\.]+)(?:\}{2})/,n=e;while(r.test(n))i=n.match(r)[1],s=(o=this._getObjectProperty(t,i))!=null?o:"",n=n.replace(r,""+s);return n},e.prototype._getObjectProperty=function(e,t){var n,r;t=t.replace(/\[(\w+)\]/g,".$1"),r=t.split(".");while(r.length){n=r.shift();if(!(e!=null&&n in e))return null;e=e[n]}return e},e.prototype._sortBy=function(e,t,n){var r;return r=function(e,r){var i,s;return i=this._getObjectProperty(e,t),s=this._getObjectProperty(r,t),n?i>s?1:-1:i<s?1:-1},e.sort(r.bind(this)),e},e.prototype._filter=function(e,t){var n,r,i,s,o;n=[],i=function(e){if(t(e))return n.push(e)};for(s=0,o=e.length;s<o;s++)r=e[s],i(r);return n},e}(),t=typeof exports!="undefined"&&exports!==null?exports:window,t.Instafeed=e}).call(this);
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;g>f;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&10>m&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),1===Math.abs(b)?d:c}var f=[],g=[],h={precision:100,elapse:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}([0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}([0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",w:"weeks",d:"days",D:"totalDays",H:"hours",M:"minutes",S:"seconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&0>b?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,totalDays:Math.floor(this.totalSecsLeft/60/60/24),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),months:Math.floor(this.totalSecsLeft/60/60/24/30),years:Math.floor(this.totalSecsLeft/60/60/24/365)},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
(function ($){
$(document).on('ready', function(){
$('.product-countdown').each(function(event){
var $this=$(this);
var $id=this.id;
var $current_time=new Date().getTime();
var $sttime=$(this).data('sttime');
var $countdown_time=$(this).data('cdtime');
var $day=$(this).data('day') ? $(this).data('day'):"D";
var $hour=$(this).data('hour') ? $(this).data('hour'):"H";
var $min=$(this).data('min') ? $(this).data('min'):"M";
var $sec=$(this).data('sec') ? $(this).data('sec'):"S";
var $austDay=new Date();
var $austDay=new Date($countdown_time * 1000);
if($sttime > $current_time){
$this.remove();
return ;
}
if($countdown_time.length > 0&&$current_time > $countdown_time){
$this.remove();
return ;
}
if($countdown_time.length <=0){
$this.remove();
return ;
}
$this.countdown($austDay, function(event){
$(this).html(event.strftime('<span class="countdown-content"><span class="days"><span class="countdown-amount">%D</span><span class="countdown-text">'+$day+'</span></span><span class="countdown-section hours"><span class="countdown-amount">%H</span><span class="countdown-text">'+$hour+'</span></span><span class="countdown-section mins"><span class="countdown-amount">%M</span><span class="countdown-text">'+$min+'</span></span><span class="countdown-section secs"><span class="countdown-amount">%S</span><span class="countdown-text">'+$sec+'</span></span></span>')
);
}).on('finish.countdown', function(event){
$(this).remove();
$id=$(this).data('id');
$target=this;
$(this).hide('slow', function(){ $(this).remove(); });
$price=$(this).data('price');
$('#' + $id + ' .item-price > span').hide('slow', function(){ $('#' + $id + ' .item-price > span').remove(); });
$('#' + $id + ' .item-price').append('<span><span class="amount">' + $price + '</span></span>');
});
});
});
})(jQuery);
(function(r,G,f,v){var J=f("html"),n=f(r),p=f(G),b=f.fancybox=function(){b.open.apply(this,arguments)},I=navigator.userAgent.match(/msie/i),B=null,s=G.createTouch!==v,t=function(a){return a&&a.hasOwnProperty&&a instanceof f},q=function(a){return a&&"string"===f.type(a)},E=function(a){return q(a)&&0<a.indexOf("%")},l=function(a,d){var e=parseInt(a,10)||0;d&&E(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},w=function(a,b){return l(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20,
width:900,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},
keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+
(I?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0,
openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,
isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=t(a)?f(a).get():[a]),f.each(a,function(e,c){var k={},g,h,j,m,l;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),t(c)?(k={href:c.data("fancybox-href")||c.attr("href"),title:c.data("fancybox-title")||c.attr("title"),isDom:!0,element:c},f.metadata&&f.extend(!0,k,
c.metadata())):k=c);g=d.href||k.href||(q(c)?c:null);h=d.title!==v?d.title:k.title||"";m=(j=d.content||k.content)?"html":d.type||k.type;!m&&k.isDom&&(m=c.data("fancybox-type"),m||(m=(m=c.prop("class").match(/fancybox\.(\w+)/))?m[1]:null));q(g)&&(m||(b.isImage(g)?m="image":b.isSWF(g)?m="swf":"#"===g.charAt(0)?m="inline":q(c)&&(m="html",j=c)),"ajax"===m&&(l=g.split(/\s+/,2),g=l.shift(),l=l.shift()));j||("inline"===m?g?j=f(q(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):k.isDom&&(j=c):"html"===m?j=g:!m&&(!g&&
k.isDom)&&(m="inline",j=c));f.extend(k,{href:g,type:m,content:j,title:h,selector:l});a[e]=k}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==v&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1!==b.trigger("onCancel")&&(b.hideLoading(),b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(),b.coming=null,b.current||
b._afterZoomOut(a))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(!b.isOpen||!0===a?(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut()):(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&&(b.player.timer=
setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};if(!0===a||!b.player.isActive&&!1!==a){if(b.current&&(b.current.loop||b.current.index<b.group.length-1))b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")}else c()},next:function(a){var d=b.current;d&&(q(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d=b.current;
d&&(q(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=l(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==v&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,k;c&&(k=b._getPosition(d),a&&"scroll"===a.type?(delete k.position,c.stop(!0,!0).animate(k,200)):(c.css(k),e.pos=f.extend({},e.dim,k)))},update:function(a){var d=
a&&a.type,e=!d||"orientationchange"===d;e&&(clearTimeout(B),B=null);b.isOpen&&!B&&(B=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),B=null)},e&&!s?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,s&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"),b.trigger("onUpdate")),
b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){if(27===(a.which||a.keyCode))a.preventDefault(),b.cancel()});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}))},getViewport:function(){var a=b.current&&b.current.locked||!1,d={x:n.scrollLeft(),
y:n.scrollTop()};a?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=s&&r.innerWidth?r.innerWidth:n.width(),d.h=s&&r.innerHeight?r.innerHeight:n.height());return d},unbindEvents:function(){b.wrap&&t(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");n.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(n.bind("orientationchange.fb"+(s?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c=e.which||e.keyCode,k=e.target||e.srcElement;
if(27===c&&b.coming)return!1;!e.ctrlKey&&(!e.altKey&&!e.shiftKey&&!e.metaKey&&(!k||!k.type&&!f(k).is("[contenteditable]")))&&f.each(d,function(d,k){if(1<a.group.length&&k[c]!==v)return b[d](k[c]),e.preventDefault(),!1;if(-1<f.inArray(c,k))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,k,g){for(var h=f(d.target||null),j=!1;h.length&&!j&&!h.is(".fancybox-skin")&&!h.is(".fancybox-wrap");)j=h[0]&&!(h[0].style.overflow&&"hidden"===h[0].style.overflow)&&
(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();if(0!==c&&!j&&1<b.group.length&&!a.canShrink){if(0<g||0<k)b.prev(0<g?"down":"left");else if(0>g||0>k)b.next(0>g?"up":"right");d.preventDefault()}}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&&b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,
{},b.helpers[d].defaults,e),c)});p.trigger(a)}},isImage:function(a){return q(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return q(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=l(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c,c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,
mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"===c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=
!0);"iframe"===c&&s&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(s?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,w(d.padding[a]))});b.trigger("onReady");if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");
"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width=this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=
this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming,d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",s?"auto":a.iframe.scrolling).attr("src",a.href);
f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);s||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload||b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,
e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,k,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove());b.unbindEvents();e=a.content;c=a.type;k=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,
outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):t(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder",!1)}));break;case "image":e=a.tpl.image.replace("{href}",
g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}(!t(e)||!e.parent().is(a.inner))&&a.inner.append(e);b.trigger("beforeShow");a.inner.css("overflow","yes"===k?"scroll":
"no"===k?"hidden":k);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(b.isOpened){if(d.prevMethod)b.transitions[d.prevMethod]()}else f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,k=b.skin,g=b.inner,h=b.current,c=h.width,j=h.height,m=h.minWidth,u=h.minHeight,n=h.maxWidth,p=h.maxHeight,s=h.scrolling,q=h.scrollOutside?
h.scrollbarWidth:0,x=h.margin,y=l(x[1]+x[3]),r=l(x[0]+x[2]),v,z,t,C,A,F,B,D,H;e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp");x=l(k.outerWidth(!0)-k.width());v=l(k.outerHeight(!0)-k.height());z=y+x;t=r+v;C=E(c)?(a.w-z)*l(c)/100:c;A=E(j)?(a.h-t)*l(j)/100:j;if("iframe"===h.type){if(H=h.content,h.autoHeight&&1===H.data("ready"))try{H[0].contentWindow.document.location&&(g.width(C).height(9999),F=H.contents().find("body"),q&&F.css("overflow-x","hidden"),A=F.outerHeight(!0))}catch(G){}}else if(h.autoWidth||
h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(C),h.autoHeight||g.height(A),h.autoWidth&&(C=g.width()),h.autoHeight&&(A=g.height()),g.removeClass("fancybox-tmp");c=l(C);j=l(A);D=C/A;m=l(E(m)?l(m,"w")-z:m);n=l(E(n)?l(n,"w")-z:n);u=l(E(u)?l(u,"h")-t:u);p=l(E(p)?l(p,"h")-t:p);F=n;B=p;h.fitToView&&(n=Math.min(a.w-z,n),p=Math.min(a.h-t,p));z=a.w-y;r=a.h-r;h.aspectRatio?(c>n&&(c=n,j=l(c/D)),j>p&&(j=p,c=l(j*D)),c<m&&(c=m,j=l(c/D)),j<u&&(j=u,c=l(j*D))):(c=Math.max(m,Math.min(c,n)),h.autoHeight&&
"iframe"!==h.type&&(g.width(c),j=g.height()),j=Math.max(u,Math.min(j,p)));if(h.fitToView)if(g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height(),h.aspectRatio)for(;(a>z||y>r)&&(c>m&&j>u)&&!(19<d++);)j=Math.max(u,Math.min(p,j-10)),c=l(j*D),c<m&&(c=m,j=l(c/D)),c>n&&(c=n,j=l(c/D)),g.width(c).height(j),e.width(c+x),a=e.width(),y=e.height();else c=Math.max(m,Math.min(c,c-(a-z))),j=Math.max(u,Math.min(j,j-(y-r)));q&&("auto"===s&&j<A&&c+x+q<z)&&(c+=q);g.width(c).height(j);e.width(c+x);a=e.width();
y=e.height();e=(a>z||y>r)&&c>m&&j>u;c=h.aspectRatio?c<F&&j<B&&c<C&&j<A:(c<F||j<B)&&(c<C||j<A);f.extend(h,{dim:{width:w(a),height:w(y)},origWidth:C,origHeight:A,canShrink:e,canExpand:c,wPadding:x,hPadding:v,wrapSpace:y-k.outerHeight(!0),skinSpace:k.height()-j});!H&&(h.autoHeight&&j>u&&j<p&&!c)&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute",top:c[0],left:c[3]};d.autoCenter&&d.fixed&&
!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=w(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=w(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&(b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){!f(d.target).is("a")&&!f(d.target).parent().is("a")&&(d.preventDefault(),
b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),!a.loop&&a.index===a.group.length-1?b.play(!1):b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play()))},_afterZoomOut:function(a){a=
a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,j=a.wPadding,m=b.getViewport();!e&&(a.isDom&&d.is(":visible"))&&(e=d.find("img:first"),e.length||(e=d));t(e)?(c=e.offset(),e.is("img")&&(f=e.outerWidth(),g=e.outerHeight())):
(c.top=m.y+(m.h-g)*a.topRatio,c.left=m.x+(m.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=m.y,c.left-=m.x;return c={top:w(c.top-h*a.topRatio),left:w(c.left-j*a.leftRatio),width:w(f+j),height:w(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](l("width"===f?c:c-g*e)),b.inner[f](l("width"===f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,k=f.extend({opacity:1},d);delete k.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(k,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&&(c.opacity=0.1));b.wrap.animate(c,
{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=w(l(e[g])-200),c[g]="+=200px"):(e[g]=w(l(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})},changeOut:function(){var a=
b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){a=f.extend({},this.defaults,a);this.overlay&&this.close();this.overlay=
f('<div class="fancybox-overlay"></div>').appendTo(b.coming?b.coming.parent:a.parent);this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(n.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?
b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){var a,b;n.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),a=n.scrollTop(),b=n.scrollLeft(),this.el.removeClass("fancybox-lock"),n.scrollTop(a).scrollLeft(b));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%");I?(b=Math.max(G.documentElement.offsetWidth,G.body.offsetWidth),
p.width()>b&&(a=p.width())):p.width()>n.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&(this.fixed&&b.fixed)&&(e||(this.margin=p.height()>n.height()?f("html").css("margin-right").replace("px",""):!1),b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){var e,c;b.locked&&(!1!==this.margin&&(f("*").filter(function(){return"fixed"===f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin")),e=n.scrollTop(),c=n.scrollLeft(),this.el.addClass("fancybox-lock"),n.scrollTop(e).scrollLeft(c));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(a){var d=
b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(q(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),I&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(l(d.css("margin-bottom")))}d["top"===a.position?"prependTo":"appendTo"](c)}}};f.fn.fancybox=function(a){var d,
e=f(this),c=this.selector||"",k=function(g){var h=f(this).blur(),j=d,k,l;!g.ctrlKey&&(!g.altKey&&!g.shiftKey&&!g.metaKey)&&!h.is(".fancybox-wrap")&&(k=a.groupAttr||"data-fancybox-group",l=h.attr(k),l||(k="rel",l=h.get(0)[k]),l&&(""!==l&&"nofollow"!==l)&&(h=c.length?f(c):e,h=h.filter("["+k+'="'+l+'"]'),j=h.index(this)),a.index=j,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;!c||!1===a.live?e.unbind("click.fb-start").bind("click.fb-start",k):p.undelegate(c,"click.fb-start").delegate(c+
":not('.fancybox-item, .fancybox-nav')","click.fb-start",k);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===v&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});if(f.support.fixedPosition===v){a=f.support;d=f('<div style="position:fixed;top:20px;"></div>').appendTo("body");var e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove();a.fixedPosition=e}f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(r).width();J.addClass("fancybox-lock-test");d=f(r).width();J.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);
if(typeof Object.create!=='function'){
Object.create=function(obj){
function F(){};
F.prototype=obj;
return new F();
};}
(function($, window, document, undefined){
var ElevateZoom={
init: function(options, elem){
var self=this;
self.elem=elem;
self.$elem=$(elem);
self.imageSrc=self.$elem.data("zoom-image") ? self.$elem.data("zoom-image"):self.$elem.attr("src");
self.options=$.extend({}, $.fn.elevateZoom.options, options);
if(self.options.tint){
self.options.lensColour="none",
self.options.lensOpacity="1"
}
if(self.options.zoomType=="inner"){self.options.showLens=false;}
self.$elem.parent().removeAttr('title').removeAttr('alt');
self.zoomImage=self.imageSrc;
self.refresh(1);
$('#'+self.options.gallery + ' a').click(function(e){
if(self.options.galleryActiveClass){
$('#'+self.options.gallery + ' a').removeClass(self.options.galleryActiveClass);
$(this).addClass(self.options.galleryActiveClass);
}
e.preventDefault();
if($(this).data("zoom-image")){self.zoomImagePre=$(this).data("zoom-image")}else{self.zoomImagePre=$(this).data("image");}
self.swaptheimage($(this).data("image"), self.zoomImagePre);
return false;
});
},
refresh: function(length){
var self=this;
setTimeout(function(){
self.fetch(self.imageSrc);
}, length||self.options.refresh);
},
fetch: function(imgsrc){
var self=this;
var newImg=new Image();
newImg.onload=function(){
self.largeWidth=newImg.width;
self.largeHeight=newImg.height;
self.startZoom();
self.currentImage=self.imageSrc;
self.options.onZoomedImageLoaded(self.$elem);
}
newImg.src=imgsrc;
return;
},
startZoom: function(){
var self=this;
self.nzWidth=self.$elem.width();
self.nzHeight=self.$elem.height();
self.isWindowActive=false;
self.isLensActive=false;
self.isTintActive=false;
self.overWindow=false;
if(self.options.imageCrossfade){
self.zoomWrap=self.$elem.wrap('<div style="height:'+self.nzHeight+'px;width:'+self.nzWidth+'px;" class="zoomWrapper" />');
self.$elem.css('position', 'absolute');
}
self.zoomLock=1;
self.scrollingLock=false;
self.changeBgSize=false;
self.currentZoomLevel=self.options.zoomLevel;
self.nzOffset=self.$elem.offset();
self.widthRatio=(self.largeWidth/self.currentZoomLevel) / self.nzWidth;
self.heightRatio=(self.largeHeight/self.currentZoomLevel) / self.nzHeight;
if(self.options.zoomType=="window"){
self.zoomWindowStyle="overflow: hidden;"
+ "background-position: 0px 0px;text-align:center;"
+ "background-color: " + String(self.options.zoomWindowBgColour)
+ ";width: " + String(self.options.zoomWindowWidth) + "px;"
+ "height: " + String(self.options.zoomWindowHeight)
+ "px;float: left;"
+ "background-size: "+ self.largeWidth/self.currentZoomLevel+ "px " +self.largeHeight/self.currentZoomLevel + "px;"
+ "display: none;z-index:100;"
+ "border: " + String(self.options.borderSize)
+ "px solid " + self.options.borderColour
+ ";background-repeat: no-repeat;"
+ "position: absolute;";
}
if(self.options.zoomType=="inner"){
var borderWidth=self.$elem.css("border-left-width");
self.zoomWindowStyle="overflow: hidden;"
+ "margin-left: " + String(borderWidth) + ";"
+ "margin-top: " + String(borderWidth) + ";"
+ "background-position: 0px 0px;"
+ "width: " + String(self.nzWidth) + "px;"
+ "height: " + String(self.nzHeight) + "px;"
+ "px;float: left;"
+ "display: none;"
+ "cursor:"+(self.options.cursor)+";"
+ "px solid " + self.options.borderColour
+ ";background-repeat: no-repeat;"
+ "position: absolute;";
}
if(self.options.zoomType=="window"){
if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){
lensHeight=self.nzHeight;
}else{
lensHeight=String((self.options.zoomWindowHeight/self.heightRatio))
}
if(self.largeWidth < self.options.zoomWindowWidth){
lensWidth=self.nzWidth;
}else{
lensWidth=(self.options.zoomWindowWidth/self.widthRatio);
}
self.lensStyle="background-position: 0px 0px;width: " + String((self.options.zoomWindowWidth)/self.widthRatio) + "px;height: " + String((self.options.zoomWindowHeight)/self.heightRatio)
+ "px;float: right;display: none;"
+ "overflow: hidden;"
+ "z-index: 999;"
+ "-webkit-transform: translateZ(0);"
+ "opacity:"+(self.options.lensOpacity)+";filter: alpha(opacity="+(self.options.lensOpacity*100)+"); zoom:1;"
+ "width:"+lensWidth+"px;"
+ "height:"+lensHeight+"px;"
+ "background-color:"+(self.options.lensColour)+";"
+ "cursor:"+(self.options.cursor)+";"
+ "border: "+(self.options.lensBorderSize)+"px" +
" solid "+(self.options.lensBorderColour)+";background-repeat: no-repeat;position: absolute;";
}
self.tintStyle="display: block;"
+ "position: absolute;"
+ "background-color: "+self.options.tintColour+";"
+ "filter:alpha(opacity=0);"
+ "opacity: 0;"
+ "width: " + self.nzWidth + "px;"
+ "height: " + self.nzHeight + "px;"
;
self.lensRound='';
if(self.options.zoomType=="lens"){
self.lensStyle="background-position: 0px 0px;"
+ "float: left;display: none;"
+ "border: " + String(self.options.borderSize) + "px solid " + self.options.borderColour+";"
+ "width:"+ String(self.options.lensSize) +"px;"
+ "height:"+ String(self.options.lensSize)+"px;"
+ "background-repeat: no-repeat;position: absolute;";
}
if(self.options.lensShape=="round"){
self.lensRound="border-top-left-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;"
+ "border-top-right-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;"
+ "border-bottom-left-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;"
+ "border-bottom-right-radius: " + String(self.options.lensSize / 2 + self.options.borderSize) + "px;";
}
self.zoomContainer=$('<div class="zoomContainer" style="-webkit-transform: translateZ(0);position:absolute;left:'+self.nzOffset.left+'px;top:'+self.nzOffset.top+'px;height:'+self.nzHeight+'px;width:'+self.nzWidth+'px;"></div>');
$('body').append(self.zoomContainer);
if(self.options.containLensZoom&&self.options.zoomType=="lens"){
self.zoomContainer.css("overflow", "hidden");
}
if(self.options.zoomType!="inner"){
self.zoomLens=$("<div class='zoomLens' style='" + self.lensStyle + self.lensRound +"'>&nbsp;</div>")
.appendTo(self.zoomContainer)
.click(function (){
self.$elem.trigger('click');
});
if(self.options.tint){
self.tintContainer=$('<div/>').addClass('tintContainer');
self.zoomTint=$("<div class='zoomTint' style='"+self.tintStyle+"'></div>");
self.zoomLens.wrap(self.tintContainer);
self.zoomTintcss=self.zoomLens.after(self.zoomTint);
self.zoomTintImage=$('<img style="position: absolute; left: 0px; top: 0px; max-width: none; width: '+self.nzWidth+'px; height: '+self.nzHeight+'px;" src="'+self.imageSrc+'">')
.appendTo(self.zoomLens)
.click(function (){
self.$elem.trigger('click');
});
}}
if(isNaN(self.options.zoomWindowPosition)){
self.zoomWindow=$("<div style='z-index:999;left:"+(self.windowOffsetLeft)+"px;top:"+(self.windowOffsetTop)+"px;" + self.zoomWindowStyle + "' class='zoomWindow'>&nbsp;</div>")
.appendTo('body')
.click(function (){
self.$elem.trigger('click');
});
}else{
self.zoomWindow=$("<div style='z-index:999;left:"+(self.windowOffsetLeft)+"px;top:"+(self.windowOffsetTop)+"px;" + self.zoomWindowStyle + "' class='zoomWindow'>&nbsp;</div>")
.appendTo(self.zoomContainer)
.click(function (){
self.$elem.trigger('click');
});
}
self.zoomWindowContainer=$('<div/>').addClass('zoomWindowContainer').css("width",self.options.zoomWindowWidth);
self.zoomWindow.wrap(self.zoomWindowContainer);
if(self.options.zoomType=="lens"){
self.zoomLens.css({ backgroundImage: "url('" + self.imageSrc + "')" });
}
if(self.options.zoomType=="window"){
self.zoomWindow.css({ backgroundImage: "url('" + self.imageSrc + "')" });
}
if(self.options.zoomType=="inner"){
self.zoomWindow.css({ backgroundImage: "url('" + self.imageSrc + "')" });
}
self.zoomContainer.bind('touchend', function(e){
self.showHideWindow("hide");
if(self.options.showLens){self.showHideLens("hide");}
if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("hide");}});
self.$elem.bind('touchend', function(e){
self.showHideWindow("hide");
if(self.options.showLens){self.showHideLens("hide");}
if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("hide");}});
if(self.options.showLens){
self.zoomLens.bind('touchend', function(e){
self.showHideWindow("hide");
if(self.options.showLens){self.showHideLens("hide");}
if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("hide");}});
}
self.$elem.bind('mousemove', function(e){
if(self.overWindow==false){self.setElements("show");}
if(self.lastX!==e.clientX||self.lastY!==e.clientY){
self.setPosition(e);
self.currentLoc=e;
}
self.lastX=e.clientX;
self.lastY=e.clientY;
});
self.zoomContainer.bind('mousemove', function(e){
if(self.overWindow==false){self.setElements("show");}
if(self.lastX!==e.clientX||self.lastY!==e.clientY){
self.setPosition(e);
self.currentLoc=e;
}
self.lastX=e.clientX;
self.lastY=e.clientY;
});
if(self.options.zoomType!="inner"){
self.zoomLens.bind('mousemove', function(e){
if(self.lastX!==e.clientX||self.lastY!==e.clientY){
self.setPosition(e);
self.currentLoc=e;
}
self.lastX=e.clientX;
self.lastY=e.clientY;
});
}
if(self.options.tint&&self.options.zoomType!="inner"){
self.zoomTint.bind('mousemove', function(e){
if(self.lastX!==e.clientX||self.lastY!==e.clientY){
self.setPosition(e);
self.currentLoc=e;
}
self.lastX=e.clientX;
self.lastY=e.clientY;
});
}
if(self.options.zoomType=="inner"){
self.zoomWindow.bind('mousemove', function(e){
if(self.lastX!==e.clientX||self.lastY!==e.clientY){
self.setPosition(e);
self.currentLoc=e;
}
self.lastX=e.clientX;
self.lastY=e.clientY;
});
}
self.zoomContainer.add(self.$elem).mouseenter(function(){
if(self.overWindow==false){self.setElements("show");}}).mouseleave(function(){
if(!self.scrollLock){
self.setElements("hide");
self.options.onDestroy(self.$elem);
}});
if(self.options.zoomType!="inner"){
self.zoomWindow.mouseenter(function(){
self.overWindow=true;
self.setElements("hide");
}).mouseleave(function(){
self.overWindow=false;
});
}
if(self.options.zoomLevel!=1){
}
if(self.options.minZoomLevel){
self.minZoomLevel=self.options.minZoomLevel;
}else{
self.minZoomLevel=self.options.scrollZoomIncrement * 2;
}
if(self.options.scrollZoom){
self.zoomContainer.add(self.$elem).bind('mousewheel DOMMouseScroll MozMousePixelScroll', function(e){
self.scrollLock=true;
clearTimeout($.data(this, 'timer'));
$.data(this, 'timer', setTimeout(function(){
self.scrollLock=false;
}, 250));
var theEvent=e.originalEvent.wheelDelta||e.originalEvent.detail*-1
e.stopImmediatePropagation();
e.stopPropagation();
e.preventDefault();
if(theEvent /120 > 0){
if(self.currentZoomLevel >=self.minZoomLevel){
self.changeZoomLevel(self.currentZoomLevel-self.options.scrollZoomIncrement);
}}else{
if(self.options.maxZoomLevel){
if(self.currentZoomLevel <=self.options.maxZoomLevel){
self.changeZoomLevel(parseFloat(self.currentZoomLevel)+self.options.scrollZoomIncrement);
}}else{
self.changeZoomLevel(parseFloat(self.currentZoomLevel)+self.options.scrollZoomIncrement);
}}
return false;
});
}},
setElements: function(type){
var self=this;
if(!self.options.zoomEnabled){return false;}
if(type=="show"){
if(self.isWindowSet){
if(self.options.zoomType=="inner"){self.showHideWindow("show");}
if(self.options.zoomType=="window"){self.showHideWindow("show");}
if(self.options.showLens){self.showHideLens("show");}
if(self.options.tint&&self.options.zoomType!="inner"){self.showHideTint("show");
}}
}
if(type=="hide"){
if(self.options.zoomType=="window"){self.showHideWindow("hide");}
if(!self.options.tint){self.showHideWindow("hide");}
if(self.options.showLens){self.showHideLens("hide");}
if(self.options.tint){	self.showHideTint("hide");}}
},
setPosition: function(e){
var self=this;
if(!self.options.zoomEnabled){return false;}
self.nzHeight=self.$elem.height();
self.nzWidth=self.$elem.width();
self.nzOffset=self.$elem.offset();
if(self.options.tint&&self.options.zoomType!="inner"){
self.zoomTint.css({ top: 0});
self.zoomTint.css({ left: 0});
}
if(self.options.responsive&&!self.options.scrollZoom){
if(self.options.showLens){
if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){
lensHeight=self.nzHeight;
}else{
lensHeight=String((self.options.zoomWindowHeight/self.heightRatio))
}
if(self.largeWidth < self.options.zoomWindowWidth){
lensWidth=self.nzWidth;
}else{
lensWidth=(self.options.zoomWindowWidth/self.widthRatio);
}
self.widthRatio=self.largeWidth / self.nzWidth;
self.heightRatio=self.largeHeight / self.nzHeight;
if(self.options.zoomType!="lens"){
if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){
lensHeight=self.nzHeight;
}else{
lensHeight=String((self.options.zoomWindowHeight/self.heightRatio))
}
if(self.nzWidth < self.options.zoomWindowHeight/self.heightRatio){
lensWidth=self.nzWidth;
}else{
lensWidth=String((self.options.zoomWindowWidth/self.widthRatio));
}
self.zoomLens.css('width', lensWidth);
self.zoomLens.css('height', lensHeight);
if(self.options.tint){
self.zoomTintImage.css('width', self.nzWidth);
self.zoomTintImage.css('height', self.nzHeight);
}}
if(self.options.zoomType=="lens"){
self.zoomLens.css({ width: String(self.options.lensSize) + 'px', height: String(self.options.lensSize) + 'px' })
}}
}
self.zoomContainer.css({ top: self.nzOffset.top});
self.zoomContainer.css({ left: self.nzOffset.left});
self.mouseLeft=parseInt(e.pageX - self.nzOffset.left);
self.mouseTop=parseInt(e.pageY - self.nzOffset.top);
if(self.options.zoomType=="window"){
self.Etoppos=(self.mouseTop < (self.zoomLens.height()/2));
self.Eboppos=(self.mouseTop > self.nzHeight - (self.zoomLens.height()/2)-(self.options.lensBorderSize*2));
self.Eloppos=(self.mouseLeft < 0+((self.zoomLens.width()/2)));
self.Eroppos=(self.mouseLeft > (self.nzWidth - (self.zoomLens.width()/2)-(self.options.lensBorderSize*2)));
}
if(self.options.zoomType=="inner"){
self.Etoppos=(self.mouseTop < ((self.nzHeight/2)/self.heightRatio));
self.Eboppos=(self.mouseTop > (self.nzHeight - ((self.nzHeight/2)/self.heightRatio)));
self.Eloppos=(self.mouseLeft < 0+(((self.nzWidth/2)/self.widthRatio)));
self.Eroppos=(self.mouseLeft > (self.nzWidth - (self.nzWidth/2)/self.widthRatio-(self.options.lensBorderSize*2)));
}
if(self.mouseLeft < 0||self.mouseTop < 0||self.mouseLeft > self.nzWidth||self.mouseTop > self.nzHeight){
self.setElements("hide");
return;
}else{
if(self.options.showLens){
self.lensLeftPos=String(Math.floor(self.mouseLeft - self.zoomLens.width() / 2));
self.lensTopPos=String(Math.floor(self.mouseTop - self.zoomLens.height() / 2));
}
if(self.Etoppos){
self.lensTopPos=0;
}
if(self.Eloppos){
self.windowLeftPos=0;
self.lensLeftPos=0;
self.tintpos=0;
}
if(self.options.zoomType=="window"){
if(self.Eboppos){
self.lensTopPos=Math.max((self.nzHeight)-self.zoomLens.height()-(self.options.lensBorderSize*2), 0);
}
if(self.Eroppos){
self.lensLeftPos=(self.nzWidth-(self.zoomLens.width())-(self.options.lensBorderSize*2));
}}
if(self.options.zoomType=="inner"){
if(self.Eboppos){
self.lensTopPos=Math.max(((self.nzHeight)-(self.options.lensBorderSize*2)), 0);
}
if(self.Eroppos){
self.lensLeftPos=(self.nzWidth-(self.nzWidth)-(self.options.lensBorderSize*2));
}}
if(self.options.zoomType=="lens"){
self.windowLeftPos=String(((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomLens.width() / 2) * (-1));
self.windowTopPos=String(((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomLens.height() / 2) * (-1));
self.zoomLens.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' });
if(self.changeBgSize){
if(self.nzHeight>self.nzWidth){
if(self.options.zoomType=="lens"){
self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' });
}
self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' });
}else{
if(self.options.zoomType=="lens"){
self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' });
}
self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' });
}
self.changeBgSize=false;
}
self.setWindowPostition(e);
}
if(self.options.tint&&self.options.zoomType!="inner"){
self.setTintPosition(e);
}
if(self.options.zoomType=="window"){
self.setWindowPostition(e);
}
if(self.options.zoomType=="inner"){
self.setWindowPostition(e);
}
if(self.options.showLens){
if(self.fullwidth&&self.options.zoomType!="lens"){
self.lensLeftPos=0;
}
self.zoomLens.css({ left: self.lensLeftPos + 'px', top: self.lensTopPos + 'px' })
}}
},
showHideWindow: function(change){
var self=this;
if(change=="show"){
if(!self.isWindowActive){
if(self.options.zoomWindowFadeIn){
self.zoomWindow.stop(true, true, false).fadeIn(self.options.zoomWindowFadeIn);
}else{self.zoomWindow.show();}
self.isWindowActive=true;
}}
if(change=="hide"){
if(self.isWindowActive){
if(self.options.zoomWindowFadeOut){
self.zoomWindow.stop(true, true).fadeOut(self.options.zoomWindowFadeOut, function (){
if(self.loop){
clearInterval(self.loop);
self.loop=false;
}});
}else{self.zoomWindow.hide();}
self.isWindowActive=false;
}}
},
showHideLens: function(change){
var self=this;
if(change=="show"){
if(!self.isLensActive){
if(self.options.lensFadeIn){
self.zoomLens.stop(true, true, false).fadeIn(self.options.lensFadeIn);
}else{self.zoomLens.show();}
self.isLensActive=true;
}}
if(change=="hide"){
if(self.isLensActive){
if(self.options.lensFadeOut){
self.zoomLens.stop(true, true).fadeOut(self.options.lensFadeOut);
}else{self.zoomLens.hide();}
self.isLensActive=false;
}}
},
showHideTint: function(change){
var self=this;
if(change=="show"){
if(!self.isTintActive){
if(self.options.zoomTintFadeIn){
self.zoomTint.css({opacity:self.options.tintOpacity}).animate().stop(true, true).fadeIn("slow");
}else{
self.zoomTint.css({opacity:self.options.tintOpacity}).animate();
self.zoomTint.show();
}
self.isTintActive=true;
}}
if(change=="hide"){
if(self.isTintActive){
if(self.options.zoomTintFadeOut){
self.zoomTint.stop(true, true).fadeOut(self.options.zoomTintFadeOut);
}else{self.zoomTint.hide();}
self.isTintActive=false;
}}
},
setLensPostition: function(e){
},
setWindowPostition: function(e){
var self=this;
if(!isNaN(self.options.zoomWindowPosition)){
switch (self.options.zoomWindowPosition){
case 1:
self.windowOffsetTop=(self.options.zoomWindowOffety);
self.windowOffsetLeft=(+self.nzWidth);
break;
case 2:
if(self.options.zoomWindowHeight > self.nzHeight){
self.windowOffsetTop=((self.options.zoomWindowHeight/2)-(self.nzHeight/2))*(-1);
self.windowOffsetLeft=(self.nzWidth);
}else{
}
break;
case 3:
self.windowOffsetTop=(self.nzHeight - self.zoomWindow.height() - (self.options.borderSize*2));
self.windowOffsetLeft=(self.nzWidth);
break;
case 4:
self.windowOffsetTop=(self.nzHeight);
self.windowOffsetLeft=(self.nzWidth);
break;
case 5:
self.windowOffsetTop=(self.nzHeight);
self.windowOffsetLeft=(self.nzWidth-self.zoomWindow.width()-(self.options.borderSize*2));
break;
case 6:
if(self.options.zoomWindowHeight > self.nzHeight){
self.windowOffsetTop=(self.nzHeight);
self.windowOffsetLeft=((self.options.zoomWindowWidth/2)-(self.nzWidth/2)+(self.options.borderSize*2))*(-1);
}else{
}
break;
case 7:
self.windowOffsetTop=(self.nzHeight);
self.windowOffsetLeft=0;
break;
case 8:
self.windowOffsetTop=(self.nzHeight);
self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))* (-1);
break;
case 9:
self.windowOffsetTop=(self.nzHeight - self.zoomWindow.height() - (self.options.borderSize*2));
self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))* (-1);
break;
case 10:
if(self.options.zoomWindowHeight > self.nzHeight){
self.windowOffsetTop=((self.options.zoomWindowHeight/2)-(self.nzHeight/2))*(-1);
self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))* (-1);
}else{
}
break;
case 11:
self.windowOffsetTop=(self.options.zoomWindowOffety);
self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))* (-1);
break;
case 12:
self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1);
self.windowOffsetLeft=(self.zoomWindow.width()+(self.options.borderSize*2))* (-1);
break;
case 13:
self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1);
self.windowOffsetLeft=(0);
break;
case 14:
if(self.options.zoomWindowHeight > self.nzHeight){
self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1);
self.windowOffsetLeft=((self.options.zoomWindowWidth/2)-(self.nzWidth/2)+(self.options.borderSize*2))*(-1);
}else{
}
break;
case 15:
self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1);
self.windowOffsetLeft=(self.nzWidth-self.zoomWindow.width()-(self.options.borderSize*2));
break;
case 16:
self.windowOffsetTop=(self.zoomWindow.height()+(self.options.borderSize*2))*(-1);
self.windowOffsetLeft=(self.nzWidth);
break;
default:
self.windowOffsetTop=(self.options.zoomWindowOffety);
self.windowOffsetLeft=(self.nzWidth);
}}else{
self.externalContainer=$('#'+self.options.zoomWindowPosition);
self.externalContainerWidth=self.externalContainer.width();
self.externalContainerHeight=self.externalContainer.height();
self.externalContainerOffset=self.externalContainer.offset();
self.windowOffsetTop=self.externalContainerOffset.top;
self.windowOffsetLeft=self.externalContainerOffset.left;
}
self.isWindowSet=true;
self.windowOffsetTop=self.windowOffsetTop + self.options.zoomWindowOffety;
self.windowOffsetLeft=self.windowOffsetLeft + self.options.zoomWindowOffetx;
self.zoomWindow.css({ top: self.windowOffsetTop});
self.zoomWindow.css({ left: self.windowOffsetLeft});
if(self.options.zoomType=="inner"){
self.zoomWindow.css({ top: 0});
self.zoomWindow.css({ left: 0});
}
self.windowLeftPos=String(((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomWindow.width() / 2) * (-1));
self.windowTopPos=String(((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomWindow.height() / 2) * (-1));
if(self.Etoppos){self.windowTopPos=0;}
if(self.Eloppos){self.windowLeftPos=0;}
if(self.Eboppos){self.windowTopPos=(self.largeHeight/self.currentZoomLevel-self.zoomWindow.height())*(-1);  }
if(self.Eroppos){self.windowLeftPos=((self.largeWidth/self.currentZoomLevel-self.zoomWindow.width())*(-1));}
if(self.fullheight){
self.windowTopPos=0;
}
if(self.fullwidth){
self.windowLeftPos=0;
}
if(self.options.zoomType=="window"||self.options.zoomType=="inner"){
if(self.zoomLock==1){
if(self.widthRatio <=1){
self.windowLeftPos=0;
}
if(self.heightRatio <=1){
self.windowTopPos=0;
}}
if(self.options.zoomType=="window"){
if(self.largeHeight < self.options.zoomWindowHeight){
self.windowTopPos=0;
}
if(self.largeWidth < self.options.zoomWindowWidth){
self.windowLeftPos=0;
}}
if(self.options.easing){
if(!self.xp){self.xp=0;}
if(!self.yp){self.yp=0;}
if(!self.loop){
self.loop=setInterval(function(){
self.xp +=(self.windowLeftPos  - self.xp) / self.options.easingAmount;
self.yp +=(self.windowTopPos  - self.yp) / self.options.easingAmount;
if(self.scrollingLock){
clearInterval(self.loop);
self.xp=self.windowLeftPos;
self.yp=self.windowTopPos
self.xp=((e.pageX - self.nzOffset.left) * self.widthRatio - self.zoomWindow.width() / 2) * (-1);
self.yp=(((e.pageY - self.nzOffset.top) * self.heightRatio - self.zoomWindow.height() / 2) * (-1));
if(self.changeBgSize){
if(self.nzHeight>self.nzWidth){
if(self.options.zoomType=="lens"){
self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' });
}
self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' });
}else{
if(self.options.zoomType!="lens"){
self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvalueheight + 'px' });
}
self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' });
}
/*
if(!self.bgxp){self.bgxp=self.largeWidth/self.newvalue;}
if(!self.bgyp){self.bgyp=self.largeHeight/self.newvalue ;}
if(!self.bgloop){
self.bgloop=setInterval(function(){
self.bgxp +=(self.largeWidth/self.newvalue  - self.bgxp) / self.options.easingAmount;
self.bgyp +=(self.largeHeight/self.newvalue  - self.bgyp) / self.options.easingAmount;
self.zoomWindow.css({ "background-size": self.bgxp + 'px ' + self.bgyp + 'px' });
}, 16);
}
*/
self.changeBgSize=false;
}
self.zoomWindow.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' });
self.scrollingLock=false;
self.loop=false;
}
else if(Math.round(Math.abs(self.xp - self.windowLeftPos) + Math.abs(self.yp - self.windowTopPos)) < 1){
clearInterval(self.loop);
self.zoomWindow.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' });
self.loop=false;
}else{
if(self.changeBgSize){
if(self.nzHeight>self.nzWidth){
if(self.options.zoomType=="lens"){
self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' });
}
self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' });
}else{
if(self.options.zoomType!="lens"){
self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' });
}
self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' });
}
self.changeBgSize=false;
}
self.zoomWindow.css({ backgroundPosition: self.xp + 'px ' + self.yp + 'px' });
}}, 16);
}}else{
if(self.changeBgSize){
if(self.nzHeight>self.nzWidth){
if(self.options.zoomType=="lens"){
self.zoomLens.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' });
}
self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' });
}else{
if(self.options.zoomType=="lens"){
self.zoomLens.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' });
}
if((self.largeHeight/self.newvaluewidth) < self.options.zoomWindowHeight){
self.zoomWindow.css({ "background-size": self.largeWidth/self.newvaluewidth + 'px ' + self.largeHeight/self.newvaluewidth + 'px' });
}else{
self.zoomWindow.css({ "background-size": self.largeWidth/self.newvalueheight + 'px ' + self.largeHeight/self.newvalueheight + 'px' });
}}
self.changeBgSize=false;
}
self.zoomWindow.css({ backgroundPosition: self.windowLeftPos + 'px ' + self.windowTopPos + 'px' });
}}
},
setTintPosition: function(e){
var self=this;
self.nzOffset=self.$elem.offset();
self.tintpos=String(((e.pageX - self.nzOffset.left)-(self.zoomLens.width() / 2)) * (-1));
self.tintposy=String(((e.pageY - self.nzOffset.top) - self.zoomLens.height() / 2) * (-1));
if(self.Etoppos){
self.tintposy=0;
}
if(self.Eloppos){
self.tintpos=0;
}
if(self.Eboppos){
self.tintposy=(self.nzHeight-self.zoomLens.height()-(self.options.lensBorderSize*2))*(-1);
}
if(self.Eroppos){
self.tintpos=((self.nzWidth-self.zoomLens.width()-(self.options.lensBorderSize*2))*(-1));
}
if(self.options.tint){
if(self.fullheight){
self.tintposy=0;
}
if(self.fullwidth){
self.tintpos=0;
}
self.zoomTintImage.css({'left': self.tintpos+'px'});
self.zoomTintImage.css({'top': self.tintposy+'px'});
}},
swaptheimage: function(smallimage, largeimage){
var self=this;
var newImg=new Image();
if(self.options.loadingIcon){
self.spinner=$('<div style="background: url(\''+self.options.loadingIcon+'\') no-repeat center;height:'+self.nzHeight+'px;width:'+self.nzWidth+'px;z-index: 2000;position: absolute; background-position: center center;"></div>');
self.$elem.after(self.spinner);
}
self.options.onImageSwap(self.$elem);
newImg.onload=function(){
self.largeWidth=newImg.width;
self.largeHeight=newImg.height;
self.zoomImage=largeimage;
self.zoomWindow.css({ "background-size": self.largeWidth + 'px ' + self.largeHeight + 'px' });
self.swapAction(smallimage, largeimage);
return;
}
newImg.src=largeimage;
},
swapAction: function(smallimage, largeimage){
var self=this;
var newImg2=new Image();
newImg2.onload=function(){
self.nzHeight=newImg2.height;
self.nzWidth=newImg2.width;
self.options.onImageSwapComplete(self.$elem);
self.doneCallback();
return;
}
newImg2.src=smallimage;
self.currentZoomLevel=self.options.zoomLevel;
self.options.maxZoomLevel=false;
if(self.options.zoomType=="lens"){
self.zoomLens.css({ backgroundImage: "url('" + largeimage + "')" });
}
if(self.options.zoomType=="window"){
self.zoomWindow.css({ backgroundImage: "url('" + largeimage + "')" });
}
if(self.options.zoomType=="inner"){
self.zoomWindow.css({ backgroundImage: "url('" + largeimage + "')" });
}
self.currentImage=largeimage;
if(self.options.imageCrossfade){
var oldImg=self.$elem;
var newImg=oldImg.clone();
self.$elem.attr("src",smallimage)
self.$elem.after(newImg);
newImg.stop(true).fadeOut(self.options.imageCrossfade, function(){
$(this).remove();
});
self.$elem.width("auto").removeAttr("width");
self.$elem.height("auto").removeAttr("height");
oldImg.fadeIn(self.options.imageCrossfade);
if(self.options.tint&&self.options.zoomType!="inner"){
var oldImgTint=self.zoomTintImage;
var newImgTint=oldImgTint.clone();
self.zoomTintImage.attr("src",largeimage)
self.zoomTintImage.after(newImgTint);
newImgTint.stop(true).fadeOut(self.options.imageCrossfade, function(){
$(this).remove();
});
oldImgTint.fadeIn(self.options.imageCrossfade);
self.zoomTint.css({ height: self.$elem.height()});
self.zoomTint.css({ width: self.$elem.width()});
}
self.zoomContainer.css("height", self.$elem.height());
self.zoomContainer.css("width", self.$elem.width());
if(self.options.zoomType=="inner"){
if(!self.options.constrainType){
self.zoomWrap.parent().css("height", self.$elem.height());
self.zoomWrap.parent().css("width", self.$elem.width());
self.zoomWindow.css("height", self.$elem.height());
self.zoomWindow.css("width", self.$elem.width());
}}
if(self.options.imageCrossfade){
self.zoomWrap.css("height", self.$elem.height());
self.zoomWrap.css("width", self.$elem.width());
}}else{
self.$elem.attr("src",smallimage);
if(self.options.tint){
self.zoomTintImage.attr("src",largeimage);
self.zoomTintImage.attr("height",self.$elem.height());
self.zoomTintImage.css({ height: self.$elem.height()});
self.zoomTint.css({ height: self.$elem.height()});
}
self.zoomContainer.css("height", self.$elem.height());
self.zoomContainer.css("width", self.$elem.width());
if(self.options.imageCrossfade){
self.zoomWrap.css("height", self.$elem.height());
self.zoomWrap.css("width", self.$elem.width());
}}
if(self.options.constrainType){
if(self.options.constrainType=="height"){
self.zoomContainer.css("height", self.options.constrainSize);
self.zoomContainer.css("width", "auto");
if(self.options.imageCrossfade){
self.zoomWrap.css("height", self.options.constrainSize);
self.zoomWrap.css("width", "auto");
self.constwidth=self.zoomWrap.width();
}else{
self.$elem.css("height", self.options.constrainSize);
self.$elem.css("width", "auto");
self.constwidth=self.$elem.width();
}
if(self.options.zoomType=="inner"){
self.zoomWrap.parent().css("height", self.options.constrainSize);
self.zoomWrap.parent().css("width", self.constwidth);
self.zoomWindow.css("height", self.options.constrainSize);
self.zoomWindow.css("width", self.constwidth);
}
if(self.options.tint){
self.tintContainer.css("height", self.options.constrainSize);
self.tintContainer.css("width", self.constwidth);
self.zoomTint.css("height", self.options.constrainSize);
self.zoomTint.css("width", self.constwidth);
self.zoomTintImage.css("height", self.options.constrainSize);
self.zoomTintImage.css("width", self.constwidth);
}}
if(self.options.constrainType=="width"){
self.zoomContainer.css("height", "auto");
self.zoomContainer.css("width", self.options.constrainSize);
if(self.options.imageCrossfade){
self.zoomWrap.css("height", "auto");
self.zoomWrap.css("width", self.options.constrainSize);
self.constheight=self.zoomWrap.height();
}else{
self.$elem.css("height", "auto");
self.$elem.css("width", self.options.constrainSize);
self.constheight=self.$elem.height();
}
if(self.options.zoomType=="inner"){
self.zoomWrap.parent().css("height", self.constheight);
self.zoomWrap.parent().css("width", self.options.constrainSize);
self.zoomWindow.css("height", self.constheight);
self.zoomWindow.css("width", self.options.constrainSize);
}
if(self.options.tint){
self.tintContainer.css("height", self.constheight);
self.tintContainer.css("width", self.options.constrainSize);
self.zoomTint.css("height", self.constheight);
self.zoomTint.css("width", self.options.constrainSize);
self.zoomTintImage.css("height", self.constheight);
self.zoomTintImage.css("width", self.options.constrainSize);
}}
}},
doneCallback: function(){
var self=this;
if(self.options.loadingIcon){
self.spinner.hide();
}
self.nzOffset=self.$elem.offset();
self.nzWidth=self.$elem.width();
self.nzHeight=self.$elem.height();
self.currentZoomLevel=self.options.zoomLevel;
self.widthRatio=self.largeWidth / self.nzWidth;
self.heightRatio=self.largeHeight / self.nzHeight;
if(self.options.zoomType=="window"){
if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){
lensHeight=self.nzHeight;
}else{
lensHeight=String((self.options.zoomWindowHeight/self.heightRatio))
}
if(self.options.zoomWindowWidth < self.options.zoomWindowWidth){
lensWidth=self.nzWidth;
}else{
lensWidth=(self.options.zoomWindowWidth/self.widthRatio);
}
if(self.zoomLens){
self.zoomLens.css('width', lensWidth);
self.zoomLens.css('height', lensHeight);
}}
},
getCurrentImage: function(){
var self=this;
return self.zoomImage;
},
getGalleryList: function(){
var self=this;
self.gallerylist=[];
if(self.options.gallery){
$('#'+self.options.gallery + ' a').each(function(){
var img_src='';
if($(this).data("zoom-image")){
img_src=$(this).data("zoom-image");
}
else if($(this).data("image")){
img_src=$(this).data("image");
}
if(img_src==self.zoomImage){
self.gallerylist.unshift({
href: ''+img_src+'',
title: $(this).find('img').attr("title")
});
}else{
self.gallerylist.push({
href: ''+img_src+'',
title: $(this).find('img').attr("title")
});
}});
}else{
self.gallerylist.push({
href: ''+self.zoomImage+'',
title: $(this).find('img').attr("title")
});
}
return self.gallerylist;
},
changeZoomLevel: function(value){
var self=this;
self.scrollingLock=true;
self.newvalue=parseFloat(value).toFixed(2);
newvalue=parseFloat(value).toFixed(2);
maxheightnewvalue=self.largeHeight/((self.options.zoomWindowHeight / self.nzHeight) * self.nzHeight);
maxwidthtnewvalue=self.largeWidth/((self.options.zoomWindowWidth / self.nzWidth) * self.nzWidth);
if(self.options.zoomType!="inner"){
if(maxheightnewvalue <=newvalue){
self.heightRatio=(self.largeHeight/maxheightnewvalue) / self.nzHeight;
self.newvalueheight=maxheightnewvalue;
self.fullheight=true;
}else{
self.heightRatio=(self.largeHeight/newvalue) / self.nzHeight;
self.newvalueheight=newvalue;
self.fullheight=false;
}
if(maxwidthtnewvalue <=newvalue){
self.widthRatio=(self.largeWidth/maxwidthtnewvalue) / self.nzWidth;
self.newvaluewidth=maxwidthtnewvalue;
self.fullwidth=true;
}else{
self.widthRatio=(self.largeWidth/newvalue) / self.nzWidth;
self.newvaluewidth=newvalue;
self.fullwidth=false;
}
if(self.options.zoomType=="lens"){
if(maxheightnewvalue <=newvalue){
self.fullwidth=true;
self.newvaluewidth=maxheightnewvalue;
}else{
self.widthRatio=(self.largeWidth/newvalue) / self.nzWidth;
self.newvaluewidth=newvalue;
self.fullwidth=false;
}}}
if(self.options.zoomType=="inner"){
maxheightnewvalue=parseFloat(self.largeHeight/self.nzHeight).toFixed(2);
maxwidthtnewvalue=parseFloat(self.largeWidth/self.nzWidth).toFixed(2);
if(newvalue > maxheightnewvalue){
newvalue=maxheightnewvalue;
}
if(newvalue > maxwidthtnewvalue){
newvalue=maxwidthtnewvalue;
}
if(maxheightnewvalue <=newvalue){
self.heightRatio=(self.largeHeight/newvalue) / self.nzHeight;
if(newvalue > maxheightnewvalue){
self.newvalueheight=maxheightnewvalue;
}else{
self.newvalueheight=newvalue;
}
self.fullheight=true;
}else{
self.heightRatio=(self.largeHeight/newvalue) / self.nzHeight;
if(newvalue > maxheightnewvalue){
self.newvalueheight=maxheightnewvalue;
}else{
self.newvalueheight=newvalue;
}
self.fullheight=false;
}
if(maxwidthtnewvalue <=newvalue){
self.widthRatio=(self.largeWidth/newvalue) / self.nzWidth;
if(newvalue > maxwidthtnewvalue){
self.newvaluewidth=maxwidthtnewvalue;
}else{
self.newvaluewidth=newvalue;
}
self.fullwidth=true;
}else{
self.widthRatio=(self.largeWidth/newvalue) / self.nzWidth;
self.newvaluewidth=newvalue;
self.fullwidth=false;
}}
scrcontinue=false;
if(self.options.zoomType=="inner"){
if(self.nzWidth >=self.nzHeight){
if(self.newvaluewidth <=maxwidthtnewvalue){
scrcontinue=true;
}else{
scrcontinue=false;
self.fullheight=true;
self.fullwidth=true;
}}
if(self.nzHeight > self.nzWidth){
if(self.newvaluewidth <=maxwidthtnewvalue){
scrcontinue=true;
}else{
scrcontinue=false;
self.fullheight=true;
self.fullwidth=true;
}}
}
if(self.options.zoomType!="inner"){
scrcontinue=true;
}
if(scrcontinue){
self.zoomLock=0;
self.changeZoom=true;
if(((self.options.zoomWindowHeight)/self.heightRatio) <=self.nzHeight){
self.currentZoomLevel=self.newvalueheight;
if(self.options.zoomType!="lens"&&self.options.zoomType!="inner"){
self.changeBgSize=true;
self.zoomLens.css({height: String((self.options.zoomWindowHeight)/self.heightRatio) + 'px' })
}
if(self.options.zoomType=="lens"||self.options.zoomType=="inner"){
self.changeBgSize=true;
}}
if((self.options.zoomWindowWidth/self.widthRatio) <=self.nzWidth){
if(self.options.zoomType!="inner"){
if(self.newvaluewidth > self.newvalueheight){
self.currentZoomLevel=self.newvaluewidth;
}}
if(self.options.zoomType!="lens"&&self.options.zoomType!="inner"){
self.changeBgSize=true;
self.zoomLens.css({width: String((self.options.zoomWindowWidth)/self.widthRatio) + 'px' })
}
if(self.options.zoomType=="lens"||self.options.zoomType=="inner"){
self.changeBgSize=true;
}}
if(self.options.zoomType=="inner"){
self.changeBgSize=true;
if(self.nzWidth > self.nzHeight){
self.currentZoomLevel=self.newvaluewidth;
}
if(self.nzHeight > self.nzWidth){
self.currentZoomLevel=self.newvaluewidth;
}}
}
self.setPosition(self.currentLoc);
},
closeAll: function(){
if(self.zoomWindow){self.zoomWindow.hide();}
if(self.zoomLens){self.zoomLens.hide();}
if(self.zoomTint){self.zoomTint.hide();}},
changeState: function(value){
var self=this;
if(value=='enable'){self.options.zoomEnabled=true;}
if(value=='disable'){self.options.zoomEnabled=false;}}
};
$.fn.elevateZoom=function(options){
return this.each(function(){
var elevate=Object.create(ElevateZoom);
elevate.init(options, this);
$.data(this, 'elevateZoom', elevate);
});
};
$.fn.elevateZoom.options={
zoomActivation: "hover",
zoomEnabled: true,
preloading: 1,
zoomLevel: 1,
scrollZoom: false,
scrollZoomIncrement: 0.1,
minZoomLevel: false,
maxZoomLevel: false,
easing: false,
easingAmount: 12,
lensSize: 200,
zoomWindowWidth: 400,
zoomWindowHeight: 400,
zoomWindowOffetx: 0,
zoomWindowOffety: 0,
zoomWindowPosition: 1,
zoomWindowBgColour: "#fff",
lensFadeIn: false,
lensFadeOut: false,
debug: false,
zoomWindowFadeIn: false,
zoomWindowFadeOut: false,
zoomWindowAlwaysShow: false,
zoomTintFadeIn: false,
zoomTintFadeOut: false,
borderSize: 4,
showLens: true,
borderColour: "#888",
lensBorderSize: 1,
lensBorderColour: "#000",
lensShape: "square",
zoomType: "window",
containLensZoom: false,
lensColour: "white",
lensOpacity: 0.4,
lenszoom: false,
tint: false,
tintColour: "#333",
tintOpacity: 0.4,
gallery: false,
galleryActiveClass: "zoomGalleryActive",
imageCrossfade: false,
constrainType: false,
constrainSize: false,
loadingIcon: false, //http://www.example.com/spinner.gif
cursor:"default",
responsive:true,
onComplete: $.noop,
onDestroy: function(){},
onZoomedImageLoaded: function(){},
onImageSwap: $.noop,
onImageSwapComplete: $.noop
};})(jQuery, window, document);
!function(a,b,c,d){c.swipebox=function(e,f){var g,h,i={useCSS:!0,useSVG:!0,initialIndexOnArray:0,removeBarsOnMobile:!0,hideCloseButtonOnMobile:!1,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"cccccc",beforeOpen:null,afterOpen:null,afterClose:null,afterMedia:null,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},j=this,k=[],l=e.selector,m=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),n=null!==m||b.createTouch!==d||"ontouchstart"in a||"onmsgesturechange"in a||navigator.msMaxTouchPoints,o=!!b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,p=a.innerWidth?a.innerWidth:c(a).width(),q=a.innerHeight?a.innerHeight:c(a).height(),r=0,s='<div id="swipebox-overlay">					<div id="swipebox-container">						<div id="swipebox-slider"></div>						<div id="swipebox-top-bar">							<div id="swipebox-title"></div>						</div>						<div id="swipebox-bottom-bar">							<div id="swipebox-arrows">								<a id="swipebox-prev"></a>								<a id="swipebox-next"></a>							</div>						</div>						<a id="swipebox-close"></a>					</div>			</div>';j.settings={},c.swipebox.close=function(){g.closeSlide()},c.swipebox.extend=function(){return g},j.init=function(){j.settings=c.extend({},i,f),c.isArray(e)?(k=e,g.target=c(a),g.init(j.settings.initialIndexOnArray)):c(b).on("click",l,function(a){if("slide current"===a.target.parentNode.className)return!1;c.isArray(e)||(g.destroy(),h=c(l),g.actions()),k=[];var b,d,f;f||(d="data-rel",f=c(this).attr(d)),f||(d="rel",f=c(this).attr(d)),h=f&&""!==f&&"nofollow"!==f?c(l).filter("["+d+'="'+f+'"]'):c(l),h.each(function(){var a=null,b=null;c(this).attr("title")&&(a=c(this).attr("title")),c(this).attr("href")&&(b=c(this).attr("href")),k.push({href:b,title:a})}),b=h.index(c(this)),a.preventDefault(),a.stopPropagation(),g.target=c(a.target),g.init(b)})},g={init:function(a){j.settings.beforeOpen&&j.settings.beforeOpen(),this.target.trigger("swipebox-start"),c.swipebox.isOpen=!0,this.build(),this.openSlide(a),this.openMedia(a),this.preloadMedia(a+1),this.preloadMedia(a-1),j.settings.afterOpen&&j.settings.afterOpen(a)},build:function(){var a,b=this;c("body").append(s),o&&j.settings.useSVG===!0&&(a=c("#swipebox-close").css("background-image"),a=a.replace("png","svg"),c("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image":a})),m&&j.settings.removeBarsOnMobile&&c("#swipebox-bottom-bar, #swipebox-top-bar").remove(),c.each(k,function(){c("#swipebox-slider").append('<div class="slide"></div>')}),b.setDim(),b.actions(),n&&b.gesture(),b.keyboard(),b.animBars(),b.resize()},setDim:function(){var b,d,e={};"onorientationchange"in a?a.addEventListener("orientationchange",function(){0===a.orientation?(b=p,d=q):(90===a.orientation||-90===a.orientation)&&(b=q,d=p)},!1):(b=a.innerWidth?a.innerWidth:c(a).width(),d=a.innerHeight?a.innerHeight:c(a).height()),e={width:b,height:d},c("#swipebox-overlay").css(e)},resize:function(){var b=this;c(a).resize(function(){b.setDim()}).resize()},supportTransition:function(){var a,c="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(a=0;a<c.length;a++)if(b.createElement("div").style[c[a]]!==d)return c[a];return!1},doCssTrans:function(){return j.settings.useCSS&&this.supportTransition()?!0:void 0},gesture:function(){var a,b,d,e,f,g,h=this,i=!1,j=!1,l=10,m=50,n={},o={},q=c("#swipebox-top-bar, #swipebox-bottom-bar"),s=c("#swipebox-slider");q.addClass("visible-bars"),h.setTimeout(),c("body").bind("touchstart",function(h){return c(this).addClass("touching"),a=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current")),o=h.originalEvent.targetTouches[0],n.pageX=h.originalEvent.targetTouches[0].pageX,n.pageY=h.originalEvent.targetTouches[0].pageY,c("#swipebox-slider").css({"-webkit-transform":"translate3d("+r+"%, 0, 0)",transform:"translate3d("+r+"%, 0, 0)"}),c(".touching").bind("touchmove",function(h){if(h.preventDefault(),h.stopPropagation(),o=h.originalEvent.targetTouches[0],!j&&(f=d,d=o.pageY-n.pageY,Math.abs(d)>=m||i)){var q=.75-Math.abs(d)/s.height();s.css({top:d+"px"}),s.css({opacity:q}),i=!0}e=b,b=o.pageX-n.pageX,g=100*b/p,!j&&!i&&Math.abs(b)>=l&&(c("#swipebox-slider").css({"-webkit-transition":"",transition:""}),j=!0),j&&(b>0?0===a?c("#swipebox-overlay").addClass("leftSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"})):0>b&&(k.length===a+1?c("#swipebox-overlay").addClass("rightSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"}))))}),!1}).bind("touchend",function(a){if(a.preventDefault(),a.stopPropagation(),c("#swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),d=o.pageY-n.pageY,b=o.pageX-n.pageX,g=100*b/p,i)if(i=!1,Math.abs(d)>=2*m&&Math.abs(d)>Math.abs(f)){var k=d>0?s.height():-s.height();s.animate({top:k+"px",opacity:0},300,function(){h.closeSlide()})}else s.animate({top:0,opacity:1},300);else j?(j=!1,b>=l&&b>=e?h.getPrev():-l>=b&&e>=b&&h.getNext()):q.hasClass("visible-bars")?(h.clearTimeout(),h.hideBars()):(h.showBars(),h.setTimeout());c("#swipebox-slider").css({"-webkit-transform":"translate3d("+r+"%, 0, 0)",transform:"translate3d("+r+"%, 0, 0)"}),c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c(".touching").off("touchmove").removeClass("touching")})},setTimeout:function(){if(j.settings.hideBarsDelay>0){var b=this;b.clearTimeout(),b.timeout=a.setTimeout(function(){b.hideBars()},j.settings.hideBarsDelay)}},clearTimeout:function(){a.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.addClass("visible-bars"):(c("#swipebox-top-bar").animate({top:0},500),c("#swipebox-bottom-bar").animate({bottom:0},500),setTimeout(function(){a.addClass("visible-bars")},1e3))},hideBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.removeClass("visible-bars"):(c("#swipebox-top-bar").animate({top:"-50px"},500),c("#swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout(function(){a.removeClass("visible-bars")},1e3))},animBars:function(){var a=this,b=c("#swipebox-top-bar, #swipebox-bottom-bar");b.addClass("visible-bars"),a.setTimeout(),c("#swipebox-slider").click(function(){b.hasClass("visible-bars")||(a.showBars(),a.setTimeout())}),c("#swipebox-bottom-bar").hover(function(){a.showBars(),b.addClass("visible-bars"),a.clearTimeout()},function(){j.settings.hideBarsDelay>0&&(b.removeClass("visible-bars"),a.setTimeout())})},keyboard:function(){var b=this;c(a).bind("keyup",function(a){a.preventDefault(),a.stopPropagation(),37===a.keyCode?b.getPrev():39===a.keyCode?b.getNext():27===a.keyCode&&b.closeSlide()})},actions:function(){var a=this,b="touchend click";k.length<2?(c("#swipebox-bottom-bar").hide(),d===k[1]&&c("#swipebox-top-bar").hide()):(c("#swipebox-prev").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getPrev(),a.setTimeout()}),c("#swipebox-next").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getNext(),a.setTimeout()})),c("#swipebox-close").bind(b,function(){a.closeSlide()})},setSlide:function(a,b){b=b||!1;var d=c("#swipebox-slider");r=100*-a,this.doCssTrans()?d.css({"-webkit-transform":"translate3d("+100*-a+"%, 0, 0)",transform:"translate3d("+100*-a+"%, 0, 0)"}):d.animate({left:100*-a+"%"}),c("#swipebox-slider .slide").removeClass("current"),c("#swipebox-slider .slide").eq(a).addClass("current"),this.setTitle(a),b&&d.fadeIn(),c("#swipebox-prev, #swipebox-next").removeClass("disabled"),0===a?c("#swipebox-prev").addClass("disabled"):a===k.length-1&&j.settings.loopAtEnd!==!0&&c("#swipebox-next").addClass("disabled")},openSlide:function(b){c("html").addClass("swipebox-html"),n?(c("html").addClass("swipebox-touch"),j.settings.hideCloseButtonOnMobile&&c("html").addClass("swipebox-no-close-button")):c("html").addClass("swipebox-no-touch"),c(a).trigger("resize"),this.setSlide(b,!0)},preloadMedia:function(a){var b=this,c=null;k[a]!==d&&(c=k[a].href),b.isVideo(c)?b.openMedia(a):setTimeout(function(){b.openMedia(a)},1e3)},openMedia:function(a){var b,e,f=this;return k[a]!==d&&(b=k[a].href),0>a||a>=k.length?!1:(e=c("#swipebox-slider .slide").eq(a),void(f.isVideo(b)?(e.html(f.getVideo(b)),j.settings.afterMedia&&j.settings.afterMedia(a)):(e.addClass("slide-loading"),f.loadMedia(b,function(){e.removeClass("slide-loading"),e.html(this),j.settings.afterMedia&&j.settings.afterMedia(a)}))))},setTitle:function(a){var b=null;c("#swipebox-title").empty(),k[a]!==d&&(b=k[a].title),b?(c("#swipebox-top-bar").show(),c("#swipebox-title").append(b)):c("#swipebox-top-bar").hide()},isVideo:function(a){if(a){if(a.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||a.match(/vimeo\.com\/([0-9]*)/)||a.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))return!0;if(a.toLowerCase().indexOf("swipeboxvideo=1")>=0)return!0}},parseUri:function(a,d){var e=b.createElement("a"),f={};return e.href=decodeURIComponent(a),e.search&&(f=JSON.parse('{"'+e.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),c.isPlainObject(d)&&(f=c.extend(f,d,j.settings.queryStringData)),c.map(f,function(a,b){return a&&a>""?encodeURIComponent(b)+"="+encodeURIComponent(a):void 0}).join("&")},getVideo:function(a){var b="",c=a.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),d=a.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),e=a.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),f="";return c||d?(d&&(c=d),f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",v:""}),b='<iframe width="560" height="315" src="//'+c[1]+"/embed/"+c[2]+"?"+f+'" frameborder="0" allowfullscreen></iframe>'):e?(f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:j.settings.vimeoColor}),b='<iframe width="560" height="315"  src="//player.vimeo.com/video/'+e[1]+"?"+f+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'):b='<iframe width="560" height="315" src="'+a+'" frameborder="0" allowfullscreen></iframe>','<div class="swipebox-video-container" style="max-width:'+j.settings.videoMaxWidth+'px"><div class="swipebox-video">'+b+"</div></div>"},loadMedia:function(a,b){if(0===a.trim().indexOf("#"))b.call(c("<div>",{"class":"swipebox-inline-container"}).append(c(a).clone().toggleClass(j.settings.toggleClassOnLoad)));else if(!this.isVideo(a)){var d=c("<img>").on("load",function(){b.call(d)});d.attr("src",a)}},getNext:function(){var a,b=this,d=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current"));d+1<k.length?(a=c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src",a),d++,b.setSlide(d),b.preloadMedia(d+1),j.settings.nextSlide&&j.settings.nextSlide(d)):j.settings.loopAtEnd===!0?(a=c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src",a),d=0,b.preloadMedia(d),b.setSlide(d),b.preloadMedia(d+1),j.settings.nextSlide&&j.settings.nextSlide(d)):(c("#swipebox-overlay").addClass("rightSpring"),setTimeout(function(){c("#swipebox-overlay").removeClass("rightSpring")},500))},getPrev:function(){var a,b=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current"));b>0?(a=c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src",a),b--,this.setSlide(b),this.preloadMedia(b-1),j.settings.prevSlide&&j.settings.prevSlide(b)):(c("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){c("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(a){},prevSlide:function(a){},closeSlide:function(){c("html").removeClass("swipebox-html"),c("html").removeClass("swipebox-touch"),c(a).trigger("resize"),this.destroy()},destroy:function(){c(a).unbind("keyup"),c("body").unbind("touchstart"),c("body").unbind("touchmove"),c("body").unbind("touchend"),c("#swipebox-slider").unbind(),c("#swipebox-overlay").remove(),c.isArray(e)||e.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),c.swipebox.isOpen=!1,j.settings.afterClose&&j.settings.afterClose()}},j.init()},c.fn.swipebox=function(a){if(!c.data(this,"_swipebox")){var b=new c.swipebox(this,a);this.data("_swipebox",b)}return this.data("_swipebox")}}(window,document,jQuery);
(function(t){"use strict";function e(t){return RegExp("(^|\\s+)"+t+"(\\s+|$)")}function i(t,e){var i=o(t,e)?r:n;i(t,e)}var o,n,r;"classList"in document.documentElement?(o=function(t,e){return t.classList.contains(e)},n=function(t,e){t.classList.add(e)},r=function(t,e){t.classList.remove(e)}):(o=function(t,i){return e(i).test(t.className)},n=function(t,e){o(t,e)||(t.className=t.className+" "+e)},r=function(t,i){t.className=t.className.replace(e(i)," ")});var s={hasClass:o,addClass:n,removeClass:r,toggleClass:i,has:o,add:n,remove:r,toggle:i};"function"==typeof define&&define.amd?define(s):"object"==typeof exports?module.exports=s:t.classie=s})(window),function(t){"use strict";function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){"use strict";function e(t){"function"==typeof t&&(e.isReady?t():s.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==r.readyState;e.isReady||i||o()}function o(){e.isReady=!0;for(var t=0,i=s.length;i>t;t++){var o=s[t];o()}}function n(n){return"complete"===r.readyState?o():(n.bind(r,"DOMContentLoaded",i),n.bind(r,"readystatechange",i),n.bind(t,"load",i)),e}var r=t.document,s=[];e.isReady=!1,"function"==typeof define&&define.amd?define(["eventie/eventie"],n):"object"==typeof exports?module.exports=n(require("eventie")):t.docReady=n(t.eventie)}(window),function(t){"use strict";function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define(function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){"use strict";function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=r.length;i>e;e++){var o=r[e];t[o]=0}return t}function o(o){function s(){if(!f){f=!0;var i=t.getComputedStyle;if(h=function(){var t=i?function(t){return i(t,null)}:function(t){return t.currentStyle};return function(e){var i=t(e);return i||n("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? "+"See http://bit.ly/getsizeiframe"),i}}(),p=o("boxSizing")){var r=document.createElement("div");r.style.width="200px",r.style.padding="1px 2px 3px 4px",r.style.borderStyle="solid",r.style.borderWidth="1px 2px 3px 4px",r.style[p]="border-box";var s=document.body||document.documentElement;s.appendChild(r);var a=h(r);c=200===e(a.width),s.removeChild(r)}}}function a(t){if(s(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var o=h(t);if("none"===o.display)return i();var n={};n.width=t.offsetWidth,n.height=t.offsetHeight;for(var a=n.isBorderBox=!(!p||!o[p]||"border-box"!==o[p]),f=0,l=r.length;l>f;f++){var d=r[f],m=o[d];m=u(t,m);var y=parseFloat(m);n[d]=isNaN(y)?0:y}var g=n.paddingLeft+n.paddingRight,v=n.paddingTop+n.paddingBottom,b=n.marginLeft+n.marginRight,x=n.marginTop+n.marginBottom,w=n.borderLeftWidth+n.borderRightWidth,I=n.borderTopWidth+n.borderBottomWidth,_=a&&c,z=e(o.width);z!==!1&&(n.width=z+(_?0:g+w));var L=e(o.height);return L!==!1&&(n.height=L+(_?0:v+I)),n.innerWidth=n.width-(g+w),n.innerHeight=n.height-(v+I),n.outerWidth=n.width+b,n.outerHeight=n.height+x,n}}function u(t,e){if(getComputedStyle||-1===e.indexOf("%"))return e;var i=t.style,o=i.left,n=t.runtimeStyle,r=n&&n.left;return r&&(n.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=o,r&&(n.left=r),e}var h,p,c,f=!1;return a}var n="undefined"==typeof console?noop:function(t){console.error(t)},r=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define(["get-style-property/get-style-property"],o):"object"==typeof exports?module.exports=o(require("desandro-get-style-property")):t.getSize=o(t.getStyleProperty)}(window),function(){"use strict";function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,n=this,r=n.EventEmitter;o.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},o.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},o.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},o.addListener=function(t,i){var o,n=this.getListenersAsObject(t),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===e(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,i){var o,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(o=e(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(t,e){var i,o,n,r,s=this.getListenersAsObject(t);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=r,t},"function"==typeof define&&define.amd?define(function(){return t}):"object"==typeof module&&module.exports?module.exports=t:n.EventEmitter=t}.call(this),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(i,o){return e(t,i,o)}):"object"==typeof exports?module.exports=e(t,require("wolfy87-eventemitter"),require("eventie")):t.imagesLoaded=e(t,t.EventEmitter,t.eventie)}(window,function(t,e,i){"use strict";function o(t,e){for(var i in e)t[i]=e[i];return t}function n(t){return"[object Array]"===f.call(t)}function r(t){var e=[];if(n(t))e=t;else if("number"==typeof t.length)for(var i=0,o=t.length;o>i;i++)e.push(t[i]);else e.push(t);return e}function s(t,e,i){if(!(this instanceof s))return new s(t,e);"string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=r(t),this.options=o({},this.options),"function"==typeof e?i=e:o(this.options,e),i&&this.on("always",i),this.getImages(),h&&(this.jqDeferred=new h.Deferred);var n=this;setTimeout(function(){n.check()})}function a(t){this.img=t}function u(t){this.src=t,l[t]=this}var h=t.jQuery,p=t.console,c=p!==void 0,f=Object.prototype.toString;s.prototype=new e,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var t=0,e=this.elements.length;e>t;t++){var i=this.elements[t];"IMG"===i.nodeName&&this.addImage(i);var o=i.nodeType;if(o&&(1===o||9===o||11===o))for(var n=i.querySelectorAll("img"),r=0,s=n.length;s>r;r++){var a=n[r];this.addImage(a)}}},s.prototype.addImage=function(t){var e=new a(t);this.images.push(e)},s.prototype.check=function(){function t(t,n){return e.options.debug&&c&&p.log("confirm",t,n),e.progress(t),i++,i===o&&e.complete(),!0}var e=this,i=0,o=this.images.length;if(this.hasAnyBroken=!1,!o)return this.complete(),void 0;for(var n=0;o>n;n++){var r=this.images[n];r.on("confirm",t),r.check()}},s.prototype.progress=function(t){this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded;var e=this;setTimeout(function(){e.emit("progress",e,t),e.jqDeferred&&e.jqDeferred.notify&&e.jqDeferred.notify(e,t)})},s.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var e=this;setTimeout(function(){if(e.emit(t,e),e.emit("always",e),e.jqDeferred){var i=e.hasAnyBroken?"reject":"resolve";e.jqDeferred[i](e)}})},h&&(h.fn.imagesLoaded=function(t,e){var i=new s(this,t,e);return i.jqDeferred.promise(h(this))}),a.prototype=new e,a.prototype.check=function(){var t=l[this.img.src]||new u(this.img.src);if(t.isConfirmed)return this.confirm(t.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 e=this;t.on("confirm",function(t,i){return e.confirm(t.isLoaded,i),!0}),t.check()},a.prototype.confirm=function(t,e){this.isLoaded=t,this.emit("confirm",this,e)};var l={};return u.prototype=new e,u.prototype.check=function(){if(!this.isChecked){var t=new Image;i.bind(t,"load",this),i.bind(t,"error",this),t.src=this.src,this.isChecked=!0}},u.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},u.prototype.onload=function(t){this.confirm(!0,"onload"),this.unbindProxyEvents(t)},u.prototype.onerror=function(t){this.confirm(!1,"onerror"),this.unbindProxyEvents(t)},u.prototype.confirm=function(t,e){this.isConfirmed=!0,this.isLoaded=t,this.emit("confirm",this,e)},u.prototype.unbindProxyEvents=function(t){i.unbind(t.target,"load",this),i.unbind(t.target,"error",this)},s}),function(t){"use strict";function e(t,e){return t[s](e)}function i(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function o(t,e){i(t);for(var o=t.parentNode.querySelectorAll(e),n=0,r=o.length;r>n;n++)if(o[n]===t)return!0;return!1}function n(t,o){return i(t),e(t,o)}var r,s=function(){if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0,o=e.length;o>i;i++){var n=e[i],r=n+"MatchesSelector";if(t[r])return r}}();if(s){var a=document.createElement("div"),u=e(a,"div");r=u?e:n}else r=o;"function"==typeof define&&define.amd?define(function(){return r}):"object"==typeof exports?module.exports=r:window.matchesSelector=r}(Element.prototype),function(t){"use strict";function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){for(var e in t)return!1;return e=null,!0}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function n(t,n,r){function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=r("transition"),h=r("transform"),p=u&&h,c=!!r("perspective"),f={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],l=["transform","transition","transitionDuration","transitionProperty"],d=function(){for(var t={},e=0,i=l.length;i>e;e++){var o=l[e],n=r(o);n&&n!==o&&(t[o]=n)}return t}();e(a.prototype,t.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var i in t){var o=d[i]||i;e[o]=t[i]}},a.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,o=e.isOriginTop,n=parseInt(t[i?"left":"right"],10),r=parseInt(t[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var a=this.layout.size;n-=i?a.paddingLeft:a.paddingRight,r-=o?a.paddingTop:a.paddingBottom,this.position.x=n,this.position.y=r},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var m=c?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),r=parseInt(e,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,u=e-o,h={},p=this.layout.options;a=p.isOriginLeft?a:-a,u=p.isOriginTop?u:-u,h.transform=m(a,u),this.transition({to:h,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=p?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var y=h&&o(h)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:y,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(f,this,!1))},a.prototype.transition=a.prototype[u?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(f,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(v)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=t.getComputedStyle,s=r?function(t){return r(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],n):"object"==typeof exports?module.exports=n(require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property")):(t.Outlayer={},t.Outlayer.Item=n(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){"use strict";function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===c.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=l(e,t);-1!==i&&e.splice(i,1)}function r(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function s(i,s,c,l,d,m){function y(t,i){if("string"==typeof t&&(t=a.querySelector(t)),!t||!f(t))return u&&u.error("Bad "+this.constructor.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.constructor.defaults),this.option(i);var o=++g;this.element.outlayerGUID=o,v[o]=this,this._create(),this.options.isInitLayout&&this.layout()}var g=0,v={};return y.namespace="outlayer",y.Item=m,y.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(y.prototype,c.prototype),y.prototype.option=function(t){e(this.options,t)},y.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},y.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},y.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0,r=e.length;r>n;n++){var s=e[n],a=new i(s,this);o.push(a)}return o},y.prototype._filterFindItemElements=function(t){t=o(t);for(var e=this.options.itemSelector,i=[],n=0,r=t.length;r>n;n++){var s=t[n];if(f(s))if(e){d(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),u=0,h=a.length;h>u;u++)i.push(a[u])}else i.push(s)}return i},y.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},y.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},y.prototype._init=y.prototype.layout,y.prototype._resetLayout=function(){this.getSize()},y.prototype.getSize=function(){this.size=l(this.element)},y.prototype._getMeasurement=function(t,e){var i,o=this.options[t];o?("string"==typeof o?i=this.element.querySelector(o):f(o)&&(i=o),this[t]=i?l(i)[e]:o):this[t]=0},y.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},y.prototype._getItemsForLayout=function(t){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i];n.isIgnored||e.push(n)}return e},y.prototype._layoutItems=function(t,e){function i(){o.emitEvent("layoutComplete",[o,t])}var o=this;if(!t||!t.length)return i(),void 0;this._itemsOn(t,"layout",i);for(var n=[],r=0,s=t.length;s>r;r++){var a=t[r],u=this._getItemLayoutPosition(a);u.item=a,u.isInstant=e||a.isLayoutInstant,n.push(u)}this._processLayoutQueue(n)},y.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},y.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];this._positionItem(o.item,o.x,o.y,o.isInstant)}},y.prototype._positionItem=function(t,e,i,o){o?t.goTo(e,i):t.moveTo(e,i)},y.prototype._postLayout=function(){this.resizeContainer()},y.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},y.prototype._getContainerSize=p,y.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},y.prototype._itemsOn=function(t,e,i){function o(){return n++,n===r&&i.call(s),!0}for(var n=0,r=t.length,s=this,a=0,u=t.length;u>a;a++){var h=t[a];h.on(e,o)}},y.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},y.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},y.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var o=t[e];this.ignore(o)}}},y.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var o=t[e];n(o,this.stamps),this.unignore(o)}},y.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o(t)):void 0},y.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},y.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},y.prototype._manageStamp=p,y.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=l(t),n={left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom};return n},y.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},y.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},y.prototype.unbindResize=function(){this.isResizeBound&&i.unbind(t,"resize",this),this.isResizeBound=!1},y.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},y.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},y.prototype.needsResizeLayout=function(){var t=l(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},y.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},y.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},y.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},y.prototype.reveal=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.reveal()}},y.prototype.hide=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.hide()}},y.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];if(o.element===t)return o}},y.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i],r=this.getItem(n);r&&e.push(r)}return e}},y.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,r=e.length;r>i;i++){var s=e[i];s.remove(),n(s,this.items)}}},y.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];o.destroy()}this.unbindResize();var n=this.element.outlayerGUID;delete v[n],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},y.data=function(t){var e=t&&t.outlayerGUID;return e&&v[e]},y.create=function(t,i){function o(){y.apply(this,arguments)}return Object.create?o.prototype=Object.create(y.prototype):e(o.prototype,y.prototype),o.prototype.constructor=o,o.defaults=e({},y.defaults),e(o.defaults,i),o.prototype.settings={},o.namespace=t,o.data=y.data,o.Item=function(){m.apply(this,arguments)},o.Item.prototype=new m,s(function(){for(var e=r(t),i=a.querySelectorAll(".js-"+e),n="data-"+e+"-options",s=0,p=i.length;p>s;s++){var c,f=i[s],l=f.getAttribute(n);try{c=l&&JSON.parse(l)}catch(d){u&&u.error("Error parsing "+n+" on "+f.nodeName.toLowerCase()+(f.id?"#"+f.id:"")+": "+d);continue}var m=new o(f,c);h&&h.data(f,t,m)}}),h&&h.bridget&&h.bridget(t,o),o},y.Item=m,y}var a=t.document,u=t.console,h=t.jQuery,p=function(){},c=Object.prototype.toString,f="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},l=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):"object"==typeof exports?module.exports=s(require("eventie"),require("doc-ready"),require("wolfy87-eventemitter"),require("get-size"),require("desandro-matches-selector"),require("./item")):t.Outlayer=s(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){"use strict";function e(t,e){var o=t.create("masonry");return o.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},o.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},o.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,o=e&&1>e?"round":"ceil",n=Math[o](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this._getColGroup(n),s=Math.min.apply(Math,r),a=i(r,s),u={x:this.columnWidth*a,y:s},h=s+t.size.outerHeight,p=this.cols+1-r.length,c=0;p>c;c++)this.colYs[a+c]=h;return u},o.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;i>o;o++){var n=this.colYs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this.options.isOriginLeft?o.left:o.right,r=n+i.outerWidth,s=Math.floor(n/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?o.top:o.bottom)+i.outerHeight,h=s;a>=h;h++)this.colYs[h]=Math.max(u,this.colYs[h])},o.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},o.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},o}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++){var n=t[i];if(n===e)return i}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window),function(t){"use strict";function e(t){function e(){t.Item.apply(this,arguments)}e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var i=e.prototype.destroy;return e.prototype.destroy=function(){i.apply(this,arguments),this.css({display:""})},e}"function"==typeof define&&define.amd?define(["outlayer/outlayer"],e):"object"==typeof exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window),function(t){"use strict";function e(t,e){function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],n=0,r=o.length;r>n;n++){var s=o[n];i.prototype[s]=t(s)}}(),i.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!==this.isotope.size.innerHeight},i.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},i.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},i.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},i.prototype.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},i.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},i.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},i.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=new i,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}"function"==typeof define&&define.amd?define(["get-size/get-size","outlayer/outlayer"],e):"object"==typeof exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window),function(t){"use strict";function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===p.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=c(e,t);-1!==i&&e.splice(i,1)}function r(t,i,r,u,p){function c(t,e){return function(i,o){for(var n=0,r=t.length;r>n;n++){var s=t[n],a=i.sortData[s],u=o.sortData[s];if(a>u||u>a){var h=void 0!==e[s]?e[s]:e,p=h?1:-1;
return(a>u?1:-1)*p}}return 0}}var f=t.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});f.Item=u,f.LayoutMode=p,f.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),t.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var e in p.modes)this._initLayoutMode(e)},f.prototype.reloadItems=function(){this.itemGUID=0,t.prototype.reloadItems.call(this)},f.prototype._itemize=function(){for(var e=t.prototype._itemize.apply(this,arguments),i=0,o=e.length;o>i;i++){var n=e[i];n.id=this.itemGUID++}return this._updateItemsSortData(e),e},f.prototype._initLayoutMode=function(t){var i=p.modes[t],o=this.options[t]||{};this.options[t]=i.options?e(i.options,o):o,this.modes[t]=new i(this)},f.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},f.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},f.prototype.arrange=function(t){this.option(t),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},f.prototype._init=f.prototype.arrange,f.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},f.prototype._filter=function(t){function e(){c.reveal(n),c.hide(r)}var i=this.options.filter;i=i||"*";for(var o=[],n=[],r=[],s=this._getFilterTest(i),a=0,u=t.length;u>a;a++){var h=t[a];if(!h.isIgnored){var p=s(h);p&&o.push(h),p&&h.isHidden?n.push(h):p||h.isHidden||r.push(h)}}var c=this;return this._isInstant?this._noTransition(e):e(),o},f.prototype._getFilterTest=function(t){return s&&this.options.isJQueryFiltering?function(e){return s(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},f.prototype.updateSortData=function(t){var e;t?(t=o(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},f.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=l(i)}},f.prototype._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&e>i;i++){var o=t[i];o.updateSortData()}};var l=function(){function t(t){if("string"!=typeof t)return t;var i=a(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),u=f.sortDataParsers[i[1]];return t=u?function(t){return t&&u(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&h(i)}}return t}();f.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},f.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=c(e,this.options.sortAscending);this.filteredItems.sort(i),t!==this.sortHistory[0]&&this.sortHistory.unshift(t)}},f.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},f.prototype._resetLayout=function(){t.prototype._resetLayout.call(this),this._mode()._resetLayout()},f.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},f.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},f.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},f.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},f.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},f.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps();var o=this._filterRevealAdded(e);this.layoutItems(i),this.filteredItems=o.concat(this.filteredItems)}},f.prototype._filterRevealAdded=function(t){var e=this._noTransition(function(){return this._filter(t)});return this.layoutItems(e,!0),this.reveal(e),t},f.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e);for(this._noTransition(function(){this.hide(r)}),i=0;n>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;n>i;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var d=f.prototype.remove;return f.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(d.call(this,t),e&&e.length)for(var i=0,r=e.length;r>i;i++){var s=e[i];n(s,this.filteredItems)}},f.prototype.shuffle=function(){for(var t=0,e=this.items.length;e>t;t++){var i=this.items[t];i.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},f.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var i=t.call(this);return this.options.transitionDuration=e,i},f.prototype.getFilteredItemElements=function(){for(var t=[],e=0,i=this.filteredItems.length;i>e;e++)t.push(this.filteredItems[e].element);return t},f}var s=t.jQuery,a=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=document.documentElement,h=u.textContent?function(t){return t.textContent}:function(t){return t.innerText},p=Object.prototype.toString,c=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","./item","./layout-mode","./layout-modes/masonry","./layout-modes/fit-rows","./layout-modes/vertical"],r):"object"==typeof exports?module.exports=r(require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("./item"),require("./layout-mode"),require("./layout-modes/masonry"),require("./layout-modes/fit-rows"),require("./layout-modes/vertical")):t.Isotope=r(t.Outlayer,t.getSize,t.matchesSelector,t.Isotope.Item,t.Isotope.LayoutMode)}(window),function(t){"use strict";function e(t){var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},e.prototype._getContainerSize=function(){return{height:this.y}},e}"function"==typeof define&&define.amd?define(["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window),function(t){"use strict";function e(t){var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},e.prototype._getContainerSize=function(){return{height:this.maxY}},e}"function"==typeof define&&define.amd?define(["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window),function(t){"use strict";function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i){var o=t.create("masonry"),n=o.prototype._getElementOffset,r=o.prototype.layout,s=o.prototype._getMeasurement;e(o.prototype,i.prototype),o.prototype._getElementOffset=n,o.prototype.layout=r,o.prototype._getMeasurement=s;var a=o.prototype.measureColumns;o.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,a.call(this)};var u=o.prototype._manageStamp;return o.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},o}"function"==typeof define&&define.amd?define(["../layout-mode","masonry/masonry"],i):"object"==typeof exports?module.exports=i(require("../layout-mode"),require("masonry-layout")):i(t.Isotope.LayoutMode,t.Masonry)}(window),function(t){"use strict";function e(t){var e=t.create("cellsByColumn");return e.prototype._resetLayout=function(){this.itemIndex=0,this.getColumnWidth(),this.getRowHeight(),this.rows=Math.floor(this.isotope.size.innerHeight/this.rowHeight),this.rows=Math.max(this.rows,1)},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=Math.floor(this.itemIndex/this.rows),i=this.itemIndex%this.rows,o=(e+.5)*this.columnWidth-t.size.outerWidth/2,n=(i+.5)*this.rowHeight-t.size.outerHeight/2;return this.itemIndex++,{x:o,y:n}},e.prototype._getContainerSize=function(){return{width:Math.ceil(this.itemIndex/this.rows)*this.columnWidth}},e.prototype.needsResizeLayout=function(){return this.needsVerticalResizeLayout()},e}"function"==typeof define&&define.amd?define(["isotope/js/layout-mode"],e):"object"==typeof exports?module.exports=e(require("isotope-layout/js/layout-mode")):e(t.Isotope.LayoutMode)}(window),function(t){"use strict";function e(t){var e=t.create("cellsByRow");return e.prototype._resetLayout=function(){this.itemIndex=0,this.getColumnWidth(),this.getRowHeight(),this.cols=Math.floor(this.isotope.size.innerWidth/this.columnWidth),this.cols=Math.max(this.cols,1)},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=this.itemIndex%this.cols,i=Math.floor(this.itemIndex/this.cols),o=(e+.5)*this.columnWidth-t.size.outerWidth/2,n=(i+.5)*this.rowHeight-t.size.outerHeight/2;return this.itemIndex++,{x:o,y:n}},e.prototype._getContainerSize=function(){return{height:Math.ceil(this.itemIndex/this.cols)*this.rowHeight}},e}"function"==typeof define&&define.amd?define(["isotope/js/layout-mode"],e):"object"==typeof exports?module.exports=e(require("isotope-layout/js/layout-mode")):e(t.Isotope.LayoutMode)}(window),function(t){"use strict";function e(t){var e=t.create("fitColumns");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxX=0},e.prototype._getItemLayoutPosition=function(t){t.getSize(),0!==this.y&&t.size.outerHeight+this.y>this.isotope.size.innerHeight&&(this.y=0,this.x=this.maxX);var e={x:this.x,y:this.y};return this.maxX=Math.max(this.maxX,this.x+t.size.outerWidth),this.y+=t.size.outerHeight,e},e.prototype._getContainerSize=function(){return{width:this.maxX}},e.prototype.needsResizeLayout=function(){return this.needsVerticalResizeLayout()},e}"function"==typeof define&&define.amd?define(["isotope/js/layout-mode"],e):"object"==typeof exports?module.exports=e(require("isotope-layout/js/layout-mode")):e(t.Isotope.LayoutMode)}(window),function(t){"use strict";function e(t){var e=t.create("horizontal",{verticalAlignment:0});return e.prototype._resetLayout=function(){this.x=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerHeight-t.size.outerHeight)*this.options.verticalAlignment,i=this.x;return this.x+=t.size.outerWidth,{x:i,y:e}},e.prototype._getContainerSize=function(){return{width:this.x}},e.prototype.needsResizeLayout=function(){return this.needsVerticalResizeLayout()},e}"function"==typeof define&&define.amd?define(["isotope/js/layout-mode"],e):"object"==typeof exports?module.exports=e(require("isotope-layout/js/layout-mode")):e(t.Isotope.LayoutMode)}(window),function(t){"use strict";function e(t,e){var o=e.create("masonryHorizontal");return o.prototype._resetLayout=function(){this.getRowHeight(),this._getMeasurement("gutter","outerHeight"),this.rowHeight+=this.gutter,this.rows=Math.floor((this.isotope.size.innerHeight+this.gutter)/this.rowHeight),this.rows=Math.max(this.rows,1);var t=this.rows;for(this.rowXs=[];t--;)this.rowXs.push(0);this.maxX=0},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=Math.ceil(t.size.outerHeight/this.rowHeight);e=Math.min(e,this.rows);for(var o=this._getRowGroup(e),n=Math.min.apply(Math,o),r=i(o,n),s={x:n,y:this.rowHeight*r},a=n+t.size.outerWidth,u=this.rows+1-o.length,h=0;u>h;h++)this.rowXs[r+h]=a;return s},o.prototype._getRowGroup=function(t){if(2>t)return this.rowXs;for(var e=[],i=this.rows+1-t,o=0;i>o;o++){var n=this.rowXs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(e){var i=t(e),o=this.isotope._getElementOffset(e),n=this.isotope.options.isOriginTop?o.top:o.bottom,r=n+i.outerHeight,s=Math.floor(n/this.rowHeight);s=Math.max(0,s);var a=Math.floor(r/this.rowHeight);a=Math.min(this.rows-1,a);for(var u=(this.isotope.options.isOriginLeft?o.left:o.right)+i.outerWidth,h=s;a>=h;h++)this.rowXs[h]=Math.max(u,this.rowXs[h])},o.prototype._getContainerSize=function(){return this.maxX=Math.max.apply(Math,this.rowXs),{width:this.maxX}},o.prototype.needsResizeLayout=function(){return this.needsVerticalResizeLayout()},o}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++){var n=t[i];if(n===e)return i}return-1};"function"==typeof define&&define.amd?define(["get-size/get-size","isotope/js/layout-mode"],e):"object"==typeof exports?module.exports=e(require("get-size"),require("isotope-layout/js/layout-mode")):e(t.getSize,t.Isotope.LayoutMode)}(window),function(t){"use strict";function e(){function t(e){for(var i in t.defaults)this[i]=t.defaults[i];for(i in e)this[i]=e[i]}return i.Rect=t,t.defaults={x:0,y:0,width:0,height:0},t.prototype.contains=function(t){var e=t.width||0,i=t.height||0;return this.x<=t.x&&this.y<=t.y&&this.x+this.width>=t.x+e&&this.y+this.height>=t.y+i},t.prototype.overlaps=function(t){var e=this.x+this.width,i=this.y+this.height,o=t.x+t.width,n=t.y+t.height;return o>this.x&&e>t.x&&n>this.y&&i>t.y},t.prototype.getMaximalFreeRects=function(e){if(!this.overlaps(e))return!1;var i,o=[],n=this.x+this.width,r=this.y+this.height,s=e.x+e.width,a=e.y+e.height;return this.y<e.y&&(i=new t({x:this.x,y:this.y,width:this.width,height:e.y-this.y}),o.push(i)),n>s&&(i=new t({x:s,y:this.y,width:n-s,height:this.height}),o.push(i)),r>a&&(i=new t({x:this.x,y:a,width:this.width,height:r-a}),o.push(i)),this.x<e.x&&(i=new t({x:this.x,y:this.y,width:e.x-this.x,height:this.height}),o.push(i)),o},t.prototype.canFit=function(t){return this.width>=t.width&&this.height>=t.height},t}var i=t.Packery=function(){};"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():(t.Packery=t.Packery||{},t.Packery.Rect=e())}(window),function(t){"use strict";function e(t){function e(t,e,i){this.width=t||0,this.height=e||0,this.sortDirection=i||"downwardLeftToRight",this.reset()}e.prototype.reset=function(){this.spaces=[],this.newSpaces=[];var e=new t({x:0,y:0,width:this.width,height:this.height});this.spaces.push(e),this.sorter=i[this.sortDirection]||i.downwardLeftToRight},e.prototype.pack=function(t){for(var e=0,i=this.spaces.length;i>e;e++){var o=this.spaces[e];if(o.canFit(t)){this.placeInSpace(t,o);break}}},e.prototype.placeInSpace=function(t,e){t.x=e.x,t.y=e.y,this.placed(t)},e.prototype.placed=function(t){for(var e=[],i=0,o=this.spaces.length;o>i;i++){var n=this.spaces[i],r=n.getMaximalFreeRects(t);r?e.push.apply(e,r):e.push(n)}this.spaces=e,this.mergeSortSpaces()},e.prototype.mergeSortSpaces=function(){e.mergeRects(this.spaces),this.spaces.sort(this.sorter)},e.prototype.addSpace=function(t){this.spaces.push(t),this.mergeSortSpaces()},e.mergeRects=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];if(o){var n=t.slice(0);n.splice(e,1);for(var r=0,s=0,a=n.length;a>s;s++){var u=n[s],h=e>s?0:1;o.contains(u)&&(t.splice(s+h-r,1),r++)}}}return t};var i={downwardLeftToRight:function(t,e){return t.y-e.y||t.x-e.x},rightwardTopToBottom:function(t,e){return t.x-e.x||t.y-e.y}};return e}if("function"==typeof define&&define.amd)define(["./rect"],e);else if("object"==typeof exports)module.exports=e(require("./rect"));else{var i=t.Packery=t.Packery||{};i.Packer=e(i.Rect)}}(window),function(t){"use strict";function e(t,e,i){var o=t("transform"),n=function(){e.Item.apply(this,arguments)};n.prototype=new e.Item;var r=n.prototype._create;return n.prototype._create=function(){r.call(this),this.rect=new i,this.placeRect=new i},n.prototype.dragStart=function(){this.getPosition(),this.removeTransitionStyles(),this.isTransitioning&&o&&(this.element.style[o]="none"),this.getSize(),this.isPlacing=!0,this.needsPositioning=!1,this.positionPlaceRect(this.position.x,this.position.y),this.isTransitioning=!1,this.didDrag=!1},n.prototype.dragMove=function(t,e){this.didDrag=!0;var i=this.layout.size;t-=i.paddingLeft,e-=i.paddingTop,this.positionPlaceRect(t,e)},n.prototype.dragStop=function(){this.getPosition();var t=this.position.x!==this.placeRect.x,e=this.position.y!==this.placeRect.y;this.needsPositioning=t||e,this.didDrag=!1},n.prototype.positionPlaceRect=function(t,e,i){this.placeRect.x=this.getPlaceRectCoord(t,!0),this.placeRect.y=this.getPlaceRectCoord(e,!1,i)},n.prototype.getPlaceRectCoord=function(t,e,i){var o=e?"Width":"Height",n=this.size["outer"+o],r=this.layout[e?"columnWidth":"rowHeight"],s=this.layout.size["inner"+o];e||(s=Math.max(s,this.layout.maxY),this.layout.rowHeight||(s-=this.layout.gutter));var a;if(r){r+=this.layout.gutter,s+=e?this.layout.gutter:0,t=Math.round(t/r);var u;u=this.layout.options.isHorizontal?e?"ceil":"floor":e?"floor":"ceil";var h=Math[u](s/r);h-=Math.ceil(n/r),a=h}else a=s-n;return t=i?t:Math.min(t,a),t*=r||1,Math.max(0,t)},n.prototype.copyPlaceRectPosition=function(){this.rect.x=this.placeRect.x,this.rect.y=this.placeRect.y},n.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},n}"function"==typeof define&&define.amd?define(["get-style-property/get-style-property","outlayer/outlayer","./rect"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property"),require("outlayer"),require("./rect")):t.Packery.Item=e(t.getStyleProperty,t.Outlayer,t.Packery.Rect)}(window),function(t){"use strict";function e(t,e,i,o,n,r){function s(t,e){return t.position.y-e.position.y||t.position.x-e.position.x}function a(t,e){return t.position.x-e.position.x||t.position.y-e.position.y}var u=i.create("packery");return u.Item=r,u.prototype._create=function(){i.prototype._create.call(this),this.packer=new n,this.stamp(this.options.stamped);var t=this;this.handleDraggabilly={dragStart:function(e){t.itemDragStart(e.element)},dragMove:function(e){t.itemDragMove(e.element,e.position.x,e.position.y)},dragEnd:function(e){t.itemDragEnd(e.element)}},this.handleUIDraggable={start:function(e){t.itemDragStart(e.currentTarget)},drag:function(e,i){t.itemDragMove(e.currentTarget,i.position.left,i.position.top)},stop:function(e){t.itemDragEnd(e.currentTarget)}}},u.prototype._resetLayout=function(){this.getSize(),this._getMeasurements();var t=this.packer;this.options.isHorizontal?(t.width=Number.POSITIVE_INFINITY,t.height=this.size.innerHeight+this.gutter,t.sortDirection="rightwardTopToBottom"):(t.width=this.size.innerWidth+this.gutter,t.height=Number.POSITIVE_INFINITY,t.sortDirection="downwardLeftToRight"),t.reset(),this.maxY=0,this.maxX=0},u.prototype._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},u.prototype._getItemLayoutPosition=function(t){return this._packItem(t),t.rect},u.prototype._packItem=function(t){this._setRectSize(t.element,t.rect),this.packer.pack(t.rect),this._setMaxXY(t.rect)},u.prototype._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},u.prototype._setRectSize=function(t,i){var o=e(t),n=o.outerWidth,r=o.outerHeight;if(n||r){var s=this.columnWidth+this.gutter,a=this.rowHeight+this.gutter;n=this.columnWidth?Math.ceil(n/s)*s:n+this.gutter,r=this.rowHeight?Math.ceil(r/a)*a:r+this.gutter}i.width=Math.min(n,this.packer.width),i.height=Math.min(r,this.packer.height)},u.prototype._getContainerSize=function(){return this.options.isHorizontal?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},u.prototype._manageStamp=function(t){var e,i=this.getItem(t);if(i&&i.isPlacing)e=i.placeRect;else{var n=this._getElementOffset(t);e=new o({x:this.options.isOriginLeft?n.left:n.right,y:this.options.isOriginTop?n.top:n.bottom})}this._setRectSize(t,e),this.packer.placed(e),this._setMaxXY(e)},u.prototype.sortItemsByPosition=function(){var t=this.options.isHorizontal?a:s;this.items.sort(t)},u.prototype.fit=function(t,e,i){var o=this.getItem(t);o&&(this._getMeasurements(),this.stamp(o.element),o.getSize(),o.isPlacing=!0,e=void 0===e?o.rect.x:e,i=void 0===i?o.rect.y:i,o.positionPlaceRect(e,i,!0),this._bindFitEvents(o),o.moveTo(o.placeRect.x,o.placeRect.y),this.layout(),this.unstamp(o.element),this.sortItemsByPosition(),o.isPlacing=!1,o.copyPlaceRectPosition())},u.prototype._bindFitEvents=function(t){function e(){o++,2===o&&i.emitEvent("fitComplete",[i,t])}var i=this,o=0;t.on("layout",function(){return e(),!0}),this.on("layoutComplete",function(){return e(),!0})},u.prototype.resize=function(){var t=e(this.element),i=this.size&&t,o=this.options.isHorizontal?"innerHeight":"innerWidth";i&&t[o]===this.size[o]||this.layout()},u.prototype.itemDragStart=function(t){this.stamp(t);var e=this.getItem(t);e&&e.dragStart()},u.prototype.itemDragMove=function(t,e,i){function o(){r.layout(),delete r.dragTimeout}var n=this.getItem(t);n&&n.dragMove(e,i);var r=this;this.clearDragTimeout(),this.dragTimeout=setTimeout(o,40)},u.prototype.clearDragTimeout=function(){this.dragTimeout&&clearTimeout(this.dragTimeout)},u.prototype.itemDragEnd=function(e){var i,o=this.getItem(e);if(o&&(i=o.didDrag,o.dragStop()),!o||!i&&!o.needsPositioning)return this.unstamp(e),void 0;t.add(o.element,"is-positioning-post-drag");var n=this._getDragEndLayoutComplete(e,o);o.needsPositioning?(o.on("layout",n),o.moveTo(o.placeRect.x,o.placeRect.y)):o&&o.copyPlaceRectPosition(),this.clearDragTimeout(),this.on("layoutComplete",n),this.layout()},u.prototype._getDragEndLayoutComplete=function(e,i){var o=i&&i.needsPositioning,n=0,r=o?2:1,s=this;return function(){return n++,n!==r?!0:(i&&(t.remove(i.element,"is-positioning-post-drag"),i.isPlacing=!1,i.copyPlaceRectPosition()),s.unstamp(e),s.sortItemsByPosition(),o&&s.emitEvent("dragItemPositioned",[s,i]),!0)}},u.prototype.bindDraggabillyEvents=function(t){t.on("dragStart",this.handleDraggabilly.dragStart),t.on("dragMove",this.handleDraggabilly.dragMove),t.on("dragEnd",this.handleDraggabilly.dragEnd)},u.prototype.bindUIDraggableEvents=function(t){t.on("dragstart",this.handleUIDraggable.start).on("drag",this.handleUIDraggable.drag).on("dragstop",this.handleUIDraggable.stop)},u.Rect=o,u.Packer=n,u}"function"==typeof define&&define.amd?define(["classie/classie","get-size/get-size","outlayer/outlayer","./rect","./packer","./item"],e):"object"==typeof exports?module.exports=e(require("desandro-classie"),require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):t.Packery=e(t.classie,t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item)}(window),function(t){"use strict";function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i,o){var n=t.create("packery"),r=n.prototype._getElementOffset,s=n.prototype._getMeasurement;e(n.prototype,i.prototype),n.prototype._getElementOffset=r,n.prototype._getMeasurement=s;var a=n.prototype._resetLayout;n.prototype._resetLayout=function(){this.packer=this.packer||new i.Packer,a.apply(this,arguments)};var u=n.prototype._getItemLayoutPosition;n.prototype._getItemLayoutPosition=function(t){return t.rect=t.rect||new i.Rect,u.call(this,t)};var h=n.prototype._manageStamp;return n.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,h.apply(this,arguments)},n.prototype.needsResizeLayout=function(){var t=o(this.element),e=this.size&&t,i=this.options.isHorizontal?"innerHeight":"innerWidth";return e&&t[i]!==this.size[i]},n}"function"==typeof define&&define.amd?define(["isotope/js/layout-mode","packery/js/packery","get-size/get-size"],i):"object"==typeof exports?module.exports=i(require("isotope-layout/js/layout-mode"),require("packery"),require("get-size")):i(t.Isotope.LayoutMode,t.Packery,t.getSize)}(window),function(t){"use strict";function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,i){t.fn[e]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1),a=0,u=this.length;u>a;a++){var h=this[a],p=t.data(h,e);if(p)if(t.isFunction(p[n])&&"_"!==n.charAt(0)){var c=p[n].apply(p,s);if(void 0!==c)return c}else r("no such method '"+n+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=t.data(this,e);o?(o.option(n),o._init()):(o=new i(this,n),t.data(this,e,o))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),n(t,e)},t.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof exports?i(require("jquery")):i(t.jQuery)}(window);var hljs=new function(){function t(t){return t.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function e(t){return t.nodeName.toLowerCase()}function i(t,e){var i=t&&t.exec(e);return i&&0==i.index}function o(t){return Array.prototype.map.call(t.childNodes,function(t){return 3==t.nodeType?v.useBR?t.nodeValue.replace(/\n/g,""):t.nodeValue:"br"==e(t)?"\n":o(t)}).join("")}function n(t){var e=(t.className+" "+(t.parentNode?t.parentNode.className:"")).split(/\s+/);return e=e.map(function(t){return t.replace(/^language-/,"")}),e.filter(function(t){return g(t)||"no-highlight"==t})[0]}function r(t,e){var i={};for(var o in t)i[o]=t[o];if(e)for(var o in e)i[o]=e[o];return i}function s(t){var i=[];return function o(t,n){for(var r=t.firstChild;r;r=r.nextSibling)3==r.nodeType?n+=r.nodeValue.length:"br"==e(r)?n+=1:1==r.nodeType&&(i.push({event:"start",offset:n,node:r}),n=o(r,n),i.push({event:"stop",offset:n,node:r}));return n}(t,0),i}function a(i,o,n){function r(){return i.length&&o.length?i[0].offset!=o[0].offset?i[0].offset<o[0].offset?i:o:"start"==o[0].event?i:o:i.length?i:o}function s(i){function o(e){return" "+e.nodeName+'="'+t(e.value)+'"'}p+="<"+e(i)+Array.prototype.map.call(i.attributes,o).join("")+">"}function a(t){p+="</"+e(t)+">"}function u(t){("start"==t.event?s:a)(t.node)}for(var h=0,p="",c=[];i.length||o.length;){var f=r();if(p+=t(n.substr(h,f[0].offset-h)),h=f[0].offset,f==i){c.reverse().forEach(a);do u(f.splice(0,1)[0]),f=r();while(f==i&&f.length&&f[0].offset==h);c.reverse().forEach(s)}else"start"==f[0].event?c.push(f[0].node):c.pop(),u(f.splice(0,1)[0])}return p+t(n.substr(h))}function u(t){function e(t){return t&&t.source||t}function i(i,o){return RegExp(e(i),"m"+(t.cI?"i":"")+(o?"g":""))}function o(n,s){function a(e,i){t.cI&&(i=i.toLowerCase()),i.split(" ").forEach(function(t){var i=t.split("|");u[i[0]]=[e,i[1]?Number(i[1]):1]})}if(!n.compiled){if(n.compiled=!0,n.k=n.k||n.bK,n.k){var u={};"string"==typeof n.k?a("keyword",n.k):Object.keys(n.k).forEach(function(t){a(t,n.k[t])}),n.k=u}n.lR=i(n.l||/\b[A-Za-z0-9_]+\b/,!0),s&&(n.bK&&(n.b=n.bK.split(" ").join("|")),n.b||(n.b=/\B|\b/),n.bR=i(n.b),n.e||n.eW||(n.e=/\B|\b/),n.e&&(n.eR=i(n.e)),n.tE=e(n.e)||"",n.eW&&s.tE&&(n.tE+=(n.e?"|":"")+s.tE)),n.i&&(n.iR=i(n.i)),void 0===n.r&&(n.r=1),n.c||(n.c=[]);var h=[];n.c.forEach(function(t){t.v?t.v.forEach(function(e){h.push(r(t,e))}):h.push("self"==t?n:t)}),n.c=h,n.c.forEach(function(t){o(t,n)}),n.starts&&o(n.starts,s);var p=n.c.map(function(t){return t.bK?"\\.?\\b("+t.b+")\\b\\.?":t.b}).concat([n.tE]).concat([n.i]).map(e).filter(Boolean);n.t=p.length?i(p.join("|"),!0):{exec:function(){return null}},n.continuation={}}}o(t)}function h(e,o,n,r){function s(t,e){for(var o=0;e.c.length>o;o++)if(i(e.c[o].bR,t))return e.c[o]}function a(t,e){return i(t.eR,e)?t:t.eW?a(t.parent,e):void 0}function c(t,e){return!n&&i(e.iR,t)}function f(t,e){var i=I.cI?e[0].toLowerCase():e[0];return t.k.hasOwnProperty(i)&&t.k[i]}function l(t,e,i,o){var n=o?"":v.classPrefix,r='<span class="'+n,s=i?"":"</span>";return r+=t+'">',r+e+s}function d(){var e=t(S);if(!_.k)return e;var i="",o=0;_.lR.lastIndex=0;for(var n=_.lR.exec(e);n;){i+=e.substr(o,n.index-o);var r=f(_,n);r?(E+=r[1],i+=l(r[0],n[0])):i+=n[0],o=_.lR.lastIndex,n=_.lR.exec(e)}return i+e.substr(o)}function m(){if(_.sL&&!b[_.sL])return t(S);var e=_.sL?h(_.sL,S,!0,_.continuation.top):p(S);return _.r>0&&(E+=e.r),"continuous"==_.subLanguageMode&&(_.continuation.top=e.top),l(e.language,e.value,!1,!0)}function y(){return void 0!==_.sL?m():d()}function x(e,i){var o=e.cN?l(e.cN,"",!0):"";e.rB?(z+=o,S=""):e.eB?(z+=t(i)+o,S=""):(z+=o,S=i),_=Object.create(e,{parent:{value:_}})}function w(e,i){if(S+=e,void 0===i)return z+=y(),0;var o=s(i,_);if(o)return z+=y(),x(o,i),o.rB?0:i.length;var n=a(_,i);if(n){var r=_;r.rE||r.eE||(S+=i),z+=y();do _.cN&&(z+="</span>"),E+=_.r,_=_.parent;while(_!=n.parent);return r.eE&&(z+=t(i)),S="",n.starts&&x(n.starts,""),r.rE?0:i.length}if(c(i,_))throw Error('Illegal lexeme "'+i+'" for mode "'+(_.cN||"<unnamed>")+'"');return S+=i,i.length||1}var I=g(e);if(!I)throw Error('Unknown language: "'+e+'"');u(I);for(var _=r||I,z="",L=_;L!=I;L=L.parent)L.cN&&(z=l(L.cN,z,!0));var S="",E=0;try{for(var R,M,C=0;;){if(_.t.lastIndex=C,R=_.t.exec(o),!R)break;M=w(o.substr(C,R.index-C),R[0]),C=R.index+M}w(o.substr(C));for(var L=_;L.parent;L=L.parent)L.cN&&(z+="</span>");return{r:E,value:z,language:e,top:_}}catch(T){if(-1!=T.message.indexOf("Illegal"))return{r:0,value:t(o)};throw T}}function p(e,i){i=i||v.languages||Object.keys(b);var o={r:0,value:t(e)},n=o;return i.forEach(function(t){if(g(t)){var i=h(t,e,!1);i.language=t,i.r>n.r&&(n=i),i.r>o.r&&(n=o,o=i)}}),n.language&&(o.second_best=n),o}function c(t){return v.tabReplace&&(t=t.replace(/^((<[^>]+>|\t)+)/gm,function(t,e){return e.replace(/\t/g,v.tabReplace)})),v.useBR&&(t=t.replace(/\n/g,"<br>")),t}function f(t){var e=o(t),i=n(t);if("no-highlight"!=i){var r=i?h(i,e,!0):p(e),u=s(t);if(u.length){var f=document.createElementNS("http://www.w3.org/1999/xhtml","pre");f.innerHTML=r.value,r.value=a(u,s(f),e)}r.value=c(r.value),t.innerHTML=r.value,t.className+=" hljs "+(!i&&r.language||""),t.result={language:r.language,re:r.r},r.second_best&&(t.second_best={language:r.second_best.language,re:r.second_best.r})}}function l(t){v=r(v,t)}function d(){if(!d.called){d.called=!0;var t=document.querySelectorAll("pre code");Array.prototype.forEach.call(t,f)}}function m(){addEventListener("DOMContentLoaded",d,!1),addEventListener("load",d,!1)}function y(t,e){var i=b[t]=e(this);i.aliases&&i.aliases.forEach(function(e){x[e]=t})}function g(t){return b[t]||b[x[t]]}var v={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},b={},x={};this.highlight=h,this.highlightAuto=p,this.fixMarkup=c,this.highlightBlock=f,this.configure=l,this.initHighlighting=d,this.initHighlightingOnLoad=m,this.registerLanguage=y,this.getLanguage=g,this.inherit=r,this.IR="[a-zA-Z][a-zA-Z0-9_]*",this.UIR="[a-zA-Z_][a-zA-Z0-9_]*",this.NR="\\b\\d+(\\.\\d+)?",this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",this.BNR="\\b(0b[01]+)",this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",this.BE={b:"\\\\[\\s\\S]",r:0},this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]},this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]},this.CLCM={cN:"comment",b:"//",e:"$"},this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"},this.HCM={cN:"comment",b:"#",e:"$"},this.NM={cN:"number",b:this.NR,r:0},this.CNM={cN:"number",b:this.CNR,r:0},this.BNM={cN:"number",b:this.BNR,r:0},this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]},this.TM={cN:"title",b:this.IR,r:0},this.UTM={cN:"title",b:this.UIR,r:0}};hljs.registerLanguage("javascript",function(t){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},t.ASM,t.QSM,t.CLCM,t.CBLCLM,t.CNM,{b:"("+t.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[t.CLCM,t.CBLCLM,t.REGEXP_MODE,{b:/</,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,c:[t.inherit(t.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[t.CLCM,t.CBLCLM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+t.IR,r:0}]}}),function(t,e){"use strict";function i(t,e){t[d]=e}function o(){var e=document.querySelector("#page-nav");if(e){var i=u(e).outerHeight;i>=t.innerHeight||new n(e)}}function n(e){this.element=e,this.originalY=this.element.getBoundingClientRect().top+t.pageYOffset,eventie.bind(t,"scroll",this),this.isFixed=!1,this.onscroll()}function r(t,e,i){var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){if(!this[n]){o.apply(this,arguments);var t=this;this[n]=setTimeout(function(){o.apply(t,arguments),delete t[n]},i||100)}}}var s=t.ID={};s.pages={};var a,u=t.getSize,h=t.Isotope;e.bridget("isotope",h);var p=t.getComputedStyle,c=p?function(t){return p(t,null)}:function(t){return t.currentStyle};docReady(function(){a=document.querySelector("#notification"),e(".js-radio-button-group").radioButtonGroup();var t=document.body.getAttribute("data-page");t&&"function"==typeof s[t]&&s[t]();var i=document.querySelector("head"),n=c(i).fontFamily.replace(/['"]/g,"");("desktop-ish"===n||"tablet-ish"===n)&&o()}),s.getSomeItemElements=function(){for(var t=document.createDocumentFragment(),e=[],i=0;3>i;i++){var o=document.createElement("div"),n=Math.random(),r=n>.85?"w4":n>.7?"w2":"",s=Math.random(),a=s>.85?"h4":s>.7?"h2":"";o.className="item "+r+" "+a,t.appendChild(o),e.push(o)}};var f,l=document.documentElement,d=void 0!==l.textContent?"textContent":"innerText",m=getStyleProperty("transition"),y=m?1e3:1500;s.notify=function(t,e){i(a,t),m&&(a.style[m]="none"),a.style.display="block",a.style.opacity="1",e&&(f&&clearTimeout(f),f=setTimeout(s.hideNotify,y))},s.hideNotify=function(){m?(a.style[m]="opacity 1.0s",a.style.opacity="0"):a.style.display="none"},e.fn.radioButtonGroup=function(){return this.each(function(t,i){var o=e(i);o.find(":checked").parent().addClass("is-checked"),o.on("click","input, button",function(){o.find(".is-checked").removeClass("is-checked");var t=e(this),i=t.hasClass("button")?t:t.parents(".button");i.addClass("is-checked")})}),this},hljs.configure({classPrefix:""}),e.fn.displayIsotopeCode=function(t,e){e="string"==typeof e&&-1===e.indexOf("function")?"'"+e+"'":e;var i="$container.isotope({ "+t+": "+e+" })";i=hljs.highlight("js",i).value,this.html(i)},n.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.prototype.onscroll=function(){var e=t.pageYOffset>=this.originalY;e!==this.isFixed&&(classie.toggle(this.element,"is-fixed"),this.isFixed=e)},r(n,"onscroll",50)}(window,jQuery),function(t){"use strict";var e=t.ID,i=getStyleProperty("transition"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i];e.appendix=function(){(function(){var t=$("#animate-item-size .isotope").isotope({masonry:{columnWidth:60}});t.on("click",".item",function(){$(this).toggleClass("is-expanded"),t.isotope("layout")})})(),function(){var t=$("#animate-item-size-responsive .isotope").isotope({itemSelector:".item",masonry:{columnWidth:".grid-sizer"}});t.on("click",".item-content",function(){var e=this,n=getSize(e);e.style[i]="none",e.style.width=n.width+"px",e.style.height=n.height+"px";var r=e.parentNode;classie.toggleClass(r,"is-expanded");var s=e.offsetWidth;if(e.style[i]="",i){var a=function(){e.style.width="",e.style.height="",e.removeEventListener(o,a,!1)};e.addEventListener(o,a,!1)}var u=getSize(r);e.style.width=u.width+"px",e.style.height=u.height+"px",s=null,t.isotope("layout")})}()}}(window),function(t,e){"use strict";function i(){var t=new Date,e=t.getMinutes();e=10>e?"0"+e:e;var i=t.getSeconds();return i=10>i?"0"+i:i,[t.getHours(),e,i].join(":")}function o(t){n.notify(t+" at "+i(),!0)}var n=t.ID;n.events=function(){(function(){var t=e("#layout-complete-demo .isotope").isotope({masonry:{columnWidth:50}});t.isotope("on","layoutComplete",function(t,e){o("Isotope layout completed on "+e.length+" items")}),t.on("click",".mini-item",function(){e(this).toggleClass("gigante"),t.isotope("layout")})})(),function(){var t=e("#remove-complete-demo .isotope").isotope({masonry:{columnWidth:50}});t.isotope("on","removeComplete",function(t,e){o("Removed "+e.length+" items")}),t.on("click",".mini-item",function(){t.isotope("remove",this).isotope("layout")})}()}}(window,jQuery),function(t,e){"use strict";var i=t.ID;i.filtering=function(){(function(){var t=e("#filtering-demo .isotope").isotope({itemSelector:".element-item",layoutMode:"fitRows",transitionDuration:"0.6s"}),i={numberGreaterThan50:function(){var t=e(this).find(".number").text();return parseInt(t,10)>50},ium:function(){var t=e(this).find(".name").text();return t.match(/ium$/)}},o={numberGreaterThan50:"function(){\n  var number=$(this).find('.number').text();\n  return parseInt(number, 10) > 50;\n}",ium:"function(){\n  var name=$(this).find('.name').text();\n  return name.match(/ium$/);\n}"},n=e("#filtering-demo .code-display code");e("#filtering-demo .button-group").on("click","button",function(){var r=e(this).attr("data-filter"),s=i[r]||r,a=o[r]||r;t.isotope({filter:s}),n.displayIsotopeCode("filter",a)})})(),function(){var t=e("#combination-filters-demo"),i=t.find(".isotope").isotope({itemSelector:".color-shape",columnWidth:80,transitionDuration:"0.6s"}),o=t.find("pre code"),n={};t.on("click",".button",function(){var t=e(this),r=t.parents(".button-group"),s=r.attr("data-filter-group");n[s]=t.attr("data-filter");var a="";for(var u in n)a+=n[u];i.isotope({filter:a}),o.displayIsotopeCode("filter",a)})}()}}(window,jQuery),function(t,e){"use strict";var i=t.ID;i.index=function(){(function(){var t=e("#hero .isotope").isotope({itemSelector:".element-item",layoutMode:"fitRows",transitionDuration:"0.6s",getSortData:{name:".name",symbol:".symbol",number:".number parseInt",category:"[data-category]",weight:function(t){var i=e(t).find(".weight").text();return parseFloat(i.replace(/[\(\)]/g,""))}}}),i={numberGreaterThan50:function(){var t=e(this).find(".number").text();return parseInt(t,10)>50},ium:function(){var t=e(this).find(".name").text();return t.match(/ium$/)}},o={numberGreaterThan50:"function(){\n  var number=$(this).find('.number').text();\n  return parseInt(number, 10) > 50;\n}",ium:"function(){\n  var name=$(this).find('.name').text();\n  return name.match(/ium$/);\n}"},n=e("#hero .code-display code");e("#hero .sort-by").on("click","button",function(){var i=e(this).attr("data-sort-by");t.isotope({sortBy:i}),n.displayIsotopeCode("sortBy",i)}),e("#hero .filters").on("click","button",function(){var r=e(this).attr("data-filter"),s=i[r]||r,a=o[r]||r;t.isotope({filter:s}),n.displayIsotopeCode("filter",a)})})(),function(){var t=e("#in-use-container");t.find(".in-use-item").hide(),t.isotope({itemSelector:"none",masonry:{columnWidth:".grid-sizer",gutter:".gutter-sizer"}}),t.isotope("option",{itemSelector:".in-use-item"}),t.imagesLoaded().progress(function(i,o){var n=e(o.img).parents(".in-use-item");n.show(),t.isotope("appended",n)})}()}}(window,jQuery),function(t,e){"use strict";var i=t.ID,o=e(t);i["layout-modes"]=function(){(function(){var t=e("#layout-modes-demo .isotope").isotope({itemSelector:".element-item",layoutMode:"masonry",transitionDuration:"0.6s",masonry:{columnWidth:110},cellsByRow:{columnWidth:220,rowHeight:220},masonryHorizontal:{rowHeight:110},cellsByColumn:{columnWidth:220,rowHeight:220}}),i=!1,n=e("#layout-modes-demo .code-display code");e("#layout-modes-demo .button-group").on("click","button",function(){var r=e(this),s=!!r.attr("data-is-horizontal");if(i!==s){var a=s?{height:.7*o.height()}:{width:"auto"};t.css(a),i=s}var u=r.attr("data-layout-mode-value");t.isotope({layoutMode:u}),n.displayIsotopeCode("layoutMode",u)})})()}}(window,jQuery),function(t,e){"use strict";function i(){var t=document.createElement("div"),e=Math.random(),i=Math.random(),o=e>.8?"w3":e>.6?"w2":"",n=i>.8?"h3":i>.5?"h2":"";return t.className="mini-item "+o+" "+n,t}var o=t.ID;o.methods=function(){(function(){var t=e("#appended-demo"),o=t.find(".isotope").isotope({masonry:{columnWidth:50}});t.find("button").on("click",function(){for(var t=[],e=0;3>e;e++){var n=i();t.push(n)}o.append(t).isotope("appended",t)})})(),function(){var t=e("#destroy-demo"),i={masonry:{columnWidth:50}},o=t.find(".isotope").isotope(i),n=!0;t.find("button").on("click",function(){n?o.isotope("destroy"):o.isotope(i),n=!n})}(),function(){var t=e("#insert-demo"),o=t.find(".isotope").isotope({masonry:{columnWidth:50},filter:function(){var t=e(this).find(".number").text();return parseInt(t,10)%2},sortBy:"number",getSortData:{number:".number parseInt"}});t.find("button").on("click",function(){for(var t=[],n=0;3>n;n++){var r=i(),s=Math.floor(100*Math.random());e(r).append('<p class="number">'+s+"</p>"),t.push(r)}o.isotope("insert",t)})}(),function(){var t=e("#layout-demo .isotope").isotope({masonry:{columnWidth:50}});t.on("click",".mini-item",function(){e(this).toggleClass("gigante"),t.isotope("layout")})}(),function(){var t=e("#prepended-demo"),o=t.find(".isotope").isotope({masonry:{columnWidth:50}});t.find("button").on("click",function(){for(var t=[],e=0;3>e;e++){var n=i();t.push(n)}o.prepend(t).isotope("prepended",t)})}(),function(){var t=e("#shuffle-demo"),i=t.find(".isotope").isotope({masonry:{columnWidth:50}});t.find(".button").on("click",function(){i.isotope("shuffle")})}(),function(){var t=e("#stamp-demo"),i=t.find(".isotope").isotope({itemSelector:".mini-item",masonry:{columnWidth:50}}),o=t.find(".stamp"),n=!1;t.find("button").on("click",function(){n?i.isotope("unstamp",o):i.isotope("stamp",o),i.isotope("layout"),n=!n})}(),function(){var t=e("#remove-demo .isotope").isotope({masonry:{columnWidth:50}});t.on("click",".mini-item",function(){t.isotope("remove",this).isotope("layout")})}()}}(window,jQuery),function(t,e){"use strict";var i=t.ID;i.sorting=function(){(function(){var t=e("#sorting-demo .button-group"),i=e("#sorting-demo .isotope").isotope({itemSelector:".element-item",layoutMode:"fitRows",transitionDuration:"0.6s",getSortData:{name:".name",symbol:".symbol",number:".number parseInt",category:"[data-category]",weight:function(t){var i=e(t).find(".weight").text();return parseFloat(i.replace(/[\(\)]/g,""))}}}),o=e("#sorting-demo .code-display code");t.on("click","button",function(){var t=e(this).attr("data-sort-by");i.isotope({sortBy:t}),o.displayIsotopeCode("sortBy",t)})})(),function(){function t(t){return t.split(",")}var i=e("#multiple-sort-by-demo .button-group"),o=e("#multiple-sort-by-demo .isotope").isotope({layoutMode:"fitRows",itemSelector:".mini-item",getSortData:{color:"[data-color]",number:".number parseInt"},sortBy:["color","number"]});i.on("click","button",function(){o.isotope({sortBy:t(this.getAttribute("data-sort-by"))})})}()}}(window,jQuery),function(t,e){"use strict";var i=t.ID;i.vertical=function(){(function(){var t=e("#vertical-feature-demo .isotope").isotope({itemSelector:"li",layoutMode:"vertical",transitionDuration:"0.6s",getSortData:{name:".name",symbol:".symbol",number:".number parseInt",category:".category",weight:function(t){var i=e(t).find(".weight").text();return parseFloat(i.replace(/[\(\)]/g,""))}}});e("#vertical-feature-demo .button-group").on("click","button",function(){var i=e(this).attr("data-sort-by");t.isotope({sortBy:i})})})()}}(window,jQuery);
(function($){
var useWindow=window;
if(!Object.keys){
Object.keys=(function(){
'use strict';
var hasOwnProperty=Object.prototype.hasOwnProperty,
hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),
dontEnums=[
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
],
dontEnumsLength=dontEnums.length;
return function(obj){
if(typeof obj!=='object'&&(typeof obj!=='function'||obj===null)){
throw new TypeError('Object.keys called on non-object');
}
var result=[], prop, i;
for (prop in obj){
if(hasOwnProperty.call(obj, prop)){
result.push(prop);
}}
if(hasDontEnumBug){
for (i=0; i < dontEnumsLength; i++){
if(hasOwnProperty.call(obj, dontEnums[i])){
result.push(dontEnums[i]);
}}
}
return result;
};}());
}
var limited_mode=false;
var tick_duration=200;
var debug=(location.hash==="#debug");
function debug_log(msg){
if(debug){
console.log(msg);
}}
var allUnits=["Days", "Hours", "Minutes", "Seconds"];
var nextUnits={
Seconds: "Minutes",
Minutes: "Hours",
Hours: "Days",
Days: "Years"
};
var secondsIn={
Seconds: 1,
Minutes: 60,
Hours: 3600,
Days: 86400,
Months: 2678400,
Years: 31536000
};
function hexToRgb(hex){
var shorthandRegex=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex=hex.replace(shorthandRegex, function(m, r, g, b){
return r + r + g + g + b + b;
});
var result=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
}:null;
}
function isCanvasSupported(){
var elem=document.createElement('canvas');
return !!(elem.getContext&&elem.getContext('2d'));
}
function s4(){
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
function guid(){
return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
s4() + '-' + s4() + s4() + s4();
}
if(!Array.prototype.indexOf){
Array.prototype.indexOf=function(elt ){
var len=this.length >>> 0;
var from=Number(arguments[1])||0;
from=(from < 0)
? Math.ceil(from)
: Math.floor(from);
if(from < 0)
from +=len;
for (; from < len; from++){
if(from in this &&
this[from]===elt)
return from;
}
return -1;
};}
function parse_date(str){
var match=str.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}\s[0-9]{1,2}:[0-9]{2}:[0-9]{2}$/);
if(match!==null&&match.length > 0){
var parts=str.split(" ");
var date=parts[0].split("-");
var time=parts[1].split(":");
return new Date(date[0], date[1] - 1, date[2], time[0], time[1], time[2]);
}
var d=Date.parse(str);
if(!isNaN(d))
return d;
d=Date.parse(str.replace(/-/g, '/').replace('T', ' '));
if(!isNaN(d))
return d;
return new Date();
}
function parse_times(diff, old_diff, total_duration, units, floor){
var raw_time={};
var raw_old_time={};
var time={};
var pct={};
var old_pct={};
var old_time={};
var greater_unit=null;
for(var i=0; i < units.length; i++){
var unit=units[i];
var maxUnits;
if(greater_unit===null){
maxUnits=total_duration / secondsIn[unit];
}else{
maxUnits=secondsIn[greater_unit] / secondsIn[unit];
}
var curUnits=(diff / secondsIn[unit]);
var oldUnits=(old_diff / secondsIn[unit]);
if(floor){
if(curUnits > 0) curUnits=Math.floor(curUnits);
else curUnits=Math.ceil(curUnits);
if(oldUnits > 0) oldUnits=Math.floor(oldUnits);
else oldUnits=Math.ceil(oldUnits);
}
if(unit!=="Days"){
curUnits=curUnits % maxUnits;
oldUnits=oldUnits % maxUnits;
}
raw_time[unit]=curUnits;
time[unit]=Math.abs(curUnits);
raw_old_time[unit]=oldUnits;
old_time[unit]=Math.abs(oldUnits);
pct[unit]=Math.abs(curUnits) / maxUnits;
old_pct[unit]=Math.abs(oldUnits) / maxUnits;
greater_unit=unit;
}
return {
raw_time: raw_time,
raw_old_time: raw_old_time,
time: time,
old_time: old_time,
pct: pct,
old_pct: old_pct
};}
var TC_Instance_List={};
function updateUsedWindow(){
if(typeof useWindow.TC_Instance_List!=="undefined"){
TC_Instance_List=useWindow.TC_Instance_List;
}else{
useWindow.TC_Instance_List=TC_Instance_List;
}
initializeAnimationFrameHandler(useWindow);
};
function initializeAnimationFrameHandler(w){
var vendors=['webkit', 'moz'];
for (var x=0; x < vendors.length&&!w.requestAnimationFrame; ++x){
w.requestAnimationFrame=w[vendors[x] + 'RequestAnimationFrame'];
w.cancelAnimationFrame=w[vendors[x] + 'CancelAnimationFrame'];
}
if(!w.requestAnimationFrame||!w.cancelAnimationFrame){
w.requestAnimationFrame=function(callback, element, instance){
if(typeof instance==="undefined")
instance={data: {last_frame: 0}};
var currTime=new Date().getTime();
var timeToCall=Math.max(0, 16 - (currTime - instance.data.last_frame));
var id=w.setTimeout(function(){
callback(currTime + timeToCall);
}, timeToCall);
instance.data.last_frame=currTime + timeToCall;
return id;
};
w.cancelAnimationFrame=function(id){
clearTimeout(id);
};}};
var TC_Instance=function(element, options){
this.element=element;
this.container;
this.listeners=null;
this.data={
paused: false,
last_frame: 0,
animation_frame: null,
interval_fallback: null,
timer: false,
total_duration: null,
prev_time: null,
drawn_units: [],
text_elements: {
Days: null,
Hours: null,
Minutes: null,
Seconds: null
},
attributes: {
canvas: null,
context: null,
item_size: null,
line_width: null,
radius: null,
outer_radius: null
},
state: {
fading: {
Days: false,
Hours: false,
Minutes: false,
Seconds: false
}}
};
this.config=null;
this.setOptions(options);
this.initialize();
};
TC_Instance.prototype.clearListeners=function(){
this.listeners={ all: [], visible: [] };};
TC_Instance.prototype.addTime=function(seconds_to_add){
if(this.data.attributes.ref_date instanceof Date){
var d=this.data.attributes.ref_date;
d.setSeconds(d.getSeconds() + seconds_to_add);
}
else if(!isNaN(this.data.attributes.ref_date)){
this.data.attributes.ref_date +=(seconds_to_add * 1000);
}};
TC_Instance.prototype.initialize=function(clear_listeners){
this.data.drawn_units=[];
for(var i=0; i < Object.keys(this.config.time).length; i++){
var unit=Object.keys(this.config.time)[i];
if(this.config.time[unit].show){
this.data.drawn_units.push(unit);
}}
$(this.element).children('div.time_circles').remove();
if(typeof clear_listeners==="undefined")
clear_listeners=true;
if(clear_listeners||this.listeners===null){
this.clearListeners();
}
this.container=$("<div>");
this.container.addClass('time_circles');
this.container.appendTo(this.element);
var height=this.element.offsetHeight;
var width=this.element.offsetWidth;
if(height===0)
height=$(this.element).height();
if(width===0)
width=$(this.element).width();
if(height===0&&width > 0)
height=width / this.data.drawn_units.length;
else if(width===0&&height > 0)
width=height * this.data.drawn_units.length;
var canvasElement=document.createElement('canvas');
canvasElement.width=width;
canvasElement.height=height;
this.data.attributes.canvas=$(canvasElement);
this.data.attributes.canvas.appendTo(this.container);
var canvasSupported=isCanvasSupported();
if(!canvasSupported&&typeof G_vmlCanvasManager!=="undefined"){
G_vmlCanvasManager.initElement(canvasElement);
limited_mode=true;
canvasSupported=true;
}
if(canvasSupported){
this.data.attributes.context=canvasElement.getContext('2d');
}
this.data.attributes.item_size=Math.min(width / this.data.drawn_units.length, height);
this.data.attributes.line_width=this.data.attributes.item_size * this.config.fg_width;
this.data.attributes.radius=((this.data.attributes.item_size * 0.8) - this.data.attributes.line_width) / 2;
this.data.attributes.outer_radius=this.data.attributes.radius + 0.5 * Math.max(this.data.attributes.line_width, this.data.attributes.line_width * this.config.bg_width);
var i=0;
for (var key in this.data.text_elements){
if(!this.config.time[key].show)
continue;
var textElement=$("<div>");
textElement.addClass('textDiv_' + key);
textElement.css("top", Math.round(0.35 * this.data.attributes.item_size));
textElement.css("left", Math.round(i++ * this.data.attributes.item_size));
textElement.css("width", this.data.attributes.item_size);
textElement.appendTo(this.container);
var headerElement=$("<h4>");
headerElement.text(this.config.time[key].text);
headerElement.css("font-size", Math.round(this.config.text_size * this.data.attributes.item_size));
headerElement.css("line-height", Math.round(this.config.text_size * this.data.attributes.item_size) + "px");
headerElement.appendTo(textElement);
var numberElement=$("<span>");
numberElement.css("font-size", Math.round(3 * this.config.text_size * this.data.attributes.item_size));
numberElement.css("line-height", Math.round(this.config.text_size * this.data.attributes.item_size) + "px");
numberElement.appendTo(textElement);
this.data.text_elements[key]=numberElement;
}
this.start();
if(!this.config.start){
this.data.paused=true;
}
var _this=this;
this.data.interval_fallback=useWindow.setInterval(function(){
_this.update.call(_this, true);
}, 100);
};
TC_Instance.prototype.update=function(nodraw){
if(typeof nodraw==="undefined"){
nodraw=false;
}
else if(nodraw&&this.data.paused){
return;
}
if(limited_mode){
this.data.attributes.context.clearRect(0, 0, this.data.attributes.canvas[0].width, this.data.attributes.canvas[0].hright);
}
var diff, old_diff;
var prevDate=this.data.prev_time;
var curDate=new Date();
this.data.prev_time=curDate;
if(prevDate===null)
prevDate=curDate;
if(!this.config.count_past_zero){
if(curDate > this.data.attributes.ref_date){
for(var i=0; i < this.data.drawn_units.length; i++){
var key=this.data.drawn_units[i];
this.data.text_elements[key].text("0");
var x=(i * this.data.attributes.item_size) + (this.data.attributes.item_size / 2);
var y=this.data.attributes.item_size / 2;
var color=this.config.time[key].color;
this.drawArc(x, y, color, 0);
}
this.stop();
return;
}}
diff=(this.data.attributes.ref_date - curDate) / 1000;
old_diff=(this.data.attributes.ref_date - prevDate) / 1000;
var floor=this.config.animation!=="smooth";
var visible_times=parse_times(diff, old_diff, this.data.total_duration, this.data.drawn_units, floor);
var all_times=parse_times(diff, old_diff, secondsIn["Years"], allUnits, floor);
var i=0;
var j=0;
var lastKey=null;
var cur_shown=this.data.drawn_units.slice();
for (var i in allUnits){
var key=allUnits[i];
if(Math.floor(all_times.raw_time[key])!==Math.floor(all_times.raw_old_time[key])){
this.notifyListeners(key, Math.floor(all_times.time[key]), Math.floor(diff), "all");
}
if(cur_shown.indexOf(key) < 0)
continue;
if(Math.floor(visible_times.raw_time[key])!==Math.floor(visible_times.raw_old_time[key])){
this.notifyListeners(key, Math.floor(visible_times.time[key]), Math.floor(diff), "visible");
}
if(!nodraw){
this.data.text_elements[key].text(Math.floor(Math.abs(visible_times.time[key])));
var x=(j * this.data.attributes.item_size) + (this.data.attributes.item_size / 2);
var y=this.data.attributes.item_size / 2;
var color=this.config.time[key].color;
if(this.config.animation==="smooth"){
if(lastKey!==null&&!limited_mode){
if(Math.floor(visible_times.time[lastKey]) > Math.floor(visible_times.old_time[lastKey])){
this.radialFade(x, y, color, 1, key);
this.data.state.fading[key]=true;
}
else if(Math.floor(visible_times.time[lastKey]) < Math.floor(visible_times.old_time[lastKey])){
this.radialFade(x, y, color, 0, key);
this.data.state.fading[key]=true;
}}
if(!this.data.state.fading[key]){
this.drawArc(x, y, color, visible_times.pct[key]);
}}else{
this.animateArc(x, y, color, visible_times.pct[key], visible_times.old_pct[key], (new Date()).getTime() + tick_duration);
}}
lastKey=key;
j++;
}
if(this.data.paused||nodraw){
return;
}
var _this=this;
var update=function(){
_this.update.call(_this);
};
if(this.config.animation==="smooth"){
this.data.animation_frame=useWindow.requestAnimationFrame(update, _this.element, _this);
}else{
var delay=(diff % 1) * 1000;
if(delay < 0)
delay=1000 + delay;
delay +=50;
_this.data.animation_frame=useWindow.setTimeout(function(){
_this.data.animation_frame=useWindow.requestAnimationFrame(update, _this.element, _this);
}, delay);
}};
TC_Instance.prototype.animateArc=function(x, y, color, target_pct, cur_pct, animation_end){
if(this.data.attributes.context===null)
return;
var diff=cur_pct - target_pct;
if(Math.abs(diff) > 0.5){
if(target_pct===0){
this.radialFade(x, y, color, 1);
}else{
this.radialFade(x, y, color, 0);
}}else{
var progress=(tick_duration - (animation_end - (new Date()).getTime())) / tick_duration;
if(progress > 1)
progress=1;
var pct=(cur_pct * (1 - progress)) + (target_pct * progress);
this.drawArc(x, y, color, pct);
if(progress >=1)
return;
var _this=this;
useWindow.requestAnimationFrame(function(){
_this.animateArc(x, y, color, target_pct, cur_pct, animation_end);
}, this.element);
}};
TC_Instance.prototype.drawArc=function(x, y, color, pct){
if(this.data.attributes.context===null)
return;
var clear_radius=Math.max(this.data.attributes.outer_radius, this.data.attributes.item_size / 2);
if(!limited_mode){
this.data.attributes.context.clearRect(x - clear_radius,
y - clear_radius,
clear_radius * 2,
clear_radius * 2
);
}
if(this.config.use_background){
this.data.attributes.context.beginPath();
this.data.attributes.context.arc(x, y, this.data.attributes.radius, 0, 2 * Math.PI, false);
this.data.attributes.context.lineWidth=this.data.attributes.line_width * this.config.bg_width;
this.data.attributes.context.strokeStyle=this.config.circle_bg_color;
this.data.attributes.context.stroke();
}
var startAngle, endAngle, counterClockwise;
var defaultOffset=(-0.5 * Math.PI);
var fullCircle=2 * Math.PI;
startAngle=defaultOffset + (this.config.start_angle / 360 * fullCircle);
var offset=(2 * pct * Math.PI);
if(this.config.direction==="Both"){
counterClockwise=false;
startAngle -=(offset / 2);
endAngle=startAngle + offset;
}else{
if(this.config.direction==="Clockwise"){
counterClockwise=false;
endAngle=startAngle + offset;
}else{
counterClockwise=true;
endAngle=startAngle - offset;
}}
this.data.attributes.context.beginPath();
this.data.attributes.context.arc(x, y, this.data.attributes.radius, startAngle, endAngle, counterClockwise);
this.data.attributes.context.lineWidth=this.data.attributes.line_width;
this.data.attributes.context.strokeStyle=color;
this.data.attributes.context.stroke();
};
TC_Instance.prototype.radialFade=function(x, y, color, from, key){
var rgb=hexToRgb(color);
var _this=this;
var step=0.2 * ((from===1) ? -1:1);
var i;
for (i=0; from <=1&&from >=0; i++){
(function(){
var delay=50 * i;
var rgba="rgba(" + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + (Math.round(from * 10) / 10) + ")";
useWindow.setTimeout(function(){
_this.drawArc(x, y, rgba, 1);
}, delay);
}());
from +=step;
}
if(typeof key!==undefined){
useWindow.setTimeout(function(){
_this.data.state.fading[key]=false;
}, 50 * i);
}};
TC_Instance.prototype.timeLeft=function(){
if(this.data.paused&&typeof this.data.timer==="number"){
return this.data.timer;
}
var now=new Date();
return ((this.data.attributes.ref_date - now) / 1000);
};
TC_Instance.prototype.start=function(){
useWindow.cancelAnimationFrame(this.data.animation_frame);
useWindow.clearTimeout(this.data.animation_frame)
var attr_data_date=$(this.element).data('date');
if(typeof attr_data_date==="undefined"){
attr_data_date=$(this.element).attr('data-date');
}
if(typeof attr_data_date==="string"){
this.data.attributes.ref_date=parse_date(attr_data_date);
}
else if(typeof this.data.timer==="number"){
if(this.data.paused){
this.data.attributes.ref_date=(new Date()).getTime() + (this.data.timer * 1000);
}}else{
var attr_data_timer=$(this.element).data('timer');
if(typeof attr_data_timer==="undefined"){
attr_data_timer=$(this.element).attr('data-timer');
}
if(typeof attr_data_timer==="string"){
attr_data_timer=parseFloat(attr_data_timer);
}
if(typeof attr_data_timer==="number"){
this.data.timer=attr_data_timer;
this.data.attributes.ref_date=(new Date()).getTime() + (attr_data_timer * 1000);
}else{
this.data.attributes.ref_date=this.config.ref_date;
}}
this.data.paused=false;
this.update.call(this);
};
TC_Instance.prototype.restart=function(){
this.data.timer=false;
this.start();
};
TC_Instance.prototype.stop=function(){
if(typeof this.data.timer==="number"){
this.data.timer=this.timeLeft(this);
}
this.data.paused=true;
useWindow.cancelAnimationFrame(this.data.animation_frame);
};
TC_Instance.prototype.destroy=function(){
this.clearListeners();
this.stop();
useWindow.clearInterval(this.data.interval_fallback);
this.data.interval_fallback=null;
this.container.remove();
$(this.element).removeAttr('data-tc-id');
$(this.element).removeData('tc-id');
};
TC_Instance.prototype.setOptions=function(options){
if(this.config===null){
this.default_options.ref_date=new Date();
this.config=$.extend(true, {}, this.default_options);
}
$.extend(true, this.config, options);
if(this.config.use_top_frame){
useWindow=window.top;
}else{
useWindow=window;
}
updateUsedWindow();
this.data.total_duration=this.config.total_duration;
if(typeof this.data.total_duration==="string"){
if(typeof secondsIn[this.data.total_duration]!=="undefined"){
this.data.total_duration=secondsIn[this.data.total_duration];
}
else if(this.data.total_duration==="Auto"){
for(var i=0; i < Object.keys(this.config.time).length; i++){
var unit=Object.keys(this.config.time)[i];
if(this.config.time[unit].show){
this.data.total_duration=secondsIn[nextUnits[unit]];
break;
}}
}else{
this.data.total_duration=secondsIn["Years"];
console.error("Valid values for TimeCircles config.total_duration are either numeric, or (string) Years, Months, Days, Hours, Minutes, Auto");
}}
};
TC_Instance.prototype.addListener=function(f, context, type){
if(typeof f!=="function")
return;
if(typeof type==="undefined")
type="visible";
this.listeners[type].push({func: f, scope: context});
};
TC_Instance.prototype.notifyListeners=function(unit, value, total, type){
for (var i=0; i < this.listeners[type].length; i++){
var listener=this.listeners[type][i];
listener.func.apply(listener.scope, [unit, value, total]);
}};
TC_Instance.prototype.default_options={
ref_date: new Date(),
start: true,
animation: "smooth",
count_past_zero: true,
circle_bg_color: "#60686F",
use_background: true,
fg_width: 0.1,
bg_width: 1.2,
text_size: 0.07,
total_duration: "Auto",
direction: "Clockwise",
use_top_frame: false,
start_angle: 0,
time: {
Days: {
show: true,
text: "Days",
color: "#FC6"
},
Hours: {
show: true,
text: "Hours",
color: "#9CF"
},
Minutes: {
show: true,
text: "Minutes",
color: "#BFB"
},
Seconds: {
show: true,
text: "Seconds",
color: "#F99"
}}
};
var TC_Class=function(elements, options){
this.elements=elements;
this.options=options;
this.foreach();
};
TC_Class.prototype.getInstance=function(element){
var instance;
var cur_id=$(element).data("tc-id");
if(typeof cur_id==="undefined"){
cur_id=guid();
$(element).attr("data-tc-id", cur_id);
}
if(typeof TC_Instance_List[cur_id]==="undefined"){
var options=this.options;
var element_options=$(element).data('options');
if(typeof element_options==="string"){
element_options=JSON.parse(element_options);
}
if(typeof element_options==="object"){
options=$.extend(true, {}, this.options, element_options);
}
instance=new TC_Instance(element, options);
TC_Instance_List[cur_id]=instance;
}else{
instance=TC_Instance_List[cur_id];
if(typeof this.options!=="undefined"){
instance.setOptions(this.options);
}}
return instance;
};
TC_Class.prototype.addTime=function(seconds_to_add){
this.foreach(function(instance){
instance.addTime(seconds_to_add);
});
};
TC_Class.prototype.foreach=function(callback){
var _this=this;
this.elements.each(function(){
var instance=_this.getInstance(this);
if(typeof callback==="function"){
callback(instance);
}});
return this;
};
TC_Class.prototype.start=function(){
this.foreach(function(instance){
instance.start();
});
return this;
};
TC_Class.prototype.stop=function(){
this.foreach(function(instance){
instance.stop();
});
return this;
};
TC_Class.prototype.restart=function(){
this.foreach(function(instance){
instance.restart();
});
return this;
};
TC_Class.prototype.rebuild=function(){
this.foreach(function(instance){
instance.initialize(false);
});
return this;
};
TC_Class.prototype.getTime=function(){
return this.getInstance(this.elements[0]).timeLeft();
};
TC_Class.prototype.addListener=function(f, type){
if(typeof type==="undefined")
type="visible";
var _this=this;
this.foreach(function(instance){
instance.addListener(f, _this.elements, type);
});
return this;
};
TC_Class.prototype.destroy=function(){
this.foreach(function(instance){
instance.destroy();
});
return this;
};
TC_Class.prototype.end=function(){
return this.elements;
};
$.fn.TimeCircles=function(options){
return new TC_Class(this, options);
};}(jQuery));
(function ($){
$.fn.TreeSixtyImageRotate=function (options){
let base=this;
let settings=$.extend({
totalFrames: 36,
endFrame: 36,
currentFrame: 0,
speed: 100,
dragSpeed: 6,
progress: ".spinner",
extension: ".jpg",
imgPrefix: "",
navigation: true,
spinner: true,
imagesFolder: "images/",
smallWidth: 400,
smallHeight: 400,
largeWidth: 800,
largeHeight: 800,
imagePlaceholderClass: "images-placeholder",
imgList: "threesixty-images-rotate"
}, options);
base.initTreeSixty=function (){
base.css({
"height": settings.smallHeight,
"width": settings.smallWidth,
"position": "relative",
"margin": "auto"
});
if(settings.spinner){
base.spinner("start");
}
if(settings.navigation){
base.createNavigation();
}
let changeSlide=false, previousSlide=false, nextNext=false, xAxis, nextXAxis;
base.find(".images-list").on("mousedown touchstart", function (e){
e.preventDefault();
if(e.type==="mousedown"){
xAxis=e.pageX;
}else{
xAxis=e.originalEvent.touches[0].pageX;
}
changeSlide=true;
}).on("mousemove touchmove", function (e){
if(changeSlide){
if(e.type==="mousemove"){
nextXAxis=e.pageX;
}else{
nextXAxis=e.originalEvent.touches[0].pageX;
}
if(nextXAxis > xAxis + settings.dragSpeed){
previousSlide=true;
xAxis=nextXAxis;
base.previous();
}else if(nextXAxis < xAxis - settings.dragSpeed){
nextNext=true;
xAxis=nextXAxis;
base.next();
}}
}).on("mouseleave mouseup touchend", function (e){
changeSlide=false;
});
if(settings.spinner){
base.spinner("stop");
}};
base.createNavigation=function (){
let navigationBarWrapper, navigationBar, next, previous, playStop;
navigationBarWrapper=$("<div/>").attr("class", "navigation-bar-wrapper");
navigationBar=$("<div/>").attr("class", "navigation-bar");
next=$("<div/>").attr({
"class": "navigation-bar-next"
});
previous=$("<div/>").attr({
"class": "navigation-bar-previous"
});
playStop=$("<div/>").attr({
"class": "navigation-bar-play"
});
navigationBar.append(previous);
navigationBar.append(playStop);
navigationBar.append(next);
navigationBarWrapper.append(navigationBar);
base.append(navigationBarWrapper);
let nextInterval;
next.on("mousedown touchstart", function (e){
e.preventDefault();
nextInterval=setInterval(function (){
base.next()
}, settings.speed)
}).on("mouseleave mouseup touchend", function (){
clearInterval(nextInterval);
});
let previousInterval;
previous.on("mousedown touchstart", function (e){
e.preventDefault();
previousInterval=setInterval(function (){
base.previous()
}, settings.speed)
}).on("mouseleave mouseup touchend", function (){
clearInterval(previousInterval);
});
let play=false, playStopInterval;
playStop.on("mousedown touchstart", function (e){
e.preventDefault();
if(!play){
base.find('.navigation-bar-play').addClass('navigation-bar-stop');
play=true;
playStopInterval=setInterval(function (){
base.next()
}, settings.speed)
}else{
base.find('.navigation-bar-play').removeClass('navigation-bar-stop');
play=false;
clearInterval(playStopInterval)
}});
};
base.spinner=function (status){
let spinner;
spinner=$("<div/>").attr({
"class": "loading-spinner"
});
base.append(spinner);
if(status==="start"){
let winWidth=$(window).width();
if(winWidth > 991){
base.find('.loading-spinner').css({
"height": settings.smallHeight,
"width": settings.smallWidth,
})
}else{
base.find('.loading-spinner').css({
"max-height": settings.largeHeight,
"max-width": settings.largeWidth,
"height": winWidth,
"width": winWidth,
});
}}else if(status==="stop"){
base.find('.loading-spinner').css({
"display": "none"
});
}else{
console.log("Invalid status for spinner");
}};
base.next=function (){
let currentSlide=base.find(".active");
let imgPositionClass=currentSlide.attr("class").split(/\s+/)[1];
let imgPossition=parseInt(imgPositionClass.substring(6));
imgPossition--;
if(imgPossition < 0){
imgPossition=settings.totalFrames;
}
let nextImgClass="image-" + imgPossition;
base.find("." + nextImgClass).addClass("active");
currentSlide.removeClass("active");
};
base.previous=function (){
let currentSlide=base.find(".active");
let imgPositionClass=currentSlide.attr("class").split(/\s+/)[1];
let imgPossition=parseInt(imgPositionClass.substring(6));
imgPossition++;
if(imgPossition > settings.totalFrames){
imgPossition=0;
}
let nextImgClass="image-" + imgPossition;
base.find("." + nextImgClass).addClass("active");
currentSlide.removeClass("active");
};
base.togleFullScreen=function (){
if(!$(document)[0].fullscreenElement &&
!$(document)[0].mozFullScreenElement&&!$(document)[0].webkitFullscreenElement&&!$(document)[0].msFullscreenElement){
if($(this)[0].requestFullscreen){
$(this)[0].requestFullscreen();
}else if($(this)[0].msRequestFullscreen){
$(this)[0].msRequestFullscreen();
}else if($(this)[0].mozRequestFullScreen){
$(this)[0].mozRequestFullScreen();
}else if($(this)[0].webkitRequestFullscreen){
$(this)[0].webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}}else{
if($(document)[0].exitFullscreen){
$(document)[0].exitFullscreen();
}else if($(document)[0].msExitFullscreen){
$(document)[0].msExitFullscreen();
}else if($(document)[0].mozCancelFullScreen){
$(document)[0].mozCancelFullScreen();
}else if($(document)[0].webkitExitFullscreen){
$(document)[0].webkitExitFullscreen();
}}
};
base.on('webkitfullscreenchange mozfullscreenchange fullscreenchange', function (e){
base.resize();
});
$(window).resize(function (e){
let winWidth=$(window).width();
if(winWidth > 991){
base.css({
"height": settings.smallHeight,
"width": settings.smallWidth,
})
}else{
base.css({
"max-height": settings.largeHeight,
"max-width": settings.largeWidth,
"height": winWidth,
"width": winWidth,
});
}});
$(document).ready(function (e){
let winWidth=$(window).width();
if(winWidth > 991){
base.css({
"height": settings.smallHeight,
"width": settings.smallWidth,
})
}else{
base.css({
"max-height": settings.largeHeight,
"max-width": settings.largeWidth,
"height": winWidth,
"width": winWidth,
});
}});
return base;
};})
(jQuery);
(function($){
"use strict";
$(document).ready(function(){
$('.bwp-portfolio').each(function(){
var $this=$(this);
var $id=this.id;
var $pf_id=('#' + this.id);
var $bwp_style=$this.data('style');
var $container_id=$('#container_'+ $id);
var $tab_id=$('#tab_'+ $id);
var $container=$container_id;
if($bwp_style=='fitRows'){
$container.imagesLoaded().progress(function(){
$container.isotope({
layoutMode:'fitRows'
});
});
}else{
var window_width=$(window).width();
if(window_width >=768){
$container.imagesLoaded().progress(function(){
$container.isotope({
layoutMode:'masonry',
percentPosition: true,
masonry: {
columnWidth: '.portfolio-item'
}});
});
}}
var $optionSets=$tab_id,
$optionLinks=$optionSets.find('li');
$optionLinks.on("click", function(){
var $this=$(this);
if($this.hasClass('selected')){
return false;
}
var $optionSet=$this.parents($tab_id);
$optionSets.find('.selected').removeClass('selected');
$this.addClass('selected');
var selector=$(this).attr('data-portfolio-filter');
$container.isotope({ filter: selector });
return false;
});
});
});
})(jQuery);
(function($){
"use strict";
var _body=$('body'),
_window=$(window);
$(document).ready(function(){
_filter_ajax_sort_count();
_sticky_menu();
_sticky_product();
_left_right_submenu();
_search_toggle();
_categories_menu_toggle();
_back_to_top();
_toggle_categories();
_event_single_image();
_layout_blog_masonry();
_load_wpbingo_menu_sidebar();
_event_ajax_search();
_event_circlestime();
_event_accordion_slider();
_tongle_menu();
_remove_animation_tab_visua();
_load_video_popup();
_moreverticalMenu();
_click_button();
_header_clear();
_click_add_to_cart();
_after_add_to_cart();
_active_form_login();
_load_count_up();
_load_360_view_product();
_load_slick_carousel($(".related .slick-carousel"));
_load_slick_carousel($(".upsells .slick-carousel"));
_load_slick_carousel($(".cross_sell .slick-carousel"));
_load_slick_carousel($(".woocommerce-product-subcategories.slick-carousel"));
_load_slick_carousel($(".bestseller-product .slick-carousel"));
$(".gallery-slider .slick-carousel").each(function(){
_load_slick_carousel($(this));
});
$(".bwp-single-product .slick-carousel").each(function(){
_load_slick_carousel($(this));
});
_click_quickview_button();
});
_window.resize(function(){
_load_canvas_menu();
_left_right_submenu();
_tongle_menu();
_moreverticalMenu();
});
_window.load(function(){
_body.addClass('loaded');
if($(".woocommerce-product-subcategorie-content").length > 0){
$(".woocommerce-product-subcategorie-content").addClass('active');
}});
function _tongle_menu(){
var wd_width=_window.width();
var $menu_sidebar=$("#menu-main-menu",".home-sidebar");
var $menu_left=$("#menu-main-menu",".header-v3");
appendGrower($menu_left);
var $menu_left_2=$("#menu-main-menu",".header-v8");
appendGrower($menu_left_2);
if(wd_width > 991){
offtogglemegamenu($menu_sidebar);
}else{
appendGrower($menu_sidebar);
}}
function _filter_ajax_sort_count(){
if(!$('.bwp-filter-ajax').length){
$(".sort-count").change(function(){
var value=$(this).val();
_setGetParameter('product_count',value);
});
}}
function _toggle_categories(){
var $root=$(".widget_product_categories");
if($(".current-cat-parent",$root).length > 0){
var $current_parent=$(".current-cat-parent",$root);
$current_parent.addClass('open');
$("> .children",$current_parent).stop().slideToggle(400);
}
var $current=$(".current-cat",$root);
$current.addClass('open');
$("> .children",$current).stop().slideToggle(400);
$('.cat-parent',$root).each(function(index){
var $element=$(this);
if($(".children",$element).length > 0){
$element.prepend('<span class="arrow"></span>');
$(".arrow",$element).on('click', function(e){
e.preventDefault();
$element.toggleClass('open').find('> .children').stop().slideToggle(400);
});
}});
}
function _back_to_top(){
_window.scroll(function(){
if($(this).scrollTop() > 100){
$('.back-top').addClass('button-show');
}else{
$('.back-top').removeClass('button-show');
}});
$('.back-top').on("click", function(){
$('html, body').animate({
scrollTop: 0
}, 800);
return false;
});
}
function _categories_menu_toggle(){
if($('.categories-menu .btn-categories').length){
$('.categories-menu .btn-categories').on("click", function(){
$('.wrapper-categories').toggleClass('bwp-active');
});
}}
function _search_toggle(){
$('.search-toggle').on('click.break', function(event){
$('.page-wrapper').toggleClass('opacity-style');
var wrapper=$('.search-overlay');
wrapper.toggleClass('search-visible');
});
$('.close-search','.search-overlay').on('click.break', function(event){
$('.page-wrapper').toggleClass('opacity-style');
var wrapper=$('.search-overlay');
wrapper.toggleClass('search-visible');
});
}
function _show_homepage_sidebar(){
var $homepage_sidebar=$('.header-sideward-left-menu');
$('.btn-sideward-left').on("click", function(){
if($homepage_sidebar.hasClass('active')){
$homepage_sidebar.removeClass('active');
}else{
$homepage_sidebar.addClass('active');
}
return false;
});
}
_show_homepage_sidebar();
function _wpbingo_menu_left(){
var $header_wpbingo_menu_left=$('.header-wpbingo-menu-left');
$('.wpbingo-menu-left .menu-title').on("click", function(){
if($header_wpbingo_menu_left.hasClass('active')){
$header_wpbingo_menu_left.removeClass('active');
}else{
$header_wpbingo_menu_left.addClass('active');
}
return false;
});
}
_wpbingo_menu_left();
function _show_sticky_sidebar(){
var $sticky_sidebar=$('.sticky-sidebar');
$('.btn-sticky').on("click", function(){
if($sticky_sidebar.hasClass('active')){
$sticky_sidebar.removeClass('active');
}else{
$sticky_sidebar.addClass('active');
}
return false;
});
}
_show_sticky_sidebar();
function _vitic_accordion_menu(){
var $elements=$(".categories-vertical-menu.accordion");
$('.widget-title',$elements).on("click", function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
$('.bwp-vertical-navigation >div',$elements).slideUp();
}else{
$(this).addClass('active');
$('.bwp-vertical-navigation >div',$elements).slideDown();
}});
}
_vitic_accordion_menu();
function _headercategories(){
var $menu_categories=$('.menu-categories');
$('.navigation-categories').on("click", function(){
if($menu_categories.hasClass('active')){
$menu_categories.removeClass('active');
}else{
$menu_categories.addClass('active');
}
return false;
});
$('.vitic-close',$menu_categories).on("click", function(){
$menu_categories.removeClass('active');
return false;
});
}
_headercategories();
function _canvasrightNavigation(){
var $wpbingo_menu_right=$('.wpbingo-menu-right');
$('.navigation-right').on("click", function(){
if($wpbingo_menu_right.hasClass('active')){
$wpbingo_menu_right.removeClass('active');
}else{
$wpbingo_menu_right.addClass('active');
}
return false;
});
$('.vitic-close',$wpbingo_menu_right).on("click", function(){
$wpbingo_menu_right.removeClass('active');
return false;
});
}
_canvasrightNavigation();
function _setGetParameter(paramName, paramValue){
var url=window.location.href;
var hash=location.hash;
url=url.replace(hash, '');
if(url.indexOf(paramName + "=") >=0){
var prefix=url.substring(0, url.indexOf(paramName));
var suffix=url.substring(url.indexOf(paramName));
suffix=suffix.substring(suffix.indexOf("=") + 1);
suffix=(suffix.indexOf("&") >=0) ? suffix.substring(suffix.indexOf("&")):"";
url=prefix + paramName + "=" + paramValue + suffix;
}else{
if(url.indexOf("?") < 0)
url +="?" + paramName + "=" + paramValue;
else
url +="&" + paramName + "=" + paramValue;
}
window.location.href=url + hash;
}
function _sticky_menu(){
if(_window.width() >=992){
if($(".header-wrapper").data("sticky_header")){
var current_scroll=0;
var bwp_width=_window.width();
_window.scroll(function(){
var next_scroll=$(this).scrollTop();
if((next_scroll < current_scroll)&&next_scroll > 200){
$('.bwp-header').addClass('sticky');
}else if(next_scroll >=current_scroll||next_scroll <=200){
$('.bwp-header').removeClass('sticky');
}
current_scroll=next_scroll;
});
}}
}
function _sticky_product(){
var $parent=$(".single-product");
if($(".sticky-product",$parent).length > 0){
var bwp_width=_window.width();
_window.scroll(function(){
var scroll_top=_window.scrollTop();
var offset_top=$(".single_add_to_cart_button",$parent).offset().top;
var distance=(offset_top - scroll_top);
if(distance <=0){
$('.sticky-product',$parent).addClass('sticky');
}else{
$('.sticky-product',$parent).removeClass('sticky');
}});
}}
function _vitic_top_link(){
var custom_menu=$('.block-top-link .widget-custom-menu');
$('.widget-title',custom_menu).on("click", function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
$('div',$(this).parent()).slideUp();
}else{
$('.widget-title',custom_menu).removeClass('active');
$('div',custom_menu).slideUp();
$(this).addClass('active');
$('div',$(this).parent()).slideDown();
}});
}
_vitic_top_link();
function _load_slick_carousel($element){
$element.slick({
arrows: $element.data("nav") ? true:false ,
dots: $element.data("dots") ? true:false ,
draggable:$element.data("draggable") ? false:true ,
infinite: $element.data("infinite") ? false:true ,
prevArrow: '<i class="slick-arrow fa fa-angle-left"></i>',
slidesToScroll:$element.data("slidestoscroll") ? $element.data("columns"):1,
nextArrow: '<i class="slick-arrow fa fa-angle-right"></i>',
slidesToShow: $element.data("columns"),
asNavFor: $element.data("asnavfor") ? $element.data("asnavfor"):false ,
vertical: $element.data("vertical") ? true:false ,
verticalSwiping: $element.data("verticalswiping") ? $element.data("verticalswiping"):false ,
rtl: (_body.hasClass("rtl")&&!$element.data("vertical")) ? true:false ,
centerMode: $element.data("centermode") ? $element.data("centermode"):false ,
centerPadding: $element.data("centerpadding") ? $element.data("centerpadding"):false ,
focusOnSelect: $element.data("focusonselect") ? $element.data("focusonselect"):false ,
fade: ($element.data("fade")&&!_body.hasClass("rtl")) ? true:false ,
cssEase: 'linear',
responsive: [
{
breakpoint: 1441,
settings: {
slidesToShow: $element.data("columns1440") ? $element.data("columns1440"):$element.data("columns"),
slidesToScroll: $element.data("columns1440") ? $element.data("columns1440"):$element.data("columns"),
}},
{
breakpoint: 1200,
settings: {
slidesToShow: $element.data("columns1"),
slidesToScroll: $element.data("columns1"),
}},
{
breakpoint: 1024,
settings: {
slidesToShow: $element.data("columns2"),
slidesToScroll: $element.data("columns2"),
centerMode:false,
}},
{
breakpoint: 768,
settings: {
slidesToShow: $element.data("columns3"),
slidesToScroll: $element.data("columns3"),
vertical: false,
verticalSwiping:false,
centerMode:false,
}},
{
breakpoint: 480,
settings: {
slidesToShow: $element.data("columns4"),
slidesToScroll: $element.data("columns4"),
vertical: false,
verticalSwiping:false,
centerMode:false,
}}
],
onAfterChange: function(){
_move_nav_slick($element);
}});
_move_nav_slick($element);
}
function _move_nav_slick($element){
if($(".slick-arrow",$element).length > 0){
var $prev=$(".fa-angle-left",$element).clone();
$(".fa-angle-left",$element).remove();
if($element.parent().find(".fa-angle-left").length==0){
$prev.prependTo($element.parent());
}
$prev.on("click", function(){
$element.slick('slickPrev');
});
var $next=$(".fa-angle-right",$element).clone();
$(".fa-angle-right",$element).remove();
if($element.parent().find(".fa-angle-right").length==0){
$next.appendTo($element.parent());
}
$next.on("click", function(){
$element.slick('slickNext');
});
}}
function _dropdown_menu(){
$(".pwb-dropdown").each(function(){
var $dropdown=$(this);
var active_text=$dropdown.find('li.active').text();
if(active_text){
$(".pwb-dropdown-toggle",$dropdown).html(active_text);
}
$("li",$dropdown).on("click", function(){
$("li",$dropdown).removeClass("active");
$(this).addClass('active');
var this_text=$(this).text();
$(".pwb-dropdown-toggle",$dropdown).html(this_text);
$dropdown.removeClass("open");
if($dropdown.hasClass('select_category')){
var this_value=$(this).data("value");
$(".product-cat",".select_category").val(this_value);
}});
});
}
_dropdown_menu();
function _click_toggle_filter(){
$(".button-filter-toggle").on("click", function(){
if($(this).hasClass('active')){
$(".button-filter-toggle").removeClass('active');
$(".filter_offcanvas").removeClass('active');
$(".sidebar-product-filter").removeClass('active');
$(".main-archive-product").removeClass('active');
$(".sidebar-product-filter").slideUp();
}else{
$(".button-filter-toggle").addClass('active');
$(".filter_offcanvas").addClass('active');
$(".sidebar-product-filter").addClass('active');
$(".main-archive-product").addClass('active');
$(".sidebar-product-filter").slideDown();
}});
}
_click_toggle_filter();
function _click_button_canvas_menu(){
$('#show-megamenu').on("click", function(){
if($('.bwp-canvas-navigation').hasClass('active'))
$('.bwp-canvas-navigation').removeClass('active');
else
$('.bwp-canvas-navigation').addClass('active');
return false;
});
$('#show-verticalmenu').on("click", function(){
if($(".bwp-canvas-vertical").hasClass('active')){
$(".bwp-canvas-vertical").removeClass('active');
}else{
$(".bwp-canvas-vertical").addClass('active');
}
return false;
});
}
_click_button_canvas_menu();
function _load_canvas_menu(){
var wd_width=_window.width();
var $main_menu=$(".menu","#main-navigation");
if(wd_width <=991){
if($("#canvas-main-menu").length < 1&&$main_menu.length > 0){
var $menu=$main_menu.parent().clone();
$menu.attr("id", "canvas-main-menu");
$($menu).find(".menu").removeAttr('id');
$('#page').append('<div  class="bwp-canvas-navigation"><span id="remove-megamenu" class="remove-megamenu icon-remove">'+$('.bwp-navigation').data('text_close')+'</span></div>');
$('.bwp-canvas-navigation').append($menu);
$menu.mmenu({
offCanvas: false,
"navbar": {
"title": false
}});
_remove_canvas_menu();
}
if($("#canvas-vertical-menu").length < 1){
var $vertical=$(".bwp-vertical-navigation >div").clone();
$vertical.attr("id", "canvas-vertical-menu");
$($vertical).find(".menu").removeAttr('id');
$('#page').append('<div  class="bwp-canvas-vertical"><span id="remove-verticalmenu" class="remove-verticalmenu icon-remove">'+$('.bwp-navigation').data('text_close')+'</span></div>');
$('.bwp-canvas-vertical').append($vertical);
$vertical.mmenu({
offCanvas: false,
"navbar": {
"title": false
}});
_remove_canvas_menu();
}}else{
$(".bwp-canvas-navigation").remove();
$(".bwp-canvas-vertical").remove();
}}
_load_canvas_menu();
function _remove_canvas_menu(){
$('#remove-megamenu').on("click", function(){
$('.bwp-canvas-navigation').removeClass('active');
return false;
});
$('#remove-verticalmenu').on("click", function(){
$(".bwp-canvas-vertical").removeClass('active');
return false;
});
}
function _layout_blog_masonry(){
var $container=$(".blog-content-masonry");
$container.imagesLoaded().progress(function(){
$container.isotope({
layoutMode:"masonry",
percentPosition: true,
masonry: {
columnWidth: ".masonry-post"
}});
});
}
function _event_single_image(){
if($(".bwp-single-product").length){
var $element=$(".bwp-single-product");
var _data=$element.data();
if(_data.product_layout_thumb=="zoom"&&$("#image").length){
$('.variations_form').on('wc_variation_form show_variation reset_image', function(){
$('.zoomContainer .zoomWindowContainer .zoomWindow').css('background-image', 'url(' + $('#image').attr('src') + ')');
});
_zoomSingleImage(_data);
}
if(_data.product_layout_thumb=="scroll"){
$('.variations_form').on('wc_variation_form show_variation reset_image', function(){
$('.image-thumbnail').slickGoTo(0);
});
$('.img-thumbnail a').swipebox();
}
if(_data.product_layout_thumb=="list"||_data.product_layout_thumb=="list2"){
$('.img-thumbnail a').swipebox();
$('.variations_form').on('wc_variation_form show_variation reset_image', function(){
$(window).scrollTop(300);
});
}}
}
function _zoomSingleImage(_data){
if(($(window).width()) >=768){
$("#image").elevateZoom({
zoomType:_data.zoomtype,
scrollZoom:_data.zoom_scroll,
lensSize:_data.lenssize,
lensShape:_data.lensshape,
containLensZoom:_data.zoom_contain_lens,
gallery:'image-thumbnail',
cursor: 'crosshair',
galleryActiveClass: "active",
lensBorder: _data.lensborder,
borderSize:_data.bordersize,
borderColour:_data.bordercolour,
});
}else{
$("#image").elevateZoom({
zoomEnabled: false,
scrollZoom: false,
gallery:'image-thumbnail',
cursor: 'crosshair',
galleryActiveClass: "active"
});
}
if(_data.popup){
$("#image").bind("click", function(e){
e.preventDefault();
var ez=$('#image').data('elevateZoom');
$.swipebox(ez.getGalleryList());
});
}else{
$("#image").bind("click", function(e){
return false;
});
}}
function _load_wpbingo_menu_sidebar(){
var $menu=$(".wpbingo-menu-sidebar");
appendGrower($menu);
}
function appendGrower($menu){
if($("li.menu-item-has-children",$menu).find('.grower').length <=0){
$("li.menu-item-has-children",$menu).append('<span class="grower close"> </span>');
clickGrower($menu);
}}
function removeGrower($menu){
$(".grower",$menu).remove();
}
function offtogglemegamenu($menu){
$('li.menu-item-has-children .sub-menu',$menu).css('display','');
$menu.removeClass('active');
$("li.menu-item-has-children  .grower",$menu).removeClass('open').addClass('close');
}
function clickGrower($menu){
$("li.menu-item-has-children  .grower",$menu).on("click", function(){
if($(this).hasClass('close')){
$(this).addClass('open').removeClass('close');
$('.sub-menu',$(this).parent()).first().slideDown();
}else{
$(this).addClass('close').removeClass('open');
$('.sub-menu',$(this).parent()).first().slideUp();
}});
}
function _moreverticalMenu(){
var $element=$(".categories-vertical-menu");
var max_number_1530=$element.data("max_number_1530") ? $element.data("max_number_1530"):"15";
var max_number_1200=$element.data("max_number_1200") ? $element.data("max_number_1200"):"8";
var max_number_991=$element.data("max_number_991") ? $element.data("max_number_991"):"6";
if($(window).width() >=1530){
_appendMoreCategories($element,max_number_1530);
}else if($(window).width() >=1200){
_appendMoreCategories($element,max_number_1200);
}else if($(window).width() >=992){
_appendMoreCategories($element,max_number_991);
}}
function _appendMoreCategories($element,limit){
var textmore=$element.data("textmore") ? $element.data("textmore"):"Load More";
var closemore=$element.data("textclose") ? $element.data("textclose"):"Close";
if($("ul.menu >li",$element).length > limit&&$element.find(".more-wrap").length <=0){
$("ul.menu",$element).append('<div class="more-wrap"><span class="more-view">'+textmore+'</span></div>');
}
$(".more-wrap",$element).unbind("click");
$(".more-wrap",$element).on("click", function(){
var this_more=$(this);
if($(this).hasClass('open')){
$("ul.menu >li",$element).each(function(i){
if(i>limit-1){
$(this).slideUp();
}});
$(this).removeClass('open');
$(this_more).html('<span class="more-view">'+textmore+'</span>');
}else{
$('ul.menu >li',$element).each(function(i){
if(i>limit-1){
$(this).slideDown();
}});
$(this).addClass('open');
$(this_more).html('<span class="more-view">'+closemore+'</span>');
}});
$("ul.menu >li",$element).css('display', 'block');
$("ul.menu >li",$element).each(function(i){
if(i> (limit -1)){
$(this).css('display', 'none');
}});
}
function _event_ajax_search(){
var $element=$(".ajax-search");
$(".input-search",$element).on("keydown", function(){
setTimeout(function($e){
var character=$e.val();
var limit=$element.data("limit") ? $element.data("limit"):5;
var $category_search=$(".category-search",$element);
var category=$("li.active",$category_search).data("value");
if(character.length >=2){
$(".result-search-products",$element).empty();
$(".result-search-products",$element).addClass("loading");
$(".result-search-products",$element).show();
$(".result-search-products-content",$element).show();
$.ajax({
url: $element.data("admin"),
dataType: 'json',
data: {
action:"vitic_search_products_ajax",
character:character,
limit:limit,
category:category
},
success: function(json){
var html='';
if(json.length){
for (var i=0; i < json.length; i++){
if(!json[i]['category']){
html +='<li class="item-search">';
html +='	<a class="item-image" href="' + json[i]['link'] + '"><img class="pull-left" src="' + json[i]['image'] + '"></a>';
character=(character).toLowerCase(character);
character=(character).replace("%20"," ");
json[i]['name']=(json[i]['name']).toLowerCase(json[i]['name']);
json[i]['name']=(json[i]['name']).replace(character, '<b>'+character+'</b>');
html +='<div class="item-content">';
html +='<a href="' + json[i]['link'] + '" title="' + json[i]['name'] + '"><span>'	+ json[i]['name'] + '</span></a>';
if(json[i]['price']){
html +='<div class="price">'+json[i]['price']+'</div>';
}
html +='</div></li>';
}}
}else{
html='<li class="no-result-item">'+$element.data("noresult")+'</li>';
}
$(".result-search-products",$element).removeClass("loading");
$(".result-search-products",$element).html(html);
}});
}else{
$(".result-search-products",$element).removeClass("loading");
$(".result-search-products",$element).empty();
$(".result-search-products",$element).hide();
$(".result-search-products-content",$element).hide();
}}, 200, $(this));
});
}
function _event_circlestime(){
$(".time-circles").each(function(){
var $circles=$(this);
$circles.TimeCircles({
circle_bg_color: $circles.data("bg_color"),
fg_width: $circles.data("fg_width"),
bg_width: $circles.data("bg_width"),
time: {
Days: {
color: $circles.data("time_color"),
text:$circles.data("text_day")
},
Hours: {
color: $circles.data("time_color"),
text:$circles.data("text_hour")
},
Minutes: {
color: $circles.data("time_color"),
text:$circles.data("text_min")
},
Seconds: {
color: $circles.data("time_color"),
text:$circles.data("text_sec")
}}
});
});
}
function _left_right_submenu(){
$(".menu-item-has-children.level-1").each(function(){
var _item_menu=$(this);
var spacing_item_menu=_item_menu.outerWidth();
var spacing_item_menu_left=_item_menu.offset().left;
var spacing_item_menu_right=_window.width() - (spacing_item_menu+spacing_item_menu_left);
if(spacing_item_menu_right <=225){
_item_menu.addClass("sub-menu-left");
}else{
_item_menu.removeClass("sub-menu-left");
}});
}
function _event_accordion_slider(){
$(".bwp-slider .accordion").each(function(){
var $accordion=$(this);
$("li",$accordion).first().addClass("active");
$("li",$accordion).hover(function(){
$("li",$accordion).removeClass('active');
$(this).addClass("active");
});
});
}
function _remove_animation_tab_visua(){
if(jQuery.fn.vcAccordion){
var _isAnimated=jQuery.fn.vcAccordion.Constructor.prototype.isAnimated;
jQuery.fn.vcAccordion.Constructor.prototype.isAnimated=function(){
return 0;
}}
}
function _load_video_popup(){
$(".bwp-video").on("click", function(){
$.fancybox({
'padding':0,
'href':$(this).attr("href").replace(new RegExp("watch\\?v=", "i"), 'v/'),
'type':'swf'
});
return false;
});
}
function _load_count_up(){
var a=0;
if($('.bwp-cta').length > 0){
_window.scroll(function(){
var oTop=$('.bwp-cta').offset().top - window.innerHeight;
if(a==0&&_window.scrollTop() > oTop){
$('.count-cta').each(function (){
$(this).prop('Counter',0).animate({
Counter: $(this).text()
}, {
duration: 2000,
easing: 'swing',
step: function (now){
$(this).text(Math.ceil(now));
}});
});
a=1;
}});
}}
function _load_360_view_product(){
$('.product-360-view').TreeSixtyImageRotate({
totalFrames: $('.product-360-view').data("count"),
endFrame: $('.product-360-view').data("count"),
imagePlaceholderClass: "images-placeholder"
}).initTreeSixty();
$(".vitic-360-button").on("click", function(){
if($('.content-product-360-view').hasClass('active')){
$('.content-product-360-view').removeClass('active');
}else{
$('.content-product-360-view').addClass('active');
}});
}
function _click_button(){
$(".active-menu").on("click", function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
}else{
$(this).addClass('active');
}
if($('.header-main').hasClass('active')){
$('.header-main').removeClass('active');
}else{
$('.header-main').addClass('active');
}});
$(".title-size-guide").on("click", function(){
if($('.size-guide').hasClass('active')){
$('.size-guide').removeClass('active');
}else{
$('.size-guide').addClass('active');
}});
}
function _after_add_to_cart(){
$(_body).on('added_to_cart', function(){
_click_add_to_cart();
});
}
function _click_add_to_cart(){
$(".add_to_cart_button").on("click", function(){
if(!$(".vitic-topcart.popup").hasClass("active")){
$(".vitic-topcart.popup").addClass("active");
}
if(!_body.hasClass("not-scroll")&&$(".vitic-topcart").hasClass("popup")){
_body.addClass("not-scroll");
}
$(".cart-popup").addClass("active");
});
$(".cart-remove").on("click", function(){
if($(".vitic-topcart.popup").hasClass("active")){
$(".vitic-topcart.popup").removeClass("active");
}
if(_body.hasClass("not-scroll")){
_body.removeClass("not-scroll");
}});
$(".cart-icon").on("click", function(){
if(!_body.hasClass("not-scroll")){
_body.addClass("not-scroll");
}});
$(".remove-cart-shadow").on("click", function(){
if($(".vitic-topcart.popup").hasClass("active")){
$(".vitic-topcart.popup").removeClass("active");
}
if(_body.hasClass("not-scroll")){
_body.removeClass("not-scroll");
}});
}
function _active_form_login(){
$(".active-login").on("click", function(){
if($('.form-login-register').hasClass('active')){
$('.form-login-register').removeClass('active');
}else{
$('.form-login-register').addClass('active');
}});
}
function _click_quickview_button(){
$('.quickview-button').on("click", function(e){
e.preventDefault();
var product_id=$(this).data('product_id');
$(".quickview-"+product_id).addClass("loading");
$.ajax({
url: vitic_ajax_url,
data: {
"action":"vitic_quickviewproduct",
'product_id':product_id
},
success: function(results){
$('.bwp-quick-view').empty().html(results).addClass("active");
$(".quickview-"+product_id).removeClass("loading");
$("#quickview-slick-carousel .slick-carousel").each(function(){
_load_slick_carousel($(this));
});
if(typeof jQuery.fn.tawcvs_variation_swatches_form!='undefined'){
$('.variations_form').wc_variation_form();
$('.variations_form').tawcvs_variation_swatches_form();
}else{
var form_variation=$(".bwp-quick-view").find('.variations_form');
var form_variation_select=$(".bwp-quick-view").find('.variations_form .variations select');
form_variation.wc_variation_form();
form_variation_select.change();
}
if($(".product-countdown",".bwp-quick-view").length >0)
_countdown_quickview($(".product-countdown",".bwp-quick-view"));
_close_quickview();
},
error: function(errorThrown){ console.log(errorThrown); },
});
});
}
function _close_quickview(){
$('.quickview-close').on("click", function(e){
e.preventDefault();
$('.bwp-quick-view').empty().removeClass("active");
});
}
function _click_button(){
$(".active-menu").on("click", function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
}else{
$(this).addClass('active');
}
if($('.header-main').hasClass('active')){
$('.header-main').removeClass('active');
}else{
$('.header-main').addClass('active');
}});
$(".title-size-guide").on("click", function(){
if($('.size-guide').hasClass('active')){
$('.size-guide').removeClass('active');
}else{
$('.size-guide').addClass('active');
}});
}
function _header_clear(){
$('.header-icon-clear').on("click", function(e){
$('.header-clear').css('display', 'none');;
});
}
function _countdown_quickview($element){
var $this=$element;
var $id=$(this).data("id");
var $current_time=new Date().getTime();
var $sttime=$(this).data('sttime');
var $countdown_time=$this.data('cdtime');
var $day=$this.data('day') ? $this.data('day'):"D";
var $hour=$this.data('hour') ? $this.data('hour'):"H";
var $min=$this.data('min') ? $this.data('min'):"M";
var $sec=$this.data('sec') ? $this.data('sec'):"S";
var $austDay=new Date();
$austDay=new Date($countdown_time * 1000);
if($sttime > $current_time){
$this.remove();
return ;
}
if($countdown_time.length > 0&&$current_time > $countdown_time){
$this.remove();
return ;
}
if($countdown_time.length <=0){
$this.remove();
return ;
}
$this.countdown($austDay, function(event){
$(this).html(event.strftime('<span class="countdown-content"><span class="days"><span class="countdown-amount">%D</span><span class="countdown-text">'+$day+'</span></span><span class="countdown-section hours"><span class="countdown-amount">%H</span><span class="countdown-text">'+$hour+'</span></span><span class="countdown-section mins"><span class="countdown-amount">%M</span><span class="countdown-text">'+$min+'</span></span><span class="countdown-section secs"><span class="countdown-amount">%S</span><span class="countdown-text">'+$sec+'</span></span></span>')
);
}).on('finish.countdown', function(event){
$this.remove();
$id=$this.data('id');
$target=this;
$this.hide('slow', function(){ $(this).remove(); });
$price=$this.data('price');
$('#' + $id + ' .item-price > span').hide('slow', function(){ $('#' + $id + ' .item-price > span').remove(); });
$('#' + $id + ' .item-price').append('<span><span class="amount">' + $price + '</span></span>');
});
}
class Elementor_Js_Davici {
static getInstance(){
if(!Elementor_Js_Davici.instance){
Elementor_Js_Davici.instance=new Elementor_Js_Davici();
}
return Elementor_Js_Davici.instance;
}
constructor(){
$(window).on('elementor/frontend/init', ()=> {
this.init();
});
}
init(){
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_product_categories.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_product_list.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_filter_homepage.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_testimonial.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_brand.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_recent_post.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_countdown_product.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_ourteam.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_slider.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_portfolio.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_lookbook.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_instagram.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_client.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
_load_slick_carousel(slickElement);
});
elementorFrontend.hooks.addAction('frontend/element_ready/bwp_image.default', ($scope)=> {
let slickElement=$scope.find('.slick-carousel');
slickElement.each(function(){
_load_slick_carousel($(this));
});
});
}}
Elementor_Js_Davici.getInstance();
})(jQuery);