PageSourceSearch

https://www.locandadeicasta.it/wp-content/themes/barnelli-wp/js/scripts.js?ver=1.1

js locandadeicasta.it collected 2026-10-06 11:01:50 UTC 182,496 bytes, 1,763 lines download raw bytes

vendor: 4,694 bytes, lines 1-9
1/*!
2 * Masonry PACKAGED v4.1.1
3 * Cascading grid layout library
4 * http://masonry.desandro.com
5 * MIT License
6 * by David DeSandro
7 */
8
9!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);r.isBoxSizeOuter=s=200==t(o.width),i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,E=a.borderTopWidth+a.borderBottomWidth,z=d&&s,b=t(r.width);b!==!1&&(a.width=b+(z?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(z?0:g+E)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+E),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["de
9sandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e},i.makeArray=function(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i||100)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?t():document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,o){i.docReady(function(){var r=i.toDashed(o),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(n&&n.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,o,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=this.layout.size,s=-1!=n.indexOf("%")?parseFloat(n)/100*r.width:parseInt(n,10),a=-1!=o.indexOf("%")?parseFloat(o)/100*r.height:parseInt(o,10);s=isNaN(s)?0:s,a=isNaN(a)?0:a,s-=e?r.paddingLeft:r.paddingRight,a-=i?r.paddingTop:r.paddingBottom,this.position.x=s,this.position.y=a},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=parseInt(t,10),r=parseInt(e,10),s=o===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return void this.layoutPosition();var a=t-i,h=e-n,u={};u.transform=this.getTranslate(a,h),this.transition({to:u,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10
vendor: 11,575 bytes, line 9
9)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");
9return i.compatOptions.fitWidth="isFitWidth",i.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0},i.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},i.prototype.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},i.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this._getColGroup(n),r=Math.min.apply(Math,o),s=o.indexOf(r),a={x:this.columnWidth*s,y:r},h=r+t.size.outerHeight,u=this.cols+1-o.length,d=0;u>d;d++)this.colYs[s+d]=h;return a},i.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++){var o=this.colYs.slice(n,n+t);e[n]=Math.max.apply(Math,o)}return e},i.prototype._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},i.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},i.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},i.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
10
11/*! Swipebox v1.4.4 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */
12!function(a,b,c,d){c.swipebox=function(e,f){var g,h,i={useCSS:!0,useSVG:!0,initialIndexOnArray:0,removeBarsOnMobile:!0,hideCloseButtonOnMobile:!1,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"cccccc",beforeOpen:null,afterOpen:null,afterClose:null,afterMedia:null,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},j=this,k=[],l=e.selector,m=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),n=null!==m||b.createTouch!==d||"ontouchstart"in a||"onmsgesturechange"in a||navigator.msMaxTouchPoints,o=!!b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,p=a.innerWidth?a.innerWidth:c(a).width(),q=a.innerHeight?a.innerHeight:c(a).height(),r=0,s='<div id="swipebox-overlay">					<div id="swipebox-container">						<div id="swipebox-slider"></div>						<div id="swipebox-top-bar">							<div id="swipebox-title"></div>						</div>						<div id="swipebox-bottom-bar">							<div id="swipebox-arrows">								<a id="swipebox-prev"></a>								<a id="swipebox-next"></a>							</div>						</div>						<a id="swipebox-close"></a>					</div>			</div>';j.settings={},c.swipebox.close=function(){g.closeSlide()},c.swipebox.extend=function(){return g},j.init=function(){j.settings=c.extend({},i,f),c.isArray(e)?(k=e,g.target=c(a),g.init(j.settings.initialIndexOnArray)):c(b).on("click",l,function(a){if
vendor: 1,424 bytes, line 12
12("slide current"===a.target.parentNode.className)return!1;c.isArray(e)||(g.destroy(),h=c(l),g.actions()),k=[];var b,d,f;f||(d="data-rel",f=c(this).attr(d)),f||(d="rel",f=c(this).attr(d)),h=f&&""!==f&&"nofollow"!==f?c(l).filter("["+d+'="'+f+'"]'):c(l),h.each(function(){var a=null,b=null;c(this).attr("title")&&(a=c(this).attr("title")),c(this).attr("href")&&(b=c(this).attr("href")),k.push({href:b,title:a})}),b=h.index(c(this)),a.preventDefault(),a.stopPropagation(),g.target=c(a.target),g.init(b)})},g={init:function(a){j.settings.beforeOpen&&j.settings.beforeOpen(),this.target.trigger("swipebox-start"),c.swipebox.isOpen=!0,this.build(),this.openSlide(a),this.openMedia(a),this.preloadMedia(a+1),this.preloadMedia(a-1),j.settings.afterOpen&&j.settings.afterOpen(a)},build:function(){var a,b=this;c("body").append(s),o&&j.settings.useSVG===!0&&(a=c("#swipebox-close").css("background-image"),a=a.replace("png","svg"),c("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image":a})),m&&j.settings.removeBarsOnMobile&&c("#swipebox-bottom-bar, #swipebox-top-bar").remove(),c.each(k,function(){c("#swipebox-slider").append('<div class="slide"></div>')}),b.setDim(),b.actions(),n&&b.gesture(),b.keyboard(),b.animBars(),b.resize()},setDim:function(){var b,d,e={};"onorientationchange"in a?a.addEventListener("orientationchange",function(){0===a.orientation?(b=p,d=q):(90===a.orientation||-90===a.orientation)&&
vendor: 9,972 bytes, line 12
12(b=q,d=p)},!1):(b=a.innerWidth?a.innerWidth:c(a).width(),d=a.innerHeight?a.innerHeight:c(a).height()),e={width:b,height:d},c("#swipebox-overlay").css(e)},resize:function(){var b=this;c(a).resize(function(){b.setDim()}).resize()},supportTransition:function(){var a,c="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(a=0;a<c.length;a++)if(b.createElement("div").style[c[a]]!==d)return c[a];return!1},doCssTrans:function(){return j.settings.useCSS&&this.supportTransition()?!0:void 0},gesture:function(){var a,b,d,e,f,g,h=this,i=!1,j=!1,l=10,m=50,n={},o={},q=c("#swipebox-top-bar, #swipebox-bottom-bar"),s=c("#swipebox-slider");q.addClass("visible-bars"),h.setTimeout(),c("body").bind("touchstart",function(h){return c(this).addClass("touching"),a=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current")),o=h.originalEvent.targetTouches[0],n.pageX=h.originalEvent.targetTouches[0].pageX,n.pageY=h.originalEvent.targetTouches[0].pageY,c("#swipebox-slider").css({"-webkit-transform":"translate3d("+r+"%, 0, 0)",transform:"translate3d("+r+"%, 0, 0)"}),c(".touching").bind("touchmove",function(h){if(h.preventDefault(),h.stopPropagation(),o=h.originalEvent.targetTouches[0],!j&&(f=d,d=o.pageY-n.pageY,Math.abs(d)>=m||i)){var q=.75-Math.abs(d)/s.height();s.css({top:d+"px"}),s.css({opacity:q}),i=!0}e=b,b=o.pageX-n.pageX,g=100*b/p,!j&&!i&&Math.abs(b)>=l&&(c("#swipebox-slider").css({"-webkit-transition":"",transition:""}),j=!0),j&&(b>0?0===a?c("#swipebox-overlay").addClass("leftSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"})):0>b&&(k.length===a+1?c("#swipebox-overlay").addClass("rightSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"}))))}),!1}).bind("touchend",function(a){if(a.preventDefault(),a.stopPropagation(),c("#swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),d=o.pageY-n.pageY,b=o.pageX-n.pageX,g=100*b/p,i)if(i=!1,Math.abs(d)>=2*m&&Math.abs(d)>Math.abs(f)){var k=d>0?s.height():-s.height();s.animate({top:k+"px",opacity:0},300,function(){h.closeSlide()})}else s.animate({top:0,opacity:1},300);else j?(j=!1,b>=l&&b>=e?h.getPrev():-l>=b&&e>=b&&h.getNext()):q.hasClass("visible-bars")?(h.clearTimeout(),h.hideBars()):(h.showBars(),h.setTimeout());c("#swipebox-slider").css({"-webkit-transform":"translate3d("+r+"%, 0, 0)",transform:"translate3d("+r+"%, 0, 0)"}),c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c(".touching").off("touchmove").removeClass("touching")})},setTimeout:function(){if(j.settings.hideBarsDelay>0){var b=this;b.clearTimeout(),b.timeout=a.setTimeout(function(){b.hideBars()},j.settings.hideBarsDelay)}},clearTimeout:function(){a.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.addClass("visible-bars"):(c("#swipebox-top-bar").animate({top:0},500),c("#swipebox-bottom-bar").animate({bottom:0},500),setTimeout(function(){a.addClass("visible-bars")},1e3))},hideBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.removeClass("visible-bars"):(c("#swipebox-top-bar").animate({top:"-50px"},500),c("#swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout(function(){a.removeClass("visible-bars")},1e3))},animBars:function(){var a=this,b=c("#swipebox-top-bar, #swipebox-bottom-bar");b.addClass("visible-bars"),a.setTimeout(),c("#swipebox-slider").click(function(){b.hasClass("visible-bars")||(a.showBars(),a.setTimeout())}),c("#swipebox-bottom-bar").hover(function(){a.showBars(),b.addClass("visible-bars"),a.clearTimeout()},function(){j.settings.hideBarsDelay>0&&(b.removeClass("visible-bars"),a.setTimeout())})},keyboard:function(){var b=this;c(a).bind("keyup",function(a){a.preventDefault(),a.stopPropagation(),37===a.keyCode?b.getPrev():39===a.keyCode?b.getNext():27===a.keyCode&&b.closeSlide()})},actions:function(){var a=this,b="touchend click";k.length<2?(c("#swipebox-bottom-bar").hide(),d===k[1]&&c("#swipebox-top-bar").hide()):(c("#swipebox-prev").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getPrev(),a.setTimeout()}),c("#swipebox-next").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getNext(),a.setTimeout()})),c("#swipebox-close").bind(b,function(){a.closeSlide()})},setSlide:function(a,b){b=b||!1;var d=c("#swipebox-slider");r=100*-a,this.doCssTrans()?d.css({"-webkit-transform":"translate3d("+100*-a+"%, 0, 0)",transform:"translate3d("+100*-a+"%, 0, 0)"}):d.animate({left:100*-a+"%"}),c("#swipebox-slider .slide").removeClass("current"),c("#swipebox-slider .slide").eq(a).addClass("current"),this.setTitle(a),b&&d.fadeIn(),c("#swipebox-prev, #swipebox-next").removeClass("disabled"),0===a?c("#swipebox-prev").addClass("disabled"):a===k.length-1&&j.settings.loopAtEnd!==!0&&c("#swipebox-next").addClass("disabled")},openSlide:function(b){c("html").addClass("swipebox-html"),n?(c("html").addClass("swipebox-touch"),j.settings.hideCloseButtonOnMobile&&c("html").addClass("swipebox-no-close-button")):c("html").addClass("swipebox-no-touch"),c(a).trigger("resize"),this.setSlide(b,!0)},preloadMedia:function(a){var b=this,c=null;k[a]!==d&&(c=k[a].href),b.isVideo(c)?b.openMedia(a):setTimeout(function(){b.openMedia(a)},1e3)},openMedia:function(a){var b,e,f=this;return k[a]!==d&&(b=k[a].href),0>a||a>=k.length?!1:(e=c("#swipebox-slider .slide").eq(a),void(f.isVideo(b)?(e.html(f.getVideo(b)),j.settings.afterMedia&&j.settings.afterMedia(a)):(e.addClass("slide-loading"),f.loadMedia(b,function(){e.removeClass("slide-loading"),e.html(this),j.settings.afterMedia&&j.settings.afterMedia(a)}))))},setTitle:function(a){var b=null;c("#swipebox-title").empty(),k[a]!==d&&(b=k[a].title),b?(c("#swipebox-top-bar").show(),c("#swipebox-title").append(b)):c("#swipebox-top-bar").hide()},isVideo:function(a){if(a){if(a.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||a.match(/vimeo\.com\/([0-9]*)/)||a.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))return!0;if(a.toLowerCase().indexOf("swipeboxvideo=1")>=0)return!0}},parseUri:function(a,d){var e=b.createElement("a"),f={};return e.href=decodeURIComponent(a),e.search&&(f=JSON.parse('{"'+e.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),c.isPlainObject(d)&&(f=c.extend(f,d,j.settings.queryStringData)),c.map(f,function(a,b){return a&&a>""?encodeURIComponent(b)+"="+encodeURIComponent(a):void 0}).join("&")},getVideo:function(a){var b="",c=a.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),d=a.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),e=a.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),f="";return c||d?(d&&(c=d),f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",v:""}),b='<iframe width="560" height="315" src="//'+c[1]+"/embed/"+c[2]+"?"+f+'" frameborder="0" allowfullscreen></iframe>'):e?(f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:j.settings.vimeoColor}),b='<iframe width="560" height="315"  src="//player.vimeo.com/video/'+e[1]+"?"+f+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'):b='<iframe width="560" height="315" src="'+a+'" frameborder="0" allowfullscreen></iframe>','<div class="swipebox-video-container" style="max-width:'+j.settings.videoMaxWidth+'px"><div class="swipebox-video">'+b+"</div></div>"},loadMedia:function(a,b){if(0===a.trim().indexOf("#"))b.call(c("<div>",{"class":"swipebox-inline-container"}).append(c(a).clone().toggleClass(j.settings.toggleClassOnLoad)));else if(!this.isVideo(a)){var d=c("<img>").on("load",function(){b.call(d)});d.attr("src",a)}},getNext:function(){var a,b=this,d=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current"));d+1<k.length?(a=c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src",a),d++,b.setSlide(d),b.preloadMedia(d+1),j.settings.nextSlide&&j.settings.nextSlide(d)):j.settings.loopAtEnd===!0?(a=c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(d).contents().find("iframe").attr("src",a),d=0,b.preloadMedia(d),b.setSlide(d),b.preloadMedia(d+1),j.settings.nextSlide&&j.settings.nextSlide(d)):(c("#swipebox-overlay").addClass("rightSpring"),setTimeout(function(){c("#swipebox-overlay").removeClass("rightSpring")},500))},getPrev:function(){var a,b=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current"));b>0?(a=c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src",a),b--,this.setSlide(b),this.preloadMedia(b-1),j.settings.prevSlide&&j.settings.prevSlide(b)):(c("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){c("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(a){},prevSlide:function(a){},closeSlide:function(){c("html").removeClass("swipebox-html"),c("html").removeClass("swipebox-touch"),c(a).trigger("resize"),this.destroy()},destroy:function(){c(a).unbind("keyup"),c("body").unbind("touchstart"),c("body").unbind("touchmove"),c("body").unbind("touchend"),c("#swipebox-slider").unbind(),c("#swipebox-overlay").remove(),c.isArray(e)||e.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),c.swipebox.isOpen=!1,j.settings.afterClose&&j.settings.afterClose()}},j.init()},c.fn.swipebox=function(a){if(!c.data(this,"_swipebox")){var b=new c.swipebox(this,a);this.data("_swipebox",b)}return this.data("_swipebox")}}(window,document,jQuery);
12
13
14if (!window['YT']) {var YT = {loading: 0,loaded: 0};}if (!window['YTConfig']) {var YTConfig = {'host': 'http://www.youtube.com'};}if (!YT.loading) {YT.loading = 1;(function(){var l = [];YT.ready = function(f) {if (YT.loaded) {f();} else {l.push(f);}};window.onYTReady = function() {YT.loaded = 1;for (var i = 0; i < l.length; i++) {try {l[i]();} catch (e) {}}};YT.setConfig = function(c) {for (var k in c) {if (c.hasOwnProperty(k)) {YTConfig[k] = c[k];}}};var a = document.createElement('script');a.type = 'text/javascript';a.id = 'www-widgetapi-script';a.src = 'https:' + '//s.ytimg.com/yts/jsbin/www-widgetapi-vflcGItZc/www-widgetapi.js';a.async = true;var b = document.getElementsByTagName('script')[0];b.parentNode.insertBefore(a, b);})();}
15
16/* jQuery tubular plugin
17|* by Sean McCambridge
18|* http://www.seanmccambridge.com/tubular
19|* version: 1.0
20|* updated: October 1, 2012
21|* since 2010
22|* licensed under the MIT License
23|* Enjoy.
24|* 
25|* Thanks,
26|* Sean */
27
28;(function ($, window) {
29
30	// test for feature support and return if failure
31	
32	// defaults
33	var defaults = {
34		ratio: 16/9, // usually either 4/3 or 16/9 -- tweak as needed
35		videoId: 'dkyq3sqlb0I',
36		mute: true,
37		repeat: true,
38		width: $(window).width(),
39		wrapperZIndex: 99,
40		playButtonClass: 'tubular-play',
41		pauseButtonClass: 'tubular-pause',
42		muteButtonClass: 'tubular-mute',
43		volumeUpClass: 'tubular-volume-up',
44		volumeDownClass: 'tubular-volume-down',
45		increaseVolumeBy: 10,
46		start: 0
47	};
48
49	// methods
50
51	var tubular = function(node, options) { // should be called on the wrapper div
52		var options = $.extend({}, defaults, options),
53			$body = $('.fullscreen-video'); // cache body node
54			$node = $(node); // cache wrapper node
55
56		// build container
57		var tubularContainer = '<div id="tubular-container" style="overflow: hidden; position: fixed; z-index: 1; width: 100%; height: 100%"><div id="tubular-player" style="position: absolute"></div></div><div id="tubular-shield" style="width: 100%; height: 100%; z-index: 2; position: absolute; left: 0; top: 0;display:none;"></div>';
58
59		// set up css prereq's, inject tubular container and set up wrapper defaults
60		$('html,body').css({'width': '100%', 'height': '100%'});
61		$body.prepend(tubularContainer);
62		$node.css({position: 'relative', 'z-index': options.wrapperZIndex});
63
64		// set up iframe player, use global scope so YT api can talk
65		window.player;
66
67		window.onYouTubeIframeAPIReady = function() {
68			loadVideo();
69		};
70
71		window.onPlayerReady = function(e) {
72			resize();
73			if (options.mute) e.target.mute();
74			if (slideVideoAutoPlay) {
75				e.target.seekTo(options.start);
76				e.target.playVideo();
77			}
78		};
79
80		window.onPlayerStateChange = function(event) {
81			if (event.data === 0 && options.repeat) {
82				player.seekTo(options.start);
83			}
84			if (event.data == YT.PlayerState.ENDED) {
85				if (slideVideoStillImage && !slideVideoRepeat) {
86					$( ".fullscreen-video" ).replaceWith( '<div class="fullscreen-image" style="height: 100%;width: 100%;position: absolute;background-size: cover;background-repeat: no-repeat;background-position: center center;background-image:url('+slideVideoStillImage+');"></div>' );
87				}
88			}
89		};
90
91		var loadVideo = function() {
92			player = new YT.Player('tubular-player', {
93				width: options.width,
94				height: Math.ceil(options.width / options.ratio),
95				videoId: options.videoId,
96				playerVars: {
97					controls: 0,
98					showinfo: 0,
99					autoPlay: 0,
100					modestbranding: 1,
101					wmode: 'transparent',
102					rel: 0
103				},
104				events: {
105					'onReady': onPlayerReady,
106					'onStateChange': onPlayerStateChange
107				}
108			});
109		};
110
111		// resize handler updates width, height and offset of player after resize/init
112		var resize = function() {
113			var width = $(window).width(),
114				pWidth, // player width, to be defined
115				height = $(window).height(),
116				pHeight, // player height, tbd
117				$tubularPlayer = $('#tubular-player');
118
119			// when screen aspect ratio differs from video, video must center and underlay one dimension
120			if (width / options.ratio < height) { // if new video height < window height (gap underneath)
121				pWidth = Math.ceil(height * options.ratio); // get new player width
122				$tubularPlayer.width(pWidth).height(height).css({left: (width - pWidth) / 2, top: 0}); // player width is greater, offset left; reset top
123			} else { // new video width < window width (gap to right)
124				pHeight = Math.ceil(width / options.ratio); // get new player height
125				$tubularPlayer.width(width).height(pHeight).css({left: 0, top: (height - pHeight) / 2}); // player height is greater, offset top; reset left
126			}
127		};
128
129		// events
130		$(window).on('resize.tubular', function() {
131			resize();
132		});
133
134		$(window).on('reload.tubular', function() {
135			loadVideo();
136		});
137	};
138
139	// create plugin
140	$.fn.tubular = function (options) {
141		return this.each(function () {
142			if (!$.data(this, 'tubular_instantiated')) {
143				$.data(this, 'tubular_instantiated', tubular(this, options));
144			}
145		});
146	};
147})(jQuery, window);
148
149/* ========================================================================
150 * Bootstrap: transition.js v3.0.0
151 * http://twbs.github.com/bootstrap/javascript.html#transitions
152 * ========================================================================
153 * Copyright 2013 Twitter, Inc.
154 *
155 * Licensed under the Apache License, Version 2.0 (the "License");
156 * you may not use this file except in compliance with the License.
157 * You may obtain a copy of the License at
158 *
159 * http://www.apache.org/licenses/LICENSE-2.0
160 *
161 * Unless required by applicable law or agreed to in writing, software
162 * distributed under the License is distributed on an "AS IS" BASIS,
163 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
164 * See the License for the specific language governing permissions and
165 * limitations under the License.
166 * ======================================================================== */
167+function($){"use strict";function transitionEnd(){var el=document.createElement('bootstrap')
168var transEndEventNames={'WebkitTransition':'webkitTransitionEnd','MozTransition':'transitionend','OTransition':'oTransitionEnd otransitionend','transition':'transitionend'}
169for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}}}
170$.fn.emulateTransitionEnd=function(duration){var called=false,$el=this
171$(this).one($.support.transition.end,function(){called=true})
172var callback=function(){if(!called)$($el).trigger($.support.transition.end)}
173setTimeout(callback,duration)
174return this}
175$(function(){$.support.transition=transitionEnd()})}(window.jQuery);
176/*
177 * jQuery throttle / debounce - v1.1 - 3/7/2010
178 * http://benalman.com/projects/jquery-throttle-debounce-plugin/
179 * 
180 * Copyright (c) 2010 "Cowboy" Ben Alman
181 * Dual licensed under the MIT and GPL licenses.
182 * http://benalman.com/about/license/
183 */
184(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
185
186/* ========================================================================
187 * Bootstrap: carousel.js v3.0.0
188 * http://twbs.github.com/bootstrap/javascript.html#carousel
189 * ========================================================================
190 * Copyright 2012 Twitter, Inc.
191 *
192 * Licensed under the Apache License, Version 2.0 (the "License");
193 * you may not use this file except in compliance with the License.
194 * You may obtain a copy of the License at
195 *
196 * http://www.apache.org/licenses/LICENSE-2.0
197 *
198 * Unless required by applicable law or agreed to in writing, software
199 * distributed under the License is distributed on an "AS IS" BASIS,
200 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 * See the License for the specific language governing permissions and
202 * limitations under the License.
203 * ======================================================================== */
204+function($){"use strict";var Carousel=function(element,options){this.$element=$(element)
205this.$indicators=this.$element.find('.carousel-indicators')
206this.options=options
207this.paused=this.sliding=this.interval=this.$active=this.$items=null
208this.options.pause=='hover'&&this.$element.on('mouseenter',$.proxy(this.pause,this)).on('mouseleave',$.proxy(this.cycle,this))}
209Carousel.DEFAULTS={interval:5000,pause:'hover',wrap:true}
210Carousel.prototype.cycle=function(e){e||(this.paused=false)
211this.interval&&clearInterval(this.interval)
212this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval))
213return this}
214Carousel.prototype.getActiveIndex=function(){this.$active=this.$element.find('.item.active')
215this.$items=this.$active.parent().children()
216return this.$items.index(this.$active)}
217Carousel.prototype.to=function(pos){var that=this
218var activeIndex=this.getActiveIndex()
219if(pos>(this.$items.length-1)||pos<0)return
220if(this.sliding)return this.$element.one('slid',function(){that.to(pos)})
221if(activeIndex==pos)return this.pause().cycle()
222return this.slide(pos>activeIndex?'next':'prev',$(this.$items[pos]))}
223Carousel.prototype.pause=function(e){e||(this.paused=true)
224if(this.$element.find('.next, .prev').length&&$.support.transition.end){this.$element.trigger($.support.transition.end)
225this.cycle(true)}
226this.interval=clearInterval(this.interval)
227return this}
228Carousel.prototype.next=function(){if(this.sliding)return
229return this.slide('next')}
230Carousel.prototype.prev=function(){if(this.sliding)return
231return this.slide('prev')}
232Carousel.prototype.slide=function(type,next){var $active=this.$element.find('.item.active')
233var $next=next||$active[type]()
234var isCycling=this.interval
235var direction=type=='next'?'left':'right'
236var fallback=type=='next'?'first':'last'
237var that=this
238if(!$next.length){if(!this.options.wrap)return
239$next=this.$element.find('.item')[fallback]()}
240this.sliding=true
241isCycling&&this.pause()
242var e=$.Event('slide.bs.carousel',{relatedTarget:$next[0],direction:direction})
243if($next.hasClass('active'))return
244if(this.$indicators.length){this.$indicators.find('.active').removeClass('active')
245this.$element.one('slid',function(){var $nextIndicator=$(that.$indicators.children()[that.getActiveIndex()])
246$nextIndicator&&$nextIndicator.addClass('active')})}
247if($.support.transition&&this.$element.hasClass('slide')){this.$element.trigger(e)
248if(e.isDefaultPrevented())return
249$next.addClass(type)
250$next[0].offsetWidth
251$active.addClass(direction)
252$next.addClass(direction)
253$active.one($.support.transition.end,function(){$next.removeClass([type,direction].join(' ')).addClass('active')
254$active.removeClass(['active',direction].join(' '))
255that.sliding=false
256setTimeout(function(){that.$element.trigger('slid')},0)}).emulateTransitionEnd(900)}else{this.$element.trigger(e)
257if(e.isDefaultPrevented())return
258$active.removeClass('active')
259$next.addClass('active')
260this.sliding=false
261this.$element.trigger('slid')}
262isCycling&&this.cycle()
263return this}
264var old=$.fn.carousel
265$.fn.carousel=function(option){return this.each(function(){var $this=$(this)
266var data=$this.data('bs.carousel')
267var options=$.extend({},Carousel.DEFAULTS,$this.data(),typeof option=='object'&&option)
268var action=typeof option=='string'?option:options.slide
269if(!data)$this.data('bs.carousel',(data=new Carousel(this,options)))
270if(typeof option=='number')data.to(option)
271else if(action)data[action]()
272else if(options.interval)data.pause().cycle()})}
273$.fn.carousel.Constructor=Carousel
274$.fn.carousel.noConflict=function(){$.fn.carousel=old
275return this}
276$(document).on('click.bs.carousel.data-api','[data-slide], [data-slide-to]',function(e){var $this=$(this),href
277var $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''))
278var options=$.extend({},$target.data(),$this.data())
279var slideIndex=$this.attr('data-slide-to')
280if(slideIndex)options.interval=false
281$target.carousel(options)
282if(slideIndex=$this.attr('data-slide-to')){$target.data('bs.carousel').to(slideIndex)}
283e.preventDefault()})
284$(window).on('load',function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this)
285$carousel.carousel($carousel.data())})})}(window.jQuery);
286
287/*!
288 * jQuery Transit - CSS3 transitions and transformations
289 * (c) 2011-2012 Rico Sta. Cruz <[email protected]>
290 * MIT Licensed.
291 *
292 * http://ricostacruz.com/jquery.transit
293 * http://github.com/rstacruz/jquery.transit
294 */
295(function(k){k.transit={version:"0.9.9",propertyMap:{marginLeft:"margin",marginRight:"margin",marginBottom:"margin",marginTop:"margin",paddingLeft:"padding",paddingRight:"padding",paddingBottom:"padding",paddingTop:"padding"},enabled:true,useTransitionEnd:false};var d=document.createElement("div");var q={};function b(v){if(v in d.style){return v}var u=["Moz","Webkit","O","ms"];var r=v.charAt(0).toUpperCase()+v.substr(1);if(v in d.style){return v}for(var t=0;t<u.length;++t){var s=u[t]+r;if(s in d.style){return s}}}function e(){d.style[q.transform]="";d.style[q.transform]="rotateY(90deg)";return d.style[q.transform]!==""}var a=navigator.userAgent.toLowerCase().indexOf("chrome")>-1;q.transition=b("transition");q.transitionDelay=b("transitionDelay");q.transform=b("transform");q.transformOrigin=b("transformOrigin");q.transform3d=e();var i={transition:"transitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",WebkitTransition:"webkitTransitionEnd",msTransition:"MSTransitionEnd"};var f=q.transitionEnd=i[q.transition]||null;for(var p in q){if(q.hasOwnProperty(p)&&typeof k.support[p]==="undefined"){k.support[p]=q[p]}}d=null;k.cssEase={_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)"};k.cssHooks["transit:transform"]={get:function(r){return k(r).data("transform")||new j()},set:function(s,r){var t=r;if(!(t instanceof j)){t=new j(t)}if(q.transform==="WebkitTransform"&&!a){s.style[q.transform]=t.toString(true)}else{s.style[q.transform]=t.toString()}k(s).data("transform",t)}};
295k.cssHooks.transform={set:k.cssHooks["transit:transform"].set};if(k.fn.jquery<"1.8"){k.cssHooks.transformOrigin={get:function(r){return r.style[q.transformOrigin]},set:function(r,s){r.style[q.transformOrigin]=s}};k.cssHooks.transition={get:function(r){return r.style[q.transition]},set:function(r,s){r.style[q.transition]=s}}}n("scale");n("translate");n("rotate");n("rotateX");n("rotateY");n("rotate3d");n("perspective");n("skewX");n("skewY");n("x",true);n("y",true);function j(r){if(typeof r==="string"){this.parse(r)}return this}j.prototype={setFromString:function(t,s){var r=(typeof s==="string")?s.split(","):(s.constructor===Array)?s:[s];r.unshift(t);j.prototype.set.apply(this,r)},set:function(s){var r=Array.prototype.slice.apply(arguments,[1]);if(this.setter[s]){this.setter[s].apply(this,r)}else{this[s]=r.join(",")}},get:function(r){if(this.getter[r]){return this.getter[r].apply(this)}else{return this[r]||0}},setter:{rotate:function(r){this.rotate=o(r,"deg")},rotateX:function(r){this.rotateX=o(r,"deg")},rotateY:function(r){this.rotateY=o(r,"deg")},scale:function(r,s){if(s===undefined){s=r}this.scale=r+","+s},skewX:function(r){this.skewX=o(r,"deg")},skewY:function(r){this.skewY=o(r,"deg")},perspective:function(r){this.perspective=o(r,"px")},x:function(r){this.set("translate",r,null)},y:function(r){this.set("translate",null,r)},translate:function(r,s){if(this._translateX===undefined){this._translateX=0}if(this._translateY===undefined){this._translateY=0}if(r!==null&&r!==undefined){this._translateX=o(r,"px")}if(s!==null&&s!==undefined){this._translateY=o(s,"px")}
295this.translate=this._translateX+","+this._translateY}},getter:{x:function(){return this._translateX||0},y:function(){return this._translateY||0},scale:function(){var r=(this.scale||"1,1").split(",");if(r[0]){r[0]=parseFloat(r[0])}if(r[1]){r[1]=parseFloat(r[1])}return(r[0]===r[1])?r[0]:r},rotate3d:function(){var t=(this.rotate3d||"0,0,0,0deg").split(",");for(var r=0;r<=3;++r){if(t[r]){t[r]=parseFloat(t[r])}}if(t[3]){t[3]=o(t[3],"deg")}return t}},parse:function(s){var r=this;s.replace(/([a-zA-Z0-9]+)\((.*?)\)/g,function(t,v,u){r.setFromString(v,u)})},toString:function(t){var s=[];for(var r in this){if(this.hasOwnProperty(r)){if((!q.transform3d)&&((r==="rotateX")||(r==="rotateY")||(r==="perspective")||(r==="transformOrigin"))){continue}if(r[0]!=="_"){if(t&&(r==="scale")){s.push(r+"3d("+this[r]+",1)")}else{if(t&&(r==="translate")){s.push(r+"3d("+this[r]+",0)")}else{s.push(r+"("+this[r]+")")}}}}}return s.join(" ")}};function m(s,r,t){if(r===true){s.queue(t)}else{if(r){s.queue(r,t)}else{t()}}}function h(s){var r=[];k.each(s,function(t){t=k.camelCase(t);t=k.transit.propertyMap[t]||k.cssProps[t]||t;t=c(t);if(k.inArray(t,r)===-1){r.push(t)}});return r}function g(s,v,x,r){var t=h(s);if(k.cssEase[x]){x=k.cssEase[x]}var w=""+l(v)+" "+x;if(parseInt(r,10)>0){w+=" "+l(r)}var u=[];k.each(t,function(z,y){u.push(y+" "+w)});return u.join(", ")}k.fn.transition=k.fn.transit=function(z,s,y,C){var D=this;var u=0;var w=true;if(typeof s==="function"){C=s;s=undefined}if(typeof y==="function"){C=y;y=undefined}if(typeof z.easing!=="undefined"){y=z.easing;delete z.easing}if(typeof z.duration!=="undefined"){s=z.duration;delete z.duration}if(typeof z.complete!=="undefined"){C=z.complete;delete z.complete}if(typeof z.queue!=="undefined"){w=z.queue;delete z.queue}if(typeof z.delay!=="undefined"){u=z.delay;delete z.delay}if(typeof s==="undefined"){s=k.fx.speeds._default}if(typeof y==="undefined"){y=k.cssEase._default}s=l(s);var E=g(z,s,y,u);var B=k.transit.enabled&&q.transition;var t=B?(parseInt(s,10)+parseInt(u,10)):0;if(t===0){var A=function(F){D.css(z);if(C){C.apply(D)}if(F){F()}};m(D,w,A);return D}var x={};var r=function(H){var G=false;var F=function(){if(G){D.unbind(f,F)}if(t>0){D.each(function(){this.style[q.transition]=(x[this]||null)})}if(typeof C==="function"){C.apply(D)}if(typeof H==="function"){H()}};if((t>0)&&(f)&&(k.transit.useTransitionEnd)){G=true;D.bind(f,F)}else{window.setTimeout(F,t)}D.each(function(){if(t>0){this.style[q.transition]=E}k(this).css(z)})};var v=function(F){this.offsetWidth;r(F)};m(D,w,v);return this};function n(s,r){if(!r){k.cssNumber[s]=true}k.transit.propertyMap[s]=q.transform;k.cssHooks[s]={get:function(v){var u=k(v).css("transit:transform");return u.get(s)},set:function(v,w){var u=k(v).css("transit:transform");u.setFromString(s,w);k(v).css({"transit:transform":u})}}}function c(r){return r.replace(/([A-Z])/g,function(s){return"-"+s.toLowerCase()})}function o(s,r){if((typeof s==="string")&&(!s.match(/^[\-0-9\.]+$/))){return s}else{return""+s+r}}function l(s){var r=s;if(k.fx.speeds[r]){r=k.fx.speeds[r]}return o(r,"ms")}k.transit.getTransitionValue=g})(jQuery);
296
297
298/*!
299 * imagesLoaded PACKAGED v3.0.4
300 * JavaScript is all like "You images are done yet or what?"
301 * MIT License
302 */
303
304//(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1
304);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){var t=document.documentElement,n=function(){};t.addEventListener?n=function(e,t,n){e.addEventListener(t,n,!1)}:t.attachEvent&&(n=function(t,n,i){t[n+i]=i.handleEvent?function(){var t=e.event;t.target=t.target||t.srcElement,i.handleEvent.call(i,t)}:function(){var n=e.event;n.target=n.target||n.srcElement,i.call(t,n)},t.attachEvent("on"+n,t[n+i])});var i=function(){};t.removeEventListener?i=function(e,t,n){e.removeEventListener(t,n,!1)}:t.detachEvent&&(i=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var r={bind:n,unbind:i};"function"==typeof define&&define.amd?define("eventie/eventie",r):e.eventie=r}(this),function(e){function t(e,t){for(var n in t)e[n]=t[n];return e}function n(e){return"[object Array]"===c.call(e)}function i(e){var t=[];if(n(e))t=e;else if("number"==typeof e.length)for(var i=0,r=e.length;r>i;i++)t.push(e[i]);else t.push(e);return t}function r(e,n){function r(e,n,s){if(!(this instanceof r))return new r(e,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=i(e),this.options=t({},this.options),"function"==typeof n?s=n:t(this.options,n),s&&this.on("always",s),this.getImages(),o&&(this.jqDeferred=new o.Deferred);var a=this;setTimeout(function(){a.check()})}function c(e){this.img=e}r.prototype=new e,r.prototype.options={},r.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);for(var i=n.querySelectorAll("img"),r=0,o=i.length;o>r;r++){var s=i[r];this.addImage(s)}}},r.prototype.addImage=function(e){var t=new c(e);this.images.push(t)},r.prototype.check=function(){function e(e,r){return t.options.debug&&a&&s.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},r.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify(t,e)})},r.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},o&&(o.fn.imagesLoaded=function(e,t){var n=new r(this,e,t);return n.jqDeferred.promise(o(this))});var f={};return c.prototype=new e,c.prototype.check=function(){var e=f[this.img.src];if(e)return this.useCached(e),void 0;if(f[this.img.src]=this,this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this.proxyImage=new Image;n.bind(t,"load",this),n.bind(t,"error",this),t.src=this.img.src},c.prototype.useCached=function(e){if(e.isConfirmed)this.confirm(e.isLoaded,"cached was confirmed");else{var t=this;e.on("confirm",function(e){return t.confirm(e.isLoaded,"cache emitted confirmed"),!0})}},c.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit("confirm",this,t)},c.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},c.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindProxyEvents()},c.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindProxyEvents()},c.prototype.unbindProxyEvents=function(){n.unbind(this.proxyImage,"load",this),n.unbind(this.proxyImage,"error",this)},r}var o=e.jQuery,s=e.console,a=s!==void 0,c=Object.prototype.toString;"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],r):e.imagesLoaded=r(e.EventEmitter,e.eventie)}(window);
305/*!
306 * imagesLoaded PACKAGED v3.1.4
307 * JavaScript is all like "You images are done yet or what?"
308 * MIT License
309 */
310
311(function(){function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,o=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},i.addListener=function(e,n){var i,r=this.getListenersAsObject(e),o="object"==typeof n;for(i in r)r.hasOwnProperty(i)&&-1===t(r[i],n)&&r[i].push(o?n:{listener:n,once:!1});return this},i.on=n("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=n("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,n){var i,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&(i=t(o[r],n),-1!==i&&o[r].splice(i,1));return this},i.off=n("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},i.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if("object"===n)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},i.removeAllListeners=n("removeEvent"),i.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].length;i--;)n=s[r][i],n.once===!0&&this.removeListener(e,n.listener),o=n.listener.apply(this,t||[]),o===this._getOnceReturnValue()&&this.removeListener(e,n.listener);return this},i.trigger=n("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1
311);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return r.EventEmitter=o,e},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return e}):"object"==typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){function t(t){var n=e.event;return n.target=n.target||n.srcElement||t,n}var n=document.documentElement,i=function(){};n.addEventListener?i=function(e,t,n){e.addEventListener(t,n,!1)}:n.attachEvent&&(i=function(e,n,i){e[n+i]=i.handleEvent?function(){var n=t(e);i.handleEvent.call(i,n)}:function(){var n=t(e);i.call(e,n)},e.attachEvent("on"+n,e[n+i])});var r=function(){};n.removeEventListener?r=function(e,t,n){e.removeEventListener(t,n,!1)}:n.detachEvent&&(r=function(e,t,n){e.detachEvent("on"+t,e[t+n]);try{delete e[t+n]}catch(i){e[t+n]=void 0}});var o={bind:i,unbind:r};"function"==typeof define&&define.amd?define("eventie/eventie",o):e.eventie=o}(this),function(e,t){"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(n,i){return t(e,n,i)}):"object"==typeof exports?module.exports=t(e,require("eventEmitter"),require("eventie")):e.imagesLoaded=t(e,e.EventEmitter,e.eventie)}(this,function(e,t,n){function i(e,t){for(var n in t)e[n]=t[n];return e}function r(e){return"[object Array]"===d.call(e)}function o(e){var t=[];if(r(e))t=e;else if("number"==typeof e.length)for(var n=0,i=e.length;i>n;n++)t.push(e[n]);else t.push(e);return t}function s(e,t,n){if(!(this instanceof s))return new s(e,t);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=o(e),this.options=i({},this.options),"function"==typeof t?n=t:i(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred);var r=this;setTimeout(function(){r.check()})}function c(e){this.img=e}function f(e){this.src=e,v[e]=this}var a=e.jQuery,u=e.console,h=u!==void 0,d=Object.prototype.toString;s.prototype=new t,s.prototype.options={},s.prototype.getImages=function(){this.images=[];for(var e=0,t=this.elements.length;t>e;e++){var n=this.elements[e];"IMG"===n.nodeName&&this.addImage(n);for(var i=n.querySelectorAll("img"),r=0,o=i.length;o>r;r++){var s=i[r];this.addImage(s)}}},s.prototype.addImage=function(e){var t=new c(e);this.images.push(t)},s.prototype.check=function(){function e(e,r){return t.options.debug&&h&&u.log("confirm",e,r),t.progress(e),n++,n===i&&t.complete(),!0}var t=this,n=0,i=this.images.length;if(this.hasAnyBroken=!1,!i)return this.complete(),void 0;for(var r=0;i>r;r++){var o=this.images[r];o.on("confirm",e),o.check()}},s.prototype.progress=function(e){this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded;var t=this;setTimeout(function(){t.emit("progress",t,e),t.jqDeferred&&t.jqDeferred.notify&&t.jqDeferred.notify(t,e)})},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var t=this;setTimeout(function(){if(t.emit(e,t),t.emit("always",t),t.jqDeferred){var n=t.hasAnyBroken?"reject":"resolve";t.jqDeferred[n](t)}})},a&&(a.fn.imagesLoaded=function(e,t){var n=new s(this,e,t);return n.jqDeferred.promise(a(this))}),c.prototype=new t,c.prototype.check=function(){var e=v[this.img.src]||new f(this.img.src);if(e.isConfirmed)return this.confirm(e.isLoaded,"cached was confirmed"),void 0;if(this.img.complete&&void 0!==this.img.naturalWidth)return this.confirm(0!==this.img.naturalWidth,"naturalWidth"),void 0;var t=this;e.on("confirm",function(e,n){return t.confirm(e.isLoaded,n),!0}),e.check()},c.prototype.confirm=function(e,t){this.isLoaded=e,this.emit("confirm",this,t)};var v={};return f.prototype=new t,f.prototype.check=function(){if(!this.isChecked){var e=new Image;n.bind(e,"load",this),n.bind(e,"error",this),e.src=this.src,this.isChecked=!0}},f.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},f.prototype.onload=function(e){this.confirm(!0,"onload"),this.unbindProxyEvents(e)},f.prototype.onerror=function(e){this.confirm(!1,"onerror"),this.unbindProxyEvents(e)},f.prototype.confirm=function(e,t){this.isConfirmed=!0,this.isLoaded=e,this.emit
311("confirm",this,t)},f.prototype.unbindProxyEvents=function(e){n.unbind(e.target,"load",this),n.unbind(e.target,"error",this)},s});
312
313/*! Superslides - v0.6.2 - 2013-07-10
314* https://github.com/nicinabox/superslides
315* Copyright (c) 2013 Nic Aitch; Licensed MIT */
316(function(i,t){var n,e="superslides";n=function(n,e){this.options=t.extend({play:!1,animation_speed:600,animation_easing:"swing",animation:"slide",inherit_width_from:i,inherit_height_from:i,pagination:!0,hashchange:!1,scrollable:!0,elements:{preserve:".preserve",nav:".slides-navigation",container:".slides-container",pagination:".slides-pagination"}},e);var s=this,o=t("<div>",{"class":"slides-control"}),a=1;this.$el=t(n),this.$container=this.$el.find(this.options.elements.container);var r=function(){return a=s._findMultiplier(),s.$el.on("click",s.options.elements.nav+" a",function(i){i.preventDefault(),s.stop(),t(this).hasClass("next")?s.animate("next",function(){s.start()}):s.animate("prev",function(){s.start()})}),t(document).on("keyup",function(i){37===i.keyCode&&s.animate("prev"),39===i.keyCode&&s.animate("next")}),t(i).on("resize",function(){setTimeout(function(){var i=s.$container.children();s.width=s._findWidth(),s.height=s._findHeight(),i.css({width:s.width,left:s.width}),s.css.containers(),s.css.images()},10)}),t(i).on("hashchange",function(){var i,t=s._parseHash();i=t&&!isNaN(t)?s._upcomingSlide(t-1):s._upcomingSlide(t),i>=0&&i!==s.current&&s.animate(i)}),s.pagination._events(),s.start(),s},h={containers:function(){s.init?(s.$el.css({height:s.height}),s.$control.css({width:s.width*a,left:-s.width}),s.$container.css({})):(t("body").css({margin:0}),s.$el.css({position:"relative",overflow:"hidden",width:"100%",height:s.height}),s.$control.css({position:"relative",transform:"translate3d(0)",height:"100%",width:s.width*a,left:-s.width}),s.$container.css({display:"none",margin:"0",padding:"0",listStyle:"none",position:"relative",height:"100%"})),1===s.size()&&s.$el.find(s.options.elements.nav).hide()},images:function(){var i=s.$container.find("img").not(s.options.elements.preserve);i.removeAttr("width").removeAttr("height").css({"-webkit-backface-visibility":"hidden","-ms-interpolation-mode":"bicubic",position:"absolute",left:"0",top:"0","z-index":"-1","max-width":"none"}),i.each(function(){var i=s.image._aspectRatio(this),n=this;if(t.data(this,"processed"))s.image._scale(n,i),s.image._center(n,i);else{var e=new Image;e.onload=function(){s.image._scale(n,i),s.image._center(n,i),t.data(n,"processed",!0)},e.src=this.src}})},children:function(){var i=s.$container.children();i.is("img")&&(i.each(function(){if(t(this).is("img")){t(this).wrap("<div>");var i=t(this).attr("id");t(this).removeAttr("id"),t(this).parent().attr("id",i)}}),i=s.$container.children()),s.init||i.css({display:"none",left:2*s.width}),i.css({position:"absolute",overflow:"hidden",height:"100%",width:s.width,top:0,zIndex:0})}},c={slide:function(i,t){var n=s.$container.children(),e=n.eq(i.upcoming_slide);e.css({left:i.upcoming_position,display:"block"}),s.$control.animate({left:i.offset},s.options.animation_speed,s.options.animation_easing,function(){s.size()>1&&(s.$control.css({left:-s.width}),n.eq(i.upcoming_slide).css({left:s.width,zIndex:2}),i.outgoing_slide>=0&&n.eq(i.outgoing_slide).css({left:s.width,display:"none",zIndex:0})),t()})},fade:function(i,t){var n=this,e=n.$container.children(),s=e.eq(i.outgoing_slide),o=e.eq(i.upcoming_slide);o.css({left:this.width,opacity:1,display:"block"}),i.outgoing_slide>=0?s.animate({opacity:0}
316,n.options.animation_speed,n.options.animation_easing,function(){n.size()>1&&(e.eq(i.upcoming_slide).css({zIndex:2}),i.outgoing_slide>=0&&e.eq(i.outgoing_slide).css({opacity:1,display:"none",zIndex:0})),t()}):(o.css({zIndex:2}),t())}};c=t.extend(c,t.fn.superslides.fx);var d={_centerY:function(i){var n=t(i);n.css({top:(s.height-n.height())/2})},_centerX:function(i){var n=t(i);n.css({left:(s.width-n.width())/2})},_center:function(i){s.image._centerX(i),s.image._centerY(i)},_aspectRatio:function(i){if(!i.naturalHeight&&!i.naturalWidth){var t=new Image;t.src=i.src,i.naturalHeight=t.height,i.naturalWidth=t.width}return i.naturalHeight/i.naturalWidth},_scale:function(i,n){n=n||s.image._aspectRatio(i);var e=s.height/s.width,o=t(i);e>n?o.css({height:s.height,width:s.height/n}):o.css({height:s.width*n,width:s.width})}},l={_setCurrent:function(i){if(s.$pagination){var t=s.$pagination.children();t.removeClass("current"),t.eq(i).addClass("current")}},_addItem:function(i){var n=i+1,e=n,o=s.$container.children().eq(i),a=o.attr("id");a&&(e=a);var r=t("<a>",{href:"#"+e,text:e});r.appendTo(s.$pagination)},_setup:function(){if(s.options.pagination&&1!==s.size()){var i=t("<nav>",{"class":s.options.elements.pagination.replace(/^\./,"")});s.$pagination=i.appendTo(s.$el);for(var n=0;s.size()>n;n++)s.pagination._addItem(n)}},_events:function(){s.$el.on("click",s.options.elements.pagination+" a",function(i){i.preventDefault();var t=s._parseHash(this.hash),n=s._upcomingSlide(t-1);n!==s.current&&s.animate(n,function(){s.start()})})}};return this.css=h,this.image=d,this.pagination=l,this.fx=c,this.animation=this.fx[this.options.animation],this.$control=this.$container.wrap(o).parent(".slides-control"),s._findPositions(),s.width=s._findWidth(),s.height=s._findHeight(),this.css.children(),this.css.containers(),this.css.images(),this.pagination._setup(),r()},n.prototype={_findWidth:function(){return t(this.options.inherit_width_from).width()},_findHeight:function(){return t(this.options.inherit_height_from).height()},_findMultiplier:function(){return 1===this.size()?1:3},_upcomingSlide:function(i){if(/next/.test(i))return this._nextInDom();if(/prev/.test(i))return this._prevInDom();if(/\d/.test(i))return+i;if(i&&/\w/.test(i)){var t=this._findSlideById(i);return t>=0?t:0}return 0},_findSlideById:function(i){return this.$container.find("#"+i).index()},_findPositions:function(i,t){t=t||this,void 0===i&&(i=-1),t.current=i,t.next=t._nextInDom(),t.prev=t._prevInDom()},_nextInDom:function(){var i=this.current+1;return i===this.size()&&(i=0),i},_prevInDom:function(){var i=this.current-1;return 0>i&&(i=this.size()-1),i},_parseHash:function(t){return t=t||i.location.hash,t=t.replace(/^#/,""),t&&!isNaN(+t)&&(t=+t),t},size:function(){return this.$container.children().length},destroy:function(){return this.$el.removeData()},update:function(){this.css.children(),this.css.containers(),this.css.images(),this.pagination._addItem(this.size()),this._findPositions(this.current),this.$el.trigger("updated.slides")},stop:function(){clearInterval(this.play_id),delete this.play_id,this.$el.trigger("stopped.slides")},start:function(){var n=this;n.options.hashchange?t(i).trigger("hashchange"):this.animate(),this.options.play&&(this.play_id&&this.stop(),this.play_id=setInterval(function(){n.animate()},this.options.play)),this.$el.trigger("started.slides")},animate:function(t,n){var e=this,s={};if(!(this.animating||(this.animating=!0,void 0===t&&(t="next"),s.upcoming_slide=this._upcomingSlide(t),s.upcoming_slide>=this.size()))){if(s.outgoing_slide=this.current,s.upcoming_position=2*this.width,s.offset=-s.upcoming_position,("prev"===t||s.outgoing_slide>t)&&(s.upcoming_position=0,s.offset=0),e.size()>1&&e.pagination._setCurrent(s.upcoming_slide),e.options.hashchange){var o=s.upcoming_slide+1,a=e.$container.children(":eq("+s.upcoming_slide+")").attr("id");i.location.hash=a?a:o}e.$el.trigger("animating.slides",[s]),e.animation(s,function(){e._findPositions(s.upcoming_slide,e),"function"==typeof n&&n(),e.animating=!1,e.$el.trigger("animated.slides"),e.init||(e.$el.trigger("init.slides"),e.init=!0,e.$container.fadeIn("fast"))})}}},t.fn[e]=function(i,s){var o=[];return this.each(function(){var a,r,h;return a=t(this),r=a.data(e),h="object"==typeof i&&i,r||(o=a.data(e,r=new n(this,h))),"string"==typeof i&&(o=r[i],"function"==typeof o)?o=o.call(r,s):void 0}),o},t.fn[e].fx={}})(this,jQuery);
317
318/*
319 *  jQuery OwlCarousel v1.3.3
320 *
321 *  Copyright (c) 2013 Bartosz Wojciechowski
322 *  http://www.owlgraphic.com/owlcarousel/
323 *
324 *  Licensed under MIT
325 *
326 */
vendor: 23,890 bytes, lines 327-373
327"function"!==typeof Object.create&&(Object.create=function(f){function g(){}g.prototype=f;return new g});
328(function(f,g,k){var l={init:function(a,b){this.$elem=f(b);this.options=f.extend({},f.fn.owlCarousel.options,this.$elem.data(),a);this.userOptions=a;this.loadContent()},loadContent:function(){function a(a){var d,e="";if("function"===typeof b.options.jsonSuccess)b.options.jsonSuccess.apply(this,[a]);else{for(d in a.owl)a.owl.hasOwnProperty(d)&&(e+=a.owl[d].item);b.$elem.html(e)}b.logIn()}var b=this,e;"function"===typeof b.options.beforeInit&&b.options.beforeInit.apply(this,[b.$elem]);"string"===typeof b.options.jsonPath?
329(e=b.options.jsonPath,f.getJSON(e,a)):b.logIn()},logIn:function(){this.$elem.data("owl-originalStyles",this.$elem.attr("style"));this.$elem.data("owl-originalClasses",this.$elem.attr("class"));this.$elem.css({opacity:0});this.orignalItems=this.options.items;this.checkBrowser();this.wrapperWidth=0;this.checkVisible=null;this.setVars()},setVars:function(){if(0===this.$elem.children().length)return!1;this.baseClass();this.eventTypes();this.$userItems=this.$elem.children();this.itemsAmount=this.$userItems.length;
330this.wrapItems();this.$owlItems=this.$elem.find(".owl-item");this.$owlWrapper=this.$elem.find(".owl-wrapper");this.playDirection="next";this.prevItem=0;this.prevArr=[0];this.currentItem=0;this.customEvents();this.onStartup()},onStartup:function(){this.updateItems();this.calculateAll();this.buildControls();this.updateControls();this.response();this.moveEvents();this.stopOnHover();this.owlStatus();!1!==this.options.transitionStyle&&this.transitionTypes(this.options.transitionStyle);!0===this.options.autoPlay&&
331(this.options.autoPlay=5E3);this.play();this.$elem.find(".owl-wrapper").css("display","block");this.$elem.is(":visible")?this.$elem.css("opacity",1):this.watchVisibility();this.onstartup=!1;this.eachMoveUpdate();"function"===typeof this.options.afterInit&&this.options.afterInit.apply(this,[this.$elem])},eachMoveUpdate:function(){!0===this.options.lazyLoad&&this.lazyLoad();!0===this.options.autoHeight&&this.autoHeight();this.onVisibleItems();"function"===typeof this.options.afterAction&&this.options.afterAction.apply(this,
332[this.$elem])},updateVars:function(){"function"===typeof this.options.beforeUpdate&&this.options.beforeUpdate.apply(this,[this.$elem]);this.watchVisibility();this.updateItems();this.calculateAll();this.updatePosition();this.updateControls();this.eachMoveUpdate();"function"===typeof this.options.afterUpdate&&this.options.afterUpdate.apply(this,[this.$elem])},reload:function(){var a=this;g.setTimeout(function(){a.updateVars()},0)},watchVisibility:function(){var a=this;if(!1===a.$elem.is(":visible"))a.$elem.css({opacity:0}),
333g.clearInterval(a.autoPlayInterval),g.clearInterval(a.checkVisible);else return!1;a.checkVisible=g.setInterval(function(){a.$elem.is(":visible")&&(a.reload(),a.$elem.animate({opacity:1},200),g.clearInterval(a.checkVisible))},500)},wrapItems:function(){this.$userItems.wrapAll('<div class="owl-wrapper">').wrap('<div class="owl-item"></div>');this.$elem.find(".owl-wrapper").wrap('<div class="owl-wrapper-outer">');this.wrapperOuter=this.$elem.find(".owl-wrapper-outer");this.$elem.css("display","block")},
334baseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall=
335!1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;b<this.options.itemsCustom.length;b+=1)this.options.itemsCustom[b][0]<=a&&(this.options.items=this.options.itemsCustom[b][1]);else a<=this.options.itemsDesktop[0]&&!1!==this.options.itemsDesktop&&(this.options.items=this.options.itemsDesktop[1]),
336a<=this.options.itemsDesktopSmall[0]&&!1!==this.options.itemsDesktopSmall&&(this.options.items=this.options.itemsDesktopSmall[1]),a<=this.options.itemsTablet[0]&&!1!==this.options.itemsTablet&&(this.options.items=this.options.itemsTablet[1]),a<=this.options.itemsTabletSmall[0]&&!1!==this.options.itemsTabletSmall&&(this.options.items=this.options.itemsTabletSmall[1]),a<=this.options.itemsMobile[0]&&!1!==this.options.itemsMobile&&(this.options.items=this.options.itemsMobile[1]);this.options.items>this.itemsAmount&&
337!0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a=
338this,b=0,e=a.itemsAmount-a.options.items;a.$owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data("owl-item",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data("owl-roundPages",b)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/
339this.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e<this.itemsAmount;e+=1)b+=this.itemWidth,this.positionsInArray.push(-b),!0===this.options.scrollPerPage&&(c=f(this.$owlItems[e]),
340c=c.data("owl-roundPages"),c!==a&&(this.pagesInArray[a]=this.positionsInArray[e],a=c))},buildControls:function(){if(!0===this.options.navigation||!0===this.options.pagination)this.owlControls=f('<div class="owl-controls"/>').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('<div class="owl-buttons"/>');a.owlControls.append(b);a.buttonPrev=
341f("<div/>",{"class":"owl-prev",html:a.options.navigationText[0]||""});a.buttonNext=f("<div/>",{"class":"owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()});b.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(b){b.preventDefault();f(this).hasClass("owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper=
342f('<div class="owl-pagination"/>');a.owlControls.append(a.paginationWrapper);a.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(b){b.preventDefault();Number(f(this).data("owl-page"))!==a.currentItem&&a.goTo(Number(f(this).data("owl-page")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html("");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c<this.itemsAmount;c+=1)0===c%this.options.items&&
343(a+=1,b===c&&(e=this.itemsAmount-this.options.items),d=f("<div/>",{"class":"owl-page"}),g=f("<span></span>",{text:!0===this.options.paginationNumbers?a:"","class":!0===this.options.paginationNumbers?"owl-numbers":""}),d.append(g),d.data("owl-page",b===c?e:c),d.data("owl-roundPages",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(".owl-page").each(function(){f(this).data("owl-roundPages")===
344f(a.$owlItems[a.currentItem]).data("owl-roundPages")&&(a.paginationWrapper.find(".owl-page").removeClass("active"),f(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem===
345this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(a){if(this.isTransition)return!1;
346this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a="rewind";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0<this.currentItem&&this.currentItem<this.options.items?0:this.currentItem-(!0===this.options.scrollPerPage?
347this.options.items:1);if(0>this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a="rewind";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;"function"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.owl.currentItem=a;if(!1!==c.options.transitionStyle&&"drag"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0),
348!0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed("paginationSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):"rewind"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed("slideSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},
349c.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):"rewind"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){"function"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem=
350this.owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());"function"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop";g.clearInterval(this.autoPlayInterval)},
351checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus="play";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){"slideSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!==typeof a&&this.$owlWrapper.css(this.addCssSpeed(a))},
352addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+
353a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){this.$owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement("div");a.style.cssText="  -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)";
354a=a.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);this.browser={support3d:null!==a&&1===a.length,isTouch:"ontouchstart"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=["s","e","x"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]:
355!1===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=["mousedown.owl","mousemove.owl","mouseup.owl"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(a){a.preventDefault()});this.$elem.on("mousedown.disableTextSelect",function(a){return f(a.target).is("input, textarea, select, option")})},
356gestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){"on"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):"off"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos;
357"function"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8<d.newRelativeX||-8>d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10<d.newPosY||-10>d.newPosY)&&!1===h.sliding&&f(k).off("touchmove.owl");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)}
358function c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$owlWrapper.removeClass("grabbing");d.dragDirection=0>d.newRelativeX?d.owl.dragDirection="left":d.owl.dragDirection="right";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,"drag"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on("click.disable",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off("click.disable")}),
359a=f._data(a.target,"events").click,c=a.pop(),a.splice(0,0,c)));b("off")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,".owl-wrapper",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1;
360!1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$owlWrapper.hasClass("grabbing")||d.$owlWrapper.addClass("grabbing");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b("on");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem=
361a=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20<g&&"left"===a.moveDirection()?(c=g,a.currentItem=!0===a.options.scrollPerPage?f.inArray(c,a.positionsInArray):d):e+a.itemWidth/20<g&&e+a.itemWidth/20>(b[d+1]||b[d]-a.itemWidth)&&"right"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)):
362(c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a="right",this.playDirection="next"):(a="left",this.playDirection="prev");return a},customEvents:function(){var a=this;a.$elem.on("owl.next",function(){a.next()});a.$elem.on("owl.prev",function(){a.prev()});a.$elem.on("owl.play",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus="play"});a.$elem.on("owl.stop",function(){a.stop();a.hoverStatus="stop"});a.$elem.on("owl.goTo",function(b,e){a.goTo(e)});
363a.$elem.on("owl.jumpTo",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a<this.itemsAmount;a+=1)b=f(this.$owlItems[a]),"loaded"!==b.data("owl-loaded")&&(e=b.data("owl-item"),c=b.find(".lazyOwl"),"string"!==typeof c.data("src")?
364b.data("owl-loaded","loaded"):(void 0===b.data("owl-loaded")&&(c.hide(),b.addClass("loading").data("owl-loaded","checked")),(d=!0===this.options.lazyFollow?e>=this.currentItem:!0)&&e<this.currentItem+this.options.items&&c.length&&this.lazyPreload(b,c)))},lazyPreload:function(a,b){function e(){a.data("owl-loaded","loaded").removeClass("loading");b.removeAttr("data-src");"fade"===d.options.lazyEffect?b.fadeIn(400):b.show();"function"===typeof d.options.afterLazyLoad&&d.options.afterLazyLoad.apply(this,
365[d.$elem])}function c(){f+=1;d.completeImg(b.get(0))||!0===k?e():100>=f?g.setTimeout(c,100):e()}var d=this,f=0,k;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),k=!0):b[0].src=b.data("src");c()},autoHeight:function(){function a(){var a=f(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css("height",a+"px");e.wrapperOuter.hasClass("autoHeight")||g.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b,
366100):e.wrapperOuter.css("height","")}var e=this,c=f(e.$owlItems[e.currentItem]).find("img"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||"undefined"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$owlItems.removeClass("active");this.visibleItems=[];for(a=this.currentItem;a<this.currentItem+this.options.items;a+=1)this.visibleItems.push(a),!0===this.options.addClassActive&&f(this.$owlItems[a]).addClass("active");
367this.owl.visibleItems=this.visibleItems},transitionTypes:function(a){this.outClass="owl-"+a+"-out";this.inClass="owl-"+a+"-in"},singleItemTransition:function(){var a=this,b=a.outClass,e=a.inClass,c=a.$owlItems.eq(a.currentItem),d=a.$owlItems.eq(a.prevItem),f=Math.abs(a.positionsInArray[a.currentItem])+a.positionsInArray[a.prevItem],g=Math.abs(a.positionsInArray[a.currentItem])+a.itemWidth/2;a.isTransition=!0;a.$owlWrapper.addClass("owl-origin").css({"-webkit-transform-origin":g+"px","-moz-perspective-origin":g+
368"px","perspective-origin":g+"px"});d.css({position:"relative",left:f+"px"}).addClass(b).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endPrev=!0;d.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(d,b)});c.addClass(e).on("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend",function(){a.endCurrent=!0;c.off("webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend");a.clearTransStyle(c,e)})},clearTransStyle:function(a,
369b){a.css({position:"",left:""}).removeClass(b);this.endPrev&&this.endCurrent&&(this.$owlWrapper.removeClass("owl-origin"),this.isTransition=this.endCurrent=this.endPrev=!1)},owlStatus:function(){this.owl={userOptions:this.userOptions,baseElement:this.$elem,userItems:this.$userItems,owlItems:this.$owlItems,currentItem:this.currentItem,prevItem:this.prevItem,visibleItems:this.visibleItems,isTouch:this.browser.isTouch,browser:this.browser,dragDirection:this.dragDirection}},clearEvents:function(){this.$elem.off(".owl owl mousedown.disableTextSelect");
370f(k).off(".owl owl");f(g).off("resize",this.resizer)},unWrap:function(){0!==this.$elem.children().length&&(this.$owlWrapper.unwrap(),this.$userItems.unwrap().unwrap(),this.owlControls&&this.owlControls.remove());this.clearEvents();this.$elem.attr("style",this.$elem.data("owl-originalStyles")||"").attr("class",this.$elem.data("owl-originalClasses"))},destroy:function(){this.stop();g.clearInterval(this.checkVisible);this.unWrap();this.$elem.removeData()},reinit:function(a){a=f.extend({},this.userOptions,
371a);this.unWrap();this.init(a,this.$elem)},addItem:function(a,b){var e;if(!a)return!1;if(0===this.$elem.children().length)return this.$elem.append(a),this.setVars(),!1;this.unWrap();e=void 0===b||-1===b?-1:b;e>=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.owlCarousel=function(a){return this.each(function(){if(!0===
372f(this).data("owl-init"))return!1;f(this).data("owl-init",!0);var b=Object.create(l);b.init(a,this);f.data(this,"owlCarousel",b)})};f.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1E3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1,
373responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:g,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}})(jQuery,window,document);
vendor: 8,131 bytes, lines 373-378
373
374
375/* Modernizr 2.7.1 (Custom Build) | MIT & BSD
376 * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-flexboxlegacy-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-printshiv-mq-cssclasses-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
377 */
378;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)u[c[d]]=c[d]in k;return u.list&&(u.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),u}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)k.setAttribute("type",f=a[d]),e=k.type!=="text",e&&(k.value=l,k.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&k.style.WebkitAppearance!==c?(g.appendChild(k),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(k,null).WebkitAppearance!=="textfield"&&k.offsetHeight!==0,g.removeChild(k)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=k.checkValidity&&k.checkValidity()===!1:e=k.value!=l)),t[a[d]]=!!e;return t}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d="2.7.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k=b.createElement("input"),l=":)",m={}.toString,n=" -webkit- -moz- -o- -ms- ".split(" "),o="Webkit Moz O ms",p=o.split(" "),q=o.toLowerCase().split(" "),r={svg:"http://www.w3.org/2000/svg"},s={},t={},u={},v=[],w=v.slice,x,y=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.flexboxlegacy=function(){return J("boxDirection")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}}
378,s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b){function l(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function m(){var a=s.elements;return typeof a=="string"?a.split(" "):a}function n(a){var b=j[a[h]];return b||(b={},i++,a[h]=i,j[i]=b),b}function o(a,c,d){c||(c=b);if(k)return c.createElement(a);d||(d=n(c));var g;return d.cache[a]?g=d.cache[a].cloneNode():f.test(a)?g=(d.cache[a]=d.createElem(a)).cloneNode():g=d.createElem(a),g.canHaveChildren&&!e.test(a)&&!g.tagUrn?d.frag.appendChild(g):g}function p(a,c){a||(a=b);if(k)return a.createDocumentFragment();c=c||n(a);var d=c.frag.cloneNode(),e=0,f=m(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function q(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return s.shivMethods?o(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(s,b.frag)}function r(a){a||(a=b);var c=n(a);return s.shivCSS&&!g&&!c.hasCSS&&(c.hasCSS=!!l(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),k||q(a,c),a}function w(a){var b,c=a.getElementsByTagName("*"),d=c.length,e=RegExp("^(?:"+m().join("|")+")$","i"),f=[];while(d--)b=c[d],e.test(b.nodeName)&&f.push(b.applyElement(x(b)));return f}function x(a){var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(u+":"+a.nodeName);while(d--)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function y(a){var b,c=a.split("{"),d=c.length,e=RegExp("(^|[\\s,>+~])("+m().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),f="$1"+u+"\\:$2";while(d--)b=c[d]=c[d].split("}"),b[b.length-1]=b[b.length-1].replace(e,f),c[d]=b.join("}");return c.join("{")}function z(a){var b=a.length;while(b--)a[b].removeNode()}function A(a){function g(){clearTimeout(d._removeSheetTimer),b&&b.removeNode(!0),b=null}var b,c,d=n(a),e=a.namespaces,f=a.parentWindow;return!v||a.printShived?a:(typeof e[u]=="undefined"&&e.add(u),f.attachEvent("onbeforeprint",function(){g();var d,e,f,h=a.styleSheets,i=[],j=h.length,k=Array(j);while(j--)k[j]=h[j];while(f=k.pop())if(!f.disabled&&t.test(f.media)){try{d=f.imports,e=d.length}catch(m){e=0}for(j=0;j<e;j++)k.push(d[j]);try{i.push(f.cssText)}catch(m){}}i=y(i.reverse().join("")),c=w(a),b=l(a,i)}),f.attachEvent("onafterprint",function(){z(c),clearTimeout(d._removeSheetTimer),d._removeSheetTimer=setTimeout(g,500)}),a.printShived=!0,a)}var c="3.7.0",d=a.html5||{},e=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g,h="_html5shiv",i=0,j={},k;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",g="hidden"in a,k=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){g=!0,k=!0}})();var s={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:c,shivCSS:d.shivCSS!==!1,supportsUnknownElements:k,shivMethods:d.shivMethods!==!1,type:"default",shivDocument:r,createElement:o,createDocumentFragment:p};a.html5=s,r(b);var t=/^$|\b(?:all|print)\b/,u="html5shiv",v=!k&&function(){var c=b.documentElement;return typeof b.namespaces!="undefined"&&typeof b.parentWindow!="undefined"&&typeof c.applyElement!="undefined"&&typeof c.removeNode!="undefined"&&typeof a.attachEvent!="undefined"}();s.type+=" print",s.shivPrint=A,A(b)}(this,document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}
vendor: 4,632 bytes, lines 378-385
378function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
379
380/* event calendar */
381function setHeader(){jQuery('#event-header').css('opacity',0);if(calendarType==CALENDAR_YEAR){jQuery('#event-header').html(currentYear);}else{jQuery('#event-header').html(months[currentMonth]+' '+currentYear);}
382jQuery('#event-header').animate({opacity:1});if(jQuery('.yocalendar-overlay').length==0){jQuery('body').append('<div class="yocalendar-overlay ready"><div class="yocalendar-overlay-close"></div><div class="yocalendar-wrapper"><div class="close-button"><i class="fa fa-angle-right"></i><i class="fa fa-angle-left"></i></div><div class="yocalendar-wrapper-center"><div class="slidee yocalendar-carousel"></div></div></div></div>');}}
383function setCalendarType(type){calendarType=CALENDAR_GRID;switch(type){case'list':calendarType=CALENDAR_LIST;break;case'year':calendarType=CALENDAR_YEAR;break;}
384window.location.hash=type;}
385function switchItem(item,dir){inAction=true;item.animate({left:'+='+50*dir,opacity:0}
385,function(){item.animate({left:'+='+100*(dir*-1)},0,function(){if(calendarType==CALENDAR_YEAR){item.html(currentYear);}else{item.html(months[currentMonth]+' '+currentYear);}
386item.animate({left:'+='+50*dir,opacity:1},function(){inAction=false;});});});reloadCalendar(calendarType);}
387function reloadCalendar(calendarType){month=currentMonth+1;if(calendarType==CALENDAR_YEAR){month=false;}
388jQuery.post(sendContactFormMessage.ajaxUrl,{action:'get-events-data',year:currentYear,month:month,calendarType:calendarType},function(json){renderCalendar(json,calendarType);},'json');}
389function renderCalendar(events,calendarType){bindMore(events);if(calendarType==CALENDAR_GRID){drawGrid(events);}else{drawList(events);}
390updateScrollbar();}
391function bindMore(events){jQuery(document).off('click','.yocalendar-overlay');jQuery(document).off("click","#yocalendar td");jQuery(document).off("click",".yocalendar-overlay-close");jQuery(document).off("click",".yocalendar-overlay .close-button");jQuery(document).on('click','.yocalendar-overlay',function(e){jQuery('.yocalendar-overlay').clearQueue();jQuery('.yocalendar-overlay').transition({opacity:0,queue:true},600,function(){jQuery('.yocalendar-overlay section').attr('style','');jQuery('.yocalendar-overlay').attr('style','');var owl=jQuery(".yocalendar-carousel").data('owlCarousel');if(owl!==undefined){owl.destroy();jQuery('.yocalendar-overlay').addClass('ready');}});});jQuery(document).on('click','.yocalendar-overlay .item section > div, .yocalendar-overlay .owl-page, .yocalendar-overlay .owl-controls div',function(e){e.stopPropagation();});jQuery(document).on('click','#yocalendar td',function(){if(jQuery('.yocalendar-overlay').hasClass('ready')){if(events[jQuery(this).data('month')]){if(events[jQuery(this).data('month')][jQuery(this).data('day')]){jQuery('.yocalendar-overlay').removeClass('ready');var postId=[];jQuery.each(events[jQuery(this).data('month')][jQuery(this).data('day')],function(i,e){postId.push(e.postId);});jQuery.post(sendContactFormMessage.ajaxUrl,{action:'get-single-event-data',id:postId},function(response){jQuery('.yocalendar-overlay .slidee').html(response);var owl=jQuery(".yocalendar-carousel").data('owlCarousel');if(owl==undefined||owl==null){jQuery('.yocalendar-overlay .yocalendar-carousel').owlCarousel({navigation:true,slideSpeed:300,paginationSpeed:400,singleItem:true,baseClass:"yocalendar-carousel",themeClass:"",navigationText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>']});}
392jQuery('.yocalendar-overlay').clearQueue();jQuery('.yocalendar-overlay').show(0,function(){jQuery('.yocalendar-overlay').transition({opacity:1},600,function(){});});},'html');}}}});}
393function scroll(dir,e,el){e.preventDefault();if(isAnimating)return;var ul=jQuery(el).parent().find('.what-when');var currentScroll=parseInt(jQuery(ul).attr('data-scroll'),10);var maxScroll=jQuery(ul).data('maxscroll');var nextScrollValue=0;var animationString='';if(dir==SCROLL_DIR_LEFT){if(currentScroll>0){animationString='+=200';nextScrollValue=currentScroll-200;}}else{if(currentScroll<maxScroll){animationString='-=200';nextScrollValue=currentScroll+200;}}
394if(animationString!==''){isAnimating=true;jQuery(ul).animate({left:animationString},function(){isAnimating=false;});jQuery(ul).attr('data-scroll',nextScrollValue);if(jQuery(ul).attr('data-scroll')==0){jQuery(ul).closest('td').find('.slider-previous').addClass('event-prev-hidden');jQuery(ul).closest('td').find('.slider-next').removeClass('event-next-hidden');}else if(jQuery(ul).attr('data-scroll')==maxScroll){jQuery(ul).closest('td').find('.slider-previous').removeClass('event-prev-hidden');jQuery(ul).closest('td').find('.slider-next').addClass('event-next-hidden');}else{jQuery(ul).closest('td').find('.slider-previous').removeClass('event-prev-hidden');jQuery(ul).closest('td').find('.slider-next').removeClass('event-next-hidden');}}}
395function drawGrid(events){var d=new Date(currentYear,currentMonth,1);var firstDay=d.getDay();firstDay=firstDay==0?6:(firstDay-1);var maxDay=calculateDaysInMonth(currentMonth,currentYear);
395var prevMax=calculateDaysInMonth(currentMonth-1,currentYear);var className='';var day=1;var currentDay=1;var td=null;var nextMonth=false;var displayMonth=currentMonth;if(displayMonth==-1)displayMonth=11;jQuery.each(table.find('tr'),function(i,v){jQuery.each(jQuery(v).find('td span'),function(j,k){td=jQuery(this).parent();td.attr('class','');jQuery(this).find('i').remove();if(j==0){td.addClass('first');}
396if(j==6){td.addClass('last');}
397currentDay=day;currentDisplayMonth=displayMonth;jQuery(td).addClass('month'+currentMonth);jQuery(td).data('month',currentMonth);jQuery(td).data('day',currentDay);if(i==1){if(j>=firstDay){displayMonth=currentMonth;jQuery(this).html(day);if(day<=maxDay){day++;}}else{jQuery(td).data('month',currentMonth-1);displayMonth=currentMonth-1;jQuery(this).html(prevMax-(firstDay-j-1));currentDay=prevMax-(firstDay-j-1);jQuery(td).addClass('prev-month');jQuery(td).addClass('month'+(currentMonth-1));jQuery(td).removeClass('month'+(currentMonth));addEvent=false;}}else{jQuery(k).html(day);if(day<=maxDay){displayMonth=currentMonth;day++;}else{day=1;className='next-month';}}
398if(nextMonth){jQuery(td).addClass('next-month');jQuery(td).addClass('month'+(currentMonth+1));jQuery(td).removeClass('month'+(currentMonth));jQuery(td).data('month',currentMonth+1)
399displayMonth=currentMonth+1;}
400if(className=='next-month'||className=='prev-month'){addEvent=false;}
401if(day>maxDay){day=1;displayMonth=currentMonth+1;if(displayMonth==12)displayMonth=0;className='next-month';nextMonth=true;}
402td.data('day',currentDay);td.html('<span class="day'+currentDay+'">'+jQuery(this).html()+'</span>');});});jQuery.each(events,function(i,monthEvents){jQuery.each(monthEvents,function(j,dayEvents){var td=jQuery('.month'+i+' .day'+j).closest('td');var count=dayEvents.length;td.addClass('event-cell current-month');td.html('<span data-count="'+count+'">'+j+'<i class="event-counter">'+count+'</i></span>');});});table.transition({opacity:1});jQuery('.slider-previous').addClass('event-prev-hidden');}
403function drawList(events){var dayEvents='';var currentDay=0;var listView=null;if(calendarType==CALENDAR_YEAR){listView=jQuery('#yocalendar-year');currentEvents=events;if(currentEvents.length==0){listView.html('<div class="nodata-container aligncenter"><h3><i class="icon-remove-sign"></i>'+l10n['No event found']+'</h3><p class="nodata"><br/></div>');return;}
404jQuery.each(currentEvents,function(idx,val){shownEvents=[];if(displayOptions.month_header_view=='yes'){dayEvents+='<div class="row month-header"><div class="col-md-12"><h2>'+l10n['Events in month']+': '+l10n[monthId[idx]]+'</h2></div></div>';dayEvents+='<div class="row">';}
405jQuery.each(val,function(i,a){dayEvents+=drawListDay(i,a,currentDay);});eventCount=0;if(displayOptions.month_header_view=='yes'){dayEvents+='</div>';}});}else{listView=jQuery('#yocalendar-list');var currentEvents=events[currentMonth];if(!currentEvents){listView.html('<div class="nodata-container aligncenter"><h3><i class="icon-remove-sign"></i> '+l10n['No event found']+'</h3><p class="nodata"><br/></div>');return;}
406var i=1;dayEvents+='<div class="row">';jQuery.each(currentEvents,function(idx,val){if(jQuery.inArray(val[0].postId,shownEvents)==-1){dayEvents+=drawListDay(idx,val,currentDay);shownEvents.push(val[0].postId);}
407i++;});dayEvents+='</div>';}
408if(calendarType==CALENDAR_YEAR){if(displayOptions.month_header_view=='yes'){listView.html('<div id="upcoming-events-list">'+dayEvents+'</div>');}else{listView.html('<div id="upcoming-events-list"><div class="row">'+dayEvents+'</div></div>');}}else{listView.html('<div id="upcoming-events-list">'+dayEvents+'</div>');}
409shownEvents=[];eventCount=0;listView.transition({opacity:1});}
410function drawListDay(idx,val,currentDay){dayEvents='';if(currentDay!==idx){currentDay=idx;}
411jQuery.each(val,function(i,v){var dateString=v.startDate;if(v.endDate!==''){dateString+=' - '+v.endDate;}
412if(jQuery.inArray(v.postId,shownEvents)==-1){if(eventCount!==0&&((eventCount%2)==0)){dayEvents+='</div><div class="row">';}
413dayEvents+='<div class="col-md-6">'+'<div class="eventcalendar-header">'+'<a class="eventcalendar-event-photo pull-left hover-post" href="'+v.link+'"><figure><img src="'+v.img+'" alt="" width="100"/></figure></a>'+'<h1><a href="'+v.link+'">'+v.title+'</a></h1>'+'<h2>'+v.dateString+' <strong>
413'+v.timeString+'</strong></h2>'+'<h3><strong>'+v.venue+' </strong>'+v.location+'</h3>'+'<h4>'+v.price+'</h4>'+'</div></div>';shownEvents.push(v.postId);eventCount++;}});return dayEvents;}
414function renderSocialShare(title,link){if(!shareOptions['facebook']&&!shareOptions['twitter']&&!shareOptions['google']&&!shareOptions['pintrest']&&!shareOptions['linkedin']){return'';}
415var encodedURL=encodeURIComponent(link);title=encodeURIComponent(title);var click="onclick=\"return !window.open(this.href, 'popup', 'width=640,height=600,top='+(window.outerHeight/2 - 150)+',left='+(window.outerWidth/2 - 320));return false;\"";var shareHTML='';shareHTML+='<dl class="yocalendar-social-media">';if(shareOptions['facebook']){shareHTML+='<dd><a '+click+' class="yocalendar-social-share share-facebook" href="http://www.facebook.com/sharer/sharer.php?u='+encodedURL+'"><i class="icon-facebook-sign"></i></a></dd>';}
416if(shareOptions['twitter']){shareHTML+='<dd><a '+click+' class="yocalendar-social-share share-twitter" href="http://twitter.com/share?text='+title+'"><i class="icon-twitter-sign"></i></a></dd>';}
417if(shareOptions['google']){shareHTML+='<dd><a '+click+' class="yocalendar-social-share share-google" href="https://m.google.com/app/plus/x/?v=compose&amp;content='+title+'"><i class="icon-google-plus-sign"></i></a></dd>';}
418if(shareOptions['pintrest']){shareHTML+='<dd><a '+click+' class="yocalendar-social-share share-pinterest" href="https://pinterest.com/pin/create/button/?url='+encodedURL+'"><i class="icon-pinterest-sign"></i></a></dd>';}
419if(shareOptions['linkedin']){shareHTML+='<dd><a '+click+' class="yocalendar-social-share share-linkedin" href="https://www.linkedin.com/cws/share?url='+encodedURL+'"><i class="icon-linkedin-sign"></i></a></dd>';}
420shareHTML+='</dl>';return shareHTML;}
421function ordinal(n){var s=[l10n["th"],l10n["st"],l10n["nd"],l10n["rd"]],v=n%100;return n+(s[(v-20)%10]||s[v]||s[0]);}
422function calculateDaysInMonth(month,year){var daysInMonth=(32-new Date(year,month,32).getDate());return daysInMonth;}
423function reloadCalendarOnMobile(){if(isMobile){jQuery('#yocalendar-grid .event-info').html();jQuery('#yocalendar').on('touchend','td',function(e){e.preventDefault();e.stopPropagation();if(jQuery(this).find('.event-info').length>=1){type='list';setCalendarType(type);jQuery.each(calendarTypes,function(i,v){jQuery('#yocalendar-'+v).hide();});jQuery('#yocalendar-'+type).show();reloadCalendar(calendarType);}});}}
424function setupCalendar(){calendarTypes=[];table=jQuery('#upcoming-events');var type='grid';jQuery.each(jQuery('#yocalendar-switcher a'),function(i,v){calendarTypes.push(jQuery(v).data('type'));if(jQuery('#yocalendar-'+jQuery(v).data('type')).is(':visible')){type=jQuery(v).data('type');}});var windowType=window.location.hash;if(windowType!==''){windowType=windowType.split('#')[1];setCalendarType(windowType);reloadCalendar(calendarType);jQuery.each(calendarTypes,function(i,v){jQuery('#yocalendar-'+v).hide();});jQuery('#yocalendar-'+windowType).transition({opacity:0},0).delay(300).show(0,function(){jQuery('#yocalendar-'+windowType).transition({opacity:1});});}else{setCalendarType(type);}
425setHeader();jQuery.each(table.find('tr'),function(i,v){jQuery.each(jQuery(v).find('td > span'),function(j,k){var td=jQuery(this).parent();if(j==0){td.addClass('first');}
426if(j==6){td.addClass('last');}});});if(jQuery('#frame').sly){jQuery('#frame').sly('reload');}}
427var CALENDAR_GRID=0;var CALENDAR_LIST=1;var CALENDAR_YEAR=2;var months=[l10n['January'],l10n['February'],l10n['March'],l10n['April'],l10n['May'],l10n['June'],l10n['July'],l10n['August'],l10n['September'],l10n['October'],l10n['November'],l10n['December']];var prevMonth;var prevYear;var currentMonth;var currentYear;var inAction=false;var calendarType=CALENDAR_GRID;var isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);var timeout;var shownEvents=[];var eventCount=0;var table='';var isAnimating=false;var SCROLL_DIR_LEFT=0;var SCROLL_DIR_RIGHT=1;prevMonth=12;prevYear=new Date().getFullYear();currentMonth=new Date().getMonth();currentYear=new Date().getFullYear();prevMonth=(currentMonth==1)?12:currentMonth-1;if(currentMonth==1){prevYear=currentYear-1;}
428var calendarTypes=[];jQuery(document).ready(function(){jQuery(document).on('click','.event-info .slider-previous',function(e){scroll(SCROLL_DIR_LEFT,e,this);});jQuery(document).on('click','.event-info .slider-next',function(e){scroll(SCROLL_DIR_RIGHT,e,this);});jQuery(document).on('click','.yocalendar-display',function(e){e.preventDefault();var type=jQuery(this).data('type');jQuery.each(calendarTypes,function(i,v){jQuery('#yocalendar-'+v).transition({opacity:0}
428,function(){jQuery('#yocalendar-'+v).hide();});});jQuery('#yocalendar-'+type).transition({opacity:0},0).show(0,function(){jQuery('#yocalendar-'+type).transition({opacity:1},600);});setCalendarType(type);setHeader();reloadCalendar(calendarType);});jQuery(document).on('click','.event-calendar-next',function(e){e.preventDefault();if(calendarType==CALENDAR_YEAR){prevYear=currentYear;currentYear++;}else{if(inAction)return;prevMonth=currentMonth;currentMonth++;if(currentMonth>11){currentMonth=0;prevYear=currentYear;currentYear++;}else{prevYear=currentYear;}}
429switchItem(jQuery('#event-header'),-1);});jQuery(document).on('click','.event-calendar-prev',function(e){e.preventDefault();if(inAction)return;if(calendarType==CALENDAR_YEAR){prevYear=currentYear;currentYear--;}else{prevMonth=currentMonth;currentMonth--;if(currentMonth<0){currentMonth=11;prevYear=currentYear;currentYear--;}else{prevYear=currentYear;}}
430switchItem(jQuery('#event-header'),1);});});
431
432/* main.js */
433jQuery.easing.jswing=jQuery.easing.swing;
434jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,a,c,b,d){return jQuery.easing[jQuery.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a+c:-b/2*(--a*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a+c:
435b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a*a+c:-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a*a*a+c:b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e,a,c,b,d){return-b*Math.cos(a/
436d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return 0==a?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return a==d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){return 0==a?c:a==d?c+b:1>(a/=d/2)?b/2*Math.pow(2,10*(a-1))+c:b/2*(-Math.pow(2,-10*--a)+2)+c},easeInCirc:function(e,a,c,b,d){return-b*(Math.sqrt(1-(a/=d)*
437a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){return 1>(a/=d/2)?-b/2*(Math.sqrt(1-a*a)-1)+c:b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){var e=1.70158,f=0,g=b;if(0==a)return c;if(1==(a/=d))return c+b;f||(f=0.3*d);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return-(g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f))+c},easeOutElastic:function(e,a,c,b,d){var e=1.70158,f=0,g=b;if(0==a)return c;if(1==
438(a/=d))return c+b;f||(f=0.3*d);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return g*Math.pow(2,-10*a)*Math.sin((a*d-e)*2*Math.PI/f)+b+c},easeInOutElastic:function(e,a,c,b,d){var e=1.70158,f=0,g=b;if(0==a)return c;if(2==(a/=d/2))return c+b;f||(f=d*0.3*1.5);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return 1>a?-0.5*g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)+c:0.5*g*Math.pow(2,-10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)+b+c},easeInBack:function(e,a,c,b,d,f){void 0==
439f&&(f=1.70158);return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){void 0==f&&(f=1.70158);return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){void 0==f&&(f=1.70158);return 1>(a/=d/2)?b/2*a*a*(((f*=1.525)+1)*a-f)+c:b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-jQuery.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){return(a/=d)<1/2.75?b*7.5625*a*a+c:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+0.75)+c:a<2.5/2.75?
440b*(7.5625*(a-=2.25/2.75)*a+0.9375)+c:b*(7.5625*(a-=2.625/2.75)*a+0.984375)+c},easeInOutBounce:function(e,a,c,b,d){return a<d/2?0.5*jQuery.easing.easeInBounce(e,2*a,0,b,d)+c:0.5*jQuery.easing.easeOutBounce(e,2*a-d,0,b,d)+0.5*b+c}});
441
442jQuery('document').ready(function(jQuery) {
443
444	initVideos();
445
446	var transition = function(newEl) {
447		var oldEl = this;
448		newEl.hide();
449
450		jQuery('.hover-active').removeClass('hover-active');
451
452		oldEl.transition({opacity: 0}, 500, function() {
453			oldEl.replaceWith(newEl);
454			animateDarkBg(newEl.data('menuType'));
455			newEl.show().css({opacity: 0}, 500);
456			oldEl.transition({opacity: 1}, 500);
457			newEl.transition({opacity: 1}, 500);
458			jQuery('html').removeClass('loading');
459			animateBlog('in');
460			animateMenu();
461			slider('on');
462			initMap();
463			initCarousel();
464			refreshMenu(newEl);
465			addGrayFilter();
466			updatePadding();
467			naviFloat();
468			reloadPostColorBox();
469			createGallery();
470			setupEventCalendar();
471			recalculateMenuHeight();
472			initVideos();
473			jQuery(window).trigger('reload.tubular');
474			jQuery(window).scrollTop(0);
475			
476		});
477	};
478
479	if (!disableDjax) {
480		jQuery(window).bind('djaxClick', function(e, data) {
481			hideDarkBg();
482			jQuery('.dynamic-content').transition({opacity:0}, function() {
483				slider('off');
484				jQuery('html').addClass('loading');
485			});
486		});
487
488		jQuery('body').djax('.dynamic-content', ['wp-login', 'wp-admin', '.jpg', 'jp-carousel'], transition);
489
490		jQuery(window).bind('djaxLoad', function(e, params) {
491			slider('off');
492			hideDarkBg();
493		});
494	}
495
496	// jQuery('.content-link, .subnav a').click(function() {
497	// 	if (jQuery('body').hasClass('splash')) {
498	// 		jQuery(".hover-active").removeClass("hover-active");
499	// 	}
500	// });
501
502	//jQuery('.flyout-menu').css('padding-top', jQuery('.sm-navbar').height());
503
504	jQuery('#mobile-home').click(function(e) {
505		if (!disableDjax) {
506			e.preventDefault();
507		}
508
509		if (jQuery('body').hasClass('mobile-nav-show')) {
510			jQuery('body').removeClass('mobile-nav-show');
511		}
512	});
513
514	jQuery('.reorder a').click(function(e) {
515
516		e.preventDefault();
517		if (jQuery('body').hasClass('mobile-nav-show')) {
518			jQuery(this).parent().removeClass('flyout-open');
519			jQuery('#flyout-container').animate({ height : 0}, function(){
520				jQuery('#flyout-container .open').css('height', 0).removeClass('open');
521				jQuery('#flyout-container .subnav-open').removeClass('subnav-open');
522			});
523
524			jQuery('body').removeClass('mobile-nav-show');
525		} else {
526			jQuery(this).parent().addClass('flyout-open');
527			jQuery('#flyout-container').animate({ height : jQuery('#flyout-container .flyout-menu > li').height() * jQuery('#flyout-container .flyout-menu > li').length}, function(){
528				jQuery('#flyout-container').css('height', 'auto');
529			});
530			jQuery('body').addClass('mobile-nav-show');
531		}
532	});
533
534	var oldVideo = '';
535
536	jQuery("#fullscreenVideo").bind("play", function() {
537		jQuery('.video-controls i').removeClass('fa fa-play').addClass('fa fa-pause');
538	});
539
540	jQuery("#fullscreenVideo").bind("ended", function() {
541		if (slideVideoStillImage && !slideVideoRepeat) {
542			oldVideo = jQuery(".fullscreen-video").html();
543			jQuery(".video-controls i").removeClass('fa fa-pause').addClass('fa fa-play reload');
544			jQuery( ".fullscreen-video" ).replaceWith( '<div class="fullscreen-image" style="height: 100%;width: 100%;position: absolute;background-size: cover;background-repeat: no-repeat;background-position: center center;background-image:url('+slideVideoStillImage+');"></div>' );
545		}
546	});
547
548	jQuery(document).on('click', '#fullscreenVideo, .video-controls i', function(e) {
549		if (jQuery(this).hasClass('reload')) {
550			jQuery( ".fullscreen-image" ).replaceWith('<div class="fullscreen-video">
550'+oldVideo+'</div>');
551
552			jQuery("#fullscreenVideo").bind("ended", function() {
553				if (slideVideoStillImage && !slideVideoRepeat) {
554					oldVideo = jQuery(".fullscreen-video").html();
555					jQuery(".video-controls i").addClass('fa fa-play reload');
556					jQuery( ".fullscreen-video" ).replaceWith( '<div class="fullscreen-image" style="height: 100%;width: 100%;position: absolute;background-size: cover;background-repeat: no-repeat;background-position: center center;background-image:url('+slideVideoStillImage+');"></div>' );
557				}
558			});
559		}
560
561		var video = jQuery('#fullscreenVideo').get(0);
562		if (video.paused) {
563			jQuery('.video-controls i').removeClass('fa fa-play').addClass('fa fa-pause');
564			video.play();
565		} else {
566			video.pause();
567			jQuery('.video-controls i').removeClass('fa fa-pause').addClass('fa fa-play');
568		}
569	});
570
571	if (!disableDjax) {
572		jQuery('.menu-item a').on('click',function(e) {
573			// console.log('.menu-item a click');
574			if (!jQuery(this).data('djax-exclude')) {
575
576				//turn off amazing menu;
577				if (turnOffAmazingMenu) {
578					jQuery('.reorder').removeClass('flyout-open');
579					jQuery('#flyout-container').animate({ height : 0}, function() {
580						jQuery('#flyout-container .open').css('height', 0).removeClass('open');
581						jQuery('#flyout-container .subnav-open').removeClass('subnav-open');
582						jQuery('body').removeClass('mobile-nav-show');
583					});
584				}
585			}
586		});
587	}
588
589	jQuery('.flyout-menu .open-children').click(function(e) {
590		e.preventDefault();
591		var that = this;
592		if(jQuery(this).next('.subnav').length > 0) {
593			//has submenu
594			if(jQuery(this).next('.subnav').hasClass('open')) {
595				
596				jQuery(this).parent().removeClass('subnav-open');
597				
598				jQuery(this).next('.subnav').animate({height : 0 }, function() {
599					jQuery(that).next('.open').removeClass('open');
600					jQuery(that).next('.subnav').find('.open').css('height', 0).removeClass('open');
601					jQuery(that).next('.subnav').find('.subnav-open').removeClass('subnav-open');
602				});
603			} else {
604				jQuery(this).parent().addClass('subnav-open');
605				jQuery(this).next('.subnav').animate({ height : jQuery(this).next('.subnav').children('li').height() * jQuery(this).next('.subnav').children('li').length}, function(){
606					jQuery(that).next('.subnav').css('height', 'auto').addClass('open');
607				});
608			}
609		}
610	});
611
612	jQuery('.main-nav li a').click(function() {
613		jQuery('.main-nav .active').removeClass('active');
614		jQuery('.main-nav .no-icon-active').removeClass('no-icon-active');
615		
616		if (!jQuery(this).parent().parent().hasClass('no-icon')) {
617			jQuery(this).addClass('active');
618		} else {
619			jQuery(this).parent().parent().addClass('no-icon-active');	
620		}
621		
622	});
623
624	jQuery('.home-switcher .fa').click(function() {
625		if(jQuery('.home-switcher ul').is(':visible')) {
626			jQuery('.home-switcher ul').transition({opacity: 0}, function() {
627				jQuery(this).hide();
628			});
629		} else {
630			jQuery('.home-switcher ul').show().transition({opacity: 1});
631		}
632	});
633
634	jQuery(".group1").swipebox();
635
636	jQuery('.main-nav li').hover(function() {
637		clearTimeout(jQuery(this).data('timeout'));
638		jQuery(this).css('overflow', 'visible');
639		var that = this;
640		var t = setTimeout(function() {
641			jQuery(that).addClass('hover-active');
642		}, 100);
643		jQuery(that).data('timeout-in', t);
644	}, function() {
645		clearTimeout(jQuery(this).data('timeout-in'));
646		var that = this;
647		jQuery(that).removeClass("hover-active");
648		var t = setTimeout(function() {
649			jQuery(that).css('overflow', 'hidden');
650		}, 400);
651
652		jQuery(that).data('timeout', t);
653	});
654
655	/********dynamic li width in navbar/navbar center************/
656	if (jQuery('.menu-image').length > 0 ) {
657		var li_numb = jQuery('.navbar .main-nav >li').length -1;
658		var li_width = 70/li_numb;
659		jQuery('.navbar .main-nav >li').css('width', ''+li_width+'%');
660	} else {
661		var li_width2 = 100/jQuery('.navbar .main-nav >li').length;
662		jQuery('.navbar .main-nav >li').css('width', ''+li_width2+'%' );
663	}
664
665	/**************navbar hover******************/
666	jQuery('.navbar .main-nav >li').hover(function() {
667		if (!jQuery(this).hasClass('no-icon')) {
668			jQuery(this).find('div >a').addClass('current');	
669		}
670	}, function() {
671		if (!jQuery(this).hasClass('no-icon')) {
672			jQuery(this).find('div >a').removeClass('current');
673		}
674	});
675
676
677	/***************** Search ******************/
678	var placeholder = jQuery('#search input[type=text]').attr('data-placeholder');
679	var logoHeight = parseInt(jQuery('#header-outer').attr('data-logo-height'));
680
681	jQuery('body').on('click', '#search-btn a', function() {
682		return false;
683	});
684	
685
686	jQuery('body').on('mousedown', '#search-btn a', function() {
687		if (jQuery(this).hasClass('open-search')) {
688			return false;
689		}
690
691		jQuery('#search-outer').stop(true).fadeIn(600, 'easeOutExpo');
692
693		jQuery('body #search-outer > #search input[type="text"]').css({
694			'top' : (jQuery('#search-outer').height() / 2) - (jQuery('#search-outer > #search input[type="text"]').height() / 2)
695		});
696		
697		jQuery('#search input[type=text]').focus();
698		
699		if (jQuery('#search input[type=text]').attr('value') == placeholder) {
700			jQuery('#search input[type=text]').setCursorPosition(0);
701		}
702
703		if (jQuery('body').hasClass('ascend')) {
704			searchFieldCenter();
705		}
706
707		jQuery(this).toggleClass('open-search');
708
709		jQuery('.slide-out-widget-area-toggle a.open:not(.animating)').trigger('click');
710
711		return false;
712	});
713
714	jQuery('body').on('keydown', '#search input[type=text]', function() {
715		if (jQuery(this).attr('value') == placeholder) {
716			jQuery(this).attr('value', '');
717		}
718	});
719
720	jQuery('body').on('keyup', '#search input[type=text]', function() {
721		if (jQuery(this).attr('value') == '') {
722			jQuery(this).attr('value', placeholder);
723			jQuery(this).setCursorPosition(0);
724		}
725	});
726
727	jQuery('body').on('click', '#close', function() {
728		closeSearch();
729		jQuery('#search-btn a').removeClass('open-search');
730
731		return false;
732	});
733
734	// jQuery('body').on('blur', '#search-box input[type=text]', function(e) {
735	// 	var s = jQuery(this).val();
736	// 	if (s.length >= 1) {
737	// 		closeSearch();	
738	// 	}
739	// 	jQuery('#search-btn a').removeClass('open-search');
740	// });
741
742	// jQuery('body').on('click', 'input.minus', function(e) {
743	// 	var current = parseInt(jQuery(this).parent().find('.input-text.qty').val(), 10);
744	// 	if (current > 1) {
745	// 		var qty = jQuery(this).parent().find('.input-text.qty');
746	// 		jQuery(qty).val(current-1);
747	// 	}
748	// });
749
750	// jQuery('body').on('click', 'input.plus', function(e) {
751	// 	var current = parseInt(jQuery(this).parent().find('.input-text.qty').val(), 10);
752	// 	var qty = jQuery(this).parent().find('.input-text.qty');
753	// 	jQuery(qty).val(current+1);
754	// });
755
756	function closeSearch() {
757		jQuery('#search-outer').stop(true).fadeOut(450, 'easeOutExpo');
758	}
759
760	//mobile search
761	jQuery('body').on('click', '#mobile-menu #mobile-search .container a#show-search', function() {
762		jQuery('#mobile-menu .container > ul').slideUp(500);
763
764		return false;
765	});
766
767	/***************** Search ******************/
768
769});
770
771
772
773
774
775
776
777
778jQuery(window).load(function(){animateDarkBg(jQuery('.barnelli-menu').parent().data('menuType'));refreshMenu(jQuery(".dynamic-content"));initDatePicker();animateBlog('in');animateMenu();scrollContent();slider('on');initCarousel();initMap();addGrayFilter();updatePadding();naviFloat();reloadPostColorBox();recalculateMenuHeight();setupEventCalendar();});jQuery(window).resize(jQuery.debounce(250,function(){updatePadding();}));function initVideos(){if(jQuery('.video_wrapper').length>0){var videoId=jQuery('.video_wrapper').data('video-id');var videoSkip=jQuery('.video_wrapper').data('video-skip');jQuery('.video_wrapper').tubular({videoId:videoId,repeat:slideVideoRepeat,mute:slideVideoMute,start:videoSkip});}}
779
780function detectIE(){var ua=window.navigator.userAgent;var msie=ua.indexOf('MSIE ');var trident=ua.indexOf('Trident/');if(msie>0){return parseInt(ua.substring(msie+5,ua.indexOf('.',msie)),10);}
781if(trident>0){var rv=ua.indexOf('rv:');return parseInt(ua.substring(rv+3,ua.indexOf('.',rv)),10);}
782return false;}
783function recalculateMenuHeight(){var h=jQuery(window).height();if(jQuery('.Menu-wrapper').length){jQuery('.dynamic-content').css('min-height',h+'px');}}
784function setupEventCalendar(){if(jQuery('#yocalendar').length){setupCalendar();var types={"grid":0,"list":1,"year":2};reloadCalendar(types[displayOptions['default_calendar_view']]);}}
785// function reloadPostColorBox(){if(jQuery('a.gallery').length){jQuery('a.gallery').colorbox({transition:'fade',maxWidth:'80%',maxHeight:'80%',closeButton:true,close:'',next:'<i class="fa fa-angle-right"></i>',previous:'<i class="fa fa-angle-left"></i>'});}
786// if(jQuery('a.food-menu-gallery').length){jQuery('a.food-menu-gallery').colorbox({transition:'fade',maxWidth:'80%',maxHeight:'80%',closeButton:true,close:'',next:'<i class="fa fa-angle-right"></i>',previous:'<i class="fa fa-angle-left"></i>'});}}
787function reloadPostColorBox(){if(jQuery('a.gallery').length){jQuery('a.gallery').swipebox({});}
788if(jQuery('.gallery-masonry .img-bg a').length){jQuery('.gallery-masonry .img-bg a').swipebox({});}
789if(jQuery('a.food-menu-gallery').length){jQuery('a.food-menu-gallery').swipebox({});}}
790function updatePadding() {
791	if (jQuery('.navbar').height() == 0) {
792		if (jQuery('#wpmlbar').length > 0) {
793			jQuery('.padding-wrapper').css('padding-top', jQuery('.sm-navbar').height() + jQuery('#wpmlbar').height());
794		} else {
795			jQuery('.padding-wrapper').css('padding-top', jQuery('.sm-navbar').height());
796		}
797	} else {
798		if (jQuery('#wpmlbar').length > 0) {
799			jQuery('.padding-wrapper').css('padding-top', jQuery('.navbar').height() + jQuery('#wpmlbar').height());
800		} else {
801			jQuery('.padding-wrapper').css('padding-top', jQuery('.navbar').height());
802		}
803		
804	}	
805}
806
807
808function checkOpeningTime() {
809	jQuery('#date-error').remove();
810	var day = jQuery('#select-day').val();
811	var month = jQuery('#select-month').val();
812	var year = jQuery('#select-year').val();
813	var minutes = jQuery('#select-minutes').val();
814	var hours = jQuery('#select-hour').val();
815	if (day < 10) day = '0' + day;
816	if (month < 10) month = '0' + month;
817	var ampm = '';
818	if (jQuery('#ampm').length) {
819		ampm = jQuery('.select-time.part').text();
820	}
821	if ((ampm == 'am') && (hours == '12')) {
822		hours = '00';
823	}
824	if ((ampm == 'pm')) {
825		if (parseInt(hours, 10) < 12) {
826			hours = parseInt(hours, 10) + 12;
827		}
828	}
829	var date = year + '-' + month + '-' + day;
830	var time = hours + ':' + minutes + ':00';
831	jQuery.ajax({
832		url: sendReservationFormMessage.ajaxUrl,
833		type: 'POST',
834		dataType: 'json',
835		async: false,
836		data: {
837			action: 'check-opening-time',
838			date: date,
839			time: time
840		}
841	}).done(function(responseData) {
842		jQuery('.opening').text(responseData.openings);
843		var reg = new RegExp("[0-9]:[0-9]");
844		if (reg.test(jQuery('.opening').text())) {
845			jQuery('.opening-description').show();
846		} else {
847			jQuery('.opening-description').hide();
848		}
849		if (responseData.status === true) {
850			jQuery('div.select-time.day, div.select-time.month, div.select-time.year, div.select-time.hour, div.select-time.minutes, div.select-time.part').removeClass('error');
851			jQuery('#date-error').remove();
852						jQuery('#reservation-submit').fadeIn();
853		} else {
854			jQuery('div.select-time.day, div.select-time.month, div.select-time.year, div.select-time.hour, div.select-time.minutes, div.select-time.part').addClass('error');
855			if (additionalRevervationInfo) {
856				jQuery('.select-date').append('<small id="date-error" class="error">' + dateValidationError + '</small>');
857			}
858			jQuery('#reservation-submit').fadeOut();
859		}
860	});
861}
862
863function initDatePicker() {
864	jQuery('#frame').delegate('.select-time.part', 'click', function() {
865		if (jQuery(this).html() == 'pm') {
866			jQuery(this).html('am');
867		} else {
868			jQuery(this).html('pm');
869		}
870		checkOpeningTime();
871	});
872	jQuery('#frame').delegate('#select-day', 'change', function() {
873		jQuery('.select-time.day span').html(jQuery(this).val());
874		checkOpeningTime();
875	});
876	jQuery('#frame').delegate('#select-month', 'change', function() {
877		jQuery('.select-time.month span').html(jQuery("#select-month option:selected").data('name'));
878		daysInCurrentMonth = daysInMonth(jQuery(this).val(), jQuery('.select-time.year span').html());
879		generateDays(daysInCurrentMonth);
880		selectDay(jQuery('.select-time.day span').html());
881	});
882	jQuery('#frame').delegate('#select-year', 'change', function() {
883		jQuery('.select-time.year span').html(jQuery(this).val());
884		jQuery('.select-time.month span').html(jQuery("#select-month option:selected").data('name'));
885		daysInCurrentMonth = daysInMonth(jQuery('#select-month').val(), jQuery('.select-time.year span').html());
886		generateDays(daysInCurrentMonth);
887		selectDay(jQuery('.select-time.day span').html());
888		checkOpeningTime();
889	});
890	jQuery('#frame').delegate('#select-hour', 'change', function() {
891		jQuery('.select-time.hour span').html(jQuery(this).val());
892		checkOpeningTime();
893	});
894	jQuery('#frame').delegate('#select-minutes', 'change', function() {
895		jQuery('.select-time.minutes span').html(jQuery(this).val());
896		checkOpeningTime();
897	});
898}
899
900function selectDay(day) {
901	jQuery("#select-day").val(day);
902	jQuery('.select-time.day span').html(day);
903	checkOpeningTime();
904}
905
906function generateDays(n){
907	jQuery('#select-day').html('');for(var i=1;i<=n;i++){jQuery('#select-day').append('<option value="'+i+'">'+i+'</option>');
908	}
909	jQuery(window).trigger('daysReady');
910}
911function daysInMonth(month,year){return new Date(year,month,0).getDate();}
912function shuffleArray(array){for(var i=array.length-1;i>0;i--){var j=Math.floor(Math.random()*(i+1));var temp=array[i];array[i]=array[j];array[j]=temp;}
913return array;}
914function animateBlog(direction){direction=direction=="in"?direction:"out";var sizes=new Array();var columns=new Array();var items=jQuery('.square').length;jQuery('.square').each(function(i,e){columns[i]=jQuery(this);sizes[i]=columns[i].length;});columns=shuffleArray(columns);var max=Math.max.apply(null,sizes);for(var item=0;item<max;item++){jQuery(columns).each(function(column){if(columns[column][item]!==undefined){if(direction=="in"){var $item=jQuery(columns[column][item]),timeout=item*columns.length+column;setTimeout(function(){$item.addClass('is-loaded');},200*timeout);}else{var $item=jQuery(columns[column][item]),timeout=items-(item*columns.length+column);setTimeout(function(){$item.removeClass('is-loaded');},200*timeout);}}});}}
914
915
916function shareThis(url) {
917	var w = 460;
918	var h = 500;
919	var left = (screen.width/2)-(w/2);
920	var top = (screen.height/2)-(h/2);
921	window.open(url, "shareWindow", "status=1,height=" + h + ",width=" + w + ",left=" + left + ",top=" + top + ",resizable=0");
922}
923
924function updateScrollbar(){}
925function scrollContent(){}
926function addGrayFilter() {
927	if (jQuery.browser.msie) {
928		jQuery('.base-photo').addClass('ie-grayscale');
929	}
930	if (jQuery.browser.mozilla) {
931		jQuery('.base-photo').addClass('ff-grayscale');
932	}
933}
934function animateMenu(){if(jQuery('.barnelli-menu').length>0){setTimeout(function(){jQuery('.animate-in').removeClass('animate-in-fade');},600);}}
935function animateDarkBg(menuType){if(jQuery('.barnelli-menu').length>0){jQuery('body').addClass('dark-bg');jQuery('.menu-bg.'+menuType+'-bg').transition({opacity:0},0,function(){jQuery('.menu-bg.'+menuType+'-bg').show().transition({opacity:1});});}
936if(jQuery('#restaurant').length>0){jQuery('body').addClass('dark-bg');jQuery('#restaurant-bg').transition({opacity:0},0,function(){jQuery('#restaurant-bg').show().transition({opacity:1});});}}
937function hideDarkBg(){jQuery('body').removeClass('dark-bg');jQuery('.menu-bg:visible').transition({opacity:0},function(){jQuery('.menu-bg:visible').hide();});jQuery('#restaurant-bg').transition({opacity:0},function(){jQuery('#restaurant-bg').hide();});}
938function naviFloat(){if(navMenuAlwaysOnTop){jQuery('.social-share.top').css({'top':'auto','bottom':20});jQuery('.navbar').css({opacity:1});}else{if(jQuery('.static-elements').length>0){if(!jQuery('body').hasClass('splash')){jQuery('.navbar').transition({y:'-100%'},function(){jQuery(this).css({'bottom':0,'top':'auto'}).transition({y:'100%'},0).transition({y:0},function(){jQuery('body').addClass('splash');jQuery('.navbar').animate({opacity:1},500);});});}}else{jQuery('.navbar').animate({opacity:1},500);if(jQuery('body').hasClass('splash')){jQuery('.navbar').transition({y:'100%'},function(){jQuery(this).css({'bottom':'auto','top':0}).transition({y:'-100%'},0).transition({y:0},function(){jQuery('body').removeClass('splash');});});}}}}
939function initMap(){if(jQuery('#map').length>0){initializeMap();}}
940
941function slider(mode) {
942	if (mode === 'on' && (jQuery('.fullscreen-slider').length > 0)) {
943		jQuery.fn.superslides.fx = jQuery.extend({
944			fadeTransition: function(orientation, complete) {
945				var that = this,
946					$children = that.$container.children(),
947					$outgoing = $children.eq(orientation.outgoing_slide),
948					$target = $children.eq(orientation.upcoming_slide);
949				$target.css({
950					left: this.width,
951					opacity: 1,
952					display: 'block'
953				});
954				
955				jQuery('.slides-container li:eq(' + orientation.outgoing_slide + ')').removeClass('current-slide');
956				jQuery('.slides-container li:eq(' + orientation.upcoming_slide + ')').addClass('current-slide');
957
958				$target.transition({
959					scale: 1
960				}, 0);
961
962				if (that.$container.children('li').length > 1) {
963
964					if (orientation.outgoing_slide >= 0) {
965						$outgoing.transition({
966							opacity: 0,
967							scale: 1.5,
968						}, that.options.animation_speed, function() {
969							if (that.size() > 1) {
970								$children.eq(orientation.upcoming_slide).css({
971									zIndex: 2
972								});
973								if (orientation.outgoing_slide >= 0) {
974									$children.eq(orientation.outgoing_slide).css({
975										opacity: 1,
976										display: 'none',
977										zIndex: 0
978									});
979								}
980							}
981							complete();
982						});
983					} else {
984						$target.css({
985							zIndex: 2
986						});
987						complete();
988					}
989				} else {
990					complete();
991				}
992			}
993		}, jQuery.fn.superslides.fx);
994
995		jQuery('#slides').superslides({
996			hashchange: false,
997			animation: animationType,
998			animation_easing: animationEasing,
999			play: slideDuration * 1000,
1000			animation_speed: animationSpeed * 1000,
1001			inherit_height_from: 'body',
1002		});
1003
1004		if (slidePauseOnHover) {
1005			jQuery('#slides').on('mouseenter', function() {
1006				jQuery(this).superslides('stop');
1007			});
1008			jQuery('#slides').on('mouseleave', function() {
1009				jQuery(this).superslides('start');
1010			});
1011		}
1012
1013		jQuery('#slides').imagesLoaded(function() {
1014			jQuery('.fullscreen-slider').transition({
1015				opacity: 1
1016			});
1017		});
1018
1019		jQuery('.slides-navigation .next').on('click', function() {
1020			jQuery('#slides').superslides('animate', 'next');
1021		});
1022
1023		jQuery('.slides-navigation .prev').on('click', function() {
1024			jQuery('#slides').superslides('animate', 'prev');
1025		});
1026
1027		jQuery(window).resize();
1028	}
1029}
1030
1031function refreshMenu(element){var wrapperClass=element.attr('class').replace('   ','  ').replace('  ',' ').split(' ');jQuery(".main-nav a").removeClass("active");if(wrapperClass[1]){var $el=jQuery(".main-nav ."+wrapperClass[1]);if(!$el.parent().parent().hasClass('no-icon')){$el.addClass("active");}else{$el.parent().parent().addClass('no-icon-active');}}}
1032function initCarousel(){var figureCount=jQuery('#slider-res .item').length;jQuery("#slider-res").owlCarousel({pagination:false,slideSpeed:2000,paginationSpeed:2000,stopOnHover:true,singleItem:true,transitionStyle:'fade',autoPlay:4000,});var carousel=jQuery('#slider-res').data('owlCarousel');if(figureCount===1){carousel.stop();}
1033
1034jQuery(".restaurant-carousel").each(function (index) {
1035	var slideDuration = jQuery(this).data('slide-duration') * 1000;
1036
1037	jQuery(this).owlCarousel({
1038		singleItem:true,
1039		stopOnHover:true,
1040		autoPlay: slideDuration,
1041		afterInit : function() {
1042			var that = this;
1043			that.owlControls.prependTo(jQuery(".controls"));
1044		}
1045	});
1046});
1047// jQuery(window).load(function() {
1048// 	menuCarousel.init();
1049// });
1050if(jQuery('div.owl-carousel').hasClass('menu-single-carousel') || jQuery('div.owl-carousel').hasClass('menu-single-carousel2')) {
1051	var owl = jQuery('.menu-single-carousel');
1052	// var current = '';
1053	// var curr = 1;
1054	var animating = '';
1055	var that = this; 
1056	owl.owlCarousel({
1057		navigation : false, // Show next and prev buttons
1058      	slideSpeed : 300,
1059      	pagination: false,
1060      	singleItem:true,
1061
1062		afterUpdate: function() {
1063			animating = ''
1064		},
1065
1066      	beforeMove: function(event) {
1067      		if(animating == 'secondAnimating')
1068      			return false;
1069
1070      		animating = 'firstAnimating';
1071      		var currentItem = owl.data('owlCarousel').currentItem;
1072      		var owlSmallWrapper = jQuery('.menu-single-carousel2');
1073      		owlSmallWrapper.find('.active').removeClass('active');
1074      		var owlSmall = owlSmallWrapper.data('owlCarousel');
1075
1076      		owlSmall.goTo(currentItem);
1077
1078      		owlSmallWrapper.find('.owl-item:eq('+currentItem+')').addClass('active');
1079
1080		}, 
1081		afterMove: function() {
1082			animating = '';
1083		}
1084
1085	});
1086	var owlSmall = jQuery('.menu-single-carousel2');
1087	owlSmall.owlCarousel({
1088		items: 4,
1089		navigation: false,
1090		slideSpeed: 300,
1091		startPosition: 0,
1092		pagination: false,
1093		afterInit: function() {
1094			owlSmall.find('.owl-item:eq(0)').addClass('active');
1095		},
1096		afterUpdate: function() {
1097			animating = ''
1098		},
1099		beforeMove: function(event) {
1100			if(animating == 'firstAnimating') 
1101				return false; 
1102			animating = 'secondAnimating';
1103
1104			var activeItem = owlSmall.find('.active').index();
1105      		var owl = jQuery('.menu-single-carousel').data('owlCarousel');
1106      		owl.goTo(activeItem);
1107
1108		},
1109		afterMove: function() {
1110			animating = '';
1111		}
1112
1113	});
1114	owlSmall.on('click', '.owl-item', function(){
1115		owlSmall.find('.active').removeClass('active');
1116		var owlSmallCarousel = owlSmall.data('owlCarousel');
1117		jQuery(this).addClass('active');
1118		owlSmallCarousel.goTo(jQuery(this).index());
1119
1120	})
1121
1122} else {
1123	jQuery('.owl-carousel').owlCarousel({
1124		singleItem:true,
1125		stopOnHover:true,
1126		autoPlay: 4000,
1127		afterInit : function() {
1128			var that = this;
1129			that.owlControls.prependTo(jQuery(".controls"));
1130		}
1131	});
1132}
1133
1134
1135}
1136
1137+function($){'use strict';var Collapse=function(element,options){this.$element=$(element)
1138this.options=$.extend({},Collapse.DEFAULTS,options)
1139this.transitioning=null
1140if(this.options.parent)this.$parent=$(this.options.parent)
1141if(this.options.toggle)this.toggle()}
1142Collapse.DEFAULTS={toggle:true}
1143Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass('width')
1144return hasWidth?'width':'height'}
1145Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass('in'))return
1146var startEvent=$.Event('show.bs.collapse')
1147this.$element.trigger(startEvent)
1148if(startEvent.isDefaultPrevented())return
1149var actives=this.$parent&&this.$parent.find('> .panel > .in')
1150if(actives&&actives.length){var hasData=actives.data('bs.collapse')
1151if(hasData&&hasData.transitioning)return
1152actives.collapse('hide')
1153hasData||actives.data('bs.collapse',null)}
1154var dimension=this.dimension()
1155this.$element.removeClass('collapse').addClass('collapsing')[dimension](0)
1156this.transitioning=1
1157var complete=function(e){if(e&&e.target!=this.$element[0]){this.$element.one($.support.transition.end,$.proxy(complete,this))
1158return}
1159this.$element.removeClass('collapsing').addClass('collapse in')[dimension]('auto')
1160this.transitioning=0
1161this.$element.trigger('shown.bs.collapse')}
1162if(!$.support.transition)return complete.call(this)
1163var scrollSize=$.camelCase(['scroll',dimension].join('-'))
1164this.$element.one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])}
1165Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass('in'))return
1166var startEvent=$.Event('hide.bs.collapse')
1167this.$element.trigger(startEvent)
1168if(startEvent.isDefaultPrevented())return
1169var dimension=this.dimension()
1170this.$element[dimension](this.$element[dimension]())[0].offsetHeight
1171this.$element.addClass('collapsing').removeClass('collapse').removeClass('in')
1172this.transitioning=1
1173var complete=function(e){if(e&&e.target!=this.$element[0]){this.$element.one($.support.transition.end,$.proxy(complete,this))
1174return}
1175this.transitioning=0
1176this.$element.trigger('hidden.bs.collapse').removeClass('collapsing').addClass('collapse')}
1177if(!$.support.transition)return complete.call(this)
1178this.$element
1179[dimension](0).one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)}
1180Collapse.prototype.toggle=function(){this[this.$element.hasClass('in')?'hide':'show']()}
1181var old=$.fn.collapse
1182$.fn.collapse=function(option){return this.each(function(){var $this=$(this)
1183var data=$this.data('bs.collapse')
1184var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=='object'&&option)
1185if(!data&&options.toggle&&option=='show')option=!option
1186if(!data)$this.data('bs.collapse',(data=new Collapse(this,options)))
1187if(typeof option=='string')data[option]()})}
1188$.fn.collapse.Constructor=Collapse
1189$.fn.collapse.noConflict=function(){$.fn.collapse=old
1190return this}
1191$(document).on('click.bs.collapse.data-api','[data-toggle="collapse"]',function(e){var $this=$(this),href
1192var target=$this.attr('data-target')||e.preventDefault()||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')
1193var $target=$(target)
1194var data=$target.data('bs.collapse')
1195var option=data?'toggle':$this.data()
1196var parent=$this.attr('data-parent')
1197var $parent=parent&&$(parent)
1198if(!data||!data.transitioning){if($parent)$parent.find('[data-toggle="collapse"][data-parent="'+parent+'"]').not($this).addClass('collapsed')
1199$this[$target.hasClass('in')?'addClass':'removeClass']('collapsed')}
1200$target.collapse(option)})}(jQuery);
1201
1202/* contact-form */
1203
1204jQuery(document).ready(function() {
1205	'use strict';
1206	var checkEmail = function(email) {
1207		var emailRegex = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
1208		return emailRegex.test(email);
1209	};
1210
1211	jQuery('.main-nav').each(function(){	
1212		var menuHeight = jQuery('.menu-item:not(.menu-image)').find('.content-link').outerHeight();
1213		var iconMenu = jQuery('.menu-item .content-link i');
1214		iconMenu.css('line-height', menuHeight+'px');
1215	});
1216
1217	jQuery(document).on('click', '.refresh-captcha', function(e) {
1218		e.preventDefault();
1219		var captchaType = jQuery('.refresh-captcha').data('captcha-type');
1220		var captchaStringLength = jQuery('.refresh-captcha').data('captcha-string-length');
1221
1222		jQuery('#captcha').attr('src', themeUrl + '/includes/securimage/securimage_show.php?type='+captchaType+'&length='+captchaStringLength+'&rand=' + Math.random());
1223	});
1224
1225	jQuery(document).on("focus", "#reservation-form input, #reservation-form textarea", function(e) {
1226		jQuery(this).parent().removeClass('error');
1227		if (additionalRevervationInfo) {
1228			jQuery(this).parent().find('small.error').remove();
1229		}
1230	});
1231
1232	jQuery(document).on("focus", "#contact-form input, #contact-form textarea", function(e) {
1233		jQuery(this).parent().removeClass('error');
1234	});
1235
1236	jQuery(document).on("submit", "#reservation-form", function(e) {
1237		e.preventDefault();
1238
1239		if (additionalRevervationInfo) {
1240			jQuery(this).parent().find('small.error').remove();
1241			jQuery('#date-error').remove();
1242		}
1243
1244		if (!disableReservationPicker) {
1245			checkOpeningTime();
1246		}
1247
1248		var name = jQuery('#form-name'),
1249			email = jQuery('#form-email'),
1250			phone = jQuery('#form-phone'),
1251			amount = jQuery('#form-amount'),
1252			message = jQuery('#form-message'),
1253			day = jQuery('#day').val(jQuery('.select-time.day span').text()),
1254			month = jQuery('#month').val(jQuery('.select-time.month span').text()),
1255			year = jQuery('#year').val(jQuery('.select-time.year span').text()),
1256			hour = jQuery('#hour').val(jQuery('.select-time.hour span').text()),
1257			minute = jQuery('#minute').val(jQuery('.select-time.minutes span').text()),
1258			terms =  jQuery('#form-terms'),
1259			captcha = jQuery("#form-captcha");
1260			var ampm = '';
1261			if (jQuery('#ampm').length) {
1262				ampm = jQuery('#ampm').val(jQuery('.select-time.part').text());
1263			}
1264
1265		var data_reser = {
1266			'captcha' : captcha.val(),
1267			'name' : name.val(),
1268			'email' : email.val(),
1269			'phone' : phone.val(),
1270			'amount' : amount.val(),
1271			'message' : message.val(),
1272			'day' : day.val(),
1273			'month' : month.val(),
1274			'year' : year.val(),
1275			'hour' : hour.val(),
1276			'minute' : minute.val(),
1277			'ampm' : ampm.val(),
1278			'terms' : terms.val(),
1279			'action' : 'send-reservation-form'
1280		};
1281
1282		if (jQuery('#form-custom-1').length) {
1283			data_reser['custom-1'] = jQuery('#form-custom-1').val();
1284		}
1285		if (jQuery('#form-custom-2').length) {
1286			data_reser['custom-2'] = jQuery('#form-custom-2').val();
1287		}
1288		if (jQuery('#form-custom-3').length) {
1289			data_reser['custom-3'] = jQuery('#form-custom-3').val();
1290		}
1291
1292		jQuery.ajax({
1293			url: sendReservationFormMessage.ajaxUrl,
1294			type: 'POST',
1295			dataType: 'json',
1296			data: data_reser,
1297			beforeSend: function() {
1298				var errors = false,
1299				validate = function() {
1300					errors = false;
1301					// Date validation
1302					if (!disableReservationPicker) {
1303						if (jQuery('div.select-time.day').hasClass('error') ) {
1304							jQuery('div.select-time.day, div.select-time.month, div.select-time.year, div.select-time.hour, div.select-time.minutes, div.select-time.part').addClass('error');
1305							errors = true;
1306						}
1307					}
1308
1309					// Captcha validation
1310					if (typeof captcha.val() != 'undefined') {
1311						if (captcha.val().length === 0) {
1312							captcha.parent().addClass('error');
1313							if (additionalRevervationInfo) {
1314								captcha.parent().append('<small class="error">'+captchaValidationError+'</small>');
1315							}
1316							errors = true;
1317						} else {
1318							captcha.parent().removeClass('error');
1319						}
1320					}
1321
1322					// Name and other reservation inputs validation
1323					if (requiredReservationName) {
1324						if (name.val().length === 0) {
1325							name.parent().addClass('error');
1326							if (additionalRevervationInfo) {
1327								name.parent().prepend('<small class="error">'+nameValidationError+'</small>');
1328							}
1329							errors = true;
1330						} else {
1331							name.parent().removeClass('error');
1332						}
1333					}
1334
1335					if (requiredReservationEmail) {
1336						if (email.val().length === 0) {
1337							email.parent().addClass('error');
1338							if (additionalRevervationInfo) {
1339								email.parent().prepend('<small class="error">'+emailValidationError+'</small>');
1340							}
1341							errors = true;
1342						} else if(!checkEmail(email.val())) {
1343							email.parent().addClass('error');
1344							if (additionalRevervationInfo) {
1345								email.parent().prepend('<small class="error">'+emailValidationError+'</small>');
1346							}
1347							errors = true;
1348						} else {
1349							email.parent().removeClass('error');
1350						}
1351					}
1352
1353					if (requiredReservationPhone) {
1354						if (phone.val().length === 0) {
1355							phone.parent().addClass('error');
1356							if (additionalRevervationInfo) {
1357								phone.parent().prepend('<small class="error">'+phoneValidationError+'</small>');
1358							}
1359							errors = true;
1360						} else {
1361							phone.parent().removeClass('error');
1362						}
1363					}
1364
1365					if (requiredReservationPeople) {
1366						if (amount.val().length === 0) {
1367							amount.parent().addClass('error');
1368							if (additionalRevervationInfo) {
1369								amount.parent().prepend('<small class="error">'+amountValidationError+'</small>');
1370							}
1371							errors = true;
1372						} else {
1373							amount.parent().removeClass('error');
1374						}
1375					}
1376
1377					if (requiredReservationMessage) {
1378						if(message.val().length === 0) {
1379							message.parent().addClass('error');
1380							if (additionalRevervationInfo) {
1381								message.parent().prepend('<small class="error">'+messageValidationError+'</small>');
1382							}
1383							errors = true;
1384						} else {
1385							message.parent().removeClass('error');
1386						}
1387					}
1388
1389					if (requiredReservationTerms) {
1390						if (jQuery('#form-terms').is(':checked')) {
1391							terms.parent().removeClass('error').css({'color':'#514D4D'});
1392						} else {
1393							terms.parent().addClass('error').css({'color':'red'});
1394							errors = true;
1395						}
1396					}
1397				};
1398
1399				validate();
1400
1401				if (custom1Required) {
1402					if(jQuery('#form-custom-1').val().length === 0) {
1403						jQuery('#form-custom-1').parent().addClass('error');
1404						if (additionalRevervationInfo) {
1405							jQuery('#form-custom-1').parent().prepend('<small class="error">'+custom1ValidationError+'</small>');
1406						}
1407						errors = true;
1408					} else {
1409						jQuery('#form-custom-1').parent().removeClass('error');
1410					}
1411				}
1412
1413				if (custom2Required) {
1414					if(jQuery('#form-custom-2').val().length === 0) {
1415						jQuery('#form-custom-2').parent().addClass('error');
1416						if (additionalRevervationInfo) {
1417							jQuery('#form-custom-2').parent().prepend('<small class="error">'+custom2ValidationError+'</small>');
1418						}
1419						errors = true;
1420					} else {
1421						jQuery('#form-custom-2').parent().removeClass('error');
1422					}
1423				}
1424
1425				if (custom3Required) {
1426					if(jQuery('#form-custom-3').val().length === 0) {
1427						jQuery('#form-custom-3').parent().addClass('error');
1428						if (additionalRevervationInfo) {
1429							jQuery('#form-custom-3').parent().prepend('<small class="error">'+custom3ValidationError+'</small>');
1430						}
1431						errors = true;
1432					} else {
1433						jQuery('#form-custom-3').parent().removeClass('error');
1434					}
1435				}
1436
1437				if (errors) {
1438					return false;
1439				}
1440			}
1441		}).done(function(responseData) {
1442			if (responseData.success === true) {
1443				jQuery('.alert-success').removeClass('hidden');
1444
1445				name.val('');
1446
1447				if (typeof captcha.val() != 'undefined') {
1448					captcha.val('');
1449				}
1450
1451				email.val('');
1452				phone.val('');
1453				amount.val('');
1454				message.val('');
1455
1456				if (jQuery('#form-terms').length) {
1457					jQuery('#form-terms').prop('checked', false);
1458				}
1459
1460				if (jQuery('#form-custom-1').length) {
1461					jQuery('#form-custom-1').val('');
1462				}
1463				if (jQuery('#form-custom-2').length) {
1464					jQuery('#form-custom-2').val('');
1465				}
1466				if (jQuery('#form-custom-3').length) {
1467					jQuery('#form-custom-3').val('');
1468				}
1469			} else {
1470				jQuery('.alert-danger').removeClass('hidden');
1471			}
1472		}).fail(function() {
1473			// handle server fail here
1474		});
1475	});
1476
1477
1478	/* Contact form */
1479
1480	jQuery(document).on("submit", "#contact-form", function(e) {
1481			e.preventDefault();
1482
1483			var isMultiple = jQuery(this).data('multiple') || false;
1484
1485			var name = jQuery('#form-name'),
1486				email = jQuery('#form-email'),
1487				subject = jQuery('#form-subject'),
1488				message = jQuery('#form-message'),
1489				type = jQuery('#form-type'),
1490				terms = jQuery('#form-terms'),
1491				captcha = jQuery('#form-captcha');
1492
1493			var data = {
1494				'captcha' : captcha.val(),
1495				'form-name': name.val(),
1496				'form-email' : email.val(),
1497				'form-subject' : subject.val(),
1498				'form-message' : message.val(),
1499				'form-type': type.val(),
1500				'terms' : terms.val(),
1501				'action' : 'send-contact-form'
1502			};
1503
1504			jQuery.ajax({
1505				url: sendContactFormMessage.ajaxUrl,
1506				type: 'POST',
1507				dataType: 'json',
1508				data: data,
1509				beforeSend: function() {
1510					var errors = false,
1511					validate = function() {
1512						errors = false;
1513
1514						var reqContactName;
1515						var reqContactEmail;
1516						var reqContactSubject;
1517						var reqContactMessage;
1518						var reqContactTerms;
1519
1520						if (isMultiple) {
1521							reqContactName = requiredMultipleContactName;
1522							reqContactEmail = requiredMultipleContactEmail;
1523							reqContactSubject = requiredMultipleContactSubject;
1524							reqContactMessage = requiredMultipleContactMessage;
1525							reqContactTerms = requiredMultipleContactTerms;
1526						} else {
1527							reqContactName = requiredContactName;
1528							reqContactEmail = requiredContactEmail;
1529							reqContactSubject = requiredContactSubject;
1530							reqContactMessage = requiredContactMessage;
1531							reqContactTerms = requiredContactTerms;
1532						}
1533
1534						if (typeof captcha.val() != 'undefined') {
1535							if(captcha.val().length === 0) {
1536								captcha.parent().addClass('error');
1537								errors = true;
1538							} else {
1539								captcha.parent().removeClass('error');
1540							}
1541						}
1542
1543						if (reqContactName) {
1544							if(name.val().length === 0) {
1545								name.parent().addClass('error');
1546								errors = true;
1547							} else {
1548								name.parent().removeClass('error');
1549							}
1550						}
1551
1552						if (reqContactEmail) {
1553							if(email.val().length === 0) {
1554								email.parent().addClass('error');
1555								errors = true;
1556							} else if(!checkEmail(email.val())) {
1557								email.parent().addClass('error');
1558								errors = true;
1559							} else {
1560								email.parent().removeClass('error');
1561							}
1562						}
1563
1564						if (reqContactSubject) {
1565							if(subject.val().length === 0) {
1566								subject.parent().addClass('error');
1567								errors = true;
1568							} else {
1569								subject.parent().removeClass('error');
1570							}
1571						}
1572
1573						if (reqContactMessage) {
1574							if(message.val().length === 0) {
1575								message.parent().addClass('error');
1576								errors = true;
1577							} else {
1578								message.parent().removeClass('error');
1579							}
1580						}
1581
1582						if (reqContactTerms) {
1583							if (jQuery('#form-terms').is(':checked')) {
1584								terms.parent().removeClass('error').css({'color':'#514D4D'});
1585							} else {
1586								terms.parent().addClass('error').css({'color':'red'});
1587								errors = true;
1588							}
1589						}
1590					};
1591
1592					validate();
1593					
1594					if(errors) {
1595						return false;
1596					}
1597
1598				}
1599			}).done(function(responseData) {
1600				if(responseData.success === true) {
1601					jQuery('.alert-success').removeClass('hidden');
1602					// setTimeout(function () {
1603					// 	jQuery('.alert-success').addClass('hidden');
1604					// }, 3000);
1605					name.val('');
1606					captcha.val('');
1607					email.val('');
1608					subject.val('');
1609					message.val('');
1610
1611					if (jQuery('#form-terms').length) {
1612						jQuery('#form-terms').prop('checked', false);
1613					}
1614				} else {
1615					// var input = jQuery('#'+responseData.data[0].id);
1616					// input.parent().addClass('error');
1617					jQuery('.alert-danger').removeClass('hidden');
1618					// setTimeout(function () {
1619					// 	jQuery('.alert-danger').addClass('hidden');
1620					// }, 3000);
1621				}
1622			}).fail(function() {
1623				
1624			});
1625		});
1626});
1627
1628// Restaurant Reservation
1629// =================
1630
1631jQuery('.rtb-booking-form').find("input, textarea").each(function(i, el){
1632	var elId = jQuery(el).attr("id");
1633	var label = null;
1634	if (elId && (label = jQuery(el).parents("form").find("label[for="+elId+"]")).length == 1) {
1635		jQuery(el).attr("placeholder", label.html().trim());
1636		// $(label).remove();
1637	}
1638});
1639// jQuery('.rtb-booking-form fieldset.contact').after(jQuery('.rtb-booking-form .message'));
1640
1641jQuery('.rtb-error').siblings('input').addClass('message-error');
1642
1643jQuery('.message-error').on('keyup', function() {
1644	var that = this;
1645	if (jQuery(that).val() !== '') {
1646		jQuery(this).removeClass('message-error');
1647	} else {
1648		jQuery(that).addClass('message-error');
1649	}
1650});
1651if(jQuery('#rtb-time.message-error').siblings('input').attr("value") != '') {
1652	
1653}
1654// console.log(jQuery('.rtb-text.time input[type=hidden]'));
1655jQuery('.rtb-text.time').on('change', 'input', function(){
1656	if(jQuery(this).val() == '') {
1657		jQuery(this).parent().find('#rtb-time').addClass('message-error');
1658	} else {
1659		jQuery(this).parent().find('#rtb-time').removeClass('message-error');
1660	}
1661})
1662
1663function createGallery() {
1664	jQuery('.gallery-masonry').each(function(){
1665		var that = jQuery(this);
1666		jQuery(this).imagesLoaded(function(){
1667			that.masonry({
1668				itemSelector: 'article',
1669				percentPosition: true,
1670				transitionDuration: '0.4s',
1671				columnWidth: '.grid-sizer'
1672			});
1673			that.masonry('layout');
1674		})
1675	});
1676}
1677
1678jQuery('document').ready(function() {
1679	jQuery('.wpcf7-submit').on('click', function(){
1680
1681		var that = this;
1682
1683		jQuery(that).parent().css('height', '34px');
1684		jQuery(that).transition({opacity:0}, 400, function(){
1685			jQuery('.wpcf7-form-control-wrap').on('keyup', '.wpcf7-not-valid', function() {
1686				var that = this;
1687				if (jQuery(that).val() !== '') {
1688					jQuery(this).removeClass('wpcf7-not-valid');
1689				} else {
1690					jQuery(that).addClass('wpcf7-not-valid');
1691				}
1692			});
1693
1694			jQuery('.wpcf7-display-none').transition({opacity:1}, 400, function() {
1695				setTimeout(function(){
1696
1697				jQuery('.wpcf7-display-none').transition({opacity: 0}, function(){
1698					jQuery('.wpcf7-display-none').removeClass('wpcf7-validation-errors');
1699					console.log('sent');
1700					jQuery(that).transition({opacity:1});
1701				});
1702				},3000)
1703			});
1704		});
1705	});
1706	jQuery('.wpcf7-not-valid').on('keyup', function() {
1707		var that = this;
1708		if (jQuery(that).val() !== '') {
1709			jQuery(this).removeClass('wpcf7-not-valid');
1710		} else {
1711			jQuery(that).addClass('wpcf7-not-valid');
1712		}
1713	});
1714	jQuery('.wpcf7').each(function() {
1715		var that = this;
1716		var captcha = jQuery(that).find('.captcha-wrapper');
1717		var captcha_img = jQuery(that).find('.captcha-wrapper img');
1718
1719		captcha.append('<div class="captcha-img"><div class="img-wrapper"></div></div>');
1720		captcha_img.prependTo(captcha.find('.img-wrapper'));
1721	});	
1722	// jQuery('.gallery-masonry img').imagesLoaded(function(){
1723		// console.log(this);
1724		createGallery();
1725	// })
1726
1727	jQuery('#restaurant .map').each(function(){
1728		jQuery(this).parent().addClass('no-hover-block-square');
1729	});
1730
1731});
1732
1733(function($){
1734	if($('.info-reservation .select-date').length > 0) {
1735		$(window).on('daysReady', checkDates);
1736	}
1737
1738	function checkDates() {
1739		var date = new Date;
1740		var currentDay = $('.select-date').data('day');
1741		var currentMonth = $('.select-date').data('month');
1742		var currentYear = $('.select-date').data('year');
1743		var minOffset = $('.select-date').data('min');
1744
1745		if(currentMonth == $('#select-month').val() && currentYear == $('#select-year').val()) {
1746			$('#select-day option').each(function(i, el){
1747				if(i+1-minOffset < currentDay) {
1748					$(el).attr('disabled', true);
1749				}
1750			})
1751			$('#select-month option').each(function(i, el){
1752				if(el.value < currentMonth) {
1753					$(el).attr('disabled', true);
1754				}
1755			})
1756		} else if(currentYear != $('#select-year').val()) {
1757			$('#select-month option').each(function(i, el){
1758				$(el).removeAttr('disabled');
1759			})
1760		}
1761	}
1762})(jQuery);
1763

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.