var liUp;if(!liUp)liUp={};else if(typeof liUp!="object")throw new Error("liUp already exists and is not an object");liUp=function(){var c=function(){var t={o:{w:false,t:false,aw:false,s:false,l:false,p:false,aL:false,aR:false,sO:false,sli:false,sH:false,cD:false},aU:false,d:{tR:0,r:{}},dN:5,m:1,wi:0,cS:false,t:{sI:'/js/joe/lib/module/image_system/images/circle_loader.gif'},s:'manual',c:{l:3,tW:61,w:292},par:false,uN:'lineUp'};t.pF=t.m;t.d.r.l=1;t.d.r.r=t.dN;return t;};this.gC=(function(){return c;})();this.dC=this.gC();};liUp.prototype={init:function(){var cC=jkUt.oCom(this.gC(),this.dC),liL;this.gCC=(function(){return cC;})();this.gCC.o.w=$(this.gCC.o.w);this.gCC.o.t=$(this.gCC.o.t);this.gCC.o.aW=$(this.gCC.o.aW);this.gCC.o.s=$(this.gCC.o.s);this.gCC.o.l=$(this.gCC.o.l);this.gCC.o.p=$(this.gCC.o.p);this.gCC.o.sO=$(this.gCC.o.sO);this.gCC.o.aL=$(this.gCC.o.aL);this.gCC.o.aR=$(this.gCC.o.aR);if(this.gCC.s=='manual'){}else if(this.gCC.s=='scroll'){this.gCC.o.sli=$(this.gCC.o.sli);this.gCC.o.sH=$(this.gCC.o.sH);this.gCC.o.cD=$(this.gCC.o.cD);}jkUt.bro.browserDetect.init();this._b();},_b:function(){new Ajax.Request(this.gCC.aU,{method:'get',parameters:this.gCC.par,onSuccess:function(o){var lUT,rXML,t;rXML=(new DOMParser()).parseFromString(o.responseText,"text/xml");this.gCC.d.tR=rXML.getElementsByTagName('product');if(this.gCC.d.tR.length>1){this.gCC.o.s.style.width=(this.gCC.wi*this.gCC.d.tR.length)+'px';if(this.gCC.s=='scroll'){this.gCC.o.aL.style.display='none';this.gCC.o.aR.style.display='none';$(this.gCC.o.test).onclick=this.cL({o:this});$('compareNav').style.width=(this.gCC.c.w+(this.gCC.c.tW*(this.gCC.c.l+1)))+'px';this._p({l:1,r:this.gCC.d.tR.length});this.gCC.o.aR.onclick=function(){if(this.gCC.m.cS<this.gCC.m.max-3)this.gCC.m.cS++;else this.gCC.m.cS=this.gCC.m.max-3;if(this.gCC.m.cS>=this.gCC.m.max-3&&this.gCC.o.aR.style.display=='block'){Effect.Fade(this.gCC.o.aR.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowR',limit:1},afterFinish:function(){this.gCC.o.aR.style.display='none'}.bind(this)});this.gCC.slider.setValue((this.gCC.m.cS)*this.gCC.wi);}else{if(this.gCC.m.cS==this.gCC.cS+2)this.gCC.slider.setValue(((this.gCC.m.cS-2)*this.gCC.wi)-3);else this.gCC.slider.setValue((this.gCC.m.cS-2)*this.gCC.wi);if(this.gCC.o.aL.style.display=='none')Effect.Appear(this.gCC.o.aL.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowL',limit:1},afterFinish:function(){this.gCC.o.aL.style.display='block'}.bind(this)});}}.bind(this);this.gCC.o.aL.onclick=function(){if(this.gCC.m.cS>this.gCC.m.min+2)this.gCC.m.cS--;else this.gCC.m.cS=this.gCC.m.min+2;if(this.gCC.m.cS-2<=this.gCC.m.min&&this.gCC.o.aL.style.display=='block'){Effect.Fade(this.gCC.o.aL.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowL',limit:1},afterFinish:function(){this.gCC.o.aL.style.display='none'}.bind(this)});this.gCC.slider.setValue((this.gCC.m.cS-2)*this.gCC.wi);}else{if(this.gCC.m.cS==this.gCC.cS+2)this.gCC.slider.setValue(((this.gCC.m.cS-2)*this.gCC.wi)-3);else this.gCC.slider.setValue((this.gCC.m.cS-2)*this.gCC.wi);if(this.gCC.o.aR.style.display=='none')Effect.Appear(this.gCC.o.aR.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowR',limit:1},afterFinish:function(){this.gCC.o.aR.style.display='block'}.bind(this)});}}.bind(this);}lUT=rXML.getElementsByTagName('lineUpTitle')[0].childNodes[0].nodeValue;this.gCC.o.t.innerHTML='';this.gCC.o.t.appendChild(jkLib.tNod(lUT));this._p();this.gCC.o.s.innerHTML='';for(var i=0;i<this.gCC.d.tR.length;i++){if(this.gCC.d.tR[i].getElementsByTagName('selected').length){this.gCC.cS=i;this.gCC.m={};this.gCC.m.min=0;this.gCC.m.cS=(i<2)?(2):(i);this.gCC.m.max=this.gCC.d.tR.length;}}if(this.gCC.d.tR.length>5){this.gCC.o.aR.style.display='block';if(this.gCC.cS>2){this.gCC.o.aL.style.display='block';}}if(this.gCC.s=='manual'){t=this.gCC.pF+this.gCC.dN;if(this.gCC.cS!==false&&this.gCC.d.tR.length>this.gCC.dN){if(this.gCC.s=='manual')this._bC({sN:0,lN:this.gCC.cS+1+t});}else{this._bC({sN:0,lN:(t<=this.gCC.d.tR.length)?(t):(this.gCC.d.tR.length)});}}this.gCC.o.w.style.visibility='visible';this.gCC.o.w.style.display='block';this.gCC.o.w.style.position='relative';if(this.gCC.s=='manual'){this.gCC.o.sO.style.display='none';this.gCC.o.aL.style.display='none';if(this.gCC.d.tR.length>this.gCC.dN)this.gCC.o.aR.style.display='block';else this.gCC.o.aR.style.display='none';}else if(this.gCC.s=='scroll'){this._bC({sN:0,lN:this.gCC.d.tR.length});if(this.gCC.d.tR.length>5)this.gCC.o.sO.style.visibility='visible';if(this.gCC.o.cD!==false){var tbl,tB,tr,td,img=[],img2=[],span,div,rN;rN=jkLib.rS({'strLen':8});div=new Element('div',{'class':'tnDAlt'});tbl=new Element('table');tbl.className='first';tbl.id=this.gCC.uN+'..tbl';tbl.cellSpacing=0;tB=new Element('tbody');tr=new Element('tr');td=new Element('td');td.id='lUWSelected';img[rN]=jkUt.mHE('img');img[rN].id=this.gCC.uN+'..loader..'+this.gCC.d.tR[this.gCC.cS].getElementsByTagName('sku')[0].childNodes[0].nodeValue;img[rN].src=this.gCC.t.sI;td.appendChild(img[rN]);tr.appendChild(td);tB.appendChild(tr);tbl.appendChild(tB);div.appendChild(tbl);this.gCC.o.cD.appendChild(div);img2[rN]=new Element('img');img2[rN].id=this.gCC.uN+'..img..'+this.gCC.d.tR[this.gCC.cS].getElementsByTagName('sku')[0].childNodes[0].nodeValue;Event.observe(img2[rN],'load',function(){var o=this;jkLib.sT({f:function(){l=o.id.split('.');var t=$(l[0]+'.'+l[1]+'.'+'loader..'+l[4]).parentNode;(jkLib.Browser.IE)?(t.innerHTML=''):(t.removeAllChildren());t.appendChild(o);},t:250});});img2[rN].src=this.gCC.d.tR[this.gCC.cS].getElementsByTagName('icon')[0].childNodes[0].nodeValue;for(var i=0;i<this.gCC.c.l;i++){div=new Element('div',{'class':'tnD'});div.id=this.gCC.uN+'RemoveMeDiv';tbl=new Element('table');tbl.cellSpacing=0;tB=new Element('tbody');tr=new Element('tr');td=new Element('td');span=new Element('span');span.id=this.gCC.uN+'RemoveMe';div.appendChild(span);tr.appendChild(td);tB.appendChild(tr);tbl.appendChild(tB);div.appendChild(tbl);this.gCC.o.cD.appendChild(div);}}if(this.gCC.d.tR.length>5){this.gCC.o.sli.style.display='block';this.gCC.slider=new Control.Slider(this.gCC.o.sH,this.gCC.o.sli,{range:$R(0,(this.gCC.wi*this.gCC.d.tR.length)-(this.gCC.dN*this.gCC.wi)),sliderValue:0,onSlide:function(value){this.gCC.o.l.style.display='block';this.gCC.o.s.setStyle({left: -value+'px'});this._p({d:value});this.gCC.m.cS=(value<2)?(2):(Math.round(value/this.gCC.wi+1));if(this.gCC.m.cS>this.gCC.m.max-this.gCC.dN&&this.gCC.o.aR.style.display=='block')Effect.Fade(this.gCC.o.aR.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowR',limit:1},afterFinish:function(){this.gCC.o.aR.style.display='none'}.bind(this)});else if(this.gCC.m.cS<=this.gCC.m.max-this.gCC.dN&&this.gCC.o.aR.style.display=='none')Effect.Appear(this.gCC.o.aR.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowR',limit:1},afterFinish:function(){this.gCC.o.aR.style.display='block'}.bind(this)});if(value<2&&this.gCC.o.aL.style.display=='block')Effect.Fade(this.gCC.o.aL.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowL',limit:1},afterFinish:function(){this.gCC.o.aL.style.display='none'}.bind(this)});else if(value>=2&&this.gCC.o.aL.style.display=='none')Effect.Appear(this.gCC.o.aL.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowL',limit:1},afterFinish:function(){this.gCC.o.aL.style.display='block'}.bind(this)});}.bind(this),onChange:function(value){this.gCC.o.l.style.display='none';new Effect.Move(this.gCC.o.s,{x: -value,y:0,mode:'absolute',duration:0.5,queue:{position:'end',scope:'SliderQueue',limit:1}});this._p({d:value});this.gCC.m.cS=(value<2)?(2):(Math.round(value/this.gCC.wi+2));if(this.gCC.m.cS>this.gCC.m.max-4&&this.gCC.o.aR.style.display=='block')Effect.Fade(this.gCC.o.aR.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowR',limit:1},afterFinish:function(){this.gCC.o.aR.style.display='none'}.bind(this)});else if(this.gCC.m.cS<=this.gCC.m.max-this.gCC.dN&&this.gCC.o.aR.style.display=='none')Effect.Appear(this.gCC.o.aR.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowR',limit:1},afterFinish:function(){this.gCC.o.aR.style.display='block'}.bind(this)});if(value<2&&this.gCC.o.aL.style.display=='block')Effect.Fade(this.gCC.o.aL.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowL',limit:1},afterFinish:function(){this.gCC.o.aL.style.display='none'}.bind(this)});else if(value>=2&&this.gCC.o.aL.style.display=='none')Effect.Appear(this.gCC.o.aL.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowL',limit:1},afterFinish:function(){this.gCC.o.aL.style.display='block'}.bind(this)});}.bind(this)});if(this.gCC.cS>=3){this.gCC.slider.setValue((this.gCC.cS-2)*this.gCC.wi);}}}if(this.gCC.d.r.r>this.gCC.d.tR.length){this.gCC.d.r.r=this.gCC.d.tR.length;this._p();}this.gCC.o.l.setOpacity(0.01);this.gCC.o.l.style.display='none';this.gCC.o.w.style.display='block';productPg.findImgs();}else{this.gCC.o.l.innerHTML='';t=new Element('p',{'class':'msg'});t.innerHTML='No related products found.';this.gCC.o.l.appendChild(t);}}.bind(this),onException:function(a,b){}});},_p:function(o){if(this.gCC.s=='manual'){var l=this.gCC.d.r.l;var r=this.gCC.d.r.r;var t='Products '+l+'-'+r+' of '+this.gCC.d.tR.length;this.gCC.o.p.innerHTML='';this.gCC.o.p.appendChild(jkLib.tNod(t));}else if(this.gCC.s=='scroll'){if(typeof o!='undefined'){if(typeof o.d!='undefined'){t=Math.floor(o.d/146);this.gCC.o.p.innerHTML='Products '+(1+t)+'-'+(5+t)+' of '+this.gCC.d.tR.length;}else{this.gCC.o.p.innerHTML='Products '+((typeof o.l!='undefined')?(o.l):('1'))+'-'+((typeof o.r!='undefined')?(o.r):('5'))+' of '+((typeof o.t!='undefined')?(o.t):(this.gCC.d.tR.length));}}}},_bC:function(o){var d,p,p2,a,img=[],tbl,tbl2,tbody,tr,td,imgRN,temp,temp2,temp3,temp4;for(i=o.sN,x=0;x<o.lN;i++,x++){if(i<this.gCC.d.tR.length){if(i==0){d=new Element('div',{'class':'lUWc4First'});if(this.gCC.s=='scroll'&&this.gCC.cS==0){d.style.marginLeft='9px';}}else if(this.gCC.s=='scroll'&&this.gCC.d.tR[i].getElementsByTagName('selected').length){d=new Element('div',{'class':'lUWc4Alt'});}else{d=new Element('div',{'class':'lUWc4'});}tbl=new Element('table',{'class':'title'});tbl.cellSpacing='0';tbody=new Element('tbody');tr=new Element('tr');td=new Element('td');td.appendChild(jkLib.tNod(this.gCC.d.tR[i].getElementsByTagName('title')[0].childNodes[0].nodeValue));tr.appendChild(td);tbody.appendChild(tr);tbl.appendChild(tbody);d.appendChild(tbl);p=new Element('p',{'class':'sku'});p.appendChild(jkLib.tNod(this.gCC.d.tR[i].getElementsByTagName('sku')[0].childNodes[0].nodeValue));d.appendChild(p);tbl=new Element('table');if(this.gCC.d.tR[i].getElementsByTagName('selected').length&&this.gCC.s=='manual')tbl.className='alt';tbl.cellSpacing='0';tbody=new Element('tbody');tr=new Element('tr');td=new Element('td');p=new Element('p',{'class':'image'});a=new Element('a');a.href=this.gCC.d.tR[i].getElementsByTagName('url')[0].childNodes[0].nodeValue;img[i]=new Element('img',{'class':'endecaImgRolloverJS'});img[i].id='lineUp.'+i+'.loader';img[i].src=this.gCC.t.sI;img[i].useMap='^'+this.gCC.d.tR[i].getElementsByTagName('sku')[0].childNodes[0].nodeValue;a.appendChild(img[i]);if(this.gCC.s=='scroll'){if(this.gCC.d.tR[i].getElementsByTagName('selected').length)span=new Element('span',{'class':'alt'});else span=new Element('span');span.innerHTML=i+1+'';p.appendChild(span);}if(this.gCC.d.tR[i].getElementsByTagName('selected').length&&this.gCC.s=='scroll'){temp=new Element('p',{'class':'yAH'});p.appendChild(temp);}td.appendChild(a);tr.appendChild(td);tbody.appendChild(tr);tbl.appendChild(tbody);p.appendChild(tbl);d.appendChild(p);p=new Element('p',{'class':'price'});p.appendChild(jkLib.tNod(this.gCC.d.tR[i].getElementsByTagName('price')[0].childNodes[0].nodeValue));d.appendChild(p);p=new Element('p',{'class':'shortDes'});p.appendChild(jkLib.tNod(this.gCC.d.tR[i].getElementsByTagName('shortDes')[0].childNodes[0].nodeValue));d.appendChild(p);p=new Element('p',{'class':'rating'});temp3=this.gCC.d.tR[i].getElementsByTagName('average-rating')[0].childNodes[0].nodeValue;if(temp3!='blank'){temp4=temp3.split('.');ul=new Element('ul',{'class':'clearfix'});for(var i2=0;i2<5;++i2){if(i2<temp4[0]){li=new Element('li',{'class':'s1'});}else if(temp4.length==2){li=new Element('li',{'class':'s_'+temp4[1]});temp4.pop();}else{li=new Element('li');}ul.appendChild(li);}p.appendChild(ul);}d.appendChild(p);if(this.gCC.s=='scroll'){p=new Element('p',{'class':'compare clearfix'});temp=new Element('span',{'class':((this.gCC.d.tR[i].getElementsByTagName('selected').length)?('leftGray'):('left'))});temp.id='lUW.'+i+'.'+this.gCC.d.tR[i].getElementsByTagName('sku')[0].childNodes[0].nodeValue;a=new Element('a');a.href='javascript:void 0';a.innerHTML='Add to Compare';if(this.gCC.d.tR[i].getElementsByTagName('selected').length==0){a.id='lUWSelectedCompare';a.onclick=this.cCC({o:this,t:temp});temp.onclick=this.cCC({o:this,t:a});}else{p.style.visibility='hidden';}temp2=new Element('span',{'class':'right'});temp2.appendChild(a);p.appendChild(temp);p.appendChild(temp2);d.appendChild(p);}this.gCC.o.s.appendChild(d);imgRN=jkLib.rS({'strLen':8});img[imgRN]=jkUt.mHE('img');img[imgRN].id='lineUp.'+i+'.img';Event.observe(img[imgRN],'load',function(){var o=this;jkLib.sT({f:function(){var l=o.id.split('.'),t=$(l[0]+'.'+l[1]+'.'+'loader'),t2=t.parentNode;o.useMap=t.useMap;o.onmouseover=t.onmouseover;(jkLib.Browser.IE)?(t2.innerHTML=''):(t2.removeAllChildren());t2.appendChild(o);},t:250});});img[imgRN].src=this.gCC.d.tR[i].getElementsByTagName('medium')[0].childNodes[0].nodeValue;}else{break;}}},n:function(o){if(Effect.Queues.get('line_up').effects.length==0){var t,t2,s=false,t3,t4,t5,t6=true,t7=(typeof o.cN!='undefined')?(o.cN):(this.gCC.m);t2=this.gCC.o.s.positionedOffset();if(o.aOD=='asc'){t5=((this.gCC.wi*this.gCC.d.tR.length)-(this.gCC.wi*this.gCC.dN))* -1;if(t2.left>=t5){t= -(this.gCC.wi*t7);t3=this.gCC.o.s.select('[class="lUWc4"]');t4=this.gCC.pF;if(t3.length+this.gCC.m>this.gCC.d.tR.length){t4=this.gCC.d.tR.length-t3.length;}if((t2.left+t>t5)==false){t7=this.gCC.d.tR.length-this.gCC.d.r.r;t= -(this.gCC.wi*t7);Effect.Fade(this.gCC.o.aR.id,{duration:0.4,queue:{position:'end',scope:'line_upB',limit:1}});}if(t3.length<this.gCC.d.tR.length){this._bC({sN:t3.length,lN:t4});productPg.findImgs();}this.gCC.d.r.l+=t7;if(t6)this.gCC.d.r.r+=t7;this._p();s=true;}Effect.Appear(this.gCC.o.aL.id,{duration:0.4,queue:{position:'end',scope:'line_upC',limit:1}});Effect.Appear(this.gCC.o.sO.id,{duration:0.4,queue:{position:'end',scope:'line_upD',limit:1}});}else if(o.aOD=='desc'){if(t2.left<0){t=this.gCC.wi*t7;if((t2.left+t<0)==false){t6=false;this.gCC.d.r.l=1;this.gCC.d.r.r=this.gCC.dN;t=t2.left* -1;Effect.Fade(this.gCC.o.aL.id,{duration:0.4,queue:{position:'end',scope:'line_upB',limit:1}});Effect.Fade(this.gCC.o.sO.id,{duration:0.4,queue:{position:'end',scope:'line_upD',limit:1}});}if(t6){this.gCC.d.r.l-=t7;this.gCC.d.r.r-=t7;}this._p();s=true;}Effect.Appear(this.gCC.o.aR.id,{duration:0.4,queue:{position:'end',scope:'line_upC',limit:1,afterFinish:function(){}}});}if(s)new Effect.Move(this.gCC.o.s,{x:t,y:0,mode:'relative',duration:0.4,queue:{position:'end',scope:'line_up',limit:1}});}},sO:function(){var t=this.gCC.o.s.positionedOffset();new Effect.Move(this.gCC.o.s,{x:t.left* -1,y:0,mode:'relative',duration:0.4,queue:{position:'end',scope:'line_upF',limit:1}});Effect.Fade(this.gCC.o.sO.id,{duration:0.2,queue:{position:'end',scope:'line_upE',limit:1},afterFinish:function(){this.gCC.d.r.l=1;this.gCC.d.r.r=this.gCC.dN;this._p();Effect.Fade(this.gCC.o.aL.id,{duration:0.4,queue:{position:'end',scope:'line_upG',limit:1}});Effect.Appear(this.gCC.o.aR.id,{duration:0.4,queue:{position:'end',scope:'line_upC',limit:1}});}.bind(this)});},sAHA:function(o){var c=o.o.innerHTML,t;if(c=='Show All Products'){o.o.innerHTML='Back to Scroll View';Element.up(o.o).className='sOAlt';this.gCC.o.s.style.position='relative';this.gCC.o.aR.style.display='none';this.gCC.o.aL.style.display='none';this.gCC.o.aW.style.overflow='visible';this.gCC.o.aW.style.height='1%';this.gCC.o.s.style.width='auto';t=this.gCC.o.s.childElements();for(var i=0;i<=t.length;i++){if(i%5==0&&i!=0)t[i].style.marginLeft='4px';}for(var i=5;i<t.length;i++)t[i].style.marginTop='13px';this.gCC.o.s.style.left=0;this.gCC.slider.alignX=0;this.gCC.o.sH.style.left=0;this.gCC.o.sli.style.display='none';this._p({l:1,r:this.gCC.d.tR.length,t:this.gCC.d.tR.length});o.o.blur();}else if(c=='Back to Scroll View'){o.o.innerHTML='Show All Products';Element.up(o.o).className='sO';if(this.gCC.o.aR.style.display=='none')Effect.Appear(this.gCC.o.aR.id,{duration:0.5,queue:{position:'end',scope:'SliderQueueArrowR'},afterFinish:function(){this.gCC.o.aR.style.display='block'}.bind(this)});this.gCC.m.cS=2;this.gCC.o.s.style.position='absolute';this.gCC.o.aW.style.overflow='hidden';this.gCC.o.aW.style.height='';this.gCC.o.s.style.width=(this.gCC.wi*this.gCC.d.tR.length)+'px';t=this.gCC.o.s.childElements();for(var i=0;i<=t.length;i++){if(i%5==0&&i!=0)t[i].style.marginLeft='';}for(var i=5;i<t.length;i++)t[i].style.marginTop='';this.gCC.o.sli.style.display='block';this._p({l:1,r:(this.gCC.d.tR.length<5)?(this.gCC.d.tR.length):(5),t:this.gCC.d.tR.length});o.o.blur();}},cCC:function(o){var o=o;return function(){this.blur();var tbl,tB,tr,td,img=[],img2=[],span,div,rN,t,t2,t3,t4,t5,t6,t7,s,txt,inTxt;if(typeof o.tR!='undefined'){s=o.tR;txt=o.t;if(this.id==o.o.gCC.uN+'RemoveMe'){this.onclick=this.cCC({o:o.o,t:txt,tR:s});}}else if(this.id=='lUWSelectedCompare'){s=o.t;txt=this;}else{s=this;txt=o.t;}if(s.className=='left'){if(o.o.gCC.o.cD.getElementsByTagName('img').length-1>=o.o.gCC.c.l){s.rev='joe_popup';s.rel="'style':'small_blue', 'data' : '/popups/pages/product_page/msg2.php', 'width':500, 'height':80";jkPo.popObj._loadPopup(s);}else{t7=Element.up(txt);txt.innerHTML='';txt.onclick=o.o.cL({o:o.o});t7.className='rightAlt';s.className='leftAlt';t2=s.id.split('.');t2=t2[1];t=o.o.gCC.o.cD.getElementsByTagName('td');for(var i=0;i<t.length;i++){if(t[i].id=='lUWSelected')continue;if(Element.childElements(t[i]).length==0){t3=t[i].up('div.tnD');t3.className='tnDAlt';t3.onclick=o.o.cCC({o:o.o,t:txt,tR:s});t3.style.cursor='pointer';t4=t3.childElements();t4[0].style.display='block';rN=jkLib.rS({'strLen':8});img[rN]=jkUt.mHE('img');img[rN].id=o.o.gCC.uN+'..loader.'+t2+'.'+o.o.gCC.d.tR[t2].getElementsByTagName('sku')[0].childNodes[0].nodeValue;img[rN].src=o.o.gCC.t.sI;t[i].appendChild(img[rN]);img2[rN]=new Element('img');img2[rN].id=o.o.gCC.uN+'..img.'+t2+'.'+o.o.gCC.d.tR[t2].getElementsByTagName('sku')[0].childNodes[0].nodeValue;Event.observe(img2[rN],'load',function(){var o=this;jkLib.sT({f:function(){l=o.id.split('.');var t=$(l[0]+'.'+l[1]+'.'+'loader.'+l[3]+'.'+l[4]).parentNode;(jkLib.Browser.IE)?(t.innerHTML=''):(t.removeAllChildren());t.appendChild(o);},t:250});});img2[rN].src=o.o.gCC.d.tR[t2].getElementsByTagName('icon')[0].childNodes[0].nodeValue;break;}}}}else{t=o.o.gCC.o.cD.getElementsByTagName('img');if(t.length){txt.innerHTML='Add to Compare';txt.onclick=o.o.cCC({o:o.o,t:s});Element.up(txt).className='right';for(var i=1;i<t.length;i++){if(s.id==o.o.gCC.uN+'RemoveMe'||s.id==o.o.gCC.uN+'RemoveMeDiv'){if(s.id==o.o.gCC.uN+'RemoveMeDiv'){t2=s;}else{t2=Element.up(s);}t2.onclick='';t2.style.cursor='auto';t2=t2.getElementsByTagName('img');t2=t2[0];t2=t2.id.split('.');t7=$('lUW.'+t2[3]+'.'+t2[4]);t7.className='left';t2=t2[4];}else{t2=s.id.split('.');t2=t2[2];}t3=t[i].id.split('.');t3=t3[4];if(t3==t2){t4=Element.up(t[i],'div.tnDAlt');if(t4!='undefined'){t4.className='tnD';t4.onclick='';t4.style.cursor='auto';t5=t4.childElements();t5[0].style.display='none';t6=t5[1].getElementsByTagName('td');t6[0].innerHTML='';}break;}}(s.id==o.o.gCC.uN+'RemoveMe'||s.id==o.o.gCC.uN+'RemoveMeDiv')?(t7.className='left'):(s.className='left');o.o._cR();}}s.blur();return false;};},cL:function(o){var o=o.o;var f=function(){var t,t2,t3,t4,t5;this.blur();t=o.gCC.o.cD.getElementsByTagName('img');if(t.length<=1){this.rev='joe_popup';this.rel="'style':'small_blue', 'data' : '/popups/pages/product_page/msg1.php', 'width':500, 'height':80";jkPo.popObj._loadPopup(this);}else{t3='/phpdocs/ajtest/item_comparison.php?';for(var i=0;i<t.length;i++){t2=t[i].id.split('.');t3+=(i==0)?(''):('&');t3+='comparison_skus[]='+t2[4];}window.location=window.location.protocol+'//'+window.location.host+t3;return void 0;}};return f;},_cR:function(){var t,t2,t3,t4,t5=[];t=this.gCC.o.cD.up();t2=this.gCC.o.cD;t3=t2.childElements();for(var i=1;i<t3.length;i++){t4=t3[i].getElementsByTagName('img');if(t4.length==0){t5.push(t2.removeChild(t3[i]));}}for(var i=0;i<t5.length;i++){t2.appendChild(t5[i]);}}}
