window.intPrevious=setInterval(function(){if(typeof AW_ACP!='undefined'&&document.body){if(typeof aw_cartDivClass=='undefined'){aw_cartDivClass=AW_ACP.theme=='blank'?'.block-cart':'.mini-cart';if(!$$(aw_cartDivClass).length||!$$(aw_cartDivClass)[0].tagName){aw_cartDivClass='.block-cart'}}
if(typeof aw_topLinkCartClass=='undefined'){aw_topLinkCartClass='.top-link-cart';}
if(typeof aw_addToCartButtonClass=='undefined'){aw_addToCartButtonClass='.form-button';}
if(typeof aw_bigCartClass=='undefined'){aw_bigCartClass=AW_ACP.theme=='modern'?'.layout-1column':'.col-main';}
if(typeof aw_wishlistClass=='undefined'){aw_wishlistClass='.my-wishlist';}
if(typeof aw_topWishlistLinkCartClass=='undefined'){aw_topWishlistLinkCartClass='.top-link-wishlist';}
if(window.location.toString().search('/product_compare/')!=-1){win=window.opener;}
else{win=window;}
clearInterval(intPrevious)}},500);function ajaxcartprodelete(url){showProgressAnimation();url=getCommonUrl(url)
new Ajax.Request(url,{onSuccess:function(resp){try{if(typeof(resp.responseText)=='string')eval('resp = '+resp.responseText);}catch(e){return;}
hideProgressAnimation();__onACPRender()
updateCartView(resp,'');}});}
function updateCartView(resp){if(AW_ACP.isCartPage)return updateBigCartView(resp);var __cartObj=$$(aw_cartDivClass)[0];if(!__cartObj)return false;if(typeof(__cartObj.length)=='number')__cartObj=__cartObj[0];var oldHeight=__cartObj.offsetHeight;var tmpDiv=win.document.createElement('div');tmpDiv.innerHTML=resp.cart;var tmpParent=__cartObj.parentNode;tmpParent.replaceChild(tmpDiv.firstChild,__cartObj);var __cartObj=$$(aw_cartDivClass)[0];var newHeight=__cartObj.offsetHeight;addEffectACP(__cartObj,aw_ajaxcartpro_cartanim);updateDeleteLinks();updateTopLinks(resp);}
function updateWishlist(resp)
{var wishlistObj=$$(aw_wishlistClass)[0];if(wishlistObj){var tmpDiv=win.document.createElement('div');tmpDiv.innerHTML=resp.wishlist;var tmpParent=wishlistObj.parentNode;tmpParent.replaceChild(tmpDiv.firstChild,wishlistObj);}};if(typeof Product!='undefined'){Product.ConfigPreorder=Class.create();Product.ConfigPreorder.prototype={initialize:function(config,preorders){this.config=config;this.taxConfig=this.config.taxConfig;this.settings=$$('.super-attribute-select');this.state=new Hash();this.priceTemplate=new Template(this.config.template);this.prices=config.prices;this.configpreorders=preorders;this.preorders=this.configpreorders.preorder;this.bufstock="";this.settings.each(function(element){Event.observe(element,'change',this.configure.bind(this))}.bind(this));},configure:function(event){var element=Event.element(event);this.configureElement(element);},configureElement:function(element){if(this.settings.length>0)
{var first=1;var res={};for(var i=0;i<=this.settings.length-1;i++)
{var attributeId=this.settings[i].id.replace(/[a-z]*/,'');if((first==1)&&(this.settings[i].selectedIndex>0))
{var res=this.config['attributes'][attributeId]['options'][this.settings[i].selectedIndex-1]['products'];}
else
{if(this.settings[i].selectedIndex>0)
{res=res.intersect(this.config['attributes'][attributeId]['options'][this.settings[i].selectedIndex-1]['products']);}}
first=0;}
var el=$('saypreorder');var masAvail=$$('.availability');var elmas=masAvail[0];var childEl=elmas.childElements();var spanEl=childEl[0];if(res.length==1)
{var descr=this.preorders['descript'][res[0]];$('canBePreorder').update('<p class="required">*'+descr+'</p>');spanEl.update(descr);}
else
{$('canBePreorder').update('');}}}}}
