(function(w,d,a){var $,i,k="",m=Math;for(i=0;i<8;i=i+1){k=k+String.fromCharCode(m.floor(m.random()*26)+97)}$=w[k]={};$.k=k;$.w=w;$.d=d;$.a=a;$.f=function(){var s={kk:[],listen:function(el,ev,fn){if(typeof $.w.addEventListener!=="undefined"){el.addEventListener(ev,fn,false)}else if(typeof $.w.attachEvent!=="undefined"){el.attachEvent("on"+ev,fn)}},unlisten:function(el,ev,fn){if(typeof el.removeEventListener!=="undefined"){el.removeEventListener(ev,fn,false)}else if(typeof el.detachEvent!=="undefined"){el.detachEvent("on"+ev,fn)}},postMessage:function(w,m){if(typeof w.postMessage!=="undefined"){w.postMessage(m,"*")}},getSexy:function(n){var i,k="",s="0123456789ABCDEFGHJKLMNPQRSTUVWXYZ_abcdefghijkmnopqrstuvwxyz";for(i=0;i<12;i=i+1){k=k+s.substr(Math.floor(Math.random()*60),1)}return k},readCookie:function(t){var i,k,v,p=$.d.cookie.split("; "),n=p.length;for(i=0;i0){position=[document.documentElement.scrollLeft,document.documentElement.scrollTop]}else if(typeof document.body.scrollTop!="undefined"){position=[document.body.scrollLeft,document.body.scrollTop]}return position},startChat:function(data){$.v.chatShown=true;if(typeof window.postMessage==="undefined"){$.f.run($.a.server+"/"+$.a.publicId+"/v/"+$.v.visitorId+"/cir/1/",{});return}var ll_chat_notification=document.createElement("div");ll_chat_notification.id="ll_chat_notification";ll_chat_notification.style.zIndex="100003";ll_chat_notification.style.position="fixed";ll_chat_notification.style.width="0px";ll_chat_notification.style.height="0px";ll_chat_notification.overflow="hidden";ll_chat_notification.style.bottom="0px";ll_chat_notification.style.right="10px";var iframe=document.createElement("iframe");var qp="";for(var key in data){if(!data.hasOwnProperty(key))continue;if(key==="host"||key==="pid"||key==="vid")continue;if(qp)qp+="&";qp+=encodeURIComponent(key)+"="+encodeURIComponent(data[key])}iframe.src=data.host+"/chat/popup?"+qp;iframe.style.zIndex="100003";iframe.scrolling="no";iframe.style.height="100%";iframe.style.width="100%";ll_chat_notification.appendChild(iframe);document.body.appendChild(ll_chat_notification);function flashTitle(newTitle,period){var oldTitle=$.d.title;var id=setInterval(function(){if($.d.title==newTitle){$.d.title=oldTitle}else{$.d.title=newTitle}},period);return function(){clearInterval(id);$.d.title=oldTitle}}var unflash;$.f.listen($.w,"message",function(event){event=event||window.event;var match=event.data.match(/^size:([0-9]*):([0-9]*)$/);if(match){var w=match[1],h=match[2];ll_chat_notification.style.width=w+"px";ll_chat_notification.style.height=h+"px";ll_chat_notification.style.display="block";unflash=flashTitle("Chat Requested",1e3);return}if(event.data!=="close iframe")return;unflash();$.w.setTimeout(function(){$.v.chatShown=false},4e3);if(ll_chat_notification.parentNode)ll_chat_notification.parentNode.removeChild(ll_chat_notification);$.f.run($.a.server+"/"+$.a.publicId+"/v/"+$.v.visitorId+"/cir/1/",{})})},kill:function(id){var s=$.d.getElementById($.k+".f.kk["+id+"]");if(typeof s==="object"&&s.tagName&&s.parentNode){s.parentNode.removeChild(s)}},run:function(url,qp){var t=$.f.kk.length,n=$.d.getElementsByTagName("SCRIPT")[0],s=$.d.createElement("SCRIPT");$.f.kk[t]=function(r){$.f.kill(t);$.f.callback(r)};url=url+"/c/"+$.k+".f.kk["+t+"]";if(typeof qp==="object"){var first=true;for(var k in qp){url=url+(first?"?":"&")+k+"="+encodeURIComponent(qp[k]);first=false}}s.src=$.d.location.protocol+"//"+url;s.type="text/javascript";s.id=$.k+".f.kk["+t+"]";n.parentNode.insertBefore(s,n)},phoneHome:function(first){if(typeof first==="undefined")first=false;var url=$.a.server;var qp={};var pageUrl=$.d.URL;var attribution=$.d.getElementById("lexitySalesAttribution")||$.d.getElementById("vurveSalesAttribution")||$.d.getElementById("lex_invoice_id");if(attribution&&attribution.name){$.a.pageClass="confirm";if(pageUrl.indexOf("?")!==-1){pageUrl+="&invoiceId="+attribution.name}else{pageUrl+="?invoiceId="+attribution.name}}if($.a.embedHash&&$.a.partnerCode&&$.a.merchantId){url+="/embed/"+$.a.partnerCode+"/"+$.a.embedHash;qp={id:$.a.merchantId,ts:(new Date).getTime()}}else{url+="/"+$.a.publicId}url+=first?"/n/1":"/h/1";url+="/v/"+$.v.visitorId+"/k/"+$.v.hitId+"/u/"+encodeURIComponent(pageUrl);var buying_flag=$.d.getElementById("lex_user_in_cart");if($.v.look_for_div&&buying_flag){$.a.pageClass="buying";$.v.look_for_div=false;buying_flag.parentNode.removeChild(buying_flag)}if($.a.pageClass)url+="/x/"+encodeURIComponent($.a.pageClass);if($.d.title)url+="/t/"+encodeURIComponent($.d.title);if($.d.referrer)url+="/r/"+encodeURIComponent($.d.referrer);if($.a.version)url+="/vn/"+encodeURIComponent($.a.version);$.f.run(url,qp)},ping:function(first){$.f.phoneHome(first);var now=(new Date).getTime();if(now-$.v.startTime<$.a.maxSessionLength){$.w.setTimeout(function(){$.f.ping()},$.a.pingInterval*1e3)}},buildConversion:function(args){if(typeof args==="object"&&args.id){var query="",key="",path="//www.googleadservices.com/pagead/conversion/"+args.id,img=$.d.createElement("IMG");for(key in args){if(args[key].hasOwnProperty){if(key!=="id"){if(query){query=query+"&"}else{query="/?"}query=query+encodeURIComponent(key)+"="+encodeURIComponent(args[key])}}}img.height=1;img.width=1;img.style.height="1px";img.style.width="1px";img.style.position="absolute";img.style.top="-1000px";img.style.left="-1000px";img.src=path+query;$.d.b.appendChild(img)}},getVisitorId:function(vpx,cont){$.v.visitorId=$.f.readCookie($.a.cookieId);$.f.listen($.w,"message",receiveVisitorId);var iframed=$.w.top!=$.w;if(iframed)$.f.postMessage($.w.top,"Get Lexity visitorId");var giveUp=$.w.setTimeout(rest,100);function receiveVisitorId(event){event=event||window.event;if(!event||!event.data)return;var s=event.data.split("=");if(s.length===2&&s[0]==="Lexity visitorId"){$.v.visitorId=s[1];$.w.clearTimeout(giveUp)}}function rest(){$.f.unlisten($.w,"message",receiveVisitorId);if(!$.v.visitorId){$.v.visitorId=$.f.getSexy()}if(vpx){$.v.visitorId=vpx.split(";")[0]}else if(!iframed){$.w.name=$.w.name+"_vpx="+$.v.visitorId+";"}$.f.writeCookie($.a.cookieId,$.v.visitorId);cont()}},setUpLex:function(){var old_lex=$.w._lex||[];var toSend={};var e=encodeURI;var url_prefix=function(){return $.a.server+"/"+$.a.publicId+"/v/"+$.v.visitorId+"/k/"+$.v.hitId};var _lex_handler={rule:function(message){var urlRule=url_prefix()+"/rule/"+e(message);$.f.run(urlRule,null)},_addTrans:function(id,store_name,total,tax,shipping,city,state,country){toSend["_addTrans"]=Array.prototype.slice.call(arguments,0)},_addItem:function(id,sku,name,variant,unit_price,quantity){toSend["_addItem"]=toSend["_addItem"]||[];toSend["_addItem"].push(Array.prototype.slice.call(arguments,0))},_trackTrans:function(){var sendString=url_prefix()+"/ecomm/"+e(JSON.stringify(toSend));$.f.run(sendString,null);toSend={}}};$.w._lex={push:function(arr){if(Object.prototype.toString.call(arr)!="[object Array]"||!arr[0]||!_lex_handler.hasOwnProperty(arr[0])){return false}_lex_handler[arr[0]].apply(null,arr.slice(1))}};for(var i=0;i