
(function($){$.fn.cleanup=function(){this.children().unbind();this.unbind();return this;};$.fn.myRemove=function(){return this.cleanup().remove();};$.fn.myEmpty=function(){this.children().unbind();return this.empty();};$.fn.setSmallBox=function(v,t,b,l,r){var boxWidth=this.width();var boxHeight=this.height();this.find('div.t').width(boxWidth-(t===undefined?(v==1?26:32):t)).end().find('div.b').width(boxWidth-(b===undefined?(v==1?26:32):b)).end().find('div.l').height(boxHeight-(l===undefined?(v==1?28:32):l)).end().find('div.r').height(boxHeight-(r===undefined?(v==1?28:32):r));return this;};$.showErrMsg=function(msg,style){$.hideErrMsg();if(!msg||''===msg){return;}
var msgBox=$('<div class="newbox" id="msg_box"><div class="con"><div class="t"></div><div class="r"></div><div class="b"></div><div class="l"></div><div class="tl"></div><div class="tr"></div><div class="bl"></div><div class="br"></div><div class="msg_con"><div id="msg">'+msg+'</div><div class="box_close"></div><div class="line-sep"></div></div></div></div>').appendTo(document.body).css('zIndex',450).show();if(style&&style.width){msgBox.width(style.width);}
msgBox.css({'left':function(){return Math.round(($(window).width()-$(this).width())/2)+'px';},'top':function(){if(style&&style.top){return style.top;}
else{if($.browser.msie&&($.browser.version<=6)){return Math.round(($(window).height()-$(this).height())/2)+$(window).scrollTop()+'px';}
else{return Math.round(($(window).height()-$(this).height())/2)+'px';}}},'position':function(){if(style&&style.position){return style.position;}
else{if($.browser.msie&&($.browser.version<=6)){return'absolute';}
else{return'fixed';}}}}).setSmallBox(1).find('.box_close').one('click',$.hideErrMsg);$('#overlay').css({top:'0px',left:'0px',height:function(){return $(document).height()+'px';}}).one('click',$.hideErrMsg).show();if($.browser.msie&&($.browser.version<=6)){$('select').css('visibility','hidden');}};$.hideErrMsg=function(){$('#msg_box').myRemove();$('#overlay').hide();if($.browser.msie&&($.browser.version<=6)){$('select').css('visibility','visible');}};$.fn.resetClass=function(names){this.each(function(){this.className="";});this.addClass(names);return this;};$.fn.ajaxSubmit=function(cs){var s=$.extend({url:null,type:'get'},cs||{});var vals={};this.find('input[type=text],input[type=hidden],input[type=password],select,:checkbox:checked,:radio:checked,textarea').each(function(){vals[$(this).attr('name')]=$(this).val();});if(cs.data&&cs.data.length===undefined){for(var name in cs.data)
vals[name]=cs.data[name];}
var url=s.url||this.attr('action');if(s.type.toLowerCase()=='post'){$.post(url,vals);}
else{$.get(url.vals);}};$.fn.valignImg=function(){var pHeight=$(this).height();$(this).find('img:first').css('paddingTop',function(){var imgHeight=$(this).height()||0;return pHeight>imgHeight?Math.round((pHeight-imgHeight)/2)+'px':'0px';});return this;};$.myLang=function(name){return(_mylang&&_mylang[name])||name;};})(jQuery);(function($){var _popup={style:'',box:$('#popup'),content:$('#popup div.ppcontent'),arrow:$('#pp_arrow'),pageX:0,pageY:0,timer:null,outTimer:null,current:null,curvp:{w:0,h:0,ww:0,wh:0,st:0}};var trackMouse=function(event){if(!_popup.current){$(document.body).unbind('mousemove',trackMouse);return;}
_popup.pageX=event.pageX;_popup.pageY=event.pageY;};var setStyle=function(style,X,Y){if(style!=_popup.style){_popup.arrow.resetClass('arrow_'+style);_popup.style=style;}
if(_popup.style=='bl'){_popup.box.css({left:(X-27)+'px',top:(Y-_popup.curvp.h-20)+'px'});}
else if(_popup.style=='br'){_popup.box.css({left:(X-_popup.curvp.w+27)+'px',top:(Y-_popup.curvp.h-20)+'px'});}
else if(_popup.style=='tl'){_popup.box.css({left:(X-27)+'px',top:(Y+30)+'px'});}
else if(_popup.style=='tr'){_popup.box.css({left:(X-_popup.curvp.w+27)+'px',top:(Y+30)+'px'});}};var update=function(X,Y){if(!_popup.current){$(document.body).unbind('mousemove');return;}
var w=_popup.curvp.w,h=_popup.curvp.h,scrollTop=_popup.curvp.st,x1=_popup.curvp.ww-(X+w),x2=X-w,y1=Y-h-scrollTop-20,y2=(_popup.curvp.wh+scrollTop)-(Y+h),sx=(x1<0&&x2>0)?'r':'l',sy=(y1<0&&y2>0)?'t':'b';setStyle(sy+sx,X,Y);};var show=function(s){$(document.body).unbind('mousemove',trackMouse);var msg=$.data(this,'tooltips')||$.data(this,'tooltips',s.getData.call(this));if(!msg){if(_popup.timer){window.clearTimeout(_popup.timer);}
_popup.timer=window.setTimeout(function(){show.call(_popup.current,s);return false;},100);return;}
var tWidth=s.width;if(tWidth=='fit'){tWidth=$.data(this,'tooltipwidth')||$.data(this,'tooltipwidth',(function(msg){var ret=$('<span id="popup_test">'+msg+'</span>').appendTo(document.body).width()+46;$('#popup_test').myRemove();return ret;})(msg));}
_popup.content.myEmpty().html(msg);if(s.contentLoaded){s.contentLoaded.call(this,_popup.content);}
_popup.box.css({'width':tWidth+'px','textAlign':s.textAlign,'fontWeight':s.fontWeight}).show().setSmallBox(1);_popup.current=this;_popup.curvp.w=_popup.box.innerWidth();_popup.curvp.h=_popup.box.innerHeight();_popup.curvp.ww=$(window).width();_popup.curvp.wh=$(window).height();_popup.curvp.st=$(window).scrollTop();if(s.bindMove){$(document.body).bind('mousemove',function(event){update(event.pageX,event.pageY);});}
update(_popup.pageX,_popup.pageY);};$.fn.tooltip=function(cs)
{var s=$.extend({getData:function(){var ret=this.title;this.title="";return ret;},width:'fit',textAlign:'left',fontWeight:'normal',delay:0,method:'hover',bindMove:true,contentLoaded:null},cs||{});this[s.method](function(event){if(_popup.outTimer){window.clearTimeout(_popup.outTimer);}
if(_popup.current==this){return false;}
_popup.current=this;if(_popup.timer){window.clearTimeout(_popup.timer);}
_popup.pageX=event.pageX;_popup.pageY=event.pageY;if(s.delay){if(s.bindMove){$(document.body).bind('mousemove',trackMouse);}
_popup.timer=window.setTimeout(function(){show.call(_popup.current,s);return false;},s.delay);}
else{show.call(_popup.current,s);}
return false;},function(){if(_popup.timer){window.clearTimeout(_popup.timer);}
_popup.current=null;_popup.box.cleanup().hide();});return this;};$.fn.bookmark=function(){this.tooltip({getData:function(){var _bookmarks=[['bookmark1.gif',13,15,$.myLang('_BOOKMARK'),''],['google.gif',16,16,'Google Bookmarks','http://www.google.com/bookmarks/mark?op=add&bkmk={url}&title={title}'],['facebook.gif',14,14,$.myLang('_FACEBOOK'),'http://www.facebook.com/share.php?u={url}'],['delicious.gif',16,16,$.myLang('_DELICIOUS'),'http://del.icio.us/post?v=2&url={url}&title={title}'],['digg.gif',16,16,'digg','http://digg.com/submit?phase=2&url={url}&title={title}'],['technorati.gif',16,15,'technorati','http://technorati.com/faves?add={url}'],['stumbleupon.gif',16,16,'stumbleupon','http://www.stumbleupon.com/submit?url={url}&title={title}']];var curUrlEncoded=encodeURIComponent(window.location.href),curTitleEncoded=encodeURIComponent(document.title),url='';var msg='<div class="bookmark_box">';msg+='<div style="float:left">'+$.myLang('_ADDTO')+'</div><div class="box_close"></div><div class="line-sep" style="height:10px"></div>';for(var i=0;i<_bookmarks.length;i++){if(i===0){url='#';}
else{url=_bookmarks[i][4].replace(/\{url\}/gi,curUrlEncoded).replace(/\{title\}/gi,curTitleEncoded);}
var name=_bookmarks[i][3].toUpperCase();msg+='<a href="'+url+'"><img src="'+_mypage.ibase+'css/footer/'+_bookmarks[i][0]+'" width="'+_bookmarks[i][1]+'" height="'+_bookmarks[i][2]+'">&nbsp;&nbsp;&nbsp;&nbsp;'+name+'</a>';}
msg+='</div>';return msg;},width:160,method:'toggle',bindMove:false,contentLoaded:function(content){var current=$(this);$(content).find('.box_close').click(function(){current.click();return false;}).end().find('a:first').click(function(){var url=window.location.href;var title=document.title;if($.browser.msie){window.external.AddFavorite(url,title);}
else if($.browser.mozilla){window.sidebar.addPanel(title,url,"");}
else{alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");}
return false;}).end().find('a:not(:first)').click(function(){window.open($(this).attr('href'),'bookmark','location=1,menubar=1,status=1,scrollbars=1,resizable=1,width=800,height=600');current.click();return false;});}});return this;};})(jQuery);(function($){var _ss={box:$('#ss-con'),cells:[{'box':$('#ss-prod'),'title':$('#ss-prod-t'),'lang':'_SS_PRODUCTS','type':'p','ajax':null},{'box':$('#ss-cat'),'title':$('#ss-cat-t'),'lang':'_SS_CATEGORIES','type':'c','ajax':null},{'box':$('#ss-source'),'title':$('#ss-source-t'),'lang':'_SS_SOURCES','type':'s','ajax':null}],shown:false,keyword:null,timer:null};var ssShowHide=function(show){if(!show){if(_ss.timer){window.clearTimeout(_ss.timer);_ss.timer=null;}
$.each(_ss.cells,function(){if(this.ajax){this.ajax.abort();this.ajax=null;}});}
if(show==_ss.shown){return;}
_ss.shown=show;_ss.box[show?'show':'hide']().setSmallBox(2);$.each(_ss.cells,function(){this.box[show?'show':'hide']();});$('select').css('visibility',show?'hidden':'visible');};$.fn.superSearch=function(){_ss.box.find('.box_close').click(function(){ssShowHide(false);}).end().find('div.ss_check_all a').click(function(){ssShowHide(false);$('#searchFrm').submit();return false;});$('#btnSearch').click(function(){ssShowHide(false);});this.keyup(function(event){var tmp=$.trim($(this).val());if(tmp==_ss.keyword){return false;}
_ss.keyword=tmp;if(_ss.timer){$.each(_ss.cells,function(){if(this.ajax){this.ajax.abort();}});window.clearTimeout(_ss.timer);_ss.timer=null;}
if(_ss.keyword===''){ssShowHide(false);return false;}
else{ssShowHide(true);}
$.each(_ss.cells,function(){this.title.find('b:first').myEmpty().html($.myLang(this.lang)+'-'+$.myLang('_SS_SEARCHFOR')+' '+_ss.keyword).end().find('img:first').hide();this.box.myEmpty();});_ss.box.setSmallBox(2);_ss.timer=window.setTimeout(function(){var done=0;$.each(_ss.cells,function(index,item){if(item.ajax){item.ajax.abort();}
item.ajax=$.getJSON('/xml_index.php?lang='+_mypage.iso.substring(0,2),{page:'_xml_super',t:item.type,s:_ss.keyword},function(data){$.each(data,function(index2,item2){item.box.append(item2);});item.title.find('img:first').hide();if(item.type=='s'){if(item.box.find('p.ss_err').size()===0){item.box.find('p:even').addClass('ss_blue').end().find('p:odd').addClass('ss_lblue');}}
else{item.box.find('a:even').addClass('ss_blue').end().find('a:odd').addClass('ss_lblue');}
if(++done==_ss.cells.length){_ss.box.setSmallBox(2);}});item.title.find('img:first').show();});},_ss.keyword.length>2?800:1500);return false;}).keypress(function(event){if(13==event.which){ssShowHide(false);}});return this;};})(jQuery);(function($){var animateCallBack=function(){this.sliding=false;if(this.wincur<this.v){this.wincur+=this.olen;}
else if(this.wincur>(this.v+this.olen-1)){this.wincur-=this.olen;}
if(this.after){this.after.call(this);}};$.fn.gallery=function(cs){var s=$.extend({prev:null,next:null,mode:'slide',go:function(n){if(n===0){return false;}
if(this.sliding){return false;}
if(this.before){this.before.call(this);}
this.cur+=n;var winMove=0;if(n<0){if(this.cur<0){if(this.v<this.olen){winMove=this.cur;this.cur=0;}
else{winMove=0;this.cur=(this.cur+this.olen)%this.olen;}}}
else{if(this.cur>(this.v-1)){if(this.v<this.olen){winMove=this.cur-(this.v-1);this.cur=this.v-1;}
else{winMove=0;this.cur=this.cur%this.olen;}}}
if(winMove){this.sliding=true;if(winMove<0){if(this.wincur<=this.v){this.wincur+=this.olen;this.ul.css('left',-((this.wincur)*this.size)+'px');}}
else{if(this.wincur>=(this.v+this.olen-1)){this.wincur-=this.olen;this.ul.css('left',-((this.wincur)*this.size)+'px');}}
this.wincur+=winMove;var cur=this;if(this.mode=='fade'){this.ul.css('left',-((this.wincur)*this.size)+'px');$(this.li.get(this.wincur+this.cur)).css('opacity',0).animate({'opacity':1},500,function(){animateCallBack.call(cur);});}
else{this.ul.animate({'left':-((this.wincur)*this.size)+'px'},260,function(){animateCallBack.call(cur);});}}
else{if(this.after){this.after.call(this);}}
return true;},curI:function(){return(this.wincur+this.cur-s.windis)%this.olen;},curElement:function(){return this.li.get(this.wincur+this.cur);},before:null,after:null,visible:1,start:0,sliding:false,exCalls:null},cs||{});s.div=this;s.ul=$('ul:first',s.div);var tli=$('li',s.ul),tll=tli.size(),ts=s.start;s.wincur=ts;s.v=s.visible>tll?tll:s.visible;s.olen=tll;if(tll>s.v){s.ul.prepend(tli.slice(tll-s.v).clone()).append(tli.slice(0,s.v).clone());s.wincur+=s.v;s.windis=s.v;}
else{s.windis=0;}
s.li=$('li',s.ul);s.len=s.li.size();s.size=s.li.outerWidth();s.cur=0;s.div.css({'width':(s.size*s.visible)+'px','overflow':'hidden','position':'relative','z-index':'2'});s.ul.css({'width':(s.size*s.len)+'px','left':-(s.size*s.wincur)+'px','margin':'0px','padding':'0px','position':'relative','list-style-type':'none','z-index':'1'});s.li.css({'float':'left','overflow':'hidden'});$(s.prev).click(function(){s.go(-1);return false;});$(s.next).click(function(){s.go(1);return false;});if(s.exCalls){s.exCalls.call(s);}
this.s=s;return this;};})(jQuery);(function($){var _xhr=null,hideLB=function(){if(_xhr){_xhr.abort();_xhr=null;}
$('#lightbox_content').myEmpty();$('#overlay,#lightbox,#lb_loading').hide();if($.browser.msie&&($.browser.version<=6)){$('select').css('visibility','visible');}};$.fn.lightbox=function(){this.click(function(){if(_xhr){_xhr.abort();}
$('#overlay').css({top:'0px',left:'0px',height:function(){return $(document).height()+'px';}}).one('click',hideLB).show();$('#lb_loading').show().setSmallBox(1).css({top:function(){return($(window).scrollTop()+($(window).height()-35-$(this).innerHeight())/2)+'px';},left:function(){return(($(document).width()-20-$(this).innerWidth())/2)+'px';}});if($.browser.msie&&($.browser.version<=6)){$('select').css('visibility','hidden');}
var curReq=$(this).attr('name').substr(3);_xhr=$.getJSON('/xml_index.php?lang='+_mypage.iso.substring(0,2),{page:'_xml_lightbox',curpage:_mypage.page,inner:curReq,cont:$(this).is('#login')?'/user_details.html':window.location.href},function(data){if(!_xhr){return;}
if(!data.html){hideLB();return;}
$('#lb_loading').hide();$('#lb_title').myEmpty().html(data.title);$('#lightbox_content').myEmpty().html(data.html);if(data.css){if(data.css.id&&!$.data(document,data.css.id)){$.data(document,data.css.id,true)
var style=document.createElement('style');$(style).attr('type','text/css');style.styleSheet?style.styleSheet.cssText=data.css.str:$(document.createTextNode(data.css.str)).appendTo(style);var heads=document.getElementsByTagName("head");heads?(heads[0].appendChild(style)):(document.appendChild(style));}}
if(!$.data(document,'lb_js')){$.data(document,'lb_js',true);$.getScript(_mypage.ibase+'alatest.lightbox_'+(new Date()).getTime()+'.js',function(){lightboxLoaded(curReq);});}
else{lightboxLoaded(curReq);}
$('#lightbox').width(data.width).show().setSmallBox(2).css({top:function(){var t=$(window).scrollTop()+($(window).height()-35-$(this).innerHeight())/2;if(t<0){t=0;}
return t+'px';},left:function(){var l=($(document).width()-20-$(this).innerWidth())/2;if(l<0){l=0;}
return l+'px';}}).find('.box_close').one('click',function(){hideLB();});$('#overlay').css({height:function(){return $(document).height()+'px';}});});return false;});return this;};})(jQuery);(function($){var keyString="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var uTF8Encode=function(string){string=string.replace(/\x0d\x0a/g,"\x0a");var output="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){output+=String.fromCharCode(c);}else if((c>127)&&(c<2048)){output+=String.fromCharCode((c>>6)|192);output+=String.fromCharCode((c&63)|128);}else{output+=String.fromCharCode((c>>12)|224);output+=String.fromCharCode(((c>>6)&63)|128);output+=String.fromCharCode((c&63)|128);}}
return output;};var uTF8Decode=function(input){var string="";var i=0;var c=c1=c2=0;while(i<input.length){c=input.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}else if((c>191)&&(c<224)){c2=input.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}else{c2=input.charCodeAt(i+1);c3=input.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return string;}
$.extend({base64Encode:function(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=uTF8Encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}
output=output+keyString.charAt(enc1)+keyString.charAt(enc2)+keyString.charAt(enc3)+keyString.charAt(enc4);}
return output;},base64Decode:function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<input.length){enc1=keyString.indexOf(input.charAt(i++));enc2=keyString.indexOf(input.charAt(i++));enc3=keyString.indexOf(input.charAt(i++));enc4=keyString.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2);}
if(enc4!=64){output=output+String.fromCharCode(chr3);}}
output=uTF8Decode(output);return output;}});})(jQuery);(function($){$(document).ready(function(){$(window).unload(function(){$('*').unbind();});if(window!=top&&_mypage.page!='error'){top.location.replace(window.location.href);}
$('#header_ics').click(function(event){$('#header_cl').show().setSmallBox(1);$('#header_cs').children().click(function(event){event.stopPropagation();});$(document).one('click',function(event){$('#header_cl').hide();return false;});return false;});$('#header_cl').find('a').click(function(){if($('#switchCountryFrm').size()>0){var f=$('#switchCountryFrm')[0];$(f.new_language).val($(this).attr('name').substr(0,2));$(f.new_country).val($(this).attr('name').substr(3,2));$(f).submit();return false;}
else{return true;}});$('#topnav li.p:has(ul)').hover(function(event){var wrappedSet=$(this).find('div.newbox:first');if(this.timeout){window.clearTimeout(this.timeout);}
this.timeout=window.setTimeout(function(){wrappedSet.show().setSmallBox(1,26,26,14,14);},100);},function(event){var wrappedSet=$(this).find('div.newbox:first');if(this.timeout){window.clearTimeout(this.timeout);}
this.timeout=window.setTimeout(function(){wrappedSet.hide();},50);});$('#topnav li.p div.tab_con > a,#topnav li.p > a').hover(function(){},function(){if(this.clickdown){if(this.old_class){this.className=this.old_class;}
this.clickdown=false;}}).bind('mouseup',function(){if(this.clickdown){if(this.old_class){this.className=this.old_class;}
this.clickdown=false;}}).bind('mousedown',function(){this.old_class=this.className;this.clickdown=true;this.className='taba';});$('#keyword').superSearch().focus();$('#searchFrm').submit(function(){if(''===$.trim($('#keyword').val())){$.showErrMsg($.myLang('_SEARCH_WARN_NOKEYWORK'));$('#keyword')[0].focus();return false;}
else{return true;}}).keypress(function(event){if(13==event.which){$(this).submit();}});$('#btnSearch').click(function(){$('#searchFrm').submit();return false;});$("div.alastar[id^=alastar_],div.bigalastar[id^=alastar_]").tooltip({getData:function(){return"";},delay:500,width:300}).one('mouseover',function(){if(!$.data(this,'alascoreinvoked')){$.data(this,'alascoreinvoked',true);var theThis=this;$.get('/xml_index.php?lang='+_mypage.iso.substring(0,2),{page:'_xml_get_alascore_explain',al_id:this.id.substr(8)},function(data){$.data(theThis,'tooltips',data);});}});$('select.sortby').change(function(){window.location.href=$.base64Decode(this.options[this.selectedIndex].value).replace(/&amp;/g,'&');});$('a[name^=lb_]').lightbox();$('#wigbtn a[title]').tooltip();$('#wigbtn a.share').bookmark();$('#country_selector_bottom').tooltip({getData:function(){var arCountries={};$('#header_cl a').each(function(){var ccode=$(this).attr('name').substr(3,2);if(arCountries[ccode]===undefined){arCountries[ccode]={name:$.myLang('_'+ccode+'_NAME'),url:$(this).attr('href')};}});var msg='<div class="country_box">';msg+='<div style="float:left">';$.each(arCountries,function(){msg+='<a href="'+this.url+'" title="'+this.name+'">'+this.name+'</a>';});msg+='</div><div class="box_close"></div><div class="line-sep"></div>';msg+='</div>';return msg;},width:160,method:'toggle',bindMove:false,contentLoaded:function(content){var cur=$(this);content.find('.box_close').click(function(){cur.click();return false;});}});$('div.partner_source').tooltip({getData:function(){return $.myLang('_SHOP_PREMIUMPOP');},width:300});if($.browser.msie&&($.browser.version<=6)){$("img[src$=.png],img[src$=.PNG]").each(function(n){var imgID=(this.id)?"id='"+this.id+"' ":"";var imgClass=(this.className)?"class='"+this.className+"' ":"";var imgTitle=(this.title)?"title='"+this.title+"' ":"title='"+this.alt+"' ";var imgStyle="display:inline-block;"+this.style.cssText;if(this.align=="left"){imgStyle="float:left;"+imgStyle;}
if(this.align=="right"){imgStyle="float:right;"+imgStyle;}
if(this.parentElement.href){imgStyle="cursor:hand;"+imgStyle;}
var strNewHTML="<span "+imgID+imgClass+imgTitle+" style=\""+"width:"+this.width+"px; height:"+this.height+"px;"+imgStyle+";"+"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"+"(src=\'"+this.src+"\', sizingMethod='image');\"></span>";this.outerHTML=strNewHTML;});$("div.bigalastar").css("filter",function(n){var matches=/url\((?:'|")*(.+?)(?:'|")*\)/i.exec($(this).css('backgroundImage'));if(matches){return'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+matches[1]+'", sizingMethod="image")';}
else{return'';}}).css("backgroundImage","none");}
if(_mypage.windowResize){window.moveTo(0,0);window.resizeTo(screen.availWidth*(_mypage.windowResize/100),screen.availHeight*(_mypage.windowResize/100));}
if(_mypage.msg){$.showErrMsg(_mypage.msg);}
if($('#rvp').size()>0){var loadedRVP=function(data){$(this).find('.c1 a').tooltip().end().find('.c1').valignImg().end().find('.compare a').click(function(){var vals=[];$('#rvp').find(':checkbox:checked').each(function(){vals.push($(this).val());});if(vals.length<2||vals.length>5){$.showErrMsg($.myLang('_SHOPBROWSE_COMPARE_ERROR'));}
else{window.location.href=_mypage.comparePath+(_mypage.comparePath.indexOf('?')>=0?'&':'?')+'product_ids='+vals.join(',');}
return false;}).end().find('.remove a').click(function(){var vals=[];$('#rvp').find(':checkbox:checked').each(function(){vals.push($(this).val());});if(vals.length>0){$('#rvp').myEmpty().load('/xml_index.php?page=_xml_rightside_helper&task=remove_recentviewedproducts&alids='+vals.join(',')+'&lang='+_mypage.iso.substring(0,2),loadedRVP);}
return false;});};$('#rvp').myEmpty().load('/xml_index.php?page=_xml_rightside_helper&task=recentviewedproducts&lang='+_mypage.iso.substring(0,2),loadedRVP);}
if(typeof(_mybanner)!='undefined'){window.setTimeout(function(){var adsUrl;if($('#b_rightskyscraper_con').size()>0){adsUrl=$.base64Decode($('#b_rightskyscraper_con').attr('title')).replace(/&amp;/g,'&');$('#b_rightskyscraper_con').attr('title','').append('<iframe class="skyscraper" id="b_rightskyscraper" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" src="'+adsUrl+'"><\/iframe>');}
if($('#b_rightrect_con').size()>0){adsUrl=$.base64Decode($('#b_rightrect_con').attr('title')).replace(/&amp;/g,'&');$('#b_rightrect_con').attr('title','').append('<iframe class="rrect rpt" id="b_rightrect" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" src="'+adsUrl+'"><\/iframe>');}
if($('#b_rightskyscraper2').size()>0){$.getJSON('/banners.php?pos=custom_banner',_mybanner,function(data){var ads=[];if(data.nexttag){ads.push(data.nexttag);}
if(data.amz){ads.push(data.amz);}
$.each(ads,function(){$('<div></div>').css({'paddingTop':'10px','width':'160px','margin':'0px auto'}).html(this.toString()).appendTo('#b_rightskyscraper2');});if(data.intelli){var script=document.createElement('SCRIPT');script.type='text/javascript';script.src=data.intelli;document.body.appendChild(script);}});}},500);}
if(_mypage.firstVisit&&navigator.userAgent.toLowerCase().indexOf('iphone')==-1){var geoPromptLoaded=function(data){if(data){$('#geo_prompt_box').remove();$('#overlay').css({top:'0px',left:'0px',height:function(){return $(document).height()+'px';}}).show().click(function(){$('#overlay,#geo_prompt_box').hide();if($.browser.msie&&($.browser.version<=6)){$('select').css('visibility','visible');}
return false;});if($.browser.msie&&($.browser.version<=6)){$('select').css('visibility','hidden');}
$(data).appendTo(document.body).show().width(600).setSmallBox(2).css({'position':function(){if($.browser.msie&&($.browser.version<=6)){return'absolute';}
else{return'fixed';}},'left':function(){return Math.round(($(window).width()-$(this).width())/2)+'px';},'top':function(){if($.browser.msie&&($.browser.version<=6)){return Math.round(($(window).height()-$(this).height())/2)+$(window).scrollTop()+'px';}
else{return Math.round(($(window).height()-$(this).height())/2)+'px';}}}).find('.box_close').one('click',function(){$('#overlay,#geo_prompt_box').hide();if($.browser.msie&&($.browser.version<=6)){$('select').css('visibility','visible');}}).end().hide().fadeIn();$('a.foreign').click(function(){if($(document.switchCountryFrm).size()>0){$(document.switchCountryFrm.new_language).val($(this).attr('name').substr(0,2));$(document.switchCountryFrm.new_country).val($(this).attr('name').substr(3,2));$(document.switchCountryFrm.save_redirect).val(1);$(document.switchCountryFrm).submit();return false;}
else{return true;}});$('a.local').click(function(){$.get('/xml_index.php?lang='+_mypage.iso.substring(0,2),{'page':'_xml_geo_prompt','task':'set_current'});$('#geo_prompt_box .box_close').click();return false;});$('#geo_prompt_other_langs a').each(function(){var cur=this;var iso=this.href.split('#').pop();$.getJSON('/xml_index.php?lang='+_mypage.iso.substring(0,2),{'page':'_xml_getlang','iso':iso,'lang__GEO_PROMPT_SHOW_MSG':1},function(data){if(data._GEO_PROMPT_SHOW_MSG){$(cur).html(data._GEO_PROMPT_SHOW_MSG);}});}).click(function(){var iso=this.href.split('#').pop();$.get('/xml_index.php?lang='+_mypage.iso.substring(0,2),{page:'_xml_geo_prompt','iso':iso},geoPromptLoaded);return false;});}};$.get('/xml_index.php?lang='+_mypage.iso.substring(0,2),{'page':'_xml_geo_prompt'},geoPromptLoaded);}});})(jQuery);(function($){$(document).ready(function(){$('div.bestprice .p[title]').tooltip({fontWeight:'bold',textAlign:'center'});$('#cat_prod_list label').click(function(){var tmp=$('#'+$(this).attr('for'));tmp.attr('checked',!tmp.attr('checked'));var cssClass=tmp.attr('checked')?'ccbox_checked':'ccbox';$('#cat_prod_list input[value='+tmp.val()+']').each(function(){$('#cat_prod_list label[for='+this.id+']').resetClass(cssClass);});return false;});$('#cpBtn').click(function(){var pids=[];$('#cat_prod_list input:checkbox:checked').each(function(){if($.inArray(this.value,pids)<0){pids.push(this.value);}});var n=pids.length;if(n>1&&n<=5){window.location.href=$('#compareForm')[0].action+($('#compareForm')[0].action.indexOf('?')>=0?'&':'?')+'product_ids='+pids.join(',');}
else{$.showErrMsg($.myLang('_SHOPBROWSE_COMPARE_ERROR'));}
return false;});var selectChange=function(){if($(this).val()=='_see_more'){this.options[this.selectedIndex].text=$.myLang('_LOADING');var ID=$(this).blur().attr('disabled',true).attr('name');var theThis=this;$.post('/xml_index.php?page=_xml_search_helper&lang='+_mypage.iso.substring(0,2),{id:ID,wc:_whereClause},function(data){$(theThis).unbind('onchange',selectChange);theThis.options.length=0;var i=0;theThis.options[i++]=new Option($.myLang('_SHOPSERACHACTION_ANY'),'',true,false);var oldValue=$(theThis).attr('old_value');$.each(data,function(){theThis.options[i++]=new Option(this.text,this.value,true,this.value==oldValue?true:false);});$(theThis).val($.data(theThis,'lastValue')||'');$(theThis).attr('disabled',false).change(selectChange);},'json');return false;}
else{$.data(this,'lastValue',$(this).val());}};$('#narrow_bar select').change(selectChange);$('#other_result a.category_hits').toggle(function(){var cur=$(this);$.post('/xml_index.php?page=_xml_search_helper&lang='+_mypage.iso.substring(0,2),{id:'category_hits','keyword1':_mypage.keyword1,'limit':0},function(data){$('#other_result div.category_hits').html(data.join(', '));cur.html($.myLang('_SHOPANALYSIS_SHOWLESS'));},'json');return false;},function(){var cur=$(this);$.post('/xml_index.php?page=_xml_search_helper&lang='+_mypage.iso.substring(0,2),{id:'category_hits','keyword1':_mypage.keyword1,'limit':1},function(data){$('#other_result div.category_hits').html(data.join(', '));cur.html($.myLang('_SHOPANALYSIS_SHOWALL'));},'json');return false;});var showSourceCats=function(){var sid=this.href.substring(this.href.lastIndexOf(':')+1);$.post('/xml_index.php?page=_xml_search_helper&lang='+_mypage.iso.substring(0,2),{id:'source_cats','sid':sid},function(data){$('#other_result div.source_cats').html('<p>'+data['title']+'</p>'+data['cats'].join(', '));},'json');}
$('#other_result div.source_hits a[href*=#id:]').click(function(){showSourceCats.call(this);return false;});$('#other_result a.source_hits').toggle(function(){var cur=$(this);$.post('/xml_index.php?page=_xml_search_helper&lang='+_mypage.iso.substring(0,2),{id:'source_hits','keyword1':_mypage.keyword1,'limit':0},function(data){$('#other_result div.source_hits').myEmpty().html(data.join('')+'<div class="line-sep"></div>').find('a[href*=#id:]').click(function(){showSourceCats.call(this);return false;});cur.html($.myLang('_SHOPANALYSIS_SHOWLESS'));},'json');return false;},function(){var cur=$(this);$.post('/xml_index.php?page=_xml_search_helper&lang='+_mypage.iso.substring(0,2),{id:'source_hits','keyword1':_mypage.keyword1,'limit':1},function(data){$('#other_result div.source_hits').html(data.join('')+'<div class="line-sep"></div>').find('a[href*=#id:]').click(function(){showSourceCats.call(this);return false;});cur.html($.myLang('_SHOPANALYSIS_SHOWALL'));},'json');return false;});});})(jQuery);