File: /home/storage/f/44/55/novoprovisorio2/public_html/wp-content/cache/minify/0877c.js
(function($){if(awdr_params.refresh_order_review=='1'){$(document).on('change','input[name="payment_method"],input[name="billing_city"],input[name="billing_postcode"]',function(){refreshCart();});$(document).on('blur','input[name="billing_email"], select#billing_state',function(){refreshCart();});}
function refreshCart(){$('body').trigger('update_checkout');}
$(document).ready(function($){function init_events(){if(awdr_params.enable_update_price_with_qty=='show_dynamically'){$(document).on('change','[name="quantity"]',function(){var awdr_qty_object=$(this);setTimeout(function(){var $qty=awdr_qty_object.val();var $product_id=0;var $price_place="";var form=awdr_qty_object.closest("form");if(form.find('button[name="add-to-cart"]').length){$product_id=form.find('button[name="add-to-cart"]').val();var target='div.product p.price';if(awdr_params.custom_target_simple_product!=undefined){if(awdr_params.custom_target_simple_product!=""){target=awdr_params.custom_target_simple_product;}}
$price_place=$(target).first();}else if(form.find('input[name="variation_id"]').length){$product_id=form.find('input[name="variation_id"]').val();var target='div.product .woocommerce-variation-price';if(awdr_params.custom_target_variable_product!=undefined){if(awdr_params.custom_target_variable_product!=""){target=awdr_params.custom_target_variable_product;}}
$price_place=$(target);if(!$(target+' .price').length){$price_place.html("<div class='price'></div>");}
$price_place=$(target+' .price')}
if(!$product_id||$product_id==0){if(awdr_params.custom_simple_product_id_selector!=undefined){if(awdr_params.custom_simple_product_id_selector!=""){let simple_product_id_selector=awdr_params.custom_simple_product_id_selector;$product_id=$(simple_product_id_selector).val();let target='div.product p.price';if(awdr_params.custom_target_simple_product!=undefined){if(awdr_params.custom_target_simple_product!=""){target=awdr_params.custom_target_simple_product;}}
$price_place=$(target).first();}}
if(awdr_params.custom_variable_product_id_selector!=undefined){if(awdr_params.custom_variable_product_id_selector!=""){let variable_product_id_selector=awdr_params.custom_variable_product_id_selector;$product_id=$(variable_product_id_selector).val();let target='div.product .woocommerce-variation-price';if(awdr_params.custom_target_variable_product!=undefined){if(awdr_params.custom_target_variable_product!=""){target=awdr_params.custom_target_variable_product;}}
if(!$(target+' .price').length){$price_place.html("<div class='price'></div>");}
$price_place=$(target+' .price')}}}
if(!$product_id||!$price_place||$product_id==0){return;}
var data={action:'wdr_ajax',method:'get_price_html',product_id:$product_id,qty:$qty,awdr_nonce:awdr_params.nonce,};$.ajax({url:awdr_params.ajaxurl,data:data,type:'POST',success:function(response){if(response.price_html){$price_place.html(response.price_html)}else{if(response.original_price_html!=undefined){$price_place.html(response.original_price_html)}}},error:function(response){$price_place.html("")}});},0);});}}
if(awdr_params.js_init_trigger){$(document).on(awdr_params.js_init_trigger,function(){init_events();});}
init_events();if(awdr_params.awdr_dynamic_bulk_table_status=="1"){if(awdr_params.awdr_dynamic_bulk_table_off=="on"){function awdr_load_variation_table(variation_id){setTimeout(function(){if(variation_id!=''&&variation_id!='0'){var data={action:'wdr_ajax',method:'get_variable_product_bulk_table',product_id:variation_id,awdr_nonce:awdr_params.nonce,};let awdr_opacity='div.awdr-bulk-customizable-table';if(awdr_params.awdr_opacity_to_bulk_table!=undefined){if(awdr_params.awdr_opacity_to_bulk_table!=""){awdr_opacity=awdr_params.awdr_opacity_to_bulk_table;}}
$.ajax({url:awdr_params.ajaxurl,data:data,type:'POST',beforeSend:function(){$(awdr_opacity).css('opacity','0.5');},complete:function(){$(awdr_opacity).css('opacity','1');},success:function(response){if(response.bulk_table){$('.awdr-bulk-customizable-table').html(response.bulk_table);}},error:function(response){$('.awdr-bulk-customizable-table').html("")}});}},100);}
$(".single_variation_wrap").on("hide_variation",function(event){let variation_id=$(this).closest('form').find('input[name="product_id"]').val();awdr_load_variation_table(variation_id);});$(".single_variation_wrap").on("show_variation",function(event,variation,purchasable){let variation_id=variation.variation_id;if(variation.is_bundled!=undefined){if(variation.is_bundled==true){return;}}
awdr_load_variation_table(variation_id);});}}});})(jQuery);;(function($){$.extend({AdvanceWooDiscountRules:{form:null,product_id:null,quantity:0,options:[],target:null,getDynamicDiscountPriceFromCartForm:function($form,$target,$options){if(typeof $options!=='undefined'){this.options=$options;}
if(typeof $target!=='undefined'){this.target=$target;}
if(typeof $form!=='undefined'&&$form.is('form')){this.form=$form;}else{this.logError("Incorrect form provided");}
this.product_id=this.getProductIdFromForm();this.quantity=this.getProductQuantityFromForm();this.getDiscountPriceForProduct();},getDiscountPriceForProduct:function(){if(this.product_id===null||this.product_id==0){this.logError("Invalid product");return[];}
var data={action:'awdr_get_product_discount',product_id:this.product_id,qty:this.quantity,awdr_nonce:awdr_params.nonce,};if(typeof this.options.custom_price!=='undefined'){data.custom_price=this.options.custom_price;}
var $target=this.target;var $options=this.options;$.ajax({url:awdr_params.ajaxurl,data:data,type:'POST',success:function(response){$(document.body).trigger("advanced_woo_discount_rules_on_get_response_for_dynamic_discount",[response,$target,$options]);},error:function(response){}});},getProductIdFromForm:function(){var variationIdEl=this.form.find('[name="variation_id"]');var productIdEl=this.form.find('[name="add-to-cart"]');if(variationIdEl.length){return parseInt(variationIdEl.val());}else if(productIdEl.length){return parseInt(productIdEl.val());}
return false;},getProductQuantityFromForm:function(){var $input=this.form.find('input[name="quantity"]');if($input.length===0){return 0;}
return $input.val();},logError:function($text){console.error("Advance discount rule error: %s",$text);}}});})(jQuery);
;/*! This file is auto-generated */
!function(c,d){"use strict";var e=!1,n=!1;if(d.querySelector)if(c.addEventListener)e=!0;if(c.wp=c.wp||{},!c.wp.receiveEmbedMessage)if(c.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,a,i,s=d.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),n=d.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),o=0;o<n.length;o++)n[o].style.display="none";for(o=0;o<s.length;o++)if(r=s[o],e.source===r.contentWindow){if(r.removeAttribute("style"),"height"===t.message){if(1e3<(i=parseInt(t.value,10)))i=1e3;else if(~~i<200)i=200;r.height=i}if("link"===t.message)if(a=d.createElement("a"),i=d.createElement("a"),a.href=r.getAttribute("src"),i.href=t.value,i.host===a.host)if(d.activeElement===r)c.top.location.href=t.value}}},e)c.addEventListener("message",c.wp.receiveEmbedMessage,!1),d.addEventListener("DOMContentLoaded",t,!1),c.addEventListener("load",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf("MSIE 10"),a=!!navigator.userAgent.match(/Trident.*rv:11\./),i=d.querySelectorAll("iframe.wp-embedded-content"),s=0;s<i.length;s++){if(!(e=i[s]).getAttribute("data-secret"))t=Math.random().toString(36).substr(2,10),e.src+="#?secret="+t,e.setAttribute("data-secret",t);if(r||a)(t=e.cloneNode(!0)).removeAttribute("security"),e.parentNode.replaceChild(t,e)}}}}(window,document);
;function getCheckboxTableString(){const e=document.getElementById("checkout-mode-checkbox-test");if(!e||!e.parentElement)return null;let t=e.parentElement;for(;"TABLE"!==t.nodeName;)t=t.parentElement;return t.id}function hideColumnEmptyFromCheckbox(e){const t=document.querySelector(`#${e} > tbody > tr > th#mp_field_text.titledesc`),c=document.querySelector(`#${e} > tbody > tr:nth-child(2) > th`);t.style.display="none",c.style.display="none"}function customizeCheckboxContainer(e){const t=document.querySelector(`#${e} > tbody > tr:first-child > td`),c=document.querySelector(`#${e} > tbody > tr:nth-child(2) > td`);t.style.padding="0px",t.style.marginBottom="14px",t.style.paddingTop="14px",c.style.padding="0px",c.style.marginBottom="14px",c.style.paddingTop="14px"}function customizeCheckboxLabel(e){const t=document.querySelector(`#${e} > tbody > tr > td.forminp > fieldset > label`),c=document.querySelector(`#${e} > tbody > tr:nth-child(2) > td.forminp > fieldset > label`);t.style.color="black",t.style.border="none",t.style.width="100%",t.style.setProperty("margin","0","important"),t.style.setProperty("padding","0","important"),c.style.color="black",c.style.border="none",c.style.width="100%",c.style.setProperty("margin","0","important"),c.style.setProperty("padding","0","important")}function customizeCheckboxDescription(e){const t=document.querySelector(`#${e} > tbody > tr > td.forminp > fieldset > p.description`),c=document.querySelector(`#${e} > tbody > tr:nth-child(2) > td.forminp > fieldset > p.description`);t.style.marginLeft="24px",t.style.whiteSpace="nowrap",c.style.marginLeft="24px",c.style.whiteSpace="nowrap"}function checkCorrectInput(e,t){const c=document.querySelector("#checkout-mode-checkbox-test").classList.contains("checked"),o=document.querySelector("#checkout-mode-checkbox-production").classList.contains("checked");e.checked=c,t.checked=o}function addInputRadioLogic(e,t){e.addEventListener("change",(()=>{e.checked&&!t.checked||(e.checked=!0,e.classList.add("checked"),t.checked=!1,t.classList.remove("checked"))})),t.addEventListener("change",(()=>{t.checked&&!e.checked||(t.checked=!0,t.classList.add("checked"),e.checked=!1,e.classList.remove("checked"))}))}window.addEventListener("load",(()=>{const e=getCheckboxTableString();if(e){const t=document.querySelector('[id*="test_mode"]'),c=document.querySelector('[id*="production_mode"]');hideColumnEmptyFromCheckbox(e),customizeCheckboxContainer(e),customizeCheckboxLabel(e),customizeCheckboxDescription(e),checkCorrectInput(t,c),addInputRadioLogic(t,c)}}));
;(function(factory){if(typeof define!=='undefined'&&define.amd){define([],factory);}else if(typeof module!=='undefined'&&module.exports){module.exports=factory();}else{window.scrollMonitor=factory();}})(function(){var scrollTop=function(){return window.pageYOffset||(document.documentElement&&document.documentElement.scrollTop)||document.body.scrollTop;};var exports={};var watchers=[];var VISIBILITYCHANGE='visibilityChange';var ENTERVIEWPORT='enterViewport';var FULLYENTERVIEWPORT='fullyEnterViewport';var EXITVIEWPORT='exitViewport';var PARTIALLYEXITVIEWPORT='partiallyExitViewport';var LOCATIONCHANGE='locationChange';var STATECHANGE='stateChange';var eventTypes=[VISIBILITYCHANGE,ENTERVIEWPORT,FULLYENTERVIEWPORT,EXITVIEWPORT,PARTIALLYEXITVIEWPORT,LOCATIONCHANGE,STATECHANGE];var defaultOffsets={top:0,bottom:0};var getViewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight;};var getDocumentHeight=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.documentElement.clientHeight);};exports.viewportTop=null;exports.viewportBottom=null;exports.documentHeight=null;exports.viewportHeight=getViewportHeight();var previousDocumentHeight;var latestEvent;var calculateViewportI;function calculateViewport(){exports.viewportTop=scrollTop();exports.viewportBottom=exports.viewportTop+exports.viewportHeight;exports.documentHeight=getDocumentHeight();if(exports.documentHeight!==previousDocumentHeight){calculateViewportI=watchers.length;while(calculateViewportI--){watchers[calculateViewportI].recalculateLocation();}
previousDocumentHeight=exports.documentHeight;}}
function recalculateWatchLocationsAndTrigger(){exports.viewportHeight=getViewportHeight();calculateViewport();updateAndTriggerWatchers();}
var recalculateAndTriggerTimer;function debouncedRecalcuateAndTrigger(){clearTimeout(recalculateAndTriggerTimer);recalculateAndTriggerTimer=setTimeout(recalculateWatchLocationsAndTrigger,100);}
var updateAndTriggerWatchersI;function updateAndTriggerWatchers(){updateAndTriggerWatchersI=watchers.length;var i=0;while(i<updateAndTriggerWatchersI){watchers[i].update();i++;}
updateAndTriggerWatchersI=watchers.length;var j=0,newLength;while(j<updateAndTriggerWatchersI){watchers[j].triggerCallbacks();newLength=watchers.length;if(newLength<updateAndTriggerWatchersI){j-=updateAndTriggerWatchersI-newLength;}
updateAndTriggerWatchersI=newLength;j++;}}
function ElementWatcher(watchItem,offsets){var self=this;this.watchItem=watchItem;this.uid=Math.random().toString(36).substring(8);if(!offsets){this.offsets=defaultOffsets;}else if(offsets===+offsets){this.offsets={top:offsets,bottom:offsets};}else{this.offsets={top:offsets.top||defaultOffsets.top,bottom:offsets.bottom||defaultOffsets.bottom};}
this.callbacks={};for(var i=0,j=eventTypes.length;i<j;i++){self.callbacks[eventTypes[i]]=[];}
this.locked=false;var wasInViewport;var wasFullyInViewport;var wasAboveViewport;var wasBelowViewport;var listenerToTriggerListI;var listener;function triggerCallbackArray(listeners){if(listeners.length===0){return;}
listenerToTriggerListI=listeners.length;while(listenerToTriggerListI--){listener=listeners[listenerToTriggerListI];listener.callback.call(self,latestEvent);if(listener.isOne){listeners.splice(listenerToTriggerListI,1);}}}
this.triggerCallbacks=function triggerCallbacks(){if(this.isInViewport&&!wasInViewport){triggerCallbackArray(this.callbacks[ENTERVIEWPORT]);}
if(this.isFullyInViewport&&!wasFullyInViewport){triggerCallbackArray(this.callbacks[FULLYENTERVIEWPORT]);}
if(this.isAboveViewport!==wasAboveViewport&&this.isBelowViewport!==wasBelowViewport){triggerCallbackArray(this.callbacks[VISIBILITYCHANGE]);if(!wasFullyInViewport&&!this.isFullyInViewport){triggerCallbackArray(this.callbacks[FULLYENTERVIEWPORT]);triggerCallbackArray(this.callbacks[PARTIALLYEXITVIEWPORT]);}
if(!wasInViewport&&!this.isInViewport){triggerCallbackArray(this.callbacks[ENTERVIEWPORT]);triggerCallbackArray(this.callbacks[EXITVIEWPORT]);}}
if(!this.isFullyInViewport&&wasFullyInViewport){triggerCallbackArray(this.callbacks[PARTIALLYEXITVIEWPORT]);}
if(!this.isInViewport&&wasInViewport){triggerCallbackArray(this.callbacks[EXITVIEWPORT]);}
if(this.isInViewport!==wasInViewport){triggerCallbackArray(this.callbacks[VISIBILITYCHANGE]);}
switch(true){case wasInViewport!==this.isInViewport:case wasFullyInViewport!==this.isFullyInViewport:case wasAboveViewport!==this.isAboveViewport:case wasBelowViewport!==this.isBelowViewport:triggerCallbackArray(this.callbacks[STATECHANGE]);}
wasInViewport=this.isInViewport;wasFullyInViewport=this.isFullyInViewport;wasAboveViewport=this.isAboveViewport;wasBelowViewport=this.isBelowViewport;};this.recalculateLocation=function(){if(this.locked){return;}
var previousTop=this.top;var previousBottom=this.bottom;if(this.watchItem.nodeName){var cachedDisplay=this.watchItem.style.display;if(cachedDisplay==='none'){this.watchItem.style.display='';}
var boundingRect=this.watchItem.getBoundingClientRect();this.top=boundingRect.top+exports.viewportTop;this.bottom=boundingRect.bottom+exports.viewportTop;if(cachedDisplay==='none'){this.watchItem.style.display=cachedDisplay;}}else if(this.watchItem===+this.watchItem){if(this.watchItem>0){this.top=this.bottom=this.watchItem;}else{this.top=this.bottom=exports.documentHeight-this.watchItem;}}else{this.top=this.watchItem.top;this.bottom=this.watchItem.bottom;}
this.top-=this.offsets.top;this.bottom+=this.offsets.bottom;this.height=this.bottom-this.top;if((previousTop!==undefined||previousBottom!==undefined)&&(this.top!==previousTop||this.bottom!==previousBottom)){triggerCallbackArray(this.callbacks[LOCATIONCHANGE]);}};this.recalculateLocation();this.update();wasInViewport=this.isInViewport;wasFullyInViewport=this.isFullyInViewport;wasAboveViewport=this.isAboveViewport;wasBelowViewport=this.isBelowViewport;}
ElementWatcher.prototype={on:function(event,callback,isOne){switch(true){case event===VISIBILITYCHANGE&&!this.isInViewport&&this.isAboveViewport:case event===ENTERVIEWPORT&&this.isInViewport:case event===FULLYENTERVIEWPORT&&this.isFullyInViewport:case event===EXITVIEWPORT&&this.isAboveViewport&&!this.isInViewport:case event===PARTIALLYEXITVIEWPORT&&this.isAboveViewport:callback.call(this,latestEvent);if(isOne){return;}}
if(this.callbacks[event]){this.callbacks[event].push({callback:callback,isOne:isOne||false});}else{throw new Error('Tried to add a scroll monitor listener of type '+event+'. Your options are: '+eventTypes.join(', '));}},off:function(event,callback){if(this.callbacks[event]){for(var i=0,item;item=this.callbacks[event][i];i++){if(item.callback===callback){this.callbacks[event].splice(i,1);break;}}}else{throw new Error('Tried to remove a scroll monitor listener of type '+event+'. Your options are: '+eventTypes.join(', '));}},one:function(event,callback){this.on(event,callback,true);},recalculateSize:function(){this.height=this.watchItem.offsetHeight+this.offsets.top+this.offsets.bottom;this.bottom=this.top+this.height;},update:function(){this.isAboveViewport=this.top<exports.viewportTop;this.isBelowViewport=this.bottom>exports.viewportBottom;this.isInViewport=(this.top<=exports.viewportBottom&&this.bottom>=exports.viewportTop);this.isFullyInViewport=(this.top>=exports.viewportTop&&this.bottom<=exports.viewportBottom)||(this.isAboveViewport&&this.isBelowViewport);},destroy:function(){var index=-1,self=this;for(var i=0;i<watchers.length;i++){if(this.uid==watchers[i].uid){index=i;break;}}
if(index==-1){index=watchers.indexOf(this);}
watchers.splice(index,1);for(var i=0,j=eventTypes.length;i<j;i++){self.callbacks[eventTypes[i]].length=0;}},lock:function(){this.locked=true;},unlock:function(){this.locked=false;}};var eventHandlerFactory=function(type){return function(callback,isOne){this.on.call(this,type,callback,isOne);};};for(var i=0,j=eventTypes.length;i<j;i++){var type=eventTypes[i];ElementWatcher.prototype[type]=eventHandlerFactory(type);}
try{calculateViewport();}catch(e){try{window.$(calculateViewport);}catch(e){throw new Error('If you must put scrollMonitor in the <head>, you must use jQuery.');}}
function scrollMonitorListener(event){latestEvent=event;calculateViewport();updateAndTriggerWatchers();}
if(window.addEventListener){window.addEventListener('scroll',scrollMonitorListener);window.addEventListener('resize',debouncedRecalcuateAndTrigger);}else{window.attachEvent('onscroll',scrollMonitorListener);window.attachEvent('onresize',debouncedRecalcuateAndTrigger);}
exports.beget=exports.create=function(element,offsets){if(typeof element==='string'){element=document.querySelector(element);}else if(element&&element.length>0){element=element[0];}
var watcher=new ElementWatcher(element,offsets);watchers.push(watcher);watcher.update();return watcher;};exports.update=function(){latestEvent=null;calculateViewport();updateAndTriggerWatchers();};exports.recalculateLocations=function(){exports.documentHeight=0;exports.update();};return exports;});;(function($){var animations={'move-up':{timeout:200},bounce:{timeout:100},'fade-in':{timeout:100},scale:{timeout:100},flip:{timeout:100},'fall-perspective':{timeout:100},};var prefixes='Webkit Moz ms Ms O'.split(' ');var docElemStyle=document.documentElement.style;function getStyleProperty(propName){if(!propName){return;}
if(typeof docElemStyle[propName]==='string'){return propName;}
propName=propName.charAt(0).toUpperCase()+propName.slice(1);var prefixed;for(var i=0,len=prefixes.length;i<len;i++){prefixed=prefixes[i]+propName;if(typeof docElemStyle[prefixed]==='string'){return prefixed;}}}
var transitionProperty=getStyleProperty('transition');var transitionEndEvent={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'otransitionend',transition:'transitionend'}[transitionProperty];function ItemsAnimations(el,options){var self=this;this.el=el;this.$el=$(el);this.options={itemSelector:'',scrollMonitor:false,firstItemStatic:false};$.extend(this.options,options);this.$el.data('itemsAnimations',this);self.initialize();}
$.fn.itemsAnimations=function(options){if(typeof options==='string'){var instance=$(this.get(0)).data('itemsAnimations');if(!instance){return false;}
if(options==='instance'){return instance;}}else{return new ItemsAnimations(this.get(0),options);}}
ItemsAnimations.prototype={initialize:function(){var self=this;this.queue=[];this.queue_is_run=false;this.watchers={};this.animation=this.getAnimation();if(!this.animation||$(window).width()<767){this.animationName='disabled';this.animation=this.getAnimationByName('disabled');}
if(this.options.firstItemStatic){this.firstStatisItem=$(this.options.itemSelector+':first',this.$el);this.firstStatisItem.removeClass('item-animations-not-inited');}
if(this.animationName=='disabled'){$(this.options.itemSelector,this.$el).removeClass('item-animations-not-inited');}},initTimer:function(){var self=this;this.timer=document.createElement('div');this.timer.className='items-animations-timer-element';if(this.animation.timeout>0){this.timer.setAttribute("style","transition-duration: "+this.animation.timeout+"ms; -webkit-transition-duration: "+this.animation.timeout+"ms; -moz-transition-duration: "+this.animation.timeout+"ms; -o-transition-duration: "+this.animation.timeout+"ms;");}
document.body.appendChild(this.timer);this.timerCallback=function(){};$(this.timer).bind(transitionEndEvent,function(event){self.timerCallback();});this.timer.className+=' start-timer';},startTimer:function(callback){setTimeout(callback,this.animation.timeout);},startTimerOld:function(callback){this.timerCallback=callback;if(this.timer.className.indexOf('start-timer')!=-1){this.timer.className=this.timer.className.replace(' start-timer','');}else{this.timer.className+=' start-timer';}},show:function($items,forceUseScrollMonitor){var self=this;if(forceUseScrollMonitor===undefined){forceUseScrollMonitor=false;}
if(this.animationName=='disabled'){$(this.options.itemSelector,this.$el).removeClass('item-animations-not-inited');return false;}
if($items==undefined){$items=$(this.options.itemSelector,this.$el);}
$items.not('.item-animations-inited').each(function(index){var $this=$(this);if(self.options.firstItemStatic&&self.firstStatisItem&&self.firstStatisItem.get(0)==this){$this.addClass('item-animations-inited');return;}
$this.addClass('item-animations-inited');if((self.options.scrollMonitor||forceUseScrollMonitor)&&window.scrollMonitor!==undefined&&this.animationName!='disabled'){var watcher=scrollMonitor.create(this,-50);watcher.enterViewport(function(){var watcher=this;self.showItem($this,watcher);});self.watchers[watcher.uid]=watcher;}else{self.showItem($this);}});$(this.options.itemSelector,this.$el).not('.item-animations-inited').removeClass('item-animations-not-inited');},reinitItems:function($items){$items.removeClass('start-animation item-animations-inited item-animations-loading before-start').addClass('item-animations-not-inited');this.clear();},getAnimationName:function(){var m=this.$el[0].className.match(/item-animation-(\S+)/);if(!m){return'';}
return m[1];},getAnimation:function(){this.animationName=this.getAnimationName();return this.getAnimationByName(this.animationName);},getAnimationByName:function(name){if(!name||animations[name]==undefined){return false;}
return animations[name];},showItem:function($item,watcher){var self=this;if($item.hasClass('item-animations-loading')){return false;}
$item.addClass('before-start');function showItemCallback(){if($item.length==0){return false;}
self.animate($item);if(watcher!=undefined){self.destroyWatcher(watcher);}}
$item.addClass('item-animations-loading');if(this.animation.timeout>0){this.queueAdd(showItemCallback,this.animation.timeout);}else{showItemCallback();}},destroyWatcher:function(watcher){if(this.watchers[watcher.uid]!=undefined){delete this.watchers[watcher.uid];}
watcher.destroy();},animate:function($item,animation){$item.bind(transitionEndEvent,function(event){var target=event.target||event.srcElement;if(target!=$item[0]){return;}
$item.unbind(transitionEndEvent);$item.removeClass('before-start start-animation');});$item.removeClass('item-animations-loading item-animations-not-inited').addClass('start-animation');},queueAdd:function(callback,timeout){var self=this;this.queue.push({callback:callback,timeout:timeout});if(this.queue.length==1&&!this.queue_is_run){this.startTimer(function(){self.queueNext();});}},queueNext:function(){var self=this;if(this.queue.length==0){return false;}
var next_action=this.queue.shift();if(next_action==undefined){return false;}
this.queue_is_run=true;next_action.callback();this.startTimer(function(){self.queue_is_run=false;self.queueNext();});},clear:function(){this.queue=[];this.queue_is_run=false;for(var watcher_uid in this.watchers){if(this.watchers.hasOwnProperty(watcher_uid)){this.destroyWatcher(this.watchers[watcher_uid]);}}
this.watchers=[];}};})(jQuery);