var $j=jQuery.noConflict();$j(document).ready(function(){$j('.short-description .std:not(:has(p))').addClass('no-html');$j('.box-description .std:not(:has(p))').addClass('no-html');if($j('.thumbs-ul').length>0)
{$j('.thumbs-ul').each(function(){setListHeight($j(this),'li',18);});}
function setListHeight(list,element,adjustment)
{if(!list.hasClass('no-heightadj'))
{var heights=new Array();list.each(function(){$j(this).find(element).each(function(i){heights[i]=$j(this).height();});heights.sort(sortHeights);$j(this).find(element).height(heights[0]+adjustment);});}}
function sortHeights(a,b)
{return(b-a);}
if($j('#slider .slides img').length>1)
{$j('#slider').hide();$j('#slider .slides').cycle({fx:'fade',timeout:6000,speed:3000});$j('#slider').show();}});function toggleMenu()
{return false;};
/*
 * jQuery Cycle Lite Plugin
 * http://malsup.com/jquery/cycle/lite/
 * Copyright (c) 2008 M. Alsup
 * Version: 1.0 (06/08/2008)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Requires: jQuery v1.2.3 or later
 */
;(function(D){var A="Lite-1.0";D.fn.cycle=function(E){return this.each(function(){E=E||{};if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=0;this.cyclePause=0;var I=D(this);var J=E.slideExpr?D(E.slideExpr,this):I.children();var G=J.get();if(G.length<2){if(window.console&&window.console.log){window.console.log("terminating; too few slides: "+G.length)}return}var H=D.extend({},D.fn.cycle.defaults,E||{},D.metadata?I.metadata():D.meta?I.data():{});H.before=H.before?[H.before]:[];H.after=H.after?[H.after]:[];H.after.unshift(function(){H.busy=0});var F=this.className;H.width=parseInt((F.match(/w:(\d+)/)||[])[1])||H.width;H.height=parseInt((F.match(/h:(\d+)/)||[])[1])||H.height;H.timeout=parseInt((F.match(/t:(\d+)/)||[])[1])||H.timeout;if(I.css("position")=="static"){I.css("position","relative")}if(H.width){I.width(H.width)}if(H.height&&H.height!="auto"){I.height(H.height)}var K=0;J.css({position:"absolute",top:0,left:0}).hide().each(function(M){D(this).css("z-index",G.length-M)});D(G[K]).css("opacity",1).show();if(D.browser.msie){G[K].style.removeAttribute("filter")}if(H.fit&&H.width){J.width(H.width)}if(H.fit&&H.height&&H.height!="auto"){J.height(H.height)}if(H.pause){I.hover(function(){this.cyclePause=1},function(){this.cyclePause=0})}D.fn.cycle.transitions.fade(I,J,H);J.each(function(){var M=D(this);this.cycleH=(H.fit&&H.height)?H.height:M.height();this.cycleW=(H.fit&&H.width)?H.width:M.width()});J.not(":eq("+K+")").css({opacity:0});if(H.cssFirst){D(J[K]).css(H.cssFirst)}if(H.timeout){if(H.speed.constructor==String){H.speed={slow:600,fast:200}[H.speed]||400}if(!H.sync){H.speed=H.speed/2}while((H.timeout-H.speed)<250){H.timeout+=H.speed}}H.speedIn=H.speed;H.speedOut=H.speed;H.slideCount=G.length;H.currSlide=K;H.nextSlide=1;var L=J[K];if(H.before.length){H.before[0].apply(L,[L,L,H,true])}if(H.after.length>1){H.after[1].apply(L,[L,L,H,true])}if(H.click&&!H.next){H.next=H.click}if(H.next){D(H.next).bind("click",function(){return C(G,H,H.rev?-1:1)})}if(H.prev){D(H.prev).bind("click",function(){return C(G,H,H.rev?1:-1)})}if(H.timeout){this.cycleTimeout=setTimeout(function(){B(G,H,0,!H.rev)},H.timeout+(H.delay||0))}})};function B(J,E,I,K){if(E.busy){return}var H=J[0].parentNode,M=J[E.currSlide],L=J[E.nextSlide];if(H.cycleTimeout===0&&!I){return}if(I||!H.cyclePause){if(E.before.length){D.each(E.before,function(N,O){O.apply(L,[M,L,E,K])})}var F=function(){if(D.browser.msie){this.style.removeAttribute("filter")}D.each(E.after,function(N,O){O.apply(L,[M,L,E,K])})};if(E.nextSlide!=E.currSlide){E.busy=1;D.fn.cycle.custom(M,L,E,F)}var G=(E.nextSlide+1)==J.length;E.nextSlide=G?0:E.nextSlide+1;E.currSlide=G?J.length-1:E.nextSlide-1}if(E.timeout){H.cycleTimeout=setTimeout(function(){B(J,E,0,!E.rev)},E.timeout)}}function C(E,F,I){var H=E[0].parentNode,G=H.cycleTimeout;if(G){clearTimeout(G);H.cycleTimeout=0}F.nextSlide=F.currSlide+I;if(F.nextSlide<0){F.nextSlide=E.length-1}else{if(F.nextSlide>=E.length){F.nextSlide=0}}B(E,F,1,I>=0);return false}D.fn.cycle.custom=function(K,H,I,E){var J=D(K),G=D(H);G.css({opacity:0});var F=function(){G.animate({opacity:1},I.speedIn,I.easeIn,E)};J.animate({opacity:0},I.speedOut,I.easeOut,function(){J.css({display:"none"});if(!I.sync){F()}});if(I.sync){F()}};D.fn.cycle.transitions={fade:function(F,G,E){G.not(":eq(0)").css("opacity",0);E.before.push(function(){D(this).show()})}};D.fn.cycle.ver=function(){return A};D.fn.cycle.defaults={timeout:4000,speed:1000,next:null,prev:null,before:null,after:null,height:"auto",sync:1,fit:0,pause:0,delay:0,slideExpr:null}})(jQuery);;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;};var inCart=false;if(window.location.toString().search('/product_compare/')!=-1){var win=window.opener;}
else{var win=window;}
if(window.location.toString().search('/checkout/cart/')!=-1){inCart=true;}
function setLocation(url){if(!inCart&&(url.search('checkout/cart/add')!=-1)){sendcart(url,'url');}else{window.location.href=url;}}
function sendcart(url,type){showLoading();if(type=='form'){url=($('product_addtocart_form').action).replace('checkout','j2tajaxcheckout/index/cart');var myAjax=new Ajax.Request(url,{method:'post',postBody:$('product_addtocart_form').serialize(),parameters:Form.serialize("product_addtocart_form"),onException:function(xhr,e)
{alert('Exception : '+e);},onComplete:function(xhr)
{$('j2t-temp-div').innerHTML=xhr.responseText;var return_message=$('j2t-temp-div').down('.j2t_ajax_message').innerHTML;var middle_text='<div class="j2t-cart-bts">'+$('j2t-temp-div').down('.back-ajax-add').innerHTML+'</div>';$('j2t_ajax_confirm').innerHTML='<div id="j2t_ajax_confirm_wrapper">'+return_message+middle_text+'</div>';var link_cart_txt=$('j2t-temp-div').down('.cart_content').innerHTML;$$('.top-link-cart').each(function(el){el.innerHTML=link_cart_txt;});var mini_cart_txt=$('j2t-temp-div').down('.cart_side_ajax').innerHTML;$$('.mini-cart').each(function(el){el.replace(mini_cart_txt);});$$('.block-cart').each(function(el){el.replace(mini_cart_txt);});replaceDelUrls();if(ajax_cart_show_popup){showConfirm();}else{hideJ2tOverlay();}}});}else if(type=='url'){url=url.replace('checkout','j2tajaxcheckout/index/cart');var myAjax=new Ajax.Request(url,{method:'post',postBody:'',onException:function(xhr,e)
{alert('Exception : '+e);},onComplete:function(xhr)
{$('j2t-temp-div').innerHTML=xhr.responseText;var return_message=$('j2t-temp-div').down('.j2t_ajax_message').innerHTML;var middle_text='<div class="j2t-cart-bts">'+$('j2t-temp-div').down('.back-ajax-add').innerHTML+'</div>';var content_ajax=return_message+middle_text;$('j2t_ajax_confirm').innerHTML='<div id="j2t_ajax_confirm_wrapper">'+content_ajax+'</div>';var link_cart_txt=$('j2t-temp-div').down('.cart_content').innerHTML;$$('.top-link-cart').each(function(el){el.innerHTML=link_cart_txt;});var mini_cart_txt=$('j2t-temp-div').down('.cart_side_ajax').innerHTML;$$('.mini-cart').each(function(el){el.replace(mini_cart_txt);});$$('.block-cart').each(function(el){el.replace(mini_cart_txt);});replaceDelUrls();if(ajax_cart_show_popup){showConfirm();}else{hideJ2tOverlay();}}});}}
function replaceDelUrls(){$$('a').each(function(el){if(el.href.search('checkout/cart/delete')!=-1&&el.href.search('javascript:cartdelete')==-1){el.href='javascript:cartdelete(\''+el.href+'\')';}});}
function replaceAddUrls(){$$('a').each(function(link){if(link.href.search('checkout/cart/add')!=-1){link.href='javascript:setLocation(\''+link.href+'\'); void(0);';}});}
function cartdelete(url){showLoading();url=url.replace('checkout','j2tajaxcheckout/index/cartdelete');var myAjax=new Ajax.Request(url,{method:'post',postBody:'',onException:function(xhr,e)
{alert('Exception : '+e);},onComplete:function(xhr)
{$('j2t-temp-div').innerHTML=xhr.responseText;var cart_content=$('j2t-temp-div').down('.cart_content').innerHTML;$$('.top-link-cart').each(function(el){el.innerHTML=cart_content;});var process_reload_cart=false;var full_cart_content=$('j2t-temp-div').down('.j2t_full_cart_content').innerHTML;$$('.cart').each(function(el){el.replace(full_cart_content);process_reload_cart=true;});if(!process_reload_cart){$$('.checkout-cart-index .col-main').each(function(el){el.replace(full_cart_content);});}
var cart_side='';if($('j2t-temp-div').down('.cart_side_ajax')){cart_side=$('j2t-temp-div').down('.cart_side_ajax').innerHTML;}
$$('.mini-cart').each(function(el){el.replace(cart_side);});$$('.block-cart').each(function(el){el.replace(cart_side);});replaceDelUrls();hideJ2tOverlay();}});}
function showJ2tOverlay(){new Effect.Appear($('j2t-overlay'),{duration:0.5,to:0.8});}
function hideJ2tOverlay(){$('j2t-overlay').hide();$('j2t_ajax_progress').hide();$('j2t_ajax_confirm').hide();}
function j2tCenterWindow(element){if($(element)!=null){var el=$(element);var elDims=el.getDimensions();var browserName=navigator.appName;if(browserName==="Microsoft Internet Explorer"){if(document.documentElement.clientWidth==0){var y=(document.viewport.getScrollOffsets().top+(document.body.clientHeight-elDims.height)/2);var x=(document.viewport.getScrollOffsets().left+(document.body.clientWidth-elDims.width)/2);}
else{var y=(document.viewport.getScrollOffsets().top+(document.documentElement.clientHeight-elDims.height)/2);var x=(document.viewport.getScrollOffsets().left+(document.documentElement.clientWidth-elDims.width)/2);}}
else{var y=Math.round(document.viewport.getScrollOffsets().top+((window.innerHeight-$(element).getHeight()))/2);var x=Math.round(document.viewport.getScrollOffsets().left+((window.innerWidth-$(element).getWidth()))/2);}
var styles={position:'absolute',top:y+'px',left:x+'px'};el.setStyle(styles);}}
function showLoading(){showJ2tOverlay();var progress_box=$('j2t_ajax_progress');progress_box.show();progress_box.style.width=loadingW+'px';progress_box.style.height=loadingH+'px';$('j2t_ajax_progress').innerHTML=$('j2t-loading-data').innerHTML;progress_box.style.position='absolute';j2tCenterWindow(progress_box);}
function showConfirm(){showJ2tOverlay();$('j2t_ajax_progress').hide();var confirm_box=$('j2t_ajax_confirm');confirm_box.show();confirm_box.style.width=confirmW+'px';confirm_box.style.height=confirmH+'px';if($('j2t_ajax_confirm_wrapper')&&$('j2t-upsell-product-table')){confirm_box.style.height=$('j2t_ajax_confirm_wrapper').getHeight()+'px';decorateTable('j2t-upsell-product-table');}
$('j2t_ajax_confirm_wrapper').replace('<div id="j2t_ajax_confirm_wrapper">'+$('j2t_ajax_confirm_wrapper').innerHTML);confirm_box.style.position='absolute';j2tCenterWindow(confirm_box);}
document.observe("dom:loaded",function(){replaceDelUrls();replaceAddUrls();Event.observe($('j2t-overlay'),'click',hideJ2tOverlay);var cartInt=setInterval(function(){if(typeof productAddToCartForm!='undefined'){if($('j2t-overlay')){Event.observe($('j2t-overlay'),'click',hideJ2tOverlay);}
productAddToCartForm.submit=function(url){if(this.validator&&this.validator.validate()){sendcart('','form');clearInterval(cartInt);}
return false;}}else{clearInterval(cartInt);}},500);});;eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('h.i[\'1a\']=h.i[\'z\'];h.O(h.i,{y:\'D\',z:9(x,t,b,c,d){6 h.i[h.i.y](x,t,b,c,d)},17:9(x,t,b,c,d){6 c*(t/=d)*t+b},D:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},13:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},X:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},U:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},R:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 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*8.r(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},T:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.w(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.r(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},F:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},E:9(x,t,b,c,d,s){e(s==u)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==u)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.B))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.B))+1)*t+s)+2)+b},A:9(x,t,b,c,d){6 c-h.i.v(x,d-t,0,c,d)+b},v:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.14/2.k))*t+.11)+b}m{6 c*(7.q*(t-=(2.18/2.k))*t+.19)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.A(x,t*2,0,c,d)*.5+b;6 h.i.v(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|asin|||undefined|easeOutBounce|abs||def|swing|easeInBounce|525|cos|easeOutQuad|easeOutBack|easeInBack|easeInSine|easeOutElastic|easeInOutQuint|easeOutQuint|easeInQuint|easeInOutQuart|easeOutQuart|easeInQuart|extend|easeInElastic|easeInOutCirc|easeInOutCubic|easeOutCirc|easeInOutElastic|easeOutCubic|easeInCirc|easeInOutExpo|easeInCubic|easeOutExpo|easeInExpo||9375|easeInOutSine|easeInOutQuad|25|easeOutSine|easeInOutBack|easeInQuad|625|984375|jswing|easeInOutBounce'.split('|'),0,{}));
/* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.4
*
* Requires: 1.2.2+
*/
(function(d){function g(a){var b=a||window.event,i=[].slice.call(arguments,1),c=0,h=0,e=0;a=d.event.fix(b);a.type="mousewheel";if(a.wheelDelta)c=a.wheelDelta/120;if(a.detail)c=-a.detail/3;e=c;if(b.axis!==undefined&&b.axis===b.HORIZONTAL_AXIS){e=0;h=-1*c}if(b.wheelDeltaY!==undefined)e=b.wheelDeltaY/120;if(b.wheelDeltaX!==undefined)h=-1*b.wheelDeltaX/120;i.unshift(a,c,h,e);return d.event.handle.apply(this,i)}var f=["DOMMouseScroll","mousewheel"];d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=f.length;a;)this.addEventListener(f[--a],g,false);else this.onmousewheel=g},teardown:function(){if(this.removeEventListener)for(var a=f.length;a;)this.removeEventListener(f[--a],g,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);
