﻿(function(){var undef='undefined';var httpvar="http://";var httpsvar="https://";var autoschemevar="//";var schemevar="http://";if(document.location.href.indexOf(httpvar)!=-1){schemevar=autoschemevar;}else if(document.location.href.indexOf(httpsvar)!=-1){schemevar=autoschemevar;}function isdef(v){if(v=="")return false;return(eval("typeof "+v)!=undef)}function createjs(jssrc){var s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('src',jssrc);return s;}function includejs(jssrc){var head=document.getElementsByTagName('head')[0];if(head)head.appendChild(createjs(jssrc));else document.body.appendChild(createjs(jssrc));}function importJS(jssrc,look_for,onincluded,onload){if(isdef(look_for)==false){includejs(jssrc);wait_load(look_for,function(){if(onincluded)onincluded();if(onload)onload();});}else{if(onload)onload();}}function wait_load(look_for,callback){var interval=setInterval(function(){if(isdef(look_for)){clearInterval(interval);callback();}},50);}function now(){return+new Date();}function ck(){var UnimallMidKey="unimall%5F%5FMID";var MallCookie="";var CookieList=document.cookie.split(';');for(var i=0;i<CookieList.length;i++){var CookieValue=jQuery.trim(CookieList[i]);if(CookieValue.indexOf(UnimallMidKey)==0){MallCookie=MallCookie+";"+CookieValue.substring(UnimallMidKey.length,CookieValue.length);}if(CookieValue.indexOf("SID=")==0){MallCookie=MallCookie+";"+CookieValue;}}return MallCookie;}function ShouldQU(){var CookieList=document.cookie.split(';');for(var i=0;i<CookieList.length;i++){var CookieValue=jQuery.trim(CookieList[i]);if(CookieValue.indexOf("eu=full")==0){return false;}}return true;}function bwRecEn(){var MallBWRecEnKey="BWRecEn=";var MallCookie="";var CookieList=document.cookie.split(';');for(var i=0;i<CookieList.length;i++){var CookieValue=jQuery.trim(CookieList[i]);if(CookieValue.indexOf(MallBWRecEnKey)==0)MallCookie=CookieValue.substring(MallBWRecEnKey.length,CookieValue.length);}return unescape(MallCookie);}function setCookie(key,value,expires,path,domain,secure){if(!key){return;}key=key+'='+escape(value)+";";expires=expires?("expires="+new Date(new Date().getTime()+expires*1000*86400).toGMTString())+";":"";path=path?"path="+path+";":"path=/;";domain=domain?("domain="+domain)+";":"";secure=secure?"secure=true;":"";document.cookie=[key,expires,path,domain,secure].join("");}function initscupioec(){if(!self.scupioec){var url;var ref;try{url=top.location.href;}catch(Error){}try{ref=top.document.referrer;}catch(Error){}self.scupioec={"vt":now()+"_"+Math.floor(Math.random()*10000),"u":url,"r":ref,"ck":ck(),"bw":bwRecEn(),"rec":[],"SetCookie":function(key,value,expires,path,domain,secure){setCookie(key,value,expires,path,domain,secure);},"call":function(configobj){var ecobj=initscupioec();var recnode={};recnode.c=configobj;recnode.n=null;ecobj.rec.push(recnode);callaspx(ecobj);}};}return self.scupioec;}function scupioec(){var executed='executed';var ec=initscupioec();var srcregex=new RegExp("rec.scupio.com/recweb/js/rec([^\.]*)\.js","i");var scripts=jQuery("script");if(scripts!=null){for(var i=0;i<scripts.length;i++){if(srcregex.test(scripts[i].src)){var scriptnode=jQuery(scripts[i]);if(!scriptnode.hasClass(executed)){scriptnode.addClass(executed);if(scriptnode.html().length>0){eval("var config="+scriptnode.html()+";");var recnode={};recnode.c=config;recnode.n=scriptnode;ec.rec.push(recnode);return ec;}}}}}return null;}function DoJqueryNoConflict(){if(typeof window.$.blockUI=="function"){return;}var old$=window.$;jQuery.noConflict();if(typeof window.$=="undefined"){window.$=old$;}else if(typeof window.$.BlockUI=="function"){jQuery=window.$;}}function jqueryReady(func){var checkJQuery="jQuery";importJS(schemevar+"ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js",checkJQuery,function(){DoJqueryNoConflict();},function(){importJS(schemevar+"rec.scupio.com/js/jquery.js",checkJQuery,function(){DoJqueryNoConflict();},func)});}function hasstr(obj){if(typeof obj=="string"){return obj.length>0;}return false;}function callaspx(ecobj){if(ecobj==null)return;var ec_rec_index=ecobj.rec.length-1;var ec_rec=ecobj.rec[ec_rec_index];var ec_config=ec_rec.c;var ec_node=ec_rec.n;ec_config.vidx=ec_rec_index;ec_config.vt=ecobj.vt;if(ec_config.mid=="none"){return;}if(typeof ec_config.qu!=undef){if(ShouldQU()==false)return;}if(hasstr(ecobj.u)){ec_config.u=ecobj.u;if(ec_config.u.length>1000){ec_config.u=ec_config.u.substr(0,1000)+"__T";}if(hasstr(ec_config.pid)&&(ec_config.pid=="buy")){delete ec_config.u;}}if(hasstr(ecobj.r)){ec_config.r=ecobj.r;}if(hasstr(ecobj.ck)){ec_config.ck=ecobj.ck;}var datafunc=function(a){eval("var data="+a+";");if(typeof data!=undef){if(data.length>0){jQuery(ec_node).after(data);}}};if(typeof ec_config.success=="function"){datafunc=ec_config.success;delete ec_config.success;}var func=function(a,b){var taid="bwrectarea";var tiid="bwrectitem";function IsVisited(url){jQuery('#'+taid).html('<a id="'+tiid+'" href="'+url+'">test</a>');var color=jQuery('#'+tiid).css('color');return((color=='rgb(0, 0, 255)')||(color=='#0000ff'));}datafunc(a);var tresult={};eval("var qurls="+b+";");if(typeof qurls!=undef){var qrvalue=qurls['r'];if(typeof qrvalue!=undef){qurls['r']=undef;var tarea=jQuery("#"+taid);if(tarea.length==0){jQuery("body").append('<style type="text/css">.bwrect A:link {text-decoration: none;color:#FF0000;} .bwrect A:visited {text-decoration: none;color: #0000FF;}</style><div id="'+taid+'" class="bwrect" style="display:none"></div>');tarea=jQuery("#"+taid);}for(var qurl in qurls){var qset=qurls[qurl];if(tresult[qset]!=1){if(IsVisited(qurl)){tresult[qset]=1;}}}var qrstr="";for(var qr in tresult){qrstr+=qr+",";}self.scupioec.call({"qu":qrvalue+":"+qrstr});}}};if(typeof ecobj.layout!=undef){if(ecobj.layout=="none"){func=function(str){};}}if((typeof ec_config.carts=="string")&&(typeof ec_config.pid==undef)){if(ec_config.carts.length==0)ec_config.pid="cart";}var jshead=schemevar+"rec.scupio.com/recweb/rec.aspx?";var jssrc=jshead+jQuery.param(ec_config);if(jssrc.length>2000){if(hasstr(ec_config.u))ec_config.u="__T";jssrc=jshead+jQuery.param(ec_config);}var datastr="self.scupioec.rec["+ec_rec_index+"].data";var qustr="self.scupioec.rec["+ec_rec_index+"].qurls";importJS(jssrc,datastr,null,function(){func(datastr,qustr);});}jqueryReady(function(){var ec=scupioec();if(ec!=null){callaspx(ec);}else{jQuery(document).ready(function(){callaspx(scupioec());});}});})();