(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.resetCounter($form); $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); wpcf7.resetCounter($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.resetCounter=function(form){ var $form=$(form); $('.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); }); }); }); }; wpcf7.notValidTip=function(target, message){ var $target=$(target); $('.wpcf7-not-valid-tip', $target).remove(); $('').attr({ 'class': 'wpcf7-not-valid-tip', 'role': 'alert', 'aria-hidden': 'true', }).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(){"use strict";function e(e){function t(t,n){var s,h,k=t==window,y=n&&n.message!==undefined?n.message:undefined;if(!(n=e.extend({},e.blockUI.defaults,n||{})).ignoreIfBlocked||!e(t).data("blockUI.isBlocked")){if(n.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,n.overlayCSS||{}),s=e.extend({},e.blockUI.defaults.css,n.css||{}),n.onOverlayClick&&(n.overlayCSS.cursor="pointer"),h=e.extend({},e.blockUI.defaults.themedCSS,n.themedCSS||{}),y=y===undefined?n.message:y,k&&p&&o(window,{fadeOut:0}),y&&"string"!=typeof y&&(y.parentNode||y.jquery)){var m=y.jquery?y[0]:y,g={};e(t).data("blockUI.history",g),g.el=m,g.parent=m.parentNode,g.display=m.style.display,g.position=m.style.position,g.parent&&g.parent.removeChild(m)}e(t).data("blockUI.onUnblock",n.onUnblock);var v,I,w,U,x=n.baseZ;v=e(r||n.forceIframe?'':''),I=e(n.theme?'':''),n.theme&&k?(U='"):n.theme?(U='"):U=k?'':'',w=e(U),y&&(n.theme?(w.css(h),w.addClass("ui-widget-content")):w.css(s)),n.theme||I.css(n.overlayCSS),I.css("position",k?"fixed":"absolute"),(r||n.forceIframe)&&v.css("opacity",0);var C=[v,I,w],S=e(k?"body":t);e.each(C,function(){this.appendTo(S)}),n.theme&&n.draggable&&e.fn.draggable&&w.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var O=f&&(!e.support.boxModel||e("object,embed",k?null:t).length>0);if(u||O){if(k&&n.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(u||!e.support.boxModel)&&!k)var E=a(t,"borderTopWidth"),T=a(t,"borderLeftWidth"),M=E?"(0 - "+E+")":0,B=T?"(0 - "+T+")":0;e.each(C,function(e,t){var o=t[0].style;if(o.position="absolute",e<2)k?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+n.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),k?o.setExpression("width",'jQuery.support.boxModel&&document.documentElement.clientWidth||document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),B&&o.setExpression("left",B),M&&o.setExpression("top",M);else if(n.centerY)k&&o.setExpression("top",'(document.documentElement.clientHeight||document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah=document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "px"'),o.marginTop=0;else if(!n.centerY&&k){var i="((document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "+(n.css&&n.css.top?parseInt(n.css.top,10):0)+') + "px"';o.setExpression("top",i)}})}if(y&&(n.theme?w.find(".ui-widget-content").append(y):w.append(y),(y.jquery||y.nodeType)&&e(y).show()),(r||n.forceIframe)&&n.showOverlay&&v.show(),n.fadeIn){var j=n.onBlock?n.onBlock:c,H=n.showOverlay&&!y?j:c,z=y?j:c;n.showOverlay&&I._fadeIn(n.fadeIn,H),y&&w._fadeIn(n.fadeIn,z)}else n.showOverlay&&I.show(),y&&w.show(),n.onBlock&&n.onBlock.bind(w)();if(i(1,t,n),k?(p=w[0],b=e(n.focusableElements,p),n.focusInput&&setTimeout(l,20)):d(w[0],n.centerX,n.centerY),n.timeout){var W=setTimeout(function(){k?e.unblockUI(n):e(t).unblock(n)},n.timeout);e(t).data("blockUI.timeout",W)}}}function o(t,o){var s,l=t==window,d=e(t),a=d.data("blockUI.history"),c=d.data("blockUI.timeout");c&&(clearTimeout(c),d.removeData("blockUI.timeout")),o=e.extend({},e.blockUI.defaults,o||{}),i(0,t,o),null===o.onUnblock&&(o.onUnblock=d.data("blockUI.onUnblock"),d.removeData("blockUI.onUnblock"));var r;r=l?e(document.body).children().filter(".blockUI").add("body > .blockUI"):d.find(">.blockUI"),o.cursorReset&&(r.length>1&&(r[1].style.cursor=o.cursorReset),r.length>2&&(r[2].style.cursor=o.cursorReset)),l&&(p=b=null),o.fadeOut?(s=r.length,r.stop().fadeOut(o.fadeOut,function(){0==--s&&n(r,a,o,t)})):n(r,a,o,t)}function n(t,o,n,i){var s=e(i);if(!s.data("blockUI.isBlocked")){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),s.removeData("blockUI.history")),s.data("blockUI.static")&&s.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),d=l.width(),a=l[0].style.width;l.width(d-1).width(d),l[0].style.width=a}}function i(t,o,n){var i=o==window,l=e(o);if((t||(!i||p)&&(i||l.data("blockUI.isBlocked")))&&(l.data("blockUI.isBlocked",t),i&&n.bindEvents&&(!t||n.showOverlay))){var d="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).bind(d,n,s):e(document).unbind(d,s)}}function s(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&p&&t.data.constrainTabKey){var o=b,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){l(i)},10),!1}var s=t.data,d=e(t.target);return d.hasClass("blockOverlay")&&s.onOverlayClick&&s.onOverlayClick(t),d.parents("div."+s.blockMsgClass).length>0||0===d.parents().children().filter("div.blockUI").length}function l(e){if(b){var t=b[!0===e?b.length-1:0];t&&t.focus()}}function d(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-a(n,"borderLeftWidth"),l=(n.offsetHeight-e.offsetHeight)/2-a(n,"borderTopWidth");t&&(i.left=s>0?s+"px":"0"),o&&(i.top=l>0?l+"px":"0")}function a(t,o){return parseInt(e.css(t,o),10)||0}e.fn._fadeIn=e.fn.fadeIn;var c=e.noop||function(){},r=/MSIE/.test(navigator.userAgent),u=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),f=(document.documentMode,e.isFunction(document.createElement("div").style.setExpression));e.blockUI=function(e){t(window,e)},e.unblockUI=function(e){o(window,e)},e.growlUI=function(t,o,n,i){var s=e('
    ');t&&s.append("

    "+t+"

    "),o&&s.append("

    "+o+"

    "),n===undefined&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css("opacity");s.mouseover(function(){l({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).mouseout(function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(o){if(this[0]===window)return e.blockUI(o),this;var n=e.extend({},e.blockUI.defaults,o||{});return this.each(function(){var t=e(this);n.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,t(this,o)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){o(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"

    Please wait...

    ",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var p=null,b=[]}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(); jQuery(function(o){if("undefined"==typeof wc_add_to_cart_params)return!1;function t(){this.requests=[],this.addRequest=this.addRequest.bind(this),this.run=this.run.bind(this),o(document.body).on("click",".add_to_cart_button",{addToCartHandler:this},this.onAddToCart).on("click",".remove_from_cart_button",{addToCartHandler:this},this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("added_to_cart removed_from_cart",{addToCartHandler:this},this.updateFragments)}t.prototype.addRequest=function(t){this.requests.push(t),1===this.requests.length&&this.run()},t.prototype.run=function(){var t=this,a=t.requests[0].complete;t.requests[0].complete=function(){"function"==typeof a&&a(),t.requests.shift(),0'+wc_add_to_cart_params.i18n_view_cart+""),o(document.body).trigger("wc_cart_button_updated",[e]))},t.prototype.updateFragments=function(t,a){a&&(o.each(a,function(t){o(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),o.each(a,function(t,a){o(t).replaceWith(a),o(t).stop(!0).css("opacity","1").unblock()}),o(document.body).trigger("wc_fragments_loaded"))},new t}); !function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(m){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,!0!==i[s]&&(f+="="+i[s]));return document.cookie=n+"="+r+f}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u'),i(".password-input").append(''),i(".show-password-input").click(function(){i(this).toggleClass("display-password"),i(this).hasClass("display-password")?i(this).siblings(['input[name="password"]','input[type="password"]']).prop("type","text"):i(this).siblings('input[name="password"]').prop("type","password")})}); jQuery(function(r){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,o=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function a(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function s(e){t&&(localStorage.setItem(o,e),sessionStorage.setItem(o,e))}var e={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(e){e&&e.fragments&&(r.each(e.fragments,function(e,t){r(e).replaceWith(t)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(e.fragments)),s(e.cart_hash),e.cart_hash&&a()),r(document.body).trigger("wc_fragments_refreshed"))},error:function(){r(document.body).trigger("wc_fragments_ajax_error")}};function n(){r.ajax(e)}if(t){var i=null;r(document.body).on("wc_fragment_refresh updated_wc_div",function(){n()}),r(document.body).on("added_to_cart removed_from_cart",function(e,t,r){var n=sessionStorage.getItem(o);null!==n&&n!==undefined&&""!==n||a(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),s(r)}),r(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(n,864e5)}),r(window).on("storage onstorage",function(e){o===e.originalEvent.key&&localStorage.getItem(o)!==sessionStorage.getItem(o)&&n()}),r(window).on("pageshow",function(e){e.originalEvent.persisted&&(r(".widget_shopping_cart_content").empty(),r(document.body).trigger("wc_fragment_refresh"))});try{var c=r.parseJSON(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(o),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=1*m+864e5,w=(new Date).getTime();if(d=0)&&b(c,!e)}}),a("").outerWidth(1).jquery||a.each(["Width","Height"],function(b,c){function d(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.css(b,"padding"+this))||0,d&&(c-=parseFloat(a.css(b,"border"+this+"Width"))||0),f&&(c-=parseFloat(a.css(b,"margin"+this))||0)}),c}var e="Width"===c?["Left","Right"]:["Top","Bottom"],f=c.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+c]=function(b){return void 0===b?g["inner"+c].call(this):this.each(function(){a(this).css(f,d(this,b)+"px")})},a.fn["outer"+c]=function(b,e){return"number"!=typeof b?g["outer"+c].call(this,b):this.each(function(){a(this).css(f,d(this,b,!0,e)+"px")})}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a("").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(b){return function(c){return arguments.length?b.call(this,a.camelCase(c)):b.call(this)}}(a.fn.removeData)),a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),a.fn.extend({focus:function(b){return function(c,d){return"number"==typeof c?this.each(function(){var b=this;setTimeout(function(){a(b).focus(),d&&d.call(b)},c)}):b.apply(this,arguments)}}(a.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(void 0!==b)return this.css("zIndex",b);if(this.length)for(var c,d,e=a(this[0]);e.length&&e[0]!==document;){if(c=e.css("position"),("absolute"===c||"relative"===c||"fixed"===c)&&(d=parseInt(e.css("zIndex"),10),!isNaN(d)&&0!==d))return d;e=e.parent()}return 0}}),a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d)f.plugins[e]=f.plugins[e]||[],f.plugins[e].push([c,d[e]])},call:function(a,b,c,d){var e,f=a.plugins[b];if(f&&(d||a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType))for(e=0;e3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(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("bsTransitionEnd",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(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.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")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.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},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); ;(function(window,document,$,undefined){'use strict';if(!$){return;} if($.fn.fancybox){if('console'in window){console.log('fancyBox already initialized');} return;} var defaults={loop:false,margin:[44,0],gutter:50,keyboard:true,arrows:true,infobar:true,toolbar:true,buttons:['slideShow','fullScreen','thumbs','share','close'],idleTime:3,smallBtn:'auto',protect:false,modal:false,image:{preload:"auto"},ajax:{settings:{data:{fancybox:true}}},iframe:{tpl:'',preload:true,css:{},attr:{scrolling:'auto'}},defaultType:'image',animationEffect:"zoom",animationDuration:500,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:'',baseClass:'',baseTpl:'',spinnerTpl:'
    ',errorTpl:'

    {{ERROR}}

    ',btnTpl:{download:'
    '+''+''+''+'',zoom:'',close:'',smallBtn:'',arrowLeft:'',arrowRight:''},parentEl:'body',autoFocus:false,backFocus:true,trapFocus:true,fullScreen:{autoStart:false,},touch:{vertical:true,momentum:true},hash:null,media:{},slideShow:{autoStart:false,speed:4000},thumbs:{autoStart:false,hideOnClose:true,parentEl:'.fancybox-container',axis:'y'},wheel:'auto',onInit:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeClose:$.noop,afterClose:$.noop,onActivate:$.noop,onDeactivate:$.noop,clickContent:function(current,event){return current.type==='image'?'zoom':false;},clickSlide:'close',clickOutside:'close',dblclickContent:false,dblclickSlide:false,dblclickOutside:false,mobile:{idleTime:false,margin:0,clickContent:function(current,event){return current.type==='image'?'toggleControls':false;},clickSlide:function(current,event){return current.type==='image'?'toggleControls':'close';},dblclickContent:function(current,event){return current.type==='image'?'zoom':false;},dblclickSlide:function(current,event){return current.type==='image'?'zoom':false;}},lang:'en',i18n:{'en':{CLOSE:'Close',NEXT:'Next',PREV:'Previous',ERROR:'The requested content cannot be loaded.
    Please try again later.',PLAY_START:'Start slideshow',PLAY_STOP:'Pause slideshow',FULL_SCREEN:'Full screen',THUMBS:'Thumbnails',DOWNLOAD:'Download',SHARE:'Share',ZOOM:'Zoom'},'de':{CLOSE:'Schliessen',NEXT:'Weiter',PREV:'Zurück',ERROR:'Die angeforderten Daten konnten nicht geladen werden.
    Bitte versuchen Sie es später nochmal.',PLAY_START:'Diaschau starten',PLAY_STOP:'Diaschau beenden',FULL_SCREEN:'Vollbild',THUMBS:'Vorschaubilder',DOWNLOAD:'Herunterladen',SHARE:'Teilen',ZOOM:'Maßstab'}}};var $W=$(window);var $D=$(document);var called=0;var isQuery=function(obj){return obj&&obj.hasOwnProperty&&obj instanceof $;};var requestAFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(callback){return window.setTimeout(callback,1000/60);};})();var transitionEnd=(function(){var t,el=document.createElement("fakeelement");var transitions={"transition":"transitionend","OTransition":"oTransitionEnd","MozTransition":"transitionend","WebkitTransition":"webkitTransitionEnd"};for(t in transitions){if(el.style[t]!==undefined){return transitions[t];}} return'transitionend';})();var forceRedraw=function($el){return($el&&$el.length&&$el[0].offsetHeight);};var FancyBox=function(content,opts,index){var self=this;self.opts=$.extend(true,{index:index},$.fancybox.defaults,opts||{});if($.fancybox.isMobile){self.opts=$.extend(true,{},self.opts,self.opts.mobile);} if(opts&&$.isArray(opts.buttons)){self.opts.buttons=opts.buttons;} self.id=self.opts.id||++called;self.group=[];self.currIndex=parseInt(self.opts.index,10)||0;self.prevIndex=null;self.prevPos=null;self.currPos=0;self.firstRun=null;self.createGroup(content);if(!self.group.length){return;} self.$lastFocus=$(document.activeElement).blur();self.slides={};self.init();};$.extend(FancyBox.prototype,{init:function(){var self=this,firstItem=self.group[self.currIndex],firstItemOpts=firstItem.opts,scrollbarWidth=$.fancybox.scrollbarWidth,$scrollDiv,$container,buttonStr;self.scrollTop=$D.scrollTop();self.scrollLeft=$D.scrollLeft();if(!$.fancybox.getInstance()){$('body').addClass('fancybox-active');if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream){if(firstItem.type!=='image'){$('body').css('top',$('body').scrollTop()*-1).addClass('fancybox-iosfix');}}else if(!$.fancybox.isMobile&&document.body.scrollHeight>window.innerHeight){if(scrollbarWidth===undefined){$scrollDiv=$('
    ').appendTo('body');scrollbarWidth=$.fancybox.scrollbarWidth=$scrollDiv[0].offsetWidth-$scrollDiv[0].clientWidth;$scrollDiv.remove();} $('head').append('');$('body').addClass('compensate-for-scrollbar');}} buttonStr='';$.each(firstItemOpts.buttons,function(index,value){buttonStr+=(firstItemOpts.btnTpl[value]||'');});$container=$(self.translate(self,firstItemOpts.baseTpl.replace('\{\{buttons\}\}',buttonStr).replace('\{\{arrows\}\}',firstItemOpts.btnTpl.arrowLeft+firstItemOpts.btnTpl.arrowRight))).attr('id','fancybox-container-'+self.id).addClass('fancybox-is-hidden').addClass(firstItemOpts.baseClass).data('FancyBox',self).appendTo(firstItemOpts.parentEl);self.$refs={container:$container};['bg','inner','infobar','toolbar','stage','caption','navigation'].forEach(function(item){self.$refs[item]=$container.find('.fancybox-'+item);});self.trigger('onInit');self.activate();self.jumpTo(self.currIndex);},translate:function(obj,str){var arr=obj.opts.i18n[obj.opts.lang];return str.replace(/\{\{(\w+)\}\}/g,function(match,n){var value=arr[n];if(value===undefined){return match;} return value;});},createGroup:function(content){var self=this;var items=$.makeArray(content);$.each(items,function(i,item){var obj={},opts={},$item,type,found,src,srcParts;if($.isPlainObject(item)){obj=item;opts=item.opts||item;}else if($.type(item)==='object'&&$(item).length){$item=$(item);opts=$item.data();opts=$.extend({},opts,opts.options||{});opts.$orig=$item;obj.src=opts.src||$item.attr('href');if(!obj.type&&!obj.src){obj.type='inline';obj.src=item;}}else{obj={type:'html',src:item+''};} obj.opts=$.extend(true,{},self.opts,opts);if($.isArray(opts.buttons)){obj.opts.buttons=opts.buttons;} type=obj.type||obj.opts.type;src=obj.src||'';if(!type&&src){if(src.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)){type='image';}else if(src.match(/\.(pdf)((\?|#).*)?$/i)){type='pdf';}else if(found=src.match(/\.(mp4|mov|ogv)((\?|#).*)?$/i)){type='video';if(!obj.opts.videoFormat){obj.opts.videoFormat='video/'+(found[1]==='ogv'?'ogg':found[1]);}}else if(src.charAt(0)==='#'){type='inline';}} if(type){obj.type=type;}else{self.trigger('objectNeedsType',obj);} obj.index=self.group.length;if(obj.opts.$orig&&!obj.opts.$orig.length){delete obj.opts.$orig;} if(!obj.opts.$thumb&&obj.opts.$orig){obj.opts.$thumb=obj.opts.$orig.find('img:first');} if(obj.opts.$thumb&&!obj.opts.$thumb.length){delete obj.opts.$thumb;} if($.type(obj.opts.caption)==='function'){obj.opts.caption=obj.opts.caption.apply(item,[self,obj]);} if($.type(self.opts.caption)==='function'){obj.opts.caption=self.opts.caption.apply(item,[self,obj]);} if(!(obj.opts.caption instanceof $)){obj.opts.caption=obj.opts.caption===undefined?'':obj.opts.caption+'';} if(type==='ajax'){srcParts=src.split(/\s+/,2);if(srcParts.length>1){obj.src=srcParts.shift();obj.opts.filter=srcParts.shift();}} if(obj.opts.smallBtn=='auto'){if($.inArray(type,['html','inline','ajax'])>-1){obj.opts.toolbar=false;obj.opts.smallBtn=true;}else{obj.opts.smallBtn=false;}} if(type==='pdf'){obj.type='iframe';obj.opts.iframe.preload=false;} if(obj.opts.modal){obj.opts=$.extend(true,obj.opts,{infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:false,clickSlide:false,clickOutside:false,dblclickContent:false,dblclickSlide:false,dblclickOutside:false});} self.group.push(obj);});},addEvents:function(){var self=this;self.removeEvents();self.$refs.container.on('click.fb-close','[data-fancybox-close]',function(e){e.stopPropagation();e.preventDefault();self.close(e);}).on('click.fb-prev touchend.fb-prev','[data-fancybox-prev]',function(e){e.stopPropagation();e.preventDefault();self.previous();}).on('click.fb-next touchend.fb-next','[data-fancybox-next]',function(e){e.stopPropagation();e.preventDefault();self.next();}).on('click.fb','[data-fancybox-zoom]',function(e){self[self.isScaledDown()?'scaleToActual':'scaleToFit']();});$W.on('orientationchange.fb resize.fb',function(e){if(e&&e.originalEvent&&e.originalEvent.type==="resize"){requestAFrame(function(){self.update();});}else{self.$refs.stage.hide();setTimeout(function(){self.$refs.stage.show();self.update();},600);}});$D.on('focusin.fb',function(e){var instance=$.fancybox?$.fancybox.getInstance():null;if(instance.isClosing||!instance.current||!instance.current.opts.trapFocus||$(e.target).hasClass('fancybox-container')||$(e.target).is(document)){return;} if(instance&&$(e.target).css('position')!=='fixed'&&!instance.$refs.container.has(e.target).length){e.stopPropagation();instance.focus();$W.scrollTop(self.scrollTop).scrollLeft(self.scrollLeft);}});$D.on('keydown.fb',function(e){var current=self.current,keycode=e.keyCode||e.which;if(!current||!current.opts.keyboard){return;} if($(e.target).is('input')||$(e.target).is('textarea')){return;} if(keycode===8||keycode===27){e.preventDefault();self.close(e);return;} if(keycode===37||keycode===38){e.preventDefault();self.previous();return;} if(keycode===39||keycode===40){e.preventDefault();self.next();return;} self.trigger('afterKeydown',e,keycode);});if(self.group[self.currIndex].opts.idleTime){self.idleSecondsCounter=0;$D.on('mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle',function(e){self.idleSecondsCounter=0;if(self.isIdle){self.showControls();} self.isIdle=false;});self.idleInterval=window.setInterval(function(){self.idleSecondsCounter++;if(self.idleSecondsCounter>=self.group[self.currIndex].opts.idleTime&&!self.isDragging){self.isIdle=true;self.idleSecondsCounter=0;self.hideControls();}},1000);}},removeEvents:function(){var self=this;$W.off('orientationchange.fb resize.fb');$D.off('focusin.fb keydown.fb .fb-idle');this.$refs.container.off('.fb-close .fb-prev .fb-next');if(self.idleInterval){window.clearInterval(self.idleInterval);self.idleInterval=null;}},previous:function(duration){return this.jumpTo(this.currPos-1,duration);},next:function(duration){return this.jumpTo(this.currPos+1,duration);},jumpTo:function(pos,duration,slide){var self=this,firstRun,loop,current,previous,canvasWidth,currentPos,transitionProps;var groupLen=self.group.length;if(self.isDragging||self.isClosing||(self.isAnimating&&self.firstRun)){return;} pos=parseInt(pos,10);loop=self.current?self.current.opts.loop:self.opts.loop;if(!loop&&(pos<0||pos>=groupLen)){return false;} firstRun=self.firstRun=(self.firstRun===null);if(groupLen<2&&!firstRun&&!!self.isDragging){return;} previous=self.current;self.prevIndex=self.currIndex;self.prevPos=self.currPos;current=self.createSlide(pos);if(groupLen>1){if(loop||current.index>0){self.createSlide(pos-1);} if(loop||current.indexcurrent.pos?'next':'previous');previous.$slide.removeClass('fancybox-slide--complete fancybox-slide--current fancybox-slide--next fancybox-slide--previous');previous.isComplete=false;if(!duration||(!current.isMoved&&!current.opts.transitionEffect)){return;} if(current.isMoved){previous.$slide.addClass(transitionProps);}else{transitionProps='fancybox-animated '+transitionProps+' fancybox-fx-'+current.opts.transitionEffect;$.fancybox.animate(previous.$slide,transitionProps,duration,function(){previous.$slide.removeClass(transitionProps).removeAttr('style');});}},createSlide:function(pos){var self=this;var $slide;var index;index=pos%self.group.length;index=index<0?self.group.length+index:index;if(!self.slides[pos]&&self.group[index]){$slide=$('
    ').appendTo(self.$refs.stage);self.slides[pos]=$.extend(true,{},self.group[index],{pos:pos,$slide:$slide,isLoaded:false,});self.updateSlide(self.slides[pos]);} return self.slides[pos];},scaleToActual:function(x,y,duration){var self=this;var current=self.current;var $what=current.$content;var imgPos,posX,posY,scaleX,scaleY;var canvasWidth=parseInt(current.$slide.width(),10);var canvasHeight=parseInt(current.$slide.height(),10);var newImgWidth=current.width;var newImgHeight=current.height;if(!(current.type=='image'&&!current.hasError)||!$what||self.isAnimating){return;} $.fancybox.stop($what);self.isAnimating=true;x=x===undefined?canvasWidth*0.5:x;y=y===undefined?canvasHeight*0.5:y;imgPos=$.fancybox.getTranslate($what);scaleX=newImgWidth/imgPos.width;scaleY=newImgHeight/imgPos.height;posX=(canvasWidth*0.5-newImgWidth*0.5);posY=(canvasHeight*0.5-newImgHeight*0.5);if(newImgWidth>canvasWidth){posX=imgPos.left*scaleX-((x*scaleX)-x);if(posX>0){posX=0;} if(posXcanvasHeight){posY=imgPos.top*scaleY-((y*scaleY)-y);if(posY>0){posY=0;} if(posYfitPos.width||current.height>fitPos.height){return true;}} return false;},isScaledDown:function(){var self=this;var current=self.current;var $what=current.$content;var rez=false;if($what){rez=$.fancybox.getTranslate($what);rez=rez.width1||Math.abs($what.height()-rez.height)>1;} return rez;},loadSlide:function(slide){var self=this,type,$slide;var ajaxLoad;if(slide.isLoading){return;} if(slide.isLoaded){return;} slide.isLoading=true;self.trigger('beforeLoad',slide);type=slide.type;$slide=slide.$slide;$slide.off('refresh').trigger('onReset').addClass('fancybox-slide--'+(type||'unknown')).addClass(slide.opts.slideClass);switch(type){case'image':self.setImage(slide);break;case'iframe':self.setIframe(slide);break;case'html':self.setContent(slide,slide.src||slide.content);break;case'inline':if($(slide.src).length){self.setContent(slide,$(slide.src));}else{self.setError(slide);} break;case'ajax':self.showLoading(slide);ajaxLoad=$.ajax($.extend({},slide.opts.ajax.settings,{url:slide.src,success:function(data,textStatus){if(textStatus==='success'){self.setContent(slide,data);}},error:function(jqXHR,textStatus){if(jqXHR&&textStatus!=='abort'){self.setError(slide);}}}));$slide.one('onReset',function(){ajaxLoad.abort();});break;case'video':self.setContent(slide,'');break;default:self.setError(slide);break;} return true;},setImage:function(slide){var self=this;var srcset=slide.opts.srcset||slide.opts.image.srcset;var found,temp,pxRatio,windowWidth;if(srcset){pxRatio=window.devicePixelRatio||1;windowWidth=window.innerWidth*pxRatio;temp=srcset.split(',').map(function(el){var ret={};el.trim().split(/\s+/).forEach(function(el,i){var value=parseInt(el.substring(0,el.length-1),10);if(i===0){return(ret.url=el);} if(value){ret.value=value;ret.postfix=el[el.length-1];}});return ret;});temp.sort(function(a,b){return a.value-b.value;});for(var j=0;j=windowWidth)||(el.postfix==='x'&&el.value>=pxRatio)){found=el;break;}} if(!found&&temp.length){found=temp[temp.length-1];} if(found){slide.src=found.url;if(slide.width&&slide.height&&found.postfix=='w'){slide.height=(slide.width/slide.height)*found.value;slide.width=found.value;}}} slide.$content=$('
    ').addClass('fancybox-is-hidden').appendTo(slide.$slide);if(slide.opts.preload!==false&&slide.opts.width&&slide.opts.height&&(slide.opts.thumb||slide.opts.$thumb)){slide.width=slide.opts.width;slide.height=slide.opts.height;slide.$ghost=$('').one('error',function(){$(this).remove();slide.$ghost=null;self.setBigImage(slide);}).one('load',function(){self.afterLoad(slide);self.setBigImage(slide);}).addClass('fancybox-image').appendTo(slide.$content).attr('src',slide.opts.thumb||slide.opts.$thumb.attr('src'));}else{self.setBigImage(slide);}},setBigImage:function(slide){var self=this;var $img=$('');slide.$image=$img.one('error',function(){self.setError(slide);}).one('load',function(){clearTimeout(slide.timouts);slide.timouts=null;if(self.isClosing){return;} slide.width=slide.opts.width||this.naturalWidth;slide.height=slide.opts.height||this.naturalHeight;if(slide.opts.image.srcset){$img.attr('sizes','100vw').attr('srcset',slide.opts.image.srcset);} self.hideLoading(slide);if(slide.$ghost){slide.timouts=setTimeout(function(){slide.timouts=null;slide.$ghost.hide();},Math.min(300,Math.max(1000,slide.height/1600)));}else{self.afterLoad(slide);}}).addClass('fancybox-image').attr('src',slide.src).appendTo(slide.$content);if(($img[0].complete||$img[0].readyState=="complete")&&$img[0].naturalWidth&&$img[0].naturalHeight){$img.trigger('load');}else if($img[0].error){$img.trigger('error');}else{slide.timouts=setTimeout(function(){if(!$img[0].complete&&!slide.hasError){self.showLoading(slide);}},100);}},setIframe:function(slide){var self=this,opts=slide.opts.iframe,$slide=slide.$slide,$iframe;slide.$content=$('
    ').css(opts.css).appendTo($slide);$iframe=$(opts.tpl.replace(/\{rnd\}/g,new Date().getTime())).attr(opts.attr).appendTo(slide.$content);if(opts.preload){self.showLoading(slide);$iframe.on('load.fb error.fb',function(e){this.isReady=1;slide.$slide.trigger('refresh');self.afterLoad(slide);});$slide.on('refresh.fb',function(){var $wrap=slide.$content,frameWidth=opts.css.width,frameHeight=opts.css.height,scrollWidth,$contents,$body;if($iframe[0].isReady!==1){return;} try{$contents=$iframe.contents();$body=$contents.find('body');}catch(ignore){} if($body&&$body.length){if(frameWidth===undefined){scrollWidth=$iframe[0].contentWindow.document.documentElement.scrollWidth;frameWidth=Math.ceil($body.outerWidth(true)+($wrap.width()-scrollWidth));frameWidth+=$wrap.outerWidth()-$wrap.innerWidth();} if(frameHeight===undefined){frameHeight=Math.ceil($body.outerHeight(true));frameHeight+=$wrap.outerHeight()-$wrap.innerHeight();} if(frameWidth){$wrap.width(frameWidth);} if(frameHeight){$wrap.height(frameHeight);}} $wrap.removeClass('fancybox-is-hidden');});}else{this.afterLoad(slide);} $iframe.attr('src',slide.src);if(slide.opts.smallBtn===true){slide.$content.prepend(self.translate(slide,slide.opts.btnTpl.smallBtn));} $slide.one('onReset',function(){try{$(this).find('iframe').hide().attr('src','//about:blank');}catch(ignore){} $(this).empty();slide.isLoaded=false;});},setContent:function(slide,content){var self=this;if(self.isClosing){return;} self.hideLoading(slide);slide.$slide.empty();if(isQuery(content)&&content.parent().length){content.parent('.fancybox-slide--inline').trigger('onReset');slide.$placeholder=$('
    ').hide().insertAfter(content);content.css('display','inline-block');}else if(!slide.hasError){if($.type(content)==='string'){content=$('
    ').append($.trim(content)).contents();if(content[0].nodeType===3){content=$('
    ').html(content);}} if(slide.opts.filter){content=$('
    ').html(content).find(slide.opts.filter);}} slide.$slide.one('onReset',function(){$(this).find('video,audio').trigger('pause');if(slide.$placeholder){slide.$placeholder.after(content.hide()).remove();slide.$placeholder=null;} if(slide.$smallBtn){slide.$smallBtn.remove();slide.$smallBtn=null;} if(!slide.hasError){$(this).empty();slide.isLoaded=false;}});slide.$content=$(content).appendTo(slide.$slide);this.afterLoad(slide);},setError:function(slide){slide.hasError=true;slide.$slide.removeClass('fancybox-slide--'+slide.type);this.setContent(slide,this.translate(slide,slide.opts.errorTpl));},showLoading:function(slide){var self=this;slide=slide||self.current;if(slide&&!slide.$spinner){slide.$spinner=$(self.opts.spinnerTpl).appendTo(slide.$slide);}},hideLoading:function(slide){var self=this;slide=slide||self.current;if(slide&&slide.$spinner){slide.$spinner.remove();delete slide.$spinner;}},afterLoad:function(slide){var self=this;if(self.isClosing){return;} slide.isLoading=false;slide.isLoaded=true;self.trigger('afterLoad',slide);self.hideLoading(slide);if(slide.opts.smallBtn&&!slide.$smallBtn){slide.$smallBtn=$(self.translate(slide,slide.opts.btnTpl.smallBtn)).appendTo(slide.$content.filter('div,form').first());} if(slide.opts.protect&&slide.$content&&!slide.hasError){slide.$content.on('contextmenu.fb',function(e){if(e.button==2){e.preventDefault();} return true;});if(slide.type==='image'){$('
    ').appendTo(slide.$content);}} self.revealContent(slide);},revealContent:function(slide){var self=this;var $slide=slide.$slide;var effect,effectClassName,duration,opacity,end,start=false;effect=slide.opts[self.firstRun?'animationEffect':'transitionEffect'];duration=slide.opts[self.firstRun?'animationDuration':'transitionDuration'];duration=parseInt(slide.forcedDuration===undefined?duration:slide.forcedDuration,10);if(slide.isMoved||slide.pos!==self.currPos||!duration){effect=false;} if(effect==='zoom'&&!(slide.pos===self.currPos&&duration&&slide.type==='image'&&!slide.hasError&&(start=self.getThumbPos(slide)))){effect='fade';} if(effect==='zoom'){end=self.getFitPos(slide);end.scaleX=end.width/start.width;end.scaleY=end.height/start.height;delete end.width;delete end.height;opacity=slide.opts.zoomOpacity;if(opacity=='auto'){opacity=Math.abs(slide.width/slide.height-start.width/start.height)>0.1;} if(opacity){start.opacity=0.1;end.opacity=1;} $.fancybox.setTranslate(slide.$content.removeClass('fancybox-is-hidden'),start);forceRedraw(slide.$content);$.fancybox.animate(slide.$content,end,duration,function(){self.complete();});return;} self.updateSlide(slide);if(!effect){forceRedraw($slide);slide.$content.removeClass('fancybox-is-hidden');if(slide.pos===self.currPos){self.complete();} return;} $.fancybox.stop($slide);effectClassName='fancybox-animated fancybox-slide--'+(slide.pos>=self.prevPos?'next':'previous')+' fancybox-fx-'+effect;$slide.removeAttr('style').removeClass('fancybox-slide--current fancybox-slide--next fancybox-slide--previous').addClass(effectClassName);slide.$content.removeClass('fancybox-is-hidden');forceRedraw($slide);$.fancybox.animate($slide,'fancybox-slide--current',duration,function(e){$slide.removeClass(effectClassName).removeAttr('style');if(slide.pos===self.currPos){self.complete();}},true);},getThumbPos:function(slide){var self=this;var rez=false;var isElementVisible=function($el){var element=$el[0];var elementRect=element.getBoundingClientRect();var parentRects=[];var visibleInAllParents;while(element.parentElement!==null){if($(element.parentElement).css('overflow')==='hidden'||$(element.parentElement).css('overflow')==='auto'){parentRects.push(element.parentElement.getBoundingClientRect());} element=element.parentElement;} visibleInAllParents=parentRects.every(function(parentRect){var visiblePixelX=Math.min(elementRect.right,parentRect.right)-Math.max(elementRect.left,parentRect.left);var visiblePixelY=Math.min(elementRect.bottom,parentRect.bottom)-Math.max(elementRect.top,parentRect.top);return visiblePixelX>0&&visiblePixelY>0;});return visibleInAllParents&&elementRect.bottom>0&&elementRect.right>0&&elementRect.left<$(window).width()&&elementRect.top<$(window).height();};var $thumb=slide.opts.$thumb;var thumbPos=$thumb?$thumb.offset():0;var slidePos;if(thumbPos&&$thumb[0].ownerDocument===document&&isElementVisible($thumb)){slidePos=self.$refs.stage.offset();rez={top:thumbPos.top-slidePos.top+parseFloat($thumb.css("border-top-width")||0),left:thumbPos.left-slidePos.left+parseFloat($thumb.css("border-left-width")||0),width:$thumb.width(),height:$thumb.height(),scaleX:1,scaleY:1};} return rez;},complete:function(){var self=this,current=self.current,slides={},promise;if(current.isMoved||!current.isLoaded||current.isComplete){return;} current.isComplete=true;current.$slide.siblings().trigger('onReset');self.preload('inline');forceRedraw(current.$slide);current.$slide.addClass('fancybox-slide--complete');$.each(self.slides,function(key,slide){if(slide.pos>=self.currPos-1&&slide.pos<=self.currPos+1){slides[slide.pos]=slide;}else if(slide){$.fancybox.stop(slide.$slide);slide.$slide.off().remove();}});self.slides=slides;self.updateCursor();self.trigger('afterShow');current.$slide.find('video,audio').first().trigger('play');if($(document.activeElement).is('[disabled]')||(current.opts.autoFocus&&!(current.type=='image'||current.type==='iframe'))){self.focus();}},preload:function(type){var self=this,next=self.slides[self.currPos+1],prev=self.slides[self.currPos-1];if(next&&next.type===type){self.loadSlide(next);} if(prev&&prev.type===type){self.loadSlide(prev);}},focus:function(){var current=this.current;var $el;if(this.isClosing){return;} if(current&¤t.isComplete){$el=current.$slide.find('input[autofocus]:enabled:visible:first');if(!$el.length){$el=current.$slide.find('button,:input,[tabindex],a').filter(':enabled:visible:first');}} $el=$el&&$el.length?$el:this.$refs.container;$el.focus();},activate:function(){var self=this;$('.fancybox-container').each(function(){var instance=$(this).data('FancyBox');if(instance&&instance.id!==self.id&&!instance.isClosing){instance.trigger('onDeactivate');instance.removeEvents();instance.isVisible=false;}});self.isVisible=true;if(self.current||self.isIdle){self.update();self.updateControls();} self.trigger('onActivate');self.addEvents();},close:function(e,d){var self=this;var current=self.current;var effect,duration;var $what,opacity,start,end;var done=function(){self.cleanUp(e);};if(self.isClosing){return false;} self.isClosing=true;if(self.trigger('beforeClose',e)===false){self.isClosing=false;requestAFrame(function(){self.update();});return false;} self.removeEvents();if(current.timouts){clearTimeout(current.timouts);} $what=current.$content;effect=current.opts.animationEffect;duration=$.isNumeric(d)?d:(effect?current.opts.animationDuration:0);current.$slide.off(transitionEnd).removeClass('fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated');current.$slide.siblings().trigger('onReset').remove();if(duration){self.$refs.container.removeClass('fancybox-is-open').addClass('fancybox-is-closing');} self.hideLoading(current);self.hideControls();self.updateCursor();if(effect==='zoom'&&!(e!==true&&$what&&duration&¤t.type==='image'&&!current.hasError&&(end=self.getThumbPos(current)))){effect='fade';} if(effect==='zoom'){$.fancybox.stop($what);start=$.fancybox.getTranslate($what);start.width=start.width*start.scaleX;start.height=start.height*start.scaleY;opacity=current.opts.zoomOpacity;if(opacity=='auto'){opacity=Math.abs(current.width/current.height-end.width/end.height)>0.1;} if(opacity){end.opacity=0;} start.scaleX=start.width/end.width;start.scaleY=start.height/end.height;start.width=end.width;start.height=end.height;$.fancybox.setTranslate(current.$content,start);forceRedraw(current.$content);$.fancybox.animate(current.$content,end,duration,done);return true;} if(effect&&duration){if(e===true){setTimeout(done,duration);}else{$.fancybox.animate(current.$slide.removeClass('fancybox-slide--current'),'fancybox-animated fancybox-slide--previous fancybox-fx-'+effect,duration,done);}}else{done();} return true;},cleanUp:function(e){var self=this,$body=$('body'),instance,offset;self.current.$slide.trigger('onReset');self.$refs.container.empty().remove();self.trigger('afterClose',e);if(self.$lastFocus&&!!self.current.opts.backFocus){self.$lastFocus.focus();} self.current=null;instance=$.fancybox.getInstance();if(instance){instance.activate();}else{$W.scrollTop(self.scrollTop).scrollLeft(self.scrollLeft);$body.removeClass('fancybox-active compensate-for-scrollbar');if($body.hasClass('fancybox-iosfix')){offset=parseInt(document.body.style.top,10);$body.removeClass('fancybox-iosfix').css('top','').scrollTop(offset*-1);} $('#fancybox-style-noscroll').remove();}},trigger:function(name,slide){var args=Array.prototype.slice.call(arguments,1),self=this,obj=slide&&slide.opts?slide:self.current,rez;if(obj){args.unshift(obj);}else{obj=self;} args.unshift(self);if($.isFunction(obj.opts[name])){rez=obj.opts[name].apply(obj,args);} if(rez===false){return rez;} if(name==='afterClose'||!self.$refs){$D.trigger(name+'.fb',args);}else{self.$refs.container.trigger(name+'.fb',args);}},updateControls:function(force){var self=this;var current=self.current,index=current.index,caption=current.opts.caption,$container=self.$refs.container,$caption=self.$refs.caption;current.$slide.trigger('refresh');self.$caption=caption&&caption.length?$caption.html(caption):null;if(!self.isHiddenControls&&!self.isIdle){self.showControls();} $container.find('[data-fancybox-count]').html(self.group.length);$container.find('[data-fancybox-index]').html(index+1);$container.find('[data-fancybox-prev]').prop('disabled',(!current.opts.loop&&index<=0));$container.find('[data-fancybox-next]').prop('disabled',(!current.opts.loop&&index>=self.group.length-1));if(current.type==='image'){$container.find('[data-fancybox-download]').attr('href',current.opts.image.src||current.src).show();}else{$container.find('[data-fancybox-download],[data-fancybox-zoom]').hide();}},hideControls:function(){this.isHiddenControls=true;this.$refs.container.removeClass('fancybox-show-infobar fancybox-show-toolbar fancybox-show-caption fancybox-show-nav');},showControls:function(){var self=this;var opts=self.current?self.current.opts:self.opts;var $container=self.$refs.container;self.isHiddenControls=false;self.idleSecondsCounter=0;$container.toggleClass('fancybox-show-toolbar',!!(opts.toolbar&&opts.buttons)).toggleClass('fancybox-show-infobar',!!(opts.infobar&&self.group.length>1)).toggleClass('fancybox-show-nav',!!(opts.arrows&&self.group.length>1)).toggleClass('fancybox-is-modal',!!opts.modal);if(self.$caption){$container.addClass('fancybox-show-caption ');}else{$container.removeClass('fancybox-show-caption');}},toggleControls:function(){if(this.isHiddenControls){this.showControls();}else{this.hideControls();}},});$.fancybox={version:"3.2.10",defaults:defaults,getInstance:function(command){var instance=$('.fancybox-container:not(".fancybox-is-closing"):last').data('FancyBox');var args=Array.prototype.slice.call(arguments,1);if(instance instanceof FancyBox){if($.type(command)==='string'){instance[command].apply(instance,args);}else if($.type(command)==='function'){command.apply(instance,args);} return instance;} return false;},open:function(items,opts,index){return new FancyBox(items,opts,index);},close:function(all){var instance=this.getInstance();if(instance){instance.close();if(all===true){this.close();}}},destroy:function(){this.close(true);$D.off('click.fb-start');},isMobile:document.createTouch!==undefined&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(function(){var div=document.createElement('div');return window.getComputedStyle&&window.getComputedStyle(div).getPropertyValue('transform')&&!(document.documentMode&&document.documentMode<11);}()),getTranslate:function($el){var matrix;if(!$el||!$el.length){return false;} matrix=$el.eq(0).css('transform');if(matrix&&matrix.indexOf('matrix')!==-1){matrix=matrix.split('(')[1];matrix=matrix.split(')')[0];matrix=matrix.split(',');}else{matrix=[];} if(matrix.length){if(matrix.length>10){matrix=[matrix[13],matrix[12],matrix[0],matrix[5]];}else{matrix=[matrix[5],matrix[4],matrix[0],matrix[3]];} matrix=matrix.map(parseFloat);}else{matrix=[0,0,1,1];var transRegex=/\.*translate\((.*)px,(.*)px\)/i;var transRez=transRegex.exec($el.eq(0).attr('style'));if(transRez){matrix[0]=parseFloat(transRez[2]);matrix[1]=parseFloat(transRez[1]);}} return{top:matrix[0],left:matrix[1],scaleX:matrix[2],scaleY:matrix[3],opacity:parseFloat($el.css('opacity')),width:$el.width(),height:$el.height()};},setTranslate:function($el,props){var str='';var css={};if(!$el||!props){return;} if(props.left!==undefined||props.top!==undefined){str=(props.left===undefined?$el.position().left:props.left)+'px, '+(props.top===undefined?$el.position().top:props.top)+'px';if(this.use3d){str='translate3d('+str+', 0px)';}else{str='translate('+str+')';}} if(props.scaleX!==undefined&&props.scaleY!==undefined){str=(str.length?str+' ':'')+'scale('+props.scaleX+', '+props.scaleY+')';} if(str.length){css.transform=str;} if(props.opacity!==undefined){css.opacity=props.opacity;} if(props.width!==undefined){css.width=props.width;} if(props.height!==undefined){css.height=props.height;} return $el.css(css);},animate:function($el,to,duration,callback,leaveAnimationName){if($.isFunction(duration)){callback=duration;duration=null;} if(!$.isPlainObject(to)){$el.removeAttr('style');} $el.on(transitionEnd,function(e){if(e&&e.originalEvent&&(!$el.is(e.originalEvent.target)||e.originalEvent.propertyName=='z-index')){return;} $.fancybox.stop($el);if($.isPlainObject(to)){if(to.scaleX!==undefined&&to.scaleY!==undefined){$el.css('transition-duration','');to.width=Math.round($el.width()*to.scaleX);to.height=Math.round($el.height()*to.scaleY);to.scaleX=1;to.scaleY=1;$.fancybox.setTranslate($el,to);} if(leaveAnimationName===false){$el.removeAttr('style');}}else if(leaveAnimationName!==true){$el.removeClass(to);} if($.isFunction(callback)){callback(e);}});if($.isNumeric(duration)){$el.css('transition-duration',duration+'ms');} if($.isPlainObject(to)){$.fancybox.setTranslate($el,to);}else{$el.addClass(to);} if(to.scaleX&&$el.hasClass('fancybox-image-wrap')){$el.parent().addClass('fancybox-is-scaling');} $el.data("timer",setTimeout(function(){$el.trigger('transitionend');},duration+16));},stop:function($el){clearTimeout($el.data("timer"));$el.off('transitionend').css('transition-duration','');if($el.hasClass('fancybox-image-wrap')){$el.parent().removeClass('fancybox-is-scaling');}}};function _run(e){var $target=$(e.currentTarget),opts=e.data?e.data.options:{},value=$target.attr('data-fancybox')||'',index=0,items=[];if(e.isDefaultPrevented()){return;} e.preventDefault();if(value){items=opts.selector?$(opts.selector):(e.data?e.data.items:[]);items=items.length?items.filter('[data-fancybox="'+value+'"]'):$('[data-fancybox="'+value+'"]');index=items.index($target);if(index<0){index=0;}}else{items=[$target];} $.fancybox.open(items,opts,index);} $.fn.fancybox=function(options){var selector;options=options||{};selector=options.selector||false;if(selector){$('body').off('click.fb-start',selector).on('click.fb-start',selector,{options:options},_run);}else{this.off('click.fb-start').on('click.fb-start',{items:this,options:options},_run);} return this;};$D.on('click.fb-start','[data-fancybox]',_run);}(window,document,window.jQuery||jQuery));;(function($){'use strict';var format=function(url,rez,params){if(!url){return;} params=params||'';if($.type(params)==="object"){params=$.param(params,true);} $.each(rez,function(key,value){url=url.replace('$'+key,value||'');});if(params.length){url+=(url.indexOf('?')>0?'&':'?')+params;} return url;};var defaults={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:'transparent',enablejsapi:1,html5:1},paramPlace:8,type:'iframe',url:'//www.youtube.com/embed/$4',thumb:'//img.youtube.com/vi/$4/hqdefault.jpg'},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1,api:1},paramPlace:3,type:'iframe',url:'//player.vimeo.com/video/$2'},metacafe:{matcher:/metacafe.com\/watch\/(\d+)\/(.*)?/,type:'iframe',url:'//www.metacafe.com/embed/$1/?ap=1'},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},type:'iframe',url:'//www.dailymotion.com/embed/video/$1'},vine:{matcher:/vine.co\/v\/([a-zA-Z0-9\?\=\-]+)/,type:'iframe',url:'//vine.co/v/$1/embed/simple'},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:'image',url:'//$1/p/$2/media/?size=l'},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:'iframe',url:function(rez){return'//maps.google.'+rez[2]+'/?ll='+(rez[9]?rez[9]+'&z='+Math.floor(rez[10])+(rez[12]?rez[12].replace(/^\//,"&"):''):rez[12])+'&output='+(rez[12]&&rez[12].indexOf('layer=c')>0?'svembed':'embed');}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:'iframe',url:function(rez){return'//maps.google.'+rez[2]+'/maps?q='+rez[5].replace('query=','q=').replace('api=1','')+'&output=embed';}}};$(document).on('objectNeedsType.fb',function(e,instance,item){var url=item.src||'',type=false,media,thumb,rez,params,urlParams,paramObj,provider;media=$.extend(true,{},defaults,item.opts.media);$.each(media,function(providerName,providerOpts){rez=url.match(providerOpts.matcher);if(!rez){return;} type=providerOpts.type;paramObj={};if(providerOpts.paramPlace&&rez[providerOpts.paramPlace]){urlParams=rez[providerOpts.paramPlace];if(urlParams[0]=='?'){urlParams=urlParams.substring(1);} urlParams=urlParams.split('&');for(var m=0;mel.clientHeight;var horizontal=(overflowX==='scroll'||overflowX==='auto')&&el.scrollWidth>el.clientWidth;return vertical||horizontal;};var isScrollable=function($el){var rez=false;while(true){rez=hasScrollbars($el.get(0));if(rez){break;} $el=$el.parent();if(!$el.length||$el.hasClass('fancybox-stage')||$el.is('body')){break;}} return rez;};var Guestures=function(instance){var self=this;self.instance=instance;self.$bg=instance.$refs.bg;self.$stage=instance.$refs.stage;self.$container=instance.$refs.container;self.destroy();self.$container.on('touchstart.fb.touch mousedown.fb.touch',$.proxy(self,'ontouchstart'));};Guestures.prototype.destroy=function(){this.$container.off('.fb.touch');};Guestures.prototype.ontouchstart=function(e){var self=this;var $target=$(e.target);var instance=self.instance;var current=instance.current;var $content=current.$content;var isTouchDevice=(e.type=='touchstart');if(isTouchDevice){self.$container.off('mousedown.fb.touch');} if(e.originalEvent&&e.originalEvent.button==2){return;} if(!$target.length||isClickable($target)||isClickable($target.parent())){return;} if(!$target.is('img')&&e.originalEvent.clientX>$target[0].clientWidth+$target.offset().left){return;} if(!current||self.instance.isAnimating||self.instance.isClosing){e.stopPropagation();e.preventDefault();return;} self.realPoints=self.startPoints=pointers(e);if(!self.startPoints){return;} e.stopPropagation();self.startEvent=e;self.canTap=true;self.$target=$target;self.$content=$content;self.opts=current.opts.touch;self.isPanning=false;self.isSwiping=false;self.isZooming=false;self.isScrolling=false;self.sliderStartPos=self.sliderLastPos||{top:0,left:0};self.contentStartPos=$.fancybox.getTranslate(self.$content);self.contentLastPos=null;self.startTime=new Date().getTime();self.distanceX=self.distanceY=self.distance=0;self.canvasWidth=Math.round(current.$slide[0].clientWidth);self.canvasHeight=Math.round(current.$slide[0].clientHeight);$(document).off('.fb.touch').on(isTouchDevice?'touchend.fb.touch touchcancel.fb.touch':'mouseup.fb.touch mouseleave.fb.touch',$.proxy(self,"ontouchend")).on(isTouchDevice?'touchmove.fb.touch':'mousemove.fb.touch',$.proxy(self,"ontouchmove"));if($.fancybox.isMobile){document.addEventListener('scroll',self.onscroll,true);} if(!(self.opts||instance.canPan())||!($target.is(self.$stage)||self.$stage.find($target).length)){if($target.is('img')){e.preventDefault();} return;} if(!($.fancybox.isMobile&&(isScrollable($target)||isScrollable($target.parent())))){e.preventDefault();} if(self.startPoints.length===1){if(current.type==='image'&&(self.contentStartPos.width>self.canvasWidth+1||self.contentStartPos.height>self.canvasHeight+1)){$.fancybox.stop(self.$content);self.$content.css('transition-duration','');self.isPanning=true;}else{self.isSwiping=true;} self.$container.addClass('fancybox-controls--isGrabbing');} if(self.startPoints.length===2&&!instance.isAnimating&&!current.hasError&¤t.type==='image'&&(current.isLoaded||current.$ghost)){self.canTap=false;self.isSwiping=false;self.isPanning=false;self.isZooming=true;$.fancybox.stop(self.$content);self.$content.css('transition-duration','');self.centerPointStartX=((self.startPoints[0].x+self.startPoints[1].x)*0.5)-$(window).scrollLeft();self.centerPointStartY=((self.startPoints[0].y+self.startPoints[1].y)*0.5)-$(window).scrollTop();self.percentageOfImageAtPinchPointX=(self.centerPointStartX-self.contentStartPos.left)/self.contentStartPos.width;self.percentageOfImageAtPinchPointY=(self.centerPointStartY-self.contentStartPos.top)/self.contentStartPos.height;self.startDistanceBetweenFingers=distance(self.startPoints[0],self.startPoints[1]);}};Guestures.prototype.onscroll=function(e){self.isScrolling=true;};Guestures.prototype.ontouchmove=function(e){var self=this,$target=$(e.target);if(self.isScrolling||!($target.is(self.$stage)||self.$stage.find($target).length)){self.canTap=false;return;} self.newPoints=pointers(e);if(!(self.opts||self.instance.canPan())||!self.newPoints||!self.newPoints.length){return;} if(!(self.isSwiping&&self.isSwiping===true)){e.preventDefault();} self.distanceX=distance(self.newPoints[0],self.startPoints[0],'x');self.distanceY=distance(self.newPoints[0],self.startPoints[0],'y');self.distance=distance(self.newPoints[0],self.startPoints[0]) if(self.distance>0){if(self.isSwiping){self.onSwipe(e);}else if(self.isPanning){self.onPan();}else if(self.isZooming){self.onZoom();}}};Guestures.prototype.onSwipe=function(e){var self=this,swiping=self.isSwiping,left=self.sliderStartPos.left||0,angle;if(swiping===true){if(Math.abs(self.distance)>10){self.canTap=false;if(self.instance.group.length<2&&self.opts.vertical){self.isSwiping='y';}else if(self.instance.isDragging||self.opts.vertical===false||(self.opts.vertical==='auto'&&$(window).width()>800)){self.isSwiping='x';}else{angle=Math.abs(Math.atan2(self.distanceY,self.distanceX)*180/Math.PI);self.isSwiping=(angle>45&&angle<135)?'y':'x';} self.canTap=false;if(self.isSwiping==='y'&&$.fancybox.isMobile&&(isScrollable(self.$target)||isScrollable(self.$target.parent()))){self.isScrolling=true;return;} self.instance.isDragging=self.isSwiping;self.startPoints=self.newPoints;$.each(self.instance.slides,function(index,slide){$.fancybox.stop(slide.$slide);slide.$slide.css('transition-duration','');slide.inTransition=false;if(slide.pos===self.instance.current.pos){self.sliderStartPos.left=$.fancybox.getTranslate(slide.$slide).left;}});if(self.instance.SlideShow&&self.instance.SlideShow.isActive){self.instance.SlideShow.stop();}} return;} if(swiping=='x'){if(self.distanceX>0&&(self.instance.group.length<2||(self.instance.current.index===0&&!self.instance.current.opts.loop))){left=left+Math.pow(self.distanceX,0.8);}else if(self.distanceX<0&&(self.instance.group.length<2||(self.instance.current.index===self.instance.group.length-1&&!self.instance.current.opts.loop))){left=left-Math.pow(-self.distanceX,0.8);}else{left=left+self.distanceX;}} self.sliderLastPos={top:swiping=='x'?0:self.sliderStartPos.top+self.distanceY,left:left};if(self.requestId){cancelAFrame(self.requestId);self.requestId=null;} self.requestId=requestAFrame(function(){if(self.sliderLastPos){$.each(self.instance.slides,function(index,slide){var pos=slide.pos-self.instance.currPos;$.fancybox.setTranslate(slide.$slide,{top:self.sliderLastPos.top,left:self.sliderLastPos.left+(pos*self.canvasWidth)+(pos*slide.opts.gutter)});});self.$container.addClass('fancybox-is-sliding');}});};Guestures.prototype.onPan=function(){var self=this;if(distance(self.newPoints[0],self.realPoints[0])<($.fancybox.isMobile?10:5)){self.startPoints=self.newPoints;return;} self.canTap=false;self.contentLastPos=self.limitMovement();if(self.requestId){cancelAFrame(self.requestId);self.requestId=null;} self.requestId=requestAFrame(function(){$.fancybox.setTranslate(self.$content,self.contentLastPos);});};Guestures.prototype.limitMovement=function(){var self=this;var canvasWidth=self.canvasWidth;var canvasHeight=self.canvasHeight;var distanceX=self.distanceX;var distanceY=self.distanceY;var contentStartPos=self.contentStartPos;var currentOffsetX=contentStartPos.left;var currentOffsetY=contentStartPos.top;var currentWidth=contentStartPos.width;var currentHeight=contentStartPos.height;var minTranslateX,minTranslateY,maxTranslateX,maxTranslateY,newOffsetX,newOffsetY;if(currentWidth>canvasWidth){newOffsetX=currentOffsetX+distanceX;}else{newOffsetX=currentOffsetX;} newOffsetY=currentOffsetY+distanceY;minTranslateX=Math.max(0,canvasWidth*0.5-currentWidth*0.5);minTranslateY=Math.max(0,canvasHeight*0.5-currentHeight*0.5);maxTranslateX=Math.min(canvasWidth-currentWidth,canvasWidth*0.5-currentWidth*0.5);maxTranslateY=Math.min(canvasHeight-currentHeight,canvasHeight*0.5-currentHeight*0.5);if(currentWidth>canvasWidth){if(distanceX>0&&newOffsetX>minTranslateX){newOffsetX=minTranslateX-1+Math.pow(-minTranslateX+currentOffsetX+distanceX,0.8)||0;} if(distanceX<0&&newOffsetXcanvasHeight){if(distanceY>0&&newOffsetY>minTranslateY){newOffsetY=minTranslateY-1+Math.pow(-minTranslateY+currentOffsetY+distanceY,0.8)||0;} if(distanceY<0&&newOffsetYcanvasWidth){newOffsetX=newOffsetX>0?0:newOffsetX;newOffsetX=newOffsetXcanvasHeight){newOffsetY=newOffsetY>0?0:newOffsetY;newOffsetY=newOffsetY50){$.fancybox.animate(self.instance.current.$slide,{top:self.sliderStartPos.top+self.distanceY+(self.velocityY*150),opacity:0},150);ret=self.instance.close(true,300);}else if(swiping=='x'&&self.distanceX>50&&len>1){ret=self.instance.previous(self.speedX);}else if(swiping=='x'&&self.distanceX<-50&&len>1){ret=self.instance.next(self.speedX);} if(ret===false&&(swiping=='x'||swiping=='y')){if(scrolling||len<2){self.instance.centerSlide(self.instance.current,150);}else{self.instance.jumpTo(self.instance.current.index);}} self.$container.removeClass('fancybox-is-sliding');};Guestures.prototype.endPanning=function(){var self=this;var newOffsetX,newOffsetY,newPos;if(!self.contentLastPos){return;} if(self.opts.momentum===false){newOffsetX=self.contentLastPos.left;newOffsetY=self.contentLastPos.top;}else{newOffsetX=self.contentLastPos.left+(self.velocityX*self.speed);newOffsetY=self.contentLastPos.top+(self.velocityY*self.speed);} newPos=self.limitPosition(newOffsetX,newOffsetY,self.contentStartPos.width,self.contentStartPos.height);newPos.width=self.contentStartPos.width;newPos.height=self.contentStartPos.height;$.fancybox.animate(self.$content,newPos,330);};Guestures.prototype.endZooming=function(){var self=this;var current=self.instance.current;var newOffsetX,newOffsetY,newPos,reset;var newWidth=self.newWidth;var newHeight=self.newHeight;if(!self.contentLastPos){return;} newOffsetX=self.contentLastPos.left;newOffsetY=self.contentLastPos.top;reset={top:newOffsetY,left:newOffsetX,width:newWidth,height:newHeight,scaleX:1,scaleY:1};$.fancybox.setTranslate(self.$content,reset);if(newWidthcurrent.width||newHeight>current.height){self.instance.scaleToActual(self.centerPointStartX,self.centerPointStartY,150);}else{newPos=self.limitPosition(newOffsetX,newOffsetY,newWidth,newHeight);$.fancybox.setTranslate(self.content,$.fancybox.getTranslate(self.$content));$.fancybox.animate(self.$content,newPos,150);}};Guestures.prototype.onTap=function(e){var self=this;var $target=$(e.target);var instance=self.instance;var current=instance.current;var endPoints=(e&&pointers(e))||self.startPoints;var tapX=endPoints[0]?endPoints[0].x-self.$stage.offset().left:0;var tapY=endPoints[0]?endPoints[0].y-self.$stage.offset().top:0;var where;var process=function(prefix){var action=current.opts[prefix];if($.isFunction(action)){action=action.apply(instance,[current,e]);} if(!action){return;} switch(action){case"close":instance.close(self.startEvent);break;case"toggleControls":instance.toggleControls(true);break;case"next":instance.next();break;case"nextOrClose":if(instance.group.length>1){instance.next();}else{instance.close(self.startEvent);} break;case"zoom":if(current.type=='image'&&(current.isLoaded||current.$ghost)){if(instance.canPan()){instance.scaleToFit();}else if(instance.isScaledDown()){instance.scaleToActual(tapX,tapY);}else if(instance.group.length<2){instance.close(self.startEvent);}} break;}};if(e.originalEvent&&e.originalEvent.button==2){return;} if(!$target.is('img')&&tapX>$target[0].clientWidth+$target.offset().left){return;} if($target.is('.fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container')){where='Outside';}else if($target.is('.fancybox-slide')){where='Slide';}else if(instance.current.$content&&instance.current.$content.find($target).addBack().filter($target).length){where='Content';}else{return;} if(self.tapped){clearTimeout(self.tapped);self.tapped=null;if(Math.abs(tapX-self.tapX)>50||Math.abs(tapY-self.tapY)>50){return this;} process('dblclick'+where);}else{self.tapX=tapX;self.tapY=tapY;if(current.opts['dblclick'+where]&¤t.opts['dblclick'+where]!==current.opts['click'+where]){self.tapped=setTimeout(function(){self.tapped=null;process('click'+where);},500);}else{process('click'+where);}} return this;};$(document).on('onActivate.fb',function(e,instance){if(instance&&!instance.Guestures){instance.Guestures=new Guestures(instance);}});}(window,document,window.jQuery||jQuery));;(function(document,$){'use strict';$.extend(true,$.fancybox.defaults,{btnTpl:{slideShow:''},slideShow:{autoStart:false,speed:3000}});var SlideShow=function(instance){this.instance=instance;this.init();};$.extend(SlideShow.prototype,{timer:null,isActive:false,$button:null,init:function(){var self=this;self.$button=self.instance.$refs.toolbar.find('[data-fancybox-play]').on('click',function(){self.toggle();});if(self.instance.group.length<2||!self.instance.group[self.instance.currIndex].opts.slideShow){self.$button.hide();}},set:function(force){var self=this;if(self.instance&&self.instance.current&&(force===true||self.instance.current.opts.loop||self.instance.currIndex'+''+''+''+''},fullScreen:{autoStart:false}});$(document).on({'onInit.fb':function(e,instance){var $container;if(instance&&instance.group[instance.currIndex].opts.fullScreen){$container=instance.$refs.container;$container.on('click.fb-fullscreen','[data-fancybox-fullscreen]',function(e){e.stopPropagation();e.preventDefault();FullScreen.toggle($container[0]);});if(instance.opts.fullScreen&&instance.opts.fullScreen.autoStart===true){FullScreen.request($container[0]);} instance.FullScreen=FullScreen;}else if(instance){instance.$refs.toolbar.find('[data-fancybox-fullscreen]').hide();}},'afterKeydown.fb':function(e,instance,current,keypress,keycode){if(instance&&instance.FullScreen&&keycode===70){keypress.preventDefault();instance.FullScreen.toggle(instance.$refs.container[0]);}},'beforeClose.fb':function(instance){if(instance&&instance.FullScreen){FullScreen.exit();}}});$(document).on(fn.fullscreenchange,function(){var isFullscreen=FullScreen.isFullscreen(),instance=$.fancybox.getInstance();if(instance){if(instance.current&&instance.current.type==='image'&&instance.isAnimating){instance.current.$content.css('transition','none');instance.isAnimating=false;instance.update(true,true,0);} instance.trigger('onFullscreenChange',isFullscreen);instance.$refs.container.toggleClass('fancybox-is-fullscreen',isFullscreen);}});}(document,window.jQuery||jQuery));;(function(document,$){'use strict';$.fancybox.defaults=$.extend(true,{btnTpl:{thumbs:''},thumbs:{autoStart:false,hideOnClose:true,parentEl:'.fancybox-container',axis:'y'}},$.fancybox.defaults);var FancyThumbs=function(instance){this.init(instance);};$.extend(FancyThumbs.prototype,{$button:null,$grid:null,$list:null,isVisible:false,isActive:false,init:function(instance){var self=this;self.instance=instance;instance.Thumbs=self;var first=instance.group[0],second=instance.group[1];self.opts=instance.group[instance.currIndex].opts.thumbs;self.$button=instance.$refs.toolbar.find('[data-fancybox-thumbs]');if(self.opts&&first&&second&&((first.type=='image'||first.opts.thumb||first.opts.$thumb)&&(second.type=='image'||second.opts.thumb||second.opts.$thumb))){self.$button.show().on('click',function(){self.toggle();});self.isActive=true;}else{self.$button.hide();}},create:function(){var self=this,instance=self.instance,parentEl=self.opts.parentEl,list,src;self.$grid=$('
    ').appendTo(instance.$refs.container.find(parentEl).addBack().filter(parentEl));list='
      ';$.each(instance.group,function(i,item){src=item.opts.thumb||(item.opts.$thumb?item.opts.$thumb.attr('src'):null);if(!src&&item.type==='image'){src=item.src;} if(src&&src.length){list+='
    • ';}});list+='
    ';self.$list=$(list).appendTo(self.$grid).on('click','li',function(){instance.jumpTo($(this).data('index'));});self.$list.find('img').hide().one('load',function(){var $parent=$(this).parent().removeClass('fancybox-thumbs-loading'),thumbWidth=$parent.outerWidth(),thumbHeight=$parent.outerHeight(),width,height,widthRatio,heightRatio;width=this.naturalWidth||this.width;height=this.naturalHeight||this.height;widthRatio=width/thumbWidth;heightRatio=height/thumbHeight;if(widthRatio>=1&&heightRatio>=1){if(widthRatio>heightRatio){width=width/heightRatio;height=thumbHeight;}else{width=thumbWidth;height=height/widthRatio;}} $(this).css({width:Math.floor(width),height:Math.floor(height),'margin-top':height>thumbHeight?(Math.floor(thumbHeight*0.3-height*0.3)):Math.floor(thumbHeight*0.5-height*0.5),'margin-left':Math.floor(thumbWidth*0.5-width*0.5)}).show();}).each(function(){this.src=$(this).data('src');});if(self.opts.axis==='x'){self.$list.width(parseInt(self.$grid.css("padding-right"))+(instance.group.length*self.$list.children().eq(0).outerWidth(true))+'px');}},focus:function(duration){var self=this,$list=self.$list,thumb,thumbPos;if(self.instance.current){thumb=$list.children().removeClass('fancybox-thumbs-active').filter('[data-index="'+self.instance.current.index+'"]').addClass('fancybox-thumbs-active');thumbPos=thumb.position();if(self.opts.axis==='y'&&(thumbPos.top<0||thumbPos.top>($list.height()-thumb.outerHeight()))){$list.stop().animate({'scrollTop':$list.scrollTop()+thumbPos.top},duration);}else if(self.opts.axis==='x'&&(thumbPos.left<$list.parent().scrollLeft()||thumbPos.left>($list.parent().scrollLeft()+($list.parent().width()-thumb.outerWidth())))){$list.parent().stop().animate({'scrollLeft':thumbPos.left},duration);}}},update:function(){this.instance.$refs.container.toggleClass('fancybox-show-thumbs',this.isVisible);if(this.isVisible){if(!this.$grid){this.create();} this.instance.trigger('onThumbsShow');this.focus(0);}else if(this.$grid){this.instance.trigger('onThumbsHide');} this.instance.update();},hide:function(){this.isVisible=false;this.update();},show:function(){this.isVisible=true;this.update();},toggle:function(){this.isVisible=!this.isVisible;this.update();}});$(document).on({'onInit.fb':function(e,instance){var Thumbs;if(instance&&!instance.Thumbs){Thumbs=new FancyThumbs(instance);if(Thumbs.isActive&&Thumbs.opts.autoStart===true){Thumbs.show();}}},'beforeShow.fb':function(e,instance,item,firstRun){var Thumbs=instance&&instance.Thumbs;if(Thumbs&&Thumbs.isVisible){Thumbs.focus(firstRun?0:250);}},'afterKeydown.fb':function(e,instance,current,keypress,keycode){var Thumbs=instance&&instance.Thumbs;if(Thumbs&&Thumbs.isActive&&keycode===71){keypress.preventDefault();Thumbs.toggle();}},'beforeClose.fb':function(e,instance){var Thumbs=instance&&instance.Thumbs;if(Thumbs&&Thumbs.isVisible&&Thumbs.opts.hideOnClose!==false){Thumbs.$grid.hide();}}});}(document,window.jQuery));;(function(document,$){'use strict';$.extend(true,$.fancybox.defaults,{btnTpl:{share:''},share:{tpl:''}});function escapeHtml(string){var entityMap={'&':'&','<':'<','>':'>','"':'"',"'":''','/':'/','`':'`','=':'='};return String(string).replace(/[&<>"'`=\/]/g,function(s){return entityMap[s];});} $(document).on('click','[data-fancybox-share]',function(){var f=$.fancybox.getInstance(),url,tpl;if(f){url=f.current.opts.hash===false?f.current.src:window.location;tpl=f.current.opts.share.tpl.replace(/\{\{media\}\}/g,f.current.type==='image'?encodeURIComponent(f.current.src):'').replace(/\{\{url\}\}/g,encodeURIComponent(url)).replace(/\{\{url_raw\}\}/g,escapeHtml(url)).replace(/\{\{descr\}\}/g,f.$caption?encodeURIComponent(f.$caption.text()):'');$.fancybox.open({src:f.translate(f,tpl),type:'html',opts:{animationEffect:"fade",animationDuration:250,afterLoad:function(instance,current){current.$content.find('.fancybox-share__links a').click(function(){window.open(this.href,"Share","width=550, height=450");return false;});}}});}});}(document,window.jQuery||jQuery));;(function(document,window,$){'use strict';if(!$.escapeSelector){$.escapeSelector=function(sel){var rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;var fcssescape=function(ch,asCodePoint){if(asCodePoint){if(ch==="\0"){return"\uFFFD";} return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";} return"\\"+ch;};return(sel+"").replace(rcssescape,fcssescape);};} var shouldCreateHistory=true;var currentHash=null;var timerID=null;function parseUrl(){var hash=window.location.hash.substr(1);var rez=hash.split('-');var index=rez.length>1&&/^\+?\d+$/.test(rez[rez.length-1])?parseInt(rez.pop(-1),10)||1:1;var gallery=rez.join('-');if(index<1){index=1;} return{hash:hash,index:index,gallery:gallery};} function triggerFromUrl(url){var $el;if(url.gallery!==''){$el=$("[data-fancybox='"+$.escapeSelector(url.gallery)+"']").eq(url.index-1);if(!$el.length){$el=$("#"+$.escapeSelector(url.gallery)+"");} if($el.length){shouldCreateHistory=false;$el.trigger('click');}}} function getGalleryID(instance){var opts;if(!instance){return false;} opts=instance.current?instance.current.opts:instance.opts;return opts.hash||(opts.$orig?opts.$orig.data('fancybox'):'');} $(function(){if($.fancybox.defaults.hash===false){return;} $(document).on({'onInit.fb':function(e,instance){var url,gallery;if(instance.group[instance.currIndex].opts.hash===false){return;} url=parseUrl();gallery=getGalleryID(instance);if(gallery&&url.gallery&&gallery==url.gallery){instance.currIndex=url.index-1;}},'beforeShow.fb':function(e,instance,current){var gallery;if(!current||current.opts.hash===false){return;} gallery=getGalleryID(instance);if(gallery&&gallery!==''){if(window.location.hash.indexOf(gallery)<0){instance.opts.origHash=window.location.hash;} currentHash=gallery+(instance.group.length>1?'-'+(current.index+1):'');if('replaceState'in window.history){if(timerID){clearTimeout(timerID);} timerID=setTimeout(function(){window.history[shouldCreateHistory?'pushState':'replaceState']({},document.title,window.location.pathname+window.location.search+'#'+currentHash);timerID=null;shouldCreateHistory=false;},300);}else{window.location.hash=currentHash;}}},'beforeClose.fb':function(e,instance,current){var gallery,origHash;if(timerID){clearTimeout(timerID);} if(current.opts.hash===false){return;} gallery=getGalleryID(instance);origHash=instance&&instance.opts.origHash?instance.opts.origHash:'';if(gallery&&gallery!==''){if('replaceState'in history){window.history.replaceState({},document.title,window.location.pathname+window.location.search+origHash);}else{window.location.hash=origHash;$(window).scrollTop(instance.scrollTop).scrollLeft(instance.scrollLeft);}} currentHash=null;}});$(window).on('hashchange.fb',function(){var url=parseUrl();if($.fancybox.getInstance()){if(currentHash&¤tHash!==url.gallery+'-'+url.index&&!(url.index===1&¤tHash==url.gallery)){currentHash=null;$.fancybox.close();}}else if(url.gallery!==''){triggerFromUrl(url);}});setTimeout(function(){triggerFromUrl(parseUrl());},50);});}(document,window,window.jQuery||jQuery));;(function(document,$){'use strict';var prevTime=new Date().getTime();$(document).on({'onInit.fb':function(e,instance,current){instance.$refs.stage.on('mousewheel DOMMouseScroll wheel MozMousePixelScroll',function(e){var current=instance.current,currTime=new Date().getTime();if(instance.group.length<1||current.opts.wheel===false||(current.opts.wheel==='auto'&¤t.type!=='image')){return;} e.preventDefault();e.stopPropagation();if(current.$slide.hasClass('fancybox-animated')){return;} e=e.originalEvent||e;if(currTime-prevTime<250){return;} prevTime=currTime;instance[(-e.deltaY||-e.deltaX||e.wheelDelta||-e.detail)<0?'next':'previous']();});}});}(document,window.jQuery||jQuery)); ;(function($, window, document, undefined){ function Owl(element, options){ this.settings=null; this.options=$.extend({}, Owl.Defaults, options); this.$element=$(element); this._handlers={}; this._plugins={}; this._supress={}; this._current=null; this._speed=null; this._coordinates=[]; this._breakpoint=null; this._width=null; this._items=[]; this._clones=[]; this._mergers=[]; this._widths=[]; this._invalidated={}; this._pipe=[]; this._drag={ time: null, target: null, pointer: null, stage: { start: null, current: null }, direction: null }; this._states={ current: {}, tags: { 'initializing': [ 'busy' ], 'animating': [ 'busy' ], 'dragging': [ 'interacting' ] }}; $.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler){ this._handlers[handler]=$.proxy(this[handler], this); }, this)); $.each(Owl.Plugins, $.proxy(function(key, plugin){ this._plugins[key.charAt(0).toLowerCase() + key.slice(1)] = new plugin(this); }, this)); $.each(Owl.Workers, $.proxy(function(priority, worker){ this._pipe.push({ 'filter': worker.filter, 'run': $.proxy(worker.run, this) }); }, this)); this.setup(); this.initialize(); } Owl.Defaults={ items: 3, loop: false, center: false, rewind: false, mouseDrag: true, touchDrag: true, pullDrag: true, freeDrag: false, margin: 0, stagePadding: 0, merge: false, mergeFit: true, autoWidth: false, startPosition: 0, rtl: false, smartSpeed: 250, fluidSpeed: false, dragEndSpeed: false, responsive: {}, responsiveRefreshRate: 200, responsiveBaseElement: window, fallbackEasing: 'swing', info: false, nestedItemSelector: false, itemElement: 'div', stageElement: 'div', refreshClass: 'owl-refresh', loadedClass: 'owl-loaded', loadingClass: 'owl-loading', rtlClass: 'owl-rtl', responsiveClass: 'owl-responsive', dragClass: 'owl-drag', itemClass: 'owl-item', stageClass: 'owl-stage', stageOuterClass: 'owl-stage-outer', grabClass: 'owl-grab' }; Owl.Width={ Default: 'default', Inner: 'inner', Outer: 'outer' }; Owl.Type={ Event: 'event', State: 'state' }; Owl.Plugins={}; Owl.Workers=[ { filter: [ 'width', 'settings' ], run: function(){ this._width=this.$element.width(); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ cache.current=this._items&&this._items[this.relative(this._current)]; }}, { filter: [ 'items', 'settings' ], run: function(){ this.$stage.children('.cloned').remove(); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var margin=this.settings.margin||'', grid = !this.settings.autoWidth, rtl=this.settings.rtl, css={ 'width': 'auto', 'margin-left': rtl ? margin:'', 'margin-right': rtl ? '':margin }; !grid&&this.$stage.children().css(css); cache.css=css; }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var width=(this.width() / this.settings.items).toFixed(3) - this.settings.margin, merge=null, iterator=this._items.length, grid = !this.settings.autoWidth, widths=[]; cache.items={ merge: false, width: width }; while (iterator--){ merge=this._mergers[iterator]; merge=this.settings.mergeFit&&Math.min(merge, this.settings.items)||merge; cache.items.merge=merge > 1||cache.items.merge; widths[iterator] = !grid ? this._items[iterator].width():width * merge; } this._widths=widths; }}, { filter: [ 'items', 'settings' ], run: function(){ var clones=[], items=this._items, settings=this.settings, view=Math.max(settings.items * 2, 4), size=Math.ceil(items.length / 2) * 2, repeat=settings.loop&&items.length ? settings.rewind ? view:Math.max(view, size):0, append='', prepend=''; repeat /=2; while (repeat--){ clones.push(this.normalize(clones.length / 2, true)); append=append + items[clones[clones.length - 1]][0].outerHTML; clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true)); prepend=items[clones[clones.length - 1]][0].outerHTML + prepend; } this._clones=clones; $(append).addClass('cloned').appendTo(this.$stage); $(prepend).addClass('cloned').prependTo(this.$stage); }}, { filter: [ 'width', 'items', 'settings' ], run: function(){ var rtl=this.settings.rtl ? 1:-1, size=this._clones.length + this._items.length, iterator=-1, previous=0, current=0, coordinates=[]; while (++iterator < size){ previous=coordinates[iterator - 1]||0; current=this._widths[this.relative(iterator)] + this.settings.margin; coordinates.push(previous + current * rtl); } this._coordinates=coordinates; }}, { filter: [ 'width', 'items', 'settings' ], run: function(){ var padding=this.settings.stagePadding, coordinates=this._coordinates, css={ 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2, 'padding-left': padding||'', 'padding-right': padding||'' }; this.$stage.css(css); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ var iterator=this._coordinates.length, grid = !this.settings.autoWidth, items=this.$stage.children(); if(grid&&cache.items.merge){ while (iterator--){ cache.css.width=this._widths[this.relative(iterator)]; items.eq(iterator).css(cache.css); }}else if(grid){ cache.css.width=cache.items.width; items.css(cache.css); }} }, { filter: [ 'items' ], run: function(){ this._coordinates.length < 1&&this.$stage.removeAttr('style'); }}, { filter: [ 'width', 'items', 'settings' ], run: function(cache){ cache.current=cache.current ? this.$stage.children().index(cache.current):0; cache.current=Math.max(this.minimum(), Math.min(this.maximum(), cache.current)); this.reset(cache.current); }}, { filter: [ 'position' ], run: function(){ this.animate(this.coordinates(this._current)); }}, { filter: [ 'width', 'position', 'items', 'settings' ], run: function(){ var rtl=this.settings.rtl ? 1:-1, padding=this.settings.stagePadding * 2, begin=this.coordinates(this.current()) + padding, end=begin + this.width() * rtl, inner, outer, matches=[], i, n; for (i=0, n=this._coordinates.length; i < n; i++){ inner=this._coordinates[i - 1]||0; outer=Math.abs(this._coordinates[i]) + padding * rtl; if((this.op(inner, '<=', begin)&&(this.op(inner, '>', end))) || (this.op(outer, '<', begin)&&this.op(outer, '>', end))){ matches.push(i); }} this.$stage.children('.active').removeClass('active'); this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active'); if(this.settings.center){ this.$stage.children('.center').removeClass('center'); this.$stage.children().eq(this.current()).addClass('center'); }} } ]; Owl.prototype.initialize=function(){ this.enter('initializing'); this.trigger('initialize'); this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl); if(this.settings.autoWidth&&!this.is('pre-loading')){ var imgs, nestedSelector, width; imgs=this.$element.find('img'); nestedSelector=this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector:undefined; width=this.$element.children(nestedSelector).width(); if(imgs.length&&width <=0){ this.preloadAutoWidthImages(imgs); }} this.$element.addClass(this.options.loadingClass); this.$stage=$('<' + this.settings.stageElement + ' class="' + this.settings.stageClass + '"/>') .wrap('
    '); this.$element.append(this.$stage.parent()); this.replace(this.$element.children().not(this.$stage.parent())); if(this.$element.is(':visible')){ this.refresh(); }else{ this.invalidate('width'); } this.$element .removeClass(this.options.loadingClass) .addClass(this.options.loadedClass); this.registerEventHandlers(); this.leave('initializing'); this.trigger('initialized'); }; Owl.prototype.setup=function(){ var viewport=this.viewport(), overwrites=this.options.responsive, match=-1, settings=null; if(!overwrites){ settings=$.extend({}, this.options); }else{ $.each(overwrites, function(breakpoint){ if(breakpoint <=viewport&&breakpoint > match){ match=Number(breakpoint); }}); settings=$.extend({}, this.options, overwrites[match]); if(typeof settings.stagePadding==='function'){ settings.stagePadding=settings.stagePadding(); } delete settings.responsive; if(settings.responsiveClass){ this.$element.attr('class', this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match) ); }} this.trigger('change', { property: { name: 'settings', value: settings }}); this._breakpoint=match; this.settings=settings; this.invalidate('settings'); this.trigger('changed', { property: { name: 'settings', value: this.settings }}); }; Owl.prototype.optionsLogic=function(){ if(this.settings.autoWidth){ this.settings.stagePadding=false; this.settings.merge=false; }}; Owl.prototype.prepare=function(item){ var event=this.trigger('prepare', { content: item }); if(!event.data){ event.data=$('<' + this.settings.itemElement + '/>') .addClass(this.options.itemClass).append(item) } this.trigger('prepared', { content: event.data }); return event.data; }; Owl.prototype.update=function(){ var i=0, n=this._pipe.length, filter=$.proxy(function(p){ return this[p] }, this._invalidated), cache={}; while (i < n){ if(this._invalidated.all||$.grep(this._pipe[i].filter, filter).length > 0){ this._pipe[i].run(cache); } i++; } this._invalidated={}; !this.is('valid')&&this.enter('valid'); }; Owl.prototype.width=function(dimension){ dimension=dimension||Owl.Width.Default; switch (dimension){ case Owl.Width.Inner: case Owl.Width.Outer: return this._width; default: return this._width - this.settings.stagePadding * 2 + this.settings.margin; }}; Owl.prototype.refresh=function(){ this.enter('refreshing'); this.trigger('refresh'); this.setup(); this.optionsLogic(); this.$element.addClass(this.options.refreshClass); this.update(); this.$element.removeClass(this.options.refreshClass); this.leave('refreshing'); this.trigger('refreshed'); }; Owl.prototype.onThrottledResize=function(){ window.clearTimeout(this.resizeTimer); this.resizeTimer=window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate); }; Owl.prototype.onResize=function(){ if(!this._items.length){ return false; } if(this._width===this.$element.width()){ return false; } if(!this.$element.is(':visible')){ return false; } this.enter('resizing'); if(this.trigger('resize').isDefaultPrevented()){ this.leave('resizing'); return false; } this.invalidate('width'); this.refresh(); this.leave('resizing'); this.trigger('resized'); }; Owl.prototype.registerEventHandlers=function(){ if($.support.transition){ this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this)); } if(this.settings.responsive!==false){ this.on(window, 'resize', this._handlers.onThrottledResize); } if(this.settings.mouseDrag){ this.$element.addClass(this.options.dragClass); this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this)); this.$stage.on('dragstart.owl.core selectstart.owl.core', function(){ return false }); } if(this.settings.touchDrag){ this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this)); this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this)); }}; Owl.prototype.onDragStart=function(event){ var stage=null; if(event.which===3){ return; } if($.support.transform){ stage=this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(','); stage={ x: stage[stage.length===16 ? 12:4], y: stage[stage.length===16 ? 13:5] };}else{ stage=this.$stage.position(); stage={ x: this.settings.rtl ? stage.left + this.$stage.width() - this.width() + this.settings.margin : stage.left, y: stage.top };} if(this.is('animating')){ $.support.transform ? this.animate(stage.x):this.$stage.stop() this.invalidate('position'); } this.$element.toggleClass(this.options.grabClass, event.type==='mousedown'); this.speed(0); this._drag.time=new Date().getTime(); this._drag.target=$(event.target); this._drag.stage.start=stage; this._drag.stage.current=stage; this._drag.pointer=this.pointer(event); $(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this)); $(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event){ var delta=this.difference(this._drag.pointer, this.pointer(event)); $(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this)); if(Math.abs(delta.x) < Math.abs(delta.y)&&this.is('valid')){ return; } event.preventDefault(); this.enter('dragging'); this.trigger('drag'); }, this)); }; Owl.prototype.onDragMove=function(event){ var minimum=null, maximum=null, pull=null, delta=this.difference(this._drag.pointer, this.pointer(event)), stage=this.difference(this._drag.stage.start, delta); if(!this.is('dragging')){ return; } event.preventDefault(); if(this.settings.loop){ minimum=this.coordinates(this.minimum()); maximum=this.coordinates(this.maximum() + 1) - minimum; stage.x=(((stage.x - minimum) % maximum + maximum) % maximum) + minimum; }else{ minimum=this.settings.rtl ? this.coordinates(this.maximum()):this.coordinates(this.minimum()); maximum=this.settings.rtl ? this.coordinates(this.minimum()):this.coordinates(this.maximum()); pull=this.settings.pullDrag ? -1 * delta.x / 5:0; stage.x=Math.max(Math.min(stage.x, minimum + pull), maximum + pull); } this._drag.stage.current=stage; this.animate(stage.x); }; Owl.prototype.onDragEnd=function(event){ var delta=this.difference(this._drag.pointer, this.pointer(event)), stage=this._drag.stage.current, direction=delta.x > 0 ^ this.settings.rtl ? 'left':'right'; $(document).off('.owl.core'); this.$element.removeClass(this.options.grabClass); if(delta.x!==0&&this.is('dragging')||!this.is('valid')){ this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed); this.current(this.closest(stage.x, delta.x!==0 ? direction:this._drag.direction)); this.invalidate('position'); this.update(); this._drag.direction=direction; if(Math.abs(delta.x) > 3||new Date().getTime() - this._drag.time > 300){ this._drag.target.one('click.owl.core', function(){ return false; }); }} if(!this.is('dragging')){ return; } this.leave('dragging'); this.trigger('dragged'); }; Owl.prototype.closest=function(coordinate, direction){ var position=-1, pull=30, width=this.width(), coordinates=this.coordinates(); if(!this.settings.freeDrag){ $.each(coordinates, $.proxy(function(index, value){ if(direction==='left'&&coordinate > value - pull&&coordinate < value + pull){ position=index; }else if(direction==='right'&&coordinate > value - width - pull&&coordinate < value - width + pull){ position=index + 1; }else if(this.op(coordinate, '<', value) && this.op(coordinate, '>', coordinates[index + 1]||value - width)){ position=direction==='left' ? index + 1:index; } return position===-1; }, this)); } if(!this.settings.loop){ if(this.op(coordinate, '>', coordinates[this.minimum()])){ position=coordinate=this.minimum(); }else if(this.op(coordinate, '<', coordinates[this.maximum()])){ position=coordinate=this.maximum(); }} return position; }; Owl.prototype.animate=function(coordinate){ var animate=this.speed() > 0; this.is('animating')&&this.onTransitionEnd(); if(animate){ this.enter('animating'); this.trigger('translate'); } if($.support.transform3d&&$.support.transition){ this.$stage.css({ transform: 'translate3d(' + coordinate + 'px,0px,0px)', transition: (this.speed() / 1000) + 's' }); }else if(animate){ this.$stage.animate({ left: coordinate + 'px' }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this)); }else{ this.$stage.css({ left: coordinate + 'px' }); }}; Owl.prototype.is=function(state){ return this._states.current[state]&&this._states.current[state] > 0; }; Owl.prototype.current=function(position){ if(position===undefined){ return this._current; } if(this._items.length===0){ return undefined; } position=this.normalize(position); if(this._current!==position){ var event=this.trigger('change', { property: { name: 'position', value: position }}); if(event.data!==undefined){ position=this.normalize(event.data); } this._current=position; this.invalidate('position'); this.trigger('changed', { property: { name: 'position', value: this._current }}); } return this._current; }; Owl.prototype.invalidate=function(part){ if($.type(part)==='string'){ this._invalidated[part]=true; this.is('valid')&&this.leave('valid'); } return $.map(this._invalidated, function(v, i){ return i }); }; Owl.prototype.reset=function(position){ position=this.normalize(position); if(position===undefined){ return; } this._speed=0; this._current=position; this.suppress([ 'translate', 'translated' ]); this.animate(this.coordinates(position)); this.release([ 'translate', 'translated' ]); }; Owl.prototype.normalize=function(position, relative){ var n=this._items.length, m=relative ? 0:this._clones.length; if(!this.isNumeric(position)||n < 1){ position=undefined; }else if(position < 0||position >=n + m){ position=((position - m / 2) % n + n) % n + m / 2; } return position; }; Owl.prototype.relative=function(position){ position -=this._clones.length / 2; return this.normalize(position, true); }; Owl.prototype.maximum=function(relative){ var settings=this.settings, maximum=this._coordinates.length, iterator, reciprocalItemsWidth, elementWidth; if(settings.loop){ maximum=this._clones.length / 2 + this._items.length - 1; }else if(settings.autoWidth||settings.merge){ iterator=this._items.length; reciprocalItemsWidth=this._items[--iterator].width(); elementWidth=this.$element.width(); while (iterator--){ reciprocalItemsWidth +=this._items[iterator].width() + this.settings.margin; if(reciprocalItemsWidth > elementWidth){ break; }} maximum=iterator + 1; }else if(settings.center){ maximum=this._items.length - 1; }else{ maximum=this._items.length - settings.items; } if(relative){ maximum -=this._clones.length / 2; } return Math.max(maximum, 0); }; Owl.prototype.minimum=function(relative){ return relative ? 0:this._clones.length / 2; }; Owl.prototype.items=function(position){ if(position===undefined){ return this._items.slice(); } position=this.normalize(position, true); return this._items[position]; }; Owl.prototype.mergers=function(position){ if(position===undefined){ return this._mergers.slice(); } position=this.normalize(position, true); return this._mergers[position]; }; Owl.prototype.clones=function(position){ var odd=this._clones.length / 2, even=odd + this._items.length, map=function(index){ return index % 2===0 ? even + index / 2:odd - (index + 1) / 2 }; if(position===undefined){ return $.map(this._clones, function(v, i){ return map(i) }); } return $.map(this._clones, function(v, i){ return v===position ? map(i):null }); }; Owl.prototype.speed=function(speed){ if(speed!==undefined){ this._speed=speed; } return this._speed; }; Owl.prototype.coordinates=function(position){ var multiplier=1, newPosition=position - 1, coordinate; if(position===undefined){ return $.map(this._coordinates, $.proxy(function(coordinate, index){ return this.coordinates(index); }, this)); } if(this.settings.center){ if(this.settings.rtl){ multiplier=-1; newPosition=position + 1; } coordinate=this._coordinates[position]; coordinate +=(this.width() - coordinate + (this._coordinates[newPosition]||0)) / 2 * multiplier; }else{ coordinate=this._coordinates[newPosition]||0; } coordinate=Math.ceil(coordinate); return coordinate; }; Owl.prototype.duration=function(from, to, factor){ if(factor===0){ return 0; } return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor||this.settings.smartSpeed)); }; Owl.prototype.to=function(position, speed){ var current=this.current(), revert=null, distance=position - this.relative(current), direction=(distance > 0) - (distance < 0), items=this._items.length, minimum=this.minimum(), maximum=this.maximum(); if(this.settings.loop){ if(!this.settings.rewind&&Math.abs(distance) > items / 2){ distance +=direction * -1 * items; } position=current + distance; revert=((position - minimum) % items + items) % items + minimum; if(revert!==position&&revert - distance <=maximum&&revert - distance > 0){ current=revert - distance; position=revert; this.reset(current); }}else if(this.settings.rewind){ maximum +=1; position=(position % maximum + maximum) % maximum; }else{ position=Math.max(minimum, Math.min(maximum, position)); } this.speed(this.duration(current, position, speed)); this.current(position); if(this.$element.is(':visible')){ this.update(); }}; Owl.prototype.next=function(speed){ speed=speed||false; this.to(this.relative(this.current()) + 1, speed); }; Owl.prototype.prev=function(speed){ speed=speed||false; this.to(this.relative(this.current()) - 1, speed); }; Owl.prototype.onTransitionEnd=function(event){ if(event!==undefined){ event.stopPropagation(); if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0)){ return false; }} this.leave('animating'); this.trigger('translated'); }; Owl.prototype.viewport=function(){ var width; if(this.options.responsiveBaseElement!==window){ width=$(this.options.responsiveBaseElement).width(); }else if(window.innerWidth){ width=window.innerWidth; }else if(document.documentElement&&document.documentElement.clientWidth){ width=document.documentElement.clientWidth; }else{ throw 'Can not detect viewport width.'; } return width; }; Owl.prototype.replace=function(content){ this.$stage.empty(); this._items=[]; if(content){ content=(content instanceof jQuery) ? content:$(content); } if(this.settings.nestedItemSelector){ content=content.find('.' + this.settings.nestedItemSelector); } content.filter(function(){ return this.nodeType===1; }).each($.proxy(function(index, item){ item=this.prepare(item); this.$stage.append(item); this._items.push(item); this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); }, this)); this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition:0); this.invalidate('items'); }; Owl.prototype.add=function(content, position){ var current=this.relative(this._current); position=position===undefined ? this._items.length:this.normalize(position, true); content=content instanceof jQuery ? content:$(content); this.trigger('add', { content: content, position: position }); content=this.prepare(content); if(this._items.length===0||position===this._items.length){ this._items.length===0&&this.$stage.append(content); this._items.length!==0&&this._items[position - 1].after(content); this._items.push(content); this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); }else{ this._items[position].before(content); this._items.splice(position, 0, content); this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1); } this._items[current]&&this.reset(this._items[current].index()); this.invalidate('items'); this.trigger('added', { content: content, position: position }); }; Owl.prototype.remove=function(position){ position=this.normalize(position, true); if(position===undefined){ return; } this.trigger('remove', { content: this._items[position], position: position }); this._items[position].remove(); this._items.splice(position, 1); this._mergers.splice(position, 1); this.invalidate('items'); this.trigger('removed', { content: null, position: position }); }; Owl.prototype.preloadAutoWidthImages=function(images){ images.each($.proxy(function(i, element){ this.enter('pre-loading'); element=$(element); $(new Image()).one('load', $.proxy(function(e){ element.attr('src', e.target.src); element.css('opacity', 1); this.leave('pre-loading'); !this.is('pre-loading')&&!this.is('initializing')&&this.refresh(); }, this)).attr('src', element.attr('src')||element.attr('data-src')||element.attr('data-src-retina')); }, this)); }; Owl.prototype.destroy=function(){ this.$element.off('.owl.core'); this.$stage.off('.owl.core'); $(document).off('.owl.core'); if(this.settings.responsive!==false){ window.clearTimeout(this.resizeTimer); this.off(window, 'resize', this._handlers.onThrottledResize); } for (var i in this._plugins){ this._plugins[i].destroy(); } this.$stage.children('.cloned').remove(); this.$stage.unwrap(); this.$stage.children().contents().unwrap(); this.$stage.children().unwrap(); this.$element .removeClass(this.options.refreshClass) .removeClass(this.options.loadingClass) .removeClass(this.options.loadedClass) .removeClass(this.options.rtlClass) .removeClass(this.options.dragClass) .removeClass(this.options.grabClass) .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), '')) .removeData('owl.carousel'); }; Owl.prototype.op=function(a, o, b){ var rtl=this.settings.rtl; switch (o){ case '<': return rtl ? a > b:a < b; case '>': return rtl ? a < b:a > b; case '>=': return rtl ? a <=b:a >=b; case '<=': return rtl ? a >=b:a <=b; default: break; }}; Owl.prototype.on=function(element, event, listener, capture){ if(element.addEventListener){ element.addEventListener(event, listener, capture); }else if(element.attachEvent){ element.attachEvent('on' + event, listener); }}; Owl.prototype.off=function(element, event, listener, capture){ if(element.removeEventListener){ element.removeEventListener(event, listener, capture); }else if(element.detachEvent){ element.detachEvent('on' + event, listener); }}; Owl.prototype.trigger=function(name, data, namespace, state, enter){ var status={ item: { count: this._items.length, index: this.current() }}, handler=$.camelCase($.grep([ 'on', name, namespace ], function(v){ return v }) .join('-').toLowerCase() ), event=$.Event([ name, 'owl', namespace||'carousel' ].join('.').toLowerCase(), $.extend({ relatedTarget: this }, status, data) ); if(!this._supress[name]){ $.each(this._plugins, function(name, plugin){ if(plugin.onTrigger){ plugin.onTrigger(event); }}); this.register({ type: Owl.Type.Event, name: name }); this.$element.trigger(event); if(this.settings&&typeof this.settings[handler]==='function'){ this.settings[handler].call(this, event); }} return event; }; Owl.prototype.enter=function(name){ $.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){ if(this._states.current[name]===undefined){ this._states.current[name]=0; } this._states.current[name]++; }, this)); }; Owl.prototype.leave=function(name){ $.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){ this._states.current[name]--; }, this)); }; Owl.prototype.register=function(object){ if(object.type===Owl.Type.Event){ if(!$.event.special[object.name]){ $.event.special[object.name]={};} if(!$.event.special[object.name].owl){ var _default=$.event.special[object.name]._default; $.event.special[object.name]._default=function(e){ if(_default&&_default.apply&&(!e.namespace||e.namespace.indexOf('owl')===-1)){ return _default.apply(this, arguments); } return e.namespace&&e.namespace.indexOf('owl') > -1; }; $.event.special[object.name].owl=true; }}else if(object.type===Owl.Type.State){ if(!this._states.tags[object.name]){ this._states.tags[object.name]=object.tags; }else{ this._states.tags[object.name]=this._states.tags[object.name].concat(object.tags); } this._states.tags[object.name]=$.grep(this._states.tags[object.name], $.proxy(function(tag, i){ return $.inArray(tag, this._states.tags[object.name])===i; }, this)); }}; Owl.prototype.suppress=function(events){ $.each(events, $.proxy(function(index, event){ this._supress[event]=true; }, this)); }; Owl.prototype.release=function(events){ $.each(events, $.proxy(function(index, event){ delete this._supress[event]; }, this)); }; Owl.prototype.pointer=function(event){ var result={ x: null, y: null }; event=event.originalEvent||event||window.event; event=event.touches&&event.touches.length ? event.touches[0]:event.changedTouches&&event.changedTouches.length ? event.changedTouches[0]:event; if(event.pageX){ result.x=event.pageX; result.y=event.pageY; }else{ result.x=event.clientX; result.y=event.clientY; } return result; }; Owl.prototype.isNumeric=function(number){ return !isNaN(parseFloat(number)); }; Owl.prototype.difference=function(first, second){ return { x: first.x - second.x, y: first.y - second.y };}; $.fn.owlCarousel=function(option){ var args=Array.prototype.slice.call(arguments, 1); return this.each(function(){ var $this=$(this), data=$this.data('owl.carousel'); if(!data){ data=new Owl(this, typeof option=='object'&&option); $this.data('owl.carousel', data); $.each([ 'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove' ], function(i, event){ data.register({ type: Owl.Type.Event, name: event }); data.$element.on(event + '.owl.carousel.core', $.proxy(function(e){ if(e.namespace&&e.relatedTarget!==this){ this.suppress([ event ]); data[event].apply(this, [].slice.call(arguments, 1)); this.release([ event ]); }}, data)); }); } if(typeof option=='string'&&option.charAt(0)!=='_'){ data[option].apply(data, args); }}); }; $.fn.owlCarousel.Constructor=Owl; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var AutoRefresh=function(carousel){ this._core=carousel; this._interval=null; this._visible=null; this._handlers={ 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoRefresh){ this.watch(); }}, this) }; this._core.options=$.extend({}, AutoRefresh.Defaults, this._core.options); this._core.$element.on(this._handlers); }; AutoRefresh.Defaults={ autoRefresh: true, autoRefreshInterval: 500 }; AutoRefresh.prototype.watch=function(){ if(this._interval){ return; } this._visible=this._core.$element.is(':visible'); this._interval=window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval); }; AutoRefresh.prototype.refresh=function(){ if(this._core.$element.is(':visible')===this._visible){ return; } this._visible = !this._visible; this._core.$element.toggleClass('owl-hidden', !this._visible); this._visible&&(this._core.invalidate('width')&&this._core.refresh()); }; AutoRefresh.prototype.destroy=function(){ var handler, property; window.clearInterval(this._interval); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.AutoRefresh=AutoRefresh; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Lazy=function(carousel){ this._core=carousel; this._loaded=[]; this._handlers={ 'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e){ if(!e.namespace){ return; } if(!this._core.settings||!this._core.settings.lazyLoad){ return; } if((e.property&&e.property.name=='position')||e.type=='initialized'){ var settings=this._core.settings, n=(settings.center&&Math.ceil(settings.items / 2)||settings.items), i=((settings.center&&n * -1)||0), position=(e.property&&e.property.value!==undefined ? e.property.value:this._core.current()) + i, clones=this._core.clones().length, load=$.proxy(function(i, v){ this.load(v) }, this); while (i++ < n){ this.load(clones / 2 + this._core.relative(position)); clones&&$.each(this._core.clones(this._core.relative(position)), load); position++; }} }, this) }; this._core.options=$.extend({}, Lazy.Defaults, this._core.options); this._core.$element.on(this._handlers); }; Lazy.Defaults={ lazyLoad: false }; Lazy.prototype.load=function(position){ var $item=this._core.$stage.children().eq(position), $elements=$item&&$item.find('.owl-lazy'); if(!$elements||$.inArray($item.get(0), this._loaded) > -1){ return; } $elements.each($.proxy(function(index, element){ var $element=$(element), image, url=(window.devicePixelRatio > 1&&$element.attr('data-src-retina'))||$element.attr('data-src'); this._core.trigger('load', { element: $element, url: url }, 'lazy'); if($element.is('img')){ $element.one('load.owl.lazy', $.proxy(function(){ $element.css('opacity', 1); this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this)).attr('src', url); }else{ image=new Image(); image.onload=$.proxy(function(){ $element.css({ 'background-image': 'url(' + url + ')', 'opacity': '1' }); this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); }, this); image.src=url; }}, this)); this._loaded.push($item.get(0)); }; Lazy.prototype.destroy=function(){ var handler, property; for (handler in this.handlers){ this._core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var AutoHeight=function(carousel){ this._core=carousel; this._handlers={ 'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight){ this.update(); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight&&e.property.name=='position'){ this.update(); }}, this), 'loaded.owl.lazy': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoHeight && e.element.closest('.' + this._core.settings.itemClass).index()===this._core.current()){ this.update(); }}, this) }; this._core.options=$.extend({}, AutoHeight.Defaults, this._core.options); this._core.$element.on(this._handlers); }; AutoHeight.Defaults={ autoHeight: false, autoHeightClass: 'owl-height' }; AutoHeight.prototype.update=function(){ var start=this._core._current, end=start + this._core.settings.items, visible=this._core.$stage.children().toArray().slice(start, end), heights=[], maxheight=0; $.each(visible, function(index, item){ heights.push($(item).height()); }); maxheight=Math.max.apply(null, heights); this._core.$stage.parent() .height(maxheight) .addClass(this._core.settings.autoHeightClass); }; AutoHeight.prototype.destroy=function(){ var handler, property; for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Video=function(carousel){ this._core=carousel; this._videos={}; this._playing=null; this._handlers={ 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace){ this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] }); }}, this), 'resize.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.video&&this.isInFullScreen()){ e.preventDefault(); }}, this), 'refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.is('resizing')){ this._core.$stage.find('.cloned .owl-video-frame').remove(); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name==='position'&&this._playing){ this.stop(); }}, this), 'prepared.owl.carousel': $.proxy(function(e){ if(!e.namespace){ return; } var $element=$(e.content).find('.owl-video'); if($element.length){ $element.css('display', 'none'); this.fetch($element, $(e.content)); }}, this) }; this._core.options=$.extend({}, Video.Defaults, this._core.options); this._core.$element.on(this._handlers); this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e){ this.play(e); }, this)); }; Video.Defaults={ video: false, videoHeight: false, videoWidth: false }; Video.prototype.fetch=function(target, item){ var type=(function(){ if(target.attr('data-vimeo-id')){ return 'vimeo'; }else if(target.attr('data-vzaar-id')){ return 'vzaar' }else{ return 'youtube'; }})(), id=target.attr('data-vimeo-id')||target.attr('data-youtube-id')||target.attr('data-vzaar-id'), width=target.attr('data-width')||this._core.settings.videoWidth, height=target.attr('data-height')||this._core.settings.videoHeight, url=target.attr('href'); if(url){ id=url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/); if(id[3].indexOf('youtu') > -1){ type='youtube'; }else if(id[3].indexOf('vimeo') > -1){ type='vimeo'; }else if(id[3].indexOf('vzaar') > -1){ type='vzaar'; }else{ throw new Error('Video URL not supported.'); } id=id[6]; }else{ throw new Error('Missing video URL.'); } this._videos[url]={ type: type, id: id, width: width, height: height }; item.attr('data-video', url); this.thumbnail(target, this._videos[url]); }; Video.prototype.thumbnail=function(target, video){ var tnLink, icon, path, dimensions=video.width&&video.height ? 'style="width:' + video.width + 'px;height:' + video.height + 'px;"':'', customTn=target.find('img'), srcType='src', lazyClass='', settings=this._core.settings, create=function(path){ icon='
    '; if(settings.lazyLoad){ tnLink='
    '; }else{ tnLink='
    '; } target.after(tnLink); target.after(icon); }; target.wrap('
    '); if(this._core.settings.lazyLoad){ srcType='data-src'; lazyClass='owl-lazy'; } if(customTn.length){ create(customTn.attr(srcType)); customTn.remove(); return false; } if(video.type==='youtube'){ path="//img.youtube.com/vi/" + video.id + "/hqdefault.jpg"; create(path); }else if(video.type==='vimeo'){ $.ajax({ type: 'GET', url: '//vimeo.com/api/v2/video/' + video.id + '.json', jsonp: 'callback', dataType: 'jsonp', success: function(data){ path=data[0].thumbnail_large; create(path); }}); }else if(video.type==='vzaar'){ $.ajax({ type: 'GET', url: '//vzaar.com/api/videos/' + video.id + '.json', jsonp: 'callback', dataType: 'jsonp', success: function(data){ path=data.framegrab_url; create(path); }}); }}; Video.prototype.stop=function(){ this._core.trigger('stop', null, 'video'); this._playing.find('.owl-video-frame').remove(); this._playing.removeClass('owl-video-playing'); this._playing=null; this._core.leave('playing'); this._core.trigger('stopped', null, 'video'); }; Video.prototype.play=function(event){ var target=$(event.target), item=target.closest('.' + this._core.settings.itemClass), video=this._videos[item.attr('data-video')], width=video.width||'100%', height=video.height||this._core.$stage.height(), html; if(this._playing){ return; } this._core.enter('playing'); this._core.trigger('play', null, 'video'); item=this._core.items(this._core.relative(item.index())); this._core.reset(item.index()); if(video.type==='youtube'){ html=''; }else if(video.type==='vimeo'){ html=''; }else if(video.type==='vzaar'){ html=''; } $('
    ' + html + '
    ').insertAfter(item.find('.owl-video')); this._playing=item.addClass('owl-video-playing'); }; Video.prototype.isInFullScreen=function(){ var element=document.fullscreenElement||document.mozFullScreenElement || document.webkitFullscreenElement; return element&&$(element).parent().hasClass('owl-video-frame'); }; Video.prototype.destroy=function(){ var handler, property; this._core.$element.off('click.owl.video'); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Video=Video; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Animate=function(scope){ this.core=scope; this.core.options=$.extend({}, Animate.Defaults, this.core.options); this.swapping=true; this.previous=undefined; this.next=undefined; this.handlers={ 'change.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name=='position'){ this.previous=this.core.current(); this.next=e.property.value; }}, this), 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e){ if(e.namespace){ this.swapping=e.type=='translated'; }}, this), 'translate.owl.carousel': $.proxy(function(e){ if(e.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)){ this.swap(); }}, this) }; this.core.$element.on(this.handlers); }; Animate.Defaults={ animateOut: false, animateIn: false }; Animate.prototype.swap=function(){ if(this.core.settings.items!==1){ return; } if(!$.support.animation||!$.support.transition){ return; } this.core.speed(0); var left, clear=$.proxy(this.clear, this), previous=this.core.$stage.children().eq(this.previous), next=this.core.$stage.children().eq(this.next), incoming=this.core.settings.animateIn, outgoing=this.core.settings.animateOut; if(this.core.current()===this.previous){ return; } if(outgoing){ left=this.core.coordinates(this.previous) - this.core.coordinates(this.next); previous.one($.support.animation.end, clear) .css({ 'left': left + 'px' }) .addClass('animated owl-animated-out') .addClass(outgoing); } if(incoming){ next.one($.support.animation.end, clear) .addClass('animated owl-animated-in') .addClass(incoming); }}; Animate.prototype.clear=function(e){ $(e.target).css({ 'left': '' }) .removeClass('animated owl-animated-out owl-animated-in') .removeClass(this.core.settings.animateIn) .removeClass(this.core.settings.animateOut); this.core.onTransitionEnd(); }; Animate.prototype.destroy=function(){ var handler, property; for (handler in this.handlers){ this.core.$element.off(handler, this.handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Animate=Animate; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var Autoplay=function(carousel){ this._core=carousel; this._timeout=null; this._paused=false; this._handlers={ 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name==='settings'){ if(this._core.settings.autoplay){ this.play(); }else{ this.stop(); }}else if(e.namespace&&e.property.name==='position'){ if(this._core.settings.autoplay){ this._setAutoPlayInterval(); }} }, this), 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.autoplay){ this.play(); }}, this), 'play.owl.autoplay': $.proxy(function(e, t, s){ if(e.namespace){ this.play(t, s); }}, this), 'stop.owl.autoplay': $.proxy(function(e){ if(e.namespace){ this.stop(); }}, this), 'mouseover.owl.autoplay': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.pause(); }}, this), 'mouseleave.owl.autoplay': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.play(); }}, this), 'touchstart.owl.core': $.proxy(function(){ if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){ this.pause(); }}, this), 'touchend.owl.core': $.proxy(function(){ if(this._core.settings.autoplayHoverPause){ this.play(); }}, this) }; this._core.$element.on(this._handlers); this._core.options=$.extend({}, Autoplay.Defaults, this._core.options); }; Autoplay.Defaults={ autoplay: false, autoplayTimeout: 5000, autoplayHoverPause: false, autoplaySpeed: false }; Autoplay.prototype.play=function(timeout, speed){ this._paused=false; if(this._core.is('rotating')){ return; } this._core.enter('rotating'); this._setAutoPlayInterval(); }; Autoplay.prototype._getNextTimeout=function(timeout, speed){ if(this._timeout){ window.clearTimeout(this._timeout); } return window.setTimeout($.proxy(function(){ if(this._paused||this._core.is('busy')||this._core.is('interacting')||document.hidden){ return; } this._core.next(speed||this._core.settings.autoplaySpeed); }, this), timeout||this._core.settings.autoplayTimeout); }; Autoplay.prototype._setAutoPlayInterval=function(){ this._timeout=this._getNextTimeout(); }; Autoplay.prototype.stop=function(){ if(!this._core.is('rotating')){ return; } window.clearTimeout(this._timeout); this._core.leave('rotating'); }; Autoplay.prototype.pause=function(){ if(!this._core.is('rotating')){ return; } this._paused=true; }; Autoplay.prototype.destroy=function(){ var handler, property; this.stop(); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ 'use strict'; var Navigation=function(carousel){ this._core=carousel; this._initialized=false; this._pages=[]; this._controls={}; this._templates=[]; this.$element=this._core.$element; this._overrides={ next: this._core.next, prev: this._core.prev, to: this._core.to }; this._handlers={ 'prepared.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.push('
    ' + $(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '
    '); }}, this), 'added.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.splice(e.position, 0, this._templates.pop()); }}, this), 'remove.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.dotsData){ this._templates.splice(e.position, 1); }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name=='position'){ this.draw(); }}, this), 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&!this._initialized){ this._core.trigger('initialize', null, 'navigation'); this.initialize(); this.update(); this.draw(); this._initialized=true; this._core.trigger('initialized', null, 'navigation'); }}, this), 'refreshed.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._initialized){ this._core.trigger('refresh', null, 'navigation'); this.update(); this.draw(); this._core.trigger('refreshed', null, 'navigation'); }}, this) }; this._core.options=$.extend({}, Navigation.Defaults, this._core.options); this.$element.on(this._handlers); }; Navigation.Defaults={ nav: false, navText: [ 'prev', 'next' ], navSpeed: false, navElement: 'div', navContainer: false, navContainerClass: 'owl-nav', navClass: [ 'owl-prev', 'owl-next' ], slideBy: 1, dotClass: 'owl-dot', dotsClass: 'owl-dots', dots: true, dotsEach: false, dotsData: false, dotsSpeed: false, dotsContainer: false }; Navigation.prototype.initialize=function(){ var override, settings=this._core.settings; this._controls.$relative=(settings.navContainer ? $(settings.navContainer) : $('
    ').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled'); this._controls.$previous=$('<' + settings.navElement + '>') .addClass(settings.navClass[0]) .html(settings.navText[0]) .prependTo(this._controls.$relative) .on('click', $.proxy(function(e){ this.prev(settings.navSpeed); }, this)); this._controls.$next=$('<' + settings.navElement + '>') .addClass(settings.navClass[1]) .html(settings.navText[1]) .appendTo(this._controls.$relative) .on('click', $.proxy(function(e){ this.next(settings.navSpeed); }, this)); if(!settings.dotsData){ this._templates=[ $('
    ') .addClass(settings.dotClass) .append($('')) .prop('outerHTML') ]; } this._controls.$absolute=(settings.dotsContainer ? $(settings.dotsContainer) : $('
    ').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled'); this._controls.$absolute.on('click', 'div', $.proxy(function(e){ var index=$(e.target).parent().is(this._controls.$absolute) ? $(e.target).index():$(e.target).parent().index(); e.preventDefault(); this.to(index, settings.dotsSpeed); }, this)); for (override in this._overrides){ this._core[override]=$.proxy(this[override], this); }}; Navigation.prototype.destroy=function(){ var handler, control, property, override; for (handler in this._handlers){ this.$element.off(handler, this._handlers[handler]); } for (control in this._controls){ this._controls[control].remove(); } for (override in this.overides){ this._core[override]=this._overrides[override]; } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; Navigation.prototype.update=function(){ var i, j, k, lower=this._core.clones().length / 2, upper=lower + this._core.items().length, maximum=this._core.maximum(true), settings=this._core.settings, size=settings.center||settings.autoWidth||settings.dotsData ? 1:settings.dotsEach||settings.items; if(settings.slideBy!=='page'){ settings.slideBy=Math.min(settings.slideBy, settings.items); } if(settings.dots||settings.slideBy=='page'){ this._pages=[]; for (i=lower, j=0, k=0; i < upper; i++){ if(j >=size||j===0){ this._pages.push({ start: Math.min(maximum, i - lower), end: i - lower + size - 1 }); if(Math.min(maximum, i - lower)===maximum){ break; } j=0, ++k; } j +=this._core.mergers(this._core.relative(i)); }} }; Navigation.prototype.draw=function(){ var difference, settings=this._core.settings, disabled=this._core.items().length <=settings.items, index=this._core.relative(this._core.current()), loop=settings.loop||settings.rewind; this._controls.$relative.toggleClass('disabled', !settings.nav||disabled); if(settings.nav){ this._controls.$previous.toggleClass('disabled', !loop&&index <=this._core.minimum(true)); this._controls.$next.toggleClass('disabled', !loop&&index >=this._core.maximum(true)); } this._controls.$absolute.toggleClass('disabled', !settings.dots||disabled); if(settings.dots){ difference=this._pages.length - this._controls.$absolute.children().length; if(settings.dotsData&&difference!==0){ this._controls.$absolute.html(this._templates.join('')); }else if(difference > 0){ this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0])); }else if(difference < 0){ this._controls.$absolute.children().slice(difference).remove(); } this._controls.$absolute.find('.active').removeClass('active'); this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active'); }}; Navigation.prototype.onTrigger=function(event){ var settings=this._core.settings; event.page={ index: $.inArray(this.current(), this._pages), count: this._pages.length, size: settings&&(settings.center||settings.autoWidth||settings.dotsData ? 1:settings.dotsEach||settings.items) };}; Navigation.prototype.current=function(){ var current=this._core.relative(this._core.current()); return $.grep(this._pages, $.proxy(function(page, index){ return page.start <=current&&page.end >=current; }, this)).pop(); }; Navigation.prototype.getPosition=function(successor){ var position, length, settings=this._core.settings; if(settings.slideBy=='page'){ position=$.inArray(this.current(), this._pages); length=this._pages.length; successor ? ++position:--position; position=this._pages[((position % length) + length) % length].start; }else{ position=this._core.relative(this._core.current()); length=this._core.items().length; successor ? position +=settings.slideBy:position -=settings.slideBy; } return position; }; Navigation.prototype.next=function(speed){ $.proxy(this._overrides.to, this._core)(this.getPosition(true), speed); }; Navigation.prototype.prev=function(speed){ $.proxy(this._overrides.to, this._core)(this.getPosition(false), speed); }; Navigation.prototype.to=function(position, speed, standard){ var length; if(!standard&&this._pages.length){ length=this._pages.length; $.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed); }else{ $.proxy(this._overrides.to, this._core)(position, speed); }}; $.fn.owlCarousel.Constructor.Plugins.Navigation=Navigation; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ 'use strict'; var Hash=function(carousel){ this._core=carousel; this._hashes={}; this.$element=this._core.$element; this._handlers={ 'initialized.owl.carousel': $.proxy(function(e){ if(e.namespace&&this._core.settings.startPosition==='URLHash'){ $(window).trigger('hashchange.owl.navigation'); }}, this), 'prepared.owl.carousel': $.proxy(function(e){ if(e.namespace){ var hash=$(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash'); if(!hash){ return; } this._hashes[hash]=e.content; }}, this), 'changed.owl.carousel': $.proxy(function(e){ if(e.namespace&&e.property.name==='position'){ var current=this._core.items(this._core.relative(this._core.current())), hash=$.map(this._hashes, function(item, hash){ return item===current ? hash:null; }).join(); if(!hash||window.location.hash.slice(1)===hash){ return; } window.location.hash=hash; }}, this) }; this._core.options=$.extend({}, Hash.Defaults, this._core.options); this.$element.on(this._handlers); $(window).on('hashchange.owl.navigation', $.proxy(function(e){ var hash=window.location.hash.substring(1), items=this._core.$stage.children(), position=this._hashes[hash]&&items.index(this._hashes[hash]); if(position===undefined||position===this._core.current()){ return; } this._core.to(this._core.relative(position), false, true); }, this)); }; Hash.Defaults={ URLhashListener: false }; Hash.prototype.destroy=function(){ var handler, property; $(window).off('hashchange.owl.navigation'); for (handler in this._handlers){ this._core.$element.off(handler, this._handlers[handler]); } for (property in Object.getOwnPropertyNames(this)){ typeof this[property]!='function'&&(this[property]=null); }}; $.fn.owlCarousel.Constructor.Plugins.Hash=Hash; })(window.Zepto||window.jQuery, window, document); ;(function($, window, document, undefined){ var style=$('').get(0).style, prefixes='Webkit Moz O ms'.split(' '), events={ transition: { end: { WebkitTransition: 'webkitTransitionEnd', MozTransition: 'transitionend', OTransition: 'oTransitionEnd', transition: 'transitionend' }}, animation: { end: { WebkitAnimation: 'webkitAnimationEnd', MozAnimation: 'animationend', OAnimation: 'oAnimationEnd', animation: 'animationend' }} }, tests={ csstransforms: function(){ return !!test('transform'); }, csstransforms3d: function(){ return !!test('perspective'); }, csstransitions: function(){ return !!test('transition'); }, cssanimations: function(){ return !!test('animation'); }}; function test(property, prefixed){ var result=false, upper=property.charAt(0).toUpperCase() + property.slice(1); $.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property){ if(style[property]!==undefined){ result=prefixed ? property:true; return false; }}); return result; } function prefixed(property){ return test(property, true); } if(tests.csstransitions()){ $.support.transition=new String(prefixed('transition')) $.support.transition.end=events.transition.end[ $.support.transition ]; } if(tests.cssanimations()){ $.support.animation=new String(prefixed('animation')) $.support.animation.end=events.animation.end[ $.support.animation ]; } if(tests.csstransforms()){ $.support.transform=new String(prefixed('transform')); $.support.transform3d=tests.csstransforms3d(); }})(window.Zepto||window.jQuery, window, document); (function(){var a,b,c,d=function(a,b){return function(){return a.apply(b,arguments)}},e=[].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}(),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(){console.warn("MutationObserver is not supported by your browser."),console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),this.WOW=function(){function f(a){null==a&&(a={}),this.scrollCallback=d(this.scrollCallback,this),this.scrollHandler=d(this.scrollHandler,this),this.start=d(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return f.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0},f.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():document.addEventListener("DOMContentLoaded",this.start),this.finished=[]},f.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);window.addEventListener("scroll",this.scrollHandler,!1),window.addEventListener("resize",this.scrollHandler,!1),this.interval=setInterval(this.scrollCallback,50)}return this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},f.prototype.stop=function(){return this.stopped=!0,window.removeEventListener("scroll",this.scrollHandler,!1),window.removeEventListener("resize",this.scrollHandler,!1),null!=this.interval?clearInterval(this.interval):void 0},f.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},f.prototype.doSync=function(a){var b,c,d,f,g;if(!this.stopped){if(null==a&&(a=this.element),1!==a.nodeType)return;for(a=a.parentNode||a,f=a.querySelectorAll("."+this.config.boxClass),g=[],c=0,d=f.length;d>c;c++)b=f[c],e.call(this.all,b)<0?(this.applyStyle(b,!0),this.boxes.push(b),this.all.push(b),g.push(this.scrolled=!0)):g.push(void 0);return g}},f.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass},f.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))},f.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),f.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.setAttribute("style","visibility: visible;"));return e},f.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},f.prototype.vendors=["moz","webkit"],f.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},f.prototype.vendorCSS=function(a,b){var c,d,e,f,g,h;for(d=window.getComputedStyle(a),c=d.getPropertyCSSValue(b),h=this.vendors,f=0,g=h.length;g>f;f++)e=h[f],c=c||d.getPropertyCSSValue("-"+e+"-"+b);return c},f.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=window.getComputedStyle(a).getPropertyValue("animation-name")}return"none"===b?"":b},f.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},f.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},f.prototype.scrollHandler=function(){return this.scrolled=!0},f.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()},f.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},f.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,innerHeight)-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},f.prototype.util=function(){return null!=this._util?this._util:this._util=new b},f.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},f}()}).call(this); (function($){ $.fn.appear=function(fn, options){ var settings=$.extend({ data: undefined, one: true, accX: 0, accY: 0 }, options); return this.each(function(){ var t=$(this); t.appeared=false; if(!fn){ t.trigger('appear', settings.data); return; } var w=$(window); var check=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; var ax=settings.accX; var ay=settings.accY; var th=t.height(); var wh=w.height(); var tw=t.width(); var ww=w.width(); if(y + th + ay >=b && y <=b + wh + ay && x + tw + ax >=a && x <=a + ww + ax){ if(!t.appeared) t.trigger('appear', settings.data); }else{ t.appeared=false; }}; var modifiedFn=function(){ t.appeared=true; if(settings.one){ w.unbind('scroll', check); var i=$.inArray(check, $.fn.appear.checks); if(i >=0) $.fn.appear.checks.splice(i, 1); } fn.apply(this, arguments); }; if(settings.one) t.one('appear', settings.data, modifiedFn); else t.bind('appear', settings.data, modifiedFn); w.scroll(check); $.fn.appear.checks.push(check); (check)(); }); }; $.extend($.fn.appear, { checks: [], timeout: null, checkAll: function(){ var length=$.fn.appear.checks.length; if(length > 0) while (length--) ($.fn.appear.checks[length])(); }, 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 old=$.fn[n]; if(old){ $.fn[n]=function(){ var r=old.apply(this, arguments); $.fn.appear.run(); return r; }} }); })(jQuery); (function(factory){ "use strict"; if(typeof define==="function"&&define.amd){ define([ "jquery" ], factory); }else{ factory(jQuery); }})(function($){ "use strict"; var PRECISION=100; var instances=[], matchers=[]; matchers.push(/^[0-9]*$/.source); matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}([0-9]{1,2}(:[0-9]{2}){2})?/.source); matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}([0-9]{1,2}(:[0-9]{2}){2})?/.source); matchers=new RegExp(matchers.join("|")); function parseDateString(dateString){ if(dateString instanceof Date){ return dateString; } if(String(dateString).match(matchers)){ if(String(dateString).match(/^[0-9]*$/)){ dateString=Number(dateString); } if(String(dateString).match(/\-/)){ dateString=String(dateString).replace(/\-/g, "/"); } return new Date(dateString); }else{ throw new Error("Couldn't cast `" + dateString + "` to a date object."); }} var DIRECTIVE_KEY_MAP={ Y: "years", m: "months", w: "weeks", d: "days", D: "totalDays", H: "hours", M: "minutes", S: "seconds" }; function strftime(offsetObject){ return function(format){ var directives=format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi); if(directives){ for (var i=0, len=directives.length; i < len; ++i){ var directive=directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/), regexp=new RegExp(directive[0]), modifier=directive[1]||"", plural=directive[3]||"", value=null; directive=directive[2]; if(DIRECTIVE_KEY_MAP.hasOwnProperty(directive)){ value=DIRECTIVE_KEY_MAP[directive]; value=Number(offsetObject[value]); } if(value!==null){ if(modifier==="!"){ value=pluralize(plural, value); } if(modifier===""){ if(value < 10){ value="0" + value.toString(); }} format=format.replace(regexp, value.toString()); }} } format=format.replace(/%%/, "%"); return format; };} function pluralize(format, count){ var plural="s", singular=""; if(format){ format=format.replace(/(:|;|\s)/gi, "").split(/\,/); if(format.length===1){ plural=format[0]; }else{ singular=format[0]; plural=format[1]; }} if(Math.abs(count)===1){ return singular; }else{ return plural; }} var Countdown=function(el, finalDate, callback){ this.el=el; this.$el=$(el); this.interval=null; this.offset={}; this.instanceNumber=instances.length; instances.push(this); this.$el.data("countdown-instance", this.instanceNumber); if(callback){ this.$el.on("update.countdown", callback); this.$el.on("stoped.countdown", callback); this.$el.on("finish.countdown", callback); } this.setFinalDate(finalDate); this.start(); }; $.extend(Countdown.prototype, { start: function(){ if(this.interval!==null){ clearInterval(this.interval); } var self=this; this.update(); this.interval=setInterval(function(){ self.update.call(self); }, PRECISION); }, stop: function(){ clearInterval(this.interval); this.interval=null; this.dispatchEvent("stoped"); }, pause: function(){ this.stop.call(this); }, resume: function(){ this.start.call(this); }, remove: function(){ this.stop(); instances[this.instanceNumber]=null; delete this.$el.data().countdownInstance; }, setFinalDate: function(value){ this.finalDate=parseDateString(value); }, update: function(){ if(this.$el.closest("html").length===0){ this.remove(); return; } this.totalSecsLeft=this.finalDate.getTime() - new Date().getTime(); this.totalSecsLeft=Math.ceil(this.totalSecsLeft / 1e3); this.totalSecsLeft=this.totalSecsLeft < 0 ? 0:this.totalSecsLeft; this.offset={ seconds: this.totalSecsLeft % 60, minutes: Math.floor(this.totalSecsLeft / 60) % 60, hours: Math.floor(this.totalSecsLeft / 60 / 60) % 24, days: Math.floor(this.totalSecsLeft / 60 / 60 / 24) % 7, totalDays: Math.floor(this.totalSecsLeft / 60 / 60 / 24), weeks: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 7), months: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 30), years: Math.floor(this.totalSecsLeft / 60 / 60 / 24 / 365) }; if(this.totalSecsLeft===0){ this.stop(); this.dispatchEvent("finish"); }else{ this.dispatchEvent("update"); }}, dispatchEvent: function(eventName){ var event=$.Event(eventName + ".countdown"); event.finalDate=this.finalDate; event.offset=$.extend({}, this.offset); event.strftime=strftime(this.offset); this.$el.trigger(event); }}); $.fn.countdown=function(){ var argumentsArray=Array.prototype.slice.call(arguments, 0); return this.each(function(){ var instanceNumber=$(this).data("countdown-instance"); if(instanceNumber!==undefined){ var instance=instances[instanceNumber], method=argumentsArray[0]; if(Countdown.prototype.hasOwnProperty(method)){ instance[method].apply(instance, argumentsArray.slice(1)); }else if(String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i)===null){ instance.setFinalDate.call(instance, method); instance.start(); }else{ $.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi, method)); }}else{ new Countdown(this, argumentsArray[0], argumentsArray[1]); }}); };}); (function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory);}else{factory(jQuery);}}(function($){$.ui=$.ui||{};var version=$.ui.version="1.12.1";var widgetUuid=0;var widgetSlice=Array.prototype.slice;$.cleanData=(function(orig){return function(elems){var events,elem,i;for(i=0;(elem=elems[i])!=null;i++){try{events=$._data(elem,"events");if(events&&events.remove){$(elem).triggerHandler("remove");}}catch(e){}} orig(elems);};})($.cleanData);$.widget=function(name,base,prototype){var existingConstructor,constructor,basePrototype;var proxiedPrototype={};var namespace=name.split(".")[0];name=name.split(".")[1];var fullName=namespace+"-"+name;if(!prototype){prototype=base;base=$.Widget;} if($.isArray(prototype)){prototype=$.extend.apply(null,[{}].concat(prototype));} $.expr[":"][fullName.toLowerCase()]=function(elem){return!!$.data(elem,fullName);};$[namespace]=$[namespace]||{};existingConstructor=$[namespace][name];constructor=$[namespace][name]=function(options,element){if(!this._createWidget){return new constructor(options,element);} if(arguments.length){this._createWidget(options,element);}};$.extend(constructor,existingConstructor,{version:prototype.version,_proto:$.extend({},prototype),_childConstructors:[]});basePrototype=new base();basePrototype.options=$.widget.extend({},basePrototype.options);$.each(prototype,function(prop,value){if(!$.isFunction(value)){proxiedPrototype[prop]=value;return;} proxiedPrototype[prop]=(function(){function _super(){return base.prototype[prop].apply(this,arguments);} function _superApply(args){return base.prototype[prop].apply(this,args);} return function(){var __super=this._super;var __superApply=this._superApply;var returnValue;this._super=_super;this._superApply=_superApply;returnValue=value.apply(this,arguments);this._super=__super;this._superApply=__superApply;return returnValue;};})();});constructor.prototype=$.widget.extend(basePrototype,{widgetEventPrefix:existingConstructor?(basePrototype.widgetEventPrefix||name):name},proxiedPrototype,{constructor:constructor,namespace:namespace,widgetName:name,widgetFullName:fullName});if(existingConstructor){$.each(existingConstructor._childConstructors,function(i,child){var childPrototype=child.prototype;$.widget(childPrototype.namespace+"."+childPrototype.widgetName,constructor,child._proto);});delete existingConstructor._childConstructors;}else{base._childConstructors.push(constructor);} $.widget.bridge(name,constructor);return constructor;};$.widget.extend=function(target){var input=widgetSlice.call(arguments,1);var inputIndex=0;var inputLength=input.length;var key;var value;for(;inputIndex",options:{classes:{},disabled:false,create:null},_createWidget:function(options,element){element=$(element||this.defaultElement||this)[0];this.element=$(element);this.uuid=widgetUuid++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=$();this.hoverable=$();this.focusable=$();this.classesElementLookup={};if(element!==this){$.data(element,this.widgetFullName,this);this._on(true,this.element,{remove:function(event){if(event.target===element){this.destroy();}}});this.document=$(element.style?element.ownerDocument:element.document||element);this.window=$(this.document[0].defaultView||this.document[0].parentWindow);} this.options=$.widget.extend({},this.options,this._getCreateOptions(),options);this._create();if(this.options.disabled){this._setOptionDisabled(this.options.disabled);} this._trigger("create",null,this._getCreateEventData());this._init();},_getCreateOptions:function(){return{};},_getCreateEventData:$.noop,_create:$.noop,_init:$.noop,destroy:function(){var that=this;this._destroy();$.each(this.classesElementLookup,function(key,value){that._removeClass(value,key);});this.element.off(this.eventNamespace).removeData(this.widgetFullName);this.widget().off(this.eventNamespace).removeAttr("aria-disabled");this.bindings.off(this.eventNamespace);},_destroy:$.noop,widget:function(){return this.element;},option:function(key,value){var options=key;var parts;var curOption;var i;if(arguments.length===0){return $.widget.extend({},this.options);} if(typeof key==="string"){options={};parts=key.split(".");key=parts.shift();if(parts.length){curOption=options[key]=$.widget.extend({},this.options[key]);for(i=0;i"+"
    "),innerDiv=div.children()[0];$("body").append(div);w1=innerDiv.offsetWidth;div.css("overflow","scroll");w2=innerDiv.offsetWidth;if(w1===w2){w2=div[0].clientWidth;} div.remove();return(cachedScrollbarWidth=w1-w2);},getScrollInfo:function(within){var overflowX=within.isWindow||within.isDocument?"":within.element.css("overflow-x"),overflowY=within.isWindow||within.isDocument?"":within.element.css("overflow-y"),hasOverflowX=overflowX==="scroll"||(overflowX==="auto"&&within.width0?"right":"center",vertical:bottom<0?"top":top>0?"bottom":"middle"};if(targetWidthmax(abs(top),abs(bottom))){feedback.important="horizontal";}else{feedback.important="vertical";} options.using.call(this,props,feedback);};} elem.offset($.extend(position,{using:using}));});};$.ui.position={fit:{left:function(position,data){var within=data.within,withinOffset=within.isWindow?within.scrollLeft:within.offset.left,outerWidth=within.width,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=withinOffset-collisionPosLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-withinOffset,newOverRight;if(data.collisionWidth>outerWidth){if(overLeft>0&&overRight<=0){newOverRight=position.left+overLeft+data.collisionWidth-outerWidth-withinOffset;position.left+=overLeft-newOverRight;}else if(overRight>0&&overLeft<=0){position.left=withinOffset;}else{if(overLeft>overRight){position.left=withinOffset+outerWidth-data.collisionWidth;}else{position.left=withinOffset;}}}else if(overLeft>0){position.left+=overLeft;}else if(overRight>0){position.left-=overRight;}else{position.left=max(position.left-collisionPosLeft,position.left);}},top:function(position,data){var within=data.within,withinOffset=within.isWindow?within.scrollTop:within.offset.top,outerHeight=data.within.height,collisionPosTop=position.top-data.collisionPosition.marginTop,overTop=withinOffset-collisionPosTop,overBottom=collisionPosTop+data.collisionHeight-outerHeight-withinOffset,newOverBottom;if(data.collisionHeight>outerHeight){if(overTop>0&&overBottom<=0){newOverBottom=position.top+overTop+data.collisionHeight-outerHeight-withinOffset;position.top+=overTop-newOverBottom;}else if(overBottom>0&&overTop<=0){position.top=withinOffset;}else{if(overTop>overBottom){position.top=withinOffset+outerHeight-data.collisionHeight;}else{position.top=withinOffset;}}}else if(overTop>0){position.top+=overTop;}else if(overBottom>0){position.top-=overBottom;}else{position.top=max(position.top-collisionPosTop,position.top);}}},flip:{left:function(position,data){var within=data.within,withinOffset=within.offset.left+within.scrollLeft,outerWidth=within.width,offsetLeft=within.isWindow?within.scrollLeft:within.offset.left,collisionPosLeft=position.left-data.collisionPosition.marginLeft,overLeft=collisionPosLeft-offsetLeft,overRight=collisionPosLeft+data.collisionWidth-outerWidth-offsetLeft,myOffset=data.my[0]==="left"?-data.elemWidth:data.my[0]==="right"?data.elemWidth:0,atOffset=data.at[0]==="left"?data.targetWidth:data.at[0]==="right"?-data.targetWidth:0,offset=-2*data.offset[0],newOverRight,newOverLeft;if(overLeft<0){newOverRight=position.left+myOffset+atOffset+offset+data.collisionWidth-outerWidth-withinOffset;if(newOverRight<0||newOverRight0){newOverLeft=position.left-data.collisionPosition.marginLeft+myOffset+atOffset+offset-offsetLeft;if(newOverLeft>0||abs(newOverLeft)0){newOverTop=position.top-data.collisionPosition.marginTop+myOffset+atOffset+offset-offsetTop;if(newOverTop>0||abs(newOverTop)")[0],colors,each=jQuery.each;supportElem.style.cssText="background-color:rgba(1,1,1,.5)";support.rgba=supportElem.style.backgroundColor.indexOf("rgba")>-1;each(spaces,function(spaceName,space){space.cache="_"+spaceName;space.props.alpha={idx:3,type:"percent",def:1};});function clamp(value,prop,allowEmpty){var type=propTypes[prop.type]||{};if(value==null){return(allowEmpty||!prop.def)?null:prop.def;} value=type.floor?~~value:parseFloat(value);if(isNaN(value)){return prop.def;} if(type.mod){return(value+type.mod)%type.mod;} return 0>value?0:type.maxtype.mod/2){startValue+=type.mod;}else if(startValue-endValue>type.mod/2){startValue-=type.mod;}} result[index]=clamp((endValue-startValue)*distance+startValue,prop);}});return this[spaceName](result);},blend:function(opaque){if(this._rgba[3]===1){return this;} var rgb=this._rgba.slice(),a=rgb.pop(),blend=color(opaque)._rgba;return color(jQuery.map(rgb,function(v,i){return(1-a)*blend[i]+a*v;}));},toRgbaString:function(){var prefix="rgba(",rgba=jQuery.map(this._rgba,function(v,i){return v==null?(i>2?1:0):v;});if(rgba[3]===1){rgba.pop();prefix="rgb(";} return prefix+rgba.join()+")";},toHslaString:function(){var prefix="hsla(",hsla=jQuery.map(this.hsla(),function(v,i){if(v==null){v=i>2?1:0;} if(i&&i<3){v=Math.round(v*100)+"%";} return v;});if(hsla[3]===1){hsla.pop();prefix="hsl(";} return prefix+hsla.join()+")";},toHexString:function(includeAlpha){var rgba=this._rgba.slice(),alpha=rgba.pop();if(includeAlpha){rgba.push(~~(alpha*255));} return"#"+jQuery.map(rgba,function(v){v=(v||0).toString(16);return v.length===1?"0"+v:v;}).join("");},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString();}});color.fn.parse.prototype=color.fn;function hue2rgb(p,q,h){h=(h+1)%1;if(h*6<1){return p+(q-p)*h*6;} if(h*2<1){return q;} if(h*3<2){return p+(q-p)*((2/3)-h)*6;} return p;} spaces.hsla.to=function(rgba){if(rgba[0]==null||rgba[1]==null||rgba[2]==null){return[null,null,null,rgba[3]];} var r=rgba[0]/255,g=rgba[1]/255,b=rgba[2]/255,a=rgba[3],max=Math.max(r,g,b),min=Math.min(r,g,b),diff=max-min,add=max+min,l=add*0.5,h,s;if(min===max){h=0;}else if(r===max){h=(60*(g-b)/diff)+360;}else if(g===max){h=(60*(b-r)/diff)+120;}else{h=(60*(r-g)/diff)+240;} if(diff===0){s=0;}else if(l<=0.5){s=diff/add;}else{s=diff/(2-add);} return[Math.round(h)%360,s,l,a==null?1:a];};spaces.hsla.from=function(hsla){if(hsla[0]==null||hsla[1]==null||hsla[2]==null){return[null,null,null,hsla[3]];} var h=hsla[0]/360,s=hsla[1],l=hsla[2],a=hsla[3],q=l<=0.5?l*(1+s):l+s-l*s,p=2*l-q;return[Math.round(hue2rgb(p,q,h+(1/3))*255),Math.round(hue2rgb(p,q,h)*255),Math.round(hue2rgb(p,q,h-(1/3))*255),a];};each(spaces,function(spaceName,space){var props=space.props,cache=space.cache,to=space.to,from=space.from;color.fn[spaceName]=function(value){if(to&&!this[cache]){this[cache]=to(this._rgba);} if(value===undefined){return this[cache].slice();} var ret,type=jQuery.type(value),arr=(type==="array"||type==="object")?value:arguments,local=this[cache].slice();each(props,function(key,prop){var val=arr[type==="object"?key:prop.idx];if(val==null){val=local[prop.idx];} local[prop.idx]=clamp(val,prop);});if(from){ret=color(from(local));ret[cache]=local;return ret;}else{return color(local);}};each(props,function(key,prop){if(color.fn[key]){return;} color.fn[key]=function(value){var vtype=jQuery.type(value),fn=(key==="alpha"?(this._hsla?"hsla":"rgba"):spaceName),local=this[fn](),cur=local[prop.idx],match;if(vtype==="undefined"){return cur;} if(vtype==="function"){value=value.call(this,cur);vtype=jQuery.type(value);} if(value==null&&prop.empty){return this;} if(vtype==="string"){match=rplusequals.exec(value);if(match){value=cur+parseFloat(match[2])*(match[1]==="+"?1:-1);}} local[prop.idx]=value;return this[fn](local);};});});color.hook=function(hook){var hooks=hook.split(" ");each(hooks,function(i,hook){jQuery.cssHooks[hook]={set:function(elem,value){var parsed,curElem,backgroundColor="";if(value!=="transparent"&&(jQuery.type(value)!=="string"||(parsed=stringParse(value)))){value=color(parsed||value);if(!support.rgba&&value._rgba[3]!==1){curElem=hook==="backgroundColor"?elem.parentNode:elem;while((backgroundColor===""||backgroundColor==="transparent")&&curElem&&curElem.style){try{backgroundColor=jQuery.css(curElem,"backgroundColor");curElem=curElem.parentNode;}catch(e){}} value=value.blend(backgroundColor&&backgroundColor!=="transparent"?backgroundColor:"_default");} value=value.toRgbaString();} try{elem.style[hook]=value;}catch(e){}}};jQuery.fx.step[hook]=function(fx){if(!fx.colorInit){fx.start=color(fx.elem,hook);fx.end=color(fx.end);fx.colorInit=true;} jQuery.cssHooks[hook].set(fx.elem,fx.start.transition(fx.end,fx.pos));};});};color.hook(stepHooks);jQuery.cssHooks.borderColor={expand:function(value){var expanded={};each(["Top","Right","Bottom","Left"],function(i,part){expanded["border"+part+"Color"]=value;});return expanded;}};colors=jQuery.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"};})(jQuery);(function(){var classAnimationActions=["add","remove","toggle"],shorthandStyles={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};$.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(_,prop){$.fx.step[prop]=function(fx){if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){jQuery.style(fx.elem,prop,fx.end);fx.setAttr=true;}};});function getElementStyles(elem){var key,len,style=elem.ownerDocument.defaultView?elem.ownerDocument.defaultView.getComputedStyle(elem,null):elem.currentStyle,styles={};if(style&&style.length&&style[0]&&style[style[0]]){len=style.length;while(len--){key=style[len];if(typeof style[key]==="string"){styles[$.camelCase(key)]=style[key];}}}else{for(key in style){if(typeof style[key]==="string"){styles[key]=style[key];}}} return styles;} function styleDifference(oldStyle,newStyle){var diff={},name,value;for(name in newStyle){value=newStyle[name];if(oldStyle[name]!==value){if(!shorthandStyles[name]){if($.fx.step[name]||!isNaN(parseFloat(value))){diff[name]=value;}}}} return diff;} if(!$.fn.addBack){$.fn.addBack=function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));};} $.effects.animateClass=function(value,duration,easing,callback){var o=$.speed(duration,easing,callback);return this.queue(function(){var animated=$(this),baseClass=animated.attr("class")||"",applyClassChange,allAnimations=o.children?animated.find("*").addBack():animated;allAnimations=allAnimations.map(function(){var el=$(this);return{el:el,start:getElementStyles(this)};});applyClassChange=function(){$.each(classAnimationActions,function(i,action){if(value[action]){animated[action+"Class"](value[action]);}});};applyClassChange();allAnimations=allAnimations.map(function(){this.end=getElementStyles(this.el[0]);this.diff=styleDifference(this.start,this.end);return this;});animated.attr("class",baseClass);allAnimations=allAnimations.map(function(){var styleInfo=this,dfd=$.Deferred(),opts=$.extend({},o,{queue:false,complete:function(){dfd.resolve(styleInfo);}});this.el.animate(this.diff,opts);return dfd.promise();});$.when.apply($,allAnimations.get()).done(function(){applyClassChange();$.each(arguments,function(){var el=this.el;$.each(this.diff,function(key){el.css(key,"");});});o.complete.call(animated[0]);});});};$.fn.extend({addClass:(function(orig){return function(classNames,speed,easing,callback){return speed?$.effects.animateClass.call(this,{add:classNames},speed,easing,callback):orig.apply(this,arguments);};})($.fn.addClass),removeClass:(function(orig){return function(classNames,speed,easing,callback){return arguments.length>1?$.effects.animateClass.call(this,{remove:classNames},speed,easing,callback):orig.apply(this,arguments);};})($.fn.removeClass),toggleClass:(function(orig){return function(classNames,force,speed,easing,callback){if(typeof force==="boolean"||force===undefined){if(!speed){return orig.apply(this,arguments);}else{return $.effects.animateClass.call(this,(force?{add:classNames}:{remove:classNames}),speed,easing,callback);}}else{return $.effects.animateClass.call(this,{toggle:classNames},force,speed,easing);}};})($.fn.toggleClass),switchClass:function(remove,add,speed,easing,callback){return $.effects.animateClass.call(this,{add:add,remove:remove},speed,easing,callback);}});})();(function(){if($.expr&&$.expr.filters&&$.expr.filters.animated){$.expr.filters.animated=(function(orig){return function(elem){return!!$(elem).data(dataSpaceAnimated)||orig(elem);};})($.expr.filters.animated);} if($.uiBackCompat!==false){$.extend($.effects,{save:function(element,set){var i=0,length=set.length;for(;i
    ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;try{active.id;}catch(e){active=document.body;} element.wrap(wrapper);if(element[0]===active||$.contains(element[0],active)){$(active).trigger("focus");} wrapper=element.parent();if(element.css("position")==="static"){wrapper.css({position:"relative"});element.css({position:"relative"});}else{$.extend(props,{position:element.css("position"),zIndex:element.css("z-index")});$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos);if(isNaN(parseInt(props[pos],10))){props[pos]="auto";}});element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"});} element.css(size);return wrapper.css(props).show();},removeWrapper:function(element){var active=document.activeElement;if(element.parent().is(".ui-effects-wrapper")){element.parent().replaceWith(element);if(element[0]===active||$.contains(element[0],active)){$(active).trigger("focus");}} return element;}});} $.extend($.effects,{version:"1.12.1",define:function(name,mode,effect){if(!effect){effect=mode;mode="effect";} $.effects.effect[name]=effect;$.effects.effect[name].mode=mode;return effect;},scaledDimensions:function(element,percent,direction){if(percent===0){return{height:0,width:0,outerHeight:0,outerWidth:0};} var x=direction!=="horizontal"?((percent||100)/100):1,y=direction!=="vertical"?((percent||100)/100):1;return{height:element.height()*y,width:element.width()*x,outerHeight:element.outerHeight()*y,outerWidth:element.outerWidth()*x};},clipToBox:function(animation){return{width:animation.clip.right-animation.clip.left,height:animation.clip.bottom-animation.clip.top,left:animation.clip.left,top:animation.clip.top};},unshift:function(element,queueLength,count){var queue=element.queue();if(queueLength>1){queue.splice.apply(queue,[1,0].concat(queue.splice(queueLength,count)));} element.dequeue();},saveStyle:function(element){element.data(dataSpaceStyle,element[0].style.cssText);},restoreStyle:function(element){element[0].style.cssText=element.data(dataSpaceStyle)||"";element.removeData(dataSpaceStyle);},mode:function(element,mode){var hidden=element.is(":hidden");if(mode==="toggle"){mode=hidden?"show":"hide";} if(hidden?mode==="hide":mode==="show"){mode="none";} return mode;},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=0.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height;} switch(origin[1]){case"left":x=0;break;case"center":x=0.5;break;case"right":x=1;break;default:x=origin[1]/original.width;} return{x:x,y:y};},createPlaceholder:function(element){var placeholder,cssPosition=element.css("position"),position=element.position();element.css({marginTop:element.css("marginTop"),marginBottom:element.css("marginBottom"),marginLeft:element.css("marginLeft"),marginRight:element.css("marginRight")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight());if(/^(static|relative)/.test(cssPosition)){cssPosition="absolute";placeholder=$("<"+element[0].nodeName+">").insertAfter(element).css({display:/^(inline|ruby)/.test(element.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:element.css("marginTop"),marginBottom:element.css("marginBottom"),marginLeft:element.css("marginLeft"),marginRight:element.css("marginRight"),"float":element.css("float")}).outerWidth(element.outerWidth()).outerHeight(element.outerHeight()).addClass("ui-effects-placeholder");element.data(dataSpace+"placeholder",placeholder);} element.css({position:cssPosition,left:position.left,top:position.top});return placeholder;},removePlaceholder:function(element){var dataKey=dataSpace+"placeholder",placeholder=element.data(dataKey);if(placeholder){placeholder.remove();element.removeData(dataKey);}},cleanUp:function(element){$.effects.restoreStyle(element);$.effects.removePlaceholder(element);},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){var unit=element.cssUnit(x);if(unit[0]>0){value[x]=unit[0]*factor+unit[1];}});return value;}});function _normalizeArguments(effect,options,speed,callback){if($.isPlainObject(effect)){options=effect;effect=effect.effect;} effect={effect:effect};if(options==null){options={};} if($.isFunction(options)){callback=options;speed=null;options={};} if(typeof options==="number"||$.fx.speeds[options]){callback=speed;speed=options;options={};} if($.isFunction(speed)){callback=speed;speed=null;} if(options){$.extend(effect,options);} speed=speed||options.duration;effect.duration=$.fx.off?0:typeof speed==="number"?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default;effect.complete=callback||options.complete;return effect;} function standardAnimationOption(option){if(!option||typeof option==="number"||$.fx.speeds[option]){return true;} if(typeof option==="string"&&!$.effects.effect[option]){return true;} if($.isFunction(option)){return true;} if(typeof option==="object"&&!option.effect){return true;} return false;} $.fn.extend({effect:function(){var args=_normalizeArguments.apply(this,arguments),effectMethod=$.effects.effect[args.effect],defaultMode=effectMethod.mode,queue=args.queue,queueName=queue||"fx",complete=args.complete,mode=args.mode,modes=[],prefilter=function(next){var el=$(this),normalizedMode=$.effects.mode(el,mode)||defaultMode;el.data(dataSpaceAnimated,true);modes.push(normalizedMode);if(defaultMode&&(normalizedMode==="show"||(normalizedMode===defaultMode&&normalizedMode==="hide"))){el.show();} if(!defaultMode||normalizedMode!=="none"){$.effects.saveStyle(el);} if($.isFunction(next)){next();}};if($.fx.off||!effectMethod){if(mode){return this[mode](args.duration,complete);}else{return this.each(function(){if(complete){complete.call(this);}});}} function run(next){var elem=$(this);function cleanup(){elem.removeData(dataSpaceAnimated);$.effects.cleanUp(elem);if(args.mode==="hide"){elem.hide();} done();} function done(){if($.isFunction(complete)){complete.call(elem[0]);} if($.isFunction(next)){next();}} args.mode=modes.shift();if($.uiBackCompat!==false&&!defaultMode){if(elem.is(":hidden")?mode==="hide":mode==="show"){elem[mode]();done();}else{effectMethod.call(elem[0],args,done);}}else{if(args.mode==="none"){elem[mode]();done();}else{effectMethod.call(elem[0],args,cleanup);}}} return queue===false?this.each(prefilter).each(run):this.queue(queueName,prefilter).queue(queueName,run);},show:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args.mode="show";return this.effect.call(this,args);}};})($.fn.show),hide:(function(orig){return function(option){if(standardAnimationOption(option)){return orig.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args.mode="hide";return this.effect.call(this,args);}};})($.fn.hide),toggle:(function(orig){return function(option){if(standardAnimationOption(option)||typeof option==="boolean"){return orig.apply(this,arguments);}else{var args=_normalizeArguments.apply(this,arguments);args.mode="toggle";return this.effect.call(this,args);}};})($.fn.toggle),cssUnit:function(key){var style=this.css(key),val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0){val=[parseFloat(style),unit];}});return val;},cssClip:function(clipObj){if(clipObj){return this.css("clip","rect("+clipObj.top+"px "+clipObj.right+"px "+clipObj.bottom+"px "+clipObj.left+"px)");} return parseClip(this.css("clip"),this);},transfer:function(options,done){var element=$(this),target=$(options.to),targetFixed=target.css("position")==="fixed",body=$("body"),fixTop=targetFixed?body.scrollTop():0,fixLeft=targetFixed?body.scrollLeft():0,endPosition=target.offset(),animation={top:endPosition.top-fixTop,left:endPosition.left-fixLeft,height:target.innerHeight(),width:target.innerWidth()},startPosition=element.offset(),transfer=$("
    ").appendTo("body").addClass(options.className).css({top:startPosition.top-fixTop,left:startPosition.left-fixLeft,height:element.innerHeight(),width:element.innerWidth(),position:targetFixed?"fixed":"absolute"}).animate(animation,options.duration,options.easing,function(){transfer.remove();if($.isFunction(done)){done();}});}});function parseClip(str,element){var outerWidth=element.outerWidth(),outerHeight=element.outerHeight(),clipRegex=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,values=clipRegex.exec(str)||["",0,outerWidth,outerHeight,0];return{top:parseFloat(values[1])||0,right:values[2]==="auto"?outerWidth:parseFloat(values[2]),bottom:values[3]==="auto"?outerHeight:parseFloat(values[3]),left:parseFloat(values[4])||0};} $.fx.step.clip=function(fx){if(!fx.clipInit){fx.start=$(fx.elem).cssClip();if(typeof fx.end==="string"){fx.end=parseClip(fx.end,fx.elem);} fx.clipInit=true;} $(fx.elem).cssClip({top:fx.pos*(fx.end.top-fx.start.top)+fx.start.top,right:fx.pos*(fx.end.right-fx.start.right)+fx.start.right,bottom:fx.pos*(fx.end.bottom-fx.start.bottom)+fx.start.bottom,left:fx.pos*(fx.end.left-fx.start.left)+fx.start.left});};})();(function(){var baseEasings={};$.each(["Quad","Cubic","Quart","Quint","Expo"],function(i,name){baseEasings[name]=function(p){return Math.pow(p,i+2);};});$.extend(baseEasings,{Sine:function(p){return 1-Math.cos(p*Math.PI/2);},Circ:function(p){return 1-Math.sqrt(1-p*p);},Elastic:function(p){return p===0||p===1?p:-Math.pow(2,8*(p-1))*Math.sin(((p-1)*80-7.5)*Math.PI/15);},Back:function(p){return p*p*(3*p-2);},Bounce:function(p){var pow2,bounce=4;while(p<((pow2=Math.pow(2,--bounce))-1)/11){} return 1/Math.pow(4,3-bounce)-7.5625*Math.pow((pow2*3-2)/22-p,2);}});$.each(baseEasings,function(name,easeIn){$.easing["easeIn"+name]=easeIn;$.easing["easeOut"+name]=function(p){return 1-easeIn(1-p);};$.easing["easeInOut"+name]=function(p){return p<0.5?easeIn(p*2)/2:1-easeIn(p*-2+2)/2;};});})();var effect=$.effects;var effectsEffectBlind=$.effects.define("blind","hide",function(options,done){var map={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},element=$(this),direction=options.direction||"up",start=element.cssClip(),animate={clip:$.extend({},start)},placeholder=$.effects.createPlaceholder(element);animate.clip[map[direction][0]]=animate.clip[map[direction][1]];if(options.mode==="show"){element.cssClip(animate.clip);if(placeholder){placeholder.css($.effects.clipToBox(animate));} animate.clip=start;} if(placeholder){placeholder.animate($.effects.clipToBox(animate),options.duration,options.easing);} element.animate(animate,{queue:false,duration:options.duration,easing:options.easing,complete:done});});var effectsEffectBounce=$.effects.define("bounce",function(options,done){var upAnim,downAnim,refValue,element=$(this),mode=options.mode,hide=mode==="hide",show=mode==="show",direction=options.direction||"up",distance=options.distance,times=options.times||5,anims=times*2+(show||hide?1:0),speed=options.duration/anims,easing=options.easing,ref=(direction==="up"||direction==="down")?"top":"left",motion=(direction==="up"||direction==="left"),i=0,queuelen=element.queue().length;$.effects.createPlaceholder(element);refValue=element.css(ref);if(!distance){distance=element[ref==="top"?"outerHeight":"outerWidth"]()/3;} if(show){downAnim={opacity:1};downAnim[ref]=refValue;element.css("opacity",0).css(ref,motion?-distance*2:distance*2).animate(downAnim,speed,easing);} if(hide){distance=distance/Math.pow(2,times-1);} downAnim={};downAnim[ref]=refValue;for(;i
    ").css({position:"absolute",visibility:"visible",left:-j*width,top:-i*height}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:width,height:height,left:left+(show?mx*width:0),top:top+(show?my*height:0),opacity:show?0:1}).animate({left:left+(show?0:mx*width),top:top+(show?0:my*height),opacity:show?1:0},options.duration||500,options.easing,childComplete);}} function animComplete(){element.css({visibility:"visible"});$(pieces).remove();done();}});var effectsEffectFade=$.effects.define("fade","toggle",function(options,done){var show=options.mode==="show";$(this).css("opacity",show?0:1).animate({opacity:show?1:0},{queue:false,duration:options.duration,easing:options.easing,complete:done});});var effectsEffectFold=$.effects.define("fold","hide",function(options,done){var element=$(this),mode=options.mode,show=mode==="show",hide=mode==="hide",size=options.size||15,percent=/([0-9]+)%/.exec(size),horizFirst=!!options.horizFirst,ref=horizFirst?["right","bottom"]:["bottom","right"],duration=options.duration/2,placeholder=$.effects.createPlaceholder(element),start=element.cssClip(),animation1={clip:$.extend({},start)},animation2={clip:$.extend({},start)},distance=[start[ref[0]],start[ref[1]]],queuelen=element.queue().length;if(percent){size=parseInt(percent[1],10)/100*distance[hide?0:1];} animation1.clip[ref[0]]=size;animation2.clip[ref[0]]=size;animation2.clip[ref[1]]=0;if(show){element.cssClip(animation2.clip);if(placeholder){placeholder.css($.effects.clipToBox(animation2));} animation2.clip=start;} element.queue(function(next){if(placeholder){placeholder.animate($.effects.clipToBox(animation1),duration,options.easing).animate($.effects.clipToBox(animation2),duration,options.easing);} next();}).animate(animation1,duration,options.easing).animate(animation2,duration,options.easing).queue(done);$.effects.unshift(element,queuelen,4);});var effectsEffectHighlight=$.effects.define("highlight","show",function(options,done){var element=$(this),animation={backgroundColor:element.css("backgroundColor")};if(options.mode==="hide"){animation.opacity=0;} $.effects.saveStyle(element);element.css({backgroundImage:"none",backgroundColor:options.color||"#ffff99"}).animate(animation,{queue:false,duration:options.duration,easing:options.easing,complete:done});});var effectsEffectSize=$.effects.define("size",function(options,done){var baseline,factor,temp,element=$(this),cProps=["fontSize"],vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],mode=options.mode,restore=mode!=="effect",scale=options.scale||"both",origin=options.origin||["middle","center"],position=element.css("position"),pos=element.position(),original=$.effects.scaledDimensions(element),from=options.from||original,to=options.to||$.effects.scaledDimensions(element,0);$.effects.createPlaceholder(element);if(mode==="show"){temp=from;from=to;to=temp;} factor={from:{y:from.height/original.height,x:from.width/original.width},to:{y:to.height/original.height,x:to.width/original.width}};if(scale==="box"||scale==="both"){if(factor.from.y!==factor.to.y){from=$.effects.setTransition(element,vProps,factor.from.y,from);to=$.effects.setTransition(element,vProps,factor.to.y,to);} if(factor.from.x!==factor.to.x){from=$.effects.setTransition(element,hProps,factor.from.x,from);to=$.effects.setTransition(element,hProps,factor.to.x,to);}} if(scale==="content"||scale==="both"){if(factor.from.y!==factor.to.y){from=$.effects.setTransition(element,cProps,factor.from.y,from);to=$.effects.setTransition(element,cProps,factor.to.y,to);}} if(origin){baseline=$.effects.getBaseline(origin,original);from.top=(original.outerHeight-from.outerHeight)*baseline.y+pos.top;from.left=(original.outerWidth-from.outerWidth)*baseline.x+pos.left;to.top=(original.outerHeight-to.outerHeight)*baseline.y+pos.top;to.left=(original.outerWidth-to.outerWidth)*baseline.x+pos.left;} element.css(from);if(scale==="content"||scale==="both"){vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);hProps=hProps.concat(["marginLeft","marginRight"]);element.find("*[width]").each(function(){var child=$(this),childOriginal=$.effects.scaledDimensions(child),childFrom={height:childOriginal.height*factor.from.y,width:childOriginal.width*factor.from.x,outerHeight:childOriginal.outerHeight*factor.from.y,outerWidth:childOriginal.outerWidth*factor.from.x},childTo={height:childOriginal.height*factor.to.y,width:childOriginal.width*factor.to.x,outerHeight:childOriginal.height*factor.to.y,outerWidth:childOriginal.width*factor.to.x};if(factor.from.y!==factor.to.y){childFrom=$.effects.setTransition(child,vProps,factor.from.y,childFrom);childTo=$.effects.setTransition(child,vProps,factor.to.y,childTo);} if(factor.from.x!==factor.to.x){childFrom=$.effects.setTransition(child,hProps,factor.from.x,childFrom);childTo=$.effects.setTransition(child,hProps,factor.to.x,childTo);} if(restore){$.effects.saveStyle(child);} child.css(childFrom);child.animate(childTo,options.duration,options.easing,function(){if(restore){$.effects.restoreStyle(child);}});});} element.animate(to,{queue:false,duration:options.duration,easing:options.easing,complete:function(){var offset=element.offset();if(to.opacity===0){element.css("opacity",from.opacity);} if(!restore){element.css("position",position==="static"?"relative":position).offset(offset);$.effects.saveStyle(element);} done();}});});var effectsEffectScale=$.effects.define("scale",function(options,done){var el=$(this),mode=options.mode,percent=parseInt(options.percent,10)||(parseInt(options.percent,10)===0?0:(mode!=="effect"?0:100)),newOptions=$.extend(true,{from:$.effects.scaledDimensions(el),to:$.effects.scaledDimensions(el,percent,options.direction||"both"),origin:options.origin||["middle","center"]},options);if(options.fade){newOptions.from.opacity=1;newOptions.to.opacity=0;} $.effects.effect.size.call(this,newOptions,done);});var effectsEffectPuff=$.effects.define("puff","hide",function(options,done){var newOptions=$.extend(true,{},options,{fade:true,percent:parseInt(options.percent,10)||150});$.effects.effect.scale.call(this,newOptions,done);});var effectsEffectPulsate=$.effects.define("pulsate","show",function(options,done){var element=$(this),mode=options.mode,show=mode==="show",hide=mode==="hide",showhide=show||hide,anims=((options.times||5)*2)+(showhide?1:0),duration=options.duration/anims,animateTo=0,i=1,queuelen=element.queue().length;if(show||!element.is(":visible")){element.css("opacity",0).show();animateTo=1;} for(;i0&&img.is(":visible");} if(/^(input|select|textarea|button|object)$/.test(nodeName)){focusableIfVisible=!element.disabled;if(focusableIfVisible){fieldset=$(element).closest("fieldset")[0];if(fieldset){focusableIfVisible=!fieldset.disabled;}}}else if("a"===nodeName){focusableIfVisible=element.href||hasTabindex;}else{focusableIfVisible=hasTabindex;} return focusableIfVisible&&$(element).is(":visible")&&visible($(element));};function visible(element){var visibility=element.css("visibility");while(visibility==="inherit"){element=element.parent();visibility=element.css("visibility");} return visibility!=="hidden";} $.extend($.expr[":"],{focusable:function(element){return $.ui.focusable(element,$.attr(element,"tabindex")!=null);}});var focusable=$.ui.focusable;var form=$.fn.form=function(){return typeof this[0].form==="string"?this.closest("form"):$(this[0].form);};var formResetMixin=$.ui.formResetMixin={_formResetHandler:function(){var form=$(this);setTimeout(function(){var instances=form.data("ui-form-reset-instances");$.each(instances,function(){this.refresh();});});},_bindFormResetHandler:function(){this.form=this.element.form();if(!this.form.length){return;} var instances=this.form.data("ui-form-reset-instances")||[];if(!instances.length){this.form.on("reset.ui-form-reset",this._formResetHandler);} instances.push(this);this.form.data("ui-form-reset-instances",instances);},_unbindFormResetHandler:function(){if(!this.form.length){return;} var instances=this.form.data("ui-form-reset-instances");instances.splice($.inArray(this,instances),1);if(instances.length){this.form.data("ui-form-reset-instances",instances);}else{this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset");}}};if($.fn.jquery.substring(0,3)==="1.7"){$.each(["Width","Height"],function(i,name){var side=name==="Width"?["Left","Right"]:["Top","Bottom"],type=name.toLowerCase(),orig={innerWidth:$.fn.innerWidth,innerHeight:$.fn.innerHeight,outerWidth:$.fn.outerWidth,outerHeight:$.fn.outerHeight};function reduce(elem,size,border,margin){$.each(side,function(){size-=parseFloat($.css(elem,"padding"+this))||0;if(border){size-=parseFloat($.css(elem,"border"+this+"Width"))||0;} if(margin){size-=parseFloat($.css(elem,"margin"+this))||0;}});return size;} $.fn["inner"+name]=function(size){if(size===undefined){return orig["inner"+name].call(this);} return this.each(function(){$(this).css(type,reduce(this,size)+"px");});};$.fn["outer"+name]=function(size,margin){if(typeof size!=="number"){return orig["outer"+name].call(this,size);} return this.each(function(){$(this).css(type,reduce(this,size,true,margin)+"px");});};});$.fn.addBack=function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));};};var keycode=$.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38};var escapeSelector=$.ui.escapeSelector=(function(){var selectorEscape=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(selector){return selector.replace(selectorEscape,"\\$1");};})();var labels=$.fn.labels=function(){var ancestor,selector,id,labels,ancestors;if(this[0].labels&&this[0].labels.length){return this.pushStack(this[0].labels);} labels=this.eq(0).parents("label");id=this.attr("id");if(id){ancestor=this.eq(0).parents().last();ancestors=ancestor.add(ancestor.length?ancestor.siblings():this.siblings());selector="label[for='"+$.ui.escapeSelector(id)+"']";labels=labels.add(ancestors.find(selector).addBack(selector));} return this.pushStack(labels);};var scrollParent=$.fn.scrollParent=function(includeHidden){var position=this.css("position"),excludeStaticParent=position==="absolute",overflowRegex=includeHidden?/(auto|scroll|hidden)/:/(auto|scroll)/,scrollParent=this.parents().filter(function(){var parent=$(this);if(excludeStaticParent&&parent.css("position")==="static"){return false;} return overflowRegex.test(parent.css("overflow")+parent.css("overflow-y")+parent.css("overflow-x"));}).eq(0);return position==="fixed"||!scrollParent.length?$(this[0].ownerDocument||document):scrollParent;};var tabbable=$.extend($.expr[":"],{tabbable:function(element){var tabIndex=$.attr(element,"tabindex"),hasTabindex=tabIndex!=null;return(!hasTabindex||tabIndex>=0)&&$.ui.focusable(element,hasTabindex);}});var uniqueId=$.fn.extend({uniqueId:(function(){var uuid=0;return function(){return this.each(function(){if(!this.id){this.id="ui-id-"+(++uuid);}});};})(),removeUniqueId:function(){return this.each(function(){if(/^ui-id-\d+$/.test(this.id)){$(this).removeAttr("id");}});}});var widgetsAccordion=$.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:false,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var options=this.options;this.prevShow=this.prevHide=$();this._addClass("ui-accordion","ui-widget ui-helper-reset");this.element.attr("role","tablist");if(!options.collapsible&&(options.active===false||options.active==null)){options.active=0;} this._processPanels();if(options.active<0){options.active+=this.headers.length;} this._refresh();},_getCreateEventData:function(){return{header:this.active,panel:!this.active.length?$():this.active.next()};},_createIcons:function(){var icon,children,icons=this.options.icons;if(icons){icon=$("");this._addClass(icon,"ui-accordion-header-icon","ui-icon "+icons.header);icon.prependTo(this.headers);children=this.active.children(".ui-accordion-header-icon");this._removeClass(children,icons.header)._addClass(children,null,icons.activeHeader)._addClass(this.headers,"ui-accordion-icons");}},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons");this.headers.children(".ui-accordion-header-icon").remove();},_destroy:function(){var contents;this.element.removeAttr("role");this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId();this._destroyIcons();contents=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId();if(this.options.heightStyle!=="content"){contents.css("height","");}},_setOption:function(key,value){if(key==="active"){this._activate(value);return;} if(key==="event"){if(this.options.event){this._off(this.headers,this.options.event);} this._setupEvents(value);} this._super(key,value);if(key==="collapsible"&&!value&&this.options.active===false){this._activate(0);} if(key==="icons"){this._destroyIcons();if(value){this._createIcons();}}},_setOptionDisabled:function(value){this._super(value);this.element.attr("aria-disabled",value);this._toggleClass(null,"ui-state-disabled",!!value);this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!value);},_keydown:function(event){if(event.altKey||event.ctrlKey){return;} var keyCode=$.ui.keyCode,length=this.headers.length,currentIndex=this.headers.index(event.target),toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:this._eventHandler(event);break;case keyCode.HOME:toFocus=this.headers[0];break;case keyCode.END:toFocus=this.headers[length-1];break;} if(toFocus){$(event.target).attr("tabIndex",-1);$(toFocus).attr("tabIndex",0);$(toFocus).trigger("focus");event.preventDefault();}},_panelKeyDown:function(event){if(event.keyCode===$.ui.keyCode.UP&&event.ctrlKey){$(event.currentTarget).prev().trigger("focus");}},refresh:function(){var options=this.options;this._processPanels();if((options.active===false&&options.collapsible===true)||!this.headers.length){options.active=false;this.active=$();}else if(options.active===false){this._activate(0);}else if(this.active.length&&!$.contains(this.element[0],this.active[0])){if(this.headers.length===this.headers.find(".ui-state-disabled").length){options.active=false;this.active=$();}else{this._activate(Math.max(0,options.active-1));}}else{options.active=this.headers.index(this.active);} this._destroyIcons();this._refresh();},_processPanels:function(){var prevHeaders=this.headers,prevPanels=this.panels;this.headers=this.element.find(this.options.header);this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default");this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide();this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content");if(prevPanels){this._off(prevHeaders.not(this.headers));this._off(prevPanels.not(this.panels));}},_refresh:function(){var maxHeight,options=this.options,heightStyle=options.heightStyle,parent=this.element.parent();this.active=this._findActive(options.active);this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed");this._addClass(this.active.next(),"ui-accordion-content-active");this.active.next().show();this.headers.attr("role","tab").each(function(){var header=$(this),headerId=header.uniqueId().attr("id"),panel=header.next(),panelId=panel.uniqueId().attr("id");header.attr("aria-controls",panelId);panel.attr("aria-labelledby",headerId);}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex",0);}else{this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"});} this._createIcons();this._setupEvents(options.event);if(heightStyle==="fill"){maxHeight=parent.height();this.element.siblings(":visible").each(function(){var elem=$(this),position=elem.css("position");if(position==="absolute"||position==="fixed"){return;} maxHeight-=elem.outerHeight(true);});this.headers.each(function(){maxHeight-=$(this).outerHeight(true);});this.headers.next().each(function(){$(this).height(Math.max(0,maxHeight-$(this).innerHeight()+$(this).height()));}).css("overflow","auto");}else if(heightStyle==="auto"){maxHeight=0;this.headers.next().each(function(){var isVisible=$(this).is(":visible");if(!isVisible){$(this).show();} maxHeight=Math.max(maxHeight,$(this).css("height","").height());if(!isVisible){$(this).hide();}}).height(maxHeight);}},_activate:function(index){var active=this._findActive(index)[0];if(active===this.active[0]){return;} active=active||this.active[0];this._eventHandler({target:active,currentTarget:active,preventDefault:$.noop});},_findActive:function(selector){return typeof selector==="number"?this.headers.eq(selector):$();},_setupEvents:function(event){var events={keydown:"_keydown"};if(event){$.each(event.split(" "),function(index,eventName){events[eventName]="_eventHandler";});} this._off(this.headers.add(this.headers.next()));this._on(this.headers,events);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers);},_eventHandler:function(event){var activeChildren,clickedChildren,options=this.options,active=this.active,clicked=$(event.currentTarget),clickedIsActive=clicked[0]===active[0],collapsing=clickedIsActive&&options.collapsible,toShow=collapsing?$():clicked.next(),toHide=active.next(),eventData={oldHeader:active,oldPanel:toHide,newHeader:collapsing?$():clicked,newPanel:toShow};event.preventDefault();if((clickedIsActive&&!options.collapsible)||(this._trigger("beforeActivate",event,eventData)===false)){return;} options.active=collapsing?false:this.headers.index(clicked);this.active=clickedIsActive?$():clicked;this._toggle(eventData);this._removeClass(active,"ui-accordion-header-active","ui-state-active");if(options.icons){activeChildren=active.children(".ui-accordion-header-icon");this._removeClass(activeChildren,null,options.icons.activeHeader)._addClass(activeChildren,null,options.icons.header);} if(!clickedIsActive){this._removeClass(clicked,"ui-accordion-header-collapsed")._addClass(clicked,"ui-accordion-header-active","ui-state-active");if(options.icons){clickedChildren=clicked.children(".ui-accordion-header-icon");this._removeClass(clickedChildren,null,options.icons.header)._addClass(clickedChildren,null,options.icons.activeHeader);} this._addClass(clicked.next(),"ui-accordion-content-active");}},_toggle:function(data){var toShow=data.newPanel,toHide=this.prevShow.length?this.prevShow:data.oldPanel;this.prevShow.add(this.prevHide).stop(true,true);this.prevShow=toShow;this.prevHide=toHide;if(this.options.animate){this._animate(toShow,toHide,data);}else{toHide.hide();toShow.show();this._toggleComplete(data);} toHide.attr({"aria-hidden":"true"});toHide.prev().attr({"aria-selected":"false","aria-expanded":"false"});if(toShow.length&&toHide.length){toHide.prev().attr({"tabIndex":-1,"aria-expanded":"false"});}else if(toShow.length){this.headers.filter(function(){return parseInt($(this).attr("tabIndex"),10)===0;}).attr("tabIndex",-1);} toShow.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0});},_animate:function(toShow,toHide,data){var total,easing,duration,that=this,adjust=0,boxSizing=toShow.css("box-sizing"),down=toShow.length&&(!toHide.length||(toShow.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=false;this.element.uniqueId().attr({role:this.options.role,tabIndex:0});this._addClass("ui-menu","ui-widget ui-widget-content");this._on({"mousedown .ui-menu-item":function(event){event.preventDefault();},"click .ui-menu-item":function(event){var target=$(event.target);var active=$($.ui.safeActiveElement(this.document[0]));if(!this.mouseHandled&&target.not(".ui-state-disabled").length){this.select(event);if(!event.isPropagationStopped()){this.mouseHandled=true;} if(target.has(".ui-menu").length){this.expand (event);}else if(!this.element.is(":focus")&&active.closest(".ui-menu").length){this.element.trigger("focus",[true]);if(this.active&&this.active.parents(".ui-menu").length===1){clearTimeout(this.timer);}}}},"mouseenter .ui-menu-item":function(event){if(this.previousFilter){return;} var actualTarget=$(event.target).closest(".ui-menu-item"),target=$(event.currentTarget);if(actualTarget[0]!==target[0]){return;} this._removeClass(target.siblings().children(".ui-state-active"),null,"ui-state-active");this.focus(event,target);},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(event,keepActiveItem){var item=this.active||this.element.find(this.options.items).eq(0);if(!keepActiveItem){this.focus(event,item);}},blur:function(event){this._delay(function(){var notContained=!$.contains(this.element[0],$.ui.safeActiveElement(this.document[0]));if(notContained){this.collapseAll(event);}});},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(event){if(this._closeOnDocumentClick(event)){this.collapseAll(event);} this.mouseHandled=false;}});},_destroy:function(){var items=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),submenus=items.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled "+"tabIndex").removeUniqueId().show();submenus.children().each(function(){var elem=$(this);if(elem.data("ui-menu-submenu-caret")){elem.remove();}});},_keydown:function(event){var match,prev,character,skip,preventDefault=true;switch(event.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $.ui.keyCode.HOME:this._move("first","first",event);break;case $.ui.keyCode.END:this._move("last","last",event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.DOWN:this.next(event);break;case $.ui.keyCode.LEFT:this.collapse(event);break;case $.ui.keyCode.RIGHT:if(this.active&&!this.active.is(".ui-state-disabled")){this.expand (event);} break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=false;prev=this.previousFilter||"";skip=false;character=event.keyCode>=96&&event.keyCode<=105?(event.keyCode-96).toString():String.fromCharCode(event.keyCode);clearTimeout(this.filterTimer);if(character===prev){skip=true;}else{character=prev+character;} match=this._filterMenuItems(character);match=skip&&match.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):match;if(!match.length){character=String.fromCharCode(event.keyCode);match=this._filterMenuItems(character);} if(match.length){this.focus(event,match);this.previousFilter=character;this.filterTimer=this._delay(function(){delete this.previousFilter;},1000);}else{delete this.previousFilter;}} if(preventDefault){event.preventDefault();}},_activate:function(event){if(this.active&&!this.active.is(".ui-state-disabled")){if(this.active.children("[aria-haspopup='true']").length){this.expand (event);}else{this.select(event);}}},refresh:function(){var menus,items,newSubmenus,newItems,newWrappers,that=this,icon=this.options.icons.submenu,submenus=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length);newSubmenus=submenus.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var menu=$(this),item=menu.prev(),submenuCaret=$("").data("ui-menu-submenu-caret",true);that._addClass(submenuCaret,"ui-menu-icon","ui-icon "+icon);item.attr("aria-haspopup","true").prepend(submenuCaret);menu.attr("aria-labelledby",item.attr("id"));});this._addClass(newSubmenus,"ui-menu","ui-widget ui-widget-content ui-front");menus=submenus.add(this.element);items=menus.find(this.options.items);items.not(".ui-menu-item").each(function(){var item=$(this);if(that._isDivider(item)){that._addClass(item,"ui-menu-divider","ui-widget-content");}});newItems=items.not(".ui-menu-item, .ui-menu-divider");newWrappers=newItems.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()});this._addClass(newItems,"ui-menu-item")._addClass(newWrappers,"ui-menu-item-wrapper");items.filter(".ui-state-disabled").attr("aria-disabled","true");if(this.active&&!$.contains(this.element[0],this.active[0])){this.blur();}},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role];},_setOption:function(key,value){if(key==="icons"){var icons=this.element.find(".ui-menu-icon");this._removeClass(icons,null,this.options.icons.submenu)._addClass(icons,null,value.submenu);} this._super(key,value);},_setOptionDisabled:function(value){this._super(value);this.element.attr("aria-disabled",String(value));this._toggleClass(null,"ui-state-disabled",!!value);},focus:function(event,item){var nested,focused,activeParent;this.blur(event,event&&event.type==="focus");this._scrollIntoView(item);this.active=item.first();focused=this.active.children(".ui-menu-item-wrapper");this._addClass(focused,null,"ui-state-active");if(this.options.role){this.element.attr("aria-activedescendant",focused.attr("id"));} activeParent=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper");this._addClass(activeParent,null,"ui-state-active");if(event&&event.type==="keydown"){this._close();}else{this.timer=this._delay(function(){this._close();},this.delay);} nested=item.children(".ui-menu");if(nested.length&&event&&(/^mouse/.test(event.type))){this._startOpening(nested);} this.activeMenu=item.parent();this._trigger("focus",event,{item:item});},_scrollIntoView:function(item){var borderTop,paddingTop,offset,scroll,elementHeight,itemHeight;if(this._hasScroll()){borderTop=parseFloat($.css(this.activeMenu[0],"borderTopWidth"))||0;paddingTop=parseFloat($.css(this.activeMenu[0],"paddingTop"))||0;offset=item.offset().top-this.activeMenu.offset().top-borderTop-paddingTop;scroll=this.activeMenu.scrollTop();elementHeight=this.activeMenu.height();itemHeight=item.outerHeight();if(offset<0){this.activeMenu.scrollTop(scroll+offset);}else if(offset+itemHeight>elementHeight){this.activeMenu.scrollTop(scroll+offset-elementHeight+itemHeight);}}},blur:function(event,fromFocus){if(!fromFocus){clearTimeout(this.timer);} if(!this.active){return;} this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active");this._trigger("blur",event,{item:this.active});this.active=null;},_startOpening:function(submenu){clearTimeout(this.timer);if(submenu.attr("aria-hidden")!=="true"){return;} this.timer=this._delay(function(){this._close();this._open(submenu);},this.delay);},_open:function(submenu){var position=$.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(submenu.parents(".ui-menu")).hide().attr("aria-hidden","true");submenu.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(position);},collapseAll:function(event,all){clearTimeout(this.timer);this.timer=this._delay(function(){var currentMenu=all?this.element:$(event&&event.target).closest(this.element.find(".ui-menu"));if(!currentMenu.length){currentMenu=this.element;} this._close(currentMenu);this.blur(event);this._removeClass(currentMenu.find(".ui-state-active"),null,"ui-state-active");this.activeMenu=currentMenu;},this.delay);},_close:function(startMenu){if(!startMenu){startMenu=this.active?this.active.parent():this.element;} startMenu.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false");},_closeOnDocumentClick:function(event){return!$(event.target).closest(".ui-menu").length;},_isDivider:function(item){return!/[^\-\u2014\u2013\s]/.test(item.text());},collapse:function(event){var newItem=this.active&&this.active.parent().closest(".ui-menu-item",this.element);if(newItem&&newItem.length){this._close();this.focus(event,newItem);}},expand:function(event){var newItem=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();if(newItem&&newItem.length){this._open(newItem.parent());this._delay(function(){this.focus(event,newItem);});}},next:function(event){this._move("next","first",event);},previous:function(event){this._move("prev","last",event);},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length;},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length;},_move:function(direction,filter,event){var next;if(this.active){if(direction==="first"||direction==="last"){next=this.active[direction==="first"?"prevAll":"nextAll"](".ui-menu-item").eq(-1);}else{next=this.active[direction+"All"](".ui-menu-item").eq(0);}} if(!next||!next.length||!this.active){next=this.activeMenu.find(this.options.items)[filter]();} this.focus(event,next);},nextPage:function(event){var item,base,height;if(!this.active){this.next(event);return;} if(this.isLastItem()){return;} if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.nextAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base-height<0;});this.focus(event,item);}else{this.focus(event,this.activeMenu.find(this.options.items)[!this.active?"first":"last"]());}},previousPage:function(event){var item,base,height;if(!this.active){this.next(event);return;} if(this.isFirstItem()){return;} if(this._hasScroll()){base=this.active.offset().top;height=this.element.height();this.active.prevAll(".ui-menu-item").each(function(){item=$(this);return item.offset().top-base+height>0;});this.focus(event,item);}else{this.focus(event,this.activeMenu.find(this.options.items).first());}},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var suppressKeyPress,suppressKeyPressRepeat,suppressInput,nodeName=this.element[0].nodeName.toLowerCase(),isTextarea=nodeName==="textarea",isInput=nodeName==="input";this.isMultiLine=isTextarea||!isInput&&this._isContentEditable(this.element);this.valueMethod=this.element[isTextarea||isInput?"val":"text"];this.isNewMenu=true;this._addClass("ui-autocomplete-input");this.element.attr("autocomplete","off");this._on(this.element,{keydown:function(event){if(this.element.prop("readOnly")){suppressKeyPress=true;suppressInput=true;suppressKeyPressRepeat=true;return;} suppressKeyPress=false;suppressInput=false;suppressKeyPressRepeat=false;var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:suppressKeyPress=true;this._move("previousPage",event);break;case keyCode.PAGE_DOWN:suppressKeyPress=true;this._move("nextPage",event);break;case keyCode.UP:suppressKeyPress=true;this._keyEvent("previous",event);break;case keyCode.DOWN:suppressKeyPress=true;this._keyEvent("next",event);break;case keyCode.ENTER:if(this.menu.active){suppressKeyPress=true;event.preventDefault();this.menu.select(event);} break;case keyCode.TAB:if(this.menu.active){this.menu.select(event);} break;case keyCode.ESCAPE:if(this.menu.element.is(":visible")){if(!this.isMultiLine){this._value(this.term);} this.close(event);event.preventDefault();} break;default:suppressKeyPressRepeat=true;this._searchTimeout(event);break;}},keypress:function(event){if(suppressKeyPress){suppressKeyPress=false;if(!this.isMultiLine||this.menu.element.is(":visible")){event.preventDefault();} return;} if(suppressKeyPressRepeat){return;} var keyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.PAGE_UP:this._move("previousPage",event);break;case keyCode.PAGE_DOWN:this._move("nextPage",event);break;case keyCode.UP:this._keyEvent("previous",event);break;case keyCode.DOWN:this._keyEvent("next",event);break;}},input:function(event){if(suppressInput){suppressInput=false;event.preventDefault();return;} this._searchTimeout(event);},focus:function(){this.selectedItem=null;this.previous=this._value();},blur:function(event){if(this.cancelBlur){delete this.cancelBlur;return;} clearTimeout(this.searching);this.close(event);this._change(event);}});this._initSource();this.menu=$("