=48&&b.which<=57||b.which>=96&&b.which<=105||b.which>=65&&b.which<=90)&&k.$button.trigger("click.bs.dropdown.data-api"),b.which===r.ESCAPE&&e&&(b.preventDefault(),k.$button.trigger("click.bs.dropdown.data-api").focus()),o){if(!l.length)return;d=!0===s?l.index(l.filter(".active")):k.selectpicker.current.map.newIndex[k.activeIndex],void 0===d&&(d=-1),-1!==d&&(f=k.selectpicker.current.elements[d+w],f.classList.remove("active"),f.firstChild&&f.firstChild.classList.remove("active")),b.which===r.ARROW_UP?(-1!==d&&d--,d+w<0&&(d+=l.length),k.selectpicker.view.canHighlight[d+w]||-1===(d=k.selectpicker.view.canHighlight.slice(0,d+w).lastIndexOf(!0)-w)&&(d=l.length-1)):(b.which===r.ARROW_DOWN||n)&&(d++,d+w>=k.selectpicker.view.canHighlight.length&&(d=0),k.selectpicker.view.canHighlight[d+w]||(d=d+1+k.selectpicker.view.canHighlight.slice(d+w+1).indexOf(!0))),b.preventDefault();var x=w+d;b.which===r.ARROW_UP?0===w&&d===l.length-1?(k.$menuInner[0].scrollTop=k.$menuInner[0].scrollHeight,x=k.selectpicker.current.elements.length-1):(g=k.selectpicker.current.data[x],h=g.position-g.height,m=hp)),f=k.selectpicker.current.elements[x],f.classList.add("active"),f.firstChild&&f.firstChild.classList.add("active"),k.activeIndex=k.selectpicker.current.map.originalIndex[x],k.selectpicker.view.currentActive=f,m&&(k.$menuInner[0].scrollTop=h),k.options.liveSearch?k.$searchbox.focus():i.focus()}else if(!i.is("input")&&!v.test(b.which)||b.which===r.SPACE&&k.selectpicker.keydown.keyHistory){var y,z,A=[];b.preventDefault(),k.selectpicker.keydown.keyHistory+=q[b.which],k.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(k.selectpicker.keydown.resetKeyHistory.cancel),k.selectpicker.keydown.resetKeyHistory.cancel=k.selectpicker.keydown.resetKeyHistory.start(),z=k.selectpicker.keydown.keyHistory,/^(.)\1+$/.test(z)&&(z=z.charAt(0));for(var B=0;B0?(h=g.position-g.height,m=!0):(h=g.position-k.sizeInfo.menuInnerHeight,m=g.position>p+k.sizeInfo.menuInnerHeight),f=k.selectpicker.current.elements[y],f.classList.add("active"),f.firstChild&&f.firstChild.classList.add("active"),k.activeIndex=A[E],f.firstChild.focus(),m&&(k.$menuInner[0].scrollTop=h),i.focus()}}e&&(b.which===r.SPACE&&!k.selectpicker.keydown.keyHistory||b.which===r.ENTER||b.which===r.TAB&&k.options.selectOnTab)&&(b.which!==r.SPACE&&b.preventDefault(),k.options.liveSearch&&b.which===r.SPACE||(k.$menuInner.find(".active a").trigger("click",!0),i.focus(),k.options.liveSearch||(b.preventDefault(),a(document).data("spaceSelect",!0))))},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){var b=a.extend({},this.options,this.$element.data());this.options=b,this.selectpicker.main.map.newIndex={},this.selectpicker.main.map.originalIndex={},this.createLi(),this.checkDisabled(),this.render(),this.setStyle(),this.setWidth(),this.setSize(!0),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var x=a.fn.selectpicker;a.fn.selectpicker=f,a.fn.selectpicker.Constructor=w,a.fn.selectpicker.noConflict=function(){return a.fn.selectpicker=x,this},a(document).off("keydown.bs.dropdown.data-api").on("keydown.bs.select",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bs-searchbox input',w.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bs-searchbox input',function(a){a.stopPropagation()}),a(window).on("load.bs.select.data-api",function(){a(".selectpicker").each(function(){var b=a(this);f.call(b,b.data())})})}(a)});
+//# sourceMappingURL=bootstrap-select.js.map
\ No newline at end of file
diff --git a/js/bootstrap-submenu.js b/js/bootstrap-submenu.js
new file mode 100644
index 0000000..e344f26
--- /dev/null
+++ b/js/bootstrap-submenu.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-submenu v2.0.4 (https://vsn4ik.github.io/bootstrap-submenu/)
+ * Copyright 2014-2017 Vasily A. (https://github.com/vsn4ik)
+ * Licensed under the MIT license
+ */
+
+"use strict";!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){function b(b){this.$element=a(b),this.$menu=this.$element.closest(".dropdown-menu"),this.$main=this.$menu.parent(),this.$items=this.$menu.children(".dropdown-submenu"),this.init()}function c(b){this.$element=a(b),this.$main=this.$element.parent(),this.$menu=this.$main.children(".dropdown-menu"),this.$subs=this.$main.siblings(".dropdown-submenu"),this.$items=this.$menu.children(".dropdown-submenu"),this.init()}function d(b){this.$element=a(b),this.$main=this.$element.parent(),this.$menu=this.$main.children(".dropdown-menu"),this.$items=this.$menu.children(".dropdown-submenu"),this.init()}b.prototype={init:function(){this.$element.on("keydown",a.proxy(this,"keydown"))},close:function(){this.$main.removeClass("open"),this.$items.trigger("hide.bs.submenu")},keydown:function(a){27==a.keyCode&&(a.stopPropagation(),this.close(),this.$main.children("a, button").trigger("focus"))}},a.extend(c.prototype,b.prototype,{init:function(){this.$element.on({click:a.proxy(this,"click"),keydown:a.proxy(this,"keydown")}),this.$main.on("hide.bs.submenu",a.proxy(this,"hide"))},click:function(a){a.preventDefault(),a.stopPropagation(),this.toggle()},hide:function(a){a.stopPropagation(),this.close()},open:function(){this.$main.addClass("open"),this.$subs.trigger("hide.bs.submenu")},toggle:function(){this.$main.hasClass("open")?this.close():this.open()},keydown:function(b){32==b.keyCode&&b.preventDefault(),a.inArray(b.keyCode,[13,32])!=-1&&this.toggle()}}),d.prototype={init:function(){this.$menu.off("keydown.bs.dropdown.data-api"),this.$menu.on("keydown",a.proxy(this,"itemKeydown")),this.$menu.find("li > a").each(function(){new b(this)}),this.$menu.find(".dropdown-submenu > a").each(function(){new c(this)}),this.$main.on("hidden.bs.dropdown",a.proxy(this,"hidden"))},hidden:function(){this.$items.trigger("hide.bs.submenu")},itemKeydown:function(b){if(a.inArray(b.keyCode,[38,40])!=-1){b.preventDefault(),b.stopPropagation();var c=this.$menu.find("li:not(.disabled):visible > a"),d=c.index(b.target);if(38==b.keyCode&&0!==d)d--;else{if(40!=b.keyCode||d===c.length-1)return;d++}c.eq(d).trigger("focus")}}};var e=a.fn.submenupicker;return a.fn.submenupicker=function(b){var c=this instanceof a?this:a(b);return c.each(function(){var b=a.data(this,"bs.submenu");b||(b=new d(this),a.data(this,"bs.submenu",b))})},a.fn.submenupicker.Constructor=d,a.fn.submenupicker.noConflict=function(){return a.fn.submenupicker=e,this},a.fn.submenupicker});
\ No newline at end of file
diff --git a/js/bootstrap.min.js b/js/bootstrap.min.js
new file mode 100644
index 0000000..534d533
--- /dev/null
+++ b/js/bootstrap.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v4.0.0 (https://getbootstrap.com)
+ * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,n){"use strict";function i(t,e){for(var n=0;n0?i:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(n){t(n).trigger(e.end)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){var r=n[s],o=e[s],a=o&&i.isElement(o)?"element":(l=o,{}.toString.call(l).match(/\s([a-zA-Z]+)/)[1].toLowerCase());if(!new RegExp(r).test(a))throw new Error(t.toUpperCase()+': Option "'+s+'" provided type "'+a+'" but expected type "'+r+'".')}var l}};return e=("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"},t.fn.emulateTransitionEnd=n,i.supportsTransitionEnd()&&(t.event.special[i.TRANSITION_END]={bindType:e.end,delegateType:e.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}),i}(e),L=(a="alert",h="."+(l="bs.alert"),c=(o=e).fn[a],u={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+".data-api"},f="alert",d="fade",_="show",g=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.removeData(this._element,l),this._element=null},e._getRootElement=function(t){var e=P.getSelectorFromElement(t),n=!1;return e&&(n=o(e)[0]),n||(n=o(t).closest("."+f)[0]),n},e._triggerCloseEvent=function(t){var e=o.Event(u.CLOSE);return o(t).trigger(e),e},e._removeElement=function(t){var e=this;o(t).removeClass(_),P.supportsTransitionEnd()&&o(t).hasClass(d)?o(t).one(P.TRANSITION_END,function(n){return e._destroyElement(t,n)}).emulateTransitionEnd(150):this._destroyElement(t)},e._destroyElement=function(t){o(t).detach().trigger(u.CLOSED).remove()},t._jQueryInterface=function(e){return this.each(function(){var n=o(this),i=n.data(l);i||(i=new t(this),n.data(l,i)),"close"===e&&i[e](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},s(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),o(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',g._handleDismiss(new g)),o.fn[a]=g._jQueryInterface,o.fn[a].Constructor=g,o.fn[a].noConflict=function(){return o.fn[a]=c,g._jQueryInterface},g),R=(m="button",E="."+(v="bs.button"),T=".data-api",y=(p=e).fn[m],C="active",I="btn",A="focus",b='[data-toggle^="button"]',D='[data-toggle="buttons"]',S="input",w=".active",N=".btn",O={CLICK_DATA_API:"click"+E+T,FOCUS_BLUR_DATA_API:"focus"+E+T+" blur"+E+T},k=function(){function t(t){this._element=t}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=p(this._element).closest(D)[0];if(n){var i=p(this._element).find(S)[0];if(i){if("radio"===i.type)if(i.checked&&p(this._element).hasClass(C))t=!1;else{var s=p(n).find(w)[0];s&&p(s).removeClass(C)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!p(this._element).hasClass(C),p(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!p(this._element).hasClass(C)),t&&p(this._element).toggleClass(C)},e.dispose=function(){p.removeData(this._element,v),this._element=null},t._jQueryInterface=function(e){return this.each(function(){var n=p(this).data(v);n||(n=new t(this),p(this).data(v,n)),"toggle"===e&&n[e]()})},s(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),p(document).on(O.CLICK_DATA_API,b,function(t){t.preventDefault();var e=t.target;p(e).hasClass(I)||(e=p(e).closest(N)),k._jQueryInterface.call(p(e),"toggle")}).on(O.FOCUS_BLUR_DATA_API,b,function(t){var e=p(t.target).closest(N)[0];p(e).toggleClass(A,/^focus(in)?$/.test(t.type))}),p.fn[m]=k._jQueryInterface,p.fn[m].Constructor=k,p.fn[m].noConflict=function(){return p.fn[m]=y,k._jQueryInterface},k),j=function(t){var e="carousel",n="bs.carousel",i="."+n,o=t.fn[e],a={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},l={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},h="next",c="prev",u="left",f="right",d={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,TOUCHEND:"touchend"+i,LOAD_DATA_API:"load"+i+".data-api",CLICK_DATA_API:"click"+i+".data-api"},_="carousel",g="active",p="slide",m="carousel-item-right",v="carousel-item-left",E="carousel-item-next",T="carousel-item-prev",y={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},C=function(){function o(e,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(y.INDICATORS)[0],this._addEventListeners()}var C=o.prototype;return C.next=function(){this._isSliding||this._slide(h)},C.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},C.prev=function(){this._isSliding||this._slide(c)},C.pause=function(e){e||(this._isPaused=!0),t(this._element).find(y.NEXT_PREV)[0]&&P.supportsTransitionEnd()&&(P.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},C.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},C.to=function(e){var n=this;this._activeElement=t(this._element).find(y.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(d.SLID,function(){return n.to(e)});else{if(i===e)return this.pause(),void this.cycle();var s=e>i?h:c;this._slide(s,this._items[e])}},C.dispose=function(){t(this._element).off(i),t.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},C._getConfig=function(t){return t=r({},a,t),P.typeCheckConfig(e,t,l),t},C._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(d.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(d.MOUSEENTER,function(t){return e.pause(t)}).on(d.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(d.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},C._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},C._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(y.ITEM)),this._items.indexOf(e)},C._getItemByDirection=function(t,e){var n=t===h,i=t===c,s=this._getItemIndex(e),r=this._items.length-1;if((i&&0===s||n&&s===r)&&!this._config.wrap)return e;var o=(s+(t===c?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},C._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),s=this._getItemIndex(t(this._element).find(y.ACTIVE_ITEM)[0]),r=t.Event(d.SLIDE,{relatedTarget:e,direction:n,from:s,to:i});return t(this._element).trigger(r),r},C._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(y.ACTIVE).removeClass(g);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(g)}},C._slide=function(e,n){var i,s,r,o=this,a=t(this._element).find(y.ACTIVE_ITEM)[0],l=this._getItemIndex(a),c=n||a&&this._getItemByDirection(e,a),_=this._getItemIndex(c),C=Boolean(this._interval);if(e===h?(i=v,s=E,r=u):(i=m,s=T,r=f),c&&t(c).hasClass(g))this._isSliding=!1;else if(!this._triggerSlideEvent(c,r).isDefaultPrevented()&&a&&c){this._isSliding=!0,C&&this.pause(),this._setActiveIndicatorElement(c);var I=t.Event(d.SLID,{relatedTarget:c,direction:r,from:l,to:_});P.supportsTransitionEnd()&&t(this._element).hasClass(p)?(t(c).addClass(s),P.reflow(c),t(a).addClass(i),t(c).addClass(i),t(a).one(P.TRANSITION_END,function(){t(c).removeClass(i+" "+s).addClass(g),t(a).removeClass(g+" "+s+" "+i),o._isSliding=!1,setTimeout(function(){return t(o._element).trigger(I)},0)}).emulateTransitionEnd(600)):(t(a).removeClass(g),t(c).addClass(g),this._isSliding=!1,t(this._element).trigger(I)),C&&this.cycle()}},o._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s=r({},a,t(this).data());"object"==typeof e&&(s=r({},s,e));var l="string"==typeof e?e:s.slide;if(i||(i=new o(this,s),t(this).data(n,i)),"number"==typeof e)i.to(e);else if("string"==typeof l){if("undefined"==typeof i[l])throw new TypeError('No method named "'+l+'"');i[l]()}else s.interval&&(i.pause(),i.cycle())})},o._dataApiClickHandler=function(e){var i=P.getSelectorFromElement(this);if(i){var s=t(i)[0];if(s&&t(s).hasClass(_)){var a=r({},t(s).data(),t(this).data()),l=this.getAttribute("data-slide-to");l&&(a.interval=!1),o._jQueryInterface.call(t(s),a),l&&t(s).data(n).to(l),e.preventDefault()}}},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(document).on(d.CLICK_DATA_API,y.DATA_SLIDE,C._dataApiClickHandler),t(window).on(d.LOAD_DATA_API,function(){t(y.DATA_RIDE).each(function(){var e=t(this);C._jQueryInterface.call(e,e.data())})}),t.fn[e]=C._jQueryInterface,t.fn[e].Constructor=C,t.fn[e].noConflict=function(){return t.fn[e]=o,C._jQueryInterface},C}(e),H=function(t){var e="collapse",n="bs.collapse",i="."+n,o=t.fn[e],a={toggle:!0,parent:""},l={toggle:"boolean",parent:"(string|element)"},h={SHOW:"show"+i,SHOWN:"shown"+i,HIDE:"hide"+i,HIDDEN:"hidden"+i,CLICK_DATA_API:"click"+i+".data-api"},c="show",u="collapse",f="collapsing",d="collapsed",_="width",g="height",p={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function i(e,n){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(n),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var i=t(p.DATA_TOGGLE),s=0;s0&&(this._selector=o,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var o=i.prototype;return o.toggle=function(){t(this._element).hasClass(c)?this.hide():this.show()},o.show=function(){var e,s,r=this;if(!this._isTransitioning&&!t(this._element).hasClass(c)&&(this._parent&&0===(e=t.makeArray(t(this._parent).find(p.ACTIVES).filter('[data-parent="'+this._config.parent+'"]'))).length&&(e=null),!(e&&(s=t(e).not(this._selector).data(n))&&s._isTransitioning))){var o=t.Event(h.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){e&&(i._jQueryInterface.call(t(e).not(this._selector),"hide"),s||t(e).data(n,null));var a=this._getDimension();t(this._element).removeClass(u).addClass(f),this._element.style[a]=0,this._triggerArray.length>0&&t(this._triggerArray).removeClass(d).attr("aria-expanded",!0),this.setTransitioning(!0);var l=function(){t(r._element).removeClass(f).addClass(u).addClass(c),r._element.style[a]="",r.setTransitioning(!1),t(r._element).trigger(h.SHOWN)};if(P.supportsTransitionEnd()){var _="scroll"+(a[0].toUpperCase()+a.slice(1));t(this._element).one(P.TRANSITION_END,l).emulateTransitionEnd(600),this._element.style[a]=this._element[_]+"px"}else l()}}},o.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(c)){var n=t.Event(h.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",P.reflow(this._element),t(this._element).addClass(f).removeClass(u).removeClass(c),this._triggerArray.length>0)for(var s=0;s0&&t(n).toggleClass(d,!i).attr("aria-expanded",i)}},i._getTargetFromElement=function(e){var n=P.getSelectorFromElement(e);return n?t(n)[0]:null},i._jQueryInterface=function(e){return this.each(function(){var s=t(this),o=s.data(n),l=r({},a,s.data(),"object"==typeof e&&e);if(!o&&l.toggle&&/show|hide/.test(e)&&(l.toggle=!1),o||(o=new i(this,l),s.data(n,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),i}();return t(document).on(h.CLICK_DATA_API,p.DATA_TOGGLE,function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var i=t(this),s=P.getSelectorFromElement(this);t(s).each(function(){var e=t(this),s=e.data(n)?"toggle":i.data();m._jQueryInterface.call(e,s)})}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=o,m._jQueryInterface},m}(e),W=function(t){var e="dropdown",i="bs.dropdown",o="."+i,a=".data-api",l=t.fn[e],h=new RegExp("38|40|27"),c={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,CLICK:"click"+o,CLICK_DATA_API:"click"+o+a,KEYDOWN_DATA_API:"keydown"+o+a,KEYUP_DATA_API:"keyup"+o+a},u="disabled",f="show",d="dropup",_="dropright",g="dropleft",p="dropdown-menu-right",m="dropdown-menu-left",v="position-static",E='[data-toggle="dropdown"]',T=".dropdown form",y=".dropdown-menu",C=".navbar-nav",I=".dropdown-menu .dropdown-item:not(.disabled)",A="top-start",b="top-end",D="bottom-start",S="bottom-end",w="right-start",N="left-start",O={offset:0,flip:!0,boundary:"scrollParent"},k={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},L=function(){function a(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var l=a.prototype;return l.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(u)){var e=a._getParentFromElement(this._element),i=t(this._menu).hasClass(f);if(a._clearMenus(),!i){var s={relatedTarget:this._element},r=t.Event(c.SHOW,s);if(t(e).trigger(r),!r.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof n)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var o=this._element;t(e).hasClass(d)&&(t(this._menu).hasClass(m)||t(this._menu).hasClass(p))&&(o=e),"scrollParent"!==this._config.boundary&&t(e).addClass(v),this._popper=new n(o,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(e).closest(C).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(f),t(e).toggleClass(f).trigger(t.Event(c.SHOWN,s))}}}},l.dispose=function(){t.removeData(this._element,i),t(this._element).off(o),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},l.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},l._addEventListeners=function(){var e=this;t(this._element).on(c.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},l._getConfig=function(n){return n=r({},this.constructor.Default,t(this._element).data(),n),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},l._getMenuElement=function(){if(!this._menu){var e=a._getParentFromElement(this._element);this._menu=t(e).find(y)[0]}return this._menu},l._getPlacement=function(){var e=t(this._element).parent(),n=D;return e.hasClass(d)?(n=A,t(this._menu).hasClass(p)&&(n=b)):e.hasClass(_)?n=w:e.hasClass(g)?n=N:t(this._menu).hasClass(p)&&(n=S),n},l._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},l._getPopperConfig=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i);if(n||(n=new a(this,"object"==typeof e?e:null),t(this).data(i,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},a._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=t.makeArray(t(E)),s=0;s0&&r--,40===e.which&&rdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},p._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},p._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},f="show",d="out",_={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},g="fade",p="show",m=".tooltip-inner",v=".arrow",E="hover",T="focus",y="click",C="manual",I=function(){function a(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var I=a.prototype;return I.enable=function(){this._isEnabled=!0},I.disable=function(){this._isEnabled=!1},I.toggleEnabled=function(){this._isEnabled=!this._isEnabled},I.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(p))return void this._leave(null,this);this._enter(null,this)}},I.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},I.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(i);var s=t.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),o=P.getUID(this.constructor.NAME);r.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&t(r).addClass(g);var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var c=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,{placement:h,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:v},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(p),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var u=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d&&e._leave(null,e)};P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(this.tip).one(P.TRANSITION_END,u).emulateTransitionEnd(a._TRANSITION_DURATION):u()}},I.hide=function(e){var n=this,i=this.getTipElement(),s=t.Event(this.constructor.Event.HIDE),r=function(){n._hoverState!==f&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(s),s.isDefaultPrevented()||(t(i).removeClass(p),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[y]=!1,this._activeTrigger[T]=!1,this._activeTrigger[E]=!1,P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(i).one(P.TRANSITION_END,r).emulateTransitionEnd(150):r(),this._hoverState="")},I.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},I.isWithContent=function(){return Boolean(this.getTitle())},I.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},I.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},I.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m),this.getTitle()),e.removeClass(g+" "+p)},I.setElementContent=function(e,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[i?"html":"text"](n)},I.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},I._getAttachment=function(t){return c[t.toUpperCase()]},I._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==C){var i=n===E?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,s=n===E?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(s,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},I._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},I._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?T:E]=!0),t(n.getTipElement()).hasClass(p)||n._hoverState===f?n._hoverState=f:(clearTimeout(n._timeout),n._hoverState=f,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===f&&n.show()},n.config.delay.show):n.show())},I._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?T:E]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=d,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===d&&n.hide()},n.config.delay.hide):n.hide())},I._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},I._getConfig=function(n){return"number"==typeof(n=r({},this.constructor.Default,t(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},I._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},I._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(l);null!==n&&n.length>0&&e.removeClass(n.join(""))},I._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},I._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(g),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i),s="object"==typeof e&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new a(this,s),t(this).data(i,n)),"string"==typeof e)){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return h}}]),a}();return t.fn[e]=I._jQueryInterface,t.fn[e].Constructor=I,t.fn[e].noConflict=function(){return t.fn[e]=a,I._jQueryInterface},I}(e),x=function(t){var e="popover",n="bs.popover",i="."+n,o=t.fn[e],a=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},U.Default,{placement:"right",trigger:"click",content:"",template:''}),h=r({},U.DefaultType,{content:"(string|element|function)"}),c="fade",u="show",f=".popover-header",d=".popover-body",_={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},g=function(r){var o,g;function p(){return r.apply(this,arguments)||this}g=r,(o=p).prototype=Object.create(g.prototype),o.prototype.constructor=o,o.__proto__=g;var m=p.prototype;return m.isWithContent=function(){return this.getTitle()||this._getContent()},m.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},m.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},m.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(f),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(d),n),e.removeClass(c+" "+u)},m._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},m._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},p._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s="object"==typeof e?e:null;if((i||!/destroy|hide/.test(e))&&(i||(i=new p(this,s),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},s(p,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return h}}]),p}(U);return t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=o,g._jQueryInterface},g}(e),K=function(t){var e="scrollspy",n="bs.scrollspy",i="."+n,o=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},h={ACTIVATE:"activate"+i,SCROLL:"scroll"+i,LOAD_DATA_API:"load"+i+".data-api"},c="dropdown-item",u="active",f={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d="offset",_="position",g=function(){function o(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+f.NAV_LINKS+","+this._config.target+" "+f.LIST_ITEMS+","+this._config.target+" "+f.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(h.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var g=o.prototype;return g.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?d:_,i="auto"===this._config.method?n:this._config.method,s=i===_?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n,r=P.getSelectorFromElement(e);if(r&&(n=t(r)[0]),n){var o=n.getBoundingClientRect();if(o.width||o.height)return[t(n)[i]().top+s,r]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},g.dispose=function(){t.removeData(this._element,n),t(this._scrollElement).off(i),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},g._getConfig=function(n){if("string"!=typeof(n=r({},a,n)).target){var i=t(n.target).attr("id");i||(i=P.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return P.typeCheckConfig(e,n,l),n},g._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},g._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},g._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},g._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;){this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&("undefined"==typeof this._offsets[s+1]||t li > .active",g='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',p=".dropdown-toggle",m="> .dropdown-menu .active",v=function(){function n(t){this._element=t}var i=n.prototype;return i.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(a)||t(this._element).hasClass(l))){var n,i,s=t(this._element).closest(f)[0],o=P.getSelectorFromElement(this._element);if(s){var h="UL"===s.nodeName?_:d;i=(i=t.makeArray(t(s).find(h)))[i.length-1]}var c=t.Event(r.HIDE,{relatedTarget:this._element}),u=t.Event(r.SHOW,{relatedTarget:i});if(i&&t(i).trigger(c),t(this._element).trigger(u),!u.isDefaultPrevented()&&!c.isDefaultPrevented()){o&&(n=t(o)[0]),this._activate(this._element,s);var g=function(){var n=t.Event(r.HIDDEN,{relatedTarget:e._element}),s=t.Event(r.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(s)};n?this._activate(n,n.parentNode,g):g()}}},i.dispose=function(){t.removeData(this._element,e),this._element=null},i._activate=function(e,n,i){var s=this,r=("UL"===n.nodeName?t(n).find(_):t(n).children(d))[0],o=i&&P.supportsTransitionEnd()&&r&&t(r).hasClass(h),a=function(){return s._transitionComplete(e,r,i)};r&&o?t(r).one(P.TRANSITION_END,a).emulateTransitionEnd(150):a()},i._transitionComplete=function(e,n,i){if(n){t(n).removeClass(c+" "+a);var s=t(n.parentNode).find(m)[0];s&&t(s).removeClass(a),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(t(e).addClass(a),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),P.reflow(e),t(e).addClass(c),e.parentNode&&t(e.parentNode).hasClass(o)){var r=t(e).closest(u)[0];r&&t(r).find(p).addClass(a),e.setAttribute("aria-expanded",!0)}i&&i()},n._jQueryInterface=function(i){return this.each(function(){var s=t(this),r=s.data(e);if(r||(r=new n(this),s.data(e,r)),"string"==typeof i){if("undefined"==typeof r[i])throw new TypeError('No method named "'+i+'"');r[i]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),n}();return t(document).on(r.CLICK_DATA_API,g,function(e){e.preventDefault(),v._jQueryInterface.call(t(this),"show")}),t.fn.tab=v._jQueryInterface,t.fn.tab.Constructor=v,t.fn.tab.noConflict=function(){return t.fn.tab=i,v._jQueryInterface},v}(e);!function(t){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=P,t.Alert=L,t.Button=R,t.Carousel=j,t.Collapse=H,t.Dropdown=W,t.Modal=M,t.Popover=x,t.Scrollspy=K,t.Tab=V,t.Tooltip=U,Object.defineProperty(t,"__esModule",{value:!0})});
+//# sourceMappingURL=bootstrap.min.js.map
\ No newline at end of file
diff --git a/js/dropzone.js b/js/dropzone.js
new file mode 100644
index 0000000..aa6e746
--- /dev/null
+++ b/js/dropzone.js
@@ -0,0 +1,1767 @@
+
+/*
+ *
+ * More info at [www.dropzonejs.com](http://www.dropzonejs.com)
+ *
+ * Copyright (c) 2012, Matias Meno
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+
+(function() {
+ var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without,
+ __slice = [].slice,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+ noop = function() {};
+
+ Emitter = (function() {
+ function Emitter() {}
+
+ Emitter.prototype.addEventListener = Emitter.prototype.on;
+
+ Emitter.prototype.on = function(event, fn) {
+ this._callbacks = this._callbacks || {};
+ if (!this._callbacks[event]) {
+ this._callbacks[event] = [];
+ }
+ this._callbacks[event].push(fn);
+ return this;
+ };
+
+ Emitter.prototype.emit = function() {
+ var args, callback, callbacks, event, _i, _len;
+ event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ this._callbacks = this._callbacks || {};
+ callbacks = this._callbacks[event];
+ if (callbacks) {
+ for (_i = 0, _len = callbacks.length; _i < _len; _i++) {
+ callback = callbacks[_i];
+ callback.apply(this, args);
+ }
+ }
+ return this;
+ };
+
+ Emitter.prototype.removeListener = Emitter.prototype.off;
+
+ Emitter.prototype.removeAllListeners = Emitter.prototype.off;
+
+ Emitter.prototype.removeEventListener = Emitter.prototype.off;
+
+ Emitter.prototype.off = function(event, fn) {
+ var callback, callbacks, i, _i, _len;
+ if (!this._callbacks || arguments.length === 0) {
+ this._callbacks = {};
+ return this;
+ }
+ callbacks = this._callbacks[event];
+ if (!callbacks) {
+ return this;
+ }
+ if (arguments.length === 1) {
+ delete this._callbacks[event];
+ return this;
+ }
+ for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) {
+ callback = callbacks[i];
+ if (callback === fn) {
+ callbacks.splice(i, 1);
+ break;
+ }
+ }
+ return this;
+ };
+
+ return Emitter;
+
+ })();
+
+ Dropzone = (function(_super) {
+ var extend, resolveOption;
+
+ __extends(Dropzone, _super);
+
+ Dropzone.prototype.Emitter = Emitter;
+
+
+ /*
+ This is a list of all available events you can register on a dropzone object.
+
+ You can register an event handler like this:
+
+ dropzone.on("dragEnter", function() { });
+ */
+
+ Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"];
+
+ Dropzone.prototype.defaultOptions = {
+ url: null,
+ method: "post",
+ withCredentials: false,
+ parallelUploads: 2,
+ uploadMultiple: false,
+ maxFilesize: 256,
+ paramName: "file",
+ createImageThumbnails: true,
+ maxThumbnailFilesize: 10,
+ thumbnailWidth: 120,
+ thumbnailHeight: 120,
+ filesizeBase: 1000,
+ maxFiles: null,
+ params: {},
+ clickable: true,
+ ignoreHiddenFiles: true,
+ acceptedFiles: null,
+ acceptedMimeTypes: null,
+ autoProcessQueue: true,
+ autoQueue: true,
+ addRemoveLinks: false,
+ previewsContainer: null,
+ hiddenInputContainer: "body",
+ capture: null,
+ renameFilename: null,
+ dictDefaultMessage: "Drop files here to upload",
+ dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.",
+ dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.",
+ dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",
+ dictInvalidFileType: "You can't upload files of this type.",
+ dictResponseError: "Server responded with {{statusCode}} code.",
+ dictCancelUpload: "Cancel upload",
+ dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?",
+ dictRemoveFile: "Remove file",
+ dictRemoveFileConfirmation: null,
+ dictMaxFilesExceeded: "You can not upload any more files.",
+ accept: function(file, done) {
+ return done();
+ },
+ init: function() {
+ return noop;
+ },
+ forceFallback: false,
+ fallback: function() {
+ var child, messageElement, span, _i, _len, _ref;
+ this.element.className = "" + this.element.className + " dz-browser-not-supported";
+ _ref = this.element.getElementsByTagName("div");
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ child = _ref[_i];
+ if (/(^| )dz-message($| )/.test(child.className)) {
+ messageElement = child;
+ child.className = "dz-message";
+ continue;
+ }
+ }
+ if (!messageElement) {
+ messageElement = Dropzone.createElement("
");
+ this.element.appendChild(messageElement);
+ }
+ span = messageElement.getElementsByTagName("span")[0];
+ if (span) {
+ if (span.textContent != null) {
+ span.textContent = this.options.dictFallbackMessage;
+ } else if (span.innerText != null) {
+ span.innerText = this.options.dictFallbackMessage;
+ }
+ }
+ return this.element.appendChild(this.getFallbackForm());
+ },
+ resize: function(file) {
+ var info, srcRatio, trgRatio;
+ info = {
+ srcX: 0,
+ srcY: 0,
+ srcWidth: file.width,
+ srcHeight: file.height
+ };
+ srcRatio = file.width / file.height;
+ info.optWidth = this.options.thumbnailWidth;
+ info.optHeight = this.options.thumbnailHeight;
+ if ((info.optWidth == null) && (info.optHeight == null)) {
+ info.optWidth = info.srcWidth;
+ info.optHeight = info.srcHeight;
+ } else if (info.optWidth == null) {
+ info.optWidth = srcRatio * info.optHeight;
+ } else if (info.optHeight == null) {
+ info.optHeight = (1 / srcRatio) * info.optWidth;
+ }
+ trgRatio = info.optWidth / info.optHeight;
+ if (file.height < info.optHeight || file.width < info.optWidth) {
+ info.trgHeight = info.srcHeight;
+ info.trgWidth = info.srcWidth;
+ } else {
+ if (srcRatio > trgRatio) {
+ info.srcHeight = file.height;
+ info.srcWidth = info.srcHeight * trgRatio;
+ } else {
+ info.srcWidth = file.width;
+ info.srcHeight = info.srcWidth / trgRatio;
+ }
+ }
+ info.srcX = (file.width - info.srcWidth) / 2;
+ info.srcY = (file.height - info.srcHeight) / 2;
+ return info;
+ },
+
+ /*
+ Those functions register themselves to the events on init and handle all
+ the user interface specific stuff. Overwriting them won't break the upload
+ but can break the way it's displayed.
+ You can overwrite them if you don't like the default behavior. If you just
+ want to add an additional event handler, register it on the dropzone object
+ and don't overwrite those options.
+ */
+ drop: function(e) {
+ return this.element.classList.remove("dz-drag-hover");
+ },
+ dragstart: noop,
+ dragend: function(e) {
+ return this.element.classList.remove("dz-drag-hover");
+ },
+ dragenter: function(e) {
+ return this.element.classList.add("dz-drag-hover");
+ },
+ dragover: function(e) {
+ return this.element.classList.add("dz-drag-hover");
+ },
+ dragleave: function(e) {
+ return this.element.classList.remove("dz-drag-hover");
+ },
+ paste: noop,
+ reset: function() {
+ return this.element.classList.remove("dz-started");
+ },
+ addedfile: function(file) {
+ var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
+ if (this.element === this.previewsContainer) {
+ this.element.classList.add("dz-started");
+ }
+ if (this.previewsContainer) {
+ file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());
+ file.previewTemplate = file.previewElement;
+ this.previewsContainer.appendChild(file.previewElement);
+ _ref = file.previewElement.querySelectorAll("[data-dz-name]");
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ node = _ref[_i];
+ node.textContent = this._renameFilename(file.name);
+ }
+ _ref1 = file.previewElement.querySelectorAll("[data-dz-size]");
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ node = _ref1[_j];
+ node.innerHTML = this.filesize(file.size);
+ }
+ if (this.options.addRemoveLinks) {
+ file._removeLink = Dropzone.createElement("" + this.options.dictRemoveFile + " ");
+ file.previewElement.appendChild(file._removeLink);
+ }
+ removeFileEvent = (function(_this) {
+ return function(e) {
+ e.preventDefault();
+ e.stopPropagation();
+ if (file.status === Dropzone.UPLOADING) {
+ return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() {
+ return _this.removeFile(file);
+ });
+ } else {
+ if (_this.options.dictRemoveFileConfirmation) {
+ return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() {
+ return _this.removeFile(file);
+ });
+ } else {
+ return _this.removeFile(file);
+ }
+ }
+ };
+ })(this);
+ _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]");
+ _results = [];
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
+ removeLink = _ref2[_k];
+ _results.push(removeLink.addEventListener("click", removeFileEvent));
+ }
+ return _results;
+ }
+ },
+ removedfile: function(file) {
+ var _ref;
+ if (file.previewElement) {
+ if ((_ref = file.previewElement) != null) {
+ _ref.parentNode.removeChild(file.previewElement);
+ }
+ }
+ return this._updateMaxFilesReachedClass();
+ },
+ thumbnail: function(file, dataUrl) {
+ var thumbnailElement, _i, _len, _ref;
+ if (file.previewElement) {
+ file.previewElement.classList.remove("dz-file-preview");
+ _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]");
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ thumbnailElement = _ref[_i];
+ thumbnailElement.alt = file.name;
+ thumbnailElement.src = dataUrl;
+ }
+ return setTimeout(((function(_this) {
+ return function() {
+ return file.previewElement.classList.add("dz-image-preview");
+ };
+ })(this)), 1);
+ }
+ },
+ error: function(file, message) {
+ var node, _i, _len, _ref, _results;
+ if (file.previewElement) {
+ file.previewElement.classList.add("dz-error");
+ if (typeof message !== "String" && message.error) {
+ message = message.error;
+ }
+ _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ node = _ref[_i];
+ _results.push(node.textContent = message);
+ }
+ return _results;
+ }
+ },
+ errormultiple: noop,
+ processing: function(file) {
+ if (file.previewElement) {
+ file.previewElement.classList.add("dz-processing");
+ if (file._removeLink) {
+ return file._removeLink.textContent = this.options.dictCancelUpload;
+ }
+ }
+ },
+ processingmultiple: noop,
+ uploadprogress: function(file, progress, bytesSent) {
+ var node, _i, _len, _ref, _results;
+ if (file.previewElement) {
+ _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ node = _ref[_i];
+ if (node.nodeName === 'PROGRESS') {
+ _results.push(node.value = progress);
+ } else {
+ _results.push(node.style.width = "" + progress + "%");
+ }
+ }
+ return _results;
+ }
+ },
+ totaluploadprogress: noop,
+ sending: noop,
+ sendingmultiple: noop,
+ success: function(file) {
+ if (file.previewElement) {
+ return file.previewElement.classList.add("dz-success");
+ }
+ },
+ successmultiple: noop,
+ canceled: function(file) {
+ return this.emit("error", file, "Upload canceled.");
+ },
+ canceledmultiple: noop,
+ complete: function(file) {
+ if (file._removeLink) {
+ file._removeLink.textContent = this.options.dictRemoveFile;
+ }
+ if (file.previewElement) {
+ return file.previewElement.classList.add("dz-complete");
+ }
+ },
+ completemultiple: noop,
+ maxfilesexceeded: noop,
+ maxfilesreached: noop,
+ queuecomplete: noop,
+ addedfiles: noop,
+ previewTemplate: "\n
\n
\n
\n
\n
\n
\n Check \n \n \n \n \n \n
\n
\n
\n Error \n \n \n \n \n \n \n \n
\n
"
+ };
+
+ extend = function() {
+ var key, object, objects, target, val, _i, _len;
+ target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ for (_i = 0, _len = objects.length; _i < _len; _i++) {
+ object = objects[_i];
+ for (key in object) {
+ val = object[key];
+ target[key] = val;
+ }
+ }
+ return target;
+ };
+
+ function Dropzone(element, options) {
+ var elementOptions, fallback, _ref;
+ this.element = element;
+ this.version = Dropzone.version;
+ this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, "");
+ this.clickableElements = [];
+ this.listeners = [];
+ this.files = [];
+ if (typeof this.element === "string") {
+ this.element = document.querySelector(this.element);
+ }
+ if (!(this.element && (this.element.nodeType != null))) {
+ throw new Error("Invalid dropzone element.");
+ }
+ if (this.element.dropzone) {
+ throw new Error("Dropzone already attached.");
+ }
+ Dropzone.instances.push(this);
+ this.element.dropzone = this;
+ elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {};
+ this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {});
+ if (this.options.forceFallback || !Dropzone.isBrowserSupported()) {
+ return this.options.fallback.call(this);
+ }
+ if (this.options.url == null) {
+ this.options.url = this.element.getAttribute("action");
+ }
+ if (!this.options.url) {
+ throw new Error("No URL provided.");
+ }
+ if (this.options.acceptedFiles && this.options.acceptedMimeTypes) {
+ throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");
+ }
+ if (this.options.acceptedMimeTypes) {
+ this.options.acceptedFiles = this.options.acceptedMimeTypes;
+ delete this.options.acceptedMimeTypes;
+ }
+ this.options.method = this.options.method.toUpperCase();
+ if ((fallback = this.getExistingFallback()) && fallback.parentNode) {
+ fallback.parentNode.removeChild(fallback);
+ }
+ if (this.options.previewsContainer !== false) {
+ if (this.options.previewsContainer) {
+ this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer");
+ } else {
+ this.previewsContainer = this.element;
+ }
+ }
+ if (this.options.clickable) {
+ if (this.options.clickable === true) {
+ this.clickableElements = [this.element];
+ } else {
+ this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable");
+ }
+ }
+ this.init();
+ }
+
+ Dropzone.prototype.getAcceptedFiles = function() {
+ var file, _i, _len, _ref, _results;
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (file.accepted) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.getRejectedFiles = function() {
+ var file, _i, _len, _ref, _results;
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (!file.accepted) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.getFilesWithStatus = function(status) {
+ var file, _i, _len, _ref, _results;
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (file.status === status) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.getQueuedFiles = function() {
+ return this.getFilesWithStatus(Dropzone.QUEUED);
+ };
+
+ Dropzone.prototype.getUploadingFiles = function() {
+ return this.getFilesWithStatus(Dropzone.UPLOADING);
+ };
+
+ Dropzone.prototype.getAddedFiles = function() {
+ return this.getFilesWithStatus(Dropzone.ADDED);
+ };
+
+ Dropzone.prototype.getActiveFiles = function() {
+ var file, _i, _len, _ref, _results;
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.init = function() {
+ var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1;
+ if (this.element.tagName === "form") {
+ this.element.setAttribute("enctype", "multipart/form-data");
+ }
+ if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) {
+ this.element.appendChild(Dropzone.createElement("" + this.options.dictDefaultMessage + "
"));
+ }
+ if (this.clickableElements.length) {
+ setupHiddenFileInput = (function(_this) {
+ return function() {
+ if (_this.hiddenFileInput) {
+ _this.hiddenFileInput.parentNode.removeChild(_this.hiddenFileInput);
+ }
+ _this.hiddenFileInput = document.createElement("input");
+ _this.hiddenFileInput.setAttribute("type", "file");
+ if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) {
+ _this.hiddenFileInput.setAttribute("multiple", "multiple");
+ }
+ _this.hiddenFileInput.className = "dz-hidden-input";
+ if (_this.options.acceptedFiles != null) {
+ _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles);
+ }
+ if (_this.options.capture != null) {
+ _this.hiddenFileInput.setAttribute("capture", _this.options.capture);
+ }
+ _this.hiddenFileInput.style.visibility = "hidden";
+ _this.hiddenFileInput.style.position = "absolute";
+ _this.hiddenFileInput.style.top = "0";
+ _this.hiddenFileInput.style.left = "0";
+ _this.hiddenFileInput.style.height = "0";
+ _this.hiddenFileInput.style.width = "0";
+ document.querySelector(_this.options.hiddenInputContainer).appendChild(_this.hiddenFileInput);
+ return _this.hiddenFileInput.addEventListener("change", function() {
+ var file, files, _i, _len;
+ files = _this.hiddenFileInput.files;
+ if (files.length) {
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ _this.addFile(file);
+ }
+ }
+ _this.emit("addedfiles", files);
+ return setupHiddenFileInput();
+ });
+ };
+ })(this);
+ setupHiddenFileInput();
+ }
+ this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL;
+ _ref1 = this.events;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ eventName = _ref1[_i];
+ this.on(eventName, this.options[eventName]);
+ }
+ this.on("uploadprogress", (function(_this) {
+ return function() {
+ return _this.updateTotalUploadProgress();
+ };
+ })(this));
+ this.on("removedfile", (function(_this) {
+ return function() {
+ return _this.updateTotalUploadProgress();
+ };
+ })(this));
+ this.on("canceled", (function(_this) {
+ return function(file) {
+ return _this.emit("complete", file);
+ };
+ })(this));
+ this.on("complete", (function(_this) {
+ return function(file) {
+ if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) {
+ return setTimeout((function() {
+ return _this.emit("queuecomplete");
+ }), 0);
+ }
+ };
+ })(this));
+ noPropagation = function(e) {
+ e.stopPropagation();
+ if (e.preventDefault) {
+ return e.preventDefault();
+ } else {
+ return e.returnValue = false;
+ }
+ };
+ this.listeners = [
+ {
+ element: this.element,
+ events: {
+ "dragstart": (function(_this) {
+ return function(e) {
+ return _this.emit("dragstart", e);
+ };
+ })(this),
+ "dragenter": (function(_this) {
+ return function(e) {
+ noPropagation(e);
+ return _this.emit("dragenter", e);
+ };
+ })(this),
+ "dragover": (function(_this) {
+ return function(e) {
+ var efct;
+ try {
+ efct = e.dataTransfer.effectAllowed;
+ } catch (_error) {}
+ e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';
+ noPropagation(e);
+ return _this.emit("dragover", e);
+ };
+ })(this),
+ "dragleave": (function(_this) {
+ return function(e) {
+ return _this.emit("dragleave", e);
+ };
+ })(this),
+ "drop": (function(_this) {
+ return function(e) {
+ noPropagation(e);
+ return _this.drop(e);
+ };
+ })(this),
+ "dragend": (function(_this) {
+ return function(e) {
+ return _this.emit("dragend", e);
+ };
+ })(this)
+ }
+ }
+ ];
+ this.clickableElements.forEach((function(_this) {
+ return function(clickableElement) {
+ return _this.listeners.push({
+ element: clickableElement,
+ events: {
+ "click": function(evt) {
+ if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) {
+ _this.hiddenFileInput.click();
+ }
+ return true;
+ }
+ }
+ });
+ };
+ })(this));
+ this.enable();
+ return this.options.init.call(this);
+ };
+
+ Dropzone.prototype.destroy = function() {
+ var _ref;
+ this.disable();
+ this.removeAllFiles(true);
+ if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) {
+ this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);
+ this.hiddenFileInput = null;
+ }
+ delete this.element.dropzone;
+ return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);
+ };
+
+ Dropzone.prototype.updateTotalUploadProgress = function() {
+ var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref;
+ totalBytesSent = 0;
+ totalBytes = 0;
+ activeFiles = this.getActiveFiles();
+ if (activeFiles.length) {
+ _ref = this.getActiveFiles();
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ totalBytesSent += file.upload.bytesSent;
+ totalBytes += file.upload.total;
+ }
+ totalUploadProgress = 100 * totalBytesSent / totalBytes;
+ } else {
+ totalUploadProgress = 100;
+ }
+ return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent);
+ };
+
+ Dropzone.prototype._getParamName = function(n) {
+ if (typeof this.options.paramName === "function") {
+ return this.options.paramName(n);
+ } else {
+ return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : "");
+ }
+ };
+
+ Dropzone.prototype._renameFilename = function(name) {
+ if (typeof this.options.renameFilename !== "function") {
+ return name;
+ }
+ return this.options.renameFilename(name);
+ };
+
+ Dropzone.prototype.getFallbackForm = function() {
+ var existingFallback, fields, fieldsString, form;
+ if (existingFallback = this.getExistingFallback()) {
+ return existingFallback;
+ }
+ fieldsString = "";
+ fields = Dropzone.createElement(fieldsString);
+ if (this.element.tagName !== "FORM") {
+ form = Dropzone.createElement("");
+ form.appendChild(fields);
+ } else {
+ this.element.setAttribute("enctype", "multipart/form-data");
+ this.element.setAttribute("method", this.options.method);
+ }
+ return form != null ? form : fields;
+ };
+
+ Dropzone.prototype.getExistingFallback = function() {
+ var fallback, getFallback, tagName, _i, _len, _ref;
+ getFallback = function(elements) {
+ var el, _i, _len;
+ for (_i = 0, _len = elements.length; _i < _len; _i++) {
+ el = elements[_i];
+ if (/(^| )fallback($| )/.test(el.className)) {
+ return el;
+ }
+ }
+ };
+ _ref = ["div", "form"];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ tagName = _ref[_i];
+ if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {
+ return fallback;
+ }
+ }
+ };
+
+ Dropzone.prototype.setupEventListeners = function() {
+ var elementListeners, event, listener, _i, _len, _ref, _results;
+ _ref = this.listeners;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ elementListeners = _ref[_i];
+ _results.push((function() {
+ var _ref1, _results1;
+ _ref1 = elementListeners.events;
+ _results1 = [];
+ for (event in _ref1) {
+ listener = _ref1[event];
+ _results1.push(elementListeners.element.addEventListener(event, listener, false));
+ }
+ return _results1;
+ })());
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.removeEventListeners = function() {
+ var elementListeners, event, listener, _i, _len, _ref, _results;
+ _ref = this.listeners;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ elementListeners = _ref[_i];
+ _results.push((function() {
+ var _ref1, _results1;
+ _ref1 = elementListeners.events;
+ _results1 = [];
+ for (event in _ref1) {
+ listener = _ref1[event];
+ _results1.push(elementListeners.element.removeEventListener(event, listener, false));
+ }
+ return _results1;
+ })());
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.disable = function() {
+ var file, _i, _len, _ref, _results;
+ this.clickableElements.forEach(function(element) {
+ return element.classList.remove("dz-clickable");
+ });
+ this.removeEventListeners();
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ _results.push(this.cancelUpload(file));
+ }
+ return _results;
+ };
+
+ Dropzone.prototype.enable = function() {
+ this.clickableElements.forEach(function(element) {
+ return element.classList.add("dz-clickable");
+ });
+ return this.setupEventListeners();
+ };
+
+ Dropzone.prototype.filesize = function(size) {
+ var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len;
+ selectedSize = 0;
+ selectedUnit = "b";
+ if (size > 0) {
+ units = ['TB', 'GB', 'MB', 'KB', 'b'];
+ for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) {
+ unit = units[i];
+ cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;
+ if (size >= cutoff) {
+ selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);
+ selectedUnit = unit;
+ break;
+ }
+ }
+ selectedSize = Math.round(10 * selectedSize) / 10;
+ }
+ return "" + selectedSize + " " + selectedUnit;
+ };
+
+ Dropzone.prototype._updateMaxFilesReachedClass = function() {
+ if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {
+ if (this.getAcceptedFiles().length === this.options.maxFiles) {
+ this.emit('maxfilesreached', this.files);
+ }
+ return this.element.classList.add("dz-max-files-reached");
+ } else {
+ return this.element.classList.remove("dz-max-files-reached");
+ }
+ };
+
+ Dropzone.prototype.drop = function(e) {
+ var files, items;
+ if (!e.dataTransfer) {
+ return;
+ }
+ this.emit("drop", e);
+ files = e.dataTransfer.files;
+ this.emit("addedfiles", files);
+ if (files.length) {
+ items = e.dataTransfer.items;
+ if (items && items.length && (items[0].webkitGetAsEntry != null)) {
+ this._addFilesFromItems(items);
+ } else {
+ this.handleFiles(files);
+ }
+ }
+ };
+
+ Dropzone.prototype.paste = function(e) {
+ var items, _ref;
+ if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) {
+ return;
+ }
+ this.emit("paste", e);
+ items = e.clipboardData.items;
+ if (items.length) {
+ return this._addFilesFromItems(items);
+ }
+ };
+
+ Dropzone.prototype.handleFiles = function(files) {
+ var file, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ _results.push(this.addFile(file));
+ }
+ return _results;
+ };
+
+ Dropzone.prototype._addFilesFromItems = function(items) {
+ var entry, item, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = items.length; _i < _len; _i++) {
+ item = items[_i];
+ if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) {
+ if (entry.isFile) {
+ _results.push(this.addFile(item.getAsFile()));
+ } else if (entry.isDirectory) {
+ _results.push(this._addFilesFromDirectory(entry, entry.name));
+ } else {
+ _results.push(void 0);
+ }
+ } else if (item.getAsFile != null) {
+ if ((item.kind == null) || item.kind === "file") {
+ _results.push(this.addFile(item.getAsFile()));
+ } else {
+ _results.push(void 0);
+ }
+ } else {
+ _results.push(void 0);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.prototype._addFilesFromDirectory = function(directory, path) {
+ var dirReader, errorHandler, readEntries;
+ dirReader = directory.createReader();
+ errorHandler = function(error) {
+ return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0;
+ };
+ readEntries = (function(_this) {
+ return function() {
+ return dirReader.readEntries(function(entries) {
+ var entry, _i, _len;
+ if (entries.length > 0) {
+ for (_i = 0, _len = entries.length; _i < _len; _i++) {
+ entry = entries[_i];
+ if (entry.isFile) {
+ entry.file(function(file) {
+ if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') {
+ return;
+ }
+ file.fullPath = "" + path + "/" + file.name;
+ return _this.addFile(file);
+ });
+ } else if (entry.isDirectory) {
+ _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name);
+ }
+ }
+ readEntries();
+ }
+ return null;
+ }, errorHandler);
+ };
+ })(this);
+ return readEntries();
+ };
+
+ Dropzone.prototype.accept = function(file, done) {
+ if (file.size > this.options.maxFilesize * 1024 * 1024) {
+ return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize));
+ } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {
+ return done(this.options.dictInvalidFileType);
+ } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) {
+ done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles));
+ return this.emit("maxfilesexceeded", file);
+ } else {
+ return this.options.accept.call(this, file, done);
+ }
+ };
+
+ Dropzone.prototype.addFile = function(file) {
+ file.upload = {
+ progress: 0,
+ total: file.size,
+ bytesSent: 0
+ };
+ this.files.push(file);
+ file.status = Dropzone.ADDED;
+ this.emit("addedfile", file);
+ this._enqueueThumbnail(file);
+ return this.accept(file, (function(_this) {
+ return function(error) {
+ if (error) {
+ file.accepted = false;
+ _this._errorProcessing([file], error);
+ } else {
+ file.accepted = true;
+ if (_this.options.autoQueue) {
+ _this.enqueueFile(file);
+ }
+ }
+ return _this._updateMaxFilesReachedClass();
+ };
+ })(this));
+ };
+
+ Dropzone.prototype.enqueueFiles = function(files) {
+ var file, _i, _len;
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ this.enqueueFile(file);
+ }
+ return null;
+ };
+
+ Dropzone.prototype.enqueueFile = function(file) {
+ if (file.status === Dropzone.ADDED && file.accepted === true) {
+ file.status = Dropzone.QUEUED;
+ if (this.options.autoProcessQueue) {
+ return setTimeout(((function(_this) {
+ return function() {
+ return _this.processQueue();
+ };
+ })(this)), 0);
+ }
+ } else {
+ throw new Error("This file can't be queued because it has already been processed or was rejected.");
+ }
+ };
+
+ Dropzone.prototype._thumbnailQueue = [];
+
+ Dropzone.prototype._processingThumbnail = false;
+
+ Dropzone.prototype._enqueueThumbnail = function(file) {
+ if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {
+ this._thumbnailQueue.push(file);
+ return setTimeout(((function(_this) {
+ return function() {
+ return _this._processThumbnailQueue();
+ };
+ })(this)), 0);
+ }
+ };
+
+ Dropzone.prototype._processThumbnailQueue = function() {
+ if (this._processingThumbnail || this._thumbnailQueue.length === 0) {
+ return;
+ }
+ this._processingThumbnail = true;
+ return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) {
+ return function() {
+ _this._processingThumbnail = false;
+ return _this._processThumbnailQueue();
+ };
+ })(this));
+ };
+
+ Dropzone.prototype.removeFile = function(file) {
+ if (file.status === Dropzone.UPLOADING) {
+ this.cancelUpload(file);
+ }
+ this.files = without(this.files, file);
+ this.emit("removedfile", file);
+ if (this.files.length === 0) {
+ return this.emit("reset");
+ }
+ };
+
+ Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) {
+ var file, _i, _len, _ref;
+ if (cancelIfNecessary == null) {
+ cancelIfNecessary = false;
+ }
+ _ref = this.files.slice();
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {
+ this.removeFile(file);
+ }
+ }
+ return null;
+ };
+
+ Dropzone.prototype.createThumbnail = function(file, callback) {
+ var fileReader;
+ fileReader = new FileReader;
+ fileReader.onload = (function(_this) {
+ return function() {
+ if (file.type === "image/svg+xml") {
+ _this.emit("thumbnail", file, fileReader.result);
+ if (callback != null) {
+ callback();
+ }
+ return;
+ }
+ return _this.createThumbnailFromUrl(file, fileReader.result, callback);
+ };
+ })(this);
+ return fileReader.readAsDataURL(file);
+ };
+
+ Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback, crossOrigin) {
+ var img;
+ img = document.createElement("img");
+ if (crossOrigin) {
+ img.crossOrigin = crossOrigin;
+ }
+ img.onload = (function(_this) {
+ return function() {
+ var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3;
+ file.width = img.width;
+ file.height = img.height;
+ resizeInfo = _this.options.resize.call(_this, file);
+ if (resizeInfo.trgWidth == null) {
+ resizeInfo.trgWidth = resizeInfo.optWidth;
+ }
+ if (resizeInfo.trgHeight == null) {
+ resizeInfo.trgHeight = resizeInfo.optHeight;
+ }
+ canvas = document.createElement("canvas");
+ ctx = canvas.getContext("2d");
+ canvas.width = resizeInfo.trgWidth;
+ canvas.height = resizeInfo.trgHeight;
+ drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);
+ thumbnail = canvas.toDataURL("image/png");
+ _this.emit("thumbnail", file, thumbnail);
+ if (callback != null) {
+ return callback();
+ }
+ };
+ })(this);
+ if (callback != null) {
+ img.onerror = callback;
+ }
+ return img.src = imageUrl;
+ };
+
+ Dropzone.prototype.processQueue = function() {
+ var i, parallelUploads, processingLength, queuedFiles;
+ parallelUploads = this.options.parallelUploads;
+ processingLength = this.getUploadingFiles().length;
+ i = processingLength;
+ if (processingLength >= parallelUploads) {
+ return;
+ }
+ queuedFiles = this.getQueuedFiles();
+ if (!(queuedFiles.length > 0)) {
+ return;
+ }
+ if (this.options.uploadMultiple) {
+ return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));
+ } else {
+ while (i < parallelUploads) {
+ if (!queuedFiles.length) {
+ return;
+ }
+ this.processFile(queuedFiles.shift());
+ i++;
+ }
+ }
+ };
+
+ Dropzone.prototype.processFile = function(file) {
+ return this.processFiles([file]);
+ };
+
+ Dropzone.prototype.processFiles = function(files) {
+ var file, _i, _len;
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ file.processing = true;
+ file.status = Dropzone.UPLOADING;
+ this.emit("processing", file);
+ }
+ if (this.options.uploadMultiple) {
+ this.emit("processingmultiple", files);
+ }
+ return this.uploadFiles(files);
+ };
+
+ Dropzone.prototype._getFilesWithXhr = function(xhr) {
+ var file, files;
+ return files = (function() {
+ var _i, _len, _ref, _results;
+ _ref = this.files;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ file = _ref[_i];
+ if (file.xhr === xhr) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ }).call(this);
+ };
+
+ Dropzone.prototype.cancelUpload = function(file) {
+ var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref;
+ if (file.status === Dropzone.UPLOADING) {
+ groupedFiles = this._getFilesWithXhr(file.xhr);
+ for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) {
+ groupedFile = groupedFiles[_i];
+ groupedFile.status = Dropzone.CANCELED;
+ }
+ file.xhr.abort();
+ for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) {
+ groupedFile = groupedFiles[_j];
+ this.emit("canceled", groupedFile);
+ }
+ if (this.options.uploadMultiple) {
+ this.emit("canceledmultiple", groupedFiles);
+ }
+ } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) {
+ file.status = Dropzone.CANCELED;
+ this.emit("canceled", file);
+ if (this.options.uploadMultiple) {
+ this.emit("canceledmultiple", [file]);
+ }
+ }
+ if (this.options.autoProcessQueue) {
+ return this.processQueue();
+ }
+ };
+
+ resolveOption = function() {
+ var args, option;
+ option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ if (typeof option === 'function') {
+ return option.apply(this, args);
+ }
+ return option;
+ };
+
+ Dropzone.prototype.uploadFile = function(file) {
+ return this.uploadFiles([file]);
+ };
+
+ Dropzone.prototype.uploadFiles = function(files) {
+ var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
+ xhr = new XMLHttpRequest();
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ file.xhr = xhr;
+ }
+ method = resolveOption(this.options.method, files);
+ url = resolveOption(this.options.url, files);
+ xhr.open(method, url, true);
+ xhr.withCredentials = !!this.options.withCredentials;
+ response = null;
+ handleError = (function(_this) {
+ return function() {
+ var _j, _len1, _results;
+ _results = [];
+ for (_j = 0, _len1 = files.length; _j < _len1; _j++) {
+ file = files[_j];
+ _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr));
+ }
+ return _results;
+ };
+ })(this);
+ updateProgress = (function(_this) {
+ return function(e) {
+ var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results;
+ if (e != null) {
+ progress = 100 * e.loaded / e.total;
+ for (_j = 0, _len1 = files.length; _j < _len1; _j++) {
+ file = files[_j];
+ file.upload = {
+ progress: progress,
+ total: e.total,
+ bytesSent: e.loaded
+ };
+ }
+ } else {
+ allFilesFinished = true;
+ progress = 100;
+ for (_k = 0, _len2 = files.length; _k < _len2; _k++) {
+ file = files[_k];
+ if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) {
+ allFilesFinished = false;
+ }
+ file.upload.progress = progress;
+ file.upload.bytesSent = file.upload.total;
+ }
+ if (allFilesFinished) {
+ return;
+ }
+ }
+ _results = [];
+ for (_l = 0, _len3 = files.length; _l < _len3; _l++) {
+ file = files[_l];
+ _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent));
+ }
+ return _results;
+ };
+ })(this);
+ xhr.onload = (function(_this) {
+ return function(e) {
+ var _ref;
+ if (files[0].status === Dropzone.CANCELED) {
+ return;
+ }
+ if (xhr.readyState !== 4) {
+ return;
+ }
+ response = xhr.responseText;
+ if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) {
+ try {
+ response = JSON.parse(response);
+ } catch (_error) {
+ e = _error;
+ response = "Invalid JSON response from server.";
+ }
+ }
+ updateProgress();
+ if (!((200 <= (_ref = xhr.status) && _ref < 300))) {
+ return handleError();
+ } else {
+ return _this._finished(files, response, e);
+ }
+ };
+ })(this);
+ xhr.onerror = (function(_this) {
+ return function() {
+ if (files[0].status === Dropzone.CANCELED) {
+ return;
+ }
+ return handleError();
+ };
+ })(this);
+ progressObj = (_ref = xhr.upload) != null ? _ref : xhr;
+ progressObj.onprogress = updateProgress;
+ headers = {
+ "Accept": "application/json",
+ "Cache-Control": "no-cache",
+ "X-Requested-With": "XMLHttpRequest"
+ };
+ if (this.options.headers) {
+ extend(headers, this.options.headers);
+ }
+ for (headerName in headers) {
+ headerValue = headers[headerName];
+ if (headerValue) {
+ xhr.setRequestHeader(headerName, headerValue);
+ }
+ }
+ formData = new FormData();
+ if (this.options.params) {
+ _ref1 = this.options.params;
+ for (key in _ref1) {
+ value = _ref1[key];
+ formData.append(key, value);
+ }
+ }
+ for (_j = 0, _len1 = files.length; _j < _len1; _j++) {
+ file = files[_j];
+ this.emit("sending", file, xhr, formData);
+ }
+ if (this.options.uploadMultiple) {
+ this.emit("sendingmultiple", files, xhr, formData);
+ }
+ if (this.element.tagName === "FORM") {
+ _ref2 = this.element.querySelectorAll("input, textarea, select, button");
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
+ input = _ref2[_k];
+ inputName = input.getAttribute("name");
+ inputType = input.getAttribute("type");
+ if (input.tagName === "SELECT" && input.hasAttribute("multiple")) {
+ _ref3 = input.options;
+ for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
+ option = _ref3[_l];
+ if (option.selected) {
+ formData.append(inputName, option.value);
+ }
+ }
+ } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) {
+ formData.append(inputName, input.value);
+ }
+ }
+ }
+ for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) {
+ formData.append(this._getParamName(i), files[i], this._renameFilename(files[i].name));
+ }
+ return this.submitRequest(xhr, formData, files);
+ };
+
+ Dropzone.prototype.submitRequest = function(xhr, formData, files) {
+ return xhr.send(formData);
+ };
+
+ Dropzone.prototype._finished = function(files, responseText, e) {
+ var file, _i, _len;
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ file.status = Dropzone.SUCCESS;
+ this.emit("success", file, responseText, e);
+ this.emit("complete", file);
+ }
+ if (this.options.uploadMultiple) {
+ this.emit("successmultiple", files, responseText, e);
+ this.emit("completemultiple", files);
+ }
+ if (this.options.autoProcessQueue) {
+ return this.processQueue();
+ }
+ };
+
+ Dropzone.prototype._errorProcessing = function(files, message, xhr) {
+ var file, _i, _len;
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ file.status = Dropzone.ERROR;
+ this.emit("error", file, message, xhr);
+ this.emit("complete", file);
+ }
+ if (this.options.uploadMultiple) {
+ this.emit("errormultiple", files, message, xhr);
+ this.emit("completemultiple", files);
+ }
+ if (this.options.autoProcessQueue) {
+ return this.processQueue();
+ }
+ };
+
+ return Dropzone;
+
+ })(Emitter);
+
+ Dropzone.version = "4.3.0";
+
+ Dropzone.options = {};
+
+ Dropzone.optionsForElement = function(element) {
+ if (element.getAttribute("id")) {
+ return Dropzone.options[camelize(element.getAttribute("id"))];
+ } else {
+ return void 0;
+ }
+ };
+
+ Dropzone.instances = [];
+
+ Dropzone.forElement = function(element) {
+ if (typeof element === "string") {
+ element = document.querySelector(element);
+ }
+ if ((element != null ? element.dropzone : void 0) == null) {
+ throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");
+ }
+ return element.dropzone;
+ };
+
+ Dropzone.autoDiscover = true;
+
+ Dropzone.discover = function() {
+ var checkElements, dropzone, dropzones, _i, _len, _results;
+ if (document.querySelectorAll) {
+ dropzones = document.querySelectorAll(".dropzone");
+ } else {
+ dropzones = [];
+ checkElements = function(elements) {
+ var el, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = elements.length; _i < _len; _i++) {
+ el = elements[_i];
+ if (/(^| )dropzone($| )/.test(el.className)) {
+ _results.push(dropzones.push(el));
+ } else {
+ _results.push(void 0);
+ }
+ }
+ return _results;
+ };
+ checkElements(document.getElementsByTagName("div"));
+ checkElements(document.getElementsByTagName("form"));
+ }
+ _results = [];
+ for (_i = 0, _len = dropzones.length; _i < _len; _i++) {
+ dropzone = dropzones[_i];
+ if (Dropzone.optionsForElement(dropzone) !== false) {
+ _results.push(new Dropzone(dropzone));
+ } else {
+ _results.push(void 0);
+ }
+ }
+ return _results;
+ };
+
+ Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i];
+
+ Dropzone.isBrowserSupported = function() {
+ var capableBrowser, regex, _i, _len, _ref;
+ capableBrowser = true;
+ if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {
+ if (!("classList" in document.createElement("a"))) {
+ capableBrowser = false;
+ } else {
+ _ref = Dropzone.blacklistedBrowsers;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ regex = _ref[_i];
+ if (regex.test(navigator.userAgent)) {
+ capableBrowser = false;
+ continue;
+ }
+ }
+ }
+ } else {
+ capableBrowser = false;
+ }
+ return capableBrowser;
+ };
+
+ without = function(list, rejectedItem) {
+ var item, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = list.length; _i < _len; _i++) {
+ item = list[_i];
+ if (item !== rejectedItem) {
+ _results.push(item);
+ }
+ }
+ return _results;
+ };
+
+ camelize = function(str) {
+ return str.replace(/[\-_](\w)/g, function(match) {
+ return match.charAt(1).toUpperCase();
+ });
+ };
+
+ Dropzone.createElement = function(string) {
+ var div;
+ div = document.createElement("div");
+ div.innerHTML = string;
+ return div.childNodes[0];
+ };
+
+ Dropzone.elementInside = function(element, container) {
+ if (element === container) {
+ return true;
+ }
+ while (element = element.parentNode) {
+ if (element === container) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ Dropzone.getElement = function(el, name) {
+ var element;
+ if (typeof el === "string") {
+ element = document.querySelector(el);
+ } else if (el.nodeType != null) {
+ element = el;
+ }
+ if (element == null) {
+ throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element.");
+ }
+ return element;
+ };
+
+ Dropzone.getElements = function(els, name) {
+ var e, el, elements, _i, _j, _len, _len1, _ref;
+ if (els instanceof Array) {
+ elements = [];
+ try {
+ for (_i = 0, _len = els.length; _i < _len; _i++) {
+ el = els[_i];
+ elements.push(this.getElement(el, name));
+ }
+ } catch (_error) {
+ e = _error;
+ elements = null;
+ }
+ } else if (typeof els === "string") {
+ elements = [];
+ _ref = document.querySelectorAll(els);
+ for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
+ el = _ref[_j];
+ elements.push(el);
+ }
+ } else if (els.nodeType != null) {
+ elements = [els];
+ }
+ if (!((elements != null) && elements.length)) {
+ throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");
+ }
+ return elements;
+ };
+
+ Dropzone.confirm = function(question, accepted, rejected) {
+ if (window.confirm(question)) {
+ return accepted();
+ } else if (rejected != null) {
+ return rejected();
+ }
+ };
+
+ Dropzone.isValidFile = function(file, acceptedFiles) {
+ var baseMimeType, mimeType, validType, _i, _len;
+ if (!acceptedFiles) {
+ return true;
+ }
+ acceptedFiles = acceptedFiles.split(",");
+ mimeType = file.type;
+ baseMimeType = mimeType.replace(/\/.*$/, "");
+ for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) {
+ validType = acceptedFiles[_i];
+ validType = validType.trim();
+ if (validType.charAt(0) === ".") {
+ if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {
+ return true;
+ }
+ } else if (/\/\*$/.test(validType)) {
+ if (baseMimeType === validType.replace(/\/.*$/, "")) {
+ return true;
+ }
+ } else {
+ if (mimeType === validType) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ if (typeof jQuery !== "undefined" && jQuery !== null) {
+ jQuery.fn.dropzone = function(options) {
+ return this.each(function() {
+ return new Dropzone(this, options);
+ });
+ };
+ }
+
+ if (typeof module !== "undefined" && module !== null) {
+ module.exports = Dropzone;
+ } else {
+ window.Dropzone = Dropzone;
+ }
+
+ Dropzone.ADDED = "added";
+
+ Dropzone.QUEUED = "queued";
+
+ Dropzone.ACCEPTED = Dropzone.QUEUED;
+
+ Dropzone.UPLOADING = "uploading";
+
+ Dropzone.PROCESSING = Dropzone.UPLOADING;
+
+ Dropzone.CANCELED = "canceled";
+
+ Dropzone.ERROR = "error";
+
+ Dropzone.SUCCESS = "success";
+
+
+ /*
+
+ Bugfix for iOS 6 and 7
+ Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios
+ based on the work of https://github.com/stomita/ios-imagefile-megapixel
+ */
+
+ detectVerticalSquash = function(img) {
+ var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy;
+ iw = img.naturalWidth;
+ ih = img.naturalHeight;
+ canvas = document.createElement("canvas");
+ canvas.width = 1;
+ canvas.height = ih;
+ ctx = canvas.getContext("2d");
+ ctx.drawImage(img, 0, 0);
+ data = ctx.getImageData(0, 0, 1, ih).data;
+ sy = 0;
+ ey = ih;
+ py = ih;
+ while (py > sy) {
+ alpha = data[(py - 1) * 4 + 3];
+ if (alpha === 0) {
+ ey = py;
+ } else {
+ sy = py;
+ }
+ py = (ey + sy) >> 1;
+ }
+ ratio = py / ih;
+ if (ratio === 0) {
+ return 1;
+ } else {
+ return ratio;
+ }
+ };
+
+ drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {
+ var vertSquashRatio;
+ vertSquashRatio = detectVerticalSquash(img);
+ return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);
+ };
+
+
+ /*
+ * contentloaded.js
+ *
+ * Author: Diego Perini (diego.perini at gmail.com)
+ * Summary: cross-browser wrapper for DOMContentLoaded
+ * Updated: 20101020
+ * License: MIT
+ * Version: 1.2
+ *
+ * URL:
+ * http://javascript.nwbox.com/ContentLoaded/
+ * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE
+ */
+
+ contentLoaded = function(win, fn) {
+ var add, doc, done, init, poll, pre, rem, root, top;
+ done = false;
+ top = true;
+ doc = win.document;
+ root = doc.documentElement;
+ add = (doc.addEventListener ? "addEventListener" : "attachEvent");
+ rem = (doc.addEventListener ? "removeEventListener" : "detachEvent");
+ pre = (doc.addEventListener ? "" : "on");
+ init = function(e) {
+ if (e.type === "readystatechange" && doc.readyState !== "complete") {
+ return;
+ }
+ (e.type === "load" ? win : doc)[rem](pre + e.type, init, false);
+ if (!done && (done = true)) {
+ return fn.call(win, e.type || e);
+ }
+ };
+ poll = function() {
+ var e;
+ try {
+ root.doScroll("left");
+ } catch (_error) {
+ e = _error;
+ setTimeout(poll, 50);
+ return;
+ }
+ return init("poll");
+ };
+ if (doc.readyState !== "complete") {
+ if (doc.createEventObject && root.doScroll) {
+ try {
+ top = !win.frameElement;
+ } catch (_error) {}
+ if (top) {
+ poll();
+ }
+ }
+ doc[add](pre + "DOMContentLoaded", init, false);
+ doc[add](pre + "readystatechange", init, false);
+ return win[add](pre + "load", init, false);
+ }
+ };
+
+ Dropzone._autoDiscoverFunction = function() {
+ if (Dropzone.autoDiscover) {
+ return Dropzone.discover();
+ }
+ };
+
+ contentLoaded(window, Dropzone._autoDiscoverFunction);
+
+}).call(this);
\ No newline at end of file
diff --git a/js/ie-emulation-modes-warning.js b/js/ie-emulation-modes-warning.js
new file mode 100644
index 0000000..e41d272
--- /dev/null
+++ b/js/ie-emulation-modes-warning.js
@@ -0,0 +1,51 @@
+// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
+// IT'S JUST JUNK FOR OUR DOCS!
+// ++++++++++++++++++++++++++++++++++++++++++
+/*!
+ * Copyright 2014-2015 Twitter, Inc.
+ *
+ * Licensed under the Creative Commons Attribution 3.0 Unported License. For
+ * details, see https://creativecommons.org/licenses/by/3.0/.
+ */
+// Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes.
+(function () {
+ 'use strict';
+
+ function emulatedIEMajorVersion() {
+ var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent)
+ if (groups === null) {
+ return null
+ }
+ var ieVersionNum = parseInt(groups[1], 10)
+ var ieMajorVersion = Math.floor(ieVersionNum)
+ return ieMajorVersion
+ }
+
+ function actualNonEmulatedIEMajorVersion() {
+ // Detects the actual version of IE in use, even if it's in an older-IE emulation mode.
+ // IE JavaScript conditional compilation docs: https://msdn.microsoft.com/library/121hztk3%28v=vs.94%29.aspx
+ // @cc_on docs: https://msdn.microsoft.com/library/8ka90k2e%28v=vs.94%29.aspx
+ var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // jshint ignore:line
+ if (jscriptVersion === undefined) {
+ return 11 // IE11+ not in emulation mode
+ }
+ if (jscriptVersion < 9) {
+ return 8 // IE8 (or lower; haven't tested on IE<8)
+ }
+ return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode
+ }
+
+ var ua = window.navigator.userAgent
+ if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) {
+ return // Opera, which might pretend to be IE
+ }
+ var emulated = emulatedIEMajorVersion()
+ if (emulated === null) {
+ return // Not IE
+ }
+ var nonEmulated = actualNonEmulatedIEMajorVersion()
+
+ if (emulated !== nonEmulated) {
+ window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!')
+ }
+})();
\ No newline at end of file
diff --git a/js/ie10-viewport-bug-workaround.js b/js/ie10-viewport-bug-workaround.js
new file mode 100644
index 0000000..2c77829
--- /dev/null
+++ b/js/ie10-viewport-bug-workaround.js
@@ -0,0 +1,23 @@
+/*!
+ * IE10 viewport hack for Surface/desktop Windows 8 bug
+ * Copyright 2014-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+// See the Getting Started docs for more information:
+// http://getbootstrap.com/getting-started/#support-ie10-width
+
+(function () {
+ 'use strict';
+
+ if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
+ var msViewportStyle = document.createElement('style')
+ msViewportStyle.appendChild(
+ document.createTextNode(
+ '@-ms-viewport{width:auto!important}'
+ )
+ )
+ document.querySelector('head').appendChild(msViewportStyle)
+ }
+
+})();
\ No newline at end of file
diff --git a/js/jnoty.js b/js/jnoty.js
new file mode 100644
index 0000000..41e8c99
--- /dev/null
+++ b/js/jnoty.js
@@ -0,0 +1,257 @@
+(function($) {
+ /** jnoty Wrapper - Establish a base jnoty Container for compatibility with older releases. **/
+ $.jnoty = function( m , o ) {
+ // To maintain compatibility with older version that only supported one instance we'll create the base container.
+ if ( $('#jnoty').length === 0 )
+ $('
').addClass( (o && o.position) ? o.position : $.jnoty.defaults.position ).appendTo( (o && o.appendTo) ? o.appendTo : $.jnoty.defaults.appendTo );
+
+ // Create a notification on the container.
+ $('#jnoty').jnoty(m,o);
+ };
+
+
+ /** Raise jnoty Notification on a jnoty Container **/
+ $.fn.jnoty = function( m , o ) {
+ // Short hand for passing in just an object to this method
+ if ( o === undefined && $.isPlainObject(m) ) {
+ o = m;
+ m = o.mesage;
+ }
+
+ if ( $.isFunction(this.each) ) {
+ var args = arguments;
+
+ return this.each(function() {
+ /** Create a jnoty Instance on the Container if it does not exist **/
+ if ( $(this).data('jnoty.instance') === undefined ) {
+ $(this).data('jnoty.instance', $.extend( new $.fn.jnoty(), { notifications: [], element: null, interval: null } ));
+ $(this).data('jnoty.instance').startup( this );
+ }
+
+ /** Optionally call jnoty instance methods, or just raise a normal notification **/
+ if ( $.isFunction($(this).data('jnoty.instance')[m]) ) {
+ $(this).data('jnoty.instance')[m].apply( $(this).data('jnoty.instance') , $.makeArray(args).slice(1) );
+ } else {
+ $(this).data('jnoty.instance').create( m , o );
+ }
+ });
+ }
+ };
+
+ $.extend( $.fn.jnoty.prototype , {
+
+ /** Default jnoty Settings **/
+ defaults: {
+ pool: 0,
+ header: '',
+ group: '',
+ sticky: false,
+ position: 'top-right',
+ appendTo: 'body',
+ glue: 'after',
+ theme: 'default',
+ themeState: 'highlight',
+ corners: '10px',
+ check: 250,
+ life: 3000,
+ closeDuration: 'normal',
+ openDuration: 'normal',
+ easing: 'swing',
+ closer: false,
+ closeTemplate: '×',
+ closerTemplate: '[ close all ]
',
+ log: function() {},
+ beforeOpen: function() {},
+ afterOpen: function() {},
+ open: function() {},
+ beforeClose: function() {},
+ close: function() {},
+ click: function() {},
+ animateOpen: {
+ opacity: 'show'
+ },
+ animateClose: {
+ opacity: 'hide'
+ }
+ },
+
+ notifications: [],
+
+ /** jnoty Container Node **/
+ element: null,
+
+ /** Interval Function **/
+ interval: null,
+
+ /** Create a Notification **/
+ create: function( message , options ) {
+ var o = $.extend({}, this.defaults, options);
+
+ /* To keep backward compatibility with 1.24 and earlier, honor 'speed' if the user has set it */
+ if (typeof o.speed !== 'undefined') {
+ o.openDuration = o.speed;
+ o.closeDuration = o.speed;
+ }
+
+ this.notifications.push({ message: message , options: o });
+
+ o.log.apply( this.element , [this.element,message,o] );
+ },
+
+ render: function( n ) {
+ var self = this;
+ var message = n.message;
+ var o = n.options;
+
+ // Support for jQuery theme-states, if this is not used it displays a widget header
+ o.themeState = (o.themeState === '') ? '' : 'ui-state-' + o.themeState;
+
+ var notification = $('
')
+ .addClass('jGrowl-notification alert ' + o.themeState + ' ui-corner-all' + ((o.group !== undefined && o.group !== '') ? ' ' + o.group : ''))
+ .append($(' ').addClass('jGrowl-close').html(o.closeTemplate))
+ .append($('
').addClass('jGrowl-header').html(o.header))
+ .append($('
').addClass('jGrowl-message').html(message))
+ .data("jGrowl", o).addClass(o.theme).children('.jGrowl-close').bind("click.jGrowl", function() {
+ $(this).parent().trigger('jGrowl.beforeClose');
+ return false;
+ })
+ .parent();
+
+ var notification = $('
')
+ .addClass('jnoty-container ' + o.themeState + '')
+ .append($(' ').addClass('jnoty-close').html(o.closeTemplate))
+ .append($('
').addClass('jnoty-content')
+ .append($('
').addClass('jnoty-header')
+ .append($(' ').addClass('jnoty-icon')
+ .append($(' ').addClass(o.icon)))
+ .append($(' ').addClass('jnoty-title').html(o.header)))
+ .append($('
').addClass('jnoty-message').html(message)))
+ .data("jnoty", o).addClass(o.theme).children('.jnoty-close').bind("click.jnoty", function () {
+ $(this).parent().trigger('jnoty.beforeClose');
+ return !1
+ }).parent();
+
+
+ /** Notification Actions **/
+ $(notification).bind("mouseover.jnoty", function() {
+ $('.jnoty-notification', self.element).data("jnoty.pause", true);
+ }).bind("mouseout.jnoty", function() {
+ $('.jnoty-notification', self.element).data("jnoty.pause", false);
+ }).bind('jnoty.beforeOpen', function() {
+ if ( o.beforeOpen.apply( notification , [notification,message,o,self.element] ) !== false ) {
+ $(this).trigger('jnoty.open');
+ }
+ }).bind('jnoty.open', function() {
+ if ( o.open.apply( notification , [notification,message,o,self.element] ) !== false ) {
+ if ( o.glue == 'after' ) {
+ $('.jnoty-container:last', self.element).after(notification);
+ } else {
+ $('.jnoty-container:first', self.element).before(notification);
+ }
+
+ $(this).animate(o.animateOpen, o.openDuration, o.easing, function() {
+ // Fixes some anti-aliasing issues with IE filters.
+ if ($.support.opacity === false)
+ this.style.removeAttribute('filter');
+
+ if ( $(this).data("jnoty") !== null && typeof $(this).data("jnoty") !== 'undefined') // Happens when a notification is closing before it's open.
+ $(this).data("jnoty").created = new Date();
+
+ $(this).trigger('jGrowl.afterOpen');
+ });
+ }
+ }).bind('jnoty.afterOpen', function() {
+ o.afterOpen.apply( notification , [notification,message,o,self.element] );
+ }).bind('click', function() {
+ o.click.apply( notification, [notification,message,o,self.element] );
+ }).bind('jnoty.beforeClose', function() {
+ if ( o.beforeClose.apply( notification , [notification,message,o,self.element] ) !== false )
+ $(this).trigger('jnoty.close');
+ }).bind('jnoty.close', function() {
+ // Pause the notification, lest during the course of animation another close event gets called.
+ $(this).data('jnoty.pause', true);
+ $(this).animate(o.animateClose, o.closeDuration, o.easing, function() {
+ if ( $.isFunction(o.close) ) {
+ if ( o.close.apply( notification , [notification,message,o,self.element] ) !== false )
+ $(this).remove();
+ } else {
+ $(this).remove();
+ }
+ });
+ }).trigger('jnoty.beforeOpen');
+
+ /** Optional Corners Plugin **/
+ if ( o.corners !== '' && $.fn.corner !== undefined ) $(notification).corner( o.corners );
+
+ /** Add a Global Closer if more than one notification exists **/
+ if ($('.jnoty-container:parent', self.element).length > 1 &&
+ $('.jnoty-closer', self.element).length === 0 && this.defaults.closer !== false ) {
+ $(this.defaults.closerTemplate).addClass('jnoty-closer ' + this.defaults.themeState + ' ui-corner-all').addClass(this.defaults.theme)
+ .appendTo(self.element).animate(this.defaults.animateOpen, this.defaults.speed, this.defaults.easing)
+ .bind("click.jnoty", function() {
+ $(this).siblings().trigger("jnoty.beforeClose");
+
+ if ( $.isFunction( self.defaults.closer ) ) {
+ self.defaults.closer.apply( $(this).parent()[0] , [$(this).parent()[0]] );
+ }
+ });
+ }
+ },
+
+ /** Update the jnoty Container, removing old jnoty notifications **/
+ update: function() {
+ $(this.element).find('.jnoty-container:parent').each( function() {
+ if ($(this).data("jnoty") !== undefined && $(this).data("jnoty").created !== undefined &&
+ ($(this).data("jnoty").created.getTime() + parseInt($(this).data("jnoty").life, 10)) < (new Date()).getTime() &&
+ $(this).data("jnoty").sticky !== true &&
+ ($(this).data("jnoty.pause") === undefined || $(this).data("jnoty.pause") !== true) ) {
+
+ // Pause the notification, lest during the course of animation another close event gets called.
+ $(this).trigger('jnoty.beforeClose');
+ }
+ });
+
+ if (this.notifications.length > 0 &&
+ (this.defaults.pool === 0 || $(this.element).find('.jnoty-container:parent').length < this.defaults.pool) )
+ this.render( this.notifications.shift() );
+
+ if ($(this.element).find('.jnoty-container:parent').length < 2 ) {
+ $(this.element).find('.jnoty-closer').animate(this.defaults.animateClose, this.defaults.speed, this.defaults.easing, function() {
+ $(this).remove();
+ });
+ }
+ },
+
+ /** Setup the jnoty Notification Container **/
+ startup: function(e) {
+ this.element = $(e).addClass('jnoty').append('
');
+ this.interval = setInterval( function() {
+ // some error in chage ^^
+ var instance = $(e).data('jnoty.instance');
+ if (undefined !== instance) {
+ instance.update();
+ }
+ }, parseInt(this.defaults.check, 10));
+ },
+
+ /** Shutdown jnoty, removing it and clearing the interval **/
+ shutdown: function() {
+ $(this.element).removeClass('jnoty')
+ .find('.jnoty-container').trigger('jnoty.close')
+ .parent().empty()
+ ;
+
+ clearInterval(this.interval);
+ },
+
+ close: function() {
+ $(this.element).find('.jnoty-container').each(function(){
+ $(this).trigger('jnoty.beforeClose');
+ });
+ }
+ });
+
+ /** Reference the Defaults Object for compatibility with older versions of jnoty **/
+ $.jnoty.defaults = $.fn.jnoty.prototype.defaults;
+
+})(jQuery);
\ No newline at end of file
diff --git a/js/jquery-2.2.0.min.js b/js/jquery-2.2.0.min.js
new file mode 100644
index 0000000..23e6456
--- /dev/null
+++ b/js/jquery-2.2.0.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v2.2.0 | (c) jQuery Foundation | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!k.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML=" ",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML=" ","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML=" ",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c}catch(e){}O.set(a,b,c);
+}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return this;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.rnamespace||a.rnamespace.test(g.namespace))&&(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,la=/" ).attr( {
+ "src": jQuery.mbYTPlayer.locationProtocol + "//www.youtube.com/iframe_api?v=" + jQuery.mbYTPlayer.version,
+ "id": "YTAPI"
+ } );
+ jQuery( "head" ).prepend( tag );
+ } else {
+ setTimeout( function() {
+ jQuery( document ).trigger( "YTAPIReady" );
+ }, 100 )
+ }
+
+ if( jQuery.browser.mobile && !YTPlayer.canPlayOnMobile ) {
+
+ if( YTPlayer.opt.mobileFallbackImage ) {
+ YTPlayer.opt.containment.css( {
+ backgroundImage: "url(" + YTPlayer.opt.mobileFallbackImage + ")",
+ backgroundPosition: "center center",
+ backgroundSize: "cover",
+ backgroundRepeat: "no-repeat"
+ } )
+ };
+
+ $YTPlayer.remove();
+ jQuery( document ).trigger( "YTPUnavailable" );
+ return;
+ }
+
+ jQuery( document ).on( "YTAPIReady", function() {
+ if( ( YTPlayer.isBackground && ytp.backgroundIsInited ) || YTPlayer.isInit ) return;
+ if( YTPlayer.isBackground ) {
+ ytp.backgroundIsInited = true;
+ }
+
+ YTPlayer.opt.autoPlay = typeof YTPlayer.opt.autoPlay == "undefined" ? ( YTPlayer.isBackground ? true : false ) : YTPlayer.opt.autoPlay;
+ YTPlayer.opt.vol = YTPlayer.opt.vol ? YTPlayer.opt.vol : 100;
+ jQuery.mbYTPlayer.getDataFromAPI( YTPlayer );
+ jQuery( YTPlayer ).on( "YTPChanged", function() {
+
+ if( YTPlayer.isInit )
+ return;
+
+ YTPlayer.isInit = true;
+
+ //if is mobile && isPlayer fallback to the default YT player
+ if( jQuery.browser.mobile && YTPlayer.canPlayOnMobile ) {
+ // Try to adjust the player dimention
+ if( YTPlayer.opt.containment.outerWidth() > jQuery( window ).width() ) {
+ YTPlayer.opt.containment.css( {
+ maxWidth: "100%"
+ } );
+ var h = YTPlayer.opt.containment.outerWidth() * .563;
+ YTPlayer.opt.containment.css( {
+ maxHeight: h
+ } );
+ }
+ new YT.Player( playerID, {
+ videoId: YTPlayer.videoID.toString(),
+ width: '100%',
+ height: h,
+ playerVars: playerVars,
+ events: {
+ 'onReady': function( event ) {
+ YTPlayer.player = event.target;
+ playerBox.css( {
+ opacity: 1
+ } );
+ YTPlayer.wrapper.css( {
+ opacity: 1
+ } );
+ }
+ }
+ } );
+ return;
+ }
+
+ new YT.Player( playerID, {
+ videoId: YTPlayer.videoID.toString(),
+ playerVars: playerVars,
+ events: {
+ 'onReady': function( event ) {
+ YTPlayer.player = event.target;
+ if( YTPlayer.isReady ) return;
+ YTPlayer.isReady = YTPlayer.isPlayer && !YTPlayer.opt.autoPlay ? false : true;
+ YTPlayer.playerEl = YTPlayer.player.getIframe();
+
+ jQuery( YTPlayer.playerEl ).unselectable();
+
+ $YTPlayer.optimizeDisplay();
+ jQuery( window ).off( "resize.YTP_" + YTPlayer.id ).on( "resize.YTP_" + YTPlayer.id, function() {
+ $YTPlayer.optimizeDisplay();
+ } );
+
+ jQuery.mbYTPlayer.checkForState( YTPlayer );
+ },
+ /**
+ *
+ * @param event
+ *
+ * -1 (unstarted)
+ * 0 (ended)
+ * 1 (playing)
+ * 2 (paused)
+ * 3 (buffering)
+ * 5 (video cued).
+ *
+ *
+ */
+ 'onStateChange': function( event ) {
+ if( typeof event.target.getPlayerState != "function" ) return;
+ var state = event.target.getPlayerState();
+
+ if( YTPlayer.preventTrigger ) {
+ YTPlayer.preventTrigger = false;
+ return
+ }
+
+ /*
+ if( YTPlayer.state == state )
+ return;
+ */
+
+ YTPlayer.state = state;
+
+ var eventType;
+ switch( state ) {
+ case -1: //----------------------------------------------- unstarted
+ eventType = "YTPUnstarted";
+ break;
+ case 0: //------------------------------------------------ ended
+ eventType = "YTPEnd";
+ break;
+ case 1: //------------------------------------------------ play
+ eventType = "YTPPlay";
+ if( YTPlayer.controlBar.length )
+ YTPlayer.controlBar.find( ".mb_YTPPlaypause" ).html( jQuery.mbYTPlayer.controls.pause );
+ if( typeof _gaq != "undefined" && eval( YTPlayer.opt.gaTrack ) ) _gaq.push( [ '_trackEvent', 'YTPlayer', 'Play', ( YTPlayer.hasData ? YTPlayer.videoData.title : YTPlayer.videoID.toString() ) ] );
+ if( typeof ga != "undefined" && eval( YTPlayer.opt.gaTrack ) ) ga( 'send', 'event', 'YTPlayer', 'play', ( YTPlayer.hasData ? YTPlayer.videoData.title : YTPlayer.videoID.toString() ) );
+ break;
+ case 2: //------------------------------------------------ pause
+ eventType = "YTPPause";
+ if( YTPlayer.controlBar.length )
+ YTPlayer.controlBar.find( ".mb_YTPPlaypause" ).html( jQuery.mbYTPlayer.controls.play );
+ break;
+ case 3: //------------------------------------------------ buffer
+ YTPlayer.player.setPlaybackQuality( YTPlayer.opt.quality );
+ eventType = "YTPBuffering";
+ if( YTPlayer.controlBar.length )
+ YTPlayer.controlBar.find( ".mb_YTPPlaypause" ).html( jQuery.mbYTPlayer.controls.play );
+ break;
+ case 5: //------------------------------------------------ cued
+ eventType = "YTPCued";
+ break;
+ default:
+ break;
+ }
+
+ // Trigger state events
+ var YTPEvent = jQuery.Event( eventType );
+ YTPEvent.time = YTPlayer.currentTime;
+ if( YTPlayer.canTrigger ) jQuery( YTPlayer ).trigger( YTPEvent );
+ },
+ /**
+ *
+ * @param e
+ */
+ 'onPlaybackQualityChange': function( e ) {
+ var quality = e.target.getPlaybackQuality();
+ var YTPQualityChange = jQuery.Event( "YTPQualityChange" );
+ YTPQualityChange.quality = quality;
+ jQuery( YTPlayer ).trigger( YTPQualityChange );
+ },
+ /**
+ *
+ * @param err
+ */
+ 'onError': function( err ) {
+
+ if( err.data == 150 ) {
+ console.log( "Embedding this video is restricted by Youtube." );
+ if( YTPlayer.isPlayList ) jQuery( YTPlayer ).playNext();
+ }
+
+ if( err.data == 2 && YTPlayer.isPlayList )
+ jQuery( YTPlayer ).playNext();
+
+ if( typeof YTPlayer.opt.onError == "function" )
+ YTPlayer.opt.onError( $YTPlayer, err );
+ }
+ }
+ } );
+ } );
+ } );
+
+ $YTPlayer.off( "YTPTime.mask" );
+
+ jQuery.mbYTPlayer.applyMask( YTPlayer );
+
+ } );
+ },
+ /**
+ *
+ * @param YTPlayer
+ */
+ getDataFromAPI: function( YTPlayer ) {
+ YTPlayer.videoData = jQuery.mbStorage.get( "YTPlayer_data_" + YTPlayer.videoID );
+ jQuery( YTPlayer ).off( "YTPData.YTPlayer" ).on( "YTPData.YTPlayer", function() {
+ if( YTPlayer.hasData ) {
+
+ if( YTPlayer.isPlayer && !YTPlayer.opt.autoPlay ) {
+ var bgndURL = YTPlayer.videoData.thumb_max || YTPlayer.videoData.thumb_high || YTPlayer.videoData.thumb_medium;
+ YTPlayer.opt.containment.css( {
+ background: "rgba(0,0,0,0.5) url(" + bgndURL + ") center center",
+ backgroundSize: "cover"
+ } );
+ YTPlayer.opt.backgroundUrl = bgndURL;
+ }
+ }
+ } );
+
+ if( YTPlayer.videoData ) {
+
+ setTimeout( function() {
+ YTPlayer.opt.ratio = YTPlayer.opt.ratio == "auto" ? "16/9" : YTPlayer.opt.ratio;
+ YTPlayer.dataReceived = true;
+ jQuery( YTPlayer ).trigger( "YTPChanged" );
+ var YTPData = jQuery.Event( "YTPData" );
+ YTPData.prop = {};
+ for( var x in YTPlayer.videoData ) YTPData.prop[ x ] = YTPlayer.videoData[ x ];
+ jQuery( YTPlayer ).trigger( YTPData );
+ }, 500 );
+
+ YTPlayer.hasData = true;
+ } else if( jQuery.mbYTPlayer.apiKey ) {
+ // Get video info from API3 (needs api key)
+ // snippet,player,contentDetails,statistics,status
+ jQuery.getJSON( jQuery.mbYTPlayer.locationProtocol + "//www.googleapis.com/youtube/v3/videos?id=" + YTPlayer.videoID + "&key=" + jQuery.mbYTPlayer.apiKey + "&part=snippet", function( data ) {
+ YTPlayer.dataReceived = true;
+ jQuery( YTPlayer ).trigger( "YTPChanged" );
+
+ function parseYTPlayer_data( data ) {
+ YTPlayer.videoData = {};
+ YTPlayer.videoData.id = YTPlayer.videoID;
+ YTPlayer.videoData.channelTitle = data.channelTitle;
+ YTPlayer.videoData.title = data.title;
+ YTPlayer.videoData.description = data.description.length < 400 ? data.description : data.description.substring( 0, 400 ) + " ...";
+ YTPlayer.videoData.aspectratio = YTPlayer.opt.ratio == "auto" ? "16/9" : YTPlayer.opt.ratio;
+ YTPlayer.opt.ratio = YTPlayer.videoData.aspectratio;
+ YTPlayer.videoData.thumb_max = data.thumbnails.maxres ? data.thumbnails.maxres.url : null;
+ YTPlayer.videoData.thumb_high = data.thumbnails.high ? data.thumbnails.high.url : null;
+ YTPlayer.videoData.thumb_medium = data.thumbnails.medium ? data.thumbnails.medium.url : null;
+ jQuery.mbStorage.set( "YTPlayer_data_" + YTPlayer.videoID, YTPlayer.videoData );
+ }
+ parseYTPlayer_data( data.items[ 0 ].snippet );
+ YTPlayer.hasData = true;
+ var YTPData = jQuery.Event( "YTPData" );
+ YTPData.prop = {};
+ for( var x in YTPlayer.videoData ) YTPData.prop[ x ] = YTPlayer.videoData[ x ];
+ jQuery( YTPlayer ).trigger( YTPData );
+ } );
+ } else {
+ setTimeout( function() {
+ jQuery( YTPlayer ).trigger( "YTPChanged" );
+ }, 50 );
+ if( YTPlayer.isPlayer && !YTPlayer.opt.autoPlay ) {
+ var bgndURL = jQuery.mbYTPlayer.locationProtocol + "//i.ytimg.com/vi/" + YTPlayer.videoID + "/hqdefault.jpg";
+ YTPlayer.opt.containment.css( {
+ background: "rgba(0,0,0,0.5) url(" + bgndURL + ") center center",
+ backgroundSize: "cover"
+ } );
+ YTPlayer.opt.backgroundUrl = bgndURL;
+ }
+ YTPlayer.videoData = null;
+ YTPlayer.opt.ratio = YTPlayer.opt.ratio == "auto" ? "16/9" : YTPlayer.opt.ratio;
+ }
+ if( YTPlayer.isPlayer && !YTPlayer.opt.autoPlay && !jQuery.browser.mobile ) {
+ YTPlayer.loading = jQuery( "
" ).addClass( "loading" ).html( "Loading" ).hide();
+ jQuery( YTPlayer ).append( YTPlayer.loading );
+ YTPlayer.loading.fadeIn();
+ }
+ },
+ /**
+ *
+ */
+ removeStoredData: function() {
+ jQuery.mbStorage.remove();
+ },
+ /**
+ *
+ * @returns {*|YTPlayer.videoData}
+ */
+ getVideoData: function() {
+ var YTPlayer = this.get( 0 );
+ return YTPlayer.videoData;
+ },
+ /**
+ *
+ * @returns {*|YTPlayer.videoID|boolean}
+ */
+ getVideoID: function() {
+ var YTPlayer = this.get( 0 );
+ return YTPlayer.videoID || false;
+ },
+ /**
+ *
+ * @param quality
+ */
+ setVideoQuality: function( quality ) {
+ var YTPlayer = this.get( 0 );
+ //if( !jQuery.browser.chrome )
+ YTPlayer.player.setPlaybackQuality( quality );
+ },
+ /**
+ *
+ * @param videos
+ * @param shuffle
+ * @param callback
+ * @param loopList
+ * @returns {jQuery.mbYTPlayer}
+ */
+ playlist: function( videos, shuffle, callback, loopList ) {
+ var $YTPlayer = this;
+ var YTPlayer = $YTPlayer.get( 0 );
+ YTPlayer.isPlayList = true;
+ if( shuffle ) videos = jQuery.shuffle( videos );
+ if( !YTPlayer.videoID ) {
+ YTPlayer.videos = videos;
+ YTPlayer.videoCounter = 0;
+ YTPlayer.videoLength = videos.length;
+ jQuery( YTPlayer ).data( "property", videos[ 0 ] );
+ jQuery( YTPlayer ).mb_YTPlayer();
+ }
+ if( typeof callback == "function" ) jQuery( YTPlayer ).one( "YTPChanged", function() {
+ callback( YTPlayer );
+ } );
+ jQuery( YTPlayer ).on( "YTPEnd", function() {
+ loopList = typeof loopList == "undefined" ? true : loopList;
+ jQuery( YTPlayer ).playNext( loopList );
+ } );
+ return $YTPlayer;
+ },
+ /**
+ *
+ * @returns {jQuery.mbYTPlayer}
+ */
+ playNext: function( loopList ) {
+ var YTPlayer = this.get( 0 );
+
+ if( YTPlayer.checkForStartAt ) {
+ clearTimeout( YTPlayer.checkForStartAt );
+ clearInterval( YTPlayer.getState );
+ }
+
+ YTPlayer.videoCounter++;
+ if( YTPlayer.videoCounter >= YTPlayer.videoLength && loopList )
+ YTPlayer.videoCounter = 0;
+
+ if( YTPlayer.videoCounter < YTPlayer.videoLength )
+ jQuery( YTPlayer ).changeMovie( YTPlayer.videos[ YTPlayer.videoCounter ] );
+ else
+ YTPlayer.videoCounter--;
+
+ return this;
+ },
+ /**
+ *
+ * @returns {jQuery.mbYTPlayer}
+ */
+ playPrev: function() {
+ var YTPlayer = this.get( 0 );
+
+ if( YTPlayer.checkForStartAt ) {
+ clearInterval( YTPlayer.checkForStartAt );
+ clearInterval( YTPlayer.getState );
+ }
+
+ YTPlayer.videoCounter--;
+ if( YTPlayer.videoCounter < 0 ) YTPlayer.videoCounter = YTPlayer.videoLength - 1;
+ jQuery( YTPlayer ).changeMovie( YTPlayer.videos[ YTPlayer.videoCounter ] );
+ return this;
+ },
+ /**
+ *
+ * @returns {jQuery.mbYTPlayer}
+ */
+ playIndex: function( idx ) {
+ var YTPlayer = this.get( 0 );
+
+ idx = idx - 1;
+
+ if( YTPlayer.checkForStartAt ) {
+ clearInterval( YTPlayer.checkForStartAt );
+ clearInterval( YTPlayer.getState );
+ }
+
+ YTPlayer.videoCounter = idx;
+ if( YTPlayer.videoCounter >= YTPlayer.videoLength - 1 )
+ YTPlayer.videoCounter = YTPlayer.videoLength - 1;
+ jQuery( YTPlayer ).changeMovie( YTPlayer.videos[ YTPlayer.videoCounter ] );
+ return this;
+ },
+ /**
+ *
+ * @param opt
+ */
+ changeMovie: function( opt ) {
+
+ var $YTPlayer = this;
+ var YTPlayer = $YTPlayer.get( 0 );
+ YTPlayer.opt.startAt = 0;
+ YTPlayer.opt.stopAt = 0;
+ YTPlayer.opt.mask = false;
+ YTPlayer.opt.mute = true;
+ YTPlayer.hasData = false;
+ YTPlayer.hasChanged = true;
+ YTPlayer.player.loopTime = undefined;
+
+ if( opt )
+ jQuery.extend( YTPlayer.opt, opt ); //YTPlayer.defaultOpt,
+ YTPlayer.videoID = getYTPVideoID( YTPlayer.opt.videoURL ).videoID;
+
+ if( YTPlayer.opt.loop == "true" )
+ YTPlayer.opt.loop = 9999;
+
+ jQuery( YTPlayer.playerEl ).CSSAnimate( {
+ opacity: 0
+ }, 200, function() {
+
+ var YTPChangeMovie = jQuery.Event( "YTPChangeMovie" );
+ YTPChangeMovie.time = YTPlayer.currentTime;
+ YTPChangeMovie.videoId = YTPlayer.videoID;
+ jQuery( YTPlayer ).trigger( YTPChangeMovie );
+
+ jQuery( YTPlayer ).YTPGetPlayer().cueVideoByUrl( encodeURI( jQuery.mbYTPlayer.locationProtocol + "//www.youtube.com/v/" + YTPlayer.videoID ), 1, YTPlayer.opt.quality );
+ jQuery( YTPlayer ).optimizeDisplay();
+
+ jQuery.mbYTPlayer.checkForState( YTPlayer );
+ jQuery.mbYTPlayer.getDataFromAPI( YTPlayer );
+
+ } );
+
+ jQuery.mbYTPlayer.applyMask( YTPlayer );
+ },
+ /**
+ *
+ * @returns {player}
+ */
+ getPlayer: function() {
+ return jQuery( this ).get( 0 ).player;
+ },
+
+ playerDestroy: function() {
+ var YTPlayer = this.get( 0 );
+ ytp.YTAPIReady = true;
+ ytp.backgroundIsInited = false;
+ YTPlayer.isInit = false;
+ YTPlayer.videoID = null;
+ var playerBox = YTPlayer.wrapper;
+ playerBox.remove();
+ jQuery( "#controlBar_" + YTPlayer.id ).remove();
+ clearInterval( YTPlayer.checkForStartAt );
+ clearInterval( YTPlayer.getState );
+ return this;
+ },
+
+ /**
+ *
+ * @param real
+ * @returns {jQuery.mbYTPlayer}
+ */
+ fullscreen: function( real ) {
+ var YTPlayer = this.get( 0 );
+ if( typeof real == "undefined" ) real = YTPlayer.opt.realfullscreen;
+ real = eval( real );
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
+ var fullScreenBtn = controls.find( ".mb_OnlyYT" );
+ var videoWrapper = YTPlayer.isSelf ? YTPlayer.opt.containment : YTPlayer.wrapper;
+ //var videoWrapper = YTPlayer.wrapper;
+ if( real ) {
+ var fullscreenchange = jQuery.browser.mozilla ? "mozfullscreenchange" : jQuery.browser.webkit ? "webkitfullscreenchange" : "fullscreenchange";
+ jQuery( document ).off( fullscreenchange ).on( fullscreenchange, function() {
+ var isFullScreen = RunPrefixMethod( document, "IsFullScreen" ) || RunPrefixMethod( document, "FullScreen" );
+ if( !isFullScreen ) {
+ YTPlayer.isAlone = false;
+ fullScreenBtn.html( jQuery.mbYTPlayer.controls.onlyYT );
+ jQuery( YTPlayer ).YTPSetVideoQuality( YTPlayer.opt.quality );
+ videoWrapper.removeClass( "YTPFullscreen" );
+ videoWrapper.CSSAnimate( {
+ opacity: YTPlayer.opt.opacity
+ }, 500 );
+ videoWrapper.css( {
+ zIndex: 0
+ } );
+ if( YTPlayer.isBackground ) {
+ jQuery( "body" ).after( controls );
+ } else {
+ YTPlayer.wrapper.before( controls );
+ }
+ jQuery( window ).resize();
+ jQuery( YTPlayer ).trigger( "YTPFullScreenEnd" );
+ } else {
+ jQuery( YTPlayer ).YTPSetVideoQuality( "default" );
+ jQuery( YTPlayer ).trigger( "YTPFullScreenStart" );
+ }
+ } );
+ }
+ if( !YTPlayer.isAlone ) {
+ function hideMouse() {
+ YTPlayer.overlay.css( {
+ cursor: "none"
+ } );
+ }
+ jQuery( document ).on( "mousemove.YTPlayer", function( e ) {
+ YTPlayer.overlay.css( {
+ cursor: "auto"
+ } );
+ clearTimeout( YTPlayer.hideCursor );
+ if( !jQuery( e.target ).parents().is( ".mb_YTPBar" ) ) YTPlayer.hideCursor = setTimeout( hideMouse, 3000 );
+ } );
+ hideMouse();
+ if( real ) {
+ videoWrapper.css( {
+ opacity: 0
+ } );
+ videoWrapper.addClass( "YTPFullscreen" );
+ launchFullscreen( videoWrapper.get( 0 ) );
+ setTimeout( function() {
+ videoWrapper.CSSAnimate( {
+ opacity: 1
+ }, 1000 );
+ YTPlayer.wrapper.append( controls );
+ jQuery( YTPlayer ).optimizeDisplay();
+ YTPlayer.player.seekTo( YTPlayer.player.getCurrentTime() + .1, true );
+ }, 500 )
+ } else videoWrapper.css( {
+ zIndex: 10000
+ } ).CSSAnimate( {
+ opacity: 1
+ }, 1000 );
+ fullScreenBtn.html( jQuery.mbYTPlayer.controls.showSite );
+ YTPlayer.isAlone = true;
+ } else {
+ jQuery( document ).off( "mousemove.YTPlayer" );
+ clearTimeout( YTPlayer.hideCursor );
+ YTPlayer.overlay.css( {
+ cursor: "auto"
+ } );
+ if( real ) {
+ cancelFullscreen();
+ } else {
+ videoWrapper.CSSAnimate( {
+ opacity: YTPlayer.opt.opacity
+ }, 500 );
+ videoWrapper.css( {
+ zIndex: 0
+ } );
+ }
+ fullScreenBtn.html( jQuery.mbYTPlayer.controls.onlyYT );
+ YTPlayer.isAlone = false;
+ }
+
+ function RunPrefixMethod( obj, method ) {
+ var pfx = [ "webkit", "moz", "ms", "o", "" ];
+ var p = 0,
+ m, t;
+ while( p < pfx.length && !obj[ m ] ) {
+ m = method;
+ if( pfx[ p ] == "" ) {
+ m = m.substr( 0, 1 ).toLowerCase() + m.substr( 1 );
+ }
+ m = pfx[ p ] + m;
+ t = typeof obj[ m ];
+ if( t != "undefined" ) {
+ pfx = [ pfx[ p ] ];
+ return( t == "function" ? obj[ m ]() : obj[ m ] );
+ }
+ p++;
+ }
+ }
+
+ function launchFullscreen( element ) {
+ RunPrefixMethod( element, "RequestFullScreen" );
+ }
+
+ function cancelFullscreen() {
+ if( RunPrefixMethod( document, "FullScreen" ) || RunPrefixMethod( document, "IsFullScreen" ) ) {
+ RunPrefixMethod( document, "CancelFullScreen" );
+ }
+ }
+ return this;
+ },
+ /**
+ *
+ * @returns {jQuery.mbYTPlayer}
+ */
+ toggleLoops: function() {
+ var YTPlayer = this.get( 0 );
+ var data = YTPlayer.opt;
+ if( data.loop == 1 ) {
+ data.loop = 0;
+ } else {
+ if( data.startAt ) {
+ YTPlayer.player.seekTo( data.startAt );
+ } else {
+ YTPlayer.player.playVideo();
+ }
+ data.loop = 1;
+ }
+ return this;
+ },
+ /**
+ *
+ * @returns {jQuery.mbYTPlayer}
+ */
+ play: function() {
+ var YTPlayer = this.get( 0 );
+ if( !YTPlayer.isReady )
+ return this;
+
+ YTPlayer.player.playVideo();
+ YTPlayer.wrapper.CSSAnimate( {
+ opacity: YTPlayer.isAlone ? 1 : YTPlayer.opt.opacity
+ }, 2000 );
+
+ jQuery( YTPlayer.playerEl ).CSSAnimate( {
+ opacity: 1
+ }, 1000 );
+
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
+ var playBtn = controls.find( ".mb_YTPPlaypause" );
+ playBtn.html( jQuery.mbYTPlayer.controls.pause );
+ YTPlayer.state = 1;
+
+ jQuery( YTPlayer ).css( "background-image", "none" );
+ return this;
+ },
+ /**
+ *
+ * @param callback
+ * @returns {jQuery.mbYTPlayer}
+ */
+ togglePlay: function( callback ) {
+ var YTPlayer = this.get( 0 );
+ if( YTPlayer.state == 1 )
+ this.YTPPause();
+ else
+ this.YTPPlay();
+
+ if( typeof callback == "function" )
+ callback( YTPlayer.state );
+
+ return this;
+ },
+ /**
+ *
+ * @returns {jQuery.mbYTPlayer}
+ */
+ stop: function() {
+ var YTPlayer = this.get( 0 );
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
+ var playBtn = controls.find( ".mb_YTPPlaypause" );
+ playBtn.html( jQuery.mbYTPlayer.controls.play );
+ YTPlayer.player.stopVideo();
+ return this;
+ },
+ /**
+ *
+ * @returns {jQuery.mbYTPlayer}
+ */
+ pause: function() {
+ var YTPlayer = this.get( 0 );
+ YTPlayer.player.pauseVideo();
+ YTPlayer.state = 2;
+ return this;
+ },
+ /**
+ *
+ * @param val
+ * @returns {jQuery.mbYTPlayer}
+ */
+ seekTo: function( val ) {
+ var YTPlayer = this.get( 0 );
+ YTPlayer.player.seekTo( val, true );
+ return this;
+ },
+ /**
+ *
+ * @param val
+ * @returns {jQuery.mbYTPlayer}
+ */
+ setVolume: function( val ) {
+ var YTPlayer = this.get( 0 );
+ if( !val && !YTPlayer.opt.vol && YTPlayer.player.getVolume() == 0 ) jQuery( YTPlayer ).YTPUnmute();
+ else if( ( !val && YTPlayer.player.getVolume() > 0 ) || ( val && YTPlayer.opt.vol == val ) ) {
+ if( !YTPlayer.isMute ) jQuery( YTPlayer ).YTPMute();
+ else jQuery( YTPlayer ).YTPUnmute();
+ } else {
+ YTPlayer.opt.vol = val;
+ YTPlayer.player.setVolume( YTPlayer.opt.vol );
+ if( YTPlayer.volumeBar && YTPlayer.volumeBar.length ) YTPlayer.volumeBar.updateSliderVal( val )
+ }
+ return this;
+ },
+ /**
+ *
+ * @returns {boolean}
+ */
+ toggleVolume: function() {
+ var YTPlayer = this.get( 0 );
+ if( !YTPlayer ) return;
+ if( YTPlayer.player.isMuted() ) {
+ jQuery( YTPlayer ).YTPUnmute();
+ return true;
+ } else {
+ jQuery( YTPlayer ).YTPMute();
+ return false;
+ }
+ },
+ /**
+ *
+ * @returns {jQuery.mbYTPlayer}
+ */
+ mute: function() {
+ var YTPlayer = this.get( 0 );
+ if( YTPlayer.isMute ) return;
+ YTPlayer.player.mute();
+ YTPlayer.isMute = true;
+ YTPlayer.player.setVolume( 0 );
+ if( YTPlayer.volumeBar && YTPlayer.volumeBar.length && YTPlayer.volumeBar.width() > 10 ) {
+ YTPlayer.volumeBar.updateSliderVal( 0 );
+ }
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
+ var muteBtn = controls.find( ".mb_YTPMuteUnmute" );
+ muteBtn.html( jQuery.mbYTPlayer.controls.unmute );
+ jQuery( YTPlayer ).addClass( "isMuted" );
+ if( YTPlayer.volumeBar && YTPlayer.volumeBar.length ) YTPlayer.volumeBar.addClass( "muted" );
+ var YTPEvent = jQuery.Event( "YTPMuted" );
+ YTPEvent.time = YTPlayer.currentTime;
+ if( YTPlayer.canTrigger ) jQuery( YTPlayer ).trigger( YTPEvent );
+ return this;
+ },
+ /**
+ *
+ * @returns {jQuery.mbYTPlayer}
+ */
+ unmute: function() {
+ var YTPlayer = this.get( 0 );
+ if( !YTPlayer.isMute ) return;
+ YTPlayer.player.unMute();
+ YTPlayer.isMute = false;
+ YTPlayer.player.setVolume( YTPlayer.opt.vol );
+ if( YTPlayer.volumeBar && YTPlayer.volumeBar.length ) YTPlayer.volumeBar.updateSliderVal( YTPlayer.opt.vol > 10 ? YTPlayer.opt.vol : 10 );
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
+ var muteBtn = controls.find( ".mb_YTPMuteUnmute" );
+ muteBtn.html( jQuery.mbYTPlayer.controls.mute );
+ jQuery( YTPlayer ).removeClass( "isMuted" );
+ if( YTPlayer.volumeBar && YTPlayer.volumeBar.length ) YTPlayer.volumeBar.removeClass( "muted" );
+ var YTPEvent = jQuery.Event( "YTPUnmuted" );
+ YTPEvent.time = YTPlayer.currentTime;
+ if( YTPlayer.canTrigger ) jQuery( YTPlayer ).trigger( YTPEvent );
+ return this;
+ },
+ /**
+ * FILTERS
+ *
+ *
+ * @param filter
+ * @param value
+ * @returns {jQuery.mbYTPlayer}
+ */
+ applyFilter: function( filter, value ) {
+ return this.each( function() {
+ var YTPlayer = this;
+ YTPlayer.filters[ filter ].value = value;
+ if( YTPlayer.filtersEnabled )
+ jQuery( YTPlayer ).YTPEnableFilters();
+ } );
+ },
+ /**
+ *
+ * @param filters
+ * @returns {jQuery.mbYTPlayer}
+ */
+ applyFilters: function( filters ) {
+ return this.each( function() {
+ var YTPlayer = this;
+ if( !YTPlayer.isReady ) {
+ jQuery( YTPlayer ).on( "YTPReady", function() {
+ jQuery( YTPlayer ).YTPApplyFilters( filters );
+ } );
+ return;
+ }
+
+ for( var key in filters )
+ jQuery( YTPlayer ).YTPApplyFilter( key, filters[ key ] );
+
+ jQuery( YTPlayer ).trigger( "YTPFiltersApplied" );
+ } );
+ },
+ /**
+ *
+ * @param filter
+ * @param value
+ * @returns {*}
+ */
+ toggleFilter: function( filter, value ) {
+ return this.each( function() {
+ var YTPlayer = this;
+ if( !YTPlayer.filters[ filter ].value ) YTPlayer.filters[ filter ].value = value;
+ else YTPlayer.filters[ filter ].value = 0;
+ if( YTPlayer.filtersEnabled ) jQuery( this ).YTPEnableFilters();
+ } );
+ },
+ /**
+ *
+ * @param callback
+ * @returns {*}
+ */
+ toggleFilters: function( callback ) {
+ return this.each( function() {
+ var YTPlayer = this;
+ if( YTPlayer.filtersEnabled ) {
+ jQuery( YTPlayer ).trigger( "YTPDisableFilters" );
+ jQuery( YTPlayer ).YTPDisableFilters();
+ } else {
+ jQuery( YTPlayer ).YTPEnableFilters();
+ jQuery( YTPlayer ).trigger( "YTPEnableFilters" );
+ }
+ if( typeof callback == "function" )
+ callback( YTPlayer.filtersEnabled );
+ } )
+ },
+ /**
+ *
+ * @returns {*}
+ */
+ disableFilters: function() {
+ return this.each( function() {
+ var YTPlayer = this;
+ var iframe = jQuery( YTPlayer.playerEl );
+ iframe.css( "-webkit-filter", "" );
+ iframe.css( "filter", "" );
+ YTPlayer.filtersEnabled = false;
+ } )
+ },
+ /**
+ *
+ * @returns {*}
+ */
+ enableFilters: function() {
+ return this.each( function() {
+ var YTPlayer = this;
+ var iframe = jQuery( YTPlayer.playerEl );
+ var filterStyle = "";
+ for( var key in YTPlayer.filters ) {
+ if( YTPlayer.filters[ key ].value )
+ filterStyle += key.replace( "_", "-" ) + "(" + YTPlayer.filters[ key ].value + YTPlayer.filters[ key ].unit + ") ";
+ }
+ iframe.css( "-webkit-filter", filterStyle );
+ iframe.css( "filter", filterStyle );
+ YTPlayer.filtersEnabled = true;
+ } );
+ },
+ /**
+ *
+ * @param filter
+ * @param callback
+ * @returns {*}
+ */
+ removeFilter: function( filter, callback ) {
+ return this.each( function() {
+ var YTPlayer = this;
+ if( typeof filter == "function" ) {
+ callback = filter;
+ filter = null;
+ }
+ if( !filter )
+ for( var key in YTPlayer.filters ) {
+ jQuery( this ).YTPApplyFilter( key, 0 );
+ if( typeof callback == "function" ) callback( key );
+ } else {
+ jQuery( this ).YTPApplyFilter( filter, 0 );
+ if( typeof callback == "function" ) callback( filter );
+ }
+ } );
+
+ },
+ /**
+ *
+ * @returns {*}
+ */
+ getFilters: function() {
+ var YTPlayer = this.get( 0 );
+ return YTPlayer.filters;
+ },
+ /**
+ * MASK
+ *
+ *
+ * @param mask
+ * @returns {jQuery.mbYTPlayer}
+ */
+ addMask: function( mask ) {
+ var YTPlayer = this.get( 0 );
+ var overlay = YTPlayer.overlay;
+
+ if( !mask ) {
+ mask = YTPlayer.actualMask;
+ }
+
+ var tempImg = jQuery( " " ).attr( "src", mask ).on( "load", function() {
+
+ overlay.CSSAnimate( {
+ opacity: 0
+ }, 500, function() {
+
+ YTPlayer.hasMask = true;
+
+ tempImg.remove();
+
+ overlay.css( {
+ backgroundImage: "url(" + mask + ")",
+ backgroundRepeat: "no-repeat",
+ backgroundPosition: "center center",
+ backgroundSize: "cover"
+ } );
+
+ overlay.CSSAnimate( {
+ opacity: 1
+ }, 500 );
+
+ } );
+
+ } );
+
+ return this;
+
+ },
+ /**
+ *
+ * @returns {jQuery.mbYTPlayer}
+ */
+ removeMask: function() {
+ var YTPlayer = this.get( 0 );
+ var overlay = YTPlayer.overlay;
+ overlay.CSSAnimate( {
+ opacity: 0
+ }, 500, function() {
+
+ YTPlayer.hasMask = false;
+
+ overlay.css( {
+ backgroundImage: "",
+ backgroundRepeat: "",
+ backgroundPosition: "",
+ backgroundSize: ""
+ } );
+ overlay.CSSAnimate( {
+ opacity: 1
+ }, 500 );
+
+ } );
+
+ return this;
+
+ },
+ /**
+ *
+ * @param YTPlayer
+ */
+ applyMask: function( YTPlayer ) {
+ var $YTPlayer = jQuery( YTPlayer );
+ $YTPlayer.off( "YTPTime.mask" );
+
+ if( YTPlayer.opt.mask ) {
+
+ if( typeof YTPlayer.opt.mask == "string" ) {
+ $YTPlayer.YTPAddMask( YTPlayer.opt.mask );
+
+ YTPlayer.actualMask = YTPlayer.opt.mask;
+
+ } else if( typeof YTPlayer.opt.mask == "object" ) {
+
+ for( var time in YTPlayer.opt.mask ) {
+ if( YTPlayer.opt.mask[ time ] )
+ var img = jQuery( " " ).attr( "src", YTPlayer.opt.mask[ time ] );
+ }
+
+ if( YTPlayer.opt.mask[ 0 ] )
+ $YTPlayer.YTPAddMask( YTPlayer.opt.mask[ 0 ] );
+
+ $YTPlayer.on( "YTPTime.mask", function( e ) {
+ for( var time in YTPlayer.opt.mask ) {
+ if( e.time == time )
+ if( !YTPlayer.opt.mask[ time ] ) {
+ $YTPlayer.YTPRemoveMask();
+ } else {
+
+ $YTPlayer.YTPAddMask( YTPlayer.opt.mask[ time ] );
+ YTPlayer.actualMask = YTPlayer.opt.mask[ time ];
+ }
+
+ }
+ } );
+
+ }
+
+
+ }
+ },
+ /**
+ *
+ */
+ toggleMask: function() {
+ var YTPlayer = this.get( 0 );
+ var $YTPlayer = $( YTPlayer );
+ if( YTPlayer.hasMask )
+ $YTPlayer.YTPRemoveMask();
+ else
+ $YTPlayer.YTPAddMask();
+
+ return this;
+ },
+ /**
+ *
+ * @returns {{totalTime: number, currentTime: number}}
+ */
+ manageProgress: function() {
+ var YTPlayer = this.get( 0 );
+ var controls = jQuery( "#controlBar_" + YTPlayer.id );
+ var progressBar = controls.find( ".mb_YTPProgress" );
+ var loadedBar = controls.find( ".mb_YTPLoaded" );
+ var timeBar = controls.find( ".mb_YTPseekbar" );
+ var totW = progressBar.outerWidth();
+ var currentTime = Math.floor( YTPlayer.player.getCurrentTime() );
+ var totalTime = Math.floor( YTPlayer.player.getDuration() );
+ var timeW = ( currentTime * totW ) / totalTime;
+ var startLeft = 0;
+ var loadedW = YTPlayer.player.getVideoLoadedFraction() * 100;
+ loadedBar.css( {
+ left: startLeft,
+ width: loadedW + "%"
+ } );
+ timeBar.css( {
+ left: 0,
+ width: timeW
+ } );
+ return {
+ totalTime: totalTime,
+ currentTime: currentTime
+ };
+ },
+ /**
+ *
+ * @param YTPlayer
+ */
+ buildControls: function( YTPlayer ) {
+ var data = YTPlayer.opt;
+ // @data.printUrl: is deprecated; use data.showYTLogo
+ data.showYTLogo = data.showYTLogo || data.printUrl;
+
+ if( jQuery( "#controlBar_" + YTPlayer.id ).length )
+ return;
+ YTPlayer.controlBar = jQuery( " " ).attr( "id", "controlBar_" + YTPlayer.id ).addClass( "mb_YTPBar" ).css( {
+ whiteSpace: "noWrap",
+ position: YTPlayer.isBackground ? "fixed" : "absolute",
+ zIndex: YTPlayer.isBackground ? 10000 : 1000
+ } ).hide();
+ var buttonBar = jQuery( "
" ).addClass( "buttonBar" );
+ /* play/pause button*/
+ var playpause = jQuery( "" + jQuery.mbYTPlayer.controls.play + " " ).addClass( "mb_YTPPlaypause ytpicon" ).click( function() {
+ if( YTPlayer.player.getPlayerState() == 1 ) jQuery( YTPlayer ).YTPPause();
+ else jQuery( YTPlayer ).YTPPlay();
+ } );
+ /* mute/unmute button*/
+ var MuteUnmute = jQuery( "" + jQuery.mbYTPlayer.controls.mute + " " ).addClass( "mb_YTPMuteUnmute ytpicon" ).click( function() {
+ if( YTPlayer.player.getVolume() == 0 ) {
+ jQuery( YTPlayer ).YTPUnmute();
+ } else {
+ jQuery( YTPlayer ).YTPMute();
+ }
+ } );
+ /* volume bar*/
+ var volumeBar = jQuery( "
" ).addClass( "mb_YTPVolumeBar" ).css( {
+ display: "inline-block"
+ } );
+ YTPlayer.volumeBar = volumeBar;
+ /* time elapsed */
+ var idx = jQuery( " " ).addClass( "mb_YTPTime" );
+ var vURL = data.videoURL ? data.videoURL : "";
+ if( vURL.indexOf( "http" ) < 0 ) vURL = jQuery.mbYTPlayer.locationProtocol + "//www.youtube.com/watch?v=" + data.videoURL;
+ var movieUrl = jQuery( " " ).html( jQuery.mbYTPlayer.controls.ytLogo ).addClass( "mb_YTPUrl ytpicon" ).attr( "title", "view on YouTube" ).on( "click", function() {
+ window.open( vURL, "viewOnYT" )
+ } );
+ var onlyVideo = jQuery( " " ).html( jQuery.mbYTPlayer.controls.onlyYT ).addClass( "mb_OnlyYT ytpicon" ).on( "click", function() {
+ jQuery( YTPlayer ).YTPFullscreen( data.realfullscreen );
+ } );
+ var progressBar = jQuery( "
" ).addClass( "mb_YTPProgress" ).css( "position", "absolute" ).click( function( e ) {
+ timeBar.css( {
+ width: ( e.clientX - timeBar.offset().left )
+ } );
+ YTPlayer.timeW = e.clientX - timeBar.offset().left;
+ YTPlayer.controlBar.find( ".mb_YTPLoaded" ).css( {
+ width: 0
+ } );
+ var totalTime = Math.floor( YTPlayer.player.getDuration() );
+ YTPlayer.goto = ( timeBar.outerWidth() * totalTime ) / progressBar.outerWidth();
+ YTPlayer.player.seekTo( parseFloat( YTPlayer.goto ), true );
+ YTPlayer.controlBar.find( ".mb_YTPLoaded" ).css( {
+ width: 0
+ } );
+ } );
+ var loadedBar = jQuery( "
" ).addClass( "mb_YTPLoaded" ).css( "position", "absolute" );
+ var timeBar = jQuery( "
" ).addClass( "mb_YTPseekbar" ).css( "position", "absolute" );
+ progressBar.append( loadedBar ).append( timeBar );
+ buttonBar.append( playpause ).append( MuteUnmute ).append( volumeBar ).append( idx );
+ if( data.showYTLogo ) {
+ buttonBar.append( movieUrl );
+ }
+ if( YTPlayer.isBackground || ( eval( YTPlayer.opt.realfullscreen ) && !YTPlayer.isBackground ) ) buttonBar.append( onlyVideo );
+ YTPlayer.controlBar.append( buttonBar ).append( progressBar );
+ if( !YTPlayer.isBackground ) {
+ YTPlayer.controlBar.addClass( "inlinePlayer" );
+ YTPlayer.wrapper.before( YTPlayer.controlBar );
+ } else {
+ jQuery( "body" ).after( YTPlayer.controlBar );
+ }
+ volumeBar.simpleSlider( {
+ initialval: YTPlayer.opt.vol,
+ scale: 100,
+ orientation: "h",
+ callback: function( el ) {
+ if( el.value == 0 ) {
+ jQuery( YTPlayer ).YTPMute();
+ } else {
+ jQuery( YTPlayer ).YTPUnmute();
+ }
+ YTPlayer.player.setVolume( el.value );
+ if( !YTPlayer.isMute ) YTPlayer.opt.vol = el.value;
+ }
+ } );
+ },
+ /**
+ *
+ * @param YTPlayer
+ */
+ checkForState: function( YTPlayer ) {
+ var interval = YTPlayer.opt.showControls ? 100 : 400;
+ clearInterval( YTPlayer.getState );
+ //Checking if player has been removed from scene
+ if( !jQuery.contains( document, YTPlayer ) ) {
+ jQuery( YTPlayer ).YTPPlayerDestroy();
+ clearInterval( YTPlayer.getState );
+ clearInterval( YTPlayer.checkForStartAt );
+ return;
+ }
+
+ jQuery.mbYTPlayer.checkForStart( YTPlayer );
+
+ YTPlayer.getState = setInterval( function() {
+ var prog = jQuery( YTPlayer ).YTPManageProgress();
+ var $YTPlayer = jQuery( YTPlayer );
+ var data = YTPlayer.opt;
+ var startAt = YTPlayer.opt.startAt ? YTPlayer.opt.startAt : 1;
+ var stopAt = YTPlayer.opt.stopAt > YTPlayer.opt.startAt ? YTPlayer.opt.stopAt : 0;
+ stopAt = stopAt < YTPlayer.player.getDuration() ? stopAt : 0;
+ if( YTPlayer.currentTime != prog.currentTime ) {
+
+ var YTPEvent = jQuery.Event( "YTPTime" );
+ YTPEvent.time = YTPlayer.currentTime;
+ jQuery( YTPlayer ).trigger( YTPEvent );
+
+ }
+ YTPlayer.currentTime = prog.currentTime;
+ YTPlayer.totalTime = YTPlayer.player.getDuration();
+ if( YTPlayer.player.getVolume() == 0 ) $YTPlayer.addClass( "isMuted" );
+ else $YTPlayer.removeClass( "isMuted" );
+
+ if( YTPlayer.opt.showControls )
+ if( prog.totalTime ) {
+ YTPlayer.controlBar.find( ".mb_YTPTime" ).html( jQuery.mbYTPlayer.formatTime( prog.currentTime ) + " / " + jQuery.mbYTPlayer.formatTime( prog.totalTime ) );
+ } else {
+ YTPlayer.controlBar.find( ".mb_YTPTime" ).html( "-- : -- / -- : --" );
+ }
+
+ if( eval( YTPlayer.opt.stopMovieOnBlur ) ) {
+ if( !document.hasFocus() ) {
+ if( YTPlayer.state == 1 ) {
+ YTPlayer.hasFocus = false;
+ $YTPlayer.YTPPause();
+ }
+ } else if( document.hasFocus() && !YTPlayer.hasFocus && !( YTPlayer.state == -1 || YTPlayer.state == 0 ) ) {
+ YTPlayer.hasFocus = true;
+ $YTPlayer.YTPPlay();
+ }
+ }
+
+ if( YTPlayer.controlBar.length && YTPlayer.controlBar.outerWidth() <= 400 && !YTPlayer.isCompact ) {
+ YTPlayer.controlBar.addClass( "compact" );
+ YTPlayer.isCompact = true;
+ if( !YTPlayer.isMute && YTPlayer.volumeBar ) YTPlayer.volumeBar.updateSliderVal( YTPlayer.opt.vol );
+ } else if( YTPlayer.controlBar.length && YTPlayer.controlBar.outerWidth() > 400 && YTPlayer.isCompact ) {
+ YTPlayer.controlBar.removeClass( "compact" );
+ YTPlayer.isCompact = false;
+ if( !YTPlayer.isMute && YTPlayer.volumeBar ) YTPlayer.volumeBar.updateSliderVal( YTPlayer.opt.vol );
+ }
+ if( YTPlayer.player.getPlayerState() == 1 && ( parseFloat( YTPlayer.player.getDuration() - 1.5 ) < YTPlayer.player.getCurrentTime() || ( stopAt > 0 && parseFloat( YTPlayer.player.getCurrentTime() ) > stopAt ) ) ) {
+ if( YTPlayer.isEnded ) return;
+ YTPlayer.isEnded = true;
+ setTimeout( function() {
+ YTPlayer.isEnded = false
+ }, 1000 );
+
+ if( YTPlayer.isPlayList ) {
+
+ if( !data.loop || ( data.loop > 0 && YTPlayer.player.loopTime === data.loop - 1 ) ) {
+
+ YTPlayer.player.loopTime = undefined;
+ clearInterval( YTPlayer.getState );
+ var YTPEnd = jQuery.Event( "YTPEnd" );
+ YTPEnd.time = YTPlayer.currentTime;
+ jQuery( YTPlayer ).trigger( YTPEnd );
+ //YTPlayer.state = 0;
+
+ return;
+ }
+
+ } else if( !data.loop || ( data.loop > 0 && YTPlayer.player.loopTime === data.loop - 1 ) ) {
+
+ YTPlayer.player.loopTime = undefined;
+ YTPlayer.preventTrigger = true;
+ YTPlayer.state = 2;
+ jQuery( YTPlayer ).YTPPause();
+
+ YTPlayer.wrapper.CSSAnimate( {
+ opacity: 0
+ }, 500, function() {
+
+ if( YTPlayer.controlBar.length )
+ YTPlayer.controlBar.find( ".mb_YTPPlaypause" ).html( jQuery.mbYTPlayer.controls.play );
+
+ var YTPEnd = jQuery.Event( "YTPEnd" );
+ YTPEnd.time = YTPlayer.currentTime;
+ jQuery( YTPlayer ).trigger( YTPEnd );
+
+ YTPlayer.player.seekTo( startAt, true );
+ if( !YTPlayer.isBackground ) {
+ YTPlayer.opt.containment.css( {
+ background: "rgba(0,0,0,0.5) url(" + YTPlayer.opt.backgroundUrl + ") center center",
+ backgroundSize: "cover"
+ } );
+ }
+ } );
+
+ return;
+
+ }
+
+ YTPlayer.player.loopTime = YTPlayer.player.loopTime ? ++YTPlayer.player.loopTime : 1;
+ startAt = startAt || 1;
+ YTPlayer.preventTrigger = true;
+ YTPlayer.state = 2;
+ jQuery( YTPlayer ).YTPPause();
+ YTPlayer.player.seekTo( startAt, true );
+ $YTPlayer.YTPPlay();
+
+
+ }
+ }, interval );
+ },
+ /**
+ *
+ * @returns {string} time
+ */
+ getTime: function() {
+ var YTPlayer = this.get( 0 );
+ return jQuery.mbYTPlayer.formatTime( YTPlayer.currentTime );
+ },
+ /**
+ *
+ * @returns {string} total time
+ */
+ getTotalTime: function() {
+ var YTPlayer = this.get( 0 );
+ return jQuery.mbYTPlayer.formatTime( YTPlayer.totalTime );
+ },
+ /**
+ *
+ * @param YTPlayer
+ */
+ checkForStart: function( YTPlayer ) {
+
+ var $YTPlayer = jQuery( YTPlayer );
+
+ //Checking if player has been removed from scene
+ if( !jQuery.contains( document, YTPlayer ) ) {
+ jQuery( YTPlayer ).YTPPlayerDestroy();
+ return
+ }
+
+ /*
+ if( jQuery.browser.chrome )
+ YTPlayer.opt.quality = "default";
+ */
+
+ YTPlayer.preventTrigger = true;
+ YTPlayer.state = 2
+ jQuery( YTPlayer ).YTPPause();
+
+ jQuery( YTPlayer ).muteYTPVolume();
+ jQuery( "#controlBar_" + YTPlayer.id ).remove();
+
+ YTPlayer.controlBar = false;
+
+ if( YTPlayer.opt.showControls )
+ jQuery.mbYTPlayer.buildControls( YTPlayer );
+
+ if( YTPlayer.opt.addRaster ) {
+
+ var classN = YTPlayer.opt.addRaster == "dot" ? "raster-dot" : "raster";
+ YTPlayer.overlay.addClass( YTPlayer.isRetina ? classN + " retina" : classN );
+
+ } else {
+
+ YTPlayer.overlay.removeClass( function( index, classNames ) {
+ // change the list into an array
+ var current_classes = classNames.split( " " ),
+ // array of classes which are to be removed
+ classes_to_remove = [];
+ jQuery.each( current_classes, function( index, class_name ) {
+ // if the classname begins with bg add it to the classes_to_remove array
+ if( /raster.*/.test( class_name ) ) {
+ classes_to_remove.push( class_name );
+ }
+ } );
+ classes_to_remove.push( "retina" );
+ // turn the array back into a string
+ return classes_to_remove.join( " " );
+ } )
+
+ }
+
+ var startAt = YTPlayer.opt.startAt ? YTPlayer.opt.startAt : 1;
+ YTPlayer.player.playVideo();
+ YTPlayer.player.seekTo( startAt, true );
+
+ YTPlayer.checkForStartAt = setInterval( function() {
+
+ jQuery( YTPlayer ).YTPMute();
+
+ var canPlayVideo = YTPlayer.player.getVideoLoadedFraction() >= startAt / YTPlayer.player.getDuration();
+
+ if( YTPlayer.player.getDuration() > 0 && YTPlayer.player.getCurrentTime() >= startAt && canPlayVideo ) {
+
+ //YTPlayer.player.playVideo();
+ //console.timeEnd( "checkforStart" );
+
+ clearInterval( YTPlayer.checkForStartAt );
+
+ if( typeof YTPlayer.opt.onReady == "function" )
+ YTPlayer.opt.onReady( YTPlayer );
+
+ YTPlayer.isReady = true;
+ var YTPready = jQuery.Event( "YTPReady" );
+ YTPready.time = YTPlayer.currentTime;
+ jQuery( YTPlayer ).trigger( YTPready );
+
+
+ YTPlayer.preventTrigger = true;
+ YTPlayer.state = 2;
+ jQuery( YTPlayer ).YTPPause();
+
+ if( !YTPlayer.opt.mute ) jQuery( YTPlayer ).YTPUnmute();
+ YTPlayer.canTrigger = true;
+
+ if( YTPlayer.opt.autoPlay ) {
+
+
+ var YTPStart = jQuery.Event( "YTPStart" );
+ YTPStart.time = YTPlayer.currentTime;
+ jQuery( YTPlayer ).trigger( YTPStart );
+
+ $YTPlayer.css( "background-image", "none" );
+ jQuery( YTPlayer.playerEl ).CSSAnimate( {
+ opacity: 1
+ }, 1000 );
+
+ $YTPlayer.YTPPlay();
+
+ YTPlayer.wrapper.CSSAnimate( {
+ opacity: YTPlayer.isAlone ? 1 : YTPlayer.opt.opacity
+ }, 1000 );
+
+ /* Fix for Safari freeze */
+ if( jQuery.browser.safari ) {
+
+ YTPlayer.safariPlay = setInterval( function() {
+
+ if( YTPlayer.state != 1 )
+ $YTPlayer.YTPPlay();
+ else
+ clearInterval( YTPlayer.safariPlay )
+ }, 10 )
+ }
+ $YTPlayer.on( "YTPReady", function() {
+ $YTPlayer.YTPPlay();
+ } );
+
+ } else {
+
+ //$YTPlayer.YTPPause();
+ YTPlayer.player.pauseVideo();
+ if( !YTPlayer.isPlayer ) {
+ jQuery( YTPlayer.playerEl ).CSSAnimate( {
+ opacity: 1
+ }, 500 );
+
+ YTPlayer.wrapper.CSSAnimate( {
+ opacity: YTPlayer.isAlone ? 1 : YTPlayer.opt.opacity
+ }, 500 );
+ }
+
+ if( YTPlayer.controlBar.length )
+ YTPlayer.controlBar.find( ".mb_YTPPlaypause" ).html( jQuery.mbYTPlayer.controls.play );
+
+ }
+
+ if( YTPlayer.isPlayer && !YTPlayer.opt.autoPlay && ( YTPlayer.loading && YTPlayer.loading.length ) ) {
+ YTPlayer.loading.html( "Ready" );
+ setTimeout( function() {
+ YTPlayer.loading.fadeOut();
+ }, 100 )
+ }
+
+ if( YTPlayer.controlBar && YTPlayer.controlBar.length )
+ YTPlayer.controlBar.slideDown( 1000 );
+
+ } else if( jQuery.browser.safari ) {
+ YTPlayer.player.playVideo();
+ if( startAt >= 0 ) YTPlayer.player.seekTo( startAt, true );
+ }
+
+ }, 1 );
+
+ },
+ /**
+ *
+ * @param align
+ */
+ setAlign: function( align ) {
+ var $YTplayer = this;
+
+ $YTplayer.optimizeDisplay( align );
+ },
+ /**
+ *
+ * @param align
+ */
+ getAlign: function() {
+ var YTPlayer = this.get( 0 );
+ return YTPlayer.opt.align;
+ },
+ /**
+ *
+ * @param s
+ * @returns {string}
+ */
+ formatTime: function( s ) {
+ var min = Math.floor( s / 60 );
+ var sec = Math.floor( s - ( 60 * min ) );
+ return( min <= 9 ? "0" + min : min ) + " : " + ( sec <= 9 ? "0" + sec : sec );
+ }
+ };
+
+ /**
+ *
+ * @param align
+ * can be center, top, bottom, right, left; (default is center,center)
+ */
+ jQuery.fn.optimizeDisplay = function( align ) {
+ var YTPlayer = this.get( 0 );
+ var playerBox = jQuery( YTPlayer.playerEl );
+ var vid = {};
+
+ YTPlayer.opt.align = align || YTPlayer.opt.align;
+
+ YTPlayer.opt.align = typeof YTPlayer.opt.align != "undefined " ? YTPlayer.opt.align : "center,center";
+ var YTPAlign = YTPlayer.opt.align.split( "," );
+
+ //data.optimizeDisplay = YTPlayer.isPlayer ? false : data.optimizeDisplay;
+
+ if( YTPlayer.opt.optimizeDisplay ) {
+ var win = {};
+ var el = YTPlayer.wrapper;
+
+ win.width = el.outerWidth();
+ win.height = el.outerHeight();
+
+ vid.width = win.width + 100;
+ vid.height = YTPlayer.opt.ratio == "16/9" ? Math.ceil( vid.width * ( 9 / 16 ) ) : Math.ceil( vid.width * ( 3 / 4 ) );
+
+ vid.marginTop = -( ( vid.height - win.height ) / 2 );
+ vid.marginLeft = 0;
+
+ var lowest = vid.height < win.height;
+
+ if( lowest ) {
+
+ vid.height = win.height;
+ vid.width = YTPlayer.opt.ratio == "16/9" ? Math.floor( win.height * ( 16 / 9 ) ) : Math.floor( win.height * ( 4 / 3 ) );
+
+ vid.marginTop = 0;
+ vid.marginLeft = -( ( vid.width - win.width ) / 2 );
+
+ }
+
+ for( var a in YTPAlign ) {
+
+ //var al = YTPAlign[ a ].trim();
+ var al = YTPAlign[ a ].replace( / /g, "" );
+
+ switch( al ) {
+
+ case "top":
+ vid.marginTop = lowest ? -( ( vid.height - win.height ) / 2 ) : 0;
+ break;
+
+ case "bottom":
+ vid.marginTop = lowest ? 0 : -( vid.height - win.height );
+ break;
+
+ case "left":
+ vid.marginLeft = 0;
+ break;
+
+ case "right":
+ vid.marginLeft = lowest ? -( vid.width - win.width ) : 0;
+ break;
+
+ default:
+ break;
+ }
+
+ }
+
+ } else {
+ vid.width = "100%";
+ vid.height = "100%";
+ vid.marginTop = 0;
+ vid.marginLeft = 0;
+ }
+
+ playerBox.css( {
+ width: vid.width,
+ height: vid.height,
+ marginTop: vid.marginTop,
+ marginLeft: vid.marginLeft
+ } );
+
+ };
+ /**
+ *
+ * @param arr
+ * @returns {Array|string|Blob|*}
+ *
+ */
+ jQuery.shuffle = function( arr ) {
+ var newArray = arr.slice();
+ var len = newArray.length;
+ var i = len;
+ while( i-- ) {
+ var p = parseInt( Math.random() * len );
+ var t = newArray[ i ];
+ newArray[ i ] = newArray[ p ];
+ newArray[ p ] = t;
+ }
+ return newArray;
+ };
+
+ jQuery.fn.unselectable = function() {
+ return this.each( function() {
+ jQuery( this ).css( {
+ "-moz-user-select": "none",
+ "-webkit-user-select": "none",
+ "user-select": "none"
+ } ).attr( "unselectable", "on" );
+ } );
+ };
+
+
+ /* Exposed public method */
+ jQuery.fn.YTPlayer = jQuery.mbYTPlayer.buildPlayer;
+ jQuery.fn.YTPGetPlayer = jQuery.mbYTPlayer.getPlayer;
+ jQuery.fn.YTPGetVideoID = jQuery.mbYTPlayer.getVideoID;
+ jQuery.fn.YTPChangeMovie = jQuery.mbYTPlayer.changeMovie;
+ jQuery.fn.YTPPlayerDestroy = jQuery.mbYTPlayer.playerDestroy;
+
+ jQuery.fn.YTPPlay = jQuery.mbYTPlayer.play;
+ jQuery.fn.YTPTogglePlay = jQuery.mbYTPlayer.togglePlay;
+ jQuery.fn.YTPStop = jQuery.mbYTPlayer.stop;
+ jQuery.fn.YTPPause = jQuery.mbYTPlayer.pause;
+ jQuery.fn.YTPSeekTo = jQuery.mbYTPlayer.seekTo;
+
+ jQuery.fn.YTPlaylist = jQuery.mbYTPlayer.playlist;
+ jQuery.fn.YTPPlayNext = jQuery.mbYTPlayer.playNext;
+ jQuery.fn.YTPPlayPrev = jQuery.mbYTPlayer.playPrev;
+ jQuery.fn.YTPPlayIndex = jQuery.mbYTPlayer.playIndex;
+
+ jQuery.fn.YTPMute = jQuery.mbYTPlayer.mute;
+ jQuery.fn.YTPUnmute = jQuery.mbYTPlayer.unmute;
+ jQuery.fn.YTPToggleVolume = jQuery.mbYTPlayer.toggleVolume;
+ jQuery.fn.YTPSetVolume = jQuery.mbYTPlayer.setVolume;
+
+ jQuery.fn.YTPGetVideoData = jQuery.mbYTPlayer.getVideoData;
+ jQuery.fn.YTPFullscreen = jQuery.mbYTPlayer.fullscreen;
+ jQuery.fn.YTPToggleLoops = jQuery.mbYTPlayer.toggleLoops;
+ jQuery.fn.YTPSetVideoQuality = jQuery.mbYTPlayer.setVideoQuality;
+ jQuery.fn.YTPManageProgress = jQuery.mbYTPlayer.manageProgress;
+
+ jQuery.fn.YTPApplyFilter = jQuery.mbYTPlayer.applyFilter;
+ jQuery.fn.YTPApplyFilters = jQuery.mbYTPlayer.applyFilters;
+ jQuery.fn.YTPToggleFilter = jQuery.mbYTPlayer.toggleFilter;
+ jQuery.fn.YTPToggleFilters = jQuery.mbYTPlayer.toggleFilters;
+ jQuery.fn.YTPRemoveFilter = jQuery.mbYTPlayer.removeFilter;
+ jQuery.fn.YTPDisableFilters = jQuery.mbYTPlayer.disableFilters;
+ jQuery.fn.YTPEnableFilters = jQuery.mbYTPlayer.enableFilters;
+ jQuery.fn.YTPGetFilters = jQuery.mbYTPlayer.getFilters;
+
+ jQuery.fn.YTPGetTime = jQuery.mbYTPlayer.getTime;
+ jQuery.fn.YTPGetTotalTime = jQuery.mbYTPlayer.getTotalTime;
+
+ jQuery.fn.YTPAddMask = jQuery.mbYTPlayer.addMask;
+ jQuery.fn.YTPRemoveMask = jQuery.mbYTPlayer.removeMask;
+ jQuery.fn.YTPToggleMask = jQuery.mbYTPlayer.toggleMask;
+
+ jQuery.fn.YTPSetAlign = jQuery.mbYTPlayer.setAlign;
+ jQuery.fn.YTPGetAlign = jQuery.mbYTPlayer.getAlign;
+
+ /**
+ *
+ * @deprecated
+ * todo: Above methods will be removed with version 3.5.0
+ *
+ **/
+ jQuery.fn.mb_YTPlayer = jQuery.mbYTPlayer.buildPlayer;
+ jQuery.fn.playNext = jQuery.mbYTPlayer.playNext;
+ jQuery.fn.playPrev = jQuery.mbYTPlayer.playPrev;
+ jQuery.fn.changeMovie = jQuery.mbYTPlayer.changeMovie;
+ jQuery.fn.getVideoID = jQuery.mbYTPlayer.getVideoID;
+ jQuery.fn.getPlayer = jQuery.mbYTPlayer.getPlayer;
+ jQuery.fn.playerDestroy = jQuery.mbYTPlayer.playerDestroy;
+ jQuery.fn.fullscreen = jQuery.mbYTPlayer.fullscreen;
+ jQuery.fn.buildYTPControls = jQuery.mbYTPlayer.buildControls;
+ jQuery.fn.playYTP = jQuery.mbYTPlayer.play;
+ jQuery.fn.toggleLoops = jQuery.mbYTPlayer.toggleLoops;
+ jQuery.fn.stopYTP = jQuery.mbYTPlayer.stop;
+ jQuery.fn.pauseYTP = jQuery.mbYTPlayer.pause;
+ jQuery.fn.seekToYTP = jQuery.mbYTPlayer.seekTo;
+ jQuery.fn.muteYTPVolume = jQuery.mbYTPlayer.mute;
+ jQuery.fn.unmuteYTPVolume = jQuery.mbYTPlayer.unmute;
+ jQuery.fn.setYTPVolume = jQuery.mbYTPlayer.setVolume;
+ jQuery.fn.setVideoQuality = jQuery.mbYTPlayer.setVideoQuality;
+ jQuery.fn.manageYTPProgress = jQuery.mbYTPlayer.manageProgress;
+ jQuery.fn.YTPGetDataFromFeed = jQuery.mbYTPlayer.getVideoData;
+
+
+} )( jQuery, ytp );
+;
+/*
+ * ******************************************************************************
+ * jquery.mb.components
+ * file: jquery.mb.CSSAnimate.min.js
+ *
+ * Copyright (c) 2001-2014. Matteo Bicocchi (Pupunzi);
+ * Open lab srl, Firenze - Italy
+ * email: matteo@open-lab.com
+ * site: http://pupunzi.com
+ * blog: http://pupunzi.open-lab.com
+ * http://open-lab.com
+ *
+ * Licences: MIT, GPL
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * last modified: 26/03/14 21.40
+ * *****************************************************************************
+ */
+
+function uncamel(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function setUnit(e,t){return"string"!=typeof e||e.match(/^[\-0-9\.]+jQuery/)?""+e+t:e}function setFilter(e,t,r){var i=uncamel(t),n=jQuery.browser.mozilla?"":jQuery.CSS.sfx;e[n+"filter"]=e[n+"filter"]||"",r=setUnit(r>jQuery.CSS.filters[t].max?jQuery.CSS.filters[t].max:r,jQuery.CSS.filters[t].unit),e[n+"filter"]+=i+"("+r+") ",delete e[t]}jQuery.support.CSStransition=function(){var e=document.body||document.documentElement,t=e.style;return void 0!==t.transition||void 0!==t.WebkitTransition||void 0!==t.MozTransition||void 0!==t.MsTransition||void 0!==t.OTransition}(),jQuery.CSS={name:"mb.CSSAnimate",author:"Matteo Bicocchi",version:"2.0.0",transitionEnd:"transitionEnd",sfx:"",filters:{blur:{min:0,max:100,unit:"px"},brightness:{min:0,max:400,unit:"%"},contrast:{min:0,max:400,unit:"%"},grayscale:{min:0,max:100,unit:"%"},hueRotate:{min:0,max:360,unit:"deg"},invert:{min:0,max:100,unit:"%"},saturate:{min:0,max:400,unit:"%"},sepia:{min:0,max:100,unit:"%"}},normalizeCss:function(e){var t=jQuery.extend(!0,{},e);jQuery.browser.webkit||jQuery.browser.opera?jQuery.CSS.sfx="-webkit-":jQuery.browser.mozilla?jQuery.CSS.sfx="-moz-":jQuery.browser.msie&&(jQuery.CSS.sfx="-ms-");for(var r in t){"transform"===r&&(t[jQuery.CSS.sfx+"transform"]=t[r],delete t[r]),"transform-origin"===r&&(t[jQuery.CSS.sfx+"transform-origin"]=e[r],delete t[r]),"filter"!==r||jQuery.browser.mozilla||(t[jQuery.CSS.sfx+"filter"]=e[r],delete t[r]),"blur"===r&&setFilter(t,"blur",e[r]),"brightness"===r&&setFilter(t,"brightness",e[r]),"contrast"===r&&setFilter(t,"contrast",e[r]),"grayscale"===r&&setFilter(t,"grayscale",e[r]),"hueRotate"===r&&setFilter(t,"hueRotate",e[r]),"invert"===r&&setFilter(t,"invert",e[r]),"saturate"===r&&setFilter(t,"saturate",e[r]),"sepia"===r&&setFilter(t,"sepia",e[r]);var i="";"x"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" translateX("+setUnit(e[r],"px")+")",delete t[r]),"y"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" translateY("+setUnit(e[r],"px")+")",delete t[r]),"z"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" translateZ("+setUnit(e[r],"px")+")",delete t[r]),"rotate"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" rotate("+setUnit(e[r],"deg")+")",delete t[r]),"rotateX"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" rotateX("+setUnit(e[r],"deg")+")",delete t[r]),"rotateY"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" rotateY("+setUnit(e[r],"deg")+")",delete t[r]),"rotateZ"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" rotateZ("+setUnit(e[r],"deg")+")",delete t[r]),"scale"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" scale("+setUnit(e[r],"")+")",delete t[r]),"scaleX"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" scaleX("+setUnit(e[r],"")+")",delete t[r]),"scaleY"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" scaleY("+setUnit(e[r],"")+")",delete t[r]),"scaleZ"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" scaleZ("+setUnit(e[r],"")+")",delete t[r]),"skew"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" skew("+setUnit(e[r],"deg")+")",delete t[r]),"skewX"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" skewX("+setUnit(e[r],"deg")+")",delete t[r]),"skewY"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" skewY("+setUnit(e[r],"deg")+")",delete t[r]),"perspective"===r&&(i=jQuery.CSS.sfx+"transform",t[i]=t[i]||"",t[i]+=" perspective("+setUnit(e[r],"px")+")",delete t[r])}return t},getProp:function(e){var t=[];for(var r in e)t.indexOf(r)<0&&t.push(uncamel(r));return t.join(",")},animate:function(e,t,r,i,n){return this.each(function(){function s(){u.called=!0,u.CSSAIsRunning=!1,a.off(jQuery.CSS.transitionEnd+"."+u.id),clearTimeout(u.timeout),a.css(jQuery.CSS.sfx+"transition",""),"function"==typeof n&&n.apply(u),"function"==typeof u.CSSqueue&&(u.CSSqueue(),u.CSSqueue=null)}var u=this,a=jQuery(this);u.id=u.id||"CSSA_"+(new Date).getTime();var o=o||{type:"noEvent"};if(u.CSSAIsRunning&&u.eventType==o.type&&!jQuery.browser.msie&&jQuery.browser.version<=9)return void(u.CSSqueue=function(){a.CSSAnimate(e,t,r,i,n)});if(u.CSSqueue=null,u.eventType=o.type,0!==a.length&&e){if(e=jQuery.normalizeCss(e),u.CSSAIsRunning=!0,"function"==typeof t&&(n=t,t=jQuery.fx.speeds._default),"function"==typeof r&&(i=r,r=0),"string"==typeof r&&(n=r,r=0),"function"==typeof i&&(n=i,i="cubic-bezier(0.65,0.03,0.36,0.72)"),"string"==typeof t)for(var f in jQuery.fx.speeds){if(t==f){t=jQuery.fx.speeds[f];break}t=jQuery.fx.speeds._default}if(t||(t=jQuery.fx.speeds._default),"string"==typeof n&&(i=n,n=null),!jQuery.support.CSStransition){for(var c in e){if("transform"===c&&delete e[c],"filter"===c&&delete e[c],"transform-origin"===c&&delete e[c],"auto"===e[c]&&delete e[c],"x"===c){var S=e[c],l="left";e[l]=S,delete e[c]}if("y"===c){var S=e[c],l="top";e[l]=S,delete e[c]}("-ms-transform"===c||"-ms-filter"===c)&&delete e[c]}return void a.delay(r).animate(e,t,n)}var y={"default":"ease","in":"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"};y[i]&&(i=y[i]),a.off(jQuery.CSS.transitionEnd+"."+u.id);var m=jQuery.CSS.getProp(e),d={};jQuery.extend(d,e),d[jQuery.CSS.sfx+"transition-property"]=m,d[jQuery.CSS.sfx+"transition-duration"]=t+"ms",d[jQuery.CSS.sfx+"transition-delay"]=r+"ms",d[jQuery.CSS.sfx+"transition-timing-function"]=i,setTimeout(function(){a.one(jQuery.CSS.transitionEnd+"."+u.id,s),a.css(d)},1),u.timeout=setTimeout(function(){return u.called||!n?(u.called=!1,void(u.CSSAIsRunning=!1)):(a.css(jQuery.CSS.sfx+"transition",""),n.apply(u),u.CSSAIsRunning=!1,void("function"==typeof u.CSSqueue&&(u.CSSqueue(),u.CSSqueue=null)))},t+r+10)}})}},jQuery.fn.CSSAnimate=jQuery.CSS.animate,jQuery.normalizeCss=jQuery.CSS.normalizeCss,jQuery.fn.css3=function(e){return this.each(function(){var t=jQuery(this),r=jQuery.normalizeCss(e);t.css(r)})};
+;/*
+ * ******************************************************************************
+ * jquery.mb.components
+ * file: jquery.mb.browser.min.js
+ *
+ * Copyright (c) 2001-2014. Matteo Bicocchi (Pupunzi);
+ * Open lab srl, Firenze - Italy
+ * email: matteo@open-lab.com
+ * site: http://pupunzi.com
+ * blog: http://pupunzi.open-lab.com
+ * http://open-lab.com
+ *
+ * Licences: MIT, GPL
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * last modified: 26/03/14 21.43
+ * *****************************************************************************
+ */
+
+var nAgt=navigator.userAgent;if(!jQuery.browser){jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.androidStock=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10);var nameOffset,verOffset,ix;if(-1!=(verOffset=nAgt.indexOf("Opera")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8));else if(-1!=(verOffset=nAgt.indexOf("OPR")))jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+4);else if(-1!=(verOffset=nAgt.indexOf("MSIE")))jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5);else if(-1!=nAgt.indexOf("Trident")||-1!=nAgt.indexOf("Edge")){jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer";var start=nAgt.indexOf("rv:")+3,end=start+4;jQuery.browser.fullVersion=nAgt.substring(start,end)}else-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):nAgt.indexOf("mozilla/5.0")>-1&&nAgt.indexOf("android ")>-1&&nAgt.indexOf("applewebkit")>-1&&!(nAgt.indexOf("chrome")>-1)?(verOffset=nAgt.indexOf("Chrome"),jQuery.browser.webkit=!0,jQuery.browser.androidStock=!0,jQuery.browser.name="androidStock",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase()&&(jQuery.browser.name=navigator.appName));-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion}jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.isMobile=jQuery.browser.mobile,jQuery.isTablet=jQuery.browser.mobile&&jQuery(window).width()>765,jQuery.isAndroidDefault=jQuery.browser.android&&!/chrome/i.test(nAgt);
+;/*___________________________________________________________________________________________________________________________________________________
+ _ jquery.mb.components _
+ _ _
+ _ file: jquery.mb.simpleSlider.min.js _
+ _ last modified: 16/05/15 23.45 _
+ _ _
+ _ Open Lab s.r.l., Florence - Italy _
+ _ _
+ _ email: matteo@open-lab.com _
+ _ site: http://pupunzi.com _
+ _ http://open-lab.com _
+ _ blog: http://pupunzi.open-lab.com _
+ _ Q&A: http://jquery.pupunzi.com _
+ _ _
+ _ Licences: MIT, GPL _
+ _ http://www.opensource.org/licenses/mit-license.php _
+ _ http://www.gnu.org/licenses/gpl.html _
+ _ _
+ _ Copyright (c) 2001-2015. Matteo Bicocchi (Pupunzi); _
+ ___________________________________________________________________________________________________________________________________________________*/
+
+!function(e){var t=(/iphone|ipod|ipad|android|ie|blackberry|fennec/.test(navigator.userAgent.toLowerCase()),"ontouchstart"in window||window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture||window.DocumentTouch&&document instanceof DocumentTouch||!1);e.simpleSlider={defaults:{initialval:0,scale:100,orientation:"h",readonly:!1,callback:!1},events:{start:t?"touchstart":"mousedown",end:t?"touchend":"mouseup",move:t?"touchmove":"mousemove"},init:function(o){return this.each(function(){var a=this,l=e(a);l.addClass("simpleSlider"),a.opt={},e.extend(a.opt,e.simpleSlider.defaults,o),e.extend(a.opt,l.data());var i="h"==a.opt.orientation?"horizontal":"vertical",n=e("
").addClass("level").addClass(i);l.prepend(n),a.level=n,l.css({cursor:"default"}),"auto"==a.opt.scale&&(a.opt.scale=e(a).outerWidth()),l.updateSliderVal(),a.opt.readonly||(l.on(e.simpleSlider.events.start,function(e){t&&(e=e.changedTouches[0]),a.canSlide=!0,l.updateSliderVal(e),l.css({cursor:"col-resize"}),e.preventDefault(),e.stopPropagation()}),e(document).on(e.simpleSlider.events.move,function(o){t&&(o=o.changedTouches[0]),a.canSlide&&(e(document).css({cursor:"default"}),l.updateSliderVal(o),o.preventDefault(),o.stopPropagation())}).on(e.simpleSlider.events.end,function(){e(document).css({cursor:"auto"}),a.canSlide=!1,l.css({cursor:"auto"})}))})},updateSliderVal:function(t){function o(e,t){return Math.floor(100*e/t)}var a=this,l=a.get(0);if(l.opt){l.opt.initialval="number"==typeof l.opt.initialval?l.opt.initialval:l.opt.initialval(l);var i=e(l).outerWidth(),n=e(l).outerHeight();l.x="object"==typeof t?t.clientX+document.body.scrollLeft-a.offset().left:"number"==typeof t?t*i/l.opt.scale:l.opt.initialval*i/l.opt.scale,l.y="object"==typeof t?t.clientY+document.body.scrollTop-a.offset().top:"number"==typeof t?(l.opt.scale-l.opt.initialval-t)*n/l.opt.scale:l.opt.initialval*n/l.opt.scale,l.y=a.outerHeight()-l.y,l.scaleX=l.x*l.opt.scale/i,l.scaleY=l.y*l.opt.scale/n,l.outOfRangeX=l.scaleX>l.opt.scale?l.scaleX-l.opt.scale:l.scaleX<0?l.scaleX:0,l.outOfRangeY=l.scaleY>l.opt.scale?l.scaleY-l.opt.scale:l.scaleY<0?l.scaleY:0,l.outOfRange="h"==l.opt.orientation?l.outOfRangeX:l.outOfRangeY,"undefined"!=typeof t?l.value="h"==l.opt.orientation?l.x>=a.outerWidth()?l.opt.scale:l.x<=0?0:l.scaleX:l.y>=a.outerHeight()?l.opt.scale:l.y<=0?0:l.scaleY:l.value="h"==l.opt.orientation?l.scaleX:l.scaleY,"h"==l.opt.orientation?l.level.width(o(l.x,i)+"%"):l.level.height(o(l.y,n)),"function"==typeof l.opt.callback&&l.opt.callback(l)}}},e.fn.simpleSlider=e.simpleSlider.init,e.fn.updateSliderVal=e.simpleSlider.updateSliderVal}(jQuery);
+;/*___________________________________________________________________________________________________________________________________________________
+ _ jquery.mb.components _
+ _ _
+ _ file: jquery.mb.storage.min.js _
+ _ last modified: 24/05/15 16.08 _
+ _ _
+ _ Open Lab s.r.l., Florence - Italy _
+ _ _
+ _ email: matteo@open-lab.com _
+ _ site: http://pupunzi.com _
+ _ http://open-lab.com _
+ _ blog: http://pupunzi.open-lab.com _
+ _ Q&A: http://jquery.pupunzi.com _
+ _ _
+ _ Licences: MIT, GPL _
+ _ http://www.opensource.org/licenses/mit-license.php _
+ _ http://www.gnu.org/licenses/gpl.html _
+ _ _
+ _ Copyright (c) 2001-2015. Matteo Bicocchi (Pupunzi); _
+ ___________________________________________________________________________________________________________________________________________________*/
+
+!function(a){a.mbCookie={set:function(a,b,c,d){b=JSON.stringify(b),c||(c=7),d=d?"; domain="+d:"";var f,e=new Date;e.setTime(e.getTime()+1e3*60*60*24*c),f="; expires="+e.toGMTString(),document.cookie=a+"="+b+f+"; path=/"+d},get:function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;dn)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
\ No newline at end of file
diff --git a/js/jquery.scrollUp.js b/js/jquery.scrollUp.js
new file mode 100644
index 0000000..3e4dd2e
--- /dev/null
+++ b/js/jquery.scrollUp.js
@@ -0,0 +1 @@
+(function($,window,document){'use strict';$.fn.scrollUp=function(options){if(!$.data(document.body,'scrollUp')){$.data(document.body,'scrollUp',true);$.fn.scrollUp.init(options);}};$.fn.scrollUp.init=function(options){var o=$.fn.scrollUp.settings=$.extend({},$.fn.scrollUp.defaults,options),triggerVisible=false,animIn,animOut,animSpeed,scrollDis,scrollEvent,scrollTarget,$self;if(o.scrollTrigger){$self=$(o.scrollTrigger);}else{$self=$(' ',{id:o.scrollName,href:'#top'});}if(o.scrollTitle){$self.attr('title',o.scrollTitle);}$self.appendTo('body');if(!(o.scrollImg||o.scrollTrigger)){$self.html(o.scrollText);}$self.css({display:'none',position:'fixed',zIndex:o.zIndex});if(o.activeOverlay){$('
',{id:o.scrollName+'-active'}).css({position:'absolute','top':o.scrollDistance+'px',width:'100%',borderTop:'1px dotted'+o.activeOverlay,zIndex:o.zIndex}).appendTo('body');}switch(o.animation){case'fade':animIn='fadeIn';animOut='fadeOut';animSpeed=o.animationSpeed;break;case'slide':animIn='slideDown';animOut='slideUp';animSpeed=o.animationSpeed;break;default:animIn='show';animOut='hide';animSpeed=0;}if(o.scrollFrom==='top'){scrollDis=o.scrollDistance;}else{scrollDis=$(document).height()-$(window).height()-o.scrollDistance;}scrollEvent=$(window).scroll(function(){if($(window).scrollTop()>scrollDis){if(!triggerVisible){$self[animIn](animSpeed);triggerVisible=true;}}else{if(triggerVisible){$self[animOut](animSpeed);triggerVisible=false;}}});if(o.scrollTarget){if(typeof o.scrollTarget==='number'){scrollTarget=o.scrollTarget;}else if(typeof o.scrollTarget==='string'){scrollTarget=Math.floor($(o.scrollTarget).offset().top);}}else{scrollTarget=0;}$self.click(function(e){e.preventDefault();$('html, body').animate({scrollTop:scrollTarget},o.scrollSpeed,o.easingType);});};$.fn.scrollUp.defaults={scrollName:'scrollUp',scrollDistance:300,scrollFrom:'top',scrollSpeed:300,easingType:'linear',animation:'fade',animationSpeed:200,scrollTrigger:false,scrollTarget:false,scrollText:'Scroll to top',scrollTitle:false,scrollImg:false,activeOverlay:false,zIndex:2147483647};$.fn.scrollUp.destroy=function(scrollEvent){$.removeData(document.body,'scrollUp');$('#'+$.fn.scrollUp.settings.scrollName).remove();$('#'+$.fn.scrollUp.settings.scrollName+'-active').remove();if($.fn.jquery.split('.')[1]>=7){$(window).off('scroll',scrollEvent);}else{$(window).unbind('scroll',scrollEvent);}};$.scrollUp=$.fn.scrollUp;})(jQuery,window,document);
\ No newline at end of file
diff --git a/js/lightgallery-all.js b/js/lightgallery-all.js
new file mode 100644
index 0000000..ff50127
--- /dev/null
+++ b/js/lightgallery-all.js
@@ -0,0 +1,3364 @@
+/*! lightgallery - v1.6.12 - 2019-02-19
+* http://sachinchoolur.github.io/lightGallery/
+* Copyright (c) 2019 Sachin N; Licensed GPLv3 */
+/*! lightgallery - v1.6.12 - 2019-02-19
+* http://sachinchoolur.github.io/lightGallery/
+* Copyright (c) 2019 Sachin N; Licensed GPLv3 */
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(['jquery'], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require('jquery'));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function ($) {
+
+ (function() {
+ 'use strict';
+
+ var defaults = {
+
+ mode: 'lg-slide',
+
+ // Ex : 'ease'
+ cssEasing: 'ease',
+
+ //'for jquery animation'
+ easing: 'linear',
+ speed: 600,
+ height: '100%',
+ width: '100%',
+ addClass: '',
+ startClass: 'lg-start-zoom',
+ backdropDuration: 150,
+ hideBarsDelay: 6000,
+
+ useLeft: false,
+
+ closable: true,
+ loop: true,
+ escKey: true,
+ keyPress: true,
+ controls: true,
+ slideEndAnimatoin: true,
+ hideControlOnEnd: false,
+ mousewheel: true,
+
+ getCaptionFromTitleOrAlt: true,
+
+ // .lg-item || '.lg-sub-html'
+ appendSubHtmlTo: '.lg-sub-html',
+
+ subHtmlSelectorRelative: false,
+
+ /**
+ * @desc number of preload slides
+ * will exicute only after the current slide is fully loaded.
+ *
+ * @ex you clicked on 4th image and if preload = 1 then 3rd slide and 5th
+ * slide will be loaded in the background after the 4th slide is fully loaded..
+ * if preload is 2 then 2nd 3rd 5th 6th slides will be preloaded.. ... ...
+ *
+ */
+ preload: 1,
+ showAfterLoad: true,
+ selector: '',
+ selectWithin: '',
+ nextHtml: '',
+ prevHtml: '',
+
+ // 0, 1
+ index: false,
+
+ iframeMaxWidth: '100%',
+
+ download: true,
+ counter: true,
+ appendCounterTo: '.lg-toolbar',
+
+ swipeThreshold: 50,
+ enableSwipe: true,
+ enableDrag: true,
+
+ dynamic: false,
+ dynamicEl: [],
+ galleryId: 1
+ };
+
+ function Plugin(element, options) {
+
+ // Current lightGallery element
+ this.el = element;
+
+ // Current jquery element
+ this.$el = $(element);
+
+ // lightGallery settings
+ this.s = $.extend({}, defaults, options);
+
+ // When using dynamic mode, ensure dynamicEl is an array
+ if (this.s.dynamic && this.s.dynamicEl !== 'undefined' && this.s.dynamicEl.constructor === Array && !this.s.dynamicEl.length) {
+ throw ('When using dynamic mode, you must also define dynamicEl as an Array.');
+ }
+
+ // lightGallery modules
+ this.modules = {};
+
+ // false when lightgallery complete first slide;
+ this.lGalleryOn = false;
+
+ this.lgBusy = false;
+
+ // Timeout function for hiding controls;
+ this.hideBartimeout = false;
+
+ // To determine browser supports for touch events;
+ this.isTouch = ('ontouchstart' in document.documentElement);
+
+ // Disable hideControlOnEnd if sildeEndAnimation is true
+ if (this.s.slideEndAnimatoin) {
+ this.s.hideControlOnEnd = false;
+ }
+
+ // Gallery items
+ if (this.s.dynamic) {
+ this.$items = this.s.dynamicEl;
+ } else {
+ if (this.s.selector === 'this') {
+ this.$items = this.$el;
+ } else if (this.s.selector !== '') {
+ if (this.s.selectWithin) {
+ this.$items = $(this.s.selectWithin).find(this.s.selector);
+ } else {
+ this.$items = this.$el.find($(this.s.selector));
+ }
+ } else {
+ this.$items = this.$el.children();
+ }
+ }
+
+ // .lg-item
+ this.$slide = '';
+
+ // .lg-outer
+ this.$outer = '';
+
+ this.init();
+
+ return this;
+ }
+
+ Plugin.prototype.init = function() {
+
+ var _this = this;
+
+ // s.preload should not be more than $item.length
+ if (_this.s.preload > _this.$items.length) {
+ _this.s.preload = _this.$items.length;
+ }
+
+ // if dynamic option is enabled execute immediately
+ var _hash = window.location.hash;
+ if (_hash.indexOf('lg=' + this.s.galleryId) > 0) {
+
+ _this.index = parseInt(_hash.split('&slide=')[1], 10);
+
+ $('body').addClass('lg-from-hash');
+ if (!$('body').hasClass('lg-on')) {
+ setTimeout(function() {
+ _this.build(_this.index);
+ });
+
+ $('body').addClass('lg-on');
+ }
+ }
+
+ if (_this.s.dynamic) {
+
+ _this.$el.trigger('onBeforeOpen.lg');
+
+ _this.index = _this.s.index || 0;
+
+ // prevent accidental double execution
+ if (!$('body').hasClass('lg-on')) {
+ setTimeout(function() {
+ _this.build(_this.index);
+ $('body').addClass('lg-on');
+ });
+ }
+ } else {
+
+ // Using different namespace for click because click event should not unbind if selector is same object('this')
+ _this.$items.on('click.lgcustom', function(event) {
+
+ // For IE8
+ try {
+ event.preventDefault();
+ event.preventDefault();
+ } catch (er) {
+ event.returnValue = false;
+ }
+
+ _this.$el.trigger('onBeforeOpen.lg');
+
+ _this.index = _this.s.index || _this.$items.index(this);
+
+ // prevent accidental double execution
+ if (!$('body').hasClass('lg-on')) {
+ _this.build(_this.index);
+ $('body').addClass('lg-on');
+ }
+ });
+ }
+
+ };
+
+ Plugin.prototype.build = function(index) {
+
+ var _this = this;
+
+ _this.structure();
+
+ // module constructor
+ $.each($.fn.lightGallery.modules, function(key) {
+ _this.modules[key] = new $.fn.lightGallery.modules[key](_this.el);
+ });
+
+ // initiate slide function
+ _this.slide(index, false, false, false);
+
+ if (_this.s.keyPress) {
+ _this.keyPress();
+ }
+
+ if (_this.$items.length > 1) {
+
+ _this.arrow();
+
+ setTimeout(function() {
+ _this.enableDrag();
+ _this.enableSwipe();
+ }, 50);
+
+ if (_this.s.mousewheel) {
+ _this.mousewheel();
+ }
+ } else {
+ _this.$slide.on('click.lg', function() {
+ _this.$el.trigger('onSlideClick.lg');
+ });
+ }
+
+ _this.counter();
+
+ _this.closeGallery();
+
+ _this.$el.trigger('onAfterOpen.lg');
+
+ // Hide controllers if mouse doesn't move for some period
+ _this.$outer.on('mousemove.lg click.lg touchstart.lg', function() {
+
+ _this.$outer.removeClass('lg-hide-items');
+
+ clearTimeout(_this.hideBartimeout);
+
+ // Timeout will be cleared on each slide movement also
+ _this.hideBartimeout = setTimeout(function() {
+ _this.$outer.addClass('lg-hide-items');
+ }, _this.s.hideBarsDelay);
+
+ });
+
+ _this.$outer.trigger('mousemove.lg');
+
+ };
+
+ Plugin.prototype.structure = function() {
+ var list = '';
+ var controls = '';
+ var i = 0;
+ var subHtmlCont = '';
+ var template;
+ var _this = this;
+
+ $('body').append('
');
+ $('.lg-backdrop').css('transition-duration', this.s.backdropDuration + 'ms');
+
+ // Create gallery items
+ for (i = 0; i < this.$items.length; i++) {
+ list += '
';
+ }
+
+ // Create controlls
+ if (this.s.controls && this.$items.length > 1) {
+ controls = '' +
+ '' + this.s.prevHtml + ' ' +
+ '' + this.s.nextHtml + ' ' +
+ '
';
+ }
+
+ if (this.s.appendSubHtmlTo === '.lg-sub-html') {
+ subHtmlCont = '
';
+ }
+
+ template = '' +
+ '
' +
+ '
' + list + '
' +
+ '
' +
+ ' ' +
+ '
' +
+ controls +
+ subHtmlCont +
+ '
' +
+ '
';
+
+ $('body').append(template);
+ this.$outer = $('.lg-outer');
+ this.$slide = this.$outer.find('.lg-item');
+
+ if (this.s.useLeft) {
+ this.$outer.addClass('lg-use-left');
+
+ // Set mode lg-slide if use left is true;
+ this.s.mode = 'lg-slide';
+ } else {
+ this.$outer.addClass('lg-use-css3');
+ }
+
+ // For fixed height gallery
+ _this.setTop();
+ $(window).on('resize.lg orientationchange.lg', function() {
+ setTimeout(function() {
+ _this.setTop();
+ }, 100);
+ });
+
+ // add class lg-current to remove initial transition
+ this.$slide.eq(this.index).addClass('lg-current');
+
+ // add Class for css support and transition mode
+ if (this.doCss()) {
+ this.$outer.addClass('lg-css3');
+ } else {
+ this.$outer.addClass('lg-css');
+
+ // Set speed 0 because no animation will happen if browser doesn't support css3
+ this.s.speed = 0;
+ }
+
+ this.$outer.addClass(this.s.mode);
+
+ if (this.s.enableDrag && this.$items.length > 1) {
+ this.$outer.addClass('lg-grab');
+ }
+
+ if (this.s.showAfterLoad) {
+ this.$outer.addClass('lg-show-after-load');
+ }
+
+ if (this.doCss()) {
+ var $inner = this.$outer.find('.lg-inner');
+ $inner.css('transition-timing-function', this.s.cssEasing);
+ $inner.css('transition-duration', this.s.speed + 'ms');
+ }
+
+ setTimeout(function() {
+ $('.lg-backdrop').addClass('in');
+ });
+
+ setTimeout(function() {
+ _this.$outer.addClass('lg-visible');
+ }, this.s.backdropDuration);
+
+ if (this.s.download) {
+ this.$outer.find('.lg-toolbar').append(' ');
+ }
+
+ // Store the current scroll top value to scroll back after closing the gallery..
+ this.prevScrollTop = $(window).scrollTop();
+
+ };
+
+ // For fixed height gallery
+ Plugin.prototype.setTop = function() {
+ if (this.s.height !== '100%') {
+ var wH = $(window).height();
+ var top = (wH - parseInt(this.s.height, 10)) / 2;
+ var $lGallery = this.$outer.find('.lg');
+ if (wH >= parseInt(this.s.height, 10)) {
+ $lGallery.css('top', top + 'px');
+ } else {
+ $lGallery.css('top', '0px');
+ }
+ }
+ };
+
+ // Find css3 support
+ Plugin.prototype.doCss = function() {
+ // check for css animation support
+ var support = function() {
+ var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];
+ var root = document.documentElement;
+ var i = 0;
+ for (i = 0; i < transition.length; i++) {
+ if (transition[i] in root.style) {
+ return true;
+ }
+ }
+ };
+
+ if (support()) {
+ return true;
+ }
+
+ return false;
+ };
+
+ /**
+ * @desc Check the given src is video
+ * @param {String} src
+ * @return {Object} video type
+ * Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] }
+ */
+ Plugin.prototype.isVideo = function(src, index) {
+
+ var html;
+ if (this.s.dynamic) {
+ html = this.s.dynamicEl[index].html;
+ } else {
+ html = this.$items.eq(index).attr('data-html');
+ }
+
+ if (!src) {
+ if(html) {
+ return {
+ html5: true
+ };
+ } else {
+ console.error('lightGallery :- data-src is not pvovided on slide item ' + (index + 1) + '. Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html');
+ return false;
+ }
+ }
+
+ var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);
+ var vimeo = src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i);
+ var dailymotion = src.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i);
+ var vk = src.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);
+
+ if (youtube) {
+ return {
+ youtube: youtube
+ };
+ } else if (vimeo) {
+ return {
+ vimeo: vimeo
+ };
+ } else if (dailymotion) {
+ return {
+ dailymotion: dailymotion
+ };
+ } else if (vk) {
+ return {
+ vk: vk
+ };
+ }
+ };
+
+ /**
+ * @desc Create image counter
+ * Ex: 1/10
+ */
+ Plugin.prototype.counter = function() {
+ if (this.s.counter) {
+ $(this.s.appendCounterTo).append('' + (parseInt(this.index, 10) + 1) + ' / ' + this.$items.length + '
');
+ }
+ };
+
+ /**
+ * @desc add sub-html into the slide
+ * @param {Number} index - index of the slide
+ */
+ Plugin.prototype.addHtml = function(index) {
+ var subHtml = null;
+ var subHtmlUrl;
+ var $currentEle;
+ if (this.s.dynamic) {
+ if (this.s.dynamicEl[index].subHtmlUrl) {
+ subHtmlUrl = this.s.dynamicEl[index].subHtmlUrl;
+ } else {
+ subHtml = this.s.dynamicEl[index].subHtml;
+ }
+ } else {
+ $currentEle = this.$items.eq(index);
+ if ($currentEle.attr('data-sub-html-url')) {
+ subHtmlUrl = $currentEle.attr('data-sub-html-url');
+ } else {
+ subHtml = $currentEle.attr('data-sub-html');
+ if (this.s.getCaptionFromTitleOrAlt && !subHtml) {
+ subHtml = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt');
+ }
+ }
+ }
+
+ if (!subHtmlUrl) {
+ if (typeof subHtml !== 'undefined' && subHtml !== null) {
+
+ // get first letter of subhtml
+ // if first letter starts with . or # get the html form the jQuery object
+ var fL = subHtml.substring(0, 1);
+ if (fL === '.' || fL === '#') {
+ if (this.s.subHtmlSelectorRelative && !this.s.dynamic) {
+ subHtml = $currentEle.find(subHtml).html();
+ } else {
+ subHtml = $(subHtml).html();
+ }
+ }
+ } else {
+ subHtml = '';
+ }
+ }
+
+ if (this.s.appendSubHtmlTo === '.lg-sub-html') {
+
+ if (subHtmlUrl) {
+ this.$outer.find(this.s.appendSubHtmlTo).load(subHtmlUrl);
+ } else {
+ this.$outer.find(this.s.appendSubHtmlTo).html(subHtml);
+ }
+
+ } else {
+
+ if (subHtmlUrl) {
+ this.$slide.eq(index).load(subHtmlUrl);
+ } else {
+ this.$slide.eq(index).append(subHtml);
+ }
+ }
+
+ // Add lg-empty-html class if title doesn't exist
+ if (typeof subHtml !== 'undefined' && subHtml !== null) {
+ if (subHtml === '') {
+ this.$outer.find(this.s.appendSubHtmlTo).addClass('lg-empty-html');
+ } else {
+ this.$outer.find(this.s.appendSubHtmlTo).removeClass('lg-empty-html');
+ }
+ }
+
+ this.$el.trigger('onAfterAppendSubHtml.lg', [index]);
+ };
+
+ /**
+ * @desc Preload slides
+ * @param {Number} index - index of the slide
+ */
+ Plugin.prototype.preload = function(index) {
+ var i = 1;
+ var j = 1;
+ for (i = 1; i <= this.s.preload; i++) {
+ if (i >= this.$items.length - index) {
+ break;
+ }
+
+ this.loadContent(index + i, false, 0);
+ }
+
+ for (j = 1; j <= this.s.preload; j++) {
+ if (index - j < 0) {
+ break;
+ }
+
+ this.loadContent(index - j, false, 0);
+ }
+ };
+
+ /**
+ * @desc Load slide content into slide.
+ * @param {Number} index - index of the slide.
+ * @param {Boolean} rec - if true call loadcontent() function again.
+ * @param {Boolean} delay - delay for adding complete class. it is 0 except first time.
+ */
+ Plugin.prototype.loadContent = function(index, rec, delay) {
+
+ var _this = this;
+ var _hasPoster = false;
+ var _$img;
+ var _src;
+ var _poster;
+ var _srcset;
+ var _sizes;
+ var _html;
+ var getResponsiveSrc = function(srcItms) {
+ var rsWidth = [];
+ var rsSrc = [];
+ for (var i = 0; i < srcItms.length; i++) {
+ var __src = srcItms[i].split(' ');
+
+ // Manage empty space
+ if (__src[0] === '') {
+ __src.splice(0, 1);
+ }
+
+ rsSrc.push(__src[0]);
+ rsWidth.push(__src[1]);
+ }
+
+ var wWidth = $(window).width();
+ for (var j = 0; j < rsWidth.length; j++) {
+ if (parseInt(rsWidth[j], 10) > wWidth) {
+ _src = rsSrc[j];
+ break;
+ }
+ }
+ };
+
+ if (_this.s.dynamic) {
+
+ if (_this.s.dynamicEl[index].poster) {
+ _hasPoster = true;
+ _poster = _this.s.dynamicEl[index].poster;
+ }
+
+ _html = _this.s.dynamicEl[index].html;
+ _src = _this.s.dynamicEl[index].src;
+
+ if (_this.s.dynamicEl[index].responsive) {
+ var srcDyItms = _this.s.dynamicEl[index].responsive.split(',');
+ getResponsiveSrc(srcDyItms);
+ }
+
+ _srcset = _this.s.dynamicEl[index].srcset;
+ _sizes = _this.s.dynamicEl[index].sizes;
+
+ } else {
+
+ if (_this.$items.eq(index).attr('data-poster')) {
+ _hasPoster = true;
+ _poster = _this.$items.eq(index).attr('data-poster');
+ }
+
+ _html = _this.$items.eq(index).attr('data-html');
+ _src = _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src');
+
+ if (_this.$items.eq(index).attr('data-responsive')) {
+ var srcItms = _this.$items.eq(index).attr('data-responsive').split(',');
+ getResponsiveSrc(srcItms);
+ }
+
+ _srcset = _this.$items.eq(index).attr('data-srcset');
+ _sizes = _this.$items.eq(index).attr('data-sizes');
+
+ }
+
+ //if (_src || _srcset || _sizes || _poster) {
+
+ var iframe = false;
+ if (_this.s.dynamic) {
+ if (_this.s.dynamicEl[index].iframe) {
+ iframe = true;
+ }
+ } else {
+ if (_this.$items.eq(index).attr('data-iframe') === 'true') {
+ iframe = true;
+ }
+ }
+
+ var _isVideo = _this.isVideo(_src, index);
+ if (!_this.$slide.eq(index).hasClass('lg-loaded')) {
+ if (iframe) {
+ _this.$slide.eq(index).prepend('');
+ } else if (_hasPoster) {
+ var videoClass = '';
+ if (_isVideo && _isVideo.youtube) {
+ videoClass = 'lg-has-youtube';
+ } else if (_isVideo && _isVideo.vimeo) {
+ videoClass = 'lg-has-vimeo';
+ } else {
+ videoClass = 'lg-has-html5';
+ }
+
+ _this.$slide.eq(index).prepend('');
+
+ } else if (_isVideo) {
+ _this.$slide.eq(index).prepend('');
+ _this.$el.trigger('hasVideo.lg', [index, _src, _html]);
+ } else {
+ _this.$slide.eq(index).prepend('');
+ }
+
+ _this.$el.trigger('onAferAppendSlide.lg', [index]);
+
+ _$img = _this.$slide.eq(index).find('.lg-object');
+ if (_sizes) {
+ _$img.attr('sizes', _sizes);
+ }
+
+ if (_srcset) {
+ _$img.attr('srcset', _srcset);
+ try {
+ picturefill({
+ elements: [_$img[0]]
+ });
+ } catch (e) {
+ console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.');
+ }
+ }
+
+ if (this.s.appendSubHtmlTo !== '.lg-sub-html') {
+ _this.addHtml(index);
+ }
+
+ _this.$slide.eq(index).addClass('lg-loaded');
+ }
+
+ _this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {
+
+ // For first time add some delay for displaying the start animation.
+ var _speed = 0;
+
+ // Do not change the delay value because it is required for zoom plugin.
+ // If gallery opened from direct url (hash) speed value should be 0
+ if (delay && !$('body').hasClass('lg-from-hash')) {
+ _speed = delay;
+ }
+
+ setTimeout(function() {
+ _this.$slide.eq(index).addClass('lg-complete');
+ _this.$el.trigger('onSlideItemLoad.lg', [index, delay || 0]);
+ }, _speed);
+
+ });
+
+ // @todo check load state for html5 videos
+ if (_isVideo && _isVideo.html5 && !_hasPoster) {
+ _this.$slide.eq(index).addClass('lg-complete');
+ }
+
+ if (rec === true) {
+ if (!_this.$slide.eq(index).hasClass('lg-complete')) {
+ _this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {
+ _this.preload(index);
+ });
+ } else {
+ _this.preload(index);
+ }
+ }
+
+ //}
+ };
+
+ /**
+ * @desc slide function for lightgallery
+ ** Slide() gets call on start
+ ** ** Set lg.on true once slide() function gets called.
+ ** Call loadContent() on slide() function inside setTimeout
+ ** ** On first slide we do not want any animation like slide of fade
+ ** ** So on first slide( if lg.on if false that is first slide) loadContent() should start loading immediately
+ ** ** Else loadContent() should wait for the transition to complete.
+ ** ** So set timeout s.speed + 50
+ <=> ** loadContent() will load slide content in to the particular slide
+ ** ** It has recursion (rec) parameter. if rec === true loadContent() will call preload() function.
+ ** ** preload will execute only when the previous slide is fully loaded (images iframe)
+ ** ** avoid simultaneous image load
+ <=> ** Preload() will check for s.preload value and call loadContent() again accoring to preload value
+ ** loadContent() <====> Preload();
+
+ * @param {Number} index - index of the slide
+ * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag
+ * @param {Boolean} fromThumb - true if slide function called via thumbnail click
+ * @param {String} direction - Direction of the slide(next/prev)
+ */
+ Plugin.prototype.slide = function(index, fromTouch, fromThumb, direction) {
+
+ var _prevIndex = this.$outer.find('.lg-current').index();
+ var _this = this;
+
+ // Prevent if multiple call
+ // Required for hsh plugin
+ if (_this.lGalleryOn && (_prevIndex === index)) {
+ return;
+ }
+
+ var _length = this.$slide.length;
+ var _time = _this.lGalleryOn ? this.s.speed : 0;
+
+ if (!_this.lgBusy) {
+
+ if (this.s.download) {
+ var _src;
+ if (_this.s.dynamic) {
+ _src = _this.s.dynamicEl[index].downloadUrl !== false && (_this.s.dynamicEl[index].downloadUrl || _this.s.dynamicEl[index].src);
+ } else {
+ _src = _this.$items.eq(index).attr('data-download-url') !== 'false' && (_this.$items.eq(index).attr('data-download-url') || _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src'));
+
+ }
+
+ if (_src) {
+ $('#lg-download').attr('href', _src);
+ _this.$outer.removeClass('lg-hide-download');
+ } else {
+ _this.$outer.addClass('lg-hide-download');
+ }
+ }
+
+ this.$el.trigger('onBeforeSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
+
+ _this.lgBusy = true;
+
+ clearTimeout(_this.hideBartimeout);
+
+ // Add title if this.s.appendSubHtmlTo === lg-sub-html
+ if (this.s.appendSubHtmlTo === '.lg-sub-html') {
+
+ // wait for slide animation to complete
+ setTimeout(function() {
+ _this.addHtml(index);
+ }, _time);
+ }
+
+ this.arrowDisable(index);
+
+ if (!direction) {
+ if (index < _prevIndex) {
+ direction = 'prev';
+ } else if (index > _prevIndex) {
+ direction = 'next';
+ }
+ }
+
+ if (!fromTouch) {
+
+ // remove all transitions
+ _this.$outer.addClass('lg-no-trans');
+
+ this.$slide.removeClass('lg-prev-slide lg-next-slide');
+
+ if (direction === 'prev') {
+
+ //prevslide
+ this.$slide.eq(index).addClass('lg-prev-slide');
+ this.$slide.eq(_prevIndex).addClass('lg-next-slide');
+ } else {
+
+ // next slide
+ this.$slide.eq(index).addClass('lg-next-slide');
+ this.$slide.eq(_prevIndex).addClass('lg-prev-slide');
+ }
+
+ // give 50 ms for browser to add/remove class
+ setTimeout(function() {
+ _this.$slide.removeClass('lg-current');
+
+ //_this.$slide.eq(_prevIndex).removeClass('lg-current');
+ _this.$slide.eq(index).addClass('lg-current');
+
+ // reset all transitions
+ _this.$outer.removeClass('lg-no-trans');
+ }, 50);
+ } else {
+
+ this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');
+ var touchPrev;
+ var touchNext;
+ if (_length > 2) {
+ touchPrev = index - 1;
+ touchNext = index + 1;
+
+ if ((index === 0) && (_prevIndex === _length - 1)) {
+
+ // next slide
+ touchNext = 0;
+ touchPrev = _length - 1;
+ } else if ((index === _length - 1) && (_prevIndex === 0)) {
+
+ // prev slide
+ touchNext = 0;
+ touchPrev = _length - 1;
+ }
+
+ } else {
+ touchPrev = 0;
+ touchNext = 1;
+ }
+
+ if (direction === 'prev') {
+ _this.$slide.eq(touchNext).addClass('lg-next-slide');
+ } else {
+ _this.$slide.eq(touchPrev).addClass('lg-prev-slide');
+ }
+
+ _this.$slide.eq(index).addClass('lg-current');
+ }
+
+ if (_this.lGalleryOn) {
+ setTimeout(function() {
+ _this.loadContent(index, true, 0);
+ }, this.s.speed + 50);
+
+ setTimeout(function() {
+ _this.lgBusy = false;
+ _this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
+ }, this.s.speed);
+
+ } else {
+ _this.loadContent(index, true, _this.s.backdropDuration);
+
+ _this.lgBusy = false;
+ _this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
+ }
+
+ _this.lGalleryOn = true;
+
+ if (this.s.counter) {
+ $('#lg-counter-current').text(index + 1);
+ }
+
+ }
+ _this.index = index;
+
+ };
+
+ /**
+ * @desc Go to next slide
+ * @param {Boolean} fromTouch - true if slide function called via touch event
+ */
+ Plugin.prototype.goToNextSlide = function(fromTouch) {
+ var _this = this;
+ var _loop = _this.s.loop;
+ if (fromTouch && _this.$slide.length < 3) {
+ _loop = false;
+ }
+
+ if (!_this.lgBusy) {
+ if ((_this.index + 1) < _this.$slide.length) {
+ _this.index++;
+ _this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
+ _this.slide(_this.index, fromTouch, false, 'next');
+ } else {
+ if (_loop) {
+ _this.index = 0;
+ _this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
+ _this.slide(_this.index, fromTouch, false, 'next');
+ } else if (_this.s.slideEndAnimatoin && !fromTouch) {
+ _this.$outer.addClass('lg-right-end');
+ setTimeout(function() {
+ _this.$outer.removeClass('lg-right-end');
+ }, 400);
+ }
+ }
+ }
+ };
+
+ /**
+ * @desc Go to previous slide
+ * @param {Boolean} fromTouch - true if slide function called via touch event
+ */
+ Plugin.prototype.goToPrevSlide = function(fromTouch) {
+ var _this = this;
+ var _loop = _this.s.loop;
+ if (fromTouch && _this.$slide.length < 3) {
+ _loop = false;
+ }
+
+ if (!_this.lgBusy) {
+ if (_this.index > 0) {
+ _this.index--;
+ _this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
+ _this.slide(_this.index, fromTouch, false, 'prev');
+ } else {
+ if (_loop) {
+ _this.index = _this.$items.length - 1;
+ _this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
+ _this.slide(_this.index, fromTouch, false, 'prev');
+ } else if (_this.s.slideEndAnimatoin && !fromTouch) {
+ _this.$outer.addClass('lg-left-end');
+ setTimeout(function() {
+ _this.$outer.removeClass('lg-left-end');
+ }, 400);
+ }
+ }
+ }
+ };
+
+ Plugin.prototype.keyPress = function() {
+ var _this = this;
+ if (this.$items.length > 1) {
+ $(window).on('keyup.lg', function(e) {
+ if (_this.$items.length > 1) {
+ if (e.keyCode === 37) {
+ e.preventDefault();
+ _this.goToPrevSlide();
+ }
+
+ if (e.keyCode === 39) {
+ e.preventDefault();
+ _this.goToNextSlide();
+ }
+ }
+ });
+ }
+
+ $(window).on('keydown.lg', function(e) {
+ if (_this.s.escKey === true && e.keyCode === 27) {
+ e.preventDefault();
+ if (!_this.$outer.hasClass('lg-thumb-open')) {
+ _this.destroy();
+ } else {
+ _this.$outer.removeClass('lg-thumb-open');
+ }
+ }
+ });
+ };
+
+ Plugin.prototype.arrow = function() {
+ var _this = this;
+ this.$outer.find('.lg-prev').on('click.lg', function() {
+ _this.goToPrevSlide();
+ });
+
+ this.$outer.find('.lg-next').on('click.lg', function() {
+ _this.goToNextSlide();
+ });
+ };
+
+ Plugin.prototype.arrowDisable = function(index) {
+
+ // Disable arrows if s.hideControlOnEnd is true
+ if (!this.s.loop && this.s.hideControlOnEnd) {
+ if ((index + 1) < this.$slide.length) {
+ this.$outer.find('.lg-next').removeAttr('disabled').removeClass('disabled');
+ } else {
+ this.$outer.find('.lg-next').attr('disabled', 'disabled').addClass('disabled');
+ }
+
+ if (index > 0) {
+ this.$outer.find('.lg-prev').removeAttr('disabled').removeClass('disabled');
+ } else {
+ this.$outer.find('.lg-prev').attr('disabled', 'disabled').addClass('disabled');
+ }
+ }
+ };
+
+ Plugin.prototype.setTranslate = function($el, xValue, yValue) {
+ // jQuery supports Automatic CSS prefixing since jQuery 1.8.0
+ if (this.s.useLeft) {
+ $el.css('left', xValue);
+ } else {
+ $el.css({
+ transform: 'translate3d(' + (xValue) + 'px, ' + yValue + 'px, 0px)'
+ });
+ }
+ };
+
+ Plugin.prototype.touchMove = function(startCoords, endCoords) {
+
+ var distance = endCoords - startCoords;
+
+ if (Math.abs(distance) > 15) {
+ // reset opacity and transition duration
+ this.$outer.addClass('lg-dragging');
+
+ // move current slide
+ this.setTranslate(this.$slide.eq(this.index), distance, 0);
+
+ // move next and prev slide with current slide
+ this.setTranslate($('.lg-prev-slide'), -this.$slide.eq(this.index).width() + distance, 0);
+ this.setTranslate($('.lg-next-slide'), this.$slide.eq(this.index).width() + distance, 0);
+ }
+ };
+
+ Plugin.prototype.touchEnd = function(distance) {
+ var _this = this;
+
+ // keep slide animation for any mode while dragg/swipe
+ if (_this.s.mode !== 'lg-slide') {
+ _this.$outer.addClass('lg-slide');
+ }
+
+ this.$slide.not('.lg-current, .lg-prev-slide, .lg-next-slide').css('opacity', '0');
+
+ // set transition duration
+ setTimeout(function() {
+ _this.$outer.removeClass('lg-dragging');
+ if ((distance < 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {
+ _this.goToNextSlide(true);
+ } else if ((distance > 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {
+ _this.goToPrevSlide(true);
+ } else if (Math.abs(distance) < 5) {
+
+ // Trigger click if distance is less than 5 pix
+ _this.$el.trigger('onSlideClick.lg');
+ }
+
+ _this.$slide.removeAttr('style');
+ });
+
+ // remove slide class once drag/swipe is completed if mode is not slide
+ setTimeout(function() {
+ if (!_this.$outer.hasClass('lg-dragging') && _this.s.mode !== 'lg-slide') {
+ _this.$outer.removeClass('lg-slide');
+ }
+ }, _this.s.speed + 100);
+
+ };
+
+ Plugin.prototype.enableSwipe = function() {
+ var _this = this;
+ var startCoords = 0;
+ var endCoords = 0;
+ var isMoved = false;
+
+ if (_this.s.enableSwipe && _this.doCss()) {
+
+ _this.$slide.on('touchstart.lg', function(e) {
+ if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy) {
+ e.preventDefault();
+ _this.manageSwipeClass();
+ startCoords = e.originalEvent.targetTouches[0].pageX;
+ }
+ });
+
+ _this.$slide.on('touchmove.lg', function(e) {
+ if (!_this.$outer.hasClass('lg-zoomed')) {
+ e.preventDefault();
+ endCoords = e.originalEvent.targetTouches[0].pageX;
+ _this.touchMove(startCoords, endCoords);
+ isMoved = true;
+ }
+ });
+
+ _this.$slide.on('touchend.lg', function() {
+ if (!_this.$outer.hasClass('lg-zoomed')) {
+ if (isMoved) {
+ isMoved = false;
+ _this.touchEnd(endCoords - startCoords);
+ } else {
+ _this.$el.trigger('onSlideClick.lg');
+ }
+ }
+ });
+ }
+
+ };
+
+ Plugin.prototype.enableDrag = function() {
+ var _this = this;
+ var startCoords = 0;
+ var endCoords = 0;
+ var isDraging = false;
+ var isMoved = false;
+ if (_this.s.enableDrag && _this.doCss()) {
+ _this.$slide.on('mousedown.lg', function(e) {
+ if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy && !$(e.target).text().trim()) {
+ e.preventDefault();
+ _this.manageSwipeClass();
+ startCoords = e.pageX;
+ isDraging = true;
+
+ // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
+ _this.$outer.scrollLeft += 1;
+ _this.$outer.scrollLeft -= 1;
+
+ // *
+
+ _this.$outer.removeClass('lg-grab').addClass('lg-grabbing');
+
+ _this.$el.trigger('onDragstart.lg');
+ }
+ });
+
+ $(window).on('mousemove.lg', function(e) {
+ if (isDraging) {
+ isMoved = true;
+ endCoords = e.pageX;
+ _this.touchMove(startCoords, endCoords);
+ _this.$el.trigger('onDragmove.lg');
+ }
+ });
+
+ $(window).on('mouseup.lg', function(e) {
+ if (isMoved) {
+ isMoved = false;
+ _this.touchEnd(endCoords - startCoords);
+ _this.$el.trigger('onDragend.lg');
+ } else if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) {
+ _this.$el.trigger('onSlideClick.lg');
+ }
+
+ // Prevent execution on click
+ if (isDraging) {
+ isDraging = false;
+ _this.$outer.removeClass('lg-grabbing').addClass('lg-grab');
+ }
+ });
+
+ }
+ };
+
+ Plugin.prototype.manageSwipeClass = function() {
+ var _touchNext = this.index + 1;
+ var _touchPrev = this.index - 1;
+ if (this.s.loop && this.$slide.length > 2) {
+ if (this.index === 0) {
+ _touchPrev = this.$slide.length - 1;
+ } else if (this.index === this.$slide.length - 1) {
+ _touchNext = 0;
+ }
+ }
+
+ this.$slide.removeClass('lg-next-slide lg-prev-slide');
+ if (_touchPrev > -1) {
+ this.$slide.eq(_touchPrev).addClass('lg-prev-slide');
+ }
+
+ this.$slide.eq(_touchNext).addClass('lg-next-slide');
+ };
+
+ Plugin.prototype.mousewheel = function() {
+ var _this = this;
+ _this.$outer.on('mousewheel.lg', function(e) {
+
+ if (!e.deltaY) {
+ return;
+ }
+
+ if (e.deltaY > 0) {
+ _this.goToPrevSlide();
+ } else {
+ _this.goToNextSlide();
+ }
+
+ e.preventDefault();
+ });
+
+ };
+
+ Plugin.prototype.closeGallery = function() {
+
+ var _this = this;
+ var mousedown = false;
+ this.$outer.find('.lg-close').on('click.lg', function() {
+ _this.destroy();
+ });
+
+ if (_this.s.closable) {
+
+ // If you drag the slide and release outside gallery gets close on chrome
+ // for preventing this check mousedown and mouseup happened on .lg-item or lg-outer
+ _this.$outer.on('mousedown.lg', function(e) {
+
+ if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap')) {
+ mousedown = true;
+ } else {
+ mousedown = false;
+ }
+
+ });
+
+ _this.$outer.on('mousemove.lg', function() {
+ mousedown = false;
+ });
+
+ _this.$outer.on('mouseup.lg', function(e) {
+
+ if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap') && mousedown) {
+ if (!_this.$outer.hasClass('lg-dragging')) {
+ _this.destroy();
+ }
+ }
+
+ });
+
+ }
+
+ };
+
+ Plugin.prototype.destroy = function(d) {
+
+ var _this = this;
+
+ if (!d) {
+ _this.$el.trigger('onBeforeClose.lg');
+ $(window).scrollTop(_this.prevScrollTop);
+ }
+
+
+ /**
+ * if d is false or undefined destroy will only close the gallery
+ * plugins instance remains with the element
+ *
+ * if d is true destroy will completely remove the plugin
+ */
+
+ if (d) {
+ if (!_this.s.dynamic) {
+ // only when not using dynamic mode is $items a jquery collection
+ this.$items.off('click.lg click.lgcustom');
+ }
+
+ $.removeData(_this.el, 'lightGallery');
+ }
+
+ // Unbind all events added by lightGallery
+ this.$el.off('.lg.tm');
+
+ // Distroy all lightGallery modules
+ $.each($.fn.lightGallery.modules, function(key) {
+ if (_this.modules[key]) {
+ _this.modules[key].destroy();
+ }
+ });
+
+ this.lGalleryOn = false;
+
+ clearTimeout(_this.hideBartimeout);
+ this.hideBartimeout = false;
+ $(window).off('.lg');
+ $('body').removeClass('lg-on lg-from-hash');
+
+ if (_this.$outer) {
+ _this.$outer.removeClass('lg-visible');
+ }
+
+ $('.lg-backdrop').removeClass('in');
+
+ setTimeout(function() {
+ if (_this.$outer) {
+ _this.$outer.remove();
+ }
+
+ $('.lg-backdrop').remove();
+
+ if (!d) {
+ _this.$el.trigger('onCloseAfter.lg');
+ }
+
+ }, _this.s.backdropDuration + 50);
+ };
+
+ $.fn.lightGallery = function(options) {
+ return this.each(function() {
+ if (!$.data(this, 'lightGallery')) {
+ $.data(this, 'lightGallery', new Plugin(this, options));
+ } else {
+ try {
+ $(this).data('lightGallery').init();
+ } catch (err) {
+ console.error('lightGallery has not initiated properly');
+ }
+ }
+ });
+ };
+
+ $.fn.lightGallery.modules = {};
+
+ })();
+
+
+}));
+
+/*! lg-autoplay - v1.0.4 - 2017-03-28
+* http://sachinchoolur.github.io/lightGallery
+* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(['jquery'], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require('jquery'));
+ } else {
+ factory(jQuery);
+ }
+}(this, function ($) {
+
+
+ (function() {
+
+ 'use strict';
+
+ var defaults = {
+ autoplay: false,
+ pause: 5000,
+ progressBar: true,
+ fourceAutoplay: false,
+ autoplayControls: true,
+ appendAutoplayControlsTo: '.lg-toolbar'
+ };
+
+ /**
+ * Creates the autoplay plugin.
+ * @param {object} element - lightGallery element
+ */
+ var Autoplay = function(element) {
+
+ this.core = $(element).data('lightGallery');
+
+ this.$el = $(element);
+
+ // Execute only if items are above 1
+ if (this.core.$items.length < 2) {
+ return false;
+ }
+
+ this.core.s = $.extend({}, defaults, this.core.s);
+ this.interval = false;
+
+ // Identify if slide happened from autoplay
+ this.fromAuto = true;
+
+ // Identify if autoplay canceled from touch/drag
+ this.canceledOnTouch = false;
+
+ // save fourceautoplay value
+ this.fourceAutoplayTemp = this.core.s.fourceAutoplay;
+
+ // do not allow progress bar if browser does not support css3 transitions
+ if (!this.core.doCss()) {
+ this.core.s.progressBar = false;
+ }
+
+ this.init();
+
+ return this;
+ };
+
+ Autoplay.prototype.init = function() {
+ var _this = this;
+
+ // append autoplay controls
+ if (_this.core.s.autoplayControls) {
+ _this.controls();
+ }
+
+ // Create progress bar
+ if (_this.core.s.progressBar) {
+ _this.core.$outer.find('.lg').append('');
+ }
+
+ // set progress
+ _this.progress();
+
+ // Start autoplay
+ if (_this.core.s.autoplay) {
+ _this.$el.one('onSlideItemLoad.lg.tm', function() {
+ _this.startlAuto();
+ });
+ }
+
+ // cancel interval on touchstart and dragstart
+ _this.$el.on('onDragstart.lg.tm touchstart.lg.tm', function() {
+ if (_this.interval) {
+ _this.cancelAuto();
+ _this.canceledOnTouch = true;
+ }
+ });
+
+ // restore autoplay if autoplay canceled from touchstart / dragstart
+ _this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm', function() {
+ if (!_this.interval && _this.canceledOnTouch) {
+ _this.startlAuto();
+ _this.canceledOnTouch = false;
+ }
+ });
+
+ };
+
+ Autoplay.prototype.progress = function() {
+
+ var _this = this;
+ var _$progressBar;
+ var _$progress;
+
+ _this.$el.on('onBeforeSlide.lg.tm', function() {
+
+ // start progress bar animation
+ if (_this.core.s.progressBar && _this.fromAuto) {
+ _$progressBar = _this.core.$outer.find('.lg-progress-bar');
+ _$progress = _this.core.$outer.find('.lg-progress');
+ if (_this.interval) {
+ _$progress.removeAttr('style');
+ _$progressBar.removeClass('lg-start');
+ setTimeout(function() {
+ _$progress.css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
+ _$progressBar.addClass('lg-start');
+ }, 20);
+ }
+ }
+
+ // Remove setinterval if slide is triggered manually and fourceautoplay is false
+ if (!_this.fromAuto && !_this.core.s.fourceAutoplay) {
+ _this.cancelAuto();
+ }
+
+ _this.fromAuto = false;
+
+ });
+ };
+
+ // Manage autoplay via play/stop buttons
+ Autoplay.prototype.controls = function() {
+ var _this = this;
+ var _html = ' ';
+
+ // Append autoplay controls
+ $(this.core.s.appendAutoplayControlsTo).append(_html);
+
+ _this.core.$outer.find('.lg-autoplay-button').on('click.lg', function() {
+ if ($(_this.core.$outer).hasClass('lg-show-autoplay')) {
+ _this.cancelAuto();
+ _this.core.s.fourceAutoplay = false;
+ } else {
+ if (!_this.interval) {
+ _this.startlAuto();
+ _this.core.s.fourceAutoplay = _this.fourceAutoplayTemp;
+ }
+ }
+ });
+ };
+
+ // Autostart gallery
+ Autoplay.prototype.startlAuto = function() {
+ var _this = this;
+
+ _this.core.$outer.find('.lg-progress').css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
+ _this.core.$outer.addClass('lg-show-autoplay');
+ _this.core.$outer.find('.lg-progress-bar').addClass('lg-start');
+
+ _this.interval = setInterval(function() {
+ if (_this.core.index + 1 < _this.core.$items.length) {
+ _this.core.index++;
+ } else {
+ _this.core.index = 0;
+ }
+
+ _this.fromAuto = true;
+ _this.core.slide(_this.core.index, false, false, 'next');
+ }, _this.core.s.speed + _this.core.s.pause);
+ };
+
+ // cancel Autostart
+ Autoplay.prototype.cancelAuto = function() {
+ clearInterval(this.interval);
+ this.interval = false;
+ this.core.$outer.find('.lg-progress').removeAttr('style');
+ this.core.$outer.removeClass('lg-show-autoplay');
+ this.core.$outer.find('.lg-progress-bar').removeClass('lg-start');
+ };
+
+ Autoplay.prototype.destroy = function() {
+
+ this.cancelAuto();
+ this.core.$outer.find('.lg-progress-bar').remove();
+ };
+
+ $.fn.lightGallery.modules.autoplay = Autoplay;
+
+ })();
+
+
+}));
+
+/*! lg-fullscreen - v1.1.0 - 2019-02-19
+* http://sachinchoolur.github.io/lightGallery
+* Copyright (c) 2019 Sachin N; Licensed GPLv3 */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(['jquery'], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require('jquery'));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function ($) {
+
+ (function() {
+
+ 'use strict';
+
+ var defaults = {
+ fullScreen: true
+ };
+
+ function isFullScreen() {
+ return (
+ document.fullscreenElement ||
+ document.mozFullScreenElement ||
+ document.webkitFullscreenElement ||
+ document.msFullscreenElement
+ );
+ }
+
+ var Fullscreen = function(element) {
+
+ // get lightGallery core plugin data
+ this.core = $(element).data('lightGallery');
+
+ this.$el = $(element);
+
+ // extend module defalut settings with lightGallery core settings
+ this.core.s = $.extend({}, defaults, this.core.s);
+
+ this.init();
+
+ return this;
+ };
+
+ Fullscreen.prototype.init = function() {
+ var fullScreen = '';
+ if (this.core.s.fullScreen) {
+
+ // check for fullscreen browser support
+ if (!document.fullscreenEnabled && !document.webkitFullscreenEnabled &&
+ !document.mozFullScreenEnabled && !document.msFullscreenEnabled) {
+ return;
+ } else {
+ fullScreen = ' ';
+ this.core.$outer.find('.lg-toolbar').append(fullScreen);
+ this.fullScreen();
+ }
+ }
+ };
+
+ Fullscreen.prototype.requestFullscreen = function() {
+ var el = document.documentElement;
+ if (el.requestFullscreen) {
+ el.requestFullscreen();
+ } else if (el.msRequestFullscreen) {
+ el.msRequestFullscreen();
+ } else if (el.mozRequestFullScreen) {
+ el.mozRequestFullScreen();
+ } else if (el.webkitRequestFullscreen) {
+ el.webkitRequestFullscreen();
+ }
+ };
+
+ Fullscreen.prototype.exitFullscreen = function() {
+ if (document.exitFullscreen) {
+ document.exitFullscreen();
+ } else if (document.msExitFullscreen) {
+ document.msExitFullscreen();
+ } else if (document.mozCancelFullScreen) {
+ document.mozCancelFullScreen();
+ } else if (document.webkitExitFullscreen) {
+ document.webkitExitFullscreen();
+ }
+ };
+
+ // https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode
+ Fullscreen.prototype.fullScreen = function() {
+ var _this = this;
+
+ $(document).on('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg', function() {
+ _this.core.$outer.toggleClass('lg-fullscreen-on');
+ });
+
+ this.core.$outer.find('.lg-fullscreen').on('click.lg', function() {
+ if (isFullScreen()) {
+ _this.exitFullscreen();
+ } else {
+ _this.requestFullscreen();
+ }
+ });
+
+ };
+
+ Fullscreen.prototype.destroy = function() {
+
+ // exit from fullscreen if activated
+ if(isFullScreen()) {
+ this.exitFullscreen();
+ }
+
+ $(document).off('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg');
+ };
+
+ $.fn.lightGallery.modules.fullscreen = Fullscreen;
+
+ })();
+
+}));
+
+/*! lg-pager - v1.0.2 - 2017-01-22
+* http://sachinchoolur.github.io/lightGallery
+* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(['jquery'], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require('jquery'));
+ } else {
+ factory(jQuery);
+ }
+}(this, function ($) {
+
+ (function() {
+
+ 'use strict';
+
+ var defaults = {
+ pager: false
+ };
+
+ var Pager = function(element) {
+
+ this.core = $(element).data('lightGallery');
+
+ this.$el = $(element);
+ this.core.s = $.extend({}, defaults, this.core.s);
+ if (this.core.s.pager && this.core.$items.length > 1) {
+ this.init();
+ }
+
+ return this;
+ };
+
+ Pager.prototype.init = function() {
+ var _this = this;
+ var pagerList = '';
+ var $pagerCont;
+ var $pagerOuter;
+ var timeout;
+
+ _this.core.$outer.find('.lg').append('');
+
+ if (_this.core.s.dynamic) {
+ for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
+ pagerList += '';
+ }
+ } else {
+ _this.core.$items.each(function() {
+
+ if (!_this.core.s.exThumbImage) {
+ pagerList += '';
+ } else {
+ pagerList += '';
+ }
+
+ });
+ }
+
+ $pagerOuter = _this.core.$outer.find('.lg-pager-outer');
+
+ $pagerOuter.html(pagerList);
+
+ $pagerCont = _this.core.$outer.find('.lg-pager-cont');
+ $pagerCont.on('click.lg touchend.lg', function() {
+ var _$this = $(this);
+ _this.core.index = _$this.index();
+ _this.core.slide(_this.core.index, false, true, false);
+ });
+
+ $pagerOuter.on('mouseover.lg', function() {
+ clearTimeout(timeout);
+ $pagerOuter.addClass('lg-pager-hover');
+ });
+
+ $pagerOuter.on('mouseout.lg', function() {
+ timeout = setTimeout(function() {
+ $pagerOuter.removeClass('lg-pager-hover');
+ });
+ });
+
+ _this.core.$el.on('onBeforeSlide.lg.tm', function(e, prevIndex, index) {
+ $pagerCont.removeClass('lg-pager-active');
+ $pagerCont.eq(index).addClass('lg-pager-active');
+ });
+
+ };
+
+ Pager.prototype.destroy = function() {
+
+ };
+
+ $.fn.lightGallery.modules.pager = Pager;
+
+ })();
+
+
+}));
+
+/*! lg-thumbnail - v1.1.0 - 2017-08-08
+* http://sachinchoolur.github.io/lightGallery
+* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(['jquery'], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require('jquery'));
+ } else {
+ factory(jQuery);
+ }
+}(this, function ($) {
+
+ (function() {
+
+ 'use strict';
+
+ var defaults = {
+ thumbnail: true,
+
+ animateThumb: true,
+ currentPagerPosition: 'middle',
+
+ thumbWidth: 100,
+ thumbHeight: '80px',
+ thumbContHeight: 100,
+ thumbMargin: 5,
+
+ exThumbImage: false,
+ showThumbByDefault: true,
+ toogleThumb: true,
+ pullCaptionUp: true,
+
+ enableThumbDrag: true,
+ enableThumbSwipe: true,
+ swipeThreshold: 50,
+
+ loadYoutubeThumbnail: true,
+ youtubeThumbSize: 1,
+
+ loadVimeoThumbnail: true,
+ vimeoThumbSize: 'thumbnail_small',
+
+ loadDailymotionThumbnail: true
+ };
+
+ var Thumbnail = function(element) {
+
+ // get lightGallery core plugin data
+ this.core = $(element).data('lightGallery');
+
+ // extend module default settings with lightGallery core settings
+ this.core.s = $.extend({}, defaults, this.core.s);
+
+ this.$el = $(element);
+ this.$thumbOuter = null;
+ this.thumbOuterWidth = 0;
+ this.thumbTotalWidth = (this.core.$items.length * (this.core.s.thumbWidth + this.core.s.thumbMargin));
+ this.thumbIndex = this.core.index;
+
+ if (this.core.s.animateThumb) {
+ this.core.s.thumbHeight = '100%';
+ }
+
+ // Thumbnail animation value
+ this.left = 0;
+
+ this.init();
+
+ return this;
+ };
+
+ Thumbnail.prototype.init = function() {
+ var _this = this;
+ if (this.core.s.thumbnail && this.core.$items.length > 1) {
+ if (this.core.s.showThumbByDefault) {
+ setTimeout(function(){
+ _this.core.$outer.addClass('lg-thumb-open');
+ }, 700);
+ }
+
+ if (this.core.s.pullCaptionUp) {
+ this.core.$outer.addClass('lg-pull-caption-up');
+ }
+
+ this.build();
+ if (this.core.s.animateThumb && this.core.doCss()) {
+ if (this.core.s.enableThumbDrag) {
+ this.enableThumbDrag();
+ }
+
+ if (this.core.s.enableThumbSwipe) {
+ this.enableThumbSwipe();
+ }
+
+ this.thumbClickable = false;
+ } else {
+ this.thumbClickable = true;
+ }
+
+ this.toogle();
+ this.thumbkeyPress();
+ }
+ };
+
+ Thumbnail.prototype.build = function() {
+ var _this = this;
+ var thumbList = '';
+ var vimeoErrorThumbSize = '';
+ var $thumb;
+ var html = '';
+
+ switch (this.core.s.vimeoThumbSize) {
+ case 'thumbnail_large':
+ vimeoErrorThumbSize = '640';
+ break;
+ case 'thumbnail_medium':
+ vimeoErrorThumbSize = '200x150';
+ break;
+ case 'thumbnail_small':
+ vimeoErrorThumbSize = '100x75';
+ }
+
+ _this.core.$outer.addClass('lg-has-thumb');
+
+ _this.core.$outer.find('.lg').append(html);
+
+ _this.$thumbOuter = _this.core.$outer.find('.lg-thumb-outer');
+ _this.thumbOuterWidth = _this.$thumbOuter.width();
+
+ if (_this.core.s.animateThumb) {
+ _this.core.$outer.find('.lg-thumb').css({
+ width: _this.thumbTotalWidth + 'px',
+ position: 'relative'
+ });
+ }
+
+ if (this.core.s.animateThumb) {
+ _this.$thumbOuter.css('height', _this.core.s.thumbContHeight + 'px');
+ }
+
+ function getThumb(src, thumb, index) {
+ var isVideo = _this.core.isVideo(src, index) || {};
+ var thumbImg;
+ var vimeoId = '';
+
+ if (isVideo.youtube || isVideo.vimeo || isVideo.dailymotion) {
+ if (isVideo.youtube) {
+ if (_this.core.s.loadYoutubeThumbnail) {
+ thumbImg = '//img.youtube.com/vi/' + isVideo.youtube[1] + '/' + _this.core.s.youtubeThumbSize + '.jpg';
+ } else {
+ thumbImg = thumb;
+ }
+ } else if (isVideo.vimeo) {
+ if (_this.core.s.loadVimeoThumbnail) {
+ thumbImg = '//i.vimeocdn.com/video/error_' + vimeoErrorThumbSize + '.jpg';
+ vimeoId = isVideo.vimeo[1];
+ } else {
+ thumbImg = thumb;
+ }
+ } else if (isVideo.dailymotion) {
+ if (_this.core.s.loadDailymotionThumbnail) {
+ thumbImg = '//www.dailymotion.com/thumbnail/video/' + isVideo.dailymotion[1];
+ } else {
+ thumbImg = thumb;
+ }
+ }
+ } else {
+ thumbImg = thumb;
+ }
+
+ thumbList += '';
+ vimeoId = '';
+ }
+
+ if (_this.core.s.dynamic) {
+ for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
+ getThumb(_this.core.s.dynamicEl[i].src, _this.core.s.dynamicEl[i].thumb, i);
+ }
+ } else {
+ _this.core.$items.each(function(i) {
+
+ if (!_this.core.s.exThumbImage) {
+ getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).find('img').attr('src'), i);
+ } else {
+ getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).attr(_this.core.s.exThumbImage), i);
+ }
+
+ });
+ }
+
+ _this.core.$outer.find('.lg-thumb').html(thumbList);
+
+ $thumb = _this.core.$outer.find('.lg-thumb-item');
+
+ // Load vimeo thumbnails
+ $thumb.each(function() {
+ var $this = $(this);
+ var vimeoVideoId = $this.attr('data-vimeo-id');
+
+ if (vimeoVideoId) {
+ $.getJSON('//www.vimeo.com/api/v2/video/' + vimeoVideoId + '.json?callback=?', {
+ format: 'json'
+ }, function(data) {
+ $this.find('img').attr('src', data[0][_this.core.s.vimeoThumbSize]);
+ });
+ }
+ });
+
+ // manage active class for thumbnail
+ $thumb.eq(_this.core.index).addClass('active');
+ _this.core.$el.on('onBeforeSlide.lg.tm', function() {
+ $thumb.removeClass('active');
+ $thumb.eq(_this.core.index).addClass('active');
+ });
+
+ $thumb.on('click.lg touchend.lg', function() {
+ var _$this = $(this);
+ setTimeout(function() {
+
+ // In IE9 and bellow touch does not support
+ // Go to slide if browser does not support css transitions
+ if ((_this.thumbClickable && !_this.core.lgBusy) || !_this.core.doCss()) {
+ _this.core.index = _$this.index();
+ _this.core.slide(_this.core.index, false, true, false);
+ }
+ }, 50);
+ });
+
+ _this.core.$el.on('onBeforeSlide.lg.tm', function() {
+ _this.animateThumb(_this.core.index);
+ });
+
+ $(window).on('resize.lg.thumb orientationchange.lg.thumb', function() {
+ setTimeout(function() {
+ _this.animateThumb(_this.core.index);
+ _this.thumbOuterWidth = _this.$thumbOuter.width();
+ }, 200);
+ });
+
+ };
+
+ Thumbnail.prototype.setTranslate = function(value) {
+ // jQuery supports Automatic CSS prefixing since jQuery 1.8.0
+ this.core.$outer.find('.lg-thumb').css({
+ transform: 'translate3d(-' + (value) + 'px, 0px, 0px)'
+ });
+ };
+
+ Thumbnail.prototype.animateThumb = function(index) {
+ var $thumb = this.core.$outer.find('.lg-thumb');
+ if (this.core.s.animateThumb) {
+ var position;
+ switch (this.core.s.currentPagerPosition) {
+ case 'left':
+ position = 0;
+ break;
+ case 'middle':
+ position = (this.thumbOuterWidth / 2) - (this.core.s.thumbWidth / 2);
+ break;
+ case 'right':
+ position = this.thumbOuterWidth - this.core.s.thumbWidth;
+ }
+ this.left = ((this.core.s.thumbWidth + this.core.s.thumbMargin) * index - 1) - position;
+ if (this.left > (this.thumbTotalWidth - this.thumbOuterWidth)) {
+ this.left = this.thumbTotalWidth - this.thumbOuterWidth;
+ }
+
+ if (this.left < 0) {
+ this.left = 0;
+ }
+
+ if (this.core.lGalleryOn) {
+ if (!$thumb.hasClass('on')) {
+ this.core.$outer.find('.lg-thumb').css('transition-duration', this.core.s.speed + 'ms');
+ }
+
+ if (!this.core.doCss()) {
+ $thumb.animate({
+ left: -this.left + 'px'
+ }, this.core.s.speed);
+ }
+ } else {
+ if (!this.core.doCss()) {
+ $thumb.css('left', -this.left + 'px');
+ }
+ }
+
+ this.setTranslate(this.left);
+
+ }
+ };
+
+ // Enable thumbnail dragging and swiping
+ Thumbnail.prototype.enableThumbDrag = function() {
+
+ var _this = this;
+ var startCoords = 0;
+ var endCoords = 0;
+ var isDraging = false;
+ var isMoved = false;
+ var tempLeft = 0;
+
+ _this.$thumbOuter.addClass('lg-grab');
+
+ _this.core.$outer.find('.lg-thumb').on('mousedown.lg.thumb', function(e) {
+ if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
+ // execute only on .lg-object
+ e.preventDefault();
+ startCoords = e.pageX;
+ isDraging = true;
+
+ // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
+ _this.core.$outer.scrollLeft += 1;
+ _this.core.$outer.scrollLeft -= 1;
+
+ // *
+ _this.thumbClickable = false;
+ _this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing');
+ }
+ });
+
+ $(window).on('mousemove.lg.thumb', function(e) {
+ if (isDraging) {
+ tempLeft = _this.left;
+ isMoved = true;
+ endCoords = e.pageX;
+
+ _this.$thumbOuter.addClass('lg-dragging');
+
+ tempLeft = tempLeft - (endCoords - startCoords);
+
+ if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) {
+ tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth;
+ }
+
+ if (tempLeft < 0) {
+ tempLeft = 0;
+ }
+
+ // move current slide
+ _this.setTranslate(tempLeft);
+
+ }
+ });
+
+ $(window).on('mouseup.lg.thumb', function() {
+ if (isMoved) {
+ isMoved = false;
+ _this.$thumbOuter.removeClass('lg-dragging');
+
+ _this.left = tempLeft;
+
+ if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
+ _this.thumbClickable = true;
+ }
+
+ } else {
+ _this.thumbClickable = true;
+ }
+
+ if (isDraging) {
+ isDraging = false;
+ _this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');
+ }
+ });
+
+ };
+
+ Thumbnail.prototype.enableThumbSwipe = function() {
+ var _this = this;
+ var startCoords = 0;
+ var endCoords = 0;
+ var isMoved = false;
+ var tempLeft = 0;
+
+ _this.core.$outer.find('.lg-thumb').on('touchstart.lg', function(e) {
+ if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
+ e.preventDefault();
+ startCoords = e.originalEvent.targetTouches[0].pageX;
+ _this.thumbClickable = false;
+ }
+ });
+
+ _this.core.$outer.find('.lg-thumb').on('touchmove.lg', function(e) {
+ if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
+ e.preventDefault();
+ endCoords = e.originalEvent.targetTouches[0].pageX;
+ isMoved = true;
+
+ _this.$thumbOuter.addClass('lg-dragging');
+
+ tempLeft = _this.left;
+
+ tempLeft = tempLeft - (endCoords - startCoords);
+
+ if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) {
+ tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth;
+ }
+
+ if (tempLeft < 0) {
+ tempLeft = 0;
+ }
+
+ // move current slide
+ _this.setTranslate(tempLeft);
+
+ }
+ });
+
+ _this.core.$outer.find('.lg-thumb').on('touchend.lg', function() {
+ if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
+
+ if (isMoved) {
+ isMoved = false;
+ _this.$thumbOuter.removeClass('lg-dragging');
+ if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
+ _this.thumbClickable = true;
+ }
+
+ _this.left = tempLeft;
+ } else {
+ _this.thumbClickable = true;
+ }
+ } else {
+ _this.thumbClickable = true;
+ }
+ });
+
+ };
+
+ Thumbnail.prototype.toogle = function() {
+ var _this = this;
+ if (_this.core.s.toogleThumb) {
+ _this.core.$outer.addClass('lg-can-toggle');
+ _this.$thumbOuter.append(' ');
+ _this.core.$outer.find('.lg-toogle-thumb').on('click.lg', function() {
+ _this.core.$outer.toggleClass('lg-thumb-open');
+ });
+ }
+ };
+
+ Thumbnail.prototype.thumbkeyPress = function() {
+ var _this = this;
+ $(window).on('keydown.lg.thumb', function(e) {
+ if (e.keyCode === 38) {
+ e.preventDefault();
+ _this.core.$outer.addClass('lg-thumb-open');
+ } else if (e.keyCode === 40) {
+ e.preventDefault();
+ _this.core.$outer.removeClass('lg-thumb-open');
+ }
+ });
+ };
+
+ Thumbnail.prototype.destroy = function() {
+ if (this.core.s.thumbnail && this.core.$items.length > 1) {
+ $(window).off('resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb');
+ this.$thumbOuter.remove();
+ this.core.$outer.removeClass('lg-has-thumb');
+ }
+ };
+
+ $.fn.lightGallery.modules.Thumbnail = Thumbnail;
+
+ })();
+
+}));
+
+/*! lg-video - v1.2.2 - 2018-05-01
+* http://sachinchoolur.github.io/lightGallery
+* Copyright (c) 2018 Sachin N; Licensed GPLv3 */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(['jquery'], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof module === 'object' && module.exports) {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require('jquery'));
+ } else {
+ factory(root["jQuery"]);
+ }
+}(this, function ($) {
+
+ (function() {
+
+ 'use strict';
+
+ var defaults = {
+ videoMaxWidth: '855px',
+
+ autoplayFirstVideo: true,
+
+ youtubePlayerParams: false,
+ vimeoPlayerParams: false,
+ dailymotionPlayerParams: false,
+ vkPlayerParams: false,
+
+ videojs: false,
+ videojsOptions: {}
+ };
+
+ var Video = function(element) {
+
+ this.core = $(element).data('lightGallery');
+
+ this.$el = $(element);
+ this.core.s = $.extend({}, defaults, this.core.s);
+ this.videoLoaded = false;
+
+ this.init();
+
+ return this;
+ };
+
+ Video.prototype.init = function() {
+ var _this = this;
+
+ // Event triggered when video url found without poster
+ _this.core.$el.on('hasVideo.lg.tm', onHasVideo.bind(this));
+
+ // Set max width for video
+ _this.core.$el.on('onAferAppendSlide.lg.tm', onAferAppendSlide.bind(this));
+
+ if (_this.core.doCss() && (_this.core.$items.length > 1) && (_this.core.s.enableSwipe || _this.core.s.enableDrag)) {
+ _this.core.$el.on('onSlideClick.lg.tm', function() {
+ var $el = _this.core.$slide.eq(_this.core.index);
+ _this.loadVideoOnclick($el);
+ });
+ } else {
+
+ // For IE 9 and bellow
+ _this.core.$slide.on('click.lg', function() {
+ _this.loadVideoOnclick($(this));
+ });
+ }
+
+ _this.core.$el.on('onBeforeSlide.lg.tm', onBeforeSlide.bind(this));
+
+ _this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex) {
+ _this.core.$slide.eq(prevIndex).removeClass('lg-video-playing');
+ });
+
+ if (_this.core.s.autoplayFirstVideo) {
+ _this.core.$el.on('onAferAppendSlide.lg.tm', function (e, index) {
+ if (!_this.core.lGalleryOn) {
+ var $el = _this.core.$slide.eq(index);
+ setTimeout(function () {
+ _this.loadVideoOnclick($el);
+ }, 100);
+ }
+ });
+ }
+ };
+
+ Video.prototype.loadVideo = function(src, addClass, noPoster, index, html) {
+ var video = '';
+ var autoplay = 1;
+ var a = '';
+ var isVideo = this.core.isVideo(src, index) || {};
+
+ // Enable autoplay based on setting for first video if poster doesn't exist
+ if (noPoster) {
+ if (this.videoLoaded) {
+ autoplay = 0;
+ } else {
+ autoplay = this.core.s.autoplayFirstVideo ? 1 : 0;
+ }
+ }
+
+ if (isVideo.youtube) {
+
+ a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
+ if (this.core.s.youtubePlayerParams) {
+ a = a + '&' + $.param(this.core.s.youtubePlayerParams);
+ }
+
+ video = '';
+
+ } else if (isVideo.vimeo) {
+
+ a = '?autoplay=' + autoplay + '&api=1';
+ if (this.core.s.vimeoPlayerParams) {
+ a = a + '&' + $.param(this.core.s.vimeoPlayerParams);
+ }
+
+ video = '';
+
+ } else if (isVideo.dailymotion) {
+
+ a = '?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';
+ if (this.core.s.dailymotionPlayerParams) {
+ a = a + '&' + $.param(this.core.s.dailymotionPlayerParams);
+ }
+
+ video = '';
+
+ } else if (isVideo.html5) {
+ var fL = html.substring(0, 1);
+ if (fL === '.' || fL === '#') {
+ html = $(html).html();
+ }
+
+ video = html;
+
+ } else if (isVideo.vk) {
+
+ a = '&autoplay=' + autoplay;
+ if (this.core.s.vkPlayerParams) {
+ a = a + '&' + $.param(this.core.s.vkPlayerParams);
+ }
+
+ video = '';
+
+ }
+
+ return video;
+ };
+
+ Video.prototype.loadVideoOnclick = function($el){
+
+ var _this = this;
+ // check slide has poster
+ if ($el.find('.lg-object').hasClass('lg-has-poster') && $el.find('.lg-object').is(':visible')) {
+
+ // check already video element present
+ if (!$el.hasClass('lg-has-video')) {
+
+ $el.addClass('lg-video-playing lg-has-video');
+
+ var _src;
+ var _html;
+ var _loadVideo = function(_src, _html) {
+
+ $el.find('.lg-video').append(_this.loadVideo(_src, '', false, _this.core.index, _html));
+
+ if (_html) {
+ if (_this.core.s.videojs) {
+ try {
+ videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
+ this.play();
+ });
+ } catch (e) {
+ console.error('Make sure you have included videojs');
+ }
+ } else {
+ _this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play();
+ }
+ }
+
+ };
+
+ if (_this.core.s.dynamic) {
+
+ _src = _this.core.s.dynamicEl[_this.core.index].src;
+ _html = _this.core.s.dynamicEl[_this.core.index].html;
+
+ _loadVideo(_src, _html);
+
+ } else {
+
+ _src = _this.core.$items.eq(_this.core.index).attr('href') || _this.core.$items.eq(_this.core.index).attr('data-src');
+ _html = _this.core.$items.eq(_this.core.index).attr('data-html');
+
+ _loadVideo(_src, _html);
+
+ }
+
+ var $tempImg = $el.find('.lg-object');
+ $el.find('.lg-video').append($tempImg);
+
+ // @todo loading icon for html5 videos also
+ // for showing the loading indicator while loading video
+ if (!$el.find('.lg-video-object').hasClass('lg-html5')) {
+ $el.removeClass('lg-complete');
+ $el.find('.lg-video-object').on('load.lg error.lg', function() {
+ $el.addClass('lg-complete');
+ });
+ }
+
+ } else {
+
+ var youtubePlayer = $el.find('.lg-youtube').get(0);
+ var vimeoPlayer = $el.find('.lg-vimeo').get(0);
+ var dailymotionPlayer = $el.find('.lg-dailymotion').get(0);
+ var html5Player = $el.find('.lg-html5').get(0);
+ if (youtubePlayer) {
+ youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
+ } else if (vimeoPlayer) {
+ try {
+ $f(vimeoPlayer).api('play');
+ } catch (e) {
+ console.error('Make sure you have included froogaloop2 js');
+ }
+ } else if (dailymotionPlayer) {
+ dailymotionPlayer.contentWindow.postMessage('play', '*');
+
+ } else if (html5Player) {
+ if (_this.core.s.videojs) {
+ try {
+ videojs(html5Player).play();
+ } catch (e) {
+ console.error('Make sure you have included videojs');
+ }
+ } else {
+ html5Player.play();
+ }
+ }
+
+ $el.addClass('lg-video-playing');
+
+ }
+ }
+ };
+
+ Video.prototype.destroy = function() {
+ this.videoLoaded = false;
+ };
+
+ function onHasVideo(event, index, src, html) {
+ /*jshint validthis:true */
+ var _this = this;
+ _this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src, 'lg-object', true, index, html));
+ if (html) {
+ if (_this.core.s.videojs) {
+ try {
+ videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {
+ if (!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
+ this.play();
+ }
+ });
+ } catch (e) {
+ console.error('Make sure you have included videojs');
+ }
+ } else {
+ if(!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {
+ _this.core.$slide.eq(index).find('.lg-html5').get(0).play();
+ }
+ }
+ }
+ }
+
+ function onAferAppendSlide(event, index) {
+ /*jshint validthis:true */
+ var $videoCont = this.core.$slide.eq(index).find('.lg-video-cont');
+ if (!$videoCont.hasClass('lg-has-iframe')) {
+ $videoCont.css('max-width', this.core.s.videoMaxWidth);
+ this.videoLoaded = true;
+ }
+ }
+
+ function onBeforeSlide(event, prevIndex, index) {
+ /*jshint validthis:true */
+ var _this = this;
+
+ var $videoSlide = _this.core.$slide.eq(prevIndex);
+ var youtubePlayer = $videoSlide.find('.lg-youtube').get(0);
+ var vimeoPlayer = $videoSlide.find('.lg-vimeo').get(0);
+ var dailymotionPlayer = $videoSlide.find('.lg-dailymotion').get(0);
+ var vkPlayer = $videoSlide.find('.lg-vk').get(0);
+ var html5Player = $videoSlide.find('.lg-html5').get(0);
+ if (youtubePlayer) {
+ youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
+ } else if (vimeoPlayer) {
+ try {
+ $f(vimeoPlayer).api('pause');
+ } catch (e) {
+ console.error('Make sure you have included froogaloop2 js');
+ }
+ } else if (dailymotionPlayer) {
+ dailymotionPlayer.contentWindow.postMessage('pause', '*');
+
+ } else if (html5Player) {
+ if (_this.core.s.videojs) {
+ try {
+ videojs(html5Player).pause();
+ } catch (e) {
+ console.error('Make sure you have included videojs');
+ }
+ } else {
+ html5Player.pause();
+ }
+ } if (vkPlayer) {
+ $(vkPlayer).attr('src', $(vkPlayer).attr('src').replace('&autoplay', '&noplay'));
+ }
+
+ var _src;
+ if (_this.core.s.dynamic) {
+ _src = _this.core.s.dynamicEl[index].src;
+ } else {
+ _src = _this.core.$items.eq(index).attr('href') || _this.core.$items.eq(index).attr('data-src');
+
+ }
+
+ var _isVideo = _this.core.isVideo(_src, index) || {};
+ if (_isVideo.youtube || _isVideo.vimeo || _isVideo.dailymotion || _isVideo.vk) {
+ _this.core.$outer.addClass('lg-hide-download');
+ }
+
+ }
+
+ $.fn.lightGallery.modules.video = Video;
+
+ })();
+
+}));
+
+/*! lg-zoom - v1.1.0 - 2017-08-08
+* http://sachinchoolur.github.io/lightGallery
+* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(['jquery'], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require('jquery'));
+ } else {
+ factory(jQuery);
+ }
+}(this, function ($) {
+
+ (function() {
+
+ 'use strict';
+
+ var getUseLeft = function() {
+ var useLeft = false;
+ var isChrome = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
+ if (isChrome && parseInt(isChrome[2], 10) < 54) {
+ useLeft = true;
+ }
+
+ return useLeft;
+ };
+
+ var defaults = {
+ scale: 1,
+ zoom: true,
+ actualSize: true,
+ enableZoomAfter: 300,
+ useLeftForZoom: getUseLeft()
+ };
+
+ var Zoom = function(element) {
+
+ this.core = $(element).data('lightGallery');
+
+ this.core.s = $.extend({}, defaults, this.core.s);
+
+ if (this.core.s.zoom && this.core.doCss()) {
+ this.init();
+
+ // Store the zoomable timeout value just to clear it while closing
+ this.zoomabletimeout = false;
+
+ // Set the initial value center
+ this.pageX = $(window).width() / 2;
+ this.pageY = ($(window).height() / 2) + $(window).scrollTop();
+ }
+
+ return this;
+ };
+
+ Zoom.prototype.init = function() {
+
+ var _this = this;
+ var zoomIcons = ' ';
+
+ if (_this.core.s.actualSize) {
+ zoomIcons += ' ';
+ }
+
+ if (_this.core.s.useLeftForZoom) {
+ _this.core.$outer.addClass('lg-use-left-for-zoom');
+ } else {
+ _this.core.$outer.addClass('lg-use-transition-for-zoom');
+ }
+
+ this.core.$outer.find('.lg-toolbar').append(zoomIcons);
+
+ // Add zoomable class
+ _this.core.$el.on('onSlideItemLoad.lg.tm.zoom', function(event, index, delay) {
+
+ // delay will be 0 except first time
+ var _speed = _this.core.s.enableZoomAfter + delay;
+
+ // set _speed value 0 if gallery opened from direct url and if it is first slide
+ if ($('body').hasClass('lg-from-hash') && delay) {
+
+ // will execute only once
+ _speed = 0;
+ } else {
+
+ // Remove lg-from-hash to enable starting animation.
+ $('body').removeClass('lg-from-hash');
+ }
+
+ _this.zoomabletimeout = setTimeout(function() {
+ _this.core.$slide.eq(index).addClass('lg-zoomable');
+ }, _speed + 30);
+ });
+
+ var scale = 1;
+ /**
+ * @desc Image zoom
+ * Translate the wrap and scale the image to get better user experience
+ *
+ * @param {String} scaleVal - Zoom decrement/increment value
+ */
+ var zoom = function(scaleVal) {
+
+ var $image = _this.core.$outer.find('.lg-current .lg-image');
+ var _x;
+ var _y;
+
+ // Find offset manually to avoid issue after zoom
+ var offsetX = ($(window).width() - $image.prop('offsetWidth')) / 2;
+ var offsetY = (($(window).height() - $image.prop('offsetHeight')) / 2) + $(window).scrollTop();
+
+ _x = _this.pageX - offsetX;
+ _y = _this.pageY - offsetY;
+
+ var x = (scaleVal - 1) * (_x);
+ var y = (scaleVal - 1) * (_y);
+
+ $image.css('transform', 'scale3d(' + scaleVal + ', ' + scaleVal + ', 1)').attr('data-scale', scaleVal);
+
+ if (_this.core.s.useLeftForZoom) {
+ $image.parent().css({
+ left: -x + 'px',
+ top: -y + 'px'
+ }).attr('data-x', x).attr('data-y', y);
+ } else {
+ $image.parent().css('transform', 'translate3d(-' + x + 'px, -' + y + 'px, 0)').attr('data-x', x).attr('data-y', y);
+ }
+ };
+
+ var callScale = function() {
+ if (scale > 1) {
+ _this.core.$outer.addClass('lg-zoomed');
+ } else {
+ _this.resetZoom();
+ }
+
+ if (scale < 1) {
+ scale = 1;
+ }
+
+ zoom(scale);
+ };
+
+ var actualSize = function(event, $image, index, fromIcon) {
+ var w = $image.prop('offsetWidth');
+ var nw;
+ if (_this.core.s.dynamic) {
+ nw = _this.core.s.dynamicEl[index].width || $image[0].naturalWidth || w;
+ } else {
+ nw = _this.core.$items.eq(index).attr('data-width') || $image[0].naturalWidth || w;
+ }
+
+ var _scale;
+
+ if (_this.core.$outer.hasClass('lg-zoomed')) {
+ scale = 1;
+ } else {
+ if (nw > w) {
+ _scale = nw / w;
+ scale = _scale || 2;
+ }
+ }
+
+ if (fromIcon) {
+ _this.pageX = $(window).width() / 2;
+ _this.pageY = ($(window).height() / 2) + $(window).scrollTop();
+ } else {
+ _this.pageX = event.pageX || event.originalEvent.targetTouches[0].pageX;
+ _this.pageY = event.pageY || event.originalEvent.targetTouches[0].pageY;
+ }
+
+ callScale();
+ setTimeout(function() {
+ _this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
+ }, 10);
+ };
+
+ var tapped = false;
+
+ // event triggered after appending slide content
+ _this.core.$el.on('onAferAppendSlide.lg.tm.zoom', function(event, index) {
+
+ // Get the current element
+ var $image = _this.core.$slide.eq(index).find('.lg-image');
+
+ $image.on('dblclick', function(event) {
+ actualSize(event, $image, index);
+ });
+
+ $image.on('touchstart', function(event) {
+ if (!tapped) {
+ tapped = setTimeout(function() {
+ tapped = null;
+ }, 300);
+ } else {
+ clearTimeout(tapped);
+ tapped = null;
+ actualSize(event, $image, index);
+ }
+
+ event.preventDefault();
+ });
+
+ });
+
+ // Update zoom on resize and orientationchange
+ $(window).on('resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom', function() {
+ _this.pageX = $(window).width() / 2;
+ _this.pageY = ($(window).height() / 2) + $(window).scrollTop();
+ zoom(scale);
+ });
+
+ $('#lg-zoom-out').on('click.lg', function() {
+ if (_this.core.$outer.find('.lg-current .lg-image').length) {
+ scale -= _this.core.s.scale;
+ callScale();
+ }
+ });
+
+ $('#lg-zoom-in').on('click.lg', function() {
+ if (_this.core.$outer.find('.lg-current .lg-image').length) {
+ scale += _this.core.s.scale;
+ callScale();
+ }
+ });
+
+ $('#lg-actual-size').on('click.lg', function(event) {
+ actualSize(event, _this.core.$slide.eq(_this.core.index).find('.lg-image'), _this.core.index, true);
+ });
+
+ // Reset zoom on slide change
+ _this.core.$el.on('onBeforeSlide.lg.tm', function() {
+ scale = 1;
+ _this.resetZoom();
+ });
+
+ // Drag option after zoom
+ _this.zoomDrag();
+
+ _this.zoomSwipe();
+
+ };
+
+ // Reset zoom effect
+ Zoom.prototype.resetZoom = function() {
+ this.core.$outer.removeClass('lg-zoomed');
+ this.core.$slide.find('.lg-img-wrap').removeAttr('style data-x data-y');
+ this.core.$slide.find('.lg-image').removeAttr('style data-scale');
+
+ // Reset pagx pagy values to center
+ this.pageX = $(window).width() / 2;
+ this.pageY = ($(window).height() / 2) + $(window).scrollTop();
+ };
+
+ Zoom.prototype.zoomSwipe = function() {
+ var _this = this;
+ var startCoords = {};
+ var endCoords = {};
+ var isMoved = false;
+
+ // Allow x direction drag
+ var allowX = false;
+
+ // Allow Y direction drag
+ var allowY = false;
+
+ _this.core.$slide.on('touchstart.lg', function(e) {
+
+ if (_this.core.$outer.hasClass('lg-zoomed')) {
+ var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
+
+ allowY = $image.prop('offsetHeight') * $image.attr('data-scale') > _this.core.$outer.find('.lg').height();
+ allowX = $image.prop('offsetWidth') * $image.attr('data-scale') > _this.core.$outer.find('.lg').width();
+ if ((allowX || allowY)) {
+ e.preventDefault();
+ startCoords = {
+ x: e.originalEvent.targetTouches[0].pageX,
+ y: e.originalEvent.targetTouches[0].pageY
+ };
+ }
+ }
+
+ });
+
+ _this.core.$slide.on('touchmove.lg', function(e) {
+
+ if (_this.core.$outer.hasClass('lg-zoomed')) {
+
+ var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
+ var distanceX;
+ var distanceY;
+
+ e.preventDefault();
+ isMoved = true;
+
+ endCoords = {
+ x: e.originalEvent.targetTouches[0].pageX,
+ y: e.originalEvent.targetTouches[0].pageY
+ };
+
+ // reset opacity and transition duration
+ _this.core.$outer.addClass('lg-zoom-dragging');
+
+ if (allowY) {
+ distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
+ } else {
+ distanceY = -Math.abs(_$el.attr('data-y'));
+ }
+
+ if (allowX) {
+ distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
+ } else {
+ distanceX = -Math.abs(_$el.attr('data-x'));
+ }
+
+ if ((Math.abs(endCoords.x - startCoords.x) > 15) || (Math.abs(endCoords.y - startCoords.y) > 15)) {
+
+ if (_this.core.s.useLeftForZoom) {
+ _$el.css({
+ left: distanceX + 'px',
+ top: distanceY + 'px'
+ });
+ } else {
+ _$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
+ }
+ }
+
+ }
+
+ });
+
+ _this.core.$slide.on('touchend.lg', function() {
+ if (_this.core.$outer.hasClass('lg-zoomed')) {
+ if (isMoved) {
+ isMoved = false;
+ _this.core.$outer.removeClass('lg-zoom-dragging');
+ _this.touchendZoom(startCoords, endCoords, allowX, allowY);
+
+ }
+ }
+ });
+
+ };
+
+ Zoom.prototype.zoomDrag = function() {
+
+ var _this = this;
+ var startCoords = {};
+ var endCoords = {};
+ var isDraging = false;
+ var isMoved = false;
+
+ // Allow x direction drag
+ var allowX = false;
+
+ // Allow Y direction drag
+ var allowY = false;
+
+ _this.core.$slide.on('mousedown.lg.zoom', function(e) {
+
+ // execute only on .lg-object
+ var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
+
+ allowY = $image.prop('offsetHeight') * $image.attr('data-scale') > _this.core.$outer.find('.lg').height();
+ allowX = $image.prop('offsetWidth') * $image.attr('data-scale') > _this.core.$outer.find('.lg').width();
+
+ if (_this.core.$outer.hasClass('lg-zoomed')) {
+ if ($(e.target).hasClass('lg-object') && (allowX || allowY)) {
+ e.preventDefault();
+ startCoords = {
+ x: e.pageX,
+ y: e.pageY
+ };
+
+ isDraging = true;
+
+ // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
+ _this.core.$outer.scrollLeft += 1;
+ _this.core.$outer.scrollLeft -= 1;
+
+ _this.core.$outer.removeClass('lg-grab').addClass('lg-grabbing');
+ }
+ }
+ });
+
+ $(window).on('mousemove.lg.zoom', function(e) {
+ if (isDraging) {
+ var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
+ var distanceX;
+ var distanceY;
+
+ isMoved = true;
+ endCoords = {
+ x: e.pageX,
+ y: e.pageY
+ };
+
+ // reset opacity and transition duration
+ _this.core.$outer.addClass('lg-zoom-dragging');
+
+ if (allowY) {
+ distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
+ } else {
+ distanceY = -Math.abs(_$el.attr('data-y'));
+ }
+
+ if (allowX) {
+ distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
+ } else {
+ distanceX = -Math.abs(_$el.attr('data-x'));
+ }
+
+ if (_this.core.s.useLeftForZoom) {
+ _$el.css({
+ left: distanceX + 'px',
+ top: distanceY + 'px'
+ });
+ } else {
+ _$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
+ }
+ }
+ });
+
+ $(window).on('mouseup.lg.zoom', function(e) {
+
+ if (isDraging) {
+ isDraging = false;
+ _this.core.$outer.removeClass('lg-zoom-dragging');
+
+ // Fix for chrome mouse move on click
+ if (isMoved && ((startCoords.x !== endCoords.x) || (startCoords.y !== endCoords.y))) {
+ endCoords = {
+ x: e.pageX,
+ y: e.pageY
+ };
+ _this.touchendZoom(startCoords, endCoords, allowX, allowY);
+
+ }
+
+ isMoved = false;
+ }
+
+ _this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
+
+ });
+ };
+
+ Zoom.prototype.touchendZoom = function(startCoords, endCoords, allowX, allowY) {
+
+ var _this = this;
+ var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
+ var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
+ var distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
+ var distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
+ var minY = (_this.core.$outer.find('.lg').height() - $image.prop('offsetHeight')) / 2;
+ var maxY = Math.abs(($image.prop('offsetHeight') * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('.lg').height() + minY);
+ var minX = (_this.core.$outer.find('.lg').width() - $image.prop('offsetWidth')) / 2;
+ var maxX = Math.abs(($image.prop('offsetWidth') * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('.lg').width() + minX);
+
+ if ((Math.abs(endCoords.x - startCoords.x) > 15) || (Math.abs(endCoords.y - startCoords.y) > 15)) {
+ if (allowY) {
+ if (distanceY <= -maxY) {
+ distanceY = -maxY;
+ } else if (distanceY >= -minY) {
+ distanceY = -minY;
+ }
+ }
+
+ if (allowX) {
+ if (distanceX <= -maxX) {
+ distanceX = -maxX;
+ } else if (distanceX >= -minX) {
+ distanceX = -minX;
+ }
+ }
+
+ if (allowY) {
+ _$el.attr('data-y', Math.abs(distanceY));
+ } else {
+ distanceY = -Math.abs(_$el.attr('data-y'));
+ }
+
+ if (allowX) {
+ _$el.attr('data-x', Math.abs(distanceX));
+ } else {
+ distanceX = -Math.abs(_$el.attr('data-x'));
+ }
+
+ if (_this.core.s.useLeftForZoom) {
+ _$el.css({
+ left: distanceX + 'px',
+ top: distanceY + 'px'
+ });
+ } else {
+ _$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
+ }
+
+ }
+ };
+
+ Zoom.prototype.destroy = function() {
+
+ var _this = this;
+
+ // Unbind all events added by lightGallery zoom plugin
+ _this.core.$el.off('.lg.zoom');
+ $(window).off('.lg.zoom');
+ _this.core.$slide.off('.lg.zoom');
+ _this.core.$el.off('.lg.tm.zoom');
+ _this.resetZoom();
+ clearTimeout(_this.zoomabletimeout);
+ _this.zoomabletimeout = false;
+ };
+
+ $.fn.lightGallery.modules.zoom = Zoom;
+
+ })();
+
+
+}));
+
+/*! lg-hash - v1.0.4 - 2017-12-20
+* http://sachinchoolur.github.io/lightGallery
+* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(['jquery'], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require('jquery'));
+ } else {
+ factory(jQuery);
+ }
+}(this, function ($) {
+
+ (function() {
+
+ 'use strict';
+
+ var defaults = {
+ hash: true
+ };
+
+ var Hash = function(element) {
+
+ this.core = $(element).data('lightGallery');
+
+ this.core.s = $.extend({}, defaults, this.core.s);
+
+ if (this.core.s.hash) {
+ this.oldHash = window.location.hash;
+ this.init();
+ }
+
+ return this;
+ };
+
+ Hash.prototype.init = function() {
+ var _this = this;
+ var _hash;
+
+ // Change hash value on after each slide transition
+ _this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index) {
+ if (history.replaceState) {
+ history.replaceState(null, null, window.location.pathname + window.location.search + '#lg=' + _this.core.s.galleryId + '&slide=' + index);
+ } else {
+ window.location.hash = 'lg=' + _this.core.s.galleryId + '&slide=' + index;
+ }
+ });
+
+ // Listen hash change and change the slide according to slide value
+ $(window).on('hashchange.lg.hash', function() {
+ _hash = window.location.hash;
+ var _idx = parseInt(_hash.split('&slide=')[1], 10);
+
+ // it galleryId doesn't exist in the url close the gallery
+ if ((_hash.indexOf('lg=' + _this.core.s.galleryId) > -1)) {
+ _this.core.slide(_idx, false, false);
+ } else if (_this.core.lGalleryOn) {
+ _this.core.destroy();
+ }
+
+ });
+ };
+
+ Hash.prototype.destroy = function() {
+
+ if (!this.core.s.hash) {
+ return;
+ }
+
+ // Reset to old hash value
+ if (this.oldHash && this.oldHash.indexOf('lg=' + this.core.s.galleryId) < 0) {
+ if (history.replaceState) {
+ history.replaceState(null, null, this.oldHash);
+ } else {
+ window.location.hash = this.oldHash;
+ }
+ } else {
+ if (history.replaceState) {
+ history.replaceState(null, document.title, window.location.pathname + window.location.search);
+ } else {
+ window.location.hash = '';
+ }
+ }
+
+ this.core.$el.off('.lg.hash');
+
+ };
+
+ $.fn.lightGallery.modules.hash = Hash;
+
+ })();
+
+
+}));
+
+/*! lg-share - v1.1.0 - 2017-10-03
+* http://sachinchoolur.github.io/lightGallery
+* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(['jquery'], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require('jquery'));
+ } else {
+ factory(jQuery);
+ }
+}(this, function ($) {
+
+ (function() {
+
+ 'use strict';
+
+ var defaults = {
+ share: true,
+ facebook: true,
+ facebookDropdownText: 'Facebook',
+ twitter: true,
+ twitterDropdownText: 'Twitter',
+ googlePlus: true,
+ googlePlusDropdownText: 'GooglePlus',
+ pinterest: true,
+ pinterestDropdownText: 'Pinterest'
+ };
+
+ var Share = function(element) {
+
+ this.core = $(element).data('lightGallery');
+
+ this.core.s = $.extend({}, defaults, this.core.s);
+ if (this.core.s.share) {
+ this.init();
+ }
+
+ return this;
+ };
+
+ Share.prototype.init = function() {
+ var _this = this;
+ var shareHtml = '' +
+ ' ';
+
+ this.core.$outer.find('.lg-toolbar').append(shareHtml);
+ this.core.$outer.find('.lg').append('
');
+ $('#lg-share').on('click.lg', function(){
+ _this.core.$outer.toggleClass('lg-dropdown-active');
+ });
+
+ $('#lg-dropdown-overlay').on('click.lg', function(){
+ _this.core.$outer.removeClass('lg-dropdown-active');
+ });
+
+ _this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index) {
+
+ setTimeout(function() {
+
+ $('#lg-share-facebook').attr('href', 'https://www.facebook.com/sharer/sharer.php?u=' + (encodeURIComponent(_this.getSahreProps(index, 'facebookShareUrl') || window.location.href)));
+
+ $('#lg-share-twitter').attr('href', 'https://twitter.com/intent/tweet?text=' + _this.getSahreProps(index, 'tweetText') + '&url=' + (encodeURIComponent(_this.getSahreProps(index, 'twitterShareUrl') || window.location.href)));
+
+ $('#lg-share-googleplus').attr('href', 'https://plus.google.com/share?url=' + (encodeURIComponent(_this.getSahreProps(index, 'googleplusShareUrl') || window.location.href)));
+
+ $('#lg-share-pinterest').attr('href', 'http://www.pinterest.com/pin/create/button/?url=' + (encodeURIComponent(_this.getSahreProps(index, 'pinterestShareUrl') || window.location.href)) + '&media=' + encodeURIComponent(_this.getSahreProps(index, 'src')) + '&description=' + _this.getSahreProps(index, 'pinterestText'));
+
+ }, 100);
+ });
+ };
+
+ Share.prototype.getSahreProps = function(index, prop){
+ var shareProp = '';
+ if(this.core.s.dynamic) {
+ shareProp = this.core.s.dynamicEl[index][prop];
+ } else {
+ var _href = this.core.$items.eq(index).attr('href');
+ var _prop = this.core.$items.eq(index).data(prop);
+ shareProp = prop === 'src' ? _href || _prop : _prop;
+ }
+ return shareProp;
+ };
+
+ Share.prototype.destroy = function() {
+
+ };
+
+ $.fn.lightGallery.modules.share = Share;
+
+ })();
+
+
+
+}));
\ No newline at end of file
diff --git a/js/popper.min.js b/js/popper.min.js
new file mode 100644
index 0000000..6078d9f
--- /dev/null
+++ b/js/popper.min.js
@@ -0,0 +1,5 @@
+/*
+ Copyright (C) Federico Zivolo 2017
+ Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
+ */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:e?e.ownerDocument.documentElement:document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var l=a.commonAncestorContainer;if(e!==l&&t!==l||i.contains(n))return p(l)?l:r(l);var f=s(e);return f.host?d(f.host,t):d(e,s(t).host)}function a(e){var t=1=o.clientWidth&&i>=o.clientHeight}),l=0i[e]&&!t.escapeWithReference&&(n=_(p[o],i[e]-('right'===e?p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=X,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var i;if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var n=o.element;if('string'==typeof n){if(n=e.instance.popper.querySelector(n),!n)return e;}else if(!e.instance.popper.contains(n))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',g=a?'bottom':'right',u=L(n)[l];d[g]-us[g]&&(e.offsets.popper[m]+=d[m]+u-s[g]),e.offsets.popper=c(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f],10),E=parseFloat(w['border'+f+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=J(_(s[l]-u,v),0),e.arrowElement=n,e.offsets.arrow=(i={},pe(i,m,Math.round(v)),pe(i,h,''),i),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(k(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=y(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=x(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case le.FLIP:p=[i,n];break;case le.CLOCKWISE:p=q(i);break;case le.COUNTERCLOCKWISE:p=q(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=x(i);var a=e.offsets.popper,l=e.offsets.reference,f=X,m='left'===i&&f(a.right)>f(l.left)||'right'===i&&f(a.left)f(l.top)||'bottom'===i&&f(a.top)f(o.right),g=f(a.top)f(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'===i&&u,w=-1!==['top','bottom'].indexOf(i),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u);(m||b||y)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),y&&(r=K(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=C(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[o]-(s?n[p?'width':'height']:0),e.placement=x(t),e.offsets.popper=c(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottomo.right||t.top>o.bottom||t.right=0)&&i(t,!s)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e(" ").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="
",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("
").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.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,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);
\ No newline at end of file
diff --git a/js/slick.min.js b/js/slick.min.js
new file mode 100644
index 0000000..9fca853
--- /dev/null
+++ b/js/slick.min.js
@@ -0,0 +1,18 @@
+/*
+ _ _ _ _
+ ___| (_) ___| | __ (_)___
+/ __| | |/ __| |/ / | / __|
+\__ \ | | (__| < _ | \__ \
+|___/_|_|\___|_|\_(_)/ |___/
+ |__/
+
+ Version: 1.9.0
+ Author: Ken Wheeler
+ Website: http://kenwheeler.github.io
+ Docs: http://kenwheeler.github.io/slick
+ Repo: http://github.com/kenwheeler/slick
+ Issues: http://github.com/kenwheeler/slick/issues
+
+ */
+(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(){function e(e,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(e),appendDots:i(e),arrows:!0,asNavFor:null,prevArrow:'
Previous ',nextArrow:'
Next ',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('
').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(e),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(e).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,"undefined"!=typeof document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):"undefined"!=typeof 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=t++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}var t=0;return e}(),e.prototype.activateADA=function(){var i=this;i.$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)):o===!0?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&&i.options.adaptiveHeight===!0&&i.options.vertical===!1){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(),s.options.rtl===!0&&s.options.vertical===!1&&(e=-e),s.transformsEnabled===!1?s.options.vertical===!1?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):s.cssTransitions===!1?(s.options.rtl===!0&&(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),s.options.vertical===!1?(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),s.options.vertical===!1?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,o=t.getNavTarget();null!==o&&"object"==typeof o&&o.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};e.options.fade===!1?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,e.options.fade===!1?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||(i.options.infinite===!1&&(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;e.options.arrows===!0&&(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),e.options.infinite!==!0&&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(o.options.dots===!0&&o.slideCount>o.options.slidesToShow){for(o.$slider.addClass("slick-dotted"),t=i("
").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("
").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('
').appendTo(e.$slider):e.$slides.wrapAll('
').parent(),e.$list=e.$slideTrack.wrap('
').parent(),e.$slideTrack.css("opacity",0),e.options.centerMode!==!0&&e.options.swipeToSlide!==!0||(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),e.options.draggable===!0&&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>0){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i
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]),e===!0&&(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]),e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,e===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||l===!1||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,o=this;if(e=o.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var s in e){if(ie.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),e.options.accessibility===!0&&(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(),e.options.accessibility===!0&&e.$list.off("keydown.slick",e.keyHandler),e.options.focusOnSelect===!0&&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>0&&(i=e.$slides.children().children(),i.removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){var e=this;e.shouldClick===!1&&(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]="",e.options.fade===!1?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;t.cssTransitions===!1?(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;e.cssTransitions===!1?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","*",function(t){var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&o.is(":focus")&&(e.focussed=!0,e.autoPlay())},0)}).on("blur.slick","*",function(t){i(this);e.options.pauseOnFocus&&(e.focussed=!1,e.autoPlay())})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){var i=this;return i.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(i.options.infinite===!0)if(i.slideCount<=i.options.slidesToShow)++o;else for(;en.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,n.options.vertical===!0&&n.options.centerMode===!0&&(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),n.options.centerMode===!0&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:n.options.centerMode===!0&&n.options.infinite===!0?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:n.options.centerMode===!0&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=n.options.vertical===!1?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,n.options.variableWidth===!0&&(o=n.slideCount<=n.options.slidesToShow||n.options.infinite===!1?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=n.options.rtl===!0?o[0]?(n.$slideTrack.width()-o[0].offsetLeft-o.width())*-1:0:o[0]?o[0].offsetLeft*-1:0,n.options.centerMode===!0&&(o=n.slideCount<=n.options.slidesToShow||n.options.infinite===!1?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=n.options.rtl===!0?o[0]?(n.$slideTrack.width()-o[0].offsetLeft-o.width())*-1:0:o[0]?o[0].offsetLeft*-1:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){var e=this;return e.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(e.options.infinite===!1?i=e.slideCount:(t=e.options.slidesToScroll*-1,o=e.options.slidesToScroll*-1,i=2*e.slideCount);t=0&&ii.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),i.options.accessibility===!0&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;e.options.dots===!0&&e.slideCount>e.options.slidesToShow&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),e.options.accessibility===!0&&e.$dots.on("keydown.slick",e.keyHandler)),e.options.dots===!0&&e.options.pauseOnDotsHover===!0&&e.slideCount>e.options.slidesToShow&&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)),e.options.accessibility===!0&&e.$list.on("keydown.slick",e.keyHandler),e.options.focusOnSelect===!0&&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;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),i.options.dots===!0&&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&&e.options.accessibility===!0?e.changeSlide({data:{message:e.options.rtl===!0?"next":"previous"}}):39===i.keyCode&&e.options.accessibility===!0&&e.changeSlide({data:{message:e.options.rtl===!0?"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")||r.$slider.attr("data-sizes"),n=document.createElement("img");n.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")}),r.$slider.trigger("lazyLoaded",[r,e,t])})},n.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),r.$slider.trigger("lazyLoadError",[r,e,t])},n.src=t})}var t,o,s,n,r=this;if(r.options.centerMode===!0?r.options.infinite===!0?(s=r.currentSlide+(r.options.slidesToShow/2+1),n=s+r.options.slidesToShow+2):(s=Math.max(0,r.currentSlide-(r.options.slidesToShow/2+1)),n=2+(r.options.slidesToShow/2+1)+r.currentSlide):(s=r.options.infinite?r.options.slidesToShow+r.currentSlide:r.currentSlide,n=Math.ceil(s+r.options.slidesToShow),r.options.fade===!0&&(s>0&&s--,n<=r.slideCount&&n++)),t=r.$slider.find(".slick-slide").slice(s,n),"anticipated"===r.options.lazyLoad)for(var l=s-1,d=n,a=r.$slider.find(".slick-slide"),c=0;c=r.slideCount-r.options.slidesToShow?(o=r.$slider.find(".slick-cloned").slice(0,r.options.slidesToShow),e(o)):0===r.currentSlide&&(o=r.$slider.find(".slick-cloned").slice(r.options.slidesToShow*-1),e(o))},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(){var i=this;i.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;if(!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(),t.options.accessibility===!0&&(t.initADA(),t.options.focusOnChange))){var o=i(t.$slides.get(t.currentSlide));o.attr("tabindex",0).focus()}},e.prototype.prev=e.prototype.slickPrev=function(){var i=this;i.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"),r.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"),l.options.adaptiveHeight===!0&&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),e.options.focusOnSelect===!0&&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;return"boolean"==typeof i?(e=i,i=e===!0?0:o.slideCount-1):i=e===!0?--i:i,!(o.slideCount<1||i<0||i>o.slideCount-1)&&(o.unload(),t===!0?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,void o.reinit())},e.prototype.setCSS=function(i){var e,t,o=this,s={};o.options.rtl===!0&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,o.transformsEnabled===!1?o.$slideTrack.css(s):(s={},o.cssTransitions===!1?(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;i.options.vertical===!1?i.options.centerMode===!0&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),i.options.centerMode===!0&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),i.options.vertical===!1&&i.options.variableWidth===!1?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):i.options.variableWidth===!0?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();i.options.variableWidth===!1&&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,t.options.rtl===!0?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&&i.options.adaptiveHeight===!0&&i.options.vertical===!1){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":"undefined"!=typeof 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(),i.options.fade===!1?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=i.options.vertical===!0?"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||i.options.useCSS===!0&&(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&&i.animType!==!1&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&i.animType!==!1},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"),n.options.centerMode===!0){var r=n.options.slidesToShow%2===0?1:0;e=Math.floor(n.options.slidesToShow/2),n.options.infinite===!0&&(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=n.options.infinite===!0?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-is.options.slidesToShow)){for(o=s.options.centerMode===!0?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;ea.getDotCount()*a.options.slidesToScroll)?void(a.options.fade===!1&&(o=a.currentSlide,t!==!0&&a.slideCount>a.options.slidesToShow?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o))):a.options.infinite===!1&&a.options.centerMode===!0&&(i<0||i>a.slideCount-a.options.slidesToScroll)?void(a.options.fade===!1&&(o=a.currentSlide,t!==!0&&a.slideCount>a.options.slidesToShow?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o))):(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=a.getNavTarget(),l=l.slick("getSlick"),l.slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide)),a.updateDots(),a.updateArrows(),a.options.fade===!0?(t!==!0?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight()):void(t!==!0&&a.slideCount>a.options.slidesToShow?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)))},e.prototype.startLoad=function(){var i=this;i.options.arrows===!0&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),i.options.dots===!0&&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),o<0&&(o=360-Math.abs(o)),o<=45&&o>=0?s.options.rtl===!1?"left":"right":o<=360&&o>=315?s.options.rtl===!1?"left":"right":o>=135&&o<=225?s.options.rtl===!1?"right":"left":s.options.verticalSwiping===!0?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(o.touchObject.edgeHit===!0&&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(!(e.options.swipe===!1||"ontouchend"in document&&e.options.swipe===!1||e.options.draggable===!1&&i.type.indexOf("mouse")!==-1))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,e.options.verticalSwiping===!0&&(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):(l.options.verticalSwiping===!0&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(l.options.rtl===!1?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),l.options.verticalSwiping===!0&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,l.options.infinite===!1&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),l.options.vertical===!1?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,l.options.verticalSwiping===!0&&(l.swipeLeft=e+o*s),l.options.fade!==!0&&l.options.touchMove!==!1&&(l.animating===!0?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;return t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow?(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,void(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,e=this;i=Math.floor(e.options.slidesToShow/2),e.options.arrows===!0&&e.slideCount>e.options.slidesToShow&&!e.options.infinite&&(e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===e.currentSlide?(e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-e.options.slidesToShow&&e.options.centerMode===!1?(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-1&&e.options.centerMode===!0&&(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$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
+
+
+
+
+
+ Car Zone - Login
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Login To Your Account
+
+
+
+
+
+
+
+
+
+
+
+
+ ×
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $1050.00
+
+
+ 4.5/5
+
+
+
+
+
+ ( 7 Reviews )
+
+
+
+
+
+
+
+ Features
+
+
+ Cruise Control
+ Airbags
+ Air Conditioning
+ Alarm System
+ Audio Interface
+ CDR Audio
+ Seat Heating
+ ParkAssist
+
+
+
+
+ Overview
+
+ Model
+ Year
+ Condition
+ Price
+ Audi
+ 2020
+ Brand New
+ $178,000
+
+
+
+
Description
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.
+
Show Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
new file mode 100644
index 0000000..0514c99
--- /dev/null
+++ b/manifest.json
@@ -0,0 +1,16 @@
+{
+ "name": "Carzone",
+ "short_name": "Carzone",
+ "start_url": ".",
+ "display": "standalone",
+ "background_color": "#2A3443",
+ "description": "Car selling webapp",
+ "theme_color": "#2A3443",
+ "icons": [
+ {
+ "src": "./img/car0.png",
+ "sizes": "512X512",
+ "type": "image/png"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/prediction.html b/prediction.html
new file mode 100644
index 0000000..294c0a9
--- /dev/null
+++ b/prediction.html
@@ -0,0 +1,300 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Wow Factor Standard
+
Allow us to guide you through the innovative stress
+ free approach in finding your dream car.
+
Read more
+
+
+
+
+
+
Explore Your Dream Car
+
Allow us to guide you through the innovative stress
+ free approach in finding your dream car.
+
Read more
+
+
+
+
+
+
We Are Wheel
+
Allow us to guide you through the innovative stress
+ free approach in finding your dream car.
+
Read more
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Do You Have Questions ?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/registration.html b/registration.html
new file mode 100644
index 0000000..722de50
--- /dev/null
+++ b/registration.html
@@ -0,0 +1,227 @@
+
+
+
+
+
+
+
+ Car House - Automobile HTML5 Template
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/search.html b/search.html
new file mode 100644
index 0000000..b356e82
--- /dev/null
+++ b/search.html
@@ -0,0 +1,794 @@
+
+
+
+
+
+
+ Car zone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Select Brand
+ Audi
+ BMW
+ Honda
+ Nissan
+
+
+
+
+
+
+ Select Make
+ BMW
+ Honda
+ Lamborghini Huracán
+ Sports Car
+
+
+
+
+
+
+ Select Location
+ United States
+ United Kingdom
+
+
+
+
+
+
+ Select Year
+ 2016
+ 2017
+ 2018
+ 2019
+
+
+
+
+
+
+
+
+ Select Type Of Car
+ New Car
+ Used Car
+
+
+
+
+
+
+ Transmission
+ Automatic
+ Manual
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Here's your Cars
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+
+
+
+
+
+
+
+
+
+
+ ×
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Features
+
+
+ Cruise Control
+ Airbags
+ Air Conditioning
+ Alarm System
+ Audio Interface
+ CDR Audio
+ Seat Heating
+ ParkAssist
+
+
+
+
+ Overview
+
+ Model
+ Year
+ Condition
+ Price
+ Audi
+ 2020
+ Brand New
+ $178,000
+
+
+
+
Description
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.
+
Show Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/services.html b/services.html
new file mode 100644
index 0000000..15e3c97
--- /dev/null
+++ b/services.html
@@ -0,0 +1,465 @@
+
+
+
+
+
+
+
+
+ Car House - Automobile HTML5 Template
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Our Services
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
+
+
+
+
+
1
+
+
+
+
+
Free Support
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+ incididunt
+
+
+
+
+
+
2
+
+
+
+
+
Super Fast
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+ incididunt
+
+
+
+
+
+
3
+
+
+
+
+
Repairing
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+ incididunt
+
+
+
+
+
+
4
+
+
+
+
+
AIR conditioning
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+ incididunt
+
+
+
+
+
+
5
+
+
+
+
+
Oil Change
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+ incididunt
+
+
+
+
+
+
7
+
+
+
+
+
Engine Repair
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+ incididunt
+
+
+
+
+
+
6
+
+
+
+
+
Dealership
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+ incididunt
+
+
+
+
+
+
8
+
+
+
+
+
Security
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+ incididunt
+
+
+
+
+
+
9
+
+
+
+
+
Trusted Agents
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+ incididunt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Our Services Video
+
One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his
+ bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a
+ little he could
+
morning, when Gregor Samsa woke from troubled dreams, he found himself
+ transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he
+ lifted his head a little he could see himself transformed in his bed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ×
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $1050.00
+
+
+ 4.5/5
+
+
+
+
+
+ ( 7 Reviews )
+
+
+
+
+
+
+
+ Features
+
+
+ Cruise Control
+ Airbags
+ Air Conditioning
+ Alarm System
+ Audio Interface
+ CDR Audio
+ Seat Heating
+ ParkAssist
+
+
+
+
+ Overview
+
+ Model
+ Year
+ Condition
+ Price
+ Audi
+ 2020
+ Brand New
+ $178,000
+
+
+
+
Description
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
+ Lorem Ipsum has been the industry's standard.
+
Show
+ Detail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/signup.html b/signup.html
new file mode 100644
index 0000000..48a20f9
--- /dev/null
+++ b/signup.html
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+ Car House - Automobile HTML5 Template
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sw.js b/sw.js
new file mode 100644
index 0000000..e3038db
--- /dev/null
+++ b/sw.js
@@ -0,0 +1,15 @@
+self.addEventListener("install", async (event) => {
+ console.log("install event");
+});
+
+self.addEventListener("fetch", async (event) => {
+ console.log("fetch event");
+});
+
+const cacheName = "pwa-conf-v1";
+const staticAssets = ["./", "./index.html", "./js/app.js", "./css/styles.css"];
+
+self.addEventListener("install", async (event) => {
+ const cache = await caches.open(cacheName);
+ await cache.addAll(staticAssets);
+});