(function($){ 'use strict'; if(typeof wpcf7==='undefined'||wpcf7===null){ return; } wpcf7=$.extend({ cached: 0, inputs: [] }, wpcf7); $(function(){ wpcf7.supportHtml5=(function(){ var features={}; var input=document.createElement('input'); features.placeholder='placeholder' in input; var inputTypes=[ 'email', 'url', 'tel', 'number', 'range', 'date' ]; $.each(inputTypes, function(index, value){ input.setAttribute('type', value); features[ value ]=input.type!=='text'; }); return features; })(); $('div.wpcf7 > form').each(function(){ var $form=$(this); wpcf7.initForm($form); if(wpcf7.cached){ wpcf7.refill($form); }}); }); wpcf7.getId=function(form){ return parseInt($('input[name="_wpcf7"]', form).val(), 10); }; wpcf7.initForm=function(form){ var $form=$(form); $form.submit(function(event){ if(! wpcf7.supportHtml5.placeholder){ $('[placeholder].placeheld', $form).each(function(i, n){ $(n).val('').removeClass('placeheld'); }); } if(typeof window.FormData==='function'){ wpcf7.submit($form); event.preventDefault(); }}); $('.wpcf7-submit', $form).after(''); wpcf7.toggleSubmit($form); $form.on('click', '.wpcf7-acceptance', function(){ wpcf7.toggleSubmit($form); }); $('.wpcf7-exclusive-checkbox', $form).on('click', 'input:checkbox', function(){ var name=$(this).attr('name'); $form.find('input:checkbox[name="' + name + '"]').not(this).prop('checked', false); }); $('.wpcf7-list-item.has-free-text', $form).each(function(){ var $freetext=$(':input.wpcf7-free-text', this); var $wrap=$(this).closest('.wpcf7-form-control'); if($(':checkbox, :radio', this).is(':checked')){ $freetext.prop('disabled', false); }else{ $freetext.prop('disabled', true); } $wrap.on('change', ':checkbox, :radio', function(){ var $cb=$('.has-free-text', $wrap).find(':checkbox, :radio'); if($cb.is(':checked')){ $freetext.prop('disabled', false).focus(); }else{ $freetext.prop('disabled', true); }}); }); if(! wpcf7.supportHtml5.placeholder){ $('[placeholder]', $form).each(function(){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); $(this).focus(function(){ if($(this).hasClass('placeheld')){ $(this).val('').removeClass('placeheld'); }}); $(this).blur(function(){ if(''===$(this).val()){ $(this).val($(this).attr('placeholder')); $(this).addClass('placeheld'); }}); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.date){ $form.find('input.wpcf7-date[type="date"]').each(function(){ $(this).datepicker({ dateFormat: 'yy-mm-dd', minDate: new Date($(this).attr('min')), maxDate: new Date($(this).attr('max')) }); }); } if(wpcf7.jqueryUi&&! wpcf7.supportHtml5.number){ $form.find('input.wpcf7-number[type="number"]').each(function(){ $(this).spinner({ min: $(this).attr('min'), max: $(this).attr('max'), step: $(this).attr('step') }); }); } $('.wpcf7-character-count', $form).each(function(){ var $count=$(this); var name=$count.attr('data-target-name'); var down=$count.hasClass('down'); var starting=parseInt($count.attr('data-starting-value'), 10); var maximum=parseInt($count.attr('data-maximum-value'), 10); var minimum=parseInt($count.attr('data-minimum-value'), 10); var updateCount=function(target){ var $target=$(target); var length=$target.val().length; var count=down ? starting - length:length; $count.attr('data-current-value', count); $count.text(count); if(maximum&&maximum < length){ $count.addClass('too-long'); }else{ $count.removeClass('too-long'); } if(minimum&&length < minimum){ $count.addClass('too-short'); }else{ $count.removeClass('too-short'); }}; $(':input[name="' + name + '"]', $form).each(function(){ updateCount(this); $(this).keyup(function(){ updateCount(this); }); }); }); $form.on('change', '.wpcf7-validates-as-url', function(){ var val=$.trim($(this).val()); if(val && ! val.match(/^[a-z][a-z0-9.+-]*:/i) && -1!==val.indexOf('.')){ val=val.replace(/^\/+/, ''); val='http://' + val; } $(this).val(val); }); }; wpcf7.submit=function(form){ if(typeof window.FormData!=='function'){ return; } var $form=$(form); $('.ajax-loader', $form).addClass('is-active'); wpcf7.clearResponse($form); var formData=new FormData($form.get(0)); var detail={ id: $form.closest('div.wpcf7').attr('id'), status: 'init', inputs: [], formData: formData }; $.each($form.serializeArray(), function(i, field){ if('_wpcf7'==field.name){ detail.contactFormId=field.value; }else if('_wpcf7_version'==field.name){ detail.pluginVersion=field.value; }else if('_wpcf7_locale'==field.name){ detail.contactFormLocale=field.value; }else if('_wpcf7_unit_tag'==field.name){ detail.unitTag=field.value; }else if('_wpcf7_container_post'==field.name){ detail.containerPostId=field.value; }else if(field.name.match(/^_wpcf7_\w+_free_text_/)){ var owner=field.name.replace(/^_wpcf7_\w+_free_text_/, ''); detail.inputs.push({ name: owner + '-free-text', value: field.value }); }else if(field.name.match(/^_/)){ }else{ detail.inputs.push(field); }}); wpcf7.triggerEvent($form.closest('div.wpcf7'), 'beforesubmit', detail); var ajaxSuccess=function(data, status, xhr, $form){ detail.id=$(data.into).attr('id'); detail.status=data.status; detail.apiResponse=data; var $message=$('.wpcf7-response-output', $form); switch(data.status){ case 'validation_failed': $.each(data.invalidFields, function(i, n){ $(n.into, $form).each(function(){ wpcf7.notValidTip(this, n.message); $('.wpcf7-form-control', this).addClass('wpcf7-not-valid'); $('[aria-invalid]', this).attr('aria-invalid', 'true'); }); }); $message.addClass('wpcf7-validation-errors'); $form.addClass('invalid'); wpcf7.triggerEvent(data.into, 'invalid', detail); break; case 'acceptance_missing': $message.addClass('wpcf7-acceptance-missing'); $form.addClass('unaccepted'); wpcf7.triggerEvent(data.into, 'unaccepted', detail); break; case 'spam': $message.addClass('wpcf7-spam-blocked'); $form.addClass('spam'); wpcf7.triggerEvent(data.into, 'spam', detail); break; case 'aborted': $message.addClass('wpcf7-aborted'); $form.addClass('aborted'); wpcf7.triggerEvent(data.into, 'aborted', detail); break; case 'mail_sent': $message.addClass('wpcf7-mail-sent-ok'); $form.addClass('sent'); wpcf7.triggerEvent(data.into, 'mailsent', detail); break; case 'mail_failed': $message.addClass('wpcf7-mail-sent-ng'); $form.addClass('failed'); wpcf7.triggerEvent(data.into, 'mailfailed', detail); break; default: var customStatusClass='custom-' + data.status.replace(/[^0-9a-z]+/i, '-'); $message.addClass('wpcf7-' + customStatusClass); $form.addClass(customStatusClass); } wpcf7.refill($form, data); wpcf7.triggerEvent(data.into, 'submit', detail); if('mail_sent'==data.status){ $form.each(function(){ this.reset(); }); wpcf7.toggleSubmit($form); } if(! wpcf7.supportHtml5.placeholder){ $form.find('[placeholder].placeheld').each(function(i, n){ $(n).val($(n).attr('placeholder')); }); } $message.html('').append(data.message).slideDown('fast'); $message.attr('role', 'alert'); $('.screen-reader-response', $form.closest('.wpcf7')).each(function(){ var $response=$(this); $response.html('').attr('role', '').append(data.message); if(data.invalidFields){ var $invalids=$(''); $.each(data.invalidFields, function(i, n){ if(n.idref){ var $li=$('
  • ').append($('').attr('href', '#' + n.idref).append(n.message)); }else{ var $li=$('
  • ').append(n.message); } $invalids.append($li); }); $response.append($invalids); } $response.attr('role', 'alert').focus(); }); }; $.ajax({ type: 'POST', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/feedback'), data: formData, dataType: 'json', processData: false, contentType: false }).done(function(data, status, xhr){ ajaxSuccess(data, status, xhr, $form); $('.ajax-loader', $form).removeClass('is-active'); }).fail(function(xhr, status, error){ var $e=$('
    ').text(error.message); $form.after($e); }); }; wpcf7.triggerEvent=function(target, name, detail){ var $target=$(target); var event=new CustomEvent('wpcf7' + name, { bubbles: true, detail: detail }); $target.get(0).dispatchEvent(event); $target.trigger('wpcf7:' + name, detail); $target.trigger(name + '.wpcf7', detail); }; wpcf7.toggleSubmit=function(form, state){ var $form=$(form); var $submit=$('input:submit', $form); if(typeof state!=='undefined'){ $submit.prop('disabled', ! state); return; } if($form.hasClass('wpcf7-acceptance-as-validation')){ return; } $submit.prop('disabled', false); $('.wpcf7-acceptance', $form).each(function(){ var $span=$(this); var $input=$('input:checkbox', $span); if(! $span.hasClass('optional')){ if($span.hasClass('invert')&&$input.is(':checked') || ! $span.hasClass('invert')&&! $input.is(':checked')){ $submit.prop('disabled', true); return false; }} }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('') .text(message).appendTo($target); if($target.is('.use-floating-validation-tip *')){ var fadeOut=function(target){ $(target).not(':hidden').animate({ opacity: 0 }, 'fast', function(){ $(this).css({ 'z-index': -100 }); }); }; $target.on('mouseover', '.wpcf7-not-valid-tip', function(){ fadeOut(this); }); $target.on('focus', ':input', function(){ fadeOut($('.wpcf7-not-valid-tip', $target)); }); }}; wpcf7.refill=function(form, data){ var $form=$(form); var refillCaptcha=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find('img.wpcf7-captcha-' + i).attr('src', n); var match=/([0-9]+)\.(png|gif|jpeg)$/.exec(n); $form.find('input:hidden[name="_wpcf7_captcha_challenge_' + i + '"]').attr('value', match[ 1 ]); }); }; var refillQuiz=function($form, items){ $.each(items, function(i, n){ $form.find(':input[name="' + i + '"]').val(''); $form.find(':input[name="' + i + '"]').siblings('span.wpcf7-quiz-label').text(n[ 0 ]); $form.find('input:hidden[name="_wpcf7_quiz_answer_' + i + '"]').attr('value', n[ 1 ]); }); }; if(typeof data==='undefined'){ $.ajax({ type: 'GET', url: wpcf7.apiSettings.getRoute('/contact-forms/' + wpcf7.getId($form) + '/refill'), beforeSend: function(xhr){ var nonce=$form.find(':input[name="_wpnonce"]').val(); if(nonce){ xhr.setRequestHeader('X-WP-Nonce', nonce); }}, dataType: 'json' }).done(function(data, status, xhr){ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }}); }else{ if(data.captcha){ refillCaptcha($form, data.captcha); } if(data.quiz){ refillQuiz($form, data.quiz); }} }; wpcf7.clearResponse=function(form){ var $form=$(form); $form.removeClass('invalid spam sent failed'); $form.siblings('.screen-reader-response').html('').attr('role', ''); $('.wpcf7-not-valid-tip', $form).remove(); $('[aria-invalid]', $form).attr('aria-invalid', 'false'); $('.wpcf7-form-control', $form).removeClass('wpcf7-not-valid'); $('.wpcf7-response-output', $form) .hide().empty().removeAttr('role') .removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked'); }; wpcf7.apiSettings.getRoute=function(path){ var url=wpcf7.apiSettings.root; url=url.replace(wpcf7.apiSettings.namespace, wpcf7.apiSettings.namespace + path); return url; };})(jQuery); (function (){ if(typeof window.CustomEvent==="function") return false; function CustomEvent(event, params){ params=params||{ bubbles: false, cancelable: false, detail: undefined }; var evt=document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; } CustomEvent.prototype=window.Event.prototype; window.CustomEvent=CustomEvent; })(); (function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),null!=a.scrollContainer&&(this.config.scrollContainer=document.querySelector(a.scrollContainer)),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); if("undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.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},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.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").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(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()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.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")[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()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.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)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(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]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).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(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); (function(e){e.fn.hoverIntent=function(t,n,r){var i={interval:100,sensitivity:7,timeout:0};if(typeof t==="object"){i=e.extend(i,t)}else if(e.isFunction(n)){i=e.extend(i,{over:t,out:n,selector:r})}else{i=e.extend(i,{over:t,out:t,selector:n})}var s,o,u,a;var f=function(e){s=e.pageX;o=e.pageY};var l=function(t,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);if(Math.abs(u-s)+Math.abs(a-o)li"),f=d.length,h=100/f,g=h+"%"),c.data("breakpoint")&&(e=c.data("breakpoint")),l=function(){return c.hasClass("lg-screen")===!0&&k.hover===!0?k.transitionOpacity===!0?a(this).find(">ul").addClass("flexnav-show").stop(!0,!0).animate({height:["toggle","swing"],opacity:"toggle"},k.animationSpeed):a(this).find(">ul").addClass("flexnav-show").stop(!0,!0).animate({height:["toggle","swing"]},k.animationSpeed):void 0},i=function(){return c.hasClass("lg-screen")===!0&&a(this).find(">ul").hasClass("flexnav-show")===!0&&k.hover===!0?k.transitionOpacity===!0?a(this).find(">ul").removeClass("flexnav-show").stop(!0,!0).animate({height:["toggle","swing"],opacity:"toggle"},k.animationSpeed):a(this).find(">ul").removeClass("flexnav-show").stop(!0,!0).animate({height:["toggle","swing"]},k.animationSpeed):void 0},j=function(){var b;if(a(window).width()<=e)return c.removeClass("lg-screen").addClass("sm-screen"),k.calcItemWidths===!0&&d.css("width","100%"),b=k.buttonSelector+", "+k.buttonSelector+" .touch-button",a(b).removeClass("active"),a(".one-page li a").on("click",function(){return c.removeClass("flexnav-show")});if(a(window).width()>e){if(c.removeClass("sm-screen").addClass("lg-screen"),k.calcItemWidths===!0&&d.css("width",g),c.removeClass("flexnav-show").find(".item-with-ul").on(),a(".item-with-ul").find("ul").removeClass("flexnav-show"),i(),k.hoverIntent===!0)return a(".item-with-ul").hoverIntent({over:l,out:i,timeout:k.hoverIntentTimeout});if(k.hoverIntent===!1)return a(".item-with-ul").on("mouseenter",l).on("mouseleave",i)}},a(k.buttonSelector).data("navEl",c),n=".item-with-ul, "+k.buttonSelector,a(n).append(''),m=k.buttonSelector+", "+k.buttonSelector+" .touch-button",a(m).on("click",function(b){var c,d,e;return a(m).toggleClass("active"),b.preventDefault(),b.stopPropagation(),e=k.buttonSelector,c=a(this).is(e)?a(this):a(this).parent(e),d=c.data("navEl"),d.toggleClass("flexnav-show")}),a(".touch-button").on("click",function(){var b,d;return b=a(this).parent(".item-with-ul").find(">ul"),d=a(this).parent(".item-with-ul").find(">span.touch-button"),c.hasClass("lg-screen")===!0&&a(this).parent(".item-with-ul").siblings().find("ul.flexnav-show").removeClass("flexnav-show").hide(),b.hasClass("flexnav-show")===!0?(b.removeClass("flexnav-show").slideUp(k.animationSpeed),d.removeClass("active")):b.hasClass("flexnav-show")===!1?(b.addClass("flexnav-show").slideDown(k.animationSpeed),d.addClass("active")):void 0}),c.find(".item-with-ul *").focus(function(){return a(this).parent(".item-with-ul").parent().find(".open").not(this).removeClass("open").hide(),a(this).parent(".item-with-ul").find(">ul").addClass("open").show()}),j(),a(window).on("resize",j)}}.call(this); (function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,i){t.fn[e]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1),a=0,u=this.length;u>a;a++){var p=this[a],h=t.data(p,e);if(h)if(t.isFunction(h[n])&&"_"!==n.charAt(0)){var f=h[n].apply(h,s);if(void 0!==f)return f}else r("no such method '"+n+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=t.data(this,e);o?(o.option(n),o._init()):(o=new i(this,n),t.data(this,e,o))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),n(t,e)},t.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i(t.jQuery)})(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():r.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==n.readyState;if(!e.isReady&&!i){e.isReady=!0;for(var o=0,s=r.length;s>o;o++){var a=r[o];a()}}}function o(o){return o.bind(n,"DOMContentLoaded",i),o.bind(n,"readystatechange",i),o.bind(t,"load",i),e}var n=t.document,r=[];e.isReady=!1,"function"==typeof define&&define.amd?(e.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],o)):t.docReady=o(t.eventie)}(this),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,n=this,r=n.EventEmitter;o.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},o.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},o.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},o.addListener=function(t,i){var o,n=this.getListenersAsObject(t),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===e(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,i){var o,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(o=e(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(t,e){var i,o,n,r,s=this.getListenersAsObject(t);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var o=s[e];t[o]=0}return t}function o(t){function o(t){if("string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var o=r(t);if("none"===o.display)return i();var n={};n.width=t.offsetWidth,n.height=t.offsetHeight;for(var h=n.isBorderBox=!(!p||!o[p]||"border-box"!==o[p]),f=0,d=s.length;d>f;f++){var l=s[f],c=o[l];c=a(t,c);var y=parseFloat(c);n[l]=isNaN(y)?0:y}var m=n.paddingLeft+n.paddingRight,g=n.paddingTop+n.paddingBottom,v=n.marginLeft+n.marginRight,_=n.marginTop+n.marginBottom,I=n.borderLeftWidth+n.borderRightWidth,L=n.borderTopWidth+n.borderBottomWidth,z=h&&u,S=e(o.width);S!==!1&&(n.width=S+(z?0:m+I));var b=e(o.height);return b!==!1&&(n.height=b+(z?0:g+L)),n.innerWidth=n.width-(m+I),n.innerHeight=n.height-(g+L),n.outerWidth=n.width+v,n.outerHeight=n.height+_,n}}function a(t,e){if(n||-1===e.indexOf("%"))return e;var i=t.style,o=i.left,r=t.runtimeStyle,s=r&&r.left;return s&&(r.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=o,s&&(r.left=s),e}var u,p=t("boxSizing");return function(){if(p){var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style[p]="border-box";var i=document.body||document.documentElement;i.appendChild(t);var o=r(t);u=200===e(o.width),i.removeChild(t)}}(),o}var n=t.getComputedStyle,r=n?function(t){return n(t,null)}:function(t){return t.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],o):"object"==typeof exports?module.exports=o(require("get-style-property")):t.getSize=o(t.getStyleProperty)}(window),function(t,e){function i(t,e){return t[a](e)}function o(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function n(t,e){o(t);for(var i=t.parentNode.querySelectorAll(e),n=0,r=i.length;r>n;n++)if(i[n]===t)return!0;return!1}function r(t,e){return o(t),i(t,e)}var s,a=function(){if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],i=0,o=t.length;o>i;i++){var n=t[i],r=n+"MatchesSelector";if(e[r])return r}}();if(a){var u=document.createElement("div"),p=i(u,"div");s=p?i:r}else s=n;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return s}):window.matchesSelector=s}(this,Element.prototype),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){for(var e in t)return!1;return e=null,!0}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function n(t,n,r){function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=r("transition"),p=r("transform"),h=u&&p,f=!!r("perspective"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],l=["transform","transition","transitionDuration","transitionProperty"],c=function(){for(var t={},e=0,i=l.length;i>e;e++){var o=l[e],n=r(o);n&&n!==o&&(t[o]=n)}return t}();e(a.prototype,t.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var i in t){var o=c[i]||i;e[o]=t[i]}},a.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,o=e.isOriginTop,n=parseInt(t[i?"left":"right"],10),r=parseInt(t[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var a=this.layout.size;n-=i?a.paddingLeft:a.paddingRight,r-=o?a.paddingTop:a.paddingBottom,this.position.x=n,this.position.y=r},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var y=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),r=parseInt(e,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,u=e-o,p={},h=this.layout.options;a=h.isOriginLeft?a:-a,u=h.isOriginTop?u:-u,p.transform=y(a,u),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=h?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var m=p&&o(p)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(d,this,!1))},a.prototype.transition=a.prototype[u?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(d,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(v)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=t.getComputedStyle,s=r?function(t){return r(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],n):(t.Outlayer={},t.Outlayer.Item=n(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===f.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=l(e,t);-1!==i&&e.splice(i,1)}function r(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function s(i,s,f,l,c,y){function m(t,i){if("string"==typeof t&&(t=a.querySelector(t)),!t||!d(t))return u&&u.error("Bad "+this.constructor.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.constructor.defaults),this.option(i);var o=++g;this.element.outlayerGUID=o,v[o]=this,this._create(),this.options.isInitLayout&&this.layout()}var g=0,v={};return m.namespace="outlayer",m.Item=y,m.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(m.prototype,f.prototype),m.prototype.option=function(t){e(this.options,t)},m.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},m.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},m.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0,r=e.length;r>n;n++){var s=e[n],a=new i(s,this);o.push(a)}return o},m.prototype._filterFindItemElements=function(t){t=o(t);for(var e=this.options.itemSelector,i=[],n=0,r=t.length;r>n;n++){var s=t[n];if(d(s))if(e){c(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),u=0,p=a.length;p>u;u++)i.push(a[u])}else i.push(s)}return i},m.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},m.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},m.prototype._init=m.prototype.layout,m.prototype._resetLayout=function(){this.getSize()},m.prototype.getSize=function(){this.size=l(this.element)},m.prototype._getMeasurement=function(t,e){var i,o=this.options[t];o?("string"==typeof o?i=this.element.querySelector(o):d(o)&&(i=o),this[t]=i?l(i)[e]:o):this[t]=0},m.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},m.prototype._getItemsForLayout=function(t){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i];n.isIgnored||e.push(n)}return e},m.prototype._layoutItems=function(t,e){function i(){o.emitEvent("layoutComplete",[o,t])}var o=this;if(!t||!t.length)return i(),void 0;this._itemsOn(t,"layout",i);for(var n=[],r=0,s=t.length;s>r;r++){var a=t[r],u=this._getItemLayoutPosition(a);u.item=a,u.isInstant=e||a.isLayoutInstant,n.push(u)}this._processLayoutQueue(n)},m.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},m.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];this._positionItem(o.item,o.x,o.y,o.isInstant)}},m.prototype._positionItem=function(t,e,i,o){o?t.goTo(e,i):t.moveTo(e,i)},m.prototype._postLayout=function(){this.resizeContainer()},m.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},m.prototype._getContainerSize=h,m.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},m.prototype._itemsOn=function(t,e,i){function o(){return n++,n===r&&i.call(s),!0}for(var n=0,r=t.length,s=this,a=0,u=t.length;u>a;a++){var p=t[a];p.on(e,o)}},m.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},m.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},m.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var o=t[e];this.ignore(o)}}},m.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var o=t[e];n(o,this.stamps),this.unignore(o)}},m.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o(t)):void 0},m.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},m.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},m.prototype._manageStamp=h,m.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=l(t),n={left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom};return n},m.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},m.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},m.prototype.unbindResize=function(){this.isResizeBound&&i.unbind(t,"resize",this),this.isResizeBound=!1},m.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},m.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},m.prototype.needsResizeLayout=function(){var t=l(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},m.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},m.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},m.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},m.prototype.reveal=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.reveal()}},m.prototype.hide=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.hide()}},m.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];if(o.element===t)return o}},m.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i],r=this.getItem(n);r&&e.push(r)}return e}},m.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,r=e.length;r>i;i++){var s=e[i];s.remove(),n(s,this.items)}}},m.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];o.destroy()}this.unbindResize(),delete this.element.outlayerGUID,p&&p.removeData(this.element,this.constructor.namespace)},m.data=function(t){var e=t&&t.outlayerGUID;return e&&v[e]},m.create=function(t,i){function o(){m.apply(this,arguments)}return Object.create?o.prototype=Object.create(m.prototype):e(o.prototype,m.prototype),o.prototype.constructor=o,o.defaults=e({},m.defaults),e(o.defaults,i),o.prototype.settings={},o.namespace=t,o.data=m.data,o.Item=function(){y.apply(this,arguments)},o.Item.prototype=new y,s(function(){for(var e=r(t),i=a.querySelectorAll(".js-"+e),n="data-"+e+"-options",s=0,h=i.length;h>s;s++){var f,d=i[s],l=d.getAttribute(n);try{f=l&&JSON.parse(l)}catch(c){u&&u.error("Error parsing "+n+" on "+d.nodeName.toLowerCase()+(d.id?"#"+d.id:"")+": "+c);continue}var y=new o(d,f);p&&p.data(d,t,y)}}),p&&p.bridget&&p.bridget(t,o),o},m.Item=y,m}var a=t.document,u=t.console,p=t.jQuery,h=function(){},f=Object.prototype.toString,d="object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},l=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):t.Outlayer=s(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){function e(t){function e(){t.Item.apply(this,arguments)}e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var i=e.prototype.destroy;return e.prototype.destroy=function(){i.apply(this,arguments),this.css({display:""})},e}"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window),function(t){function e(t,e){function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],n=0,r=o.length;r>n;n++){var s=o[n];i.prototype[s]=t(s)}}(),i.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!==this.isotope.size.innerHeight},i.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},i.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},i.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},i.prototype.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},i.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},i.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},i.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=new i,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window),function(t){function e(t,e){var o=t.create("masonry");return o.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},o.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},o.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,o=e&&1>e?"round":"ceil",n=Math[o](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this._getColGroup(n),s=Math.min.apply(Math,r),a=i(r,s),u={x:this.columnWidth*a,y:s},p=s+t.size.outerHeight,h=this.cols+1-r.length,f=0;h>f;f++)this.colYs[a+f]=p;return u},o.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;i>o;o++){var n=this.colYs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this.options.isOriginLeft?o.left:o.right,r=n+i.outerWidth,s=Math.floor(n/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?o.top:o.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(u,this.colYs[p])},o.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},o.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},o}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++){var n=t[i];if(n===e)return i}return-1};"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],e):t.Masonry=e(t.Outlayer,t.getSize)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i){var o=t.create("masonry"),n=o.prototype._getElementOffset,r=o.prototype.layout,s=o.prototype._getMeasurement;e(o.prototype,i.prototype),o.prototype._getElementOffset=n,o.prototype.layout=r,o.prototype._getMeasurement=s;var a=o.prototype.measureColumns;o.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,a.call(this)};var u=o.prototype._manageStamp;return o.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},o}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],i):i(t.Isotope.LayoutMode,t.Masonry)}(window),function(t){function e(t){var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0},e.prototype._getItemLayoutPosition=function(t){t.getSize(),0!==this.x&&t.size.outerWidth+this.x>this.isotope.size.innerWidth&&(this.x=0,this.y=this.maxY);var e={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=t.size.outerWidth,e},e.prototype._getContainerSize=function(){return{height:this.maxY}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t){var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},e.prototype._getContainerSize=function(){return{height:this.y}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===h.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=f(e,t);-1!==i&&e.splice(i,1)}function r(t,i,r,u,h){function f(t,e){return function(i,o){for(var n=0,r=t.length;r>n;n++){var s=t[n],a=i.sortData[s],u=o.sortData[s];if(a>u||u>a){var p=void 0!==e[s]?e[s]:e,h=p?1:-1;return(a>u?1:-1)*h}}return 0}}var d=t.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=u,d.LayoutMode=h,d.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),t.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var e in h.modes)this._initLayoutMode(e)},d.prototype.reloadItems=function(){this.itemGUID=0,t.prototype.reloadItems.call(this)},d.prototype._itemize=function(){for(var e=t.prototype._itemize.apply(this,arguments),i=0,o=e.length;o>i;i++){var n=e[i];n.id=this.itemGUID++}return this._updateItemsSortData(e),e},d.prototype._initLayoutMode=function(t){var i=h.modes[t],o=this.options[t]||{};this.options[t]=i.options?e(i.options,o):o,this.modes[t]=new i(this)},d.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},d.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},d.prototype.arrange=function(t){this.option(t),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},d.prototype._init=d.prototype.arrange,d.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},d.prototype._filter=function(t){function e(){f.reveal(n),f.hide(r)}var i=this.options.filter;i=i||"*";for(var o=[],n=[],r=[],s=this._getFilterTest(i),a=0,u=t.length;u>a;a++){var p=t[a];if(!p.isIgnored){var h=s(p);h&&o.push(p),h&&p.isHidden?n.push(p):h||p.isHidden||r.push(p)}}var f=this;return this._isInstant?this._noTransition(e):e(),o},d.prototype._getFilterTest=function(t){return s&&this.options.isJQueryFiltering?function(e){return s(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},d.prototype.updateSortData=function(t){this._getSorters(),t=o(t); var e=this.getItems(t);e=e.length?e:this.items,this._updateItemsSortData(e)},d.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=l(i)}},d.prototype._updateItemsSortData=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];o.updateSortData()}};var l=function(){function t(t){if("string"!=typeof t)return t;var i=a(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),u=d.sortDataParsers[i[1]];return t=u?function(t){return t&&u(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&p(i)}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},d.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=f(e,this.options.sortAscending);this.filteredItems.sort(i),t!==this.sortHistory[0]&&this.sortHistory.unshift(t)}},d.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},d.prototype._resetLayout=function(){t.prototype._resetLayout.call(this),this._mode()._resetLayout()},d.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},d.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},d.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},d.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},d.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},d.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps();var o=this._filterRevealAdded(e);this.layoutItems(i),this.filteredItems=o.concat(this.filteredItems)}},d.prototype._filterRevealAdded=function(t){var e=this._noTransition(function(){return this._filter(t)});return this.layoutItems(e,!0),this.reveal(e),t},d.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e);for(this._noTransition(function(){this.hide(r)}),i=0;n>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;n>i;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var c=d.prototype.remove;return d.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(c.call(this,t),e&&e.length)for(var i=0,r=e.length;r>i;i++){var s=e[i];n(s,this.filteredItems)}},d.prototype.shuffle=function(){for(var t=0,e=this.items.length;e>t;t++){var i=this.items[t];i.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},d.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var i=t.call(this);return this.options.transitionDuration=e,i},d.prototype.getFilteredItemElements=function(){for(var t=[],e=0,i=this.filteredItems.length;i>e;e++)t.push(this.filteredItems[e].element);return t},d}var s=t.jQuery,a=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=document.documentElement,p=u.textContent?function(t){return t.textContent}:function(t){return t.innerText},h=Object.prototype.toString,f=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],r):t.Isotope=r(t.Outlayer,t.getSize,t.matchesSelector,t.Isotope.Item,t.Isotope.LayoutMode)}(window); (function(c,q){var m="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";c.fn.imagesLoaded=function(f){function n(){var b=c(j),a=c(h);d&&(h.length?d.reject(e,b,a):d.resolve(e));c.isFunction(f)&&f.call(g,e,b,a)}function p(b){k(b.target,"error"===b.type)}function k(b,a){b.src===m||-1!==c.inArray(b,l)||(l.push(b),a?h.push(b):j.push(b),c.data(b,"imagesLoaded",{isBroken:a,src:b.src}),r&&d.notifyWith(c(b),[a,e,c(j),c(h)]),e.length===l.length&&(setTimeout(n),e.unbind(".imagesLoaded", p)))}var g=this,d=c.isFunction(c.Deferred)?c.Deferred():0,r=c.isFunction(d.notify),e=g.find("img").add(g.filter("img")),l=[],j=[],h=[];c.isPlainObject(f)&&c.each(f,function(b,a){if("callback"===b)f=a;else if(d)d[b](a)});e.length?e.bind("load.imagesLoaded error.imagesLoaded",p).each(function(b,a){var d=a.src,e=c.data(a,"imagesLoaded");if(e&&e.src===d)k(a,e.isBroken);else if(a.complete&&a.naturalWidth!==q)k(a,0===a.naturalWidth||0===a.naturalHeight);else if(a.readyState||a.complete)a.src=m,a.src=d}): n();return d?d.promise(g):g}})(jQuery); (function($){ "use strict"; $.fn.fitVids=function(options){ var settings={ customSelector: null }; if(!document.getElementById('fit-vids-style')){ var head=document.head||document.getElementsByTagName('head')[0]; var css='.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; var div=document.createElement('div'); div.innerHTML='

    x

    '; head.appendChild(div.childNodes[1]); } if(options){ $.extend(settings, options); } return this.each(function(){ var selectors=[ "iframe[src*='player.vimeo.com']", "iframe[src*='youtube.com']", "iframe[src*='youtube-nocookie.com']", "iframe[src*='kickstarter.com'][src*='video.html']", "object", "embed" ]; if(settings.customSelector){ selectors.push(settings.customSelector); } var $allVideos=$(this).find(selectors.join(',')); $allVideos=$allVideos.not("object object"); $allVideos.each(function(){ var $this=$(this); if(this.tagName.toLowerCase()==='embed'&&$this.parent('object').length||$this.parent('.fluid-width-video-wrapper').length){ return; } var height=(this.tagName.toLowerCase()==='object'||($this.attr('height')&&!isNaN(parseInt($this.attr('height'), 10)))) ? parseInt($this.attr('height'), 10):$this.height(), width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10):$this.width(), aspectRatio=height / width; if(!$this.attr('id')){ var videoID='fitvid' + Math.floor(Math.random()*999999); $this.attr('id', videoID); } $this.wrap('
    ').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); $this.removeAttr('height').removeAttr('width'); }); }); };})(window.jQuery||window.Zepto); (function($){ $.fn.jflickrfeed=function(settings, callback){ settings=$.extend(true, { flickrbase: 'https://api.flickr.com/services/feeds/', feedapi: 'photos_public.gne', limit: 20, qstrings: { lang: 'en-us', format: 'json', jsoncallback: '?' }, cleanDescription: true, useTemplate: true, itemTemplate: '', itemCallback: function(){}}, settings); var url=settings.flickrbase + settings.feedapi + '?', first=true, key; for (key in settings.qstrings){ if(!first){ url +='&'; } url +=key + '=' + settings.qstrings[key]; first=false; } return $(this).each(function(){ var $container=$(this), container=this; $.getJSON(url, function(data){ $.each(data.items, function(i, item){ var regex, input, key, template; if(i < settings.limit){ if(settings.cleanDescription){ regex=/

    (.*?)<\/p>/g; input=item.description; if(regex.test(input)){ item.description=input.match(regex)[2]; if(item.description!==undefined){ item.description=item.description.replace('

    ', '').replace('

    ', ''); }} } item.image_s=item.media.m.replace('_m', '_s'); item.image_t=item.media.m.replace('_m', '_t'); item.image_m=item.media.m.replace('_m', '_m'); item.image=item.media.m.replace('_m', ''); item.image_b=item.media.m.replace('_m', '_b'); item.image_q=item.media.m.replace('_m', '_q'); delete item.media; if(settings.useTemplate){ template=settings.itemTemplate; for (key in item){ regex=new RegExp('{{' + key + '}}', 'g'); template=template.replace(regex, item[key]); } $container.append(template); } settings.itemCallback.call(container, item); }}); if($.isFunction(callback)){ callback.call(container, data); }}); }); };})(jQuery); if(typeof Object.create!=="function"){ Object.create=function (obj){ function F(){} F.prototype=obj; return new F(); };} (function ($, window, document){ var Carousel={ init:function (options, el){ var base=this; base.$elem=$(el); base.options=$.extend({}, $.fn.owlCarousel.options, base.$elem.data(), options); base.userOptions=options; base.loadContent(); }, loadContent:function (){ var base=this, url; function getData(data){ var i, content=""; if(typeof base.options.jsonSuccess==="function"){ base.options.jsonSuccess.apply(this, [data]); }else{ for (i in data.owl){ if(data.owl.hasOwnProperty(i)){ content +=data.owl[i].item; }} base.$elem.html(content); } base.logIn(); } if(typeof base.options.beforeInit==="function"){ base.options.beforeInit.apply(this, [base.$elem]); } if(typeof base.options.jsonPath==="string"){ url=base.options.jsonPath; $.getJSON(url, getData); }else{ base.logIn(); }}, logIn:function (){ var base=this; base.$elem.data("owl-originalStyles", base.$elem.attr("style")) .data("owl-originalClasses", base.$elem.attr("class")); base.$elem.css({opacity: 0}); base.orignalItems=base.options.items; base.checkBrowser(); base.wrapperWidth=0; base.checkVisible=null; base.setVars(); }, setVars:function (){ var base=this; if(base.$elem.children().length===0){return false; } base.baseClass(); base.eventTypes(); base.$userItems=base.$elem.children(); base.itemsAmount=base.$userItems.length; base.wrapItems(); base.$owlItems=base.$elem.find(".owl-item"); base.$owlWrapper=base.$elem.find(".owl-wrapper"); base.playDirection="next"; base.prevItem=0; base.prevArr=[0]; base.currentItem=0; base.customEvents(); base.onStartup(); }, onStartup:function (){ var base=this; base.updateItems(); base.calculateAll(); base.buildControls(); base.updateControls(); base.response(); base.moveEvents(); base.stopOnHover(); base.owlStatus(); if(base.options.transitionStyle!==false){ base.transitionTypes(base.options.transitionStyle); } if(base.options.autoPlay===true){ base.options.autoPlay=5000; } base.play(); base.$elem.find(".owl-wrapper").css("display", "block"); if(!base.$elem.is(":visible")){ base.watchVisibility(); }else{ base.$elem.css("opacity", 1); } base.onstartup=false; base.eachMoveUpdate(); if(typeof base.options.afterInit==="function"){ base.options.afterInit.apply(this, [base.$elem]); }}, eachMoveUpdate:function (){ var base=this; if(base.options.lazyLoad===true){ base.lazyLoad(); } if(base.options.autoHeight===true){ base.autoHeight(); } base.onVisibleItems(); if(typeof base.options.afterAction==="function"){ base.options.afterAction.apply(this, [base.$elem]); }}, updateVars:function (){ var base=this; if(typeof base.options.beforeUpdate==="function"){ base.options.beforeUpdate.apply(this, [base.$elem]); } base.watchVisibility(); base.updateItems(); base.calculateAll(); base.updatePosition(); base.updateControls(); base.eachMoveUpdate(); if(typeof base.options.afterUpdate==="function"){ base.options.afterUpdate.apply(this, [base.$elem]); }}, reload:function (){ var base=this; window.setTimeout(function (){ base.updateVars(); }, 0); }, watchVisibility:function (){ var base=this; if(base.$elem.is(":visible")===false){ base.$elem.css({opacity: 0}); window.clearInterval(base.autoPlayInterval); window.clearInterval(base.checkVisible); }else{ return false; } base.checkVisible=window.setInterval(function (){ if(base.$elem.is(":visible")){ base.reload(); base.$elem.animate({opacity: 1}, 200); window.clearInterval(base.checkVisible); }}, 500); }, wrapItems:function (){ var base=this; base.$userItems.wrapAll("
    ").wrap("
    "); base.$elem.find(".owl-wrapper").wrap("
    "); base.wrapperOuter=base.$elem.find(".owl-wrapper-outer"); base.$elem.css("display", "block"); }, baseClass:function (){ var base=this, hasBaseClass=base.$elem.hasClass(base.options.baseClass), hasThemeClass=base.$elem.hasClass(base.options.theme); if(!hasBaseClass){ base.$elem.addClass(base.options.baseClass); } if(!hasThemeClass){ base.$elem.addClass(base.options.theme); }}, updateItems:function (){ var base=this, width, i; if(base.options.responsive===false){ return false; } if(base.options.singleItem===true){ base.options.items=base.orignalItems=1; base.options.itemsCustom=false; base.options.itemsDesktop=false; base.options.itemsDesktopSmall=false; base.options.itemsTablet=false; base.options.itemsTabletSmall=false; base.options.itemsMobile=false; return false; } width=$(base.options.responsiveBaseWidth).width(); if(width > (base.options.itemsDesktop[0]||base.orignalItems)){ base.options.items=base.orignalItems; } if(base.options.itemsCustom!==false){ base.options.itemsCustom.sort(function (a, b){return a[0] - b[0]; }); for (i=0; i < base.options.itemsCustom.length; i +=1){ if(base.options.itemsCustom[i][0] <=width){ base.options.items=base.options.itemsCustom[i][1]; }} }else{ if(width <=base.options.itemsDesktop[0]&&base.options.itemsDesktop!==false){ base.options.items=base.options.itemsDesktop[1]; } if(width <=base.options.itemsDesktopSmall[0]&&base.options.itemsDesktopSmall!==false){ base.options.items=base.options.itemsDesktopSmall[1]; } if(width <=base.options.itemsTablet[0]&&base.options.itemsTablet!==false){ base.options.items=base.options.itemsTablet[1]; } if(width <=base.options.itemsTabletSmall[0]&&base.options.itemsTabletSmall!==false){ base.options.items=base.options.itemsTabletSmall[1]; } if(width <=base.options.itemsMobile[0]&&base.options.itemsMobile!==false){ base.options.items=base.options.itemsMobile[1]; }} if(base.options.items > base.itemsAmount&&base.options.itemsScaleUp===true){ base.options.items=base.itemsAmount; }}, response:function (){ var base=this, smallDelay, lastWindowWidth; if(base.options.responsive!==true){ return false; } lastWindowWidth=$(window).width(); base.resizer=function (){ if($(window).width()!==lastWindowWidth){ if(base.options.autoPlay!==false){ window.clearInterval(base.autoPlayInterval); } window.clearTimeout(smallDelay); smallDelay=window.setTimeout(function (){ lastWindowWidth=$(window).width(); base.updateVars(); }, base.options.responsiveRefreshRate); }}; $(window).resize(base.resizer); }, updatePosition:function (){ var base=this; base.jumpTo(base.currentItem); if(base.options.autoPlay!==false){ base.checkAp(); }}, appendItemsSizes:function (){ var base=this, roundPages=0, lastItem=base.itemsAmount - base.options.items; base.$owlItems.each(function (index){ var $this=$(this); $this .css({"width": base.itemWidth}) .data("owl-item", Number(index)); if(index % base.options.items===0||index===lastItem){ if(!(index > lastItem)){ roundPages +=1; }} $this.data("owl-roundPages", roundPages); }); }, appendWrapperSizes:function (){ var base=this, width=base.$owlItems.length * base.itemWidth; base.$owlWrapper.css({ "width": width * 2, "left": 0 }); base.appendItemsSizes(); }, calculateAll:function (){ var base=this; base.calculateWidth(); base.appendWrapperSizes(); base.loops(); base.max(); }, calculateWidth:function (){ var base=this; base.itemWidth=Math.round(base.$elem.width() / base.options.items); }, max:function (){ var base=this, maximum=((base.itemsAmount * base.itemWidth) - base.options.items * base.itemWidth) * -1; if(base.options.items > base.itemsAmount){ base.maximumItem=0; maximum=0; base.maximumPixels=0; }else{ base.maximumItem=base.itemsAmount - base.options.items; base.maximumPixels=maximum; } return maximum; }, min:function (){ return 0; }, loops:function (){ var base=this, prev=0, elWidth=0, i, item, roundPageNum; base.positionsInArray=[0]; base.pagesInArray=[]; for (i=0; i < base.itemsAmount; i +=1){ elWidth +=base.itemWidth; base.positionsInArray.push(-elWidth); if(base.options.scrollPerPage===true){ item=$(base.$owlItems[i]); roundPageNum=item.data("owl-roundPages"); if(roundPageNum!==prev){ base.pagesInArray[prev]=base.positionsInArray[i]; prev=roundPageNum; }} }}, buildControls:function (){ var base=this; if(base.options.navigation===true||base.options.pagination===true){ base.owlControls=$("
    ").toggleClass("clickable", !base.browser.isTouch).appendTo(base.$elem); } if(base.options.pagination===true){ base.buildPagination(); } if(base.options.navigation===true){ base.buildButtons(); }}, buildButtons:function (){ var base=this, buttonsWrapper=$("
    "); base.owlControls.append(buttonsWrapper); base.buttonPrev=$("
    ", { "class":"owl-prev", "html":base.options.navigationText[0]||"" }); base.buttonNext=$("
    ", { "class":"owl-next", "html":base.options.navigationText[1]||"" }); buttonsWrapper .append(base.buttonPrev) .append(base.buttonNext); buttonsWrapper.on("touchstart.owlControls mousedown.owlControls", "div[class^=\"owl\"]", function (event){ event.preventDefault(); }); buttonsWrapper.on("touchend.owlControls mouseup.owlControls", "div[class^=\"owl\"]", function (event){ event.preventDefault(); if($(this).hasClass("owl-next")){ base.next(); }else{ base.prev(); }}); }, buildPagination:function (){ var base=this; base.paginationWrapper=$("
    "); base.owlControls.append(base.paginationWrapper); base.paginationWrapper.on("touchend.owlControls mouseup.owlControls", ".owl-page", function (event){ event.preventDefault(); if(Number($(this).data("owl-page"))!==base.currentItem){ base.goTo(Number($(this).data("owl-page")), true); }}); }, updatePagination:function (){ var base=this, counter, lastPage, lastItem, i, paginationButton, paginationButtonInner; if(base.options.pagination===false){ return false; } base.paginationWrapper.html(""); counter=0; lastPage=base.itemsAmount - base.itemsAmount % base.options.items; for (i=0; i < base.itemsAmount; i +=1){ if(i % base.options.items===0){ counter +=1; if(lastPage===i){ lastItem=base.itemsAmount - base.options.items; } paginationButton=$("
    ", { "class":"owl-page" }); paginationButtonInner=$("", { "text": base.options.paginationNumbers===true ? counter:"", "class": base.options.paginationNumbers===true ? "owl-numbers":"" }); paginationButton.append(paginationButtonInner); paginationButton.data("owl-page", lastPage===i ? lastItem:i); paginationButton.data("owl-roundPages", counter); base.paginationWrapper.append(paginationButton); }} base.checkPagination(); }, checkPagination:function (){ var base=this; if(base.options.pagination===false){ return false; } base.paginationWrapper.find(".owl-page").each(function (){ if($(this).data("owl-roundPages")===$(base.$owlItems[base.currentItem]).data("owl-roundPages")){ base.paginationWrapper .find(".owl-page") .removeClass("active"); $(this).addClass("active"); }}); }, checkNavigation:function (){ var base=this; if(base.options.navigation===false){ return false; } if(base.options.rewindNav===false){ if(base.currentItem===0&&base.maximumItem===0){ base.buttonPrev.addClass("disabled"); base.buttonNext.addClass("disabled"); }else if(base.currentItem===0&&base.maximumItem!==0){ base.buttonPrev.addClass("disabled"); base.buttonNext.removeClass("disabled"); }else if(base.currentItem===base.maximumItem){ base.buttonPrev.removeClass("disabled"); base.buttonNext.addClass("disabled"); }else if(base.currentItem!==0&&base.currentItem!==base.maximumItem){ base.buttonPrev.removeClass("disabled"); base.buttonNext.removeClass("disabled"); }} }, updateControls:function (){ var base=this; base.updatePagination(); base.checkNavigation(); if(base.owlControls){ if(base.options.items >=base.itemsAmount){ base.owlControls.hide(); }else{ base.owlControls.show(); }} }, destroyControls:function (){ var base=this; if(base.owlControls){ base.owlControls.remove(); }}, next:function (speed){ var base=this; if(base.isTransition){ return false; } base.currentItem +=base.options.scrollPerPage===true ? base.options.items:1; if(base.currentItem > base.maximumItem + (base.options.scrollPerPage===true ? (base.options.items - 1):0)){ if(base.options.rewindNav===true){ base.currentItem=0; speed="rewind"; }else{ base.currentItem=base.maximumItem; return false; }} base.goTo(base.currentItem, speed); }, prev:function (speed){ var base=this; if(base.isTransition){ return false; } if(base.options.scrollPerPage===true&&base.currentItem > 0&&base.currentItem < base.options.items){ base.currentItem=0; }else{ base.currentItem -=base.options.scrollPerPage===true ? base.options.items:1; } if(base.currentItem < 0){ if(base.options.rewindNav===true){ base.currentItem=base.maximumItem; speed="rewind"; }else{ base.currentItem=0; return false; }} base.goTo(base.currentItem, speed); }, goTo:function (position, speed, drag){ var base=this, goToPixel; if(base.isTransition){ return false; } if(typeof base.options.beforeMove==="function"){ base.options.beforeMove.apply(this, [base.$elem]); } if(position >=base.maximumItem){ position=base.maximumItem; }else if(position <=0){ position=0; } base.currentItem=base.owl.currentItem=position; if(base.options.transitionStyle!==false&&drag!=="drag"&&base.options.items===1&&base.browser.support3d===true){ base.swapSpeed(0); if(base.browser.support3d===true){ base.transition3d(base.positionsInArray[position]); }else{ base.css2slide(base.positionsInArray[position], 1); } base.afterGo(); base.singleItemTransition(); return false; } goToPixel=base.positionsInArray[position]; if(base.browser.support3d===true){ base.isCss3Finish=false; if(speed===true){ base.swapSpeed("paginationSpeed"); window.setTimeout(function (){ base.isCss3Finish=true; }, base.options.paginationSpeed); }else if(speed==="rewind"){ base.swapSpeed(base.options.rewindSpeed); window.setTimeout(function (){ base.isCss3Finish=true; }, base.options.rewindSpeed); }else{ base.swapSpeed("slideSpeed"); window.setTimeout(function (){ base.isCss3Finish=true; }, base.options.slideSpeed); } base.transition3d(goToPixel); }else{ if(speed===true){ base.css2slide(goToPixel, base.options.paginationSpeed); }else if(speed==="rewind"){ base.css2slide(goToPixel, base.options.rewindSpeed); }else{ base.css2slide(goToPixel, base.options.slideSpeed); }} base.afterGo(); }, jumpTo:function (position){ var base=this; if(typeof base.options.beforeMove==="function"){ base.options.beforeMove.apply(this, [base.$elem]); } if(position >=base.maximumItem||position===-1){ position=base.maximumItem; }else if(position <=0){ position=0; } base.swapSpeed(0); if(base.browser.support3d===true){ base.transition3d(base.positionsInArray[position]); }else{ base.css2slide(base.positionsInArray[position], 1); } base.currentItem=base.owl.currentItem=position; base.afterGo(); }, afterGo:function (){ var base=this; base.prevArr.push(base.currentItem); base.prevItem=base.owl.prevItem=base.prevArr[base.prevArr.length - 2]; base.prevArr.shift(0); if(base.prevItem!==base.currentItem){ base.checkPagination(); base.checkNavigation(); base.eachMoveUpdate(); if(base.options.autoPlay!==false){ base.checkAp(); }} if(typeof base.options.afterMove==="function"&&base.prevItem!==base.currentItem){ base.options.afterMove.apply(this, [base.$elem]); }}, stop:function (){ var base=this; base.apStatus="stop"; window.clearInterval(base.autoPlayInterval); }, checkAp:function (){ var base=this; if(base.apStatus!=="stop"){ base.play(); }}, play:function (){ var base=this; base.apStatus="play"; if(base.options.autoPlay===false){ return false; } window.clearInterval(base.autoPlayInterval); base.autoPlayInterval=window.setInterval(function (){ base.next(true); }, base.options.autoPlay); }, swapSpeed:function (action){ var base=this; if(action==="slideSpeed"){ base.$owlWrapper.css(base.addCssSpeed(base.options.slideSpeed)); }else if(action==="paginationSpeed"){ base.$owlWrapper.css(base.addCssSpeed(base.options.paginationSpeed)); }else if(typeof action!=="string"){ base.$owlWrapper.css(base.addCssSpeed(action)); }}, addCssSpeed:function (speed){ return { "-webkit-transition": "all " + speed + "ms ease", "-moz-transition": "all " + speed + "ms ease", "-o-transition": "all " + speed + "ms ease", "transition": "all " + speed + "ms ease" };}, removeTransition:function (){ return { "-webkit-transition": "", "-moz-transition": "", "-o-transition": "", "transition": "" };}, doTranslate:function (pixels){ return { "-webkit-transform": "translate3d(" + pixels + "px, 0px, 0px)", "-moz-transform": "translate3d(" + pixels + "px, 0px, 0px)", "-o-transform": "translate3d(" + pixels + "px, 0px, 0px)", "-ms-transform": "translate3d(" + pixels + "px, 0px, 0px)", "transform": "translate3d(" + pixels + "px, 0px,0px)" };}, transition3d:function (value){ var base=this; base.$owlWrapper.css(base.doTranslate(value)); }, css2move:function (value){ var base=this; base.$owlWrapper.css({"left":value}); }, css2slide:function (value, speed){ var base=this; base.isCssFinish=false; base.$owlWrapper.stop(true, true).animate({ "left":value }, { duration:speed||base.options.slideSpeed, complete:function (){ base.isCssFinish=true; }}); }, checkBrowser:function (){ var base=this, translate3D="translate3d(0px, 0px, 0px)", tempElem=document.createElement("div"), regex, asSupport, support3d, isTouch; tempElem.style.cssText=" -moz-transform:" + translate3D + "; -ms-transform:" + translate3D + "; -o-transform:" + translate3D + "; -webkit-transform:" + translate3D + "; transform:" + translate3D; regex=/translate3d\(0px, 0px, 0px\)/g; asSupport=tempElem.style.cssText.match(regex); support3d=(asSupport!==null&&asSupport.length===1); isTouch="ontouchstart" in window||window.navigator.msMaxTouchPoints; base.browser={ "support3d":support3d, "isTouch":isTouch };}, moveEvents:function (){ var base=this; if(base.options.mouseDrag!==false||base.options.touchDrag!==false){ base.gestures(); base.disabledEvents(); }}, eventTypes:function (){ var base=this, types=["s", "e", "x"]; base.ev_types={}; if(base.options.mouseDrag===true&&base.options.touchDrag===true){ types=[ "touchstart.owl mousedown.owl", "touchmove.owl mousemove.owl", "touchend.owl touchcancel.owl mouseup.owl" ]; }else if(base.options.mouseDrag===false&&base.options.touchDrag===true){ types=[ "touchstart.owl", "touchmove.owl", "touchend.owl touchcancel.owl" ]; }else if(base.options.mouseDrag===true&&base.options.touchDrag===false){ types=[ "mousedown.owl", "mousemove.owl", "mouseup.owl" ]; } base.ev_types.start=types[0]; base.ev_types.move=types[1]; base.ev_types.end=types[2]; }, disabledEvents:function (){ var base=this; base.$elem.on("dragstart.owl", function (event){ event.preventDefault(); }); base.$elem.on("mousedown.disableTextSelect", function (e){ return $(e.target).is('input, textarea, select, option'); }); }, gestures:function (){ var base=this, locals={ offsetX:0, offsetY:0, baseElWidth:0, relativePos:0, position: null, minSwipe:null, maxSwipe: null, sliding:null, dargging: null, targetElement:null }; base.isCssFinish=true; function getTouches(event){ if(event.touches!==undefined){ return { x:event.touches[0].pageX, y:event.touches[0].pageY };} if(event.touches===undefined){ if(event.pageX!==undefined){ return { x:event.pageX, y:event.pageY };} if(event.pageX===undefined){ return { x:event.clientX, y:event.clientY };}} } function swapEvents(type){ if(type==="on"){ $(document).on(base.ev_types.move, dragMove); $(document).on(base.ev_types.end, dragEnd); }else if(type==="off"){ $(document).off(base.ev_types.move); $(document).off(base.ev_types.end); }} function dragStart(event){ var ev=event.originalEvent||event||window.event, position; if(ev.which===3){ return false; } if(base.itemsAmount <=base.options.items){ return; } if(base.isCssFinish===false&&!base.options.dragBeforeAnimFinish){ return false; } if(base.isCss3Finish===false&&!base.options.dragBeforeAnimFinish){ return false; } if(base.options.autoPlay!==false){ window.clearInterval(base.autoPlayInterval); } if(base.browser.isTouch!==true&&!base.$owlWrapper.hasClass("grabbing")){ base.$owlWrapper.addClass("grabbing"); } base.newPosX=0; base.newRelativeX=0; $(this).css(base.removeTransition()); position=$(this).position(); locals.relativePos=position.left; locals.offsetX=getTouches(ev).x - position.left; locals.offsetY=getTouches(ev).y - position.top; swapEvents("on"); locals.sliding=false; locals.targetElement=ev.target||ev.srcElement; } function dragMove(event){ var ev=event.originalEvent||event||window.event, minSwipe, maxSwipe; base.newPosX=getTouches(ev).x - locals.offsetX; base.newPosY=getTouches(ev).y - locals.offsetY; base.newRelativeX=base.newPosX - locals.relativePos; if(typeof base.options.startDragging==="function"&&locals.dragging!==true&&base.newRelativeX!==0){ locals.dragging=true; base.options.startDragging.apply(base, [base.$elem]); } if((base.newRelativeX > 8||base.newRelativeX < -8)&&(base.browser.isTouch===true)){ if(ev.preventDefault!==undefined){ ev.preventDefault(); }else{ ev.returnValue=false; } locals.sliding=true; } if((base.newPosY > 10||base.newPosY < -10)&&locals.sliding===false){ $(document).off("touchmove.owl"); } minSwipe=function (){ return base.newRelativeX / 5; }; maxSwipe=function (){ return base.maximumPixels + base.newRelativeX / 5; }; base.newPosX=Math.max(Math.min(base.newPosX, minSwipe()), maxSwipe()); if(base.browser.support3d===true){ base.transition3d(base.newPosX); }else{ base.css2move(base.newPosX); }} function dragEnd(event){ var ev=event.originalEvent||event||window.event, newPosition, handlers, owlStopEvent; ev.target=ev.target||ev.srcElement; locals.dragging=false; if(base.browser.isTouch!==true){ base.$owlWrapper.removeClass("grabbing"); } if(base.newRelativeX < 0){ base.dragDirection=base.owl.dragDirection="left"; }else{ base.dragDirection=base.owl.dragDirection="right"; } if(base.newRelativeX!==0){ newPosition=base.getNewPosition(); base.goTo(newPosition, false, "drag"); if(locals.targetElement===ev.target&&base.browser.isTouch!==true){ $(ev.target).on("click.disable", function (ev){ ev.stopImmediatePropagation(); ev.stopPropagation(); ev.preventDefault(); $(ev.target).off("click.disable"); }); handlers=$._data(ev.target, "events").click; owlStopEvent=handlers.pop(); handlers.splice(0, 0, owlStopEvent); }} swapEvents("off"); } base.$elem.on(base.ev_types.start, ".owl-wrapper", dragStart); }, getNewPosition:function (){ var base=this, newPosition=base.closestItem(); if(newPosition > base.maximumItem){ base.currentItem=base.maximumItem; newPosition=base.maximumItem; }else if(base.newPosX >=0){ newPosition=0; base.currentItem=0; } return newPosition; }, closestItem:function (){ var base=this, array=base.options.scrollPerPage===true ? base.pagesInArray:base.positionsInArray, goal=base.newPosX, closest=null; $.each(array, function (i, v){ if(goal - (base.itemWidth / 20) > array[i + 1]&&goal - (base.itemWidth / 20) < v&&base.moveDirection()==="left"){ closest=v; if(base.options.scrollPerPage===true){ base.currentItem=$.inArray(closest, base.positionsInArray); }else{ base.currentItem=i; }}else if(goal + (base.itemWidth / 20) < v&&goal + (base.itemWidth / 20) > (array[i + 1]||array[i] - base.itemWidth)&&base.moveDirection()==="right"){ if(base.options.scrollPerPage===true){ closest=array[i + 1]||array[array.length - 1]; base.currentItem=$.inArray(closest, base.positionsInArray); }else{ closest=array[i + 1]; base.currentItem=i + 1; }} }); return base.currentItem; }, moveDirection:function (){ var base=this, direction; if(base.newRelativeX < 0){ direction="right"; base.playDirection="next"; }else{ direction="left"; base.playDirection="prev"; } return direction; }, customEvents:function (){ var base=this; base.$elem.on("owl.next", function (){ base.next(); }); base.$elem.on("owl.prev", function (){ base.prev(); }); base.$elem.on("owl.play", function (event, speed){ base.options.autoPlay=speed; base.play(); base.hoverStatus="play"; }); base.$elem.on("owl.stop", function (){ base.stop(); base.hoverStatus="stop"; }); base.$elem.on("owl.goTo", function (event, item){ base.goTo(item); }); base.$elem.on("owl.jumpTo", function (event, item){ base.jumpTo(item); }); }, stopOnHover:function (){ var base=this; if(base.options.stopOnHover===true&&base.browser.isTouch!==true&&base.options.autoPlay!==false){ base.$elem.on("mouseover", function (){ base.stop(); }); base.$elem.on("mouseout", function (){ if(base.hoverStatus!=="stop"){ base.play(); }}); }}, lazyLoad:function (){ var base=this, i, $item, itemNumber, $lazyImg, follow; if(base.options.lazyLoad===false){ return false; } for (i=0; i < base.itemsAmount; i +=1){ $item=$(base.$owlItems[i]); if($item.data("owl-loaded")==="loaded"){ continue; } itemNumber=$item.data("owl-item"); $lazyImg=$item.find(".lazyOwl"); if(typeof $lazyImg.data("src")!=="string"){ $item.data("owl-loaded", "loaded"); continue; } if($item.data("owl-loaded")===undefined){ $lazyImg.hide(); $item.addClass("loading").data("owl-loaded", "checked"); } if(base.options.lazyFollow===true){ follow=itemNumber >=base.currentItem; }else{ follow=true; } if(follow&&itemNumber < base.currentItem + base.options.items&&$lazyImg.length){ base.lazyPreload($item, $lazyImg); }} }, lazyPreload:function ($item, $lazyImg){ var base=this, iterations=0, isBackgroundImg; if($lazyImg.prop("tagName")==="DIV"){ $lazyImg.css("background-image", "url(" + $lazyImg.data("src") + ")"); isBackgroundImg=true; }else{ $lazyImg[0].src=$lazyImg.data("src"); } function showImage(){ $item.data("owl-loaded", "loaded").removeClass("loading"); $lazyImg.removeAttr("data-src"); if(base.options.lazyEffect==="fade"){ $lazyImg.fadeIn(400); }else{ $lazyImg.show(); } if(typeof base.options.afterLazyLoad==="function"){ base.options.afterLazyLoad.apply(this, [base.$elem]); }} function checkLazyImage(){ iterations +=1; if(base.completeImg($lazyImg.get(0))||isBackgroundImg===true){ showImage(); }else if(iterations <=100){ window.setTimeout(checkLazyImage, 100); }else{ showImage(); }} checkLazyImage(); }, autoHeight:function (){ var base=this, $currentimg=$(base.$owlItems[base.currentItem]).find("img"), iterations; function addHeight(){ var $currentItem=$(base.$owlItems[base.currentItem]).height(); base.wrapperOuter.css("height", $currentItem + "px"); if(!base.wrapperOuter.hasClass("autoHeight")){ window.setTimeout(function (){ base.wrapperOuter.addClass("autoHeight"); }, 0); }} function checkImage(){ iterations +=1; if(base.completeImg($currentimg.get(0))){ addHeight(); }else if(iterations <=100){ window.setTimeout(checkImage, 100); }else{ base.wrapperOuter.css("height", ""); }} if($currentimg.get(0)!==undefined){ iterations=0; checkImage(); }else{ addHeight(); }}, completeImg:function (img){ var naturalWidthType; if(!img.complete){ return false; } naturalWidthType=typeof img.naturalWidth; if(naturalWidthType!=="undefined"&&img.naturalWidth===0){ return false; } return true; }, onVisibleItems:function (){ var base=this, i; if(base.options.addClassActive===true){ base.$owlItems.removeClass("active"); } base.visibleItems=[]; for (i=base.currentItem; i < base.currentItem + base.options.items; i +=1){ base.visibleItems.push(i); if(base.options.addClassActive===true){ $(base.$owlItems[i]).addClass("active"); }} base.owl.visibleItems=base.visibleItems; }, transitionTypes:function (className){ var base=this; base.outClass="owl-" + className + "-out"; base.inClass="owl-" + className + "-in"; }, singleItemTransition:function (){ var base=this, outClass=base.outClass, inClass=base.inClass, $currentItem=base.$owlItems.eq(base.currentItem), $prevItem=base.$owlItems.eq(base.prevItem), prevPos=Math.abs(base.positionsInArray[base.currentItem]) + base.positionsInArray[base.prevItem], origin=Math.abs(base.positionsInArray[base.currentItem]) + base.itemWidth / 2, animEnd='webkitAnimationEnd oAnimationEnd MSAnimationEnd animationend'; base.isTransition=true; base.$owlWrapper .addClass('owl-origin') .css({ "-webkit-transform-origin":origin + "px", "-moz-perspective-origin":origin + "px", "perspective-origin":origin + "px" }); function transStyles(prevPos){ return { "position":"relative", "left":prevPos + "px" };} $prevItem .css(transStyles(prevPos, 10)) .addClass(outClass) .on(animEnd, function (){ base.endPrev=true; $prevItem.off(animEnd); base.clearTransStyle($prevItem, outClass); }); $currentItem .addClass(inClass) .on(animEnd, function (){ base.endCurrent=true; $currentItem.off(animEnd); base.clearTransStyle($currentItem, inClass); }); }, clearTransStyle:function (item, classToRemove){ var base=this; item.css({ "position":"", "left":"" }).removeClass(classToRemove); if(base.endPrev&&base.endCurrent){ base.$owlWrapper.removeClass('owl-origin'); base.endPrev=false; base.endCurrent=false; base.isTransition=false; }}, owlStatus:function (){ var base=this; base.owl={ "userOptions":base.userOptions, "baseElement":base.$elem, "userItems":base.$userItems, "owlItems":base.$owlItems, "currentItem":base.currentItem, "prevItem":base.prevItem, "visibleItems":base.visibleItems, "isTouch":base.browser.isTouch, "browser":base.browser, "dragDirection":base.dragDirection };}, clearEvents:function (){ var base=this; base.$elem.off(".owl owl mousedown.disableTextSelect"); $(document).off(".owl owl"); $(window).off("resize", base.resizer); }, unWrap:function (){ var base=this; if(base.$elem.children().length!==0){ base.$owlWrapper.unwrap(); base.$userItems.unwrap().unwrap(); if(base.owlControls){ base.owlControls.remove(); }} base.clearEvents(); base.$elem .attr("style", base.$elem.data("owl-originalStyles")||"") .attr("class", base.$elem.data("owl-originalClasses")); }, destroy:function (){ var base=this; base.stop(); window.clearInterval(base.checkVisible); base.unWrap(); base.$elem.removeData(); }, reinit:function (newOptions){ var base=this, options=$.extend({}, base.userOptions, newOptions); base.unWrap(); base.init(options, base.$elem); }, addItem:function (htmlString, targetPosition){ var base=this, position; if(!htmlString){return false; } if(base.$elem.children().length===0){ base.$elem.append(htmlString); base.setVars(); return false; } base.unWrap(); if(targetPosition===undefined||targetPosition===-1){ position=-1; }else{ position=targetPosition; } if(position >=base.$userItems.length||position===-1){ base.$userItems.eq(-1).after(htmlString); }else{ base.$userItems.eq(position).before(htmlString); } base.setVars(); }, removeItem:function (targetPosition){ var base=this, position; if(base.$elem.children().length===0){ return false; } if(targetPosition===undefined||targetPosition===-1){ position=-1; }else{ position=targetPosition; } base.unWrap(); base.$userItems.eq(position).remove(); base.setVars(); }}; $.fn.owlCarousel=function (options){ return this.each(function (){ if($(this).data("owl-init")===true){ return false; } $(this).data("owl-init", true); var carousel=Object.create(Carousel); carousel.init(options, this); $.data(this, "owlCarousel", carousel); }); }; $.fn.owlCarousel.options={ items:5, itemsCustom:false, itemsDesktop:[1199, 4], itemsDesktopSmall:[979, 3], itemsTablet:[768, 2], itemsTabletSmall:false, itemsMobile:[479, 1], singleItem:false, itemsScaleUp:false, slideSpeed:200, paginationSpeed:800, rewindSpeed:1000, autoPlay:false, stopOnHover:false, navigation:false, navigationText:["prev", "next"], rewindNav:true, scrollPerPage:false, pagination:true, paginationNumbers:false, responsive:true, responsiveRefreshRate:200, responsiveBaseWidth:window, baseClass:"owl-carousel", theme:"owl-theme", lazyLoad:false, lazyFollow:true, lazyEffect:"fade", autoHeight:false, jsonPath:false, jsonSuccess:false, dragBeforeAnimFinish:true, mouseDrag:true, touchDrag:true, addClassActive:false, transitionStyle:false, beforeUpdate:false, afterUpdate:false, beforeInit:false, afterInit:false, beforeMove:false, afterMove:false, afterAction:false, startDragging:false, afterLazyLoad: false };}(jQuery, window, document)); (function(e){var t,n,i,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",h="."+g,v="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+h,n)},k=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},E=function(n){return n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},S=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1};w.prototype={constructor:w,init:function(){var n=navigator.appVersion;t.isIE7=-1!==n.indexOf("MSIE 7."),t.isIE8=-1!==n.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=S(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),o=e(document),t.popupsCache={}},open:function(n){i||(i=e(document.body));var r;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var s,l=n.items;for(r=0;l.length>r;r++)if(s=l[r],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=r;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],a="",t.ev=n.mainEl&&n.mainEl.length?n.mainEl.eq(0):o,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=k("bg").on("click"+h,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var c=e.magnificPopup.modules;for(r=0;c.length>r;r++){var d=c[r];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=E(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(E())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+h,function(e){27===e.keyCode&&t.close()}),I.on("resize"+h,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var u=t.wH=I.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(u)){var g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var C=t.st.mainClass;return t.isIE7&&(C+=" mfp-ie7"),C&&t._addClassToMFP(C),t.updateItemHTML(),T("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||i),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),o.on("focusin"+h,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var n=C+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var i={marginRight:""};t.isIE7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+h+" focusin"+h),t.ev.off(h),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(E()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;r.length>a;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,T("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(a>I.width())return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(h+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith(''):i.attr(o[1],n)}}else t.find(h+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("
    ");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'The content could not be loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var o=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var j,N=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'
    ',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'The image could not be loaded.'},proto:{initImage:function(){var e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return i.naturalWidth>0?(t._onImageHasSize(e),void 0):(n>200&&clearInterval(j),n++,3===n?o(10):40===n?o(50):100===n&&o(500),void 0)},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var W,R=function(){return void 0===W&&(W=void 0!==document.createElement("p").style.MozTransform),W};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return d(),void 0;r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return R()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",D=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'
    ',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),x("BeforeChange",function(e,t,n){t!==n&&(t===Z?D():n===Z&&D(!0))}),x(l+"."+Z,function(){D()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var a=t.items.length;o.counter=a>1?Y(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;(t.direction?o:i)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?i:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(n){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),n&&I.off("touchmove"+r+" touchend"+r)}}(),_()})(window.jQuery||window.Zepto); (function($){$.fn.appear=function(f,o){var s=$.extend({one:true},o);return this.each(function(){var t=$(this);t.appeared=false;if(!f){t.trigger('appear',s.data);return;}var w=$(window);var c=function(){if(!t.is(':visible')){t.appeared=false;return;}var a=w.scrollLeft();var b=w.scrollTop();var o=t.offset();var x=o.left;var y=o.top;if(y+t.height()>=b&&y<=b+w.height()&&x+t.width()>=a&&x<=a+w.width()){if(!t.appeared)t.trigger('appear',s.data);}else{t.appeared=false;}};var m=function(){t.appeared=true;if(s.one){w.unbind('scroll',c);var i=$.inArray(c,$.fn.appear.checks);if(i>=0)$.fn.appear.checks.splice(i,1);}f.apply(this,arguments);};if(s.one)t.one('appear',s.data,m);else t.bind('appear',s.data,m);w.scroll(c);$.fn.appear.checks.push(c);(c)();});};$.extend($.fn.appear,{checks:[],timeout:null,checkAll:function(){var l=$.fn.appear.checks.length;if(l>0)while(l--)($.fn.appear.checks[l])();},run:function(){if($.fn.appear.timeout)clearTimeout($.fn.appear.timeout);$.fn.appear.timeout=setTimeout($.fn.appear.checkAll,20);}});$.each(['append','prepend','after','before','attr','removeAttr','addClass','removeClass','toggleClass','remove','css','show','hide'],function(i,n){var u=$.fn[n];if(u){$.fn[n]=function(){var r=u.apply(this,arguments);$.fn.appear.run();return r;}}});})(jQuery); (function ($){ $.fn.countTo=function (options){ options=options||{}; return $(this).each(function (){ var settings=$.extend({}, $.fn.countTo.defaults, { from: $(this).data('from'), to: $(this).data('to'), speed: $(this).data('speed'), refreshInterval: $(this).data('refresh-interval'), decimals: $(this).data('decimals') }, options); var loops=Math.ceil(settings.speed / settings.refreshInterval), increment=(settings.to - settings.from) / loops; var self=this, $self=$(this), loopCount=0, value=settings.from, data=$self.data('countTo')||{}; $self.data('countTo', data); if(data.interval){ clearInterval(data.interval); } data.interval=setInterval(updateTimer, settings.refreshInterval); render(value); function updateTimer(){ value +=increment; loopCount++; render(value); if(typeof(settings.onUpdate)=='function'){ settings.onUpdate.call(self, value); } if(loopCount >=loops){ $self.removeData('countTo'); clearInterval(data.interval); value=settings.to; if(typeof(settings.onComplete)=='function'){ settings.onComplete.call(self, value); }} } function render(value){ var formattedValue=settings.formatter.call(self, value, settings); $self.text(formattedValue); }}); }; $.fn.countTo.defaults={ from: 0, to: 0, speed: 1000, refreshInterval: 100, decimals: 0, formatter: formatter, onUpdate: null, onComplete: null }; function formatter(value, settings){ return value.toFixed(settings.decimals); }}(jQuery)); ;(function($, window, document, undefined){ var pluginName='stellar', defaults={ scrollProperty: 'scroll', positionProperty: 'position', horizontalScrolling: true, verticalScrolling: true, horizontalOffset: 0, verticalOffset: 0, responsive: false, parallaxBackgrounds: true, parallaxElements: true, hideDistantElements: true, hideElement: function($elem){ $elem.hide(); }, showElement: function($elem){ $elem.show(); }}, scrollProperty={ scroll: { getLeft: function($elem){ return $elem.scrollLeft(); }, setLeft: function($elem, val){ $elem.scrollLeft(val); }, getTop: function($elem){ return $elem.scrollTop(); }, setTop: function($elem, val){ $elem.scrollTop(val); }}, position: { getLeft: function($elem){ return parseInt($elem.css('left'), 10) * -1; }, getTop: function($elem){ return parseInt($elem.css('top'), 10) * -1; }}, margin: { getLeft: function($elem){ return parseInt($elem.css('margin-left'), 10) * -1; }, getTop: function($elem){ return parseInt($elem.css('margin-top'), 10) * -1; }}, transform: { getLeft: function($elem){ var computedTransform=getComputedStyle($elem[0])[prefixedTransform]; return (computedTransform!=='none' ? parseInt(computedTransform.match(/(-?[0-9]+)/g)[4], 10) * -1:0); }, getTop: function($elem){ var computedTransform=getComputedStyle($elem[0])[prefixedTransform]; return (computedTransform!=='none' ? parseInt(computedTransform.match(/(-?[0-9]+)/g)[5], 10) * -1:0); }} }, positionProperty={ position: { setLeft: function($elem, left){ $elem.css('left', left); }, setTop: function($elem, top){ $elem.css('top', top); }}, transform: { setPosition: function($elem, left, startingLeft, top, startingTop){ $elem[0].style[prefixedTransform]='translate3d(' + (left - startingLeft) + 'px, ' + (top - startingTop) + 'px, 0)'; }} }, vendorPrefix=(function(){ var prefixes=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/, style=$('script')[0].style, prefix='', prop; for (prop in style){ if(prefixes.test(prop)){ prefix=prop.match(prefixes)[0]; break; }} if('WebkitOpacity' in style){ prefix='Webkit'; } if('KhtmlOpacity' in style){ prefix='Khtml'; } return function(property){ return prefix + (prefix.length > 0 ? property.charAt(0).toUpperCase() + property.slice(1):property); };}()), prefixedTransform=vendorPrefix('transform'), supportsBackgroundPositionXY=$('
    ', { style: 'background:#fff' }).css('background-position-x')!==undefined, setBackgroundPosition=(supportsBackgroundPositionXY ? function($elem, x, y){ $elem.css({ 'background-position-x': x, 'background-position-y': y }); } : function($elem, x, y){ $elem.css('background-position', x + ' ' + y); } ), getBackgroundPosition=(supportsBackgroundPositionXY ? function($elem){ return [ $elem.css('background-position-x'), $elem.css('background-position-y') ]; } : function($elem){ return $elem.css('background-position').split(' '); } ), requestAnimFrame=( window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback){ setTimeout(callback, 1000 / 60); } ); function Plugin(element, options){ this.element=element; this.options=$.extend({}, defaults, options); this._defaults=defaults; this._name=pluginName; this.init(); } Plugin.prototype={ init: function(){ this.options.name=pluginName + '_' + Math.floor(Math.random() * 1e9); this._defineElements(); this._defineGetters(); this._defineSetters(); this._handleWindowLoadAndResize(); this._detectViewport(); this.refresh({ firstLoad: true }); if(this.options.scrollProperty==='scroll'){ this._handleScrollEvent(); }else{ this._startAnimationLoop(); }}, _defineElements: function(){ if(this.element===document.body) this.element=window; this.$scrollElement=$(this.element); this.$element=(this.element===window ? $('body'):this.$scrollElement); this.$viewportElement=(this.options.viewportElement!==undefined ? $(this.options.viewportElement):(this.$scrollElement[0]===window||this.options.scrollProperty==='scroll' ? this.$scrollElement:this.$scrollElement.parent())); }, _defineGetters: function(){ var self=this, scrollPropertyAdapter=scrollProperty[self.options.scrollProperty]; this._getScrollLeft=function(){ return scrollPropertyAdapter.getLeft(self.$scrollElement); }; this._getScrollTop=function(){ return scrollPropertyAdapter.getTop(self.$scrollElement); };}, _defineSetters: function(){ var self=this, scrollPropertyAdapter=scrollProperty[self.options.scrollProperty], positionPropertyAdapter=positionProperty[self.options.positionProperty], setScrollLeft=scrollPropertyAdapter.setLeft, setScrollTop=scrollPropertyAdapter.setTop; this._setScrollLeft=(typeof setScrollLeft==='function' ? function(val){ setScrollLeft(self.$scrollElement, val); }:$.noop); this._setScrollTop=(typeof setScrollTop==='function' ? function(val){ setScrollTop(self.$scrollElement, val); }:$.noop); this._setPosition=positionPropertyAdapter.setPosition || function($elem, left, startingLeft, top, startingTop){ if(self.options.horizontalScrolling){ positionPropertyAdapter.setLeft($elem, left, startingLeft); } if(self.options.verticalScrolling){ positionPropertyAdapter.setTop($elem, top, startingTop); }};}, _handleWindowLoadAndResize: function(){ var self=this, $window=$(window); if(self.options.responsive){ $window.bind('load.' + this.name, function(){ self.refresh(); }); } $window.bind('resize.' + this.name, function(){ self._detectViewport(); if(self.options.responsive){ self.refresh(); }}); }, refresh: function(options){ var self=this, oldLeft=self._getScrollLeft(), oldTop=self._getScrollTop(); if(!options||!options.firstLoad){ this._reset(); } this._setScrollLeft(0); this._setScrollTop(0); this._setOffsets(); this._findParticles(); this._findBackgrounds(); if(options&&options.firstLoad&&/WebKit/.test(navigator.userAgent)){ $(window).load(function(){ var oldLeft=self._getScrollLeft(), oldTop=self._getScrollTop(); self._setScrollLeft(oldLeft + 1); self._setScrollTop(oldTop + 1); self._setScrollLeft(oldLeft); self._setScrollTop(oldTop); }); } this._setScrollLeft(oldLeft); this._setScrollTop(oldTop); }, _detectViewport: function(){ var viewportOffsets=this.$viewportElement.offset(), hasOffsets=viewportOffsets!==null&&viewportOffsets!==undefined; this.viewportWidth=this.$viewportElement.width(); this.viewportHeight=this.$viewportElement.height(); this.viewportOffsetTop=(hasOffsets ? viewportOffsets.top:0); this.viewportOffsetLeft=(hasOffsets ? viewportOffsets.left:0); }, _findParticles: function(){ var self=this, scrollLeft=this._getScrollLeft(), scrollTop=this._getScrollTop(); if(this.particles!==undefined){ for (var i=this.particles.length - 1; i >=0; i--){ this.particles[i].$element.data('stellar-elementIsActive', undefined); }} this.particles=[]; if(!this.options.parallaxElements) return; this.$element.find('[data-stellar-ratio]').each(function(i){ var $this=$(this), horizontalOffset, verticalOffset, positionLeft, positionTop, marginLeft, marginTop, $offsetParent, offsetLeft, offsetTop, parentOffsetLeft=0, parentOffsetTop=0, tempParentOffsetLeft=0, tempParentOffsetTop=0; if(!$this.data('stellar-elementIsActive')){ $this.data('stellar-elementIsActive', this); }else if($this.data('stellar-elementIsActive')!==this){ return; } self.options.showElement($this); if(!$this.data('stellar-startingLeft')){ $this.data('stellar-startingLeft', $this.css('left')); $this.data('stellar-startingTop', $this.css('top')); }else{ $this.css('left', $this.data('stellar-startingLeft')); $this.css('top', $this.data('stellar-startingTop')); } positionLeft=$this.position().left; positionTop=$this.position().top; marginLeft=($this.css('margin-left')==='auto') ? 0:parseInt($this.css('margin-left'), 10); marginTop=($this.css('margin-top')==='auto') ? 0:parseInt($this.css('margin-top'), 10); offsetLeft=$this.offset().left - marginLeft; offsetTop=$this.offset().top - marginTop; $this.parents().each(function(){ var $this=$(this); if($this.data('stellar-offset-parent')===true){ parentOffsetLeft=tempParentOffsetLeft; parentOffsetTop=tempParentOffsetTop; $offsetParent=$this; return false; }else{ tempParentOffsetLeft +=$this.position().left; tempParentOffsetTop +=$this.position().top; }}); horizontalOffset=($this.data('stellar-horizontal-offset')!==undefined ? $this.data('stellar-horizontal-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-horizontal-offset')!==undefined ? $offsetParent.data('stellar-horizontal-offset'):self.horizontalOffset)); verticalOffset=($this.data('stellar-vertical-offset')!==undefined ? $this.data('stellar-vertical-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-vertical-offset')!==undefined ? $offsetParent.data('stellar-vertical-offset'):self.verticalOffset)); self.particles.push({ $element: $this, $offsetParent: $offsetParent, isFixed: $this.css('position')==='fixed', horizontalOffset: horizontalOffset, verticalOffset: verticalOffset, startingPositionLeft: positionLeft, startingPositionTop: positionTop, startingOffsetLeft: offsetLeft, startingOffsetTop: offsetTop, parentOffsetLeft: parentOffsetLeft, parentOffsetTop: parentOffsetTop, stellarRatio: ($this.data('stellar-ratio')!==undefined ? $this.data('stellar-ratio'):1), width: $this.outerWidth(true), height: $this.outerHeight(true), isHidden: false }); }); }, _findBackgrounds: function(){ var self=this, scrollLeft=this._getScrollLeft(), scrollTop=this._getScrollTop(), $backgroundElements; this.backgrounds=[]; if(!this.options.parallaxBackgrounds) return; $backgroundElements=this.$element.find('[data-stellar-background-ratio]'); if(this.$element.data('stellar-background-ratio')){ $backgroundElements=$backgroundElements.add(this.$element); } $backgroundElements.each(function(){ var $this=$(this), backgroundPosition=getBackgroundPosition($this), horizontalOffset, verticalOffset, positionLeft, positionTop, marginLeft, marginTop, offsetLeft, offsetTop, $offsetParent, parentOffsetLeft=0, parentOffsetTop=0, tempParentOffsetLeft=0, tempParentOffsetTop=0; if(!$this.data('stellar-backgroundIsActive')){ $this.data('stellar-backgroundIsActive', this); }else if($this.data('stellar-backgroundIsActive')!==this){ return; } if(!$this.data('stellar-backgroundStartingLeft')){ $this.data('stellar-backgroundStartingLeft', backgroundPosition[0]); $this.data('stellar-backgroundStartingTop', backgroundPosition[1]); }else{ setBackgroundPosition($this, $this.data('stellar-backgroundStartingLeft'), $this.data('stellar-backgroundStartingTop')); } marginLeft=($this.css('margin-left')==='auto') ? 0:parseInt($this.css('margin-left'), 10); marginTop=($this.css('margin-top')==='auto') ? 0:parseInt($this.css('margin-top'), 10); offsetLeft=$this.offset().left - marginLeft - scrollLeft; offsetTop=$this.offset().top - marginTop - scrollTop; $this.parents().each(function(){ var $this=$(this); if($this.data('stellar-offset-parent')===true){ parentOffsetLeft=tempParentOffsetLeft; parentOffsetTop=tempParentOffsetTop; $offsetParent=$this; return false; }else{ tempParentOffsetLeft +=$this.position().left; tempParentOffsetTop +=$this.position().top; }}); horizontalOffset=($this.data('stellar-horizontal-offset')!==undefined ? $this.data('stellar-horizontal-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-horizontal-offset')!==undefined ? $offsetParent.data('stellar-horizontal-offset'):self.horizontalOffset)); verticalOffset=($this.data('stellar-vertical-offset')!==undefined ? $this.data('stellar-vertical-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-vertical-offset')!==undefined ? $offsetParent.data('stellar-vertical-offset'):self.verticalOffset)); self.backgrounds.push({ $element: $this, $offsetParent: $offsetParent, isFixed: $this.css('background-attachment')==='fixed', horizontalOffset: horizontalOffset, verticalOffset: verticalOffset, startingValueLeft: backgroundPosition[0], startingValueTop: backgroundPosition[1], startingBackgroundPositionLeft: (isNaN(parseInt(backgroundPosition[0], 10)) ? 0:parseInt(backgroundPosition[0], 10)), startingBackgroundPositionTop: (isNaN(parseInt(backgroundPosition[1], 10)) ? 0:parseInt(backgroundPosition[1], 10)), startingPositionLeft: $this.position().left, startingPositionTop: $this.position().top, startingOffsetLeft: offsetLeft, startingOffsetTop: offsetTop, parentOffsetLeft: parentOffsetLeft, parentOffsetTop: parentOffsetTop, stellarRatio: ($this.data('stellar-background-ratio')===undefined ? 1:$this.data('stellar-background-ratio')) }); }); }, _reset: function(){ var particle, startingPositionLeft, startingPositionTop, background, i; for (i=this.particles.length - 1; i >=0; i--){ particle=this.particles[i]; startingPositionLeft=particle.$element.data('stellar-startingLeft'); startingPositionTop=particle.$element.data('stellar-startingTop'); this._setPosition(particle.$element, startingPositionLeft, startingPositionLeft, startingPositionTop, startingPositionTop); this.options.showElement(particle.$element); particle.$element.data('stellar-startingLeft', null).data('stellar-elementIsActive', null).data('stellar-backgroundIsActive', null); } for (i=this.backgrounds.length - 1; i >=0; i--){ background=this.backgrounds[i]; background.$element.data('stellar-backgroundStartingLeft', null).data('stellar-backgroundStartingTop', null); setBackgroundPosition(background.$element, background.startingValueLeft, background.startingValueTop); }}, destroy: function(){ this._reset(); this.$scrollElement.unbind('resize.' + this.name).unbind('scroll.' + this.name); this._animationLoop=$.noop; $(window).unbind('load.' + this.name).unbind('resize.' + this.name); }, _setOffsets: function(){ var self=this, $window=$(window); $window.unbind('resize.horizontal-' + this.name).unbind('resize.vertical-' + this.name); if(typeof this.options.horizontalOffset==='function'){ this.horizontalOffset=this.options.horizontalOffset(); $window.bind('resize.horizontal-' + this.name, function(){ self.horizontalOffset=self.options.horizontalOffset(); }); }else{ this.horizontalOffset=this.options.horizontalOffset; } if(typeof this.options.verticalOffset==='function'){ this.verticalOffset=this.options.verticalOffset(); $window.bind('resize.vertical-' + this.name, function(){ self.verticalOffset=self.options.verticalOffset(); }); }else{ this.verticalOffset=this.options.verticalOffset; }}, _repositionElements: function(){ var scrollLeft=this._getScrollLeft(), scrollTop=this._getScrollTop(), horizontalOffset, verticalOffset, particle, fixedRatioOffset, background, bgLeft, bgTop, isVisibleVertical=true, isVisibleHorizontal=true, newPositionLeft, newPositionTop, newOffsetLeft, newOffsetTop, i; if(this.currentScrollLeft===scrollLeft&&this.currentScrollTop===scrollTop&&this.currentWidth===this.viewportWidth&&this.currentHeight===this.viewportHeight){ return; }else{ this.currentScrollLeft=scrollLeft; this.currentScrollTop=scrollTop; this.currentWidth=this.viewportWidth; this.currentHeight=this.viewportHeight; } for (i=this.particles.length - 1; i >=0; i--){ particle=this.particles[i]; fixedRatioOffset=(particle.isFixed ? 1:0); if(this.options.horizontalScrolling){ newPositionLeft=(scrollLeft + particle.horizontalOffset + this.viewportOffsetLeft + particle.startingPositionLeft - particle.startingOffsetLeft + particle.parentOffsetLeft) * -(particle.stellarRatio + fixedRatioOffset - 1) + particle.startingPositionLeft; newOffsetLeft=newPositionLeft - particle.startingPositionLeft + particle.startingOffsetLeft; }else{ newPositionLeft=particle.startingPositionLeft; newOffsetLeft=particle.startingOffsetLeft; } if(this.options.verticalScrolling){ newPositionTop=(scrollTop + particle.verticalOffset + this.viewportOffsetTop + particle.startingPositionTop - particle.startingOffsetTop + particle.parentOffsetTop) * -(particle.stellarRatio + fixedRatioOffset - 1) + particle.startingPositionTop; newOffsetTop=newPositionTop - particle.startingPositionTop + particle.startingOffsetTop; }else{ newPositionTop=particle.startingPositionTop; newOffsetTop=particle.startingOffsetTop; } if(this.options.hideDistantElements){ isVisibleHorizontal = !this.options.horizontalScrolling||newOffsetLeft + particle.width > (particle.isFixed ? 0:scrollLeft)&&newOffsetLeft < (particle.isFixed ? 0:scrollLeft) + this.viewportWidth + this.viewportOffsetLeft; isVisibleVertical = !this.options.verticalScrolling||newOffsetTop + particle.height > (particle.isFixed ? 0:scrollTop)&&newOffsetTop < (particle.isFixed ? 0:scrollTop) + this.viewportHeight + this.viewportOffsetTop; } if(isVisibleHorizontal&&isVisibleVertical){ if(particle.isHidden){ this.options.showElement(particle.$element); particle.isHidden=false; } this._setPosition(particle.$element, newPositionLeft, particle.startingPositionLeft, newPositionTop, particle.startingPositionTop); }else{ if(!particle.isHidden){ this.options.hideElement(particle.$element); particle.isHidden=true; }} } for (i=this.backgrounds.length - 1; i >=0; i--){ background=this.backgrounds[i]; fixedRatioOffset=(background.isFixed ? 0:1); bgLeft=(this.options.horizontalScrolling ? (scrollLeft + background.horizontalOffset - this.viewportOffsetLeft - background.startingOffsetLeft + background.parentOffsetLeft - background.startingBackgroundPositionLeft) * (fixedRatioOffset - background.stellarRatio) + 'px':background.startingValueLeft); bgTop=(this.options.verticalScrolling ? (scrollTop + background.verticalOffset - this.viewportOffsetTop - background.startingOffsetTop + background.parentOffsetTop - background.startingBackgroundPositionTop) * (fixedRatioOffset - background.stellarRatio) + 'px':background.startingValueTop); setBackgroundPosition(background.$element, bgLeft, bgTop); }}, _handleScrollEvent: function(){ var self=this, ticking=false; var update=function(){ self._repositionElements(); ticking=false; }; var requestTick=function(){ if(!ticking){ requestAnimFrame(update); ticking=true; }}; this.$scrollElement.bind('scroll.' + this.name, requestTick); requestTick(); }, _startAnimationLoop: function(){ var self=this; this._animationLoop=function(){ requestAnimFrame(self._animationLoop); self._repositionElements(); }; this._animationLoop(); }}; $.fn[pluginName]=function (options){ var args=arguments; if(options===undefined||typeof options==='object'){ return this.each(function (){ if(!$.data(this, 'plugin_' + pluginName)){ $.data(this, 'plugin_' + pluginName, new Plugin(this, options)); }}); }else if(typeof options==='string'&&options[0]!=='_'&&options!=='init'){ return this.each(function (){ var instance=$.data(this, 'plugin_' + pluginName); if(instance instanceof Plugin&&typeof instance[options]==='function'){ instance[options].apply(instance, Array.prototype.slice.call(args, 1)); } if(options==='destroy'){ $.data(this, 'plugin_' + pluginName, null); }}); }}; $[pluginName]=function(options){ var $window=$(window); return $window.stellar.apply($window, Array.prototype.slice.call(arguments, 0)); }; $[pluginName].scrollProperty=scrollProperty; $[pluginName].positionProperty=positionProperty; window.Stellar=Plugin; }(jQuery, this, document)); (function(a){a.fn.circliful=function(b){var c=a.extend({foregroundColor:"#556b2f",backgroundColor:"#eee",fillColor:false,width:15,dimension:200,size:15,percent:50,animationStep:1},b);return this.each(function(){var F="";var s="";var E="";var v="";var t=0;var e=0;var l=100;var B="";var d="";var D="";var q=0;a(this).addClass("circliful");if(a(this).data("dimension")!=undefined){F=a(this).data("dimension")}else{F=c.dimension}if(a(this).data("width")!=undefined){v=a(this).data("width")}else{v=c.width}if(a(this).data("fontsize")!=undefined){t=a(this).data("fontsize")}else{t=c.size}if(a(this).data("percent")!=undefined){e=a(this).data("percent")/100;l=a(this).data("percent")}else{e=c.percent/100}if(a(this).data("fgcolor")!=undefined){B=a(this).data("fgcolor")}else{B=c.foregroundColor}if(a(this).data("bgcolor")!=undefined){d=a(this).data("bgcolor")}else{d=c.backgroundColor}if(a(this).data("animation-step")!=undefined){q=parseFloat(a(this).data("animation-step"))}else{q=c.animationStep}if(a(this).data("text")!=undefined){s=a(this).data("text");if(a(this).data("icon")!=undefined){D=''}if(a(this).data("type")!=undefined){i=a(this).data("type");if(i=="half"){a(this).append(''+D+s+"");a(this).find(".circle-text-half").css({"line-height":(F/1.45)+"px","font-size":t+"px"})}else{a(this).append(''+D+s+"");a(this).find(".circle-text").css({"line-height":F+"px","font-size":t+"px"})}}else{a(this).append(''+D+s+"");a(this).find(".circle-text").css({"line-height":F+"px","font-size":t+"px"})}}else{if(a(this).data("icon")!=undefined){}}if(a(this).data("info")!=undefined){E=a(this).data("info");if(a(this).data("type")!=undefined){i=a(this).data("type");if(i=="half"){a(this).append(''+E+"");a(this).find(".circle-info-half").css({"line-height":(F*0.9)+"px",})}else{a(this).append(''+E+"");a(this).find(".circle-info").css({"line-height":(F*1.25)+"px",})}}else{a(this).append(''+E+"");a(this).find(".circle-info").css({"line-height":(F*1.25)+"px",})}}a(this).width(F+"px");var h=a("").attr({width:F,height:F}).appendTo(a(this)).get(0);var f=h.getContext("2d");var p=h.width/2;var o=h.height/2;var A=e*360;var G=A*(Math.PI/180);var j=h.width/2.5;var z=2.3*Math.PI;var u=0;var C=false;var m=q===0?l:0;var n=Math.max(q,0);var r=Math.PI*2;var g=Math.PI/2;var i="";var w=false;if(a(this).data("type")!=undefined){i=a(this).data("type");if(i=="half"){var z=2*Math.PI;var u=3.13;var r=Math.PI*1;var g=Math.PI/0.996}}if(a(this).data("fill")!=undefined){w=a(this).data("fill")}else{w=c.fillColor}function k(x){f.clearRect(0,0,h.width,h.height);f.beginPath();f.arc(p,o,j,u,z,false);f.lineWidth=v-1;f.strokeStyle=d;f.stroke();if(w){f.fillStyle=w;f.fill()}f.beginPath();f.arc(p,o,j,-(g),((r)*x)-g,false);f.lineWidth=v;f.strokeStyle=B;f.stroke();if(m"); }); $(".screen-inner, .video").fitVids(); $('#portfolio-container a').each(function(){ $(this).removeAttr('href'); }); $('.title-bordered h2').append('').prepend(''); var isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); if(isMobile===false){ $('*[data-animation]').addClass('animated'); $('.animated').appear(function(){ var elem=$(this); var animation=elem.data('animation'); if(!elem.hasClass('visible')){ var animationDelay=elem.data('animation-delay'); if(animationDelay){ setTimeout(function(){ elem.addClass(animation + " visible"); }, animationDelay); }else{ elem.addClass(animation + " visible"); }} }); } $(".counter[data-to]").each(function(){ var $this=$(this); $this.appear(function(){ $this.countTo({ onComplete: function(){ if($this.data("append")){ $this.html($this.html() + $this.data("append")); }} }); }, {accX: 0, accY: 0}); }); $(".circled-counter").each(function(){ var $this=$(this); $this.appear(function(){ $this.circliful(); }, {accX: 0, accY: 100}); }); $("input[name='your-name']").attr("placeholder","Name"); $("input[name='Firma']").attr("placeholder","Firma (optional)"); $("input[name='Website']").attr("placeholder","Website (optional)"); $("input[name='your-email']").attr("placeholder","E-Mail-Adresse"); $("textarea[name='your-message']").attr("placeholder","Nachricht"); $('.magnific-img').magnificPopup({ removalDelay: 300, type:'image', mainClass: 'mfp-fade' }); $("iframe[src*='vimeo'], iframe[src*='youtube']").each(function(){ $(this).wrap("
    "); }); $('#menu-item-3859').click(function(){ $('html, body').animate({ scrollTop: 0 }, 1000); }); $('#menu-item-3860').click(function(){ $('html, body').animate({ scrollTop: $("#sectionLeist").offset().top -50 }, 1200); }); $('#menu-item-3861').click(function(){ $('html, body').animate({ scrollTop: $("#sectionSprech").offset().top -50 }, 1400); }); $('.was-kostet-app').click(function(){ $('html, body').animate({ scrollTop: $("#sectionKost").offset().top -50 }, 1400); }); $(function(){ $(window).scroll(function(){ var costSectionY=$('#sectionKost').offset().top; var wasCostet=$('.was-kostet-app'); if(wasCostet.css('position')=='fixed'){ if($(this).scrollTop()>costSectionY-150){ wasCostet.fadeOut(400); }else{ wasCostet.fadeIn(400); }} }); }); $('#menu-item-3862').click(function(){ $('html, body').animate({ scrollTop: $("#sectionKost").offset().top -50 }, 1400); }); $('#menu-item-3863').click(function(){ $('html, body').animate({ scrollTop: $("#sectionReferenz").offset().top -50 }, 1400); }); $('#menu-item-3864').click(function(){ $('html, body').animate({ scrollTop: $("#sectionContact").offset().top -50 }, 1400); }); $('.weiter').click(function(){ var currentSlide=$('.est-slide.active'); var nextSlide=currentSlide.next(); currentSlide.fadeOut(300).removeClass('active'); nextSlide.fadeIn(300).delay(300).addClass('active'); if(nextSlide.length==0){ $('.est-slide').first().fadeIn(300).addClass('active'); }}); $('.zuruck').click(function(){ var currentSlide=$('.est-slide.active'); var prevSlide=currentSlide.prev(); currentSlide.find('.option:checked').each(function(){ $(this).prop('checked', false); $(this).parent().parent().removeClass('checked'); $(this).parent().parent().addClass('unchecked'); calculator(); }); currentSlide.fadeOut(300).removeClass('active'); prevSlide.fadeIn(300).delay(300).addClass('active'); if(prevSlide.length==0){ $('.est-slide').first().fadeIn(300).addClass('active'); }}); $('.zuruck-form').click(function(){ var currentSlide=$('.est-slide.active'); var prevSlide=currentSlide.prev(); currentSlide.fadeOut(300).removeClass('active'); prevSlide.fadeIn(300).delay(300).addClass('active'); }); function calculator(){ var countStep1=0; var countStep2=0; var multiplier=1; var total=0; var cross=$('#cross-check-id'); var ios=$('#ios-check-id'); var android=$('#android-check-id'); var choices=''; var choice1=''; var choice2=''; var choice3=''; var choice4=''; var choice5=''; var choice6=''; var choice7=''; var choice8=''; var choice9=''; $('.option:checked[name="step1"]').each(function(){ countStep1+=1; }); if(countStep1==1){total+=5000;} if(countStep1==2){total+=8000;} if(countStep1==3){total+=11000;} $('.option:checked').each(function(){ $(this).parent().parent().addClass('checked'); $(this).parent().parent().removeClass('unchecked'); total+=parseInt($(this).val()); if($(this).attr('name')=='step1'){ choice1+=' App device: '+ $(this).parent().parent().find('.check-icon-text').find('p').html(); if(choice1!=='undefined'){ choices+='\n'+choice1; }} if($(this).attr('name')=='step2'){ choice2+='App platform: '+ $(this).parent().parent().find('.check-icon-text').find('p').html(); if(choice2!=='undefined'){ choices+='\n'+choice2; }} if($(this).attr('name')=='step3'){ choice3+='Login: '+ $(this).parent().parent().find('.check-icon-text').find('p').html(); if(choice3!=='undefined'){ choices+='\n'+choice3; }} if($(this).attr('name')=='step4'){ choice4+='Profil: '+ $(this).parent().parent().find('.check-icon-text').find('p').html(); if(choice4!=='undefined'){ choices+='\n'+choice4; }} if($(this).attr('name')=='step5'){ choice5+='Zahlungsmodell: '+ $(this).parent().parent().find('.check-icon-text').find('p').html(); if(choice5!=='undefined'){ choices+='\n'+choice5; }} if($(this).attr('name')=='step6'){ choice6+='Bewertung: '+ $(this).parent().parent().find('.check-icon-text').find('p').html(); if(choice6!=='undefined'){ choices+='\n'+choice6; }} if($(this).attr('name')=='step7'){ choice7+='API: '+ $(this).parent().parent().find('.check-icon-text').find('p').html(); if(choice7!=='undefined'){ choices+='\n'+choice7; }} if($(this).attr('name')=='step8'){ choice8+='Design: '+ $(this).parent().parent().find('.check-icon-text').find('p').html(); if(choice8!=='undefined'){ choices+='\n'+choice8; }} if($(this).attr('name')=='step9'){ choice9+='App-Projekt Anfang: '+ $(this).parent().parent().find('.check-icon-text').find('p').html(); if(choice9!=='undefined'){ choices+='\n'+choice9; }} }); $('.option:not(:checked)').each(function(){ $(this).parent().parent().addClass('unchecked'); $(this).parent().parent().removeClass('checked'); }); cross.click(function(){ multiplier=1.6; ios.parent().parent().removeClass('checked').addClass('unchecked'); android.parent().parent().removeClass('checked').addClass('unchecked'); }); ios.click(function(){ cross.parent().parent().removeClass('checked').addClass('unchecked'); }); android.click(function(){ cross.parent().parent().removeClass('checked').addClass('unchecked'); }); if(cross.parent().parent().attr('class')=='check-icon-container-3 checked'){ multiplier=1.6; } if((ios.parent().parent().attr('class')=='check-icon-container-3 checked')||(android.parent().parent().attr('class')=='check-icon-container-3 checked')){ multiplier=1; if((ios.parent().parent().attr('class')=='check-icon-container-3 checked')&&(android.parent().parent().attr('class')=='check-icon-container-3 checked')){ multiplier=2; }} var designVal=0; if($('#design-appoloxy-check-id').prop("checked")){ designVal=20000; } $('.est-result').html(total*multiplier+designVal+' €'); $('.form-est-result').html(total*multiplier+designVal+' €'); $('#price').val(total); if(choices!=='undefined'){ $('#choices').val(choices); }} $('.option').click(calculator); $('.toggle-down').click(function (){ $(this).toggleClass('active-toggle'); $(this).parent().parent().find('p').slideToggle(400); if($(this).hasClass("active-toggle")){ $(this).removeClass('fa-chevron-down'); $(this).addClass('fa-chevron-up'); }else{ $(this).addClass('fa-chevron-down'); $(this).removeClass('fa-chevron-up'); }}); $(".flexnav li a").click(function(){ $(".navbar-toggle").trigger("click"); }); $(".device-container").parent().addClass("remMargin"); $('#respond #submit').addClass('btn btn-primary'); if(isMobile===false){ $.stellar({ horizontalScrolling: false, responsive: false, }); } $('.posts-list__2cols li:nth-of-type(2n)').each(function(){ $(this).after('
    '); }); $('.posts-list__3cols li:nth-of-type(3n)').each(function(){ $(this).after('
    '); }); $('.posts-list__4cols li:nth-of-type(4n)').each(function(){ $(this).after('
    '); }); })(jQuery); (function($){ "use strict"; $('#navbar').affix({ offset: { top: 0 }}); })(jQuery); !function(d,l){"use strict";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=new RegExp("^https?:$","i"),c=0;c