(function($){ "use strict"; function get_configs(){ if(typeof ttSubscrConfig!=='undefined'){ return ttSubscrConfig; }else{ return ''; }} function insert_subscription(form_data,form,options){ $.ajax({ type: 'POST', url: ajaxurl, data: form_data, success: function(response){ process_result(response,form,options); }, error: function (request, status, error){ process_result(request.responseText,form,options); }, dataType: 'json', }); } function process_result(result,form,options){ if(config.result_wrapper){ $(config.result_wrapper.tag,config.result_wrapper.attr).text(result).appendTo(config.result_container_selector); }else{ $(config.result_container_selector).html(result); } if(result==='Subscribed'||result===config.success_msg){ options.success(result,config,form); $(config.result_container_selector).addClass(config.success_class); form.reset(); }else{ options.error(result,config,form); $(config.result_container_selector).addClass(config.error_class); }} function check_required(form,configs){ var all_required_checker=true; $(form).find('[data-tt-subscription-required]').each(function(){ if(!$(this).val()){ all_required_checker=false; $(this).addClass(configs.required_class); }}); return all_required_checker; } function validate_emails(form,configs){ var all_emails_checker=true; $(form).find('[data-tt-subscription-type=email]').each(function(){ if(!validateEmail($(this).val())){ all_emails_checker=false; $(this).addClass(configs.invalid_email_class); }}); return all_emails_checker; } function validateEmail(sEmail){ var filter=/^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; if(filter.test(sEmail)){ return true; }else{ return false; }} function clean_result_container(configs){ $(configs.result_container_selector).removeClass(configs.error_class+' '+configs.success_class+ ' ' +configs.animation_done_class).html(''); } function destroy_result_container(form,configs){ $(configs.result_container_selector).removeClass(configs.error_class+' '+configs.success_class).addClass(configs.animation_done_class); if(configs.input_timeout){ $(form).find('input').removeClass(configs.required_class+' '+configs.invalid_email_class); }} $.fn.extend({ tt_subscription: function(options,arg){ var defaults={ success:function(result,config,form){}, error:function(error,config,form){}, required:function(config,form){}, invalid_email:function(config,form){}}; options=$.extend({}, defaults, options); this.each(function(){ new $.tt_subscription(this, options, arg); }); return; }}); var config=get_configs(); $.tt_subscription=function(form, options, arg){ if(options&&typeof(options)==='string'){ if(options==='mymethod1'){ tt_subscription_method1(arg); } else if(options==='mymethod2'){ tt_subscription_method2(arg); } return; } var result_timeout_id; var input_timeout_id; if(config=='') get_configs(); $(form).on('submit',function(event){ event.preventDefault(); clearTimeout(result_timeout_id); var form_data=$(form).serialize(); form_data=form_data + "&action=insert_subscription&subscription-nonce=" + config.subscription_nonce; clean_result_container(config); if(check_required(form,config)){ if(validate_emails(form,config)){ var result=insert_subscription(form_data,form,options); }else{ options.invalid_email(config,form); $(config.result_container_selector).addClass(config.error_class); if(config.result_wrapper){ $(config.result_wrapper.tag,config.result_wrapper.attr).text(config.invalid_email_msg).appendTo(config.result_container_selector); }else{ $(config.result_container_selector).html(config.invalid_email_msg); }} }else{ options.required(config,form); $(config.result_container_selector).addClass(config.error_class); if(config.result_wrapper){ $(config.result_wrapper.tag,config.result_wrapper.attr).text(config.required_msg).appendTo(config.result_container_selector); }else{ $(config.result_container_selector).html(config.required_msg); }} result_timeout_id=setTimeout(function(){destroy_result_container(form,config);},config.result_timeout); }); function tt_subscription_method1(arg){ } function tt_subscription_method2(arg){ }}; $(document).ready(function($){ if(config=='') get_configs(); if($('form[data-tt-subscription]').length) $('form[data-tt-subscription]').tt_subscription() }); })(jQuery); !function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(m){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,!0!==i[s]&&(f+="="+i[s]));return document.cookie=n+"="+r+f}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;uthis.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); (function(h){h.fn.countdown=function(a,l){function m(a,d){return function(){return d.call(a)}}var k="seconds minutes hours days weeks daysLeft".split(" ");return this.each(function(){function j(){if(0===e.closest("html").length)clearInterval(f),d("removed");else{c--;0>c&&(c=0);g={seconds:c%60,minutes:Math.floor(c/60)%60,hours:Math.floor(c/60/60)%24,days:Math.floor(c/60/60/24),weeks:Math.floor(c/60/60/24/7),daysLeft:Math.floor(c/60/60/24)%7};for(var a=0;ab.value?"0"+b.value.toString():b.value.toString();break;default:b.value&&(b.value=b.value.toString())}l.call(e,b)}if(!(a instanceof Date))if(String(a).match(/^[0-9]*$/))a=new Date(a);else if(a.match(/([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{2,4})\s([0-9]{1,2})\:([0-9]{2})\:([0-9]{2})/)||a.match(/([0-9]{2,4})\/([0-9]{1,2})\/([0-9]{1,2})\s([0-9]{1,2})\:([0-9]{2})\:([0-9]{2})/))a=new Date(a);else if(a.match(/([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{2,4})/)||a.match(/([0-9]{2,4})\/([0-9]{1,2})\/([0-9]{1,2})/))a=new Date(a);else throw Error("Doesn't seen to be a valid date object or string");var e=h(this),i={},g={},f=e.data("countdownInterval"),c=Math.floor((a.valueOf()-(new Date).valueOf())/1E3);j();f&&clearInterval(f);e.data("countdownInterval",setInterval(m(e,j),1E3));f=e.data("countdownInterval")})}})(jQuery); (function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}var n=e.prototype;n.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},n.flattenListeners=function(e){var t,n=[];for(t=0;e.length>t;t+=1)n.push(e[t].listener);return n},n.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&(t={},t[e]=n),t||n},n.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},n.on=n.addListener,n.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},n.once=n.addOnceListener,n.defineEvent=function(e){return this.getListeners(e),this},n.defineEvents=function(e){for(var t=0;e.length>t;t+=1)this.defineEvent(e[t]);return this},n.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},n.off=n.removeListener,n.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},n.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},n.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},n.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},n.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],o=n.listener.apply(this,t||[]),(o===this._getOnceReturnValue()||n.once===!0)&&this.removeListener(e,s[r][i].listener);return this},n.trigger=n.emitEvent,n.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},n.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},n._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},n._getEvents=function(){return this._events||(this._events={})},"function"==typeof define&&define.amd?define(function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.EventEmitter=e}).call(this),function(e){"use strict";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(r):e.eventie=r}(this),function(e){"use strict";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); (function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=a(e("
"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",o)}function o(){e.datepicker._isDisabledDatepicker(h.inline?h.dpDiv.parent()[0]:h.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}},e.extend(e.ui,{datepicker:{version:"1.11.4"}});var h;e.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return r(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var s,n,a;s=t.nodeName.toLowerCase(),n="div"===s||"span"===s,t.id||(this.uuid+=1,t.id="dp"+this.uuid),a=this._newInst(e(t),n),a.settings=e.extend({},i||{}),"input"===s?this._connectDatepicker(t,a):n&&this._inlineDatepicker(t,a)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("
")):this.dpDiv}},_connectDatepicker:function(t,i){var s=e(t);i.append=e([]),i.trigger=e([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var s,n,a,o=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),o&&(i.append=e(""+o+""),t[r?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&t.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):e("").addClass(this._triggerClass).html(a?e("").attr({src:a,alt:n,title:n}):n)),t[r?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,s,n,a=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(i=0,s=0,n=0;e.length>n;n++)e[n].length>i&&(i=e[n].length,s=n);return s},a.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var s=e(t);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,s,n,a){var o,h,l,u,d,c=this._dialogInst;return c||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e(""),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),c=this._dialogInst=this._newInst(this._dialogInput,!1),c.settings={},e.data(this._dialogInput[0],"datepicker",c)),r(c.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,l/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",c),this},_destroyDatepicker:function(t){var i,s=e(t),n=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),h===n&&(h=null))},_enableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,s){var n,a,o,h,l=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),r(l.settings,n),null!==o&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,o)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,s,n,a=e.datepicker._getInst(t.target),o=!0,r=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),o=!1;break;case 13:return n=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv),n[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,n[0]),i=e.datepicker._get(a,"onSelect"),i?(s=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?1:-1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?-1:1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,s,n=e.datepicker._getInst(t.target);return e.datepicker._get(n,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(t){var i,s=e.datepicker._getInst(t.target);if(s.input.val()!==s.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,e.datepicker._getFormatConfig(s)),i&&(e.datepicker._setDateFromField(s),e.datepicker._updateAlternate(s),e.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,o,h,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),a=n?n.apply(t,[t,i]):{},a!==!1&&(r(i.settings,a),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),o=!1,e(t).parents().each(function(){return o|="fixed"===e(this).css("position"),!o}),h={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),h=e.datepicker._checkOffset(i,h,o),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,h=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,s=this._getNumberOfMonths(t),n=s[1],a=17,r=t.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),t.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,s){var n=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?n-o:0,i.left-=s&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=s&&i.top===t.input.offset().top+r?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+r):0),i},_findPos:function(t){for(var i,s=this._getInst(t),n=this._get(s,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[n?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,s,n,a,o=this._curInst;!o||t&&o!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),s=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==s)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,s){var n=e(t),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(t){var i,s=e(t),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(t,i,s){var n=e(t),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(t,i,s,n){var a,o=e(t);e(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||(a=this._getInst(o[0]),a.selectedDay=a.currentDay=e("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var s,n=e(t),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,s,n,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t)),e(a).each(function(){e(this).val(n)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,s){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,a,o,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,c=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},x=function(e){var t=_(e),s="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,n="y"===e?s:1,a=RegExp("^\\d{"+n+","+s+"}"),o=i.substring(h).match(a);if(!o)throw"Missing number at position "+h;return h+=o[0].length,parseInt(o[0],10)},w=function(t,s,n){var a=-1,o=e.map(_(t)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,t){var s=t[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(a=t[0],h+=s.length,!1):void 0}),-1!==a)return a+1;throw"Unknown name at position "+h},k=function(){if(i.charAt(h)!==t.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;t.length>n;n++)if(b)"'"!==t.charAt(n)||_("'")?k():b=!1;else switch(t.charAt(n)){case"d":v=x("d");break;case"D":w("D",d,c);break;case"o":y=x("o");break;case"m":g=x("m");break;case"M":g=w("M",p,f);break;case"y":m=x("y");break;case"@":r=new Date(x("@")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((x("!")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(i.length>h&&(o=i.substr(h),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),y>-1)for(g=1,v=y;;){if(a=this._getDaysInMonth(m,g-1),a>=v)break;g++,v-=a}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(t){var i=e.length>s+1&&e.charAt(s+1)===t;return i&&s++,i},l=function(e,t,i){var s=""+t;if(h(e))for(;i>s.length;)s="0"+s;return s},u=function(e,t,i,s){return h(e)?s[t]:i[t]},d="",c=!1;if(t)for(s=0;e.length>s;s++)if(c)"'"!==e.charAt(s)||h("'")?d+=e.charAt(s):c=!1;else switch(e.charAt(s)){case"d":d+=l("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),n,a);break;case"o":d+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=l("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),o,r);break;case"y":d+=h("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":h("'")?d+="'":c=!0;break;default:d+=e.charAt(s)}return d},_possibleChars:function(e){var t,i="",s=!1,n=function(i){var s=e.length>t+1&&e.charAt(t+1)===i;return s&&t++,s};for(t=0;e.length>t;t++)if(s)"'"!==e.charAt(t)||n("'")?i+=e.charAt(t):s=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),a=n,o=this._getFormatConfig(e);try{a=this.parseDate(i,s,o)||n}catch(r){s=t?"":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,s){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},a=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,a=n.getFullYear(),o=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o));break;case"y":case"Y":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o))}l=h.exec(i)}return new Date(a,o,r)},o=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return o=o&&"Invalid Date"==""+o?s:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,n=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),n===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),s="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(s,-i,"M")},next:function(){e.datepicker._adjustDate(s,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(s)},selectDay:function(){return e.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(s,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,s,n,a,o,r,h,l,u,d,c,p,f,m,g,v,y,b,_,x,w,k,T,D,S,N,M,C,P,A,I,H,z,F,E,W,L,O,j=new Date,R=this._daylightSavingAdjust(new Date(j.getFullYear(),j.getMonth(),j.getDate())),Y=this._get(e,"isRTL"),J=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),K=this._get(e,"navigationAsDateFormat"),U=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),q=this._get(e,"stepMonths"),G=1!==U[0]||1!==U[1],X=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(e,"min"),$=this._getMinMaxDate(e,"max"),Z=e.drawMonth-V,et=e.drawYear;if(0>Z&&(Z+=12,et--),$)for(t=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-U[0]*U[1]+1,$.getDate())),t=Q&&Q>t?Q:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-q,1)),this._getFormatConfig(e)):i,s=this._canAdjustMonth(e,-1,et,Z)?"
"+i+"":B?"":""+i+"",n=this._get(e,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(et,Z+q,1)),this._getFormatConfig(e)):n,a=this._canAdjustMonth(e,1,et,Z)?""+n+"":B?"":""+n+"",o=this._get(e,"currentText"),r=this._get(e,"gotoCurrent")&&e.currentDay?X:R,o=K?this.formatDate(o,r,this._getFormatConfig(e)):o,h=e.inline?"":"",l=J?"
"+(Y?h:"")+(this._isInRange(e,r)?"":"")+(Y?"":h)+"
":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),c=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;U[0]>w;w++){for(k="",this.maxRows=4,T=0;U[1]>T;T++){if(D=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=" ui-corner-all",N="",G){if(N+="
"}for(N+="
"+(/all|left/.test(S)&&0===w?Y?a:s:"")+(/all|right/.test(S)&&0===w?Y?s:a:"")+this._generateMonthYearHeader(e,Z,et,Q,$,w>0||T>0,f,m)+"
"+"",M=d?"":"",x=0;7>x;x++)C=(x+u)%7,M+="";for(N+=M+"",P=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,P)),A=(this._getFirstDayOfMonth(et,Z)-u+7)%7,I=Math.ceil((A+P)/7),H=G?this.maxRows>I?this.maxRows:I:I,this.maxRows=H,z=this._daylightSavingAdjust(new Date(et,Z,1-A)),F=0;H>F;F++){for(N+="",E=d?"":"",x=0;7>x;x++)W=g?g.apply(e.input?e.input[0]:null,[z]):[!0,""],L=z.getMonth()!==Z,O=L&&!y||!W[0]||Q&&Q>z||$&&z>$,E+="",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);N+=E+""}Z++,Z>11&&(Z=0,et++),N+="
"+this._get(e,"weekHeader")+"=5?" class='ui-datepicker-week-end'":"")+">"+""+p[C]+"
"+this._get(e,"calculateWeek")(z)+""+(L&&!v?" ":O?""+z.getDate()+"":""+z.getDate()+"")+"
"+(G?"
"+(U[0]>0&&T===U[1]-1?"
":""):""),k+=N}_+=k}return _+=l,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,s,n,a,o,r){var h,l,u,d,c,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="
",_="";if(a||!g)_+=""+o[t]+"";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,_+=""}if(y||(b+=_+(!a&&g&&v?"":" ")),!e.yearshtml)if(e.yearshtml="",a||!v)b+=""+i+"";else{for(d=this._get(e,"yearRange").split(":"),c=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?c+parseInt(e,10):parseInt(e,10);return isNaN(t)?c:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,e.yearshtml+="",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!a&&g&&v?"":" ")+_),b+="
"},_adjustInstDate:function(e,t,i){var s=e.drawYear+("Y"===i?t:0),n=e.drawMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(s,n))+("D"===i?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,n,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return s&&n>s?s:n},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,s){var n=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(0>t?t:n[0]*n[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,s,n=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),o=null,r=null,h=this._get(e,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),o=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(o+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||t.getTime()>=n.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!r||r>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4",e.datepicker}); !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,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},j=this,k=[],l=e.selector,m=c(l),n=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),o=null!==n||b.createTouch!==d||"ontouchstart"in a||"onmsgesturechange"in a||navigator.msMaxTouchPoints,p=!!b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,q=a.innerWidth?a.innerWidth:c(a).width(),r=a.innerHeight?a.innerHeight:c(a).height(),s=0,t='
';j.settings={},c.swipebox.close=function(){g.closeSlide()},c.swipebox.extend=function(){return g},j.init=function(){j.settings=c.extend({},i,f),c.isArray(e)?(k=e,g.target=c(a),g.init(j.settings.initialIndexOnArray)):c(b).on("click",l,function(a){if("slide current"===a.target.parentNode.className)return!1;c.isArray(e)||(g.destroy(),h=c(l),g.actions()),k=[];var b,d,f;f||(d="data-rel",f=c(this).attr(d)),f||(d="rel",f=c(this).attr(d)),h=f&&""!==f&&"nofollow"!==f?m.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()},build:function(){var a,b=this;c("body").append(t),p&&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})),n&&j.settings.removeBarsOnMobile&&c("#swipebox-bottom-bar, #swipebox-top-bar").remove(),c.each(k,function(){c("#swipebox-slider").append('
')}),b.setDim(),b.actions(),o&&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=q,d=r):(90===a.orientation||-90===a.orientation)&&(b=r,d=q)},!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=m||i)){var p=.75-Math.abs(d)/r.height();r.css({top:d+"px"}),r.css({opacity:p}),i=!0}e=b,b=o.pageX-n.pageX,g=100*b/q,!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("+(s+g)+"%, 0, 0)",transform:"translate3d("+(s+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("+(s+g)+"%, 0, 0)",transform:"translate3d("+(s+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/q,i)if(i=!1,Math.abs(d)>=2*m&&Math.abs(d)>Math.abs(f)){var k=d>0?r.height():-r.height();r.animate({top:k+"px",opacity:0},300,function(){h.closeSlide()})}else r.animate({top:0,opacity:1},300);else j?(j=!1,b>=l&&b>=e?h.getPrev():-l>=b&&e>=b&&h.getNext()):p.hasClass("visible-bars")?(h.clearTimeout(),h.hideBars()):(h.showBars(),h.setTimeout());c("#swipebox-slider").css({"-webkit-transform":"translate3d("+s+"%, 0, 0)",transform:"translate3d("+s+"%, 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");s=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"),o?(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)):(e.addClass("slide-loading"),f.loadMedia(b,function(){e.removeClass("slide-loading"),e.html(this)}))))},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=''):e?(f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:j.settings.vimeoColor}),b=''):b='','
'+b+"
"},loadMedia:function(a,b){if(0===a.trim().indexOf("#"))b.call(c("
",{"class":"swipebox-inline-container"}).append(c(a).clone().toggleClass(j.settings.toggleClassOnLoad)));else if(!this.isVideo(a)){var d=c("").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+10?(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()):(c("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){c("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(){},prevSlide:function(){},closeSlide:function(){c("html").removeClass("swipebox-html"),c("html").removeClass("swipebox-touch"),c(a).trigger("resize"),this.destroy()},destroy:function(){c(a).unbind("keyup"),c("body").unbind("touchstart"),c("body").unbind("touchmove"),c("body").unbind("touchend"),c("#swipebox-slider").unbind(),c("#swipebox-overlay").remove(),c.isArray(e)||e.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),c.swipebox.isOpen=!1,j.settings.afterClose&&j.settings.afterClose()}},j.init()},c.fn.swipebox=function(a){if(!c.data(this,"_swipebox")){var b=new c.swipebox(this,a);this.data("_swipebox",b)}return this.data("_swipebox")}}(window,document,jQuery); (function(window){ 'use strict'; var prefixes='Webkit Moz ms Ms O'.split(' '); var docElemStyle=document.documentElement.style; function getStyleProperty(propName){ if(!propName){ return; } if(typeof docElemStyle[ propName ]==='string'){ return propName; } propName=propName.charAt(0).toUpperCase() + propName.slice(1); var prefixed; for(var i=0, len=prefixes.length; i < len; i++){ prefixed=prefixes[i] + propName; if(typeof docElemStyle[ prefixed ]==='string'){ return prefixed; }} } if(typeof define==='function'&&define.amd){ define(function(){ return getStyleProperty; }); }else{ window.getStyleProperty=getStyleProperty; }})(window); (function(window, undefined){ 'use strict'; var defView=document.defaultView; var getStyle=defView&&defView.getComputedStyle ? function(elem){ return defView.getComputedStyle(elem, null); } : function(elem){ return elem.currentStyle; }; function getStyleSize(value){ var num=parseFloat(value); var isValid=value.indexOf('%')===-1&&!isNaN(num); return isValid&# } var measurements=[ 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth', 'borderBottomWidth' ]; function getZeroSize(){ var size={ width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 }; for(var i=0, len=measurements.length; i < len; i++){ var measurement=measurements[i]; size[ measurement ]=0; } return size; } function defineGetSize(getStyleProperty){ var boxSizingProp=getStyleProperty('boxSizing'); var isBoxSizeOuter; (function(){ if(!boxSizingProp){ return; } var div=document.createElement('div'); div.style.width='200px'; div.style.padding='1px 2px 3px 4px'; div.style.borderStyle='solid'; div.style.borderWidth='1px 2px 3px 4px'; div.style[ boxSizingProp ]='border-box'; var body=document.body||document.documentElement; body.appendChild(div); var style=getStyle(div); isBoxSizeOuter=getStyleSize(style.width)===200; body.removeChild(div); })(); function getSize(elem){ if(typeof elem==='string'){ elem=document.querySelector(elem); } if(!elem||typeof elem!=='object'||!elem.nodeType){ return; } var style=getStyle(elem); if(style.display==='none'){ return getZeroSize(); } var size={}; var size_tmp=elem.getBoundingClientRect(); size.width=size_tmp.width; size.height=size_tmp.height; var isBorderBox=size.isBorderBox = !!(boxSizingProp && style[ boxSizingProp ]&&style[ boxSizingProp ]==='border-box'); for(var i=0, len=measurements.length; i < len; i++){ var measurement=measurements[i]; var value=style[ measurement ]; var num=parseFloat(value); size[ measurement ] = !isNaN(num) ? num:0; } var paddingWidth=size.paddingLeft + size.paddingRight; var paddingHeight=size.paddingTop + size.paddingBottom; var marginWidth=size.marginLeft + size.marginRight; var marginHeight=size.marginTop + size.marginBottom; var borderWidth=size.borderLeftWidth + size.borderRightWidth; var borderHeight=size.borderTopWidth + size.borderBottomWidth; var isBorderBoxSizeOuter=isBorderBox&&isBoxSizeOuter; var styleWidth=getStyleSize(style.width); if(styleWidth!==false){ size.width=styleWidth + (isBorderBoxSizeOuter ? 0:paddingWidth + borderWidth); } var styleHeight=getStyleSize(style.height); if(styleHeight!==false){ size.height=styleHeight + (isBorderBoxSizeOuter ? 0:paddingHeight + borderHeight); } size.innerWidth=size.width -(paddingWidth + borderWidth); size.innerHeight=size.height -(paddingHeight + borderHeight); size.outerWidth=size.width + marginWidth; size.outerHeight=size.height + marginHeight; return size; } return getSize; } if(typeof define==='function'&&define.amd){ define([ 'get-style-property/get-style-property' ], defineGetSize); }else{ window.getSize=defineGetSize(window.getStyleProperty); }})(window); (function(window){ 'use strict'; var docElem=document.documentElement; var bind=function(){}; if(docElem.addEventListener){ bind=function(obj, type, fn){ obj.addEventListener(type, fn, false); };}else if(docElem.attachEvent){ bind=function(obj, type, fn){ obj[ type + fn ]=fn.handleEvent ? function(){ var event=window.event; event.target=event.target||event.srcElement; fn.handleEvent.call(fn, event); } : function(){ var event=window.event; event.target=event.target||event.srcElement; fn.call(obj, event); }; obj.attachEvent("on" + type, obj[ type + fn ]); };} var unbind=function(){}; if(docElem.removeEventListener){ unbind=function(obj, type, fn){ obj.removeEventListener(type, fn, false); };}else if(docElem.detachEvent){ unbind=function(obj, type, fn){ obj.detachEvent("on" + type, obj[ type + fn ]); try { delete obj[ type + fn ]; } catch(err){ obj[ type + fn ]=undefined; }};} var eventie={ bind: bind, unbind: unbind }; if(typeof define==='function'&&define.amd){ define(eventie); }else{ window.eventie=eventie; }})(this); (function(window){ 'use strict'; var document=window.document; var queue=[]; function docReady(fn){ if(typeof fn!=='function'){ return; } if(docReady.isReady){ fn(); }else{ queue.push(fn); }} docReady.isReady=false; function init(event){ var isIE8NotReady=event.type==='readystatechange'&&document.readyState!=='complete'; if(docReady.isReady||isIE8NotReady){ return; } docReady.isReady=true; for(var i=0, len=queue.length; i < len; i++){ var fn=queue[i]; fn(); }} function defineDocReady(eventie){ eventie.bind(document, 'DOMContentLoaded', init); eventie.bind(document, 'readystatechange', init); eventie.bind(window, 'load', init); return docReady; } if(typeof define==='function'&&define.amd){ docReady.isReady=typeof requirejs==='function'; define([ 'eventie/eventie' ], defineDocReady); }else{ window.docReady=defineDocReady(window.eventie); }})(this); (function (){ 'use strict'; function EventEmitter(){} var proto=EventEmitter.prototype; function indexOfListener(listeners, listener){ var i=listeners.length; while (i--){ if(listeners[i].listener===listener){ return i; }} return -1; } function alias(name){ return function aliasClosure(){ return this[name].apply(this, arguments); };} proto.getListeners=function getListeners(evt){ var events=this._getEvents(); var response; var key; if(typeof evt==='object'){ response={}; for (key in events){ if(events.hasOwnProperty(key)&&evt.test(key)){ response[key]=events[key]; }} }else{ response=events[evt]||(events[evt]=[]); } return response; }; proto.flattenListeners=function flattenListeners(listeners){ var flatListeners=[]; var i; for (i=0; i < listeners.length; i +=1){ flatListeners.push(listeners[i].listener); } return flatListeners; }; proto.getListenersAsObject=function getListenersAsObject(evt){ var listeners=this.getListeners(evt); var response; if(listeners instanceof Array){ response={}; response[evt]=listeners; } return response||listeners; }; proto.addListener=function addListener(evt, listener){ var listeners=this.getListenersAsObject(evt); var listenerIsWrapped=typeof listener==='object'; var key; for (key in listeners){ if(listeners.hasOwnProperty(key)&&indexOfListener(listeners[key], listener)===-1){ listeners[key].push(listenerIsWrapped ? listener:{ listener: listener, once: false }); }} return this; }; proto.on=alias('addListener'); proto.addOnceListener=function addOnceListener(evt, listener){ return this.addListener(evt, { listener: listener, once: true }); }; proto.once=alias('addOnceListener'); proto.defineEvent=function defineEvent(evt){ this.getListeners(evt); return this; }; proto.defineEvents=function defineEvents(evts){ for (var i=0; i < evts.length; i +=1){ this.defineEvent(evts[i]); } return this; }; proto.removeListener=function removeListener(evt, listener){ var listeners=this.getListenersAsObject(evt); var index; var key; for (key in listeners){ if(listeners.hasOwnProperty(key)){ index=indexOfListener(listeners[key], listener); if(index!==-1){ listeners[key].splice(index, 1); }} } return this; }; proto.off=alias('removeListener'); proto.addListeners=function addListeners(evt, listeners){ return this.manipulateListeners(false, evt, listeners); }; proto.removeListeners=function removeListeners(evt, listeners){ return this.manipulateListeners(true, evt, listeners); }; proto.manipulateListeners=function manipulateListeners(remove, evt, listeners){ var i; var value; var single=remove ? this.removeListener:this.addListener; var multiple=remove ? this.removeListeners:this.addListeners; if(typeof evt==='object'&&!(evt instanceof RegExp)){ for (i in evt){ if(evt.hasOwnProperty(i)&&(value=evt[i])){ if(typeof value==='function'){ single.call(this, i, value); }else{ multiple.call(this, i, value); }} }}else{ i=listeners.length; while (i--){ single.call(this, evt, listeners[i]); }} return this; }; proto.removeEvent=function removeEvent(evt){ var type=typeof evt; var events=this._getEvents(); var key; if(type==='string'){ delete events[evt]; } else if(type==='object'){ for (key in events){ if(events.hasOwnProperty(key)&&evt.test(key)){ delete events[key]; }} }else{ delete this._events; } return this; }; proto.emitEvent=function emitEvent(evt, args){ var listeners=this.getListenersAsObject(evt); var listener; var i; var key; var response; for (key in listeners){ if(listeners.hasOwnProperty(key)){ i=listeners[key].length; while (i--){ listener=listeners[key][i]; if(listener.once===true){ this.removeListener(evt, listener.listener); } response=listener.listener.apply(this, args||[]); if(response===this._getOnceReturnValue()){ this.removeListener(evt, listener.listener); }} }} return this; }; proto.trigger=alias('emitEvent'); proto.emit=function emit(evt){ var args=Array.prototype.slice.call(arguments, 1); return this.emitEvent(evt, args); }; proto.setOnceReturnValue=function setOnceReturnValue(value){ this._onceReturnValue=value; return this; }; proto._getOnceReturnValue=function _getOnceReturnValue(){ if(this.hasOwnProperty('_onceReturnValue')){ return this._onceReturnValue; }else{ return true; }}; proto._getEvents=function _getEvents(){ return this._events||(this._events={}); }; if(typeof define==='function'&&define.amd){ define(function (){ return EventEmitter; }); } else if(typeof module==='object'&&module.exports){ module.exports=EventEmitter; }else{ this.EventEmitter=EventEmitter; }}.call(this)); (function(window){ 'use strict'; var slice=Array.prototype.slice; function noop(){} function defineBridget($){ if(!$){ return; } function addOptionMethod(PluginClass){ if(PluginClass.prototype.option){ return; } PluginClass.prototype.option=function(opts){ if(!$.isPlainObject(opts)){ return; } this.options=$.extend(true, this.options, opts); };} var logError=typeof console==='undefined' ? noop : function(message){ console.error(message); }; function bridge(namespace, PluginClass){ $.fn[ namespace ]=function(options){ if(typeof options==='string'){ var args=slice.call(arguments, 1); for(var i=0, len=this.length; i < len; i++){ var elem=this[i]; var instance=$.data(elem, namespace); if(!instance){ logError("cannot call methods on " + namespace + " prior to initialization; " + "attempted to call '" + options + "'"); continue; } if(!$.isFunction(instance[options])||options.charAt(0)==='_'){ logError("no such method '" + options + "' for " + namespace + " instance"); continue; } var returnValue=instance[ options ].apply(instance, args); if(returnValue!==undefined){ return returnValue; }} return this; }else{ return this.each(function(){ var instance=$.data(this, namespace); if(instance){ instance.option(options); instance._init(); }else{ instance=new PluginClass(this, options); $.data(this, namespace, instance); }}); }};} $.bridget=function(namespace, PluginClass){ addOptionMethod(PluginClass); bridge(namespace, PluginClass); };} if(typeof define==='function'&&define.amd){ define([ 'jquery' ], defineBridget); }else{ defineBridget(window.jQuery); }})(window); (function(global, ElemProto){ 'use strict'; var matchesMethod=(function(){ if(ElemProto.matchesSelector){ return 'matchesSelector'; } var prefixes=[ 'webkit', 'moz', 'ms', 'o' ]; for(var i=0, len=prefixes.length; i < len; i++){ var prefix=prefixes[i]; var method=prefix + 'MatchesSelector'; if(ElemProto[ method ]){ return method; }} })(); function match(elem, selector){ return elem[ matchesMethod ](selector); } function checkParent(elem){ if(elem.parentNode){ return; } var fragment=document.createDocumentFragment(); fragment.appendChild(elem); } function query(elem, selector){ checkParent(elem); var elems=elem.parentNode.querySelectorAll(selector); for(var i=0, len=elems.length; i < len; i++){ if(elems[i]===elem){ return true; }} return false; } function matchChild(elem, selector){ checkParent(elem); return match(elem, selector); } var matchesSelector; if(matchesMethod){ var div=document.createElement('div'); var supportsOrphans=match(div, 'div'); matchesSelector=supportsOrphans ? match:matchChild; }else{ matchesSelector=query; } if(typeof define==='function'&&define.amd){ define(function(){ return matchesSelector; }); }else{ window.matchesSelector=matchesSelector; }})(this, Element.prototype); (function(window){ 'use strict'; var defView=document.defaultView; var getStyle=defView&&defView.getComputedStyle ? function(elem){ return defView.getComputedStyle(elem, null); } : function(elem){ return elem.currentStyle; }; function extend(a, b){ for(var prop in b){ a[ prop ]=b[ prop ]; } return a; } function outlayerItemDefinition(EventEmitter, getSize, getStyleProperty){ var transitionProperty=getStyleProperty('transition'); var transformProperty=getStyleProperty('transform'); var supportsCSS3=transitionProperty&&transformProperty; var is3d = !!getStyleProperty('perspective'); var transitionEndEvent={ WebkitTransition: 'webkitTransitionEnd', MozTransition: 'transitionend', OTransition: 'otransitionend', transition: 'transitionend' }[ transitionProperty ]; var prefixableProperties=[ 'transform', 'transition', 'transitionDuration', 'transitionProperty' ]; var vendorProperties=(function(){ var cache={}; for(var i=0, len=prefixableProperties.length; i < len; i++){ var prop=prefixableProperties[i]; var supportedProp=getStyleProperty(prop); if(supportedProp&&supportedProp!==prop){ cache[ prop ]=supportedProp; }} return cache; })(); function Item(element, layout){ if(!element){ return; } this.element=element; this.layout=layout; this.position={ x: 0, y: 0 }; this._create(); } extend(Item.prototype, EventEmitter.prototype); Item.prototype._create=function(){ this.css({ position: 'absolute' }); }; Item.prototype.handleEvent=function(event){ var method='on' + event.type; if(this[ method ]){ this[ method ](event); }}; Item.prototype.getSize=function(){ this.size=getSize(this.element); }; Item.prototype.css=function(style){ var elemStyle=this.element.style; for(var prop in style){ var supportedProp=vendorProperties[ prop ]||prop; elemStyle[ supportedProp ]=style[ prop ]; }}; Item.prototype.getPosition=function(){ var style=getStyle(this.element); var layoutOptions=this.layout.options; var isOriginLeft=layoutOptions.isOriginLeft; var isOriginTop=layoutOptions.isOriginTop; var x=parseFloat(style[ isOriginLeft ? 'left':'right' ], 10); var y=parseFloat(style[ isOriginTop ? 'top':'bottom' ], 10); x=isNaN(x) ? 0:x; y=isNaN(y) ? 0:y; var layoutSize=this.layout.size; x -=isOriginLeft ? layoutSize.paddingLeft:layoutSize.paddingRight; y -=isOriginTop ? layoutSize.paddingTop:layoutSize.paddingBottom; this.position.x=x; this.position.y=y; }; Item.prototype.layoutPosition=function(){ var layoutSize=this.layout.size; var layoutOptions=this.layout.options; var style={}; if(layoutOptions.isOriginLeft){ style.left=(this.position.x + layoutSize.paddingLeft) + 'px'; style.right=''; }else{ style.right=(this.position.x + layoutSize.paddingRight) + 'px'; style.left=''; } if(layoutOptions.isOriginTop){ style.top=(this.position.y + layoutSize.paddingTop) + 'px'; style.bottom=''; }else{ style.bottom=(this.position.y + layoutSize.paddingBottom) + 'px'; style.top=''; } this.css(style); this.emitEvent('layout', [ this ]); }; var translate=is3d ? function(x, y){ return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; } : function(x, y){ return 'translate(' + x + 'px, ' + y + 'px)'; }; Item.prototype._transitionTo=function(x, y){ this.getPosition(); var curX=this.position.x; var curY=this.position.y; var compareX=parseFloat(x, 10); var compareY=parseFloat(y, 10); var didNotMove=compareX===this.position.x&&compareY===this.position.y; this.setPosition(x, y); if(didNotMove&&!this.isTransitioning){ this.layoutPosition(); return; } var transX=x - curX; var transY=y - curY; var transitionStyle={}; var layoutOptions=this.layout.options; transX=layoutOptions.isOriginLeft ? transX:-transX; transY=layoutOptions.isOriginTop ? transY:-transY; transitionStyle.transform=translate(transX, transY); this.transition({ to: transitionStyle, onTransitionEnd: this.layoutPosition, isCleaning: true }); }; Item.prototype.goTo=function(x, y){ this.setPosition(x, y); this.layoutPosition(); }; Item.prototype.moveTo=supportsCSS3 ? Item.prototype._transitionTo:Item.prototype.goTo; Item.prototype.setPosition=function(x, y){ this.position.x=parseFloat(x, 10); this.position.y=parseFloat(y, 10); }; Item.prototype._nonTransition=function(args){ this.css(args.to); if(args.isCleaning){ this._removeStyles(args.to); } if(args.onTransitionEnd){ args.onTransitionEnd.call(this); }}; Item.prototype._transition=function(args){ var transitionDuration=this.layout.options.transitionDuration; if(!parseFloat(transitionDuration)){ this._nonTransition(args); return; } var style=args.to; var transitionValue=[]; for(var prop in style){ transitionValue.push(prop); } var transitionStyle={}; transitionStyle.transitionProperty=transitionValue.join(','); transitionStyle.transitionDuration=transitionDuration; this.element.addEventListener(transitionEndEvent, this, false); if(args.isCleaning||args.onTransitionEnd){ this.onTransitionEnd=function(){ if(args.isCleaning){ this._removeStyles(style); } if(args.onTransitionEnd){ args.onTransitionEnd.call(this); }};} if(args.from){ this.css(args.from); var h=this.element.offsetHeight; h=null; } this.css(transitionStyle); this.css(style); this.isTransitioning=true; }; Item.prototype.transition=Item.prototype[ transitionProperty ? '_transition':'_nonTransition' ]; Item.prototype.onwebkitTransitionEnd=function(event){ this.ontransitionend(event); }; Item.prototype.onotransitionend=function(event){ this.ontransitionend(event); }; Item.prototype.ontransitionend=function(event){ if(event.target!==this.element){ return; } this.removeTransitionStyles(); this.element.removeEventListener(transitionEndEvent, this, false); this.isTransitioning=false; if(this.onTransitionEnd){ this.onTransitionEnd.call(this); delete this.onTransitionEnd; } this.emitEvent('transitionEnd', [ this ]); }; Item.prototype._removeStyles=function(style){ var cleanStyle={}; for(var prop in style){ cleanStyle[ prop ]=''; } this.css(cleanStyle); }; var cleanTransitionStyle={ transitionProperty: '', transitionDuration: '' }; Item.prototype.removeTransitionStyles=function(){ this.css(cleanTransitionStyle); }; Item.prototype.removeElem=function(){ this.element.parentNode.removeChild(this.element); this.emitEvent('remove', [ this ]); }; Item.prototype.remove=function(){ if(!transitionProperty||!parseFloat(this.layout.options.transitionDuration)){ this.removeElem(); return; } var _this=this; this.on('transitionEnd', function(){ _this.removeElem(); return true; }); this.hide(); }; Item.prototype.reveal=function(){ delete this.isHidden; this.css({ display: '' }); var options=this.layout.options; this.transition({ from: options.hiddenStyle, to: options.visibleStyle, isCleaning: true }); }; Item.prototype.hide=function(){ this.isHidden=true; this.css({ display: '' }); var options=this.layout.options; this.transition({ from: options.visibleStyle, to: options.hiddenStyle, isCleaning: true, onTransitionEnd: function(){ this.css({ display: 'none' }); }}); }; Item.prototype.destroy=function(){ this.css({ position: '', left: '', right: '', top: '', bottom: '', transition: '', transform: '' }); }; return Item; } if(typeof define==='function'&&define.amd){ define([ 'eventEmitter/EventEmitter', 'get-size/get-size', 'get-style-property/get-style-property' ], outlayerItemDefinition); }else{ window.Outlayer={}; window.Outlayer.Item=outlayerItemDefinition( window.EventEmitter, window.getSize, window.getStyleProperty ); }})(window); (function(window){ 'use strict'; var document=window.document; var console=window.console; var jQuery=window.jQuery; var noop=function(){}; function extend(a, b){ for(var prop in b){ a[ prop ]=b[ prop ]; } return a; } var objToString=Object.prototype.toString; function isArray(obj){ return objToString.call(obj)==='[object Array]'; } function makeArray(obj){ var ary=[]; if(isArray(obj)){ ary=obj; }else if(obj&&typeof obj.length==='number'){ for(var i=0, len=obj.length; i < len; i++){ ary.push(obj[i]); }}else{ ary.push(obj); } return ary; } var isElement=(typeof HTMLElement==='object') ? function isElementDOM2(obj){ return obj instanceof HTMLElement; } : function isElementQuirky(obj){ return obj&&typeof obj==='object' && obj.nodeType===1&&typeof obj.nodeName==='string'; }; var indexOf=Array.prototype.indexOf ? function(ary, obj){ return ary.indexOf(obj); }:function(ary, obj){ for(var i=0, len=ary.length; i < len; i++){ if(ary[i]===obj){ return i; }} return -1; }; function toDashed(str){ return str.replace(/(.)([A-Z])/g, function(match, $1, $2){ return $1 + '-' + $2; }).toLowerCase(); } function outlayerDefinition(eventie, docReady, EventEmitter, getSize, matchesSelector, Item){ var GUID=0; var instances={}; function Outlayer(element, options){ if(typeof element==='string'){ element=document.querySelector(element); } if(!element||!isElement(element)){ if(console){ console.error('Bad ' + this.settings.namespace + ' element: ' + element); } return; } this.element=element; this.options=extend({}, this.options); this.option(options); var id=++GUID; this.element.outlayerGUID=id; instances[ id ]=this; this._create(); if(this.options.isInitLayout){ this.layout(); }} Outlayer.prototype.settings={ namespace: 'outlayer', item: Item }; Outlayer.prototype.options={ containerStyle: { position: 'relative' }, isInitLayout: true, isOriginLeft: true, isOriginTop: true, isResizeBound: true, transitionDuration: '0.4s', hiddenStyle: { opacity: 0, transform: 'scale(0.001)' }, visibleStyle: { opacity: 1, transform: 'scale(1)' }}; extend(Outlayer.prototype, EventEmitter.prototype); Outlayer.prototype.option=function(opts){ extend(this.options, opts); }; Outlayer.prototype._create=function(){ this.reloadItems(); this.stamps=[]; this.stamp(this.options.stamp); extend(this.element.style, this.options.containerStyle); if(this.options.isResizeBound){ this.bindResize(); }}; Outlayer.prototype.reloadItems=function(){ this.items=this._getItems(this.element.children); }; Outlayer.prototype._getItems=function(elems){ var itemElems=this._filterFindItemElements(elems); var Item=this.settings.item; var items=[]; for(var i=0, len=itemElems.length; i < len; i++){ var elem=itemElems[i]; var item=new Item(elem, this, this.options.itemOptions); items.push(item); } return items; }; Outlayer.prototype._filterFindItemElements=function(elems){ elems=makeArray(elems); var itemSelector=this.options.itemSelector; var itemElems=[]; for(var i=0, len=elems.length; i < len; i++){ var elem=elems[i]; if(!isElement(elem)){ continue; } if(itemSelector){ if(matchesSelector(elem, itemSelector)){ itemElems.push(elem); } var childElems=elem.querySelectorAll(itemSelector); for(var j=0, jLen=childElems.length; j < jLen; j++){ itemElems.push(childElems[j]); }}else{ itemElems.push(elem); }} return itemElems; }; Outlayer.prototype.getItemElements=function(){ var elems=[]; for(var i=0, len=this.items.length; i < len; i++){ elems.push(this.items[i].element); } return elems; }; Outlayer.prototype.layout=function(){ this._resetLayout(); this._manageStamps(); var isInstant=this.options.isLayoutInstant!==undefined ? this.options.isLayoutInstant:!this._isLayoutInited; this.layoutItems(this.items, isInstant); this._isLayoutInited=true; }; Outlayer.prototype._init=Outlayer.prototype.layout; Outlayer.prototype._resetLayout=function(){ this.getSize(); }; Outlayer.prototype.getSize=function(){ this.size=getSize(this.element); }; Outlayer.prototype._getMeasurement=function(measurement, size){ var option=this.options[ measurement ]; var elem; if(!option){ this[ measurement ]=0; }else{ if(typeof option==='string'){ elem=this.element.querySelector(option); }else if(isElement(option)){ elem=option; } this[ measurement ]=elem ? getSize(elem)[ size ]:option; }}; Outlayer.prototype.layoutItems=function(items, isInstant){ items=this._getItemsForLayout(items); this._layoutItems(items, isInstant); this._postLayout(); }; Outlayer.prototype._getItemsForLayout=function(items){ var layoutItems=[]; for(var i=0, len=items.length; i < len; i++){ var item=items[i]; if(!item.isIgnored){ layoutItems.push(item); }} return layoutItems; }; Outlayer.prototype._layoutItems=function(items, isInstant){ if(!items||!items.length){ this.emitEvent('layoutComplete', [ this, items ]); return; } this._itemsOn(items, 'layout', function onItemsLayout(){ this.emitEvent('layoutComplete', [ this, items ]); }); var queue=[]; for(var i=0, len=items.length; i < len; i++){ var item=items[i]; var position=this._getItemLayoutPosition(item); position.item=item; position.isInstant=isInstant; queue.push(position); } this._processLayoutQueue(queue); }; Outlayer.prototype._getItemLayoutPosition=function(){ return { x: 0, y: 0 };}; Outlayer.prototype._processLayoutQueue=function(queue){ for(var i=0, len=queue.length; i < len; i++){ var obj=queue[i]; this._positionItem(obj.item, obj.x, obj.y, obj.isInstant); }}; Outlayer.prototype._positionItem=function(item, x, y, isInstant){ if(isInstant){ item.goTo(x, y); }else{ item.moveTo(x, y); }}; Outlayer.prototype._postLayout=function(){ var size=this._getContainerSize(); if(size){ this._setContainerMeasure(size.width, true); this._setContainerMeasure(size.height, false); }}; Outlayer.prototype._getContainerSize=noop; Outlayer.prototype._setContainerMeasure=function(measure, isWidth){ if(measure===undefined){ return; } var elemSize=this.size; if(elemSize.isBorderBox){ measure +=isWidth ? elemSize.paddingLeft + elemSize.paddingRight + elemSize.borderLeftWidth + elemSize.borderRightWidth : elemSize.paddingBottom + elemSize.paddingTop + elemSize.borderTopWidth + elemSize.borderBottomWidth; } measure=Math.max(measure, 0); this.element.style[ isWidth ? 'width':'height' ]=measure + 'px'; }; Outlayer.prototype._itemsOn=function(items, eventName, callback){ var doneCount=0; var count=items.length; var _this=this; function tick(){ doneCount++; if(doneCount===count){ callback.call(_this); } return true; } for(var i=0, len=items.length; i < len; i++){ var item=items[i]; item.on(eventName, tick); }}; Outlayer.prototype.ignore=function(elem){ var item=this.getItem(elem); if(item){ item.isIgnored=true; }}; Outlayer.prototype.unignore=function(elem){ var item=this.getItem(elem); if(item){ delete item.isIgnored; }}; Outlayer.prototype.stamp=function(elems){ elems=this._find(elems); if(!elems){ return; } this.stamps=this.stamps.concat(elems); for(var i=0, len=elems.length; i < len; i++){ var elem=elems[i]; this.ignore(elem); }}; Outlayer.prototype.unstamp=function(elems){ elems=this._find(elems); if(!elems){ return; } for(var i=0, len=elems.length; i < len; i++){ var elem=elems[i]; var index=indexOf(this.stamps, elem); if(index!==-1){ this.stamps.splice(index, 1); } this.unignore(elem); }}; Outlayer.prototype._find=function(elems){ if(!elems){ return; } if(typeof elems==='string'){ elems=this.element.querySelectorAll(elems); } elems=makeArray(elems); return elems; }; Outlayer.prototype._manageStamps=function(){ if(!this.stamps||!this.stamps.length){ return; } this._getBoundingRect(); for(var i=0, len=this.stamps.length; i < len; i++){ var stamp=this.stamps[i]; this._manageStamp(stamp); }}; Outlayer.prototype._getBoundingRect=function(){ var boundingRect=this.element.getBoundingClientRect(); var size=this.size; this._boundingRect={ left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, top: boundingRect.top + size.paddingTop + size.borderTopWidth, right: boundingRect.right -(size.paddingRight + size.borderRightWidth), bottom: boundingRect.bottom -(size.paddingBottom + size.borderBottomWidth) };}; Outlayer.prototype._manageStamp=noop; Outlayer.prototype._getElementOffset=function(elem){ var boundingRect=elem.getBoundingClientRect(); var thisRect=this._boundingRect; var size=getSize(elem); var offset={ left: boundingRect.left - thisRect.left - size.marginLeft, top: boundingRect.top - thisRect.top - size.marginTop, right: thisRect.right - boundingRect.right - size.marginRight, bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom }; return offset; }; Outlayer.prototype.handleEvent=function(event){ var method='on' + event.type; if(this[ method ]){ this[ method ](event); }}; Outlayer.prototype.bindResize=function(){ if(this.isResizeBound){ return; } eventie.bind(window, 'resize', this); this.isResizeBound=true; }; Outlayer.prototype.unbindResize=function(){ eventie.unbind(window, 'resize', this); this.isResizeBound=false; }; Outlayer.prototype.onresize=function(){ if(this.resizeTimeout){ clearTimeout(this.resizeTimeout); } var _this=this; function delayed(){ _this.resize(); } this.resizeTimeout=setTimeout(delayed, 100); }; Outlayer.prototype.resize=function(){ var size=getSize(this.element); var hasSizes=this.size&&size; if(hasSizes&&size.innerWidth===this.size.innerWidth){ return; } this.layout(); delete this.resizeTimeout; }; Outlayer.prototype.addItems=function(elems){ var items=this._getItems(elems); if(!items.length){ return; } this.items=this.items.concat(items); return items; }; Outlayer.prototype.appended=function(elems){ var items=this.addItems(elems); if(!items.length){ return; } this.layoutItems(items, true); this.reveal(items); }; Outlayer.prototype.prepended=function(elems){ var items=this._getItems(elems); if(!items.length){ return; } var previousItems=this.items.slice(0); this.items=items.concat(previousItems); this._resetLayout(); this.layoutItems(items, true); this.reveal(items); this.layoutItems(previousItems); }; Outlayer.prototype.reveal=function(items){ if(!items||!items.length){ return; } for(var i=0, len=items.length; i < len; i++){ var item=items[i]; item.reveal(); }}; Outlayer.prototype.hide=function(items){ if(!items||!items.length){ return; } for(var i=0, len=items.length; i < len; i++){ var item=items[i]; item.hide(); }}; Outlayer.prototype.getItem=function(elem){ for(var i=0, len=this.items.length; i < len; i++){ var item=this.items[i]; if(item.element===elem){ return item; }} }; Outlayer.prototype.getItems=function(elems){ if(!elems||!elems.length){ return; } var items=[]; for(var i=0, len=elems.length; i < len; i++){ var elem=elems[i]; var item=this.getItem(elem); if(item){ items.push(item); }} return items; }; Outlayer.prototype.remove=function(elems){ elems=makeArray(elems); var removeItems=this.getItems(elems); if(!removeItems||!removeItems.length){ return; } this._itemsOn(removeItems, 'remove', function(){ this.emitEvent('removeComplete', [ this, removeItems ]); }); for(var i=0, len=removeItems.length; i < len; i++){ var item=removeItems[i]; item.remove(); var index=indexOf(this.items, item); this.items.splice(index, 1); }}; Outlayer.prototype.destroy=function(){ var style=this.element.style; style.height=''; style.position=''; style.width=''; for(var i=0, len=this.items.length; i < len; i++){ var item=this.items[i]; item.destroy(); } this.unbindResize(); delete this.element.outlayerGUID; if(jQuery){ jQuery.removeData(this.element, this.settings.namespace); }}; Outlayer.data=function(elem){ var id=elem&&elem.outlayerGUID; return id&&instances[ id ]; }; function copyOutlayerProto(obj, property){ obj.prototype[ property ]=extend({}, Outlayer.prototype[ property ]); } Outlayer.create=function(namespace, options){ function Layout(){ Outlayer.apply(this, arguments); } extend(Layout.prototype, Outlayer.prototype); copyOutlayerProto(Layout, 'options'); copyOutlayerProto(Layout, 'settings'); extend(Layout.prototype.options, options); Layout.prototype.settings.namespace=namespace; Layout.data=Outlayer.data; Layout.Item=function LayoutItem(){ Item.apply(this, arguments); }; Layout.Item.prototype=new Item(); Layout.prototype.settings.item=Layout.Item; docReady(function(){ var dashedNamespace=toDashed(namespace); var elems=document.querySelectorAll('.js-' + dashedNamespace); var dataAttr='data-' + dashedNamespace + '-options'; for(var i=0, len=elems.length; i < len; i++){ var elem=elems[i]; var attr=elem.getAttribute(dataAttr); var options; try { options=attr&&JSON.parse(attr); } catch(error){ if(console){ console.error('Error parsing ' + dataAttr + ' on ' + elem.nodeName.toLowerCase() +(elem.id ? '#' + elem.id:'') + ': ' + error); } continue; } var instance=new Layout(elem, options); if(jQuery){ jQuery.data(elem, namespace, instance); }} }); if(jQuery&&jQuery.bridget){ jQuery.bridget(namespace, Layout); } return Layout; }; Outlayer.Item=Item; return Outlayer; } if(typeof define==='function'&&define.amd){ define([ 'eventie/eventie', 'doc-ready/doc-ready', 'eventEmitter/EventEmitter', 'get-size/get-size', 'matches-selector/matches-selector', './item' ], outlayerDefinition); }else{ window.Outlayer=outlayerDefinition( window.eventie, window.docReady, window.EventEmitter, window.getSize, window.matchesSelector, window.Outlayer.Item ); }})(window); (function(window){ 'use strict'; var indexOf=Array.prototype.indexOf ? function(items, value){ return items.indexOf(value); } : function(items, value){ for(var i=0, len=items.length; i < len; i++){ var item=items[i]; if(item===value){ return i; }} return -1; }; function masonryDefinition(Outlayer, getSize){ var Masonry=Outlayer.create('masonry'); Masonry.prototype._resetLayout=function(){ this.getSize(); this._getMeasurement('columnWidth', 'outerWidth'); this._getMeasurement('gutter', 'outerWidth'); this.measureColumns(); var i=this.cols; this.colYs=[]; while (i--){ this.colYs.push(0); } this.maxY=0; }; Masonry.prototype.measureColumns=function(){ this.getContainerWidth(); this.columnWidth +=this.gutter; this.columnWidth=this.containerWidth / 12; this.cols=12; }; Masonry.prototype.getContainerWidth=function(){ var container=this.options.isFitWidth ? this.element.parentNode:this.element; var size=getSize(container); this.containerWidth=size&&size.innerWidth; }; Masonry.prototype._getItemLayoutPosition=function(item){ item.getSize();//console.log(item.size); var colSpan=Math.ceil(item.size.outerWidth / this.columnWidth);//console.log(item.size.outerWidth,this.columnWidth,colSpan); colSpan=Math.min(colSpan, this.cols); var colGroup=this._getColGroup(colSpan); var minimumY=Math.min.apply(Math, colGroup); var shortColIndex=indexOf(colGroup, minimumY); var position={ x: this.columnWidth * shortColIndex, y: minimumY };//console.log(colSpan, this.cols, colGroup, minimumY, shortColIndex, position); var setHeight=minimumY + item.size.outerHeight; var setSpan=this.cols + 1 - colGroup.length; for(var i=0; i < setSpan; i++){ this.colYs[ shortColIndex + i ]=setHeight; } return position; }; Masonry.prototype._getColGroup=function(colSpan){ if(colSpan < 2){ return this.colYs; } var colGroup=[]; var groupCount=this.cols + 1 - colSpan; for(var i=0; i < groupCount; i++){ var groupColYs=this.colYs.slice(i, i + colSpan); colGroup[i]=Math.max.apply(Math, groupColYs); } return colGroup; }; Masonry.prototype._manageStamp=function(stamp){ var stampSize=getSize(stamp); var offset=this._getElementOffset(stamp); var firstX=this.options.isOriginLeft ? offset.left:offset.right; var lastX=firstX + stampSize.outerWidth; var firstCol=Math.floor(firstX / this.columnWidth); firstCol=Math.max(0, firstCol); var lastCol=Math.floor(lastX / this.columnWidth); lastCol=Math.min(this.cols - 1, lastCol); var stampMaxY=(this.options.isOriginTop ? offset.top:offset.bottom) + stampSize.outerHeight; for(var i=firstCol; i <=lastCol; i++){ this.colYs[i]=Math.max(stampMaxY, this.colYs[i]); }}; Masonry.prototype._getContainerSize=function(){ this.maxY=Math.max.apply(Math, this.colYs); var size={ height: this.maxY }; if(this.options.isFitWidth){ size.width=this._getContainerFitWidth(); } return size; }; Masonry.prototype._getContainerFitWidth=function(){ var unusedCols=0; var i=this.cols; while(--i){ if(this.colYs[i]!==0){ break; } unusedCols++; } return(this.cols - unusedCols) * this.columnWidth - this.gutter; }; Masonry.prototype.resize=function(){ var previousWidth=this.containerWidth; this.getContainerWidth(); if(previousWidth===this.containerWidth){ return; } this.layout(); }; return Masonry; } if(typeof define==='function'&&define.amd){ define([ 'outlayer/outlayer', 'get-size/get-size' ], masonryDefinition); }else{ window.Masonry=masonryDefinition( window.Outlayer, window.getSize ); }})(window); ;window.Modernizr=function(a,b,c){function z(a){j.cssText=a}function A(a,b){return z(m.join(a+";")+(b||""))}function B(a,b){return typeof a===b}function C(a,b){return!!~(""+a).indexOf(b)}function D(a,b){for(var d in a){var e=a[d];if(!C(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function E(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:B(f,"function")?f.bind(d||b):f}return!1}function F(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+o.join(d+" ")+d).split(" ");return B(b,"string")||B(b,"undefined")?D(e,b):(e=(a+" "+p.join(d+" ")+d).split(" "),E(e,b,c))}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n="Webkit Moz O ms",o=n.split(" "),p=n.toLowerCase().split(" "),q={},r={},s={},t=[],u=t.slice,v,w=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=["­",'"].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},x={}.hasOwnProperty,y;!B(x,"undefined")&&!B(x.call,"undefined")?y=function(a,b){return x.call(a,b)}:y=function(a,b){return b in a&&B(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=u.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(u.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(u.call(arguments)))};return e}),q.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:w(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},q.csstransitions=function(){return F("transition")};for(var G in q)y(q,G)&&(v=G.toLowerCase(),e[v]=q[G](),t.push((e[v]?"":"no-")+v));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)y(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},z(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=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){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e._domPrefixes=p,e._cssomPrefixes=o,e.testProp=function(a){return D([a])},e.testAllProps=F,e.testStyles=w,e.prefixed=function(a,b,c){return b?F(a,b,c):F(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+t.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function 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;f1?b[1].length:0}function j(a,b){a.classList?a.classList.add(b):a.className+=" "+b}function k(a,b){a.classList?a.classList.remove(b):a.className=a.className.replace(new RegExp("(^|\\b)"+b.split(" ").join("|")+"(\\b|$)","gi")," ")}function l(a,b){a.classList?a.classList.contains(b):new RegExp("(^|)"+b+"(|$)","gi").test(a.className)}function m(){var a=void 0!==window.pageXOffset,b="CSS1Compat"===(document.compatMode||""),c=a?window.pageXOffset:b?document.documentElement.scrollLeft:document.body.scrollLeft,d=a?window.pageYOffset:b?document.documentElement.scrollTop:document.body.scrollTop;return{x:c,y:d}}function n(a){return function(b){return a+b}}function o(a,b){return 100/(b-a)}function p(a,b){return 100*b/(a[1]-a[0])}function q(a,b){return p(a,a[0]<0?b+Math.abs(a[0]):b-a[0])}function r(a,b){return b*(a[1]-a[0])/100+a[0]}function s(a,b){for(var c=1;a>=b[c];)c+=1;return c}function t(a,b,c){if(c>=a.slice(-1)[0])return 100;var d,e,f,g,h=s(c,a);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],f+q([d,e],c)/o(f,g)}function u(a,b,c){if(c>=100)return a.slice(-1)[0];var d,e,f,g,h=s(c,b);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],r([d,e],(c-f)*o(f,g))}function v(a,c,d,e){if(100===e)return e;var f,g,h=s(e,a);return d?(f=a[h-1],g=a[h],e-f>(g-f)/2?g:f):c[h-1]?a[h-1]+b(e-a[h-1],c[h-1]):e}function w(a,b,c){var e;if("number"==typeof b&&(b=[b]),"[object Array]"!==Object.prototype.toString.call(b))throw new Error("noUiSlider: 'range' contains invalid value.");if(e="min"===a?0:"max"===a?100:parseFloat(a),!d(e)||!d(b[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");c.xPct.push(e),c.xVal.push(b[0]),e?c.xSteps.push(isNaN(b[1])?!1:b[1]):isNaN(b[1])||(c.xSteps[0]=b[1])}function x(a,b,c){return b?void(c.xSteps[a]=p([c.xVal[a],c.xVal[a+1]],b)/o(c.xPct[a],c.xPct[a+1])):!0}function y(a,b,c,d){this.xPct=[],this.xVal=[],this.xSteps=[d||!1],this.xNumSteps=[!1],this.snap=b,this.direction=c;var e,f=[];for(e in a)a.hasOwnProperty(e)&&f.push([a[e],e]);for(f.length&&"object"==typeof f[0][0]?f.sort(function(a,b){return a[0][0]-b[0][0]}):f.sort(function(a,b){return a[0]-b[0]}),e=0;e2)throw new Error("noUiSlider: 'start' option is incorrect.");a.handles=b.length,a.start=b}function C(a,b){if(a.snap=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function D(a,b){if(a.animate=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function E(a,b){if("lower"===b&&1===a.handles)a.connect=1;else if("upper"===b&&1===a.handles)a.connect=2;else if(b===!0&&2===a.handles)a.connect=3;else{if(b!==!1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");a.connect=0}}function F(a,b){switch(b){case"horizontal":a.ort=0;break;case"vertical":a.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function G(a,b){if(!d(b))throw new Error("noUiSlider: 'margin' option must be numeric.");if(a.margin=a.spectrum.getMargin(b),!a.margin)throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function H(a,b){if(!d(b))throw new Error("noUiSlider: 'limit' option must be numeric.");if(a.limit=a.spectrum.getMargin(b),!a.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function I(a,b){switch(b){case"ltr":a.dir=0;break;case"rtl":a.dir=1,a.connect=[0,2,1,3][a.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function J(a,b){if("string"!=typeof b)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var c=b.indexOf("tap")>=0,d=b.indexOf("drag")>=0,e=b.indexOf("fixed")>=0,f=b.indexOf("snap")>=0;if(d&&!a.connect)throw new Error("noUiSlider: 'drag' behaviour must be used with 'connect': true.");a.events={tap:c||f,drag:d,fixed:e,snap:f}}function K(a,b){if(b===!0&&(a.tooltips=!0),b&&b.format){if("function"!=typeof b.format)throw new Error("noUiSlider: 'tooltips.format' must be an object.");a.tooltips={format:b.format}}}function L(a,b){if(a.format=b,"function"==typeof b.to&&"function"==typeof b.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function M(a,b){if(void 0!==b&&"string"!=typeof b)throw new Error("noUiSlider: 'cssPrefix' must be a string.");a.cssPrefix=b}function N(a){var b,c={margin:0,limit:0,animate:!0,format:S};b={step:{r:!1,t:z},start:{r:!0,t:B},connect:{r:!0,t:E},direction:{r:!0,t:I},snap:{r:!1,t:C},animate:{r:!1,t:D},range:{r:!0,t:A},orientation:{r:!1,t:F},margin:{r:!1,t:G},limit:{r:!1,t:H},behaviour:{r:!0,t:J},format:{r:!1,t:L},tooltips:{r:!1,t:K},cssPrefix:{r:!1,t:M}};var d={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"};return Object.keys(d).forEach(function(b){void 0===a[b]&&(a[b]=d[b])}),Object.keys(b).forEach(function(d){var e=b[d];if(void 0===a[d]){if(e.r)throw new Error("noUiSlider: '"+d+"' is required.");return!0}e.t(c,a[d])}),c.pips=a.pips,c.style=c.ort?"top":"left",c}function O(b,d){function e(a,b,c){var d=a+b[0],e=a+b[1];return c?(0>d&&(e+=Math.abs(d)),e>100&&(d-=e-100),[g(d),g(e)]):[d,e]}function o(a,b){a.preventDefault();var c,d,e=0===a.type.indexOf("touch"),f=0===a.type.indexOf("mouse"),g=0===a.type.indexOf("pointer"),h=a;return 0===a.type.indexOf("MSPointer")&&(g=!0),e&&(c=a.changedTouches[0].pageX,d=a.changedTouches[0].pageY),b=b||m(),(f||g)&&(c=a.clientX+b.x,d=a.clientY+b.y),h.pageOffset=b,h.points=[c,d],h.cursor=f||g,h}function p(a,b){var c=document.createElement("div"),d=document.createElement("div"),e=["-lower","-upper"];return a&&e.reverse(),j(d,aa[3]),j(d,aa[3]+e[b]),j(c,aa[2]),c.appendChild(d),c}function q(a,b,c){switch(a){case 1:j(b,aa[7]),j(c[0],aa[6]);break;case 3:j(c[1],aa[6]);case 2:j(c[0],aa[7]);case 0:j(b,aa[6])}}function r(a,b,c){var d,e=[];for(d=0;a>d;d+=1)e.push(c.appendChild(p(b,d)));return e}function s(a,b,c){j(c,aa[0]),j(c,aa[8+a]),j(c,aa[4+b]);var d=document.createElement("div");return j(d,aa[1]),c.appendChild(d),d}function t(a){return a}function u(a){var b=document.createElement("div");return b.className=aa[18],a.firstChild.appendChild(b)}function v(a){var b=a.format?a.format:t,c=W.map(u);S("update",function(a,d,e){c[d].innerHTML=b(a[d],e[d])})}function w(a,b,c){if("range"===a||"steps"===a)return Z.xVal;if("count"===a){var d,e=100/(b-1),f=0;for(b=[];(d=f++*e)<=100;)b.push(d);a="positions"}return"positions"===a?b.map(function(a){return Z.fromStepping(c?Z.getStep(a):a)}):"values"===a?c?b.map(function(a){return Z.fromStepping(Z.getStep(Z.toStepping(a)))}):b:void 0}function x(b,c,d){function e(a,b){return(a+b).toFixed(7)/1}var f=Z.direction,g={},h=Z.xVal[0],i=Z.xVal[Z.xVal.length-1],j=!1,k=!1,l=0;return Z.direction=0,d=a(d.slice().sort(function(a,b){return a-b})),d[0]!==h&&(d.unshift(h),j=!0),d[d.length-1]!==i&&(d.push(i),k=!0),d.forEach(function(a,f){var h,i,m,n,o,p,q,r,s,t,u=a,v=d[f+1];if("steps"===c&&(h=Z.xNumSteps[f]),h||(h=v-u),u!==!1&&void 0!==v)for(i=u;v>=i;i=e(i,h)){for(n=Z.toStepping(i),o=n-l,r=o/b,s=Math.round(r),t=o/s,m=1;s>=m;m+=1)p=l+m*t,g[p.toFixed(5)]=["x",0];q=d.indexOf(i)>-1?1:"steps"===c?2:0,!f&&j&&(q=0),i===v&&k||(g[n.toFixed(5)]=[i,q]),l=n}}),Z.direction=f,g}function y(a,b,c){function e(a){return["-normal","-large","-sub"][a]}function f(a,b,c){return'class="'+b+" "+b+"-"+h+" "+b+e(c[1])+'" style="'+d.style+": "+a+'%"'}function g(a,d){Z.direction&&(a=100-a),d[1]=d[1]&&b?b(d[0],d[1]):d[1],i.innerHTML+="
",d[1]&&(i.innerHTML+="
"+c.to(d[0])+"
")}var h=["horizontal","vertical"][d.ort],i=document.createElement("div");return j(i,"noUi-pips"),j(i,"noUi-pips-"+h),Object.keys(a).forEach(function(b){g(b,a[b])}),i}function z(a){var b=a.mode,c=a.density||1,d=a.filter||!1,e=a.values||!1,f=a.stepped||!1,g=w(b,e,f),h=x(c,b,g),i=a.format||{to:Math.round};return X.appendChild(y(h,d,i))}function A(){return V["offset"+["Width","Height"][d.ort]]}function B(a,b){void 0!==b&&1!==d.handles&&(b=Math.abs(b-d.dir)),Object.keys(_).forEach(function(c){var d=c.split(".")[0];a===d&&_[c].forEach(function(a){a(h(M()),b,C(Array.prototype.slice.call($)))})})}function C(a){return 1===a.length?a[0]:d.dir?a.reverse():a}function D(a,b,c,e){var f=function(b){return X.hasAttribute("disabled")?!1:l(X,aa[14])?!1:(b=o(b,e.pageOffset),a===Q.start&&void 0!==b.buttons&&b.buttons>1?!1:(b.calcPoint=b.points[d.ort],void c(b,e)))},g=[];return a.split(" ").forEach(function(a){b.addEventListener(a,f,!1),g.push([a,f])}),g}function E(a,b){if(0===a.buttons&&0===a.which&&0!==b.buttonsProperty)return F(a,b);var c,d,f=b.handles||W,g=!1,h=100*(a.calcPoint-b.start)/b.baseSize,i=f[0]===W[0]?0:1;if(c=e(h,b.positions,f.length>1),g=J(f[0],c[i],1===f.length),f.length>1){if(g=J(f[1],c[i?0:1],!1)||g)for(d=0;d1&&j(X,aa[12]);var f=function(){return!1};document.body.noUiListener=f,document.body.addEventListener("selectstart",f,!1)}}function H(a){var b,e,g=a.calcPoint,h=0;return a.stopPropagation(),W.forEach(function(a){h+=c(a)[d.style]}),b=h/2>g||1===W.length?0:1,g-=c(V)[d.style],e=100*g/A(),d.events.snap||f(X,aa[14],300),W[b].hasAttribute("disabled")?!1:(J(W[b],e),B("slide",b),B("set",b),B("change",b),void(d.events.snap&&G(a,{handles:[W[b]]})))}function I(a){var b,c;if(!a.fixed)for(b=0;b1&&(b=e?Math.max(b,f):Math.min(b,h)),c!==!1&&d.limit&&W.length>1&&(b=e?Math.min(b,i):Math.max(b,l)),b=Z.getStep(b),b=g(parseFloat(b.toFixed(7))),b===Y[e]&&m===$[e]?!1:(window.requestAnimationFrame?window.requestAnimationFrame(function(){a.style[d.style]=b+"%"}):a.style[d.style]=b+"%",a.previousSibling||(k(a,aa[17]),b>50&&j(a,aa[17])),Y[e]=b,$[e]=Z.fromStepping(b),B("update",e),!0)}function K(a,b){var c,e,f;for(d.limit&&(a+=1),c=0;a>c;c+=1)e=c%2,f=b[e],null!==f&&f!==!1&&("number"==typeof f&&(f=String(f)),f=d.format.from(f),(f===!1||isNaN(f)||J(W[e],Z.toStepping(f),c===3-d.dir)===!1)&&B("update",e))}function L(a){var b,c,e=h(a);for(d.dir&&d.handles>1&&e.reverse(),d.animate&&-1!==Y[0]&&f(X,aa[14],300),b=W.length>1?3:1,1===e.length&&(b=1),K(b,e),c=0;c=c[1]?c[2]:c[0]||!1;return[h,f]});return C(a)}function S(a,b){_[a]=_[a]||[],_[a].push(b),"update"===a.split(".")[0]&&W.forEach(function(a,b){B("update",b)})}function T(a){var b=a.split(".")[0],c=a.substring(b.length);Object.keys(_).forEach(function(a){var d=a.split(".")[0],e=a.substring(d.length);b&&b!==d||c&&c!==e||delete _[a]})}function U(a){var b=N({start:[0,0],margin:a.margin,limit:a.limit,step:a.step,range:a.range,animate:a.animate});d.margin=b.margin,d.limit=b.limit,d.step=b.step,d.range=b.range,d.animate=b.animate,Z=b.spectrum}var V,W,X=b,Y=[-1,-1],Z=d.spectrum,$=[],_={},aa=["target","base","origin","handle","horizontal","vertical","background","connect","ltr","rtl","draggable","","state-drag","","state-tap","active","","stacking","tooltip"].map(n(d.cssPrefix||R));if(X.noUiSlider)throw new Error("Slider was already initialized.");return V=s(d.dir,d.ort,X),W=r(d.handles,d.dir,V),q(d.connect,X,W),I(d.events),d.pips&&z(d.pips),d.tooltips&&v(d.tooltips),{destroy:O,steps:P,on:S,off:T,get:M,set:L,updateOptions:U}}function P(a,b){if(!a.nodeName)throw new Error("noUiSlider.create requires a single element.");var c=N(b,a),d=O(a,c);return d.set(c.start),a.noUiSlider=d,d}var Q=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},R="noUi-";y.prototype.getMargin=function(a){return 2===this.xPct.length?p(this.xVal,a):!1},y.prototype.toStepping=function(a){return a=t(this.xVal,this.xPct,a),this.direction&&(a=100-a),a},y.prototype.fromStepping=function(a){return this.direction&&(a=100-a),e(u(this.xVal,this.xPct,a))},y.prototype.getStep=function(a){return this.direction&&(a=100-a),a=v(this.xPct,this.xSteps,this.snap,a),this.direction&&(a=100-a),a},y.prototype.getApplicableStep=function(a){var b=s(a,this.xPct),c=100===a?2:1;return[this.xNumSteps[b-2],this.xVal[b-c],this.xNumSteps[b-c]]},y.prototype.convert=function(a){return this.getStep(this.toStepping(a))};var S={to:function(a){return void 0!==a&&a.toFixed(2)},from:Number};return{create:P}}); (function($){ "use strict"; $.tesla_responsive=function(options){ var $window; var length; var index; var previous; var resize; if($.isArray(options)){ $window=$(window); length=options.length; if(length){ options.sort(function(a, b){ return b.width - a.width; }); resize=function (){ var width=$window.width(); var i=0; while(i < length&&width < options[i].width){ i++; } index=i < length ? i:undefined; if(previous!==index){ previous=index; if(undefined!==index){ options[index].action(); }} }; $window.resize(resize); resize(); }} return resize; }; $.fn.tesla_slider=function(options){ return this.each(function(i, e){ var $e=$(e); var settings=$.extend({ item: '.item', next: '.next', prev: '.prev', container: $e, autoplay: true, autoplaySpeed: 4000, autoplayResume: 4000, bullets: '[data-tesla-plugin="bullets"]', },options,{ item: $e.attr('data-tesla-item'), next: $e.attr('data-tesla-next'), prev: $e.attr('data-tesla-prev'), container: $e.attr('data-tesla-container'), autoplay: $e.attr('data-tesla-autoplay')!=="false", autoplaySpeed: $e.attr('data-tesla-autoplay-speed') ? parseInt($e.attr('data-tesla-autoplay-speed'), 10):$e.attr('data-tesla-autoplay-speed'), autoplayResume: $e.attr('data-tesla-autoplay-resume') ? parseInt($e.attr('data-tesla-autoplay-resume'), 10):this.autoplaySpeed, bullets: $e.attr('data-tesla-bullets'), active: $e.attr('data-tesla-active') }); var container=settings.container instanceof jQuery ? settings.container:$e.find(settings.container); var items=container.find(settings.item); var bullets=$e.find(settings.bullets); var next=$e.find(settings.next); var prev=$e.find(settings.prev); var max=items.length - 1; var index=0; var prev_action; var next_action; var goto_action; var process; var process_first; var autoplay_interval; var autoplay_timeout; var autoplay_play; var autoplay_stop; var autoplay_resume; var imagesLoaded_object; var imagesLoaded_progress; if(max <=0) return; tesla_set_option($e, 'slider', 'tesla_remove', 'removed', false); prev_action=function(){ var index_old=index; var index_new; index--; if(index < 0) index=max; index_new=index; container.css({ height: Math.max(items.eq(index_old).outerHeight(true), items.eq(index_new).outerHeight(true)) }); items.eq(index_old).stop(true, true).fadeOut(1000, function(){ }); items.eq(index).stop(true, true).fadeIn(1000, function(){ container.css({ height: items.eq(index_new).outerHeight(true) }); }); bullets.trigger('teslaSliderChange', {'index': index}); }; next_action=function(){ var index_old=index; var index_new; index++; if(index > max) index=0; index_new=index; container.css({ height: Math.max(items.eq(index_old).outerHeight(true), items.eq(index_new).outerHeight(true)) }); items.eq(index_old).stop(true, true).fadeOut(1000, function(){ }); items.eq(index).stop(true, true).fadeIn(1000, function(){ container.css({ height: items.eq(index_new).outerHeight(true) }); }); bullets.trigger('teslaSliderChange', {'index': index}); }; goto_action=function(goto_index){ if(goto_index===index) return; var index_old=index; var index_new; index=goto_index; if(index > max) index=0; if(index < 0) index=max; index_new=index; container.css({ height: Math.max(items.eq(index_old).outerHeight(true), items.eq(index_new).outerHeight(true)) }); items.eq(index_old).stop(true, true).fadeOut(1000, function(){ }); items.eq(index).stop(true, true).fadeIn(1000, function(){ container.css({ height: items.eq(index_new).outerHeight(true) }); }); bullets.trigger('teslaSliderChange', {'index': index}); }; process_first=function(){ container.css({ position: 'relative', height: items.eq(index).outerHeight(true) }); items.css({ position: 'absolute', top: 0, left: 0, right: 0 }); items.filter(':gt(0)').css({ display: 'none' }); $(window).resize(function(){ container.css({ height: items.eq(index).outerHeight(true) }); }); }; process=function(){ process_first(); prev.click(function(ev){ autoplay_stop(); prev_action(); autoplay_resume(); if(ev.preventDefault) ev.preventDefault(); else return false; }); tesla_set_option($e, 'slider', 'prev', 'event', prev); next.click(function(ev){ autoplay_stop(); next_action(); autoplay_resume(); if(ev.preventDefault) ev.preventDefault(); else return false; }); tesla_set_option($e, 'slider', 'next', 'event', next); bullets.on('teslaBulletsClick', function(ev, data){ autoplay_stop(); goto_action(data.index); autoplay_resume(); if(ev.preventDefault) ev.preventDefault(); else return false; }); tesla_set_option($e, 'slider', 'bullets', 'bullets', bullets); items.hover(function(){ autoplay_stop(); },function(){ autoplay_stop(); autoplay_resume(); }); autoplay_play=function(){ if(!settings.autoplay) return; autoplay_interval=setInterval(next_action, settings.autoplaySpeed); tesla_set_option($e, 'slider', 'autoplay_interval', 'interval', autoplay_interval); }; autoplay_stop=function(){ if(!settings.autoplay) return; clearInterval(autoplay_interval); clearTimeout(autoplay_timeout); }; autoplay_resume=function(){ if(!settings.autoplay) return; autoplay_timeout=setTimeout(autoplay_play, settings.autoplayResume); tesla_set_option($e, 'slider', 'autoplay_timeout', 'timeout', autoplay_timeout); }; autoplay_play(); }; if(imagesLoaded){ imagesLoaded(container[0], function(){ if(!tesla_get_option($e, 'slider', 'tesla_remove').value) process(); }); }else{ process(); }}); }; $.fn.tesla_masonry=function(options){ return this.each(function(i, e){ var $e=$(e); var settings=$.extend({ filters: '[data-tesla-plugin="filters"]' },options,{ filters: $e.attr('data-tesla-filters') }); var filters=$(settings.filters); var items=$e.children(); var process; tesla_set_option($e, 'masonry', 'tesla_remove', 'removed', false); process=function(){ $e.masonry(); if(filters.length){ filters.on('teslaFiltersChange', function(ev, data){ var i; var n=data.categories.length; var selector=''; var masonry_object=$e.data('masonry'); for(i=0; i*', hover: false },options,{ bullets: $e.attr('data-tesla-selector'), hover: $e.attr('data-tesla-hover') }); var bullets=$e.find(settings.bullets); var hover='0'===settings.hover||('string'===typeof(settings.hover)&&'false'===settings.hover.toLowerCase()) ? false:Boolean(settings.hover); var action=function(ev){ $e.trigger('teslaBulletsClick', {'index': bullets.index(this)}); }; bullets.eq(0).addClass('active'); bullets.click(action); tesla_set_option($e, 'bullets', 'bullets', 'event', bullets); if(hover) bullets.mouseover(action); $e.on('teslaSliderChange', function(ev, data){ bullets.filter('.active').removeClass('active'); bullets.eq(data.index).addClass('active'); }); tesla_set_option($e, 'bullets', 'e', 'event', $e); }); }; $.fn.tesla_carousel=function(options){ return this.each(function(i, e){ var $e=$(e); var settings=$.extend({ item: '.item', next: '.next', prev: '.prev', container: $e, rotate: true, autoplay: true, hideEffect: true, autoplaySpeed: 4000, autoplayResume: 4000 },options,{ item: $e.attr('data-tesla-item'), next: $e.attr('data-tesla-next'), prev: $e.attr('data-tesla-prev'), container: $e.attr('data-tesla-container'), rotate: $e.attr('data-tesla-rotate'), autoplay: $e.attr('data-tesla-autoplay'), hideEffect: $e.attr('data-tesla-hide-effect'), autoplaySpeed: $e.attr('data-tesla-autoplay-speed') ? parseInt($e.attr('data-tesla-autoplay-speed'), 10):$e.attr('data-tesla-autoplay-speed'), autoplayResume: $e.attr('data-tesla-autoplay-resume') ? parseInt($e.attr('data-tesla-autoplay-resume'), 10):this.autoplaySpeed, }); var container=settings.container instanceof jQuery ? settings.container:$e.find(settings.container); var items=container.find(settings.item); var next=$e.find(settings.next); var prev=$e.find(settings.prev); var max; var visible; var index=0; var prev_action, prev_action_move; var next_action, next_action_move; var action_0, action_768, action_992, action_1200, action_responsive, action_adjust; var process; var responsive; var item_width; var item_height; var rotate='0'===settings.rotate||('string'===typeof(settings.rotate)&&'false'===settings.rotate.toLowerCase()) ? false:Boolean(settings.rotate); var rotate_interval; var autoplay='0'===settings.autoplay||('string'===typeof(settings.autoplay)&&'false'===settings.autoplay.toLowerCase()) ? false:Boolean(settings.autoplay); var hide_effect='0'===settings.hideEffect||('string'===typeof(settings.hideEffect)&&'false'===settings.hideEffect.toLowerCase()) ? false:Boolean(settings.hideEffect); var autoplay_interval, autoplay_timeout; var autoplay_start, autoplay_stop, autoplay_resume; var responsive_resize; tesla_set_option($e, 'carousel', 'tesla_remove', 'removed', false); container=container.wrapInner('
').children(); tesla_set_option($e, 'carousel', 'container', 'wrapper', container); autoplay_start=function(){ if(!autoplay) return; autoplay_stop(); if(undefined!==rotate_interval) autoplay_interval=0; else{ autoplay_interval=setInterval(next_action, settings.autoplaySpeed); tesla_set_option($e, 'carousel', 'autoplay_interval', 'interval', autoplay_interval); }}; autoplay_stop=function(){ if(!autoplay) return; clearInterval(autoplay_interval); autoplay_interval=undefined; clearTimeout(autoplay_timeout); autoplay_timeout=undefined; }; autoplay_resume=function(){ if(!autoplay) return; autoplay_stop(); if(undefined!==rotate_interval) autoplay_timeout=0; else{ autoplay_timeout=setTimeout(autoplay_start, settings.autoplayResume); tesla_set_option($e, 'carousel', 'autoplay_timeout', 'timeout', autoplay_timeout); }}; prev_action_move=function(){ if(index > 0){ if(hide_effect) items.eq(index + visible - 1).css({ '-webkit-transform': 'scale(0)', '-moz-transform': 'scale(0)', '-ms-transform': 'scale(0)', '-o-transform': 'scale(0)', 'transform': 'scale(0)' }); if(!autoplay&&index===max){ next.removeClass('disabled'); } index--; if(!autoplay&&index===0){ prev.addClass('disabled'); } if(hide_effect) items.eq(index).css({ '-webkit-transform': 'scale(1)', '-moz-transform': 'scale(1)', '-ms-transform': 'scale(1)', '-o-transform': 'scale(1)', 'transform': 'scale(1)' }); container.css({ left: String(- index * 100 / visible) + '%' }); return true; }else return false; }; prev_action=function(){ if(undefined!==rotate_interval) return; if(prev_action_move()){ }else{ if(rotate&&index < max){ clearInterval(rotate_interval); rotate_interval=setInterval(function(){ if(!next_action_move()){ clearInterval(rotate_interval); rotate_interval=undefined; }}, 200); tesla_set_option($e, 'carousel', 'rotate_interval', 'interval', rotate_interval); }} }; next_action_move=function(){ if(index < max){ if(hide_effect) items.eq(index).css({ '-webkit-transform': 'scale(0)', '-moz-transform': 'scale(0)', '-ms-transform': 'scale(0)', '-o-transform': 'scale(0)', 'transform': 'scale(0)' }); if(!autoplay&&index===0){ prev.removeClass('disabled'); } index++; if(!autoplay&&index===max){ next.addClass('disabled'); } if(hide_effect) items.eq(index + visible - 1).css({ '-webkit-transform': 'scale(1)', '-moz-transform': 'scale(1)', '-ms-transform': 'scale(1)', '-o-transform': 'scale(1)', 'transform': 'scale(1)' }); container.css({ left: String(- index * 100 / visible) + '%' }); return true; }else return false; }; next_action=function(){ if(undefined!==rotate_interval) return; if(next_action_move()){ }else{ if(rotate&&index > 0){ clearInterval(rotate_interval); clearInterval(autoplay_interval); clearTimeout(autoplay_timeout); rotate_interval=setInterval(function(){ if(!prev_action_move()){ clearInterval(rotate_interval); rotate_interval=undefined; if(undefined!==autoplay_interval) autoplay_start(); if(undefined!==autoplay_timeout) autoplay_resume(); }}, 200); tesla_set_option($e, 'carousel', 'rotate_interval', 'interval', rotate_interval); }} }; action_0=function(){ action_responsive(); }; action_768=function(){ action_responsive(); }; action_992=function(){ action_responsive(); }; action_1200=function(){ action_responsive(); }; action_responsive=function(){ item_height=Math.max.apply(null, items.map(function(){ return $(this).outerHeight(true); }).get()); item_width=items.outerWidth(true); visible=Math.round(container.width() / item_width); max=Math.max(items.length - visible, 0); index=Math.min(index, max); if(!max){ prev.addClass('disabled'); next.addClass('disabled'); }else{ if(!autoplay&&index===0) prev.addClass('disabled'); else prev.removeClass('disabled'); if(!autoplay&&index===max) next.addClass('disabled'); else next.removeClass('disabled'); } container.css({ position: 'relative', height: item_height, '-webkit-transition': 'left 0.4s ease-out', '-moz-transition': 'left 0.4s ease-out', '-ms-transition': 'left 0.4s ease-out', '-o-transition': 'left 0.4s ease-out', 'transition': 'left 0.4s ease-out', left: String(- index * 100 / visible) + '%' }); items.css({ position: 'absolute', top: 0, '-webkit-transition': '-webkit-transform 0.4s ease-out', '-moz-transition': '-webkit-transform 0.4s ease-out', '-ms-transition': '-webkit-transform 0.4s ease-out', '-o-transition': '-webkit-transform 0.4s ease-out', 'transition': '-webkit-transform 0.4s ease-out' }).each(function(i){ $(this).css({ left: String(i * 100 / visible) + '%' }); }); action_adjust(); }; action_adjust=function(){ if(hide_effect){ items.filter(':gt('+String(visible)+'),:eq('+String(visible)+'),:lt('+String(index)+')').css({ '-webkit-transform': 'scale(0)', '-moz-transform': 'scale(0)', '-ms-transform': 'scale(0)', '-o-transform': 'scale(0)', 'transform': 'scale(0)' }); items.filter(':gt('+String(index)+'):lt('+String(visible)+'),:eq('+String(index)+')').css({ '-webkit-transform': 'scale(1)', '-moz-transform': 'scale(1)', '-ms-transform': 'scale(1)', '-o-transform': 'scale(1)', 'transform': 'scale(1)' }); }}; responsive=[ { width: 0, action: action_0 }, { width: 768, action: action_768 }, { width: 992, action: action_992 }, { width: 1200, action: action_1200 } ]; process=function(){ responsive_resize=$.tesla_responsive(responsive); tesla_set_option($e, 'carousel', 'responsive_resize', 'responsive', responsive_resize); prev.click(function(ev){ autoplay_stop(); autoplay_resume(); prev_action(); if(ev.preventDefault) ev.preventDefault(); else return false; }); tesla_set_option($e, 'carousel', 'prev', 'event', prev); next.click(function(ev){ autoplay_stop(); autoplay_resume(); next_action(); if(ev.preventDefault) ev.preventDefault(); else return false; }); tesla_set_option($e, 'carousel', 'next', 'event', next); items.click(function(ev){ autoplay_stop(); autoplay_resume(); }); items.hover(function(ev){ autoplay_stop(); },function(ev){ autoplay_stop(); autoplay_resume(); }); tesla_set_option($e, 'carousel', 'items', 'event', items); autoplay_start(); }; if(imagesLoaded){ imagesLoaded(container[0], function(){ if(!tesla_get_option($e, 'carousel', 'tesla_remove').value) process(); }); }else{ process(); }}); }; $.fn.tesla_news_ticker=function(options){ return this.each(function(i, e){ var $e=$(e); var settings=$.extend({ speed: 20, item: '.item', container: $e },options,{ speed: $e.attr('data-tesla-speed'), item: $e.attr('data-tesla-item'), container: $e.attr('data-tesla-container') }); var container=settings.container instanceof jQuery ? settings.container:$e.find(settings.container); var items=container.find(settings.item); var process; if(!items.length) return; process=function(){ var items_width; var items_clone; var aloz; container.css({ overflow: 'hidden' }); container=items.wrapAll('
').parent().addClass('no-style'); container.css({ overflow: 'hidden' }); items_clone=items.eq(0).clone(); items.last().after(items_clone); items=items.add(items_clone); items=items.wrap('
').parent().addClass('no-style'); items.css({ float: 'left', overflow: 'hidden' }); items_width=0; items.each(function(i, e){ items_width +=$(e).width(); }); items_width +=items.length; container.css({ width: items_width }); aloz=function(){ var item_current; var item_current_width; var wei=function(){ item_current=items.parent().children().first(); item_current_width=item_current.width(); }; var dara=function(){ var item_current_margin=parseInt(item_current.css('margin-left'), 10)||0; var item_current_distance=item_current_width+item_current_margin; item_current.animate({ marginLeft: -item_current_width },{ duration: item_current_distance*settings.speed, easing: 'linear', queue: false, start: function(){ tesla_set_option($e, 'news_ticker', 'item_current', 'animation', item_current); }, done: function(){ item_current.css({ display: 'none', marginLeft: 0 }).appendTo(item_current.parent()).css({ display: 'block' }); wei(); dara(); }}); }; wei(); dara(); items.hover(function(){ item_current.stop(); },function(){ dara(); }); }; setTimeout(aloz, 1000); }; process(); }); }; $.fn.tesla_remove=function(){ return this.each(function(i, e){ var $e=$(e); var options=tesla_get_options($e); var plugin, key; if(undefined!==options){ for(plugin in options){ if(undefined!==options[plugin]){ tesla_set_option($e, plugin, 'tesla_remove', 'removed', true); for(key in options[plugin]){ switch(options[plugin][key].type){ case 'interval': clearInterval(options[plugin][key].value); break; case 'timeout': clearTimeout(options[plugin][key].value); break; case 'event': $(options[plugin][key].value).unbind().off(); break; case 'bullets': $(options[plugin][key].value).unbind().off().tesla_remove(); break; case 'filters': $(options[plugin][key].value).unbind().off().tesla_remove(); break; case 'responsive': $(window).unbind('resize', options[plugin][key].value); break; case 'wrapper': $(options[plugin][key].value).contents().unwrap(); break; case 'animation': $(options[plugin][key].value).stop(); break; default: }} }} }}); }; $(function(){ $('[data-tesla-plugin="slider"]').tesla_slider(); $('[data-tesla-plugin="carousel"]').tesla_carousel(); $('[data-tesla-plugin="masonry"]').tesla_masonry(); $('[data-tesla-plugin="filters"]').tesla_filters(); $('[data-tesla-plugin="bullets"]').tesla_bullets(); $('[data-tesla-plugin="news_ticker"]').tesla_news_ticker(); }); function tesla_get_options($e){ return $($e).data('tesla_themes'); } function tesla_get_option($e, $plugin, $key){ var $data=$($e).data('tesla_themes'); var $result=undefined; if(undefined!==$data&&undefined!==$data[$plugin]&&undefined!==$data[$plugin][$key]){ $result=$data[$plugin][$key]; } return $result; } function tesla_set_option($e, $plugin, $key, $type, $value){ var $data; $e=$($e); $data=$e.data('tesla_themes'); if(undefined===$data){ $data={}; $data[$plugin]={}; $data[$plugin][$key]={'type': $type, 'value': $value};}else{ if(undefined===$data[$plugin]){ $data[$plugin]={}; $data[$plugin][$key]={'type': $type, 'value': $value};}else{ $data[$plugin][$key]={'type': $type, 'value': $value};}} $e.data('tesla_themes', $data); }}(jQuery)); jQuery(document).ready(function(){ "use strict"; jQuery('#calendar').datepicker({ firstDay: 1, }); jQuery('header .fa-search').on('click', function(){ jQuery('.search-container').addClass('open'); }); jQuery('.search-container .close-icon').on('click', function(){ jQuery('.search-container').removeClass('open'); }); jQuery('.search-container .search-box .search-form .search-input').keyup(function(){ var text_val=jQuery(this).val(); if(text_val===""){ jQuery('.search-container .search-box .search-form').removeClass('has-value'); }else{ jQuery('.search-container .search-box .search-form').addClass('has-value'); }}); jQuery(".responsive-menu").on('click', function(e){ jQuery(".main-nav>ul").css({ display: "block" }); e.stopPropagation(); if(e.preventDefault) e.preventDefault(); return false; }); jQuery("body").on('click', function(){ jQuery(".main-nav>ul").css({ display: "none" }); }); jQuery('header .header-ul-right .log-button').on('click', function (e){ e.preventDefault(); jQuery('.shopping-cart-wrapper').removeClass('active'); jQuery('header .header-ul-right .register-wrapper').removeClass('visible'); jQuery('header .header-ul-right .login-wrapper').toggleClass('visible'); return false; }); jQuery('header .header-ul-right .reg-button').on('click', function (e){ e.preventDefault(); jQuery('.shopping-cart-wrapper').removeClass('active'); jQuery('header .header-ul-right .login-wrapper').removeClass('visible'); jQuery('header .header-ul-right .register-wrapper').toggleClass('visible'); return false; }); jQuery(document).on('click', '.shopping-cart-wrapper .cart-toggle', function(){ jQuery('header .header-ul-right .login-wrapper').removeClass('visible'); jQuery('header .header-ul-right .register-wrapper').removeClass('visible'); if(jQuery('.shopping-cart-wrapper').hasClass('active')){ jQuery('.shopping-cart-wrapper').removeClass('active'); }else{ jQuery('.shopping-cart-wrapper').addClass('active') } return false; }); jQuery('header .header-ul-right .login-wrapper').on('click', function (e){ e.stopPropagation(); }); jQuery('header .header-ul-right .register-wrapper').on('click', function (e){ e.stopPropagation(); }); jQuery('.shopping-cart-wrapper .cart-box').on('click', function (e){ e.stopPropagation(); }); jQuery(document).on('click', function (){ jQuery('.shopping-cart-wrapper').removeClass('active'); jQuery('header .header-ul-right .login-wrapper').removeClass('visible'); jQuery('header .header-ul-right .register-wrapper').removeClass('visible'); }); jQuery(window).on('scroll', function (){ (jQuery(this).scrollTop() > (jQuery('header').outerHeight(true) - jQuery('header .main-nav').outerHeight(true) - 20)) ? jQuery('header').addClass('fill'):jQuery('header').removeClass('fill'); }); jQuery(".swipebox").swipebox(); if(typeof ajaxurl!=='undefined'){ jQuery('#login-form').ajaxForm({ url:ajaxurl, data: {action:'tt_login_profile_form'}, success:function(result){ var obj=jQuery.parseJSON(result); var name=jQuery('#login-form .user_login'); var pass=jQuery('#login-form .user_pass'); if(obj.success){ window.location.reload(); }else{ if(obj.pass){ pass.addClass('input-error').attr('type','text').val(obj.pass); jQuery(pass).on('click, focus', function(){ if(jQuery(this).hasClass('input-error')) jQuery(this).val('').attr('type','password').removeClass('input-error'); }); } if(obj.username){ name.addClass('input-error').val(obj.username); jQuery(name).on('click, focus', function(){ jQuery(this).val('').removeClass('input-error'); }); }} }}); jQuery('#register-form').ajaxForm({ url:ajaxurl, data: {action:'tt_register_profile_form'}, success:function(result){ var obj=jQuery.parseJSON(result); if(obj.pass){ jQuery("#register-form .reg-passwd, #register-form .reg-passwd-r").addClass('input-error').attr('type','text'); jQuery("#register-form .reg-passwd").val(obj.pass); jQuery("#register-form .reg-passwd-r").val(obj.pass2); jQuery("#register-form .reg-passwd, #register-form .reg-passwd-r").on('click, focus', function(){ if(jQuery("#register-form .reg-passwd, #register-form .reg-passwd-r").hasClass('input-error')) jQuery("#register-form .reg-passwd, #register-form .reg-passwd-r").val('').attr('type','password').removeClass('input-error'); }); } if(obj.username){ jQuery("#register-form .reg-username").addClass('input-error').val(obj.username); jQuery("#register-form .reg-username").on('click, focus', function(){ if(jQuery(this).hasClass('input-error')) jQuery(this).val('').removeClass('input-error'); }); } if(obj.email){ jQuery("#register-form .reg-email").addClass('input-error').val(obj.email); jQuery("#register-form .reg-email").on('click, focus', function(){ if(jQuery(this).hasClass('input-error')) jQuery(this).val('').removeClass('input-error'); }); } if(obj.success){ document.getElementById("register-form").reset(); var old_val=jQuery("#register-form .submit-button").val(); jQuery("#register-form .submit-button").val(obj.success); setTimeout(function(){ jQuery("#register-form .submit-button").val(old_val); jQuery('header .header-ul-right .log-button').click(); }, 900) }} }); } function initialize_one(){ var styleArray=[{ "featureType": "landscape", "stylers": [{ "saturation": -100 }, { "lightness": 65 }, { "visibility": "on" }] }, { "featureType": "poi", "stylers": [{ "saturation": -100 }, { "lightness": 51 }, { "visibility": "simplified" }] }, { "featureType": "road.highway", "stylers": [{ "saturation": -100 }, { "visibility": "simplified" }] }, { "featureType": "road.arterial", "stylers": [{ "saturation": -100 }, { "lightness": 30 }, { "visibility": "on" }] }, { "featureType": "road.local", "stylers": [{ "saturation": -100 }, { "lightness": 40 }, { "visibility": "on" }] }, { "featureType": "transit", "stylers": [{ "saturation": -100 }, { "visibility": "simplified" }] }, { "featureType": "administrative.province", "stylers": [{ "visibility": "off" }] }, { "featureType": "water", "elementType": "labels", "stylers": [{ "visibility": "on" }, { "lightness": -25 }, { "saturation": -100 }] }, { "featureType": "water", "elementType": "geometry", "stylers": [{ "hue": "#ffff00" }, { "lightness": -25 }, { "saturation": -97 }] }]; var mapCanvas=document.getElementsByClassName('map-canvas'); var Options=mapCanvas[0].getAttribute('data-map-settings'); var Pin=mapCanvas[0].getAttribute('data-pin'); var defaultSettings=JSON.parse(atob(Options)); var map; var mapOptions={ center: defaultSettings.location, zoom: defaultSettings.zoom, styles: styleArray, scrollwheel: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; map=new google.maps.Map(mapCanvas[0], mapOptions); var markers=[]; if(defaultSettings.markers){ jQuery.each(defaultSettings.markers, function (i, val){ var pos=new google.maps.LatLng(val.lat, val.lng); markers[i]=new google.maps.Marker({ position: pos, map: map, icon: Pin, animation: google.maps.Animation.DROP, }); }); }} if(jQuery('.map-canvas').length){ google.maps.event.addDomListener(window, 'load', initialize_one); } var priceSlider=jQuery('.main-sidebar .widget-price-filter .price-slider .slider')[0], step=jQuery(priceSlider).data('step'), start=jQuery(priceSlider).data('start'), stop=jQuery(priceSlider).data('stop'), min=jQuery(priceSlider).data('min'), max=jQuery(priceSlider).data('max'); function setPosition(){ var valuesContainer=jQuery('.price-slider .values-wrapper'), containerOffset=jQuery('.price-slider').offset().left, lowerOffset=jQuery('.noUi-handle-lower').offset().left - containerOffset, upperOffset=jQuery('.noUi-handle-upper').offset().left - containerOffset, bestPosition=(upperOffset + lowerOffset) / 2; valuesContainer.css({ 'left': bestPosition + 'px' }); } if(jQuery('.main-sidebar .widget-price-filter .price-slider').length){ noUiSlider.create(priceSlider, { start: [start, stop], connect: true, step: step, range: { 'min': min, 'max': max }}); setTimeout(function(){ setPosition(); }, 100); var snapValues=[ document.getElementsByClassName('slider-snap-value-lower')[0], document.getElementsByClassName('slider-snap-value-upper')[0] ]; priceSlider.noUiSlider.on('update', function(values, handle){ snapValues[handle].innerHTML=parseFloat(values[handle]); setPosition(); }); }}); jQuery(document).ready(function(){ jQuery('.qtyplus').on('click', function(e){ e.preventDefault(); fieldName=jQuery(this).attr('field'); var currentVal=parseInt(jQuery('input[name=' + fieldName + ']').val(), 10); if(!isNaN(currentVal)){ jQuery('input[name=' + fieldName + ']').val(currentVal + 1); }else{ jQuery('input[name=' + fieldName + ']').val(0); }}); jQuery(".qtyminus").on('click', function(e){ e.preventDefault(); fieldName=jQuery(this).attr('field'); var currentVal=parseInt(jQuery('input[name=' + fieldName + ']').val(), 10); if(!isNaN(currentVal)&¤tVal > 0){ jQuery('input[name=' + fieldName + ']').val(currentVal - 1); }else{ jQuery('input[name=' + fieldName + ']').val(0); }}); }); window.addComment=function(a){function b(){c(),g()}function c(a){if(t&&(m=j(r.cancelReplyId),n=j(r.commentFormId),m)){m.addEventListener("touchstart",e),m.addEventListener("click",e);for(var b,c=d(a),g=0,h=c.length;g').get(0).files,f.formdata="undefined"!=typeof window.FormData;var g=!!a.fn.prop;a.fn.attr2=function(){if(!g)return this.attr.apply(this,arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"==typeof a?a:this.attr.apply(this,arguments)},a.fn.ajaxSubmit=function(b,c,e,h){function i(c){var d,e,f=a.param(c,b.traditional).split("&"),g=f.length,h=[];for(d=0;d',z).val(k.extraData[m].value).appendTo(x)[0]):j.push(a('',z).val(k.extraData[m]).appendTo(x)[0]));k.iframeTarget||p.appendTo(A),q.attachEvent?q.attachEvent("onload",h):q.addEventListener("load",h,!1),setTimeout(b,15);try{x.submit()}catch(r){var s=document.createElement("form").submit;s.apply(x)}}finally{x.setAttribute("action",f),x.setAttribute("enctype",i),c?x.setAttribute("target",c):o.removeAttr("target"),a(j).remove()}}function h(b){if(!r.aborted&&!H){if(G=e(q),G||(d("cannot access response document"),b=C),b===B&&r)return r.abort("timeout"),void y.reject(r,"timeout");if(b===C&&r)return r.abort("server abort"),void y.reject(r,"error","server abort");if(G&&G.location.href!==k.iframeSrc||v){q.detachEvent?q.detachEvent("onload",h):q.removeEventListener("load",h,!1);var c,f="success";try{if(v)throw"timeout";var g="xml"===k.dataType||G.XMLDocument||a.isXMLDoc(G);if(d("isXml="+g),!g&&window.opera&&(null===G.body||!G.body.innerHTML)&&--I)return d("requeing onLoad callback, DOM not available"),void setTimeout(h,250);var i=G.body?G.body:G.documentElement;r.responseText=i?i.innerHTML:null,r.responseXML=G.XMLDocument?G.XMLDocument:G,g&&(k.dataType="xml"),r.getResponseHeader=function(a){var b={"content-type":k.dataType};return b[a.toLowerCase()]},i&&(r.status=Number(i.getAttribute("status"))||r.status,r.statusText=i.getAttribute("statusText")||r.statusText);var j=(k.dataType||"").toLowerCase(),l=/(json|script|text)/.test(j);if(l||k.textarea){var n=G.getElementsByTagName("textarea")[0];if(n)r.responseText=n.value,r.status=Number(n.getAttribute("status"))||r.status,r.statusText=n.getAttribute("statusText")||r.statusText;else if(l){var o=G.getElementsByTagName("pre")[0],s=G.getElementsByTagName("body")[0];o?r.responseText=o.textContent?o.textContent:o.innerText:s&&(r.responseText=s.textContent?s.textContent:s.innerText)}}else"xml"===j&&!r.responseXML&&r.responseText&&(r.responseXML=J(r.responseText));try{F=L(r,j,k)}catch(t){f="parsererror",r.error=c=t||f}}catch(t){d("error caught: ",t),f="error",r.error=c=t||f}r.aborted&&(d("upload aborted"),f=null),r.status&&(f=r.status>=200&&r.status<300||304===r.status?"success":"error"),"success"===f?(k.success&&k.success.call(k.context,F,"success",r),y.resolve(r.responseText,"success",r),m&&a.event.trigger("ajaxSuccess",[r,k])):f&&("undefined"==typeof c&&(c=r.statusText),k.error&&k.error.call(k.context,r,f,c),y.reject(r,"error",c),m&&a.event.trigger("ajaxError",[r,k,c])),m&&a.event.trigger("ajaxComplete",[r,k]),m&&!--a.active&&a.event.trigger("ajaxStop"),k.complete&&k.complete.call(k.context,r,f),H=!0,k.timeout&&clearTimeout(w),setTimeout(function(){k.iframeTarget?p.attr("src",k.iframeSrc):p.remove(),r.responseXML=null},100)}}}var i,j,k,m,n,p,q,r,t,u,v,w,x=o[0],y=a.Deferred();if(y.abort=function(a){r.abort(a)},c)for(j=0;j',z),p.css({position:"absolute",top:"-1000px",left:"-1000px"})),q=p[0],r={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(b){var c="timeout"===b?"timeout":"aborted";d("aborting upload... "+c),this.aborted=1;try{q.contentWindow.document.execCommand&&q.contentWindow.document.execCommand ("Stop")}catch(e){}p.attr("src",k.iframeSrc),r.error=c,k.error&&k.error.call(k.context,r,c,b),m&&a.event.trigger("ajaxError",[r,k,c]),k.complete&&k.complete.call(k.context,r,c)}},m=k.global,m&&0===a.active++&&a.event.trigger("ajaxStart"),m&&a.event.trigger("ajaxSend",[r,k]),k.beforeSend&&k.beforeSend.call(k.context,r,k)===!1)return k.global&&a.active--,y.reject(),y;if(r.aborted)return y.reject(),y;t=x.clk,t&&(u=t.name,u&&!t.disabled&&(k.extraData=k.extraData||{},k.extraData[u]=t.value,"image"===t.type&&(k.extraData[u+".x"]=x.clk_x,k.extraData[u+".y"]=x.clk_y)));var B=1,C=2,D=a("meta[name=csrf-token]").attr("content"),E=a("meta[name=csrf-param]").attr("content");E&&D&&(k.extraData=k.extraData||{},k.extraData[E]=D),k.forceSync?f():setTimeout(f,10);var F,G,H,I=50,J=a.parseXML||function(a,b){return window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml"),b&&b.documentElement&&"parsererror"!==b.documentElement.nodeName?b:null},K=a.parseJSON||function(a){return window.eval("("+a+")")},L=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f=("xml"===c||!c)&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;return f&&"parsererror"===g.documentElement.nodeName&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),"string"==typeof g&&(("json"===c||!c)&&e.indexOf("json")>=0?g=K(g):("script"===c||!c)&&e.indexOf("javascript")>=0&&a.globalEval(g)),g};return y}if(!this.length)return d("ajaxSubmit: skipping submit process - no element selected"),this;var l,m,n,o=this;"function"==typeof b?b={success:b}:"string"==typeof b||b===!1&&arguments.length>0?(b={url:b,data:c,dataType:e},"function"==typeof h&&(b.success=h)):"undefined"==typeof b&&(b={}),l=b.method||b.type||this.attr2("method"),m=b.url||this.attr2("action"),n="string"==typeof m?a.trim(m):"",n=n||window.location.href||"",n&&(n=(n.match(/^([^#]+)/)||[])[1]),b=a.extend(!0,{url:n,success:a.ajaxSettings.success,type:l||a.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},b);var p={};if(this.trigger("form-pre-serialize",[this,b,p]),p.veto)return d("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(b.beforeSerialize&&b.beforeSerialize(this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var q=b.traditional;"undefined"==typeof q&&(q=a.ajaxSettings.traditional);var r,s=[],t=this.formToArray(b.semantic,s,b.filtering);if(b.data){var u=a.isFunction(b.data)?b.data(t):b.data;b.extraData=u,r=a.param(u,q)}if(b.beforeSubmit&&b.beforeSubmit(t,this,b)===!1)return d("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[t,this,b,p]),p.veto)return d("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var v=a.param(t,q);r&&(v=v?v+"&"+r:r),"GET"===b.type.toUpperCase()?(b.url+=(b.url.indexOf("?")>=0?"&":"?")+v,b.data=null):b.data=v;var w=[];if(b.resetForm&&w.push(function(){o.resetForm()}),b.clearForm&&w.push(function(){o.clearForm(b.includeHidden)}),!b.dataType&&b.target){var x=b.success||function(){};w.push(function(c,d,e){var f=arguments,g=b.replaceTarget?"replaceWith":"html";a(b.target)[g](c).each(function(){x.apply(this,f)})})}else b.success&&(a.isArray(b.success)?a.merge(w,b.success):w.push(b.success));if(b.success=function(a,c,d){for(var e=b.context||this,f=0,g=w.length;f0,C="multipart/form-data",D=o.attr("enctype")===C||o.attr("encoding")===C,E=f.fileapi&&f.formdata;d("fileAPI :"+E);var F,G=(B||D)&&!E;b.iframe!==!1&&(b.iframe||G)?b.closeKeepAlive?a.get(b.closeKeepAlive,function(){F=k(t)}):F=k(t):F=(B||D)&&E?j(t):a.ajax(b),o.removeData("jqxhr").data("jqxhr",F);for(var H=0;H0)&&(e={url:e,data:f,dataType:g},"function"==typeof h&&(e.success=h)),e=e||{},e.delegation=e.delegation&&a.isFunction(a.fn.on),!e.delegation&&0===this.length){var i={s:this.selector,c:this.context};return!a.isReady&&i.s?(d("DOM not ready, queuing ajaxForm"),a(function(){a(i.s,i.c).ajaxForm(e)}),this):(d("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)")),this)}return e.delegation?(a(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,c).on("submit.form-plugin",this.selector,e,b).on("click.form-plugin",this.selector,e,c),this):this.ajaxFormUnbind().on("submit.form-plugin",e,b).on("click.form-plugin",e,c)},a.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},a.fn.formToArray=function(b,c,d){var e=[];if(0===this.length)return e;var g,h=this[0],i=this.attr("id"),j=b||"undefined"==typeof h.elements?h.getElementsByTagName("*"):h.elements;if(j&&(j=a.makeArray(j)),i&&(b||/(Edge|Trident)\//.test(navigator.userAgent))&&(g=a(':input[form="'+i+'"]').get(),g.length&&(j=(j||[]).concat(g))),!j||!j.length)return e;a.isFunction(d)&&(j=a.map(j,d));var k,l,m,n,o,p,q;for(k=0,p=j.length;k1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);