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);}};function distilledCheckAnalyticsCookie(){var cookiename="__utma";var cookiecheck=0;var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){while(cookies[i].charAt(0)==' ')cookies[i]=cookies[i].substring(1,cookies[i].length);if(cookies[i].indexOf(cookiename+'=')==0){cookiecheck=1;}}
return cookiecheck;}
function distilledTruncate(input){var byteLength=63;if(encodeURIComponent(input).substr(byteLength-2,1)=="%"){truncatedInput=decodeURIComponent(encodeURIComponent(input).substr(0,byteLength-2));}else if(encodeURIComponent(input).substr(byteLength-1,1)=="%"){truncatedInput=decodeURIComponent(encodeURIComponent(input).substr(0,byteLength-1));}else{truncatedInput=decodeURIComponent(encodeURIComponent(input).substr(0,byteLength));}
return truncatedInput;}
function distilledFirstTouch(pageTracker){try{if(distilledCheckAnalyticsCookie()===0){pageTracker._setCustomVar(1,"l",distilledTruncate(window.location.pathname),1);pageTracker._setCustomVar(2,"s",distilledTruncate(window.location.search),1);pageTracker._setCustomVar(3,"r",distilledTruncate(document.referrer.substr(7,document.referrer.length)),1);pageTracker._setCustomVar(4,"q",distilledTruncate(document.referrer.match(/(?:([#]|[?]|[&]))(?:(encquery|k|p|q|qs|qt|query|rdata|search_word|szukaj|terms|text|wd|words))=[^&]*/i)[0]),1);}}catch(err){}}
function asyncDistilledFirstTouch(asyncStack){try{if(distilledCheckAnalyticsCookie()===0){asyncStack.push(['_setCustomVar',1,"l",distilledTruncate(window.location.pathname),1]);asyncStack.push(['_setCustomVar',2,"s",distilledTruncate(window.location.search),1]);asyncStack.push(['_setCustomVar',3,"r",distilledTruncate(document.referrer.substr(7,document.referrer.length)),1]);asyncStack.push(['_setCustomVar',4,"q",distilledTruncate(document.referrer.match(/(?:([#]|[?]|[&]))(?:(encquery|k|p|q|qs|qt|query|rdata|search_word|szukaj|terms|text|wd|words))=[^&]*/i)[0]),1]);}}catch(err){}}
function asyncDistilledFirstTouchOverwrite(){if(distilledCheckAnalyticsCookie()!=0){var savedReferrer=readCookie('__utmv');console.log(savedReferrer);}}
function readCookie(cookiename){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){while(cookies[i].charAt(0)==' ')cookies[i]=cookies[i].substring(1,cookies[i].length);if(cookies[i].indexOf(cookiename+'=')==0){return unescape(cookies[i]);}}
return false;}
