/*  js/jquery.shcModal.js::Rev No::320553,js/rx_modal.js::Rev No::392978,js/plugins.js::Rev No::400511,js/global.js::Rev No::408016,js/dod.js::Rev No::407345   */
/*  #RESOURCELIST_START#js/jquery.shcModal.js,js/rx_modal.js,js/plugins.js,js/global.js,js/dod.js   #RESOURCELIST_END# */

 /*   /opt/SVNBAAD/source/ECOM_REL_7-Dec-2011_20120104_1550_541_static/wcs-static/StaticWeb/WebContent/StaticContent/Mygofer/js/jquery.shcModal.js:320553   */
(function(a){a.fn.shcModal=function(b){var c={modal:a(this),baseZIndex:10000,curtainOpacity:0.7,modalWidth:0,modalHeight:0,preventHorizontalScrollbar:true,killContainer:true,curtain:"shcCurtain",modalClose:"shcModalClose",layer:false,resize:true};return this.each(function(){if(b){b=a.extend(c,b)}if(c.killContainer){a(c.curtain).remove();a(c.modal).remove()}else{a(c.curtain).remove();a(c.modal).hide()}var d=a("<div id='"+c.curtain+"'></div>").css({position:"absolute",top:"0px",left:"0px",zIndex:c.baseZIndex,width:"100%",height:"100%",display:"none",backgroundColor:"#000000",opacity:c.curtainOpacity});var e=a(c.modal).css({zIndex:c.baseZIndex+1,position:"absolute"});var f=a("#"+c.modalClose).live("mouseup",function(g){if(b.killContainer){a("#"+c.curtain).remove();a(c.modal).remove()}else{a("#"+c.curtain).remove();a(c.modal).hide()}});if(!c.layer){a(d).appendTo("body").css({height:a(document).height()+"px"}).show()}if(c.resize){a(window).resize(function(){a(d).css({height:a(document).height()+"px"})})}a(e).appendTo("body").show()})}})(jQuery);
 /*   /opt/SVNBAAD/source/ECOM_REL_7-Dec-2011_20120104_1550_541_static/wcs-static/StaticWeb/WebContent/StaticContent/Mygofer/js/rx_modal.js:392978   */
$(document).ready(function(b){var a=(function(h){var j=h(window).width(),i=h(window).height(),f=0,o=false,n="qv_shcModal-closer, #curtain, .rx_cancel",c=function(){var p=[];p.push("<div id='qv_shcModal' class='qv_shcModal rx_shcModal'>");p.push("<div id='qv_shcModal-stuff' class='qv_shcModal-wrapper clearfix'>");p.push("<div id='qv_navWrapper'>");p.push("<div id='qv_shcModal-closer' class='rx_shcModal-closer'>Close</div>");p.push("</div>");p.push('<div id="qv_shcModal-content"><img src="'+ueHomePath+'img/mgLoaderGifSm.gif" class="ajaxLoader" /></div>');p.push("</div>");p.push("</div>");p=p.join("");return p},k=c(),m=function(){if(h(".rx_cancel").length){h("#"+n).bind("mouseup",function(){o=false})}else{setTimeout(arguments.callee,100)}},d=function(w){var u=h(w.target).parent();var r=h.cookie("s_r");if(userTypeVal=="P"||userTypeVal=="C"||r.indexOf("_Y")!=-1){var v=h.cookie("selectedStore");if(v!=null){v=v.split("|");zipcode=v[7].trim();if(unitNo!=""&&pharmacyStores.indexOf(unitNo.trim())>=0){var p="/shc/s/MygoferPharmacyView?storeId="+storeId+"&catalogId="+catalogId+"&langId=-1";window.location.href=p}else{if(pageContextType=="https"){q="/shc/s/CheckPharmacyCmdHttps"}else{q="/shc/s/CheckPharmacyCmd"}if(zipcode!=null&&zipcode!=""){h("body").append(k);h.ajax({type:"POST",url:q,data:"storeId="+storeId+"&catalogId="+catalogId+"&zipCode="+zipcode,success:function(t){if(o){return}o=true;h("#qv_shcModal-content").html(t);trackRXModalPopUp()}})}}}else{document.location.href="http://www.kmart.com/shc/s/dap_10151_10104_DAP_Kmart+Pharmacy+Microsite"}}else{var q;if(isKiosk==false){isKiosk="false"}if(isKiosk==true){isKiosk="true"}if(h("#pharmacyFlag").val()=="on"){q="MyGoferPharmacy"}else{q=encodeURIComponent("MygoferPharmacyView?storeId="+storeId+"&catalogId="+catalogId)}if(h("#pharmacyFlag").val()=="on"){fnShowLoginModal("MGPHARMACYNEW","LogonFormView?storeId="+storeId+"&catalogId="+catalogId+"&screenName=LOGIN")}else{fnShowLoginModal("MGPHARMACY","LogonFormView?storeId="+storeId+"&catalogId="+catalogId+"&screenName=LOGIN"+"&URL="+q+"&rxModalFlag=true","rxModal")}}h("#qv_shcModal").shcModal({curtain:"curtain",curtainOpacity:0.4,modalClose:n}).css({left:Math.floor(j/2)-415,top:u.offset().top,opacity:0}).animate({top:u.offset().top+u.height()+10,opacity:1},"slow");m()};rxModalZip=function(r){var p=h(r.target).parent();var q=h("#ZIPCode").val();if(pageContextType=="https"){url="/shc/s/CheckPharmacyCmdHttps"}else{url="/shc/s/CheckPharmacyCmd"}if(q!=null&&q!=""){trackRxModalLinks("searchZipcode",q);h.ajax({type:"POST",url:url,data:"storeId="+storeId+"&catalogId="+catalogId+"&zipCode="+q,success:function(t){h("#qv_shcModal-content").html("");h("#qv_shcModal-content").html(t)}})}m()};h(window).bind("resize",function(){j=h(window).width();i=h(window).height();h("#qv_shcModal").stop().animate({left:Math.floor(j/2)-415},100,"swing")});(function(){if(h("body").attr("id")=="home"){h("div.rx-banner").unbind("click").bind("click",d);h("div.rx-banner#HD-Eligible").unbind("click").bind("click",fnRxHdCheck);h("ul.categories").find("li.rx").unbind("click").bind("click",d);if(h("a#prescriptions_bar.Prescrptions").length>0){h(".Prescrptions").unbind("click").bind("click",d)}else{setTimeout(arguments.callee,100)}}else{if(h(".Prescrptions").length){h(".Prescrptions").unbind("click").bind("click",d)}else{setTimeout(arguments.callee,100)}}})();return{setCancel:m};var g="${WCParam.rxModal}";if(g=="true"){var l=h.cookie("selectedStore");if(l!=null){l=l.split("|");zipcodeRx=l[7].trim()}else{document.location.href="http://www.kmart.com/shc/s/dap_10151_10104_DAP_Kmart+Pharmacy+Microsite"}if(pageContextType=="http"){url="/shc/s/CheckPharmacyCmd"}else{url="/shc/s/CheckPharmacyCmdHTTP"}if(zipcode!=null&&zipcode!=""){h.ajax({type:"POST",url:url,data:"storeId="+storeId+"&catalogId="+catalogId+"&zipcodeRx="+zipcode,success:function(q){var p=h(e.target).parent();if(o){return}o=true;h("#qv_shcModal-content").html(q);h("#qv_shcModal").shcModal({curtain:"curtain",curtainOpacity:0.4,modalClose:n}).css({left:Math.floor(j/2)-415,top:p.offset().top,opacity:0}).animate({top:p.offset().top+p.height()+10,opacity:1},"slow");m()}})}}})(jQuery)});function initRadioCollection(){return radioCollection={currentSlction:$(".ribbon td.selected"),input:$(".ribbon td").bind("click",function(d){var c=$(this),a=radioCollection.input.index(c),b=(c.get(0)===d.target);c.find("input:radio").get(0).checked=true;if(typeof radioCollection.currentSlction!=="undefined"){radioCollection.currentSlction.toggleClass("unselected").toggleClass("selected")}radioCollection.currentSlction=c.toggleClass("unselected").toggleClass("selected")})}}function trackRxModalLinks(a,b){if(typeof omRedesignEnabled!="undefined"&&omRedesignEnabled){if(typeof omAcct!="undefined"&&omAcct!=null&&typeof s_gi!="undefined"){s.linkTrackVars="prop12,eVar62";if(a=="searchZipcode"){s.prop12="ChangedZip_"+b;s.eVar62="ChangedZip_"+b;s.tl(this,"o","ChangedZip_"+b)}else{if(a=="selectBtn"||a=="HomeDelivery"||a=="KmartLink"){s.prop12=b;s.eVar62=b;s.tl(this,"o",b)}}}}}function trackRXModalPopUp(){if(typeof omRedesignEnabled!="undefined"&&omRedesignEnabled){if(typeof omAcct!="undefined"&&omAcct!=null&&typeof s_gi!="undefined"){s.linkTrackVars="prop1,prop2,prop3,prop27,prop28";s.pageName="Rx Modal";s.channel="Rx Modal";s.prop1="Rx Modal";s.prop2="Rx Modal";s.prop3="Rx Modal";s.prop27="Rx Modal";s.prop28="Rx Modal";if(typeof(s.t)!="undefined"){s.t()}}}};
 /*   /opt/SVNBAAD/source/ECOM_REL_7-Dec-2011_20120104_1550_541_static/wcs-static/StaticWeb/WebContent/StaticContent/Mygofer/js/plugins.js:400511   */
(function(a){a.fn.bgIframe=a.fn.bgiframe=function(c){if(a.browser.msie&&parseInt(a.browser.version,10)<=7){c=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},c||{});var d=function(e){return e&&e.constructor==Number?e+"px":e},b='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(c.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(c.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":d(c.top))+";"+"left:"+(c.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":d(c.left))+";"+"width:"+(c.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":d(c.width))+";"+"height:"+(c.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":d(c.height))+";"+'"/>';if(!(a.browser.mozilla)){return this.each(function(){if(a("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(b),this.firstChild)}})}}return this};if(!a.browser.version){a.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]}})(jQuery);jQuery.extend(jQuery.easing,{easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,n,m){var k=1.70158;var l=0;var g=n;if(h==0){return e}if((h/=m)==1){return e+n}if(!l){l=m*0.3}if(g<Math.abs(n)){g=n;var k=l/4}else{var k=l/(2*Math.PI)*Math.asin(n/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*m-k)*(2*Math.PI)/l))+e},easeOutElastic:function(f,h,e,n,m){var k=1.70158;var l=0;var g=n;if(h==0){return e}if((h/=m)==1){return e+n}if(!l){l=m*0.3}if(g<Math.abs(n)){g=n;var k=l/4}else{var k=l/(2*Math.PI)*Math.asin(n/g)}return g*Math.pow(2,-10*h)*Math.sin((h*m-k)*(2*Math.PI)/l)+n+e},easeInOutElastic:function(f,h,e,n,m){var k=1.70158;var l=0;var g=n;if(h==0){return e}if((h/=m/2)==2){return e+n}if(!l){l=m*(0.3*1.5)}if(g<Math.abs(n)){g=n;var k=l/4}else{var k=l/(2*Math.PI)*Math.asin(n/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*m-k)*(2*Math.PI)/l))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*m-k)*(2*Math.PI)/l)*0.5+n+e},easeInBack:function(e,f,a,k,h,g){if(g==undefined){g=1.70158}return k*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,k,h,g){if(g==undefined){g=1.70158}return k*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,k,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return k/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return k/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});jQuery.extend(jQuery.easing,{easeIn:function(e,f,a,h,g){return jQuery.easing.easeInQuad(e,f,a,h,g)},easeOut:function(e,f,a,h,g){return jQuery.easing.easeOutQuad(e,f,a,h,g)},easeInOut:function(e,f,a,h,g){return jQuery.easing.easeInOutQuad(e,f,a,h,g)},expoin:function(e,f,a,h,g){return jQuery.easing.easeInExpo(e,f,a,h,g)},expoout:function(e,f,a,h,g){return jQuery.easing.easeOutExpo(e,f,a,h,g)},expoinout:function(e,f,a,h,g){return jQuery.easing.easeInOutExpo(e,f,a,h,g)},bouncein:function(e,f,a,h,g){return jQuery.easing.easeInBounce(e,f,a,h,g)},bounceout:function(e,f,a,h,g){return jQuery.easing.easeOutBounce(e,f,a,h,g)},bounceinout:function(e,f,a,h,g){return jQuery.easing.easeInOutBounce(e,f,a,h,g)},elasin:function(e,f,a,h,g){return jQuery.easing.easeInElastic(e,f,a,h,g)},elasout:function(e,f,a,h,g){return jQuery.easing.easeOutElastic(e,f,a,h,g)},elasinout:function(e,f,a,h,g){return jQuery.easing.easeInOutElastic(e,f,a,h,g)},backin:function(e,f,a,h,g){return jQuery.easing.easeInBack(e,f,a,h,g)},backout:function(e,f,a,h,g){return jQuery.easing.easeOutBack(e,f,a,h,g)},backinout:function(e,f,a,h,g){return jQuery.easing.easeInOutBack(e,f,a,h,g)}});(function(e){var k,h,g,d,f,l,c;e.fn.cluetip=function(m){var n={width:250,height:"auto",cluezIndex:5002,positionBy:"auto",topOffset:25,leftOffset:-252,local:true,hideLocal:true,attribute:"rel",titleAttribute:"clueTip",splitTitle:"",showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:false,cursor:"pointer",arrows:true,dropShadow:false,dropShadowSteps:3,sticky:true,mouseOutClose:false,activation:"click",closePosition:"title",closeText:"close",truncate:0,fx:{open:"fadeIn",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(o){return true},onShow:function(o,p){},ajaxCache:true,ajaxProcess:function(o){o=e(o).not("style, meta, link, script, title");return o},ajaxSettings:{dataType:"html"}};if(m&&m.ajaxSettings){e.extend(n.ajaxSettings,m.ajaxSettings);delete m.ajaxSettings}if(m&&m.fx){e.extend(n.fx,m.fx);delete m.fx}if(m&&m.hoverIntent){e.extend(n.hoverIntent,m.hoverIntent);delete m.hoverIntent}e.extend(n,m);return this.each(function(){var A=false;var R=parseInt(n.cluezIndex,10)-1;var L=false;if(!k){h=e('<div id="cluetip-inner"></div>');d=e('<h3 id="cluetip-title"></h3>');g=e('<div id="cluetip-outer"></div>').append(h).prepend(d);k=e("<div></div>").attr({"id":"cluetip"}).css({zIndex:n.cluezIndex}).append(g).append('<div id="cluetip-extra"></div>')[b](a).hide();e('<div id="cluetip-waitimage"></div>').css({position:"absolute",zIndex:R-1}).insertBefore("#cluetip").hide();k.css({position:"absolute",zIndex:R});g.css({position:"relative",zIndex:R+1});k.bgiframe();f=e('<div id="cluetip-arrows" class="cluetip-arrows"></div>').css({zIndex:R+1}).appendTo("#cluetip")}var Q=(n.dropShadow)?+n.dropShadowSteps:0;if(!l){l=e([]);for(var M=0;M<Q;M++){l=l.add(e("<div></div>").css({zIndex:R-M-1,opacity:0.1,top:1+M,left:1+M}))}l.css({position:"absolute",backgroundColor:"#000"}).prependTo(k)}var t=e(this);var D=t.attr(n.attribute),r=n.cluetipClass;if(!D&&!n.splitTitle){return true}if(n.local&&n.hideLocal){e(D+":first").hide()}var J=parseInt(n.topOffset,10),s=parseInt(n.leftOffset,10);var E,u;var B=isNaN(parseInt(n.height,10))?"auto":(/\D/g).test(n.height)?n.height:n.height+"px";var T,o,v,G,x;var P=parseInt(n.width,10)+parseInt(k.css("paddingLeft"))+parseInt(k.css("paddingRight"))+Q;
if(isNaN(P)){P=275}var O=this.offsetWidth;var I,w,H,y,C;var N;var p=(n.attribute!="title")?t.attr(n.titleAttribute):"";if(n.splitTitle){N=p.split(n.splitTitle);p=N.shift()}var K;var q=function(X){if(!n.onActivate(t)){return false}L=true;k.removeClass().css({width:n.width});if(D==t.attr("href")){t.css("cursor",n.cursor)}t.attr("title","");if(n.hoverClass){t.addClass(n.hoverClass)}o=v=t.offset().top;I=t.offset().left;y=X.pageX;x=X.pageY;if(t[0].tagName.toLowerCase()!="area"){T=e(document).scrollTop();C=e(window).width()}if(n.positionBy=="fixed"){w=O+I+s;k.css({left:w})}else{w=(O>I&&I>P)||I+O+P+s>C?I-P-s:O+I+s;if(t[0].tagName.toLowerCase()=="area"||n.positionBy=="mouse"||O+P>C){if(y+20+P>C){w=(y-P-s)>=0?y-P-s:y-(P/2)}else{w=y+s}var V=w<0?X.pageY+J:X.pageY}k.css({left:(w>0&&n.positionBy!="bottomTop")?w:(y+(P/2)>C)?C/2-P/2:Math.max(y-(P/2),0)})}u=e(window).height();if(N){for(var W=0;W<N.length;W++){if(W==0){h.html(N[W])}else{h.append('<div class="split-body">'+N[W]+"</div>")}}F(V)}else{if(!n.local&&D.indexOf("#")!=0){if(A&&n.ajaxCache){h.html(A);F(V)}else{var Y=n.ajaxSettings;Y.url=D;Y.beforeSend=function(){g.children().empty();if(n.waitImage){e("#cluetip-waitimage").css({top:x-10,left:parseInt(w+(P/2),10)}).show()}};Y.error=function(){if(L){h.html("<i>sorry, the contents could not be loaded</i>")}};Y.success=function(aa){A=n.ajaxProcess(aa);if(L){h.html(A)}};Y.complete=function(){c=e("#cluetip-inner img").length;if(c){e("#cluetip-inner img").load(function(){c--;if(c<1){e("#cluetip-waitimage").hide();if(L){F(V)}}})}else{e("#cluetip-waitimage").hide();if(L){F(V)}}};e.ajax(Y)}}else{if(n.local){var Z=e(D+":first");var U=e.fn.wrapInner?Z.wrapInner("<div></div>").children().clone(true):Z.html();e.fn.wrapInner?h.empty().append(U):h.html(U);F(V)}}}};var F=function(W){k.addClass("cluetip-"+r);if(n.truncate){var X=h.text().slice(0,n.truncate)+"...";h.html(X)}function U(){}p?d.show().html(p):(n.showTitle)?d.show().html("&nbsp;"):d.hide();if(n.sticky){var V=e('<div id="cluetip-close"><a href="#">'+n.closeText+"</a></div>");(n.closePosition=="bottom")?V.appendTo(h):(n.closePosition=="title")?V.prependTo(d):V.prependTo(h);V.click(function(){z();return false});e(".cluetipClose").click(function(){z();return false});if(n.mouseOutClose){k.hover(function(){U()},function(){V.trigger("click")})}else{k.unbind("mouseout")}}var Y="";g.css({overflow:B=="auto"?"visible":"auto",height:B});E=B=="auto"?k.outerHeight():parseInt(B,10);G=v;if(n.positionBy=="fixed"){G=v-n.dropShadowSteps+J}else{if((w<y&&Math.max(w,0)+P>y)||n.positionBy=="bottomTop"){if(v+E+J>T+u&&x-T>E+J){G=x-E-J;Y="top"}else{G=x+J;Y="bottom"}}else{if(v+E+J>T+u){G=(E>=u)?T:T+u-E-J}else{if(t.css("display")=="block"||t[0].tagName.toLowerCase()=="area"||n.positionBy=="mouse"){G=W-J}else{G=v-n.dropShadowSteps}}}}if(Y==""){w<I?Y="left":Y="right"}k.css({top:G+"px"}).removeClass().addClass("clue-"+Y+"-"+r).addClass(" cluetip-"+r);if(n.arrows){var Z=(v-G-n.dropShadowSteps);f.css({top:(/(left|right)/.test(Y)&&w>=0&&Z>0)?Z+"px":/(left|right)/.test(Y)?0:""}).show()}else{f.hide()}l.hide();k.hide()[n.fx.open](n.fx.open!="show"&&n.fx.openSpeed);if(n.dropShadow){l.css({height:E,width:n.width}).show()}n.onShow(k,h)};var S=function(){L=false;e("#cluetip-waitimage").hide();if(!n.sticky){z()}if(n.hoverClass){t.removeClass(n.hoverClass)}};var z=function(){g.parent().hide().removeClass().end().children().empty();if(p){t.attr("title",p)}t.css("cursor","");if(n.arrows){f.css({top:""})}};if(n.activation=="click"||n.activation=="toggle"){t.click(function(U){if(k.is(":hidden")){q(U)}else{S(U)}this.blur();return false})}else{t.click(function(){if(D==t.attr("href")){return false}});if(e.fn.hoverIntent&&n.hoverIntent){t.hoverIntent({sensitivity:n.hoverIntent.sensitivity,interval:n.hoverIntent.interval,over:function(U){q(U)},timeout:n.hoverIntent.timeout,out:function(U){S(U)}})}else{t.hover(function(U){q(U)},function(U){S(U)})}}})};var b="appendTo",a="body";e.cluetip={};e.cluetip.setup=function(m){if(m&&m.insertionType&&(m.insertionType).match(/appendTo|prependTo|insertBefore|insertAfter/)){b=m.insertionType}if(m&&m.insertionElement){a=m.insertionElement}}})(jQuery);
/*!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
jQuery(document).ready(function(a){if(typeof imagePath!="undefined"){var b=imagePath+"img/global/loading.gif"}if(typeof(bodyIdKey)!="undefined"&&(bodyIdKey=="MYGOFERPHARMACY"||bodyIdKey=="MYGOFERADDPRESCRIPTION"||bodyIdKey=="MYGOFERPHARMACYPROFILE"||bodyIdKey=="MYGOFERPHARMACYINSURANCE"||bodyIdKey=="MYGOFERPHARMACY_INFO")){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image();imgLoader.src=b}});function tb_init(a){jQuery(a).click(function(){var c=this.title||this.name||null;var b=this.href||this.alt;var d=this.rel||false;tb_show(c,b,d);this.blur();return false})}function tb_show(l,b,h){try{if(typeof document.body.style.maxHeight==="undefined"){jQuery("body","html").css({height:"100%",width:"100%"});jQuery("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");jQuery("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{jQuery("#TB_overlay").addClass("TB_overlayBG")}if(l===null){l=""}jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");jQuery("#TB_load").show();var c;if(b.indexOf("?")!==-1){c=b.substr(0,b.indexOf("?"))}else{c=b}var f=/\.jpgjQuery|\.jpegjQuery|\.pngjQuery|\.gifjQuery|\.bmpjQuery/;var m=c.toLowerCase().match(f);if(m==".jpg"||m==".jpeg"||m==".png"||m==".gif"||m==".bmp"){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(h){TB_TempArray=jQuery("a[rel="+h+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var g=TB_TempArray[TB_Counter].href.toLowerCase().match(f);if(!(TB_TempArray[TB_Counter].href==b)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>"}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var p=tb_getPageSize();var n=p[0]-150;var s=p[1]-150;var o=imgPreloader.width;var e=imgPreloader.height;if(o>n){e=e*(n/o);o=n;if(e>s){o=o*(s/e);e=s}}else{if(e>s){o=o*(s/e);e=s;if(o>n){e=e*(n/o);o=n}}}TB_WIDTH=o+30;TB_HEIGHT=e+60;jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+b+"' width='"+o+"' height='"+e+"' alt='"+l+"'/></a>"+"<div id='TB_caption'>"+l+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");jQuery("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function r(){if(jQuery(document).unbind("click",r)){jQuery(document).unbind("click",r)}jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,h);return false}jQuery("#TB_prev").click(r)}if(!(TB_NextHTML==="")){function q(){jQuery("#TB_window").remove();jQuery("body").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,h);return false}jQuery("#TB_next").click(q)}document.onkeydown=function(t){if(t==null){keycode=event.keyCode}else{keycode=t.which}if(keycode==27){tb_remove()}else{if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";
q()}}else{if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";r()}}}}};tb_position();jQuery("#TB_load").remove();jQuery("#TB_ImageOff").click(tb_remove);jQuery("#TB_window").css({display:"block"})};imgPreloader.src=b}else{var a=b.replace(/^[^\?]+\??/,"");var d=tb_parseQuery(a);TB_WIDTH=(d["width"]*1)+30||630;TB_HEIGHT=(d["height"]*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(b.indexOf("TB_iframe")!=-1){urlNoQuery=b.split("TB_");jQuery("#TB_iframeContent").remove();if(d["modal"]!="true"){jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+l+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>")}else{jQuery("#TB_overlay").unbind();jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else{if(jQuery("#TB_window").css("display")!="block"){if(d["modal"]!="true"){jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+l+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><img src="+staticContentPath+"img/icons/close.gif alt='Close this window' /></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{jQuery("#TB_overlay").unbind();jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{jQuery("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";jQuery("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";jQuery("#TB_ajaxContent")[0].scrollTop=0;jQuery("#TB_ajaxWindowTitle").html(l)}}jQuery("#TB_closeWindowButton").click(tb_remove);if(b.indexOf("TB_inline")!=-1){jQuery("#TB_ajaxContent").append(jQuery("#"+d["inlineId"]).children());jQuery("#TB_window").unload(function(){jQuery("#"+d["inlineId"]).append(jQuery("#TB_ajaxContent").children())});tb_position();jQuery("#TB_load").remove();jQuery("#TB_window").slideDown("slow").css({display:"block"})}else{if(b.indexOf("TB_iframe")!=-1){tb_position();if(jQuery.browser.safari){jQuery("#TB_load").remove();jQuery("#TB_window").slideDown("slow").css({display:"block"})}}else{jQuery("#TB_ajaxContent").load(b+="&random="+(new Date().getTime()),function(){tb_position();jQuery("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");jQuery("#TB_window").slideDown("slow").css({display:"block"})})}}}if(!d["modal"]){document.onkeyup=function(n){if(n==null){keycode=event.keyCode}else{keycode=n.which}if(keycode==27){tb_remove()}}}}catch(k){}}function tb_showIframe(){jQuery("#TB_load").remove();jQuery("#TB_window").css({display:"block"})}function tb_remove(){jQuery("#TB_imageOff").unbind("click");jQuery("#TB_closeWindowButton").unbind("click");jQuery("#TB_window").slideUp(350,function(){jQuery("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});jQuery("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){jQuery("body","html").css({height:"auto",width:"auto"});jQuery("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}function tb_position(){jQuery("#TB_window").css({marginLeft:"-"+parseInt((TB_WIDTH/2),10)+"px",width:TB_WIDTH+"px"});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){jQuery("#TB_window").css({marginTop:"-"+parseInt((TB_HEIGHT/2),10)+"px"})}}function tb_parseQuery(d){var e={};if(!d){return e}var a=d.split(/[;&]/);for(var c=0;c<a.length;c++){var g=a[c].split("=");if(!g||g.length!=2){continue}var b=unescape(g[0]);var f=unescape(g[1]);f=f.replace(/\+/g," ");e[b]=f}return e}function tb_getPageSize(){var c=document.documentElement;var a=window.innerWidth||self.innerWidth||(c&&c.clientWidth)||document.body.clientWidth;var b=window.innerHeight||self.innerHeight||(c&&c.clientHeight)||document.body.clientHeight;arrayPageSize=[a,b];return arrayPageSize}function tb_detectMacXFF(){var a=navigator.userAgent.toLowerCase();if(a.indexOf("mac")!=-1&&a.indexOf("firefox")!=-1){return true}}jQuery(function(){jQuery("div.csw").prepend("<p class='loading'>Loading...<br /><img src='../img/icons/ajax-loader.gif' alt='loading...'/ ></p>")});(function(a){a.ui=a.ui||{};a.fn.tabs=function(c,b){if(c&&c.constructor==Object){b=c;c=null}b=b||{};c=c&&c.constructor==Number&&--c||0;return this.each(function(){new a.ui.tabs(this,a.extend(b,{initial:c}))})};a.each(["Add","Remove","Enable","Disable","Click","Load","Href"],function(b,c){a.fn["tabs"+c]=function(){var d=arguments;return this.each(function(){var e=a.ui.tabs.getInstance(this);e[c.toLowerCase()].apply(e,d)})}});a.fn.tabsSelected=function(){var d=-1;if(this[0]){var b=a.ui.tabs.getInstance(this[0]),c=a("li",this);d=c.index(c.filter("."+b.options.selectedClass)[0])}return d>=0?++d:-1};a.ui.tabs=function(c,b){this.source=c;this.options=a.extend({initial:0,event:"click",disabled:[],cookie:null,unselected:false,unselect:b.unselected?true:false,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:{},fxSpeed:"normal",add:function(){},remove:function(){},enable:function(){},disable:function(){},click:function(){},hide:function(){},show:function(){},load:function(){},tabTemplate:'<li><a href="#{href}"><span>#{text}</span></a></li>',panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",unselectClass:"ui-tabs-unselect",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"},b);this.options.event+=".ui-tabs";this.options.cookie=a.cookie&&a.cookie.constructor==Function&&this.options.cookie;a.data(c,a.ui.tabs.INSTANCE_KEY,this);this.tabify(true)};a.ui.tabs.INSTANCE_KEY="ui_tabs_instance";a.ui.tabs.getInstance=function(b){return a.data(b,a.ui.tabs.INSTANCE_KEY)};a.extend(a.ui.tabs.prototype,{tabId:function(b){return b.title?b.title.replace(/\s/g,"_"):this.options.idPrefix+a.data(b)},tabify:function(s){this.$lis=a("li:has(a[href])",this.source);this.$tabs=this.$lis.map(function(){return a("a",this)[0]});this.$panels=a([]);var t=this,d=this.options;this.$tabs.each(function(o,n){if(n.hash&&n.hash.replace("#","")){t.$panels=t.$panels.add(n.hash)}else{if(a(n).attr("href")!="#"){a.data(n,"href",n.href);var u=t.tabId(n);n.href="#"+u;t.$panels=t.$panels.add(a("#"+u)[0]||a(d.panelTemplate).attr("id",u).addClass(d.panelClass).insertAfter(t.$panels[o-1]||t.source))}else{d.disabled.push(o+1)}}});if(s){a(this.source).hasClass(d.navClass)||a(this.source).addClass(d.navClass);this.$panels.each(function(){var n=a(this);n.hasClass(d.panelClass)||n.addClass(d.panelClass)});for(var h=0,k;k=d.disabled[h];h++){this.disable(k)}this.$tabs.each(function(u,n){if(location.hash){if(n.hash==location.hash){d.initial=u;if(a.browser.msie||a.browser.opera){var o=a(location.hash),v=o.attr("id");o.attr("id","");setTimeout(function(){o.attr("id",v)},500)}scrollTo(0,0);return false}}else{if(d.cookie){d.initial=parseInt(a.cookie(a.ui.tabs.INSTANCE_KEY+a.data(t.source)))||0;return false}else{if(t.$lis.eq(u).hasClass(d.selectedClass)){d.initial=u;return false}}}});var e=this.$lis.length;while(this.$lis.eq(d.initial).hasClass(d.disabledClass)&&e){d.initial=++d.initial<this.$lis.length?d.initial:0;e--}if(!e){d.unselected=d.unselect=true}this.$panels.addClass(d.hideClass);this.$lis.removeClass(d.selectedClass);if(!d.unselected){this.$panels.eq(d.initial).show().removeClass(d.hideClass);this.$lis.eq(d.initial).addClass(d.selectedClass)}var b=!d.unselected&&a.data(this.$tabs[d.initial],"href");if(b){this.load(d.initial+1,b)}if(!/^click/.test(d.event)){this.$tabs.bind("click",function(n){n.preventDefault()
})}}var c={},r=d.fxShowSpeed||d.fxSpeed,q={},g=d.fxHideSpeed||d.fxSpeed;if(d.fxSlide||d.fxFade){if(d.fxSlide){c["height"]="show";q["height"]="hide"}if(d.fxFade){c["opacity"]="show";q["opacity"]="hide"}}else{if(d.fxShow){c=d.fxShow}else{c["min-width"]=0;r=1}if(d.fxHide){q=d.fxHide}else{q["min-width"]=0;g=1}}var l={display:"",overflow:"",height:""};if(!a.browser.msie){l["opacity"]=""}function p(o,n,u){n.animate(q,g,function(){n.addClass(d.hideClass).css(l);if(a.browser.msie&&q["opacity"]){n[0].style.filter=""}d.hide(o,n[0],u&&u[0]||null);if(u){m(o,u,n)}})}function m(o,u,n){if(!(d.fxSlide||d.fxFade||d.fxShow)){u.css("display","block")}u.animate(c,r,function(){u.removeClass(d.hideClass).css(l);if(a.browser.msie&&c["opacity"]){u[0].style.filter=""}d.show(o,u[0],n&&n[0]||null)})}function f(o,v,n,u){v.addClass(d.selectedClass).siblings().removeClass(d.selectedClass);p(o,n,u)}this.$tabs.unbind(d.event).bind(d.event,function(){var v=a(this).parents("li:eq(0)"),n=t.$panels.filter(":visible"),u=a(this.hash);if((v.hasClass(d.selectedClass)&&!d.unselect)||v.hasClass(d.disabledClass)||d.click(this,u[0],n[0])===false){this.blur();return false}if(d.cookie){a.cookie(a.ui.tabs.INSTANCE_KEY+a.data(t.source),t.$tabs.index(this),d.cookie)}if(d.unselect){if(v.hasClass(d.selectedClass)){v.removeClass(d.selectedClass);t.$panels.stop();p(this,n);this.blur();return false}else{if(!n.length){t.$panels.stop();if(a.data(this,"href")){var o=this;t.load(t.$tabs.index(this)+1,a.data(this,"href"),function(){v.addClass(d.selectedClass).addClass(d.unselectClass);m(o,u)})}else{v.addClass(d.selectedClass).addClass(d.unselectClass);m(this,u)}this.blur();return false}}}t.$panels.stop();if(u.length){if(a.data(this,"href")){var o=this;t.load(t.$tabs.index(this)+1,a.data(this,"href"),function(){f(o,v,n,u)})}else{f(this,v,n,u)}}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}return false})},add:function(d,g,b){if(d&&g){b=b||this.$tabs.length;var f=this.options,k=a(f.tabTemplate.replace(/#\{href\}/,d).replace(/#\{text\}/,g));var h=d.indexOf("#")==0?d.replace("#",""):this.tabId(a("a:first-child",k)[0]);var e=a("#"+h);e=e.length&&e||a(f.panelTemplate).attr("id",h).addClass(f.panelClass).addClass(f.hideClass);if(b>=this.$lis.length){k.appendTo(this.source);e.appendTo(this.source.parentNode)}else{k.insertBefore(this.$lis[b-1]);e.insertBefore(this.$panels[b-1])}this.tabify();if(this.$tabs.length==1){k.addClass(f.selectedClass);e.removeClass(f.hideClass);var c=a.data(this.$tabs[0],"href");if(c){this.load(b+1,c)}}f.add(this.$tabs[b],this.$panels[b])}else{throw"jQuery UI Tabs: Not enough arguments to add tab."}},remove:function(b){if(b&&b.constructor==Number){var d=this.options,e=this.$lis.eq(b-1).remove(),c=this.$panels.eq(b-1).remove();if(e.hasClass(d.selectedClass)&&this.$tabs.length>1){this.click(b+(b<this.$tabs.length?1:-1))}this.tabify();d.remove(e.end()[0],c[0])}},enable:function(b){var c=this.options,d=this.$lis.eq(b-1);d.removeClass(c.disabledClass);if(a.browser.safari){d.css("display","inline-block");setTimeout(function(){d.css("display","block")},0)}c.enable(this.$tabs[b-1],this.$panels[b-1])},disable:function(b){var c=this.options;this.$lis.eq(b-1).addClass(c.disabledClass);c.disable(this.$tabs[b-1],this.$panels[b-1])},click:function(b){this.$tabs.eq(b-1).trigger(this.options.event)},load:function(f,b,l){var m=this,c=this.options,d=this.$tabs.eq(f-1),k=d[0],g=a("span",k);if(b&&b.constructor==Function){l=b;b=null}if(b){a.data(k,"href",b)}else{b=a.data(k,"href")}if(c.spinner){a.data(k,"title",g.html());g.html("<em>"+c.spinner+"</em>")}var h=function(){m.$tabs.filter("."+c.loadingClass).each(function(){a(this).removeClass(c.loadingClass);if(c.spinner){a("span",this).html(a.data(this,"title"))}});m.xhr=null};var e=a.extend(c.ajaxOptions,{url:b,success:function(n){a(k.hash).html(n);h();if(l&&l.constructor==Function){l()}if(c.cache){a.removeData(k,"href")}c.load(m.$tabs[f-1],m.$panels[f-1])}});if(this.xhr){this.xhr.abort();h()}d.addClass(c.loadingClass);setTimeout(function(){m.xhr=a.ajax(e)},0)},href:function(b,c){a.data(this.$tabs.eq(b-1)[0],"href",c)}})})(jQuery);jQuery.fn.clearField=function(){return this.focus(function(){if(this.value==this.defaultValue){this.value=""}}).blur(function(){if(!this.value.length){this.value=this.defaultValue}})};jQuery.fn.clearForm=function(){return this.each(function(){var b=this.type,a=this.tagName.toLowerCase();if(a=="form"){return jQuery(":input",this).clearForm()}if(b=="text"||b=="password"||a=="textarea"){this.value=""}else{if(b=="checkbox"||b=="radio"){this.checked=false}else{if(a=="select"){this.selectedIndex=-1}}}})};function detectMac(){var a=navigator.userAgent.toLowerCase();if(a.indexOf("mac")!=-1){return true}}var calFocus="false";var popUpCal={selectedMonth:new Date().getMonth(),selectedYear:new Date().getFullYear(),selectedDay:new Date().getDate(),calendarId:"calendarDiv",inputClass:"calendarSelectDate",iframeId:"calendarFrame",init:function(){var a=getElementsByClass(popUpCal.inputClass,document,"input");var d=document.getElementById(popUpCal.calendarId);var c=document.getElementById(popUpCal.iframeId);for(var b=0;b<a.length;b++){a[b].onfocus=function(){popUpCal.selectedMonth=new Date().getMonth();setPos(this,d);d.style.display="block";d.style.zIndex=5000;popUpCal.drawCalendar(this);popUpCal.setupLinks(this);setPos(this,c);c.style.display="block";c.style.height="125px";c.style.width="178px";c.style.zIndex=d.style.zIndex-1};a[b].onblur=function(){if(calFocus=="false"){document.getElementById(popUpCal.calendarId).style.display="none";document.getElementById(popUpCal.iframeId).style.display="none"}}}},drawCalendar:function(g){var k="";k='<a id="closeCalender">Close Calendar</a>';k+='<table id="calendar" cellpadding="0" cellspacing="0"><thead><tr>';k+='<th id="prevMonth">&lt;</th><th colspan="5" class="calendarHeader">'+getMonthName(popUpCal.selectedMonth)+" "+popUpCal.selectedYear+'</th><th id="nextMonth">&gt;</th>';k+='</tr></thead><tbody><tr class="weekDaysTitleRow">';var c=new Array("S","M","T","W","T","F","S");for(var h=0;h<c.length;h++){k+="<td>"+c[h]+"</td>"}var b=getDaysInMonth(popUpCal.selectedYear,popUpCal.selectedMonth);var o=getFirstDayofMonth(popUpCal.selectedYear,popUpCal.selectedMonth);var m=0;var d=1;if(o!=7){m=Math.ceil(((o+1)+(b))/7)}if(o!=7){var q=o+1}else{var q=0}var p=new Date().getDate();var a=new Date().getMonth();var r=new Date().getFullYear();for(var n=0;n<m;n++){k+='<tr class="weekDaysRow">';for(var l=0;l<7;l++){if((d==p)&&(popUpCal.selectedYear==r)&&(popUpCal.selectedMonth==a)&&(q==0)){k+='<td id="today" class="weekDaysCell">'}else{k+='<td class="weekDaysCell">'}if(q==0){if(d<=b){k+="<a>"+d+"</a>"}d++}k+="</td>";if(q>0){q--}}k+="</tr>"}k+="</tbody></table>";var s=document.getElementById(popUpCal.calendarId);var t=document.getElementById(popUpCal.iframeId);s.innerHTML=k;document.getElementById("closeCalender").onclick=function(){s.style.display="none";t.style.display="none"};document.getElementById("prevMonth").onclick=function(){var v=new Date();var u=v.getMonth();var e=v.getFullYear();var f=e-10;if(v.getMonth()==popUpCal.selectedMonth&&popUpCal.selectedYear==f){alert("U can select only 10 years previous from current year")}else{popUpCal.selectedMonth--;if(popUpCal.selectedMonth<0){popUpCal.selectedMonth=11;popUpCal.selectedYear--}popUpCal.drawCalendar(g);popUpCal.setupLinks(g)}};document.getElementById("nextMonth").onclick=function(){var v=new Date();var u=v.getMonth();var e=v.getFullYear();var f=e+10;if(v.getMonth()==popUpCal.selectedMonth&&popUpCal.selectedYear==f){alert("U can select only 10 years next to current year")}else{popUpCal.selectedMonth++;if(popUpCal.selectedMonth>11){popUpCal.selectedMonth=0;popUpCal.selectedYear++}popUpCal.drawCalendar(g);popUpCal.setupLinks(g)}}},setupLinks:function(b){var d=document.getElementById("calendar");d.onmouseover=function(){calFocus="true"};var a=d.getElementsByTagName("a");for(var c=0;c<a.length;c++){a[c].onmouseover=function(){this.parentNode.className="weekDaysCellOver"
};a[c].onmouseout=function(){this.parentNode.className="weekDaysCell"};a[c].onclick=function(){document.getElementById(popUpCal.calendarId).style.display="none";document.getElementById(popUpCal.iframeId).style.display="none";popUpCal.selectedDay=this.innerHTML;b.value=formatDate(popUpCal.selectedDay,popUpCal.selectedMonth,popUpCal.selectedYear);calFocus="false"}}}};if(typeof window.addEventListener!="undefined"){window.addEventListener("load",popUpCal.init,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",popUpCal.init)}else{if(window.onload!=null){var oldOnload=window.onload;window.onload=function(a){oldOnload(a);popUpCal.init()}}else{window.onload=popUpCal.init}}}function formatDate(d,b,a){b++;if(b<10){b="0"+b}if(d<10){d="0"+d}var c=b+"/"+d+"/"+a;return c}function getMonthName(b){var a=new Array("January","February","March","April","May","June","July","August","September","October","November","December");return a[b]}function getDayName(a){var b=new Array("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");return b[a]}function getDaysInMonth(a,b){return 32-new Date(a,b,32).getDate()}function getFirstDayofMonth(b,c){var a;a=new Date(b,c,0).getDay();return a}function getElementsByClass(g,e,a){var d=new Array();if(e==null){e=document}if(a==null){a="*"}var c=e.getElementsByTagName(a);var b=c.length;var f=new RegExp("(^|\\s)"+g+"(\\s|$)");for(i=0,j=0;i<b;i++){if(f.test(c[i].className)){d[j]=c[i];j++}}return d}function isInteger(b){var a;for(a=0;a<b.length;a++){var d=b.charAt(a);if(((d<"0")||(d>"9"))){return false}}return true}function stripCharsInBag(d,e){var b;var a="";for(b=0;b<d.length;b++){var f=d.charAt(b);if(e.indexOf(f)==-1){a+=f}}return a}function daysInFebruary(a){return(((a%4==0)&&((!(a%100==0))||(a%400==0)))?29:28)}function DaysArray(b){for(var a=1;a<=b;a++){this[a]=31;if(a==4||a==6||a==9||a==11){this[a]=30}if(a==2){this[a]=29}}return this}function isDate(m){var f=new Date();var n=f.getYear()-10;var g=f.getYear()+10;var d="/";var a=DaysArray(12);var l=m.indexOf(d);var k=m.indexOf(d,l+1);var h=m.substring(0,l);var c=m.substring(l+1,k);var b=m.substring(k+1);strYr=b;if(n<1900){n=n+1900}if(g<1900){g=g+1900}if(c.charAt(0)=="0"&&c.length>1){c=c.substring(1)}if(h.charAt(0)=="0"&&h.length>1){h=h.substring(1)}for(var e=1;e<=3;e++){if(strYr.charAt(0)=="0"&&strYr.length>1){strYr=strYr.substring(1)}}month=parseInt(h);day=parseInt(c);year=parseInt(strYr);if(l==-1||k==-1){alert("The date format should be : mm/dd/yyyy");return false}if(h.length<1||month<1||month>12){alert("Please enter a valid month");return false}if(c.length<1||day<1||day>31||(month==2&&day>daysInFebruary(year))||day>a[month]){alert("Please enter a valid day");return false}if(b.length!=4||year==0||year<n||year>g){alert("Please enter a valid 4 digit year between "+n+" and "+g);return false}if(m.indexOf(d,k+1)!=-1||isInteger(stripCharsInBag(m,d))==false){alert("Please enter a valid date");return false}return true}function ValidateForm(a){var b=a;if(isDate(b.value)==false){b.focus();return false}return true}(function(d){var c="intercept",b="."+c,a=d[c]=function(f,e,g){d("html").intercept(f,e,g)};d.fn.intercept=function(g,o,n){var m,l,k;if(n){m={};m[o]=n;o=m}return this.each(function(){l=this;d.each(g.split(" "),function(f,e){k=d.data(l,e+b);if(!k){d.data(l,e+b,d.extend({},o));d.event.add(l,e,a.handle)}else{d.extend(k,o)}})})};a.absolute=/[\s>+~]/;a.handle=function(l){var h=d.data(this,l.type+b),g=l.target,n=d(g),m,k;if(!h){return}for(m in h){if(m=="self"&&g==this||a.absolute.test(m)?d(m).index(g)!=-1:n.is(m)){k=h[m].apply(g,arguments)!==false&&k}}return k}})(jQuery);jQuery.fn.highlightFade=function(f){var k=(f&&f.constructor==String)?{start:f}:f||{};var h=jQuery.highlightFade.defaults;var e=k["interval"]||h["interval"];var b=k["attr"]||h["attr"];var g={"linear":function(d,l,a,m){return parseInt(d+(m/a)*(l-d))},"sinusoidal":function(d,l,a,m){return parseInt(d+Math.sin(((m/a)*90)*(Math.PI/180))*(l-d))},"exponential":function(d,l,a,m){return parseInt(d+(Math.pow(m/a,2))*(l-d))}};var c=(k["iterator"]&&k["iterator"].constructor==Function)?k["iterator"]:g[k["iterator"]]||g[h["iterator"]]||g["linear"];if(h["iterator"]&&h["iterator"].constructor==Function){c=h["iterator"]}return this.each(function(){if(!this.highlighting){this.highlighting={}}var l=(this.highlighting[b])?this.highlighting[b].end:jQuery.highlightFade.getBaseValue(this,b)||[255,255,255];var m=jQuery.highlightFade.getRGB(k["start"]||k["colour"]||k["color"]||h["start"]||[255,255,128]);var a=jQuery.speed(k["speed"]||h["speed"]);var d=k["final"]||(this.highlighting[b]&&this.highlighting[b].orig)?this.highlighting[b].orig:jQuery.curCSS(this,b);if(k["end"]||h["end"]){d=jQuery.highlightFade.asRGBString(l=jQuery.highlightFade.getRGB(k["end"]||h["end"]))}if(typeof k["final"]!="undefined"){d=k["final"]}if(this.highlighting[b]&&this.highlighting[b].timer){window.clearInterval(this.highlighting[b].timer)}this.highlighting[b]={steps:((a.duration)/e),interval:e,currentStep:0,start:m,end:l,orig:d,attr:b};jQuery.highlightFade(this,b,k["complete"],c)})};jQuery.highlightFade=function(d,b,f,c){d.highlighting[b].timer=window.setInterval(function(){var e=c(d.highlighting[b].start[0],d.highlighting[b].end[0],d.highlighting[b].steps,d.highlighting[b].currentStep);var a=c(d.highlighting[b].start[1],d.highlighting[b].end[1],d.highlighting[b].steps,d.highlighting[b].currentStep);var g=c(d.highlighting[b].start[2],d.highlighting[b].end[2],d.highlighting[b].steps,d.highlighting[b].currentStep);jQuery(d).css(b,jQuery.highlightFade.asRGBString([e,a,g]));if(d.highlighting[b].currentStep++>=d.highlighting[b].steps){jQuery(d).css(b,d.highlighting[b].orig||"");window.clearInterval(d.highlighting[b].timer);d.highlighting[b]=null;if(f&&f.constructor==Function){f.call(d)}}},d.highlighting[b].interval)};jQuery.highlightFade.defaults={start:[255,255,128],interval:50,speed:400,attr:"backgroundColor"};jQuery.highlightFade.getRGB=function(e,b){var a;if(e&&e.constructor==Array&&e.length==3){return e}if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e)){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}else{if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e)){return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55]}else{if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e)){return[parseInt("0x"+a[1]),parseInt("0x"+a[2]),parseInt("0x"+a[3])]}else{if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e)){return[parseInt("0x"+a[1]+a[1]),parseInt("0x"+a[2]+a[2]),parseInt("0x"+a[3]+a[3])]}else{return jQuery.highlightFade.checkColorName(e)||b||null}}}}};jQuery.highlightFade.asRGBString=function(b){return"rgb("+b.join(",")+")"};jQuery.highlightFade.getBaseValue=function(h,d,c){var g,f;c=c||false;f=d=d||jQuery.highlightFade.defaults["attr"];do{g=jQuery(h).css(f||"backgroundColor");if((g!=""&&g!="transparent")||(h.tagName.toLowerCase()=="body")||(!c&&h.highlighting&&h.highlighting[d]&&h.highlighting[d].end)){break}f=false}while(h=h.parentNode);if(!c&&h.highlighting&&h.highlighting[d]&&h.highlighting[d].end){g=h.highlighting[d].end}if(g==undefined||g==""||g=="transparent"){g=[255,255,255]}return jQuery.highlightFade.getRGB(g)};jQuery.highlightFade.checkColorName=function(a){if(!a){return null}switch(a.replace(/^\s*|\s*$/g,"").toLowerCase()){case"aqua":return[0,255,255];case"black":return[0,0,0];case"blue":return[0,0,255];case"fuchsia":return[255,0,255];case"gray":return[128,128,128];case"green":return[0,128,0];case"lime":return[0,255,0];case"maroon":return[128,0,0];case"navy":return[0,0,128];case"olive":return[128,128,0];case"purple":return[128,0,128];case"red":return[255,0,0];case"silver":return[192,192,192];case"teal":return[0,128,128];case"white":return[255,255,255];case"yellow":return[255,255,0]}};(function(d){d.fn.jqm=function(f){var q={zIndex:3000,overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:false,target:false,modal:false,toTop:false,onShow:false,onHide:false,onLoad:false};
return this.each(function(){if(this._jqm){return}n++;this._jqm=n;l[n]={c:d.extend(q,f),a:false,w:d(this).addClass("jqmID"+n),s:n};q.trigger&&d(this).jqmAddTrigger(q.trigger)})};d.fn.jqmAddClose=function(f){return b(this,f,"jqmHide")};d.fn.jqmAddTrigger=function(f){return b(this,f,"jqmShow")};d.fn.jqmShow=function(f){return this.each(function(){!l[this._jqm].a&&d.jqm.open(this._jqm,f)})};d.fn.jqmHide=function(f){return this.each(function(){l[this._jqm].a&&d.jqm.close(this._jqm,f)})};d.jqm={hash:{},open:function(D,C){var v=l[D],w=v.c,q="."+w.closeClass,x=/^\d+$/.test(v.w.css("z-index"))&&v.w.css("z-index")||w.zIndex,p=d("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":x-1,opacity:w.overlay/100});v.t=C;v.a=true;v.w.css("z-index",x);if(w.modal){!a[0]&&m("bind");a.push(D);p.css("cursor","wait")}else{if(w.overlay>0){v.w.jqmAddClose(p)}else{p=false}}v.o=(p)?p.addClass(w.overlayClass).prependTo("body"):false;if(c&&d("html,body").css({height:"100%",width:"100%"})&&p){p=p.css({position:"absolute"})[0];for(var A in {Top:1,Left:1}){p.style.setExpression(A.toLowerCase(),"(_=(document.documentElement.scroll"+A+" || document.body.scroll"+A+"))+'px'")}}if(w.ajax){var f=w.target||v.w,B=w.ajax,f=(typeof f=="string")?d(f,v.w):d(f),B=(B.substr(0,1)=="@")?d(C).attr(B.substring(1)):B;f.load(B,function(){w.onLoad&&w.onLoad.call(this,v);q&&v.w.jqmAddClose(d(q,v.w));g(v)})}else{q&&v.w.jqmAddClose(d(q,v.w))}w.toTop&&v.o&&v.w.before('<span id="jqmP'+v.w[0]._jqm+'"></span>').insertAfter(v.o);d(d.browser.msie?"body":"html").css({overflow:"hidden"});(w.onShow)?w.onShow(v):v.w.show();g(v);return false},close:function(o){var f=l[o];f.a=false;if(f.c.modal){a.pop();!a[0]&&m("unbind")}f.c.toTop&&f.o&&d("#jqmP"+f.w[0]._jqm).after(f.w).remove();if(f.c.onHide){f.c.onHide(f)}else{f.w.hide()&&f.o&&f.o.remove()}d(d.browser.msie?"body":"html").css({overflow:""});return false}};var n=0,l=d.jqm.hash,a=[],c=(d.browser.msie&&parseInt(d.browser.version)<8),e=d('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),g=function(f){if(c){f.o&&f.o.html('<p style="width:100%;height:100%"/>').prepend(e)||(!d("iframe.jqm",f.w)[0]&&f.w.prepend(e))}h(f)},h=function(f){try{d(":input:visible",f.w)[0].focus()}catch(o){}},m=function(f){d()[f]("keypress",k)[f]("keydown",k)[f]("mousedown",k)},k=function(p){var f=l[a[a.length-1]],o=(!d(p.target).parents(".jqmID"+f.s)[0]);o&&h(f);return !o},b=function(f,p,q){var o=[];f.each(function(){o.push(this._jqm)});d(p).each(function(){if(this[q]){d.extend(this[q],o)}else{this[q]=o;d(this).click(function(){for(var r in {jqmShow:1,jqmHide:1}){for(var t in this[r]){if(l[this[r][t]]){l[this[r][t]].w[r](this)}}}return false})}});return f}})(jQuery);ATXPopup=function(){return{show:function(a,e,g,b){var d,c,f;e=$(e);f=e.offset();g=g||a.hasClass("bottom");if(!b){b={moveTop:0,moveLeft:-150}}d=f.top+b.moveTop-(g?a.height()-e.height():0);c=f.left+b.moveLeft;d=d<0?0:d;c=c<0?0:c;a.css({position:"absolute",top:d,left:c});if(b.zIndex){a.css({zIndex:b.zIndex})}a.show();$(".atoStlCancel,.StlCancel, #toolbarDropdownContainer .close").click(function(h){ATXPopup.remove(a);h.stopPropagation()});$("body").unbind("click.atxpopup").one("click.atxpopup",function(h){ATXPopup.remove(a);h.stopPropagation()});$("#curtain").unbind("mouseup.atxpopup").one("mouseup.atxpopup",function(h){ATXPopup.remove(a)});$("a.addToListBtn, #atxPopup, #atxPopup .box, img.addToList, img.addToOrder, a.addToList, a.addToOrder").click(function(h){h.stopPropagation()});$(".bmsmAtoChoose p a, .AtoChoose p a").click(function(){var h=$(this);h.toggleClass("address_expanded");h.parent().next("ul").toggle()});$(".bmsmAto a").click(function(){var h="AddToOrderAjaxView?storeId="+storeId+"&catalogId="+catalogId+"&BMSMFlag=true&BMSMQty="+bmsmQnty;$.ajax({url:h,success:fnPopulateATO})});$(".atoStlBack").click(function(){$(".bmsmChoose").toggle();$(".bmsmAtoChoose").toggle()})},add:function(a){if($("#atxPopup").length){$("#atxPopup").remove()}$("body").append(a);return $($("body")[0].lastChild)},remove:function(a){if(a){a.remove()}}}}();ATXPopupPersist=function(){return{show:function(a,e,g,b){var e=$(e),b=b||{moveTop:0,moveLeft:-150},f=e.offset(),g=g||a.hasClass("bottom"),d=Math.max(0,(f.top+b.moveTop-(g?a.height()-e.height():0))),c=Math.max(0,(f.left+b.moveLeft));a.css({position:"absolute",top:d,left:c,zIndex:b.zIndex?b.zIndex:null}).show();$(".atoStlCancel,.StlCancel, #toolbarDropdownContainer .close").bind("click",function(h){ATXPopup.remove(a);h.stopPropagation()});$("body").bind("click",function(h){var k="#"+a.attr("id");if($(h.target).is(k)||$(h.target).parents(k).length){return}ATXPopup.remove(a);h.stopPropagation();$("#qvTabModal a.qvAddToList").removeClass("qvAddToListOn");$("#qvTabModal a.qvBtnSchedule").removeClass("qvAddToListOn")});$("a.addToListBtn, #atxPopup, #atxPopup .box, img.addToList, img.addToOrder, a.addToList, a.addToOrder").bind("click",function(h){h.stopPropagation()});$(".bmsmAtoChoose p a, .AtoChoose p a").bind("click",function(){var h=$(this);h.toggleClass("address_expanded");h.parent().next("ul").toggle()});$(".bmsmAto a").bind("click",function(){var h="AddToOrderAjaxView?storeId="+storeID+"&catalogId="+catalogID+"&BMSMFlag=true&BMSMQty="+bmsmQnty;$.ajax({url:h,success:fnPopulateATO})});$(".atoStlBack").bind("click",function(){$(".bmsmChoose").toggle();$(".bmsmAtoChoose").toggle()})},add:function(a){$("#atxPopup").remove();$("body").append(a);return $($("body")[0].lastChild)},remove:function(a){if(a){a.remove()}}}}();
 /*   /opt/SVNBAAD/source/ECOM_REL_7-Dec-2011_20120104_1550_541_static/wcs-static/StaticWeb/WebContent/StaticContent/Mygofer/js/global.js:408016   */
var comapreAtc=false;var subCatAtc=false;var prodPageAtc="false";var ConsistentATC="false";var kmartspu="false";var Sears={getWindowSize:function(){var e,b,d,f;if(window.innerHeight&&window.scrollMaxY){e=document.body.scrollWidth+window.scrollMaxX;b=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){e=document.body.scrollWidth;b=document.body.scrollHeight}else{e=document.body.offsetWidth;b=document.body.offsetHeight}}if(self.innerHeight){d=self.innerWidth;f=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){d=document.documentElement.clientWidth;f=document.documentElement.clientHeight}else{if(document.body){d=document.body.clientWidth;f=document.body.clientHeight}}}if(b<f){pageHeight=f}else{pageHeight=b}if(e<d){pageWidth=d}else{pageWidth=e}return{"pageWidth":pageWidth,"pageHeight":pageHeight,"windowWidth":d,"windowHeight":f}}};var scene7Url=$("#scene7Url").val(),imagePath=$("#imagePath").val(),allRegiSS=[],storeId=10175,catalogId=27151,addToOrderDivId="",popupCount="",isInStockList="",addMessage="",verticalpos="fromtop",shopByInstore=false,intShipJspChk="false";function setStoreId(b){storeId=b;if(typeof(storeID)!="undefined"){storeID=storeId}}function tableProductClipper(){var b=document.getElementById("tableProductClipper");if(typeof(b)!="undefined"&&b!=null){b.style.width=(document.getElementById("itemTable").clientWidth>900?"100%":"400px")}}function txt_works(){var b=document.getElementById("txt_works");if(typeof(b)!="undefined"&&b!=null){b.style.width=(document.getElementById("txt_works").clientWidth>1050?"100%":"1050px")}}function getStoreId(){return storeId}function fnCategoryList(b){ksnSpuList=b}function fnVerticalList(b){ksnSpuList=b}function fnStaticMapLaunchModal(){$("#DHTMLwrap").add("#DHTMLcontent").remove();$("body").append(mapContent);launchMapModal()}function fnCheckCookie(){return $.cookie("selectedStore")?fnParseCookie():false}function fnParseCookie(){var b=$.cookie("selectedStore").split("|");unitNo=b[0];storeName=b[1];defaulted=b[2];superK=b[3];state=b[4];city=b[5];street=b[6];zipCode=b[7];selectedStoreId=b[8];return city!=null&&city.length&&state!=null&&state.length&&storeName!=null&&storeName.length}function trackClickAction(e,d,b){if(typeof s!="undefined"){s.linkTrackVars="prop12,prop10,channel,prop1,prop2,prop3,prop27,prop28";s.prop12=d;s.tl(e,"o",b)}}function getErrorMsg(){var d="";var b="";if(document.getElementById("external")!=null){if(document.getElementById("external").style.display!="none"){if(null!=$("#external").children(":first-child").html()){b=$("#external").children(":first-child").html()}else{b=document.getElementById("external").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("externalSHSIntErr")!=null){if(document.getElementById("externalSHSIntErr").style.display!="none"){if(null!=$("#externalSHSIntErr").children(":first-child").html()){b=$("#externalSHSIntErr").children(":first-child").html()}else{b=document.getElementById("externalSHSIntErr").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("individualMsg_1")!=null){if(document.getElementById("individualMsg_1").style.display!="none"){if(null!=$("#individualMsg_1").children(":first-child").html()){b=$("#individualMsg_1").children(":first-child").html()}else{b=document.getElementById("individualMsg_1").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("partial_1")!=null){if(document.getElementById("partial_1").style.display!="none"){if(null!=$("#partial_1").children(":first-child").html()){b=$("#partial_1").children(":first-child").html()}else{b=document.getElementById("partial_1").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("spuRemove_1")!=null){if(document.getElementById("spuRemove_1").style.display!="none"){if(null!=$("#spuRemove_1").children(":first-child").html()){b=$("#spuRemove_1").children(":first-child").html()}else{b=document.getElementById("spuRemove_1").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("spuShipEligible_1")!=null){if(document.getElementById("spuShipEligible_1").style.display!="none"){if(null!=$("#spuShipEligible_1").children(":first-child").html()){b=$("#spuShipEligible_1").children(":first-child").html()}else{b=document.getElementById("spuShipEligible_1").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("spuDeliveryEligible_1")!=null){if(document.getElementById("spuDeliveryEligible_1").style.display!="none"){if(null!=$("#spuDeliveryEligible").children(":first-child").html()){b=$("#spuDeliveryEligible").children(":first-child").html()}else{b=document.getElementById("spuDeliveryEligible_1").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("spuPromiseFulfill_1")!=null){if(document.getElementById("spuPromiseFulfill_1").style.display!="none"){if(null!=$("#spuPromiseFulfill_1").children(":first-child").html()){b=$("#spuPromiseFulfill_1").children(":first-child").html()}else{b=document.getElementById("spuPromiseFulfill_1").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("SPU_1")!=null){if(document.getElementById("SPU_1").style.display!="none"){if(null!=$("#SPU_1").children(":first-child").html()){b=$("#SPU_1").children(":first-child").html()}else{b=document.getElementById("SPU_1").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("couponErrorDiv")!=null){if(document.getElementById("couponErrorDiv").style.display!="none"){if(null!=$("#couponErrorDiv").children(":first-child").html()){b=$("#couponErrorDiv").children(":first-child").html()}else{b=document.getElementById("couponErrorDiv").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("rewardsErrorDiv")!=null){if(document.getElementById("rewardsErrorDiv").style.display!="none"){if(null!=$("#rewardsErrorDiv").children(":first-child").html()){b=$("#rewardsErrorDiv").children(":first-child").html()}else{b=document.getElementById("rewardsErrorDiv").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("errorMsg")!=null){if(document.getElementById("errorMsg").style.display!="none"){if(null!=$("#errorMsg").children(":first-child").html()){b=$("#errorMsg").children(":first-child").html()}else{b=document.getElementById("errorMsg").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}if(document.getElementById("error")!=null){if(document.getElementById("error").style.display!="none"){if(null!=$("#error").children(":first-child").html()){b=$("#error").children(":first-child").html()}else{b=document.getElementById("error").innerHTML}b=trim(b);b=b.substring(0,155);b=rtrim(b);if(d!=""){d=d+","+b}else{d=b}}}return d}function trackErrorMessages(){if(typeof omAcct!="undefined"&&omAcct!=null&&omAcct!="undefined"&&typeof s_gi!="undefined"){var d=s_gi(omAcct);d.linkTrackVars="prop20,channel,prop1,prop2,prop3,prop27,prop28";var b="";var e="";if(document.getElementById("errorMsg")!=null){if(document.getElementById("errorMsg").style.display!="none"){if(null!=$("#errorMsg").children(":first-child").html()){e=$("#errorMsg").children(":first-child").html()}else{e=document.getElementById("errorMsg").innerHTML}e=trim(e);e=e.substring(0,155);e=rtrim(e);if(b!=""){b=b+","+e}else{b=e}}}if(document.getElementById("zipError")!=null){if(document.getElementById("zipError").style.display!="none"){if(null!=$("#zipError").children(":first-child").html()){e=$("#zipError").children(":first-child").html()}else{e=document.getElementById("errorMsg").innerHTML}e=trim(e);
e=e.substring(0,155);e=rtrim(e);if(b!=""){b=b+","+e}else{b=e}}}if(document.getElementById("couponErrorDiv")!=null){if(document.getElementById("couponErrorDiv").style.display!="none"){if(null!=$("#couponErrorDiv").children(":first-child").html()){e=$("#couponErrorDiv").children(":first-child").html()}else{e=document.getElementById("couponErrorDiv").innerHTML}e=trim(e);e=e.substring(0,155);e=rtrim(e);if(b!=""){b=b+","+e}else{b=e}}}if(document.getElementById("rewardsErrorDiv")!=null){if(document.getElementById("rewardsErrorDiv").style.display!="none"){if(null!=$("#rewardsErrorDiv").children(":first-child").html()){e=$("#rewardsErrorDiv").children(":first-child").html()}else{e=document.getElementById("rewardsErrorDiv").innerHTML}e=trim(e);e=e.substring(0,155);e=rtrim(e);if(b!=""){b=b+","+e}else{b=e}}}if(document.getElementById("error")!=null){if(document.getElementById("error").style.display!="none"){if(null!=$("#error").children(":first-child").html()){e=$("#error").children(":first-child").html()}else{e=document.getElementById("error").innerHTML}e=trim(e);e=e.substring(0,155);e=rtrim(e);if(b!=""){b=b+","+e}else{b=e}}}d.prop20=b;if(b!=""){d.tl("-","o","Checkout Error")}}}function selectedStore(b){var d=(typeof b.selectedStoreId!="undefined"&&b.selectedStoreId!=null)?b.selectedStoreId:"";var f=b.unitNo+"|"+b.storeName+"|"+b.defaulted+"|"+b.superK+"|"+b.state+"|"+b.city+"|"+b.street+"|"+b.zip+"|"+d;if(storeId==10175){f=f+"|"+b.ps+"|"+b.dMode}var e=getCookieWrapper("searchPreferences");if(e.unitNo==null){e.unitNo=b.unitNo;e.options.expires=31;commitCookieWrapperChanges(e)}else{if(e.unitNo!=b.unitNo){e.unitNo=b.unitNo;e.options.expires=31;commitCookieWrapperChanges(e)}}$.cookie("selectedStore",f,{expires:360});if(typeof newHomePage!="undefined"&&newHomePage=="ON"){if(typeof redirectFlag!="undefined"&&redirectFlag!=true){updateHPRHeader()}}else{displayTime();updateHeader()}}function setCatalogId(b){catalogId=b}function getCatalogId(){return catalogId}function rObj(b){var d=document.getElementById(b);return d}function disObjBlk(d,b){if(typeof d=="object"&&d!=null){if(b){d.style.display="block"}else{d.style.display="none"}}}function checkEmailChar(d){var b=d.length;for(iLoop=0;iLoop<b;iLoop++){if((d.charCodeAt(iLoop)>=33&&d.charCodeAt(iLoop)<=41)||(d.charCodeAt(iLoop)>=58&&d.charCodeAt(iLoop)<=63)){return false}}return true}var zipCode="";function doAjax(d,k){zipCode=d;var j="CalculateRegionalSaveStoryCmd";var l=window.location.protocol;if(l=="http:"||l==""){j="CalculateRegionalSaveStoryCmdhttp"}var f="";var m="";var g;$.cookie("zipCode",zipCode);var b="";if(typeof allRegiSS!="undefined"){for(var e=0;e<allRegiSS.length;e++){if(allRegiSS[e].regiSSInd){var g=allRegiSS[e].pn;if(!allRegiSS[e].regiIBType){g=allRegiSS[e].pn.substring(0,11)}if(f.search(g)==-1){f+=g+"|";m+=allRegiSS[e].ss+"|"}}}}request=$.post(j+"?storeId="+k+"&zipCode="+zipCode+"&partNumberList="+f,{saveStoryList:m},showResponse)}function showResponse(respHTML){var _Rp=eval("("+respHTML+")");var fpr="";if(typeof allRegiSS!="undefined"){if(_Rp.errorCode=="STORE_FOUND"){for(var i=0;i<allRegiSS.length;i++){if(allRegiSS[i].regiSSInd){var partNum=allRegiSS[i].pn;for(var k=0;k<_Rp.prodCount;k++){if(_Rp.price[k].pId==allRegiSS[i].pn||_Rp.price[k].pId==allRegiSS[i].pn.substring(0,11)){if(_Rp.price[k].isException){populatePrice(_Rp.price[k].saveStory,allRegiSS[i].pn,"Price May Vary",allRegiSS[i].regiIBType)}else{populatePrice(_Rp.price[k].saveStory,allRegiSS[i].pn,"Price in "+zipCode,allRegiSS[i].regiIBType)}break}}}else{populatePrice(allRegiSS[i].ss,allRegiSS[i].pn,"Price in "+zipCode,allRegiSS[i].regiIBType)}}}else{for(var kk=0;kk<allRegiSS.length;kk++){if(allRegiSS[kk].regiSSInd){populatePrice(allRegiSS[kk].ss,allRegiSS[kk].pn,"Price May Vary",allRegiSS[kk].regiIBType)}else{populatePrice(allRegiSS[kk].ss,allRegiSS[kk].pn,"Price in "+zipCode,allRegiSS[kk].regiIBType)}}}}populateStoreInfo(_Rp);if(window.afterRegiSS){afterRegiSS()}}function populateStoreInfo(b){if(b.errorCode=="STORE_FOUND"){var e=b.storePhone;if(e!=""){e="("+b.storePhone.substring(0,3)+") "+b.storePhone.substring(3,6)+"-"+b.storePhone.substring(6,10)}var d="<strong>Nearest Sears Auto Center</strong><br/>"+b.storeName+"<br/>"+e;$("p.centerInfo").html(d)}}function populatePrice(f,e,j,b){var g=f.split("^"),d=$("div#ss_"+e);d.find("a").text(j);d.find("div.saveStoryText").html(g[0])}function BVcheckLoadStateRdNew(){if(!BVisLoaded){rObj("BVFrame").src="";var b=rObj("BVFrame").src;rObj("BVFrame").src=rvInfo;rObj("BVReviewsContainer").innerHTML="Product Reviews Currently Unavailable"}}function addLoadEvent(b){var d=window.onload;if(typeof window.onload!="function"){window.onload=b}else{window.onload=function(){if(d){d()}b()}}}function findPosExact(b){xPos=yPos=0;if(typeof b!="undefined"||typeof b!="null"){if(b.offsetParent){xPos=b.offsetLeft;yPos=b.offsetTop;while(b=b.offsetParent){xPos+=b.offsetLeft;yPos+=b.offsetTop}}}if($.browser.msie&&parseInt($.browser.version,10)==7){xPos=xPos-$("div.col_2").css("margin-left").replace("px","")}return[xPos,yPos]}function findPos(b){xPos=yPos=0;if(typeof b!="undefined"){if(b.offsetParent){xPos=b.offsetLeft;yPos=b.offsetTop;while(b=b.offsetParent){xPos+=b.offsetLeft;yPos+=b.offsetTop}}}xPos+=20;yPos+=20;return[xPos,yPos]}function findPosX(b){var d=0;if(typeof b!="undefined"&&typeof b!="null"){if(b.offsetParent){while(b.offsetParent){d+=b.offsetLeft;b=b.offsetParent}}else{if(b.x){d+=b.x}}}return d}function findPosY(d){var b=0;if(typeof d!="undefined"&&typeof d!="null"){if(d.offsetParent){while(d.offsetParent){b+=d.offsetTop;d=d.offsetParent}}else{if(d.y){b+=d.y}}}return b}function prepareLinks(k,e,j){var d=document.getElementById(k).getElementsByTagName(e);var g=function(){print()};var b=function(){shippingCalculator(k)};for(var f=0;f<d.length;f++){if(d[f].className==j&&j=="print"){d[f].onclick=g}if(d[f].className==j&&j=="shippingCal"){d[f].onclick=b}}flyOut()}window.onresize=flyOut;function flyOut(){var d,f,g=$("#nav");var e=function(){var j=this.childNodes[2];this.className+=" over";if(j!=undefined&&j.offsetHeight>d){j.style.overflow="auto";j.style.height=d+"px"}};var b=function(){this.className=this.className.replace("over","")};if(g.length){if(this.innerHeight){d=(this.innerHeight)+window.pageYOffset-250}else{if(document.body){d=(document.body.clientHeight)+document.body.scrollTop-250}}for(i=0,len=g[0].childNodes.length;i<len;i++){f=g[0].childNodes[i];if(f.nodeName=="LI"){f.onmouseover=e;f.onmouseout=b}}}}function showTab(e,f){var j=document.getElementById("tabList");var b=j.getElementsByTagName("dd").length;for(var g=1;g<b+1;g++){if(document.getElementById("tab_"+g).className=="selected"){tabHide=document.getElementById("tab_"+g);tabHide.className="unselected"}if(document.getElementById("tab"+g)){document.getElementById("tab"+g).style.display="none"}}tabHide=document.getElementById("tab_"+e);tabHide.className="selected";document.getElementById("tab"+e).style.display="";selectOverview(e-1);if(f!=null){if(e==2){$.ajax({url:f,success:displayTabContent.createDelegate(this,[tab2],true)})}if(e==3){$.ajax({url:f,success:displayTabContent.createDelegate(this,[tab3],true)})}}}function showSearchTab(e){var g=document.getElementById("tabList");var b=g.getElementsByTagName("dd").length;for(var f=1;f<b+1;f++){if(document.getElementById("tab_"+f).className=="selected"){tabHide=document.getElementById("tab_"+f);tabHide.className="unselected"}document.getElementById("tab"+f).style.display="none"}tabHide=document.getElementById("tab_"+e);tabHide.className="selected";document.getElementById("tab"+e).style.display="";selectOverview(e-1)}function selectOverview(e){if(document.getElementById("overviewBox")){var g=document.getElementById("overviewBox");var b=g.getElementsByTagName("li");for(var f=0;f<b.length;f++){if(b[f].className=="selected"){b[f].className=""}}b[e].className="selected"}}function showBox(b){$("#"+b).show();return true}function hideBox(b){$("#"+b).hide();return true}function showHideLite(b){$("#"+b).toggle()}function showHideSelect(m,l){var d=document.getElementById(m);
var k=d.getElementsByTagName("option");for(var e=0;e<k.length;e++){var f=k[e].value;var b=document.getElementById(f);if(b){b.style.display="none"}}var g=document.getElementById(l);if(g){g.style.display=""}}function checkAll(d,e){var b=document.getElementsByTagName("input");for(z=0;z<b.length;z++){if(b[z].type=="checkbox"&&b[z].name==e){b[z].checked=d.checked}}}function disableSelect(){$("select").attr("disabled",true)}function enableSelect(){$("select").attr("disabled",false)}function gup(d){d=d.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b="[\\?&]"+d+"=([^&#]*)";var f=new RegExp(b);var e=f.exec(window.location.href);if(e==null){return""}else{return e[1]}}function showCell(d){var f=document.getElementsByTagName("tr");for(var e=0;e<f.length;e++){if(f[e].getAttribute("hiding")==d){f[e].style.display=""}}}function hideCell(d){var f=document.getElementsByTagName("tr");for(var e=0;e<f.length;e++){if(f[e].getAttribute("hiding")==d){f[e].style.display="none"}}}function collapse(e,d){if(document.getElementById(e).className=="hideAtt"){hideCell(d);tableHide=document.getElementById(e);tableHide.className="showAtt";tableHide.innerHTML='<a href="javascript:;" onClick="collapse(\''+e+"','"+d+'\');" title="Click here to See Details">See Details</a>';e=e+"_on"}else{if(e+"_on"){showCell(d);tableHide=document.getElementById(e);tableHide.className="hideAtt";tableHide.innerHTML='<a href="javascript:;" onClick="collapse(\''+e+"','"+d+'\');" title="Click here to Hide Details">Hide Details</a>';e=e+"_off"}}}function changeView(b,d){for(i=0;(a=document.getElementsByTagName("link")[i]);i++){if(a.getAttribute("rel").indexOf("style")!=-1&&a.getAttribute("title")){a.disabled=true;if(a.getAttribute("title")==b){a.disabled=false}}}if(b=="row"){c=document.getElementById(d);c.innerHTML='<img onclick="changeView(\'grid\',\'changeButton\');" src="images/icons/switch_grid.gif" alt="switch to grid layout" width="25" height="23" border="0" align="absmiddle">'}else{if(b=="grid"){c=document.getElementById(d);c.innerHTML='<img onclick="changeView(\'row\',\'changeButton\');" src="images/icons/switch_row.gif" alt="switch to row layout" width="25" height="23" border="0" align="absmiddle">'}}}function removeID(b){$("#"+b).remove()}function remove(d){var b=d.parentNode;b.removeChild(d)}addLoadEvent(function(){if(document.getElementById("subcategory")&&document.getElementById("changeButton")){var b=document.getElementById("contentWrapper");if(b.className=="row"){b.className="grid";Switch.row();Switch.buttons("grid")}else{if(b.className=="grid"){b.className="row";Switch.grid();Switch.buttons("row")}}}if(document.getElementById("crumbWrapper")&&document.getElementById("crumbWrapper").getElementsByTagName("li")){prepareLinks("crumbWrapper","li","print");prepareLinks("crumbWrapper","li","sendFriend")}if(document.getElementById("contentWrapper")){prepareLinks("contentWrapper","a","shippingCal")}if(document.getElementById("nav")){prepareLinks("nav","li","")}if(document.getElementById("scroll_widget")){initScrollWidget()}if(document.getElementById("overviewBox")){showTab(1)}if(document.getElementById("allLeft")){changeCompareWidth()}if(document.getElementById("address")){autoPopAddress()}if(document.getElementById("payType")){autoPopPayType()}if(typeof bodyIdKey!="undefined"&&bodyIdKey!="ORDER_CENTER"){if(document.getElementById("cardType")){if(typeof showCardType!="undefined"){showCardType()}}}});var h="";function timeOutNav(d){var b="hideBox('d"+d+"')";h=setTimeout(b,500)}function timeOutNavBargainista(d){var b="hideBox('f"+d+"')";h=setTimeout(b,500)}function timeOutNavECoupon(d){var b="hideBox('e"+d+"')";h=setTimeout(b,500)}function dropNav(e,d){var b=d;for(var f=1;f<b+1;f++){document.getElementById("d"+f).style.display="none";document.getElementById("c"+f).style.position="static"}document.getElementById("d"+e).style.display="block";document.getElementById("c"+e).style.position="relative";document.getElementById("content").style.zIndex=10}function dropNavClearance(e,d){var b=d;for(var f=1;f<b+1;f++){document.getElementById("f"+f).style.display="none";document.getElementById("fl"+f).style.position="static"}document.getElementById("f"+e).style.display="block";document.getElementById("fl"+e).style.position="relative";if($("#contentWrapper").length){document.getElementById("contentWrapper").style.zIndex=10}}function dropNavECoupon(e,d){var b=d;for(var f=1;f<b+1;f++){document.getElementById("e"+f).style.display="none";document.getElementById("el"+f).style.position="static"}document.getElementById("e"+e).style.display="block";document.getElementById("el"+e).style.position="relative";if($("#contentWrapper").length){document.getElementById("contentWrapper").style.zIndex=10}}function divFloat(f,e){var b=document.getElementById(f);var d=document.getElementById("iCover");if(e){b.style.display="block";d.style.width=b.offsetWidth;d.style.height=b.offsetHeight-2;d.style.top=b.style.top;d.style.left=b.style.left;d.style.zIndex=b.style.zIndex-1;d.style.display="block"}else{b.style.display="none";d.style.display="none"}document.getElementById("contentWrapper").style.position="static";document.getElementById("footer").style.position="static"}function JSFX_FloatTopDiv(){var f=(navigator.appName.indexOf("Netscape")!=-1);var e=690;var b=(document.all)?100:120;if(document.getElementById("checkout-shipping")){var b=(document.all)?135:120}var g=document;function j(k){var d=g.getElementById?g.getElementById(k):g.all?g.all[k]:g.layers[k];if(g.layers){d.style=d}d.sP=function(l,m){this.style.left=l;this.style.top=m};d.x=e;if(verticalpos=="fromtop"){d.y=b}else{d.y=f?pageYOffset+innerHeight:document.body.scrollTop+document.body.clientHeight;d.y-=b}return d}window.stayTopLeft=function(){if(verticalpos=="fromtop"){var d=f?pageYOffset:document.body.scrollTop;ftlObj.y+=(d+b-ftlObj.y)/8}else{var d=f?pageYOffset+innerHeight:document.body.scrollTop+document.body.clientHeight;ftlObj.y+=(d-b-ftlObj.y)/8}var l=(document.body.clientWidth<=800)?590:ftlObj.x+((document.body.clientWidth/2)-ftlObj.x)+188;var k=(document.body.scrollTop<b)?b:ftlObj.y-b+10;ftlObj.sP(l,k);setTimeout(stayTopLeft,10)};ftlObj=j("rightColWrapper");g.getElementById("rightColWrapper").style.display="block";stayTopLeft()}function changeCompareWidth(){var d=document.getElementById("compareTable");var b=document.getElementById("all");var e=document.getElementById("allLeft");if(b.offsetWidth<d.offsetWidth){b.style.width=(d.offsetWidth+50)+"px";if($.browser.msie){e.style.padding="10px";return}}else{if(b.offsetWidth>=d.offsetWidth){b.style.width="800px";if($.browser.msie){e.style.padding="10px";return}}}}function autoPopAddress(){var b=document.getElementById("address");b.onchange=function(){if(this.value=="lana"){document.checkoutForm.firstname.value="Lana";document.checkoutForm.lastname.value="Lane";document.checkoutForm.address1.value="1234 Smith Street";document.checkoutForm.city.value="Metropolis";document.checkoutForm.state.selectedIndex=1;document.checkoutForm.zip1.value="60179";document.checkoutForm.zip2.value="0000";document.checkoutForm.day1.value="847";document.checkoutForm.day2.value="286";document.checkoutForm.day3.value="3194";document.checkoutForm.ext.value="123";document.checkoutForm.eve1.value="847";document.checkoutForm.eve2.value="286";document.checkoutForm.eve3.value="1234";document.checkoutForm.ext2.value="123";document.checkoutForm.email.value="llang2@searshc.com"}else{document.checkoutForm.firstname.value="";document.checkoutForm.lastname.value="";document.checkoutForm.address1.value="";document.checkoutForm.city.value="";document.checkoutForm.state.selectedIndex=0;document.checkoutForm.zip1.value="";document.checkoutForm.zip2.value="";document.checkoutForm.day1.value="";document.checkoutForm.day2.value="";document.checkoutForm.day3.value="";document.checkoutForm.ext.value="";document.checkoutForm.eve1.value="";document.checkoutForm.eve2.value="";document.checkoutForm.eve3.value="";document.checkoutForm.ext2.value="";document.checkoutForm.email.value=""
}}}function submitEmail(){var g=document.emailNotify,f=g.userEmail.value,k=g.partNumber.value,e=g.catEntryId.value,b=g.skuDiff.value,m=g.brandName.value,l=g.productDescription.value,d=g.searsItemNumber.value,j=g.manufacturerPartNumber.value;$.cookie("userEmail1",f);if(f==""){alert("Email address is required");return false}if(validateEmailAddress(f)){$.ajax({url:"EmailMeWhenInStockCmd",data:"userEmail="+f+"&catEntryId="+e+"&skuDiff="+b+"&brandName="+m+"&productDescription="+l+"&searsItemNumber="+d+"&manufacturerPartNumber="+j,success:showEmailMe})}else{return false}return true}function submitFinish(){var b=document.sendToFriendForm.visitorName.value;var n=document.sendToFriendForm.visitorEmail.value;var q=document.sendToFriendForm.friendsEmail.value;var e=document.sendToFriendForm.message.value;var p=top.location.href;document.sendToFriendForm.url.value=p;if(!(/^[a-zA-Z \.]/.test(b))){return false}if(n==""||q==""){alert("Email address is required");return false}if(!validateEmailAddress(n.toLowerCase(),n)){return false}var l=q.split(";");var m;for(m=0;m<l.length;m++){var g=l[m];if(!validateEmailAddress(g.toLowerCase(),g)){return false}}if((e.length>200)){alert("Message exceeds 200 characters");return false}var p=top.location.href;var k=p.replace(/&/g,"*");var o=document.sendToFriendForm.visitorName.value;var f=document.sendToFriendForm.visitorEmail.value;var j=document.sendToFriendForm.friendsEmail.value;var r=document.sendToFriendForm.message.value;$.cookie("userEmail",f);var d=document.sendToFriendForm.storeValue.value;$.ajax({url:"/shc/s/SendToAFriendCmd",data:"storeId="+d+"&visitorName="+o+"&visitorEmail="+f+"&friendsEmail="+j+"&message="+r+"&url="+k,success:showSendToFriend});return true}function ajaxCall(url,callbackFunction,returnData,linkId){var httpRequest=false;if(!isHttpRequestSupported()){return}httpRequest=isHttpRequestSupported();if(!httpRequest){httpRequestSupported=false;return false}httpRequest.onreadystatechange=function(){if(httpRequest.readyState==4){if(httpRequest.status==200){if(returnData){eval(callbackFunction+"(httpRequest.responseXML,linkId)")}else{eval(callbackFunction+"(httpRequest.responseText,linkId)")}}else{eval(callbackFunction+'("")')}}else{if(callbackFunction=="displayTabContent"){htmlValue="<img src= '"+imagePath+"img/backgrounds/loading.gif' />";document.getElementById(linkId).innerHTML=htmlValue}if(callbackFunction=="browseSpecialOffer"){htmlValue="<img src= '"+imagePath+"img/backgrounds/loading.gif' />";linkId.innerHTML=htmlValue}if(callbackFunction=="loadingProductOptions"){htmlValue="<h4>Options and Services</h4><img src='"+imagePath+"img/backgrounds/loading.gif' />";document.getElementById(linkId).innerHTML=htmlValue}}};httpRequest.open("GET",url,true);httpRequest.send(null)}function ajaxCallPost(url,params,callbackFunction,returnData,linkId){var ajaxReq=isHttpRequestSupported();if(!ajaxReq){return false}ajaxReq.onreadystatechange=function(){if(ajaxReq.readyState==4){if(ajaxReq.status==200){if(returnData){eval(callbackFunction+"(httpRequest.responseXML,linkId)")}else{if(linkId){eval(callbackFunction+"(httpRequest.responseText,linkId)")}}}else{eval(callbackFunction+'("")')}}};ajaxReq.open("POST",url,true);ajaxReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");ajaxReq.setRequestHeader("Content-length",params.length);ajaxReq.setRequestHeader("Connection","close");ajaxReq.send(params)}var httpRequestSupported;function isHttpRequestSupported(){if(window.XMLHttpRequest){httpRequest=new XMLHttpRequest();if(httpRequest.overrideMimeType){httpRequest.overrideMimeType("text/xml")}}else{if(window.ActiveXObject){try{httpRequest=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{httpRequest=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}}}if(!httpRequest){httpRequestSupported=false}return httpRequest}function compareRecentlyViewed(){var e=$(".popUpLayer .products_list"),l=$("#prodCount").val(),g=e.find(".product_listing .checkbox input:checked").length,b=0,f,k;if(g<2){alert("You must check at least 2 items to compare.")}else{k=e.find('form[name="tempform"]');for(var d=1;d<=l;d++){if(e.find("input#partNum"+d).is(":checked")){b++;f=e.find("input#partNum"+d).val();k.append('<input type="hidden" id="partNumber_'+b+'" name="partNumber_'+b+'" value="'+f+'">')}}k.find('input[name="prodCount"]').val(g);k.submit()}}function uncheckAndSubmit(){for(var d=1,b=$("#prodCount").val();d<=b;d++){$("#partNum"+d).attr("checked",false)}$("#recentlyView #compare").submit()}function goToDynamicCategory(){var b=document.HeaderForm;location.href="BrowseDynamicCategoryCmd?langId="+b.langId.value+"&storeId="+b.storeId.value+"&catalogId="+b.catalogId.value+"&sName=Clothing"}function goToVertical(b){var d=document.HeaderForm;location.href="BrowseVertical?langId="+d.langId.value+"&storeId="+d.storeId.value+"&catalogId="+d.catalogId.value+"&vName="+b}function goToPharmacy(){var b=document.HeaderForm;location.href="PharmacyPageView?langId="+b.langId.value+"&storeId="+b.storeId.value+"&catalogId="+b.catalogId.value}function goToMyProfile(){var b=document.HeaderForm;location.href="MyProfileView?langId="+b.langId.value+"&storeId="+b.storeId.value+"&catalogId="+b.catalogId.value}function hideTabs(e){var g=document.getElementById("tabList");var b=g.getElementsByTagName("dt").length;for(var f=1;f<b+1;f++){if(document.getElementById("tab_"+f).className=="selected"){tabHide=document.getElementById("tab_"+f);tabHide.className="unselected"}document.getElementById("tab"+f).style.display="none"}tabHide=document.getElementById("tab_"+e);tabHide.className="selected";document.getElementById("tab"+e).style.display=""}function changeDisplayStyle(d){if(document.getElementById("selectList")!=null){var b=document.getElementById("selectList").selectedIndex;$("#row0").hide();b++;var f=$("#row"+b).show();for(var e=1;e<=rowNum;e++){if(b!=e){$("#row"+e).hide()}}return true}}function selectThis(b,k,e){var n=b+""+k+"_radio";var q=b+""+k;var o=e+"_spanTable";var p=document.getElementById(o);var d=document.getElementById(n);var u=document.getElementById(q);var j=document.getElementById("linkToContinue");if(p&&d&&u){var t=p.getElementsByTagName("tr");d.checked=true;for(var g=0;g<t.length;g++){t[g].className=""}u.className="selected"}var l=e+"_span";var f=document.getElementById(l);var m=document.getElementById("shoppingButton");if(b!=="showTable"){f.style.display="";p.style.display="none";m.innerHTML='<a href=""><img src="images/buttons/shoppingcart_red.gif" alt="Shopping Cart" height="32" width="142" align="middle"></a>';j.disabled=false}else{f.style.display="none";p.style.display=""}var r=document.getElementById("msg"+e);switch(k){case 1:r.innerHTML="Yes, I do want Smart Plan [added <b>$199.99</b>]";break;case 2:r.innerHTML="No thank you, I do not want Smart Plan";break;default:r.innerHTML="<b>Do you want Smart Plan?</b><br>\n Consider safeguarding your purchase against unexpected repairs with a Smart Plan."}return true}function hoverTR(j,e){var d=j+""+e+"_radio";var b=j+""+e;var f=document.getElementById(d);var g=document.getElementById(b);if(f&&g){if(!f.checked){g.className="selected"}}return true}function outTR(k,f){var b=null;var e=k+""+f+"_radio";var d=k+""+f;var g=document.getElementById(e);var j=document.getElementById(d);if(g&&j){if(g.checked){j.className="selected"}else{j.className=""}if(g.checked){b=g}}return b}function showHide(f,l,j,p){var m=f+"_"+l+"_"+j+"_"+p;var q=f+"_"+l+"_"+j+"_table";var o=document.getElementById(m);var k=document.getElementById(q);if(document.getElementById(m)){if(o.className=="open"){o.className="close";k.style.display="block";if(p=="option"){var n=f+"_"+l+"_"+j+"_style";var e=document.getElementById(n);var g=f+"_"+l+"_"+j+"_tablefilled";var b=document.getElementById(g);switch(j){case"giftwrap":e.style.display="block";b.style.display="none";o.innerHTML="Hide Options";break}}}else{o.className="open";k.style.display="none";if(p=="option"){var n=f+"_"+l+"_"+j+"_style";var e=document.getElementById(n);var g=f+"_"+l+"_"+j+"_tablefilled";
var b=document.getElementById(g);switch(j){case"giftwrap":e.style.display="none";b.style.display="block";o.innerHTML="Hide Options";break}}}}}function checkLocation(){if($.browser.msie&&parseInt($.browser.version,10)==6){rightColWrapper.style.pixelTop=document.body.scrollTop+135}else{document.getElementById("rightColWrapper").style.top=(window.pageYOffset+135)+"px"}setTimeout(checkLocation,500)}function openPopUpForSecurityCode(b){window.open(b,"SecurityCode","location=no,resizable=yes,scrollbars=yes,toolbar=yes,toolbar=no,status=no,menubar=0")}function popUpWin(d,e,b){var f=window.open(d,"NewWindow","width="+e+",height="+b+",status=no,scrollbars=yes,resizable=yes,directories=no,menubar=no,toolbar=no,location=no");f.focus()}function toggle(b){$("#"+b).toggle()}function omnitureTracking(b){if(typeof omPrefix!="undefined"){omPrefix="Product Summary > "+b}if(typeof s!="undefined"){s.t()}}function trackReviews(d,b){if(typeof s!="undefined"){s.linkTrackVars="prop12,prop10,channel,prop1,prop2,prop3,prop19,prop27,prop28,events,products";s.linkTrackEvents="event16";s.prop12=b;s.events="event16";s.products=d;s.tl(true,"o",b)}if(storeId==10175){$("#customerReviews").siblings().removeClass("prodTabsShown");$("#customerReviews").addClass("prodTabsShown");$("#customerReviewsTab").siblings().removeClass("prodTabsAct");$("#customerReviewsTab").addClass("prodTabsAct")}}function sendToFriend(d,e){omnitureTracking("sendToFriend");$.ajax({url:d,success:function b(g){var f=g.split("%#%");send2friend("crumbWrapper",f)}})}function hideShowSidebar(){var d=document.getElementById("sideBar");if(!d){return false}var e=d.getElementsByTagName("div");var b=document.getElementById("toggle");if($.browser.msie){b.style.height=b.parentNode.offsetHeight+10+"px"}else{b.style.height=b.parentNode.offsetHeight+30+"px"}e[1].style.height=b.offsetHeight-5+"px";b.className="open";b.onclick=function(){d.className=d.className==""?"closed":"";return false}}function pageDims(){var b={};if($.browser.msie){if($.boxmodel){b.w=document.documentElement.clientWidth;b.h=document.documentElement.clientHeight;b.s=document.documentElement.scrollTop}else{b.w=document.body.clientWidth;b.h=document.body.clientHeight;b.s=document.body.scrollTop}}else{b.w=window.innerWidth;b.h=window.innerHeight;b.s=window.pageYOffset}return b}function curtainOverlay(j){if(!j.closing){if(!j){j={};j.elm="body";j.trans="0.8";j.color="#333";j.closing=false;j.ajaxclass="";j.ajaxmodal=false;j.closeonclick=true;j.persistmodal=false;j.fade=true}if(!j.elm){j.elm="body"}if(!j.trans){j.trans="0.8"}if(!j.color){j.color="#333"}if(!j.ajaxclass){j.ajaxclass=""}if(j.ajaxmodal!=false){j.ajaxmodal=true}if(j.closeonclick!=false){j.closeonclick=true}if(j.persistmodal!=false){j.persistmodal=true}if(j.fade!=false){j.fade=true}}if(j.fade){$.fn.inmode=$.fn.fadeIn;$.fn.outmode=$.fn.fadeOut;var g=1000}else{$.fn.inmode=$.fn.show;$.fn.outmode=$.fn.hide;var g=0}$("#curtain").remove();if(j.persistmodal){$("#ajaxmodal").hide()}else{$("#ajaxmodal").remove()}if(j.closing){if($.browser.msie){$("body").css({overflow:""})}else{$("html").css({overflow:""})}}var b=0;var f=0;var e=0;if(!j.closing){if($(j.elm).is("body")){if($.browser.msie){$("body").css({overflow:"hidden"});if($.boxmodel){b=document.documentElement.clientWidth;f=document.documentElement.clientHeight;e=document.documentElement.scrollTop}else{b=document.body.clientWidth;f=document.body.clientHeight;e=document.body.scrollTop}}else{$("html").css({overflow:"hidden"});b=window.innerWidth;f=window.innerHeight;e=window.pageYOffset}}else{b=$(j.elm).width();f=$(j.elm).height();e=$(j.elm).offset().top}var d=$('<div id="curtain"/>').css({position:"absolute",display:"none",zIndex:500,top:e,left:$(j.elm).offset().left,width:b,height:f,background:j.color,opacity:j.trans}).appendTo("body");if($.browser.msie){d.css({filter:"alpha(opacity="+(j.trans*100)+")"}).show()}else{d.show()}if(j.ajaxmodal){if(j.persistmodal){if($("#ajaxmodal").length){$("#ajaxmodal").fadeIn(1000)}else{$("#ajaxmodal").remove();$('<div id="ajaxmodal" class="'+j.ajaxclass+'"/>').css({display:"none",position:"absolute",zIndex:"7800",backgroundColor:"#FFF",padding:"10px"}).insertAfter("#curtain").inmode(g)}}else{$("#ajaxmodal").remove();$('<div id="ajaxmodal" class="'+j.ajaxclass+'"/>').css({display:"none",position:"absolute",zIndex:"7800",backgroundColor:"#FFF",padding:"10px"}).insertAfter("#curtain").outmode(g)}}if(j.closeonclick){d.unbind().click(function(){curtainOverlay({closing:true})})}}}var dynpop={ini:function(k,d,b){$("#DHTMLwrap").add("#DHTMLcontent").remove();var l;var j;imagePath=$("#imagePath").val();var n='<div id="DHTMLwrap"></div><div id="DHTMLcontent"></div>';var m=Number(d.windowHeight.split("px")[0]);var f=Number(d.windowWidth.split("px")[0]);var g=pageDims();var l=g.w+20;var j=g.h;var o=g.s;if($.browser.msie){if(d.contentname=="#storeSelect"){$("#header").append(n)}else{$("body").append(n);$("#DHTMLcontent").empty().append('<a href="javascript:;" title="Close Window" class="closeWin"></a>');$(".closeWin").css({height:"12px",width:"48px",position:"absolute",top:"5px",right:"5px",background:"url("+imagePath+"img/close-pref.gif) no-repeat",zIndex:"999999"});$("#DHTMLwrap").bgiframe();$("#DHTMLwrap").css({position:"absolute",top:(k.pageY+m>(j+o))?(k.pageY-(((k.pageY+m)-(j+o)))*1.3):k.pageY,left:k.pageX+f>(l-55)?k.pageX-((k.pageX+f)-l)-55:k.pageX,zIndex:"9995",backgroundColor:"#00457c",display:"none"});$("#DHTMLcontent").css({position:"absolute",top:(k.pageY+m>(j+o))?(k.pageY-((((k.pageY+m)-(j+o)))*1.3)+5):k.pageY+5,left:(k.pageX+f>(l-50))?k.pageX-((k.pageX+f)-l)-50:k.pageX+5,backgroundColor:"#fff",zIndex:"9996",display:"none"})}}else{if(d.contentname=="#storeSelect"){$("#header").append(n)}else{$("body").append(n);$("#DHTMLcontent").empty().append('<a href="javascript:;" title="Close Window" class="closeWin"></a>');$(".closeWin").css({height:"12px",width:"48px",position:"absolute",top:"5px",right:"5px",background:"url("+imagePath+"img/close-pref.gif) no-repeat",zIndex:"999999"});$("#DHTMLwrap").css({position:"absolute",top:(k.pageY+m>(j+o))?(k.pageY-(((k.pageY+m)-(j+o)))*1.3):k.pageY,left:k.pageX+f>(l-75)?(k.pageX-((k.pageX+f)-l))-75:k.pageX,zIndex:"9995",backgroundColor:"#00457c",display:"none"});$("#DHTMLcontent").css({position:"absolute",top:(k.pageY+m>(j+o))?(k.pageY-((((k.pageY+m)-(j+o)))*1.3)+5):k.pageY+5,left:k.pageX+f>(l-70)?(k.pageX-((k.pageX+f)-l))-70:k.pageX+5,backgroundColor:"#fff",zIndex:"9996",display:"none"})}}if(d.dynamicContent){if(d.jsonFlag){$.getSearsCode=$.getJSON}else{$.getSearsCode=$.ajax}$.getSearsCode({url:d.filename,cache:false,success:function(e){$("#DHTMLcontent").append(e);if($("#DHTMLcontent").find(d.contentname).length>0){$("#DHTMLcontent").find(d.contentname).width(d.windowWidth);$("#DHTMLcontent").find(d.contentname).height(d.windowHeight)}if(!$.browser.msie){$("#DHTMLwrap").width($("#DHTMLcontent").width()+12)}else{$("#DHTMLwrap").width($("#DHTMLcontent").width()+12)}if(!$.browser.msie){$("#DHTMLwrap").height($("#DHTMLcontent").height()+12)}else{$("#DHTMLwrap").height($("#DHTMLcontent").height()+12)}$("#DHTMLwrap").add("#DHTMLcontent").show("fast");$(".closeWin").click(function(){$("#DHTMLwrap").add("#DHTMLcontent").fadeOut("fast",function(){$(this).remove()})})}})}else{$("#DHTMLcontent").empty().append('<a href="javascript:;" title="Close Window" class="closeWin"></a>').append('<p class="localPriceTip">'+d.staticContent+"</p>");$(".closeWin").css({height:"19px",width:"19px",position:"absolute",top:"5px",right:"5px",background:"url("+itCssImgDir+"img/icons/close-no-txt.gif) no-repeat",zIndex:"999999"});$("#DHTMLcontent").find(d.contentname).width(d.windowWidth);$("#DHTMLcontent").find(d.contentname).height(d.windowHeight);if(!$.browser.msie){$("#DHTMLwrap").width($("#DHTMLcontent").width()+12)}else{$("#DHTMLwrap").width($("#DHTMLcontent").width()+12)}if(!$.browser.msie){$("#DHTMLwrap").height($("#DHTMLcontent").height()+12)}else{$("#DHTMLwrap").height($("#DHTMLcontent").height()+12)}$("#DHTMLwrap").add("#DHTMLcontent").show("fast");
$(".closeWin").click(function(){$("#DHTMLwrap").add("#DHTMLcontent").fadeOut("fast",function(){$(this).remove()})})}}};$.fn.centerOnScreen=function(){var f=this[0];var b=self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;var j=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var g=b+((j-f.offsetHeight)/2.7)<0?0:b+((j-f.offsetHeight)/2.7);var d=((e/2)-(f.offsetWidth/2))<0?0:((e/2)-(f.offsetWidth/2));$(f).css({top:+(g),left:+(d)})};$.fn.dynamicPopup=function(b){b=$.extend({filename:"default.html",contentname:"#popup",windowWidth:"300px",windowHeight:"100px",jsonFlag:false,dynamicContent:true,staticContent:""},b);return this.each(function(){$(this).click(function(d){dynpop.ini(d,b)})})};$.fn.dynamicMouseOver=function(b){b=$.extend({filename:"default.html",contentname:"#popup",windowWidth:"300px",windowHeight:"100px",jsonFlag:false,dynamicContent:true,staticContent:""},b);return this.each(function(){$(this).mouseover(function(f){var d={pageX:f.pageX+5,pageY:f.pageY+5};dynpop.ini(d,b)}).mouseout(function(){var d=setTimeout("$('#DHTMLwrap').add('#DHTMLcontent').fadeOut('fast',function() {$(this).remove();});",1500);$(this).mouseover(function(){clearTimeout(d)});$("#DHTMLcontent").hover(function(){clearTimeout(d)},function(){$("#DHTMLwrap").add("#DHTMLcontent").fadeOut("fast",function(){$(this).remove()})})})})};var fadeInTime=300;var fadeOutTime=200;function addCluetips(){$("a.aWhatIsSmartPlan, a.whatIsAddToList").cluetip()}function resetOrderDiv(){$("#div_addToOrders_"+popupCount).html("")}function fetchOrderDetails(b,d){if(checkQuantity()){$("#"+addToOrderDivId).html("");$.ajax({url:"AddToOrderAjaxView",data:"storeId="+$("#storeId_"+d).val()+"&langId="+$("#langId_"+d).val()+"&catalogId="+$("#catalogId_"+d).val(),success:fillAddToOrderFieldSet.createDelegate(this,[b],true)})}}function fillAddToOrderFieldSet(e,b,d){$("#"+addToOrderDivId).html(trim(e));fadeinPopUp(d);bindRecurringOrderClick();restrictQuantityInputs();$(".addToCartListOrder a.close").click(function(){fadeOutAtoAtl(fadeOutTime);resetOrderDiv();return false})}function fnAddToOrderAjax(r,u,E){var C=document.getElementById("storeId_"+popupCount).value;var B=document.getElementById("catalogId_"+popupCount).value;var m=document.getElementById("langId_"+popupCount).value;var l=0;var A=0;var f=0;var t=0;var m=-1;var b=1;var d="selectOrders"+b;var q="editRecurring"+b;var p=document.getElementsByName(d);var e="";var w=0;var o=0;var v=r.split(",");var k=v.length;var D="";var g="";for(l=0;l<p.length;l++){if(p[l].checked){f=p[l].value}}if(f!="new"){var n=document.getElementsByName(q);for(A=0;A<n.length;A++){if(n[A].checked){t=n[A].value}}if(t!=0&&f!=0){e="OrderDetailsView?orderId="+f+"&storeId="+C+"&catalogId="+B+"&langId="+m+"&orderFlag=schedule&flag=OpenOrders";$.ajax({url:"AddToOrderCmd",data:"storeId="+C+"&catalogId="+B+"&scheduledOrderId="+f+"&catentryId="+r+"&quantity="+E+"&editrecurring="+t,success:function(j){$("#addtoorderresponse").html(trim(j));addMessage=$("#addToOrderMessage").val();if(fromPage=="QuickShop"||fromPage=="SearchResults"||fromPage=="Compare"||fromPage=="QuickView"){highlightItem("order","input#addToOrders_"+popupCount)}else{ShowOrderConfirm()}fadeOutAtoAtl(fadeOutTime)}})}if(t==0&&f!=0){if(popupCount!="COLL1"&&popupCount!="COLL2"){g=document.getElementById("OutOfStock_"+v[0]).value}else{g=""}e="OrderDetailsView?orderId="+f+"&storeId="+C+"&catalogId="+B+"&langId="+m+"&orderFlag=schedule&flag=OpenOrders";$.ajax({url:"AddToOrderCmd",data:"storeId="+C+"&catalogId="+B+"&scheduledOrderId="+f+"&catentryId="+r+"&quantity="+E+"&editrecurring=all"+"&stockFlag="+g,success:function(j){$("#addtoorderresponse").html(trim(j));addMessage=$("#addToOrderMessage").val();if($("#outOfStockStatus").val()=="false"){if(fromPage=="QuickShop"||fromPage=="SearchResults"||fromPage=="Compare"||fromPage=="QuickView"){highlightItem("order","input#addToOrders_"+popupCount)}else{ShowOrderConfirm()}}else{ShowOrderConfirm()}fadeOutAtoAtl(fadeOutTime)}})}}}function checkQuantity(){var e=true;var b=1;var d=0;d=document.getElementById("ProductVariant_"+popupCount).value;if(popupCount=="QV"){if(d==0){b=document.getElementById("prodQty_"+popupCount).value;if(b==""||b==0){$("#prodQty_"+popupCount).val(1)}}if(d==1){PID=document.getElementById("PID_"+popupCount).value;b=document.getElementById("QVqty"+PID).value;if(b==""||b==0){$("#QVqty"+PID).val(1)}}}else{if(popupCount!="COLL1"&&popupCount!="COLL2"){if(d==0){b=$("#prodQty_"+popupCount).val();if(b==""||b==0){$("#prodQty_"+popupCount).val(1)}}if(d==1){selectedItem();b=selectedQty;catlist=selectedCatEntryId;if(catlist==""){showErrorMsgPopUpBox($("input[id='addToOrders_1']"),"Please select the [specific attribute] before you add to order.","Add To Order");return false}if(b==""||b==0){b=1;rObj(_Pd.bldId(10,0)).value=1}}}}return e}function addToOrderSubmit(status,id){if(status=="0"){$("#"+id).attr("checked",true)}var productVariant=0;var i=0;var count=-1;var catlist="";var cnt=0;var selectedRB=0;var orderScheduleURL=0;var catSize=1;var prodQty=1;var PID="";var sId=document.getElementById("storeId_"+popupCount).value;var cId=document.getElementById("catalogId_"+popupCount).value;var creditCard=document.getElementById("creditCard").value;var lid=document.getElementById("langId_"+popupCount).value;productVariant=document.getElementById("ProductVariant_"+popupCount).value;if(popupCount=="QV"){if(productVariant==0){catlist=document.getElementById("catentryId_"+popupCount).value;prodQty=document.getElementById("prodQty_"+popupCount).value;if(prodQty==""||prodQty==0){prodQty=1;document.getElementById("prodQty_"+popupCount).value=1}}if(productVariant==1){catlist=document.addToCart.catEntryId_1.value;PID=document.getElementById("PID_"+popupCount).value;prodQty=document.getElementById("QVqty"+PID).value;if(prodQty==""||prodQty==0){prodQty=1;document.getElementById("QVqty"+PID).value=1}}}else{if(popupCount=="COLL1"||popupCount=="COLL2"){isInStockList="";if(doCollectionValidation()==true){createFormValues();var catentryList="";var quantityList="";var num=catEntryArray.length;for(var i=0;i<catEntryArray.length;i++){isInStockList=isInStockList+eval("document.fakeAddToCart_"+i+".isInStock").value+",";catentryList=catentryList+catEntryArray[i]+",";quantityList=quantityList+quantityArray[i]+","}catlist=catentryList;prodQty=quantityList}else{return false}}else{if(productVariant==0){catlist=document.getElementById("catentryId_"+popupCount).value;prodQty=document.getElementById("prodQty_"+popupCount).value;if(prodQty==""||prodQty==0){prodQty=1;document.getElementById("prodQty_"+popupCount).value=1}}if(productVariant==1){selectedItem();catlist=selectedCatEntryId;prodQty=selectedQty;if(prodQty==""||prodQty==0){prodQty=1;rObj(_Pd.bldId(10,0)).value=1}}}}var quantityList=prodQty;if($("#newOrder").is(":checked")){if("N"==creditCard){orderScheduleURL="ScheduleOrderCenterView?catalogId="+cId+"&storeId="+sId+"&catEntryId="+catlist+"&quantity="+quantityList+"&catEntryIdSize=1&scheduleType=new&doNotRefresh=true&listId=&popupCount="+popupCount+"&isInStockList="+isInStockList+"&fromPage="+fromPage;window.open(orderScheduleURL,"orderSchedule","menubar=0,resizable=1,scrollbars=1,width=450,height=500");fadeOutAtoAtl(fadeOutTime)}else{orderScheduleURL="NoWalletAlertView?catalogId="+cId+"&storeId="+sId+"&page=";window.open(orderScheduleURL,"orderSchedule","menubar=0,resizable=1,scrollbars=1,width=450,height=500");fadeOutAtoAtl(fadeOutTime)}}else{fnAddToOrderAjax(catlist,catSize,quantityList)}resetOrderDiv()}function fadeinPopUp(d){fadeOutAtoAtl(fadeOutTime);$(d).parent().parent().parent().parent().parent().css("z-index","1");$(d).parent().parent().css("z-index","1");$(d).next().removeClass("left");$(d).next().fadeIn(fadeInTime);if($(d).hasClass("addToOrder")){checkOlOrdersHeight($(d).next().find("ol.clear")[0])}var e=$(d).parent().parent().parent().find("div.divQuantity input.quantity");
var g=$(d).parent().parent().parent().find("fieldset.fldSmartPlan input.quantity");var b;if($("body").is("#keysearch")||$("body").is("#subcategory")){b=$(d).parent().parent().parent().parent().parent().find("div.divSmartPlan input.checkbox")}else{if($(d).parent().parent().parent().parent().hasClass("quickView")){b=$(d).parent().parent().parent().parent().find("div.divSmartPlan input.checkbox")}else{b=$(d).parent().parent().parent().find("div.divSmartPlan input.checkbox")}}e.css("background-color","#ddd").add(b).attr("disabled","disabled");if($(d).hasClass("addToOrder")&&b.is(":checked")&&e.val()>1){g.val(e.val());$(d).parent().parent().parent().find("fieldset.fldSmartPlan").show();g.focus();$(d).parent().parent().parent().find("fieldset.fldAddToOrderNew").hide();$("input.smartPlanNext").unbind().click(function(){$("p.errorMessage").fadeOut(fadeOutTime).remove();var k=$(this).parent().find("input#inputSmartPlanQuantity");if(parseInt(k.val(),10)>=0&&parseInt(k.val(),10)>parseInt(e.val(),10)||k.val()==""||isNaN(k.val())){var j=document.createElement("p");$(j).text("Please enter a valid quantity no larger than "+e.val()+".").addClass("errorMessage").insertBefore($(this)).fadeIn(fadeInTime);k.css("background-color","#fbe2e5").css("border-color","red")}else{$("fieldset.fldSmartPlan").fadeOut(fadeInTime,function(){$("fieldset.fldAddToOrderNew").fadeIn(fadeInTime)});k.css("background-color","inherit").css("border-color","#999")}})}else{$(d).parent().parent().parent().find("fieldset.fldSmartPlan").hide();$(d).parent().parent().parent().find("fieldset.fldAddToOrderNew").show()}var f=document.createElement("img");targetWidth=$(window).width()>800?$(window).width():800;if($(d).next().offset().left+$(d).next().width()+25>targetWidth||$(d).parent().parent().parent().parent().attr("class")=="quickView"){$(d).next().addClass("left");$(f).attr("src",$(d).attr("src").replace(".gif","_active_left.gif")).attr("style","margin-left:-3px;")}else{$(d).next().removeClass("left");$(f).attr("src",$(d).attr("src").replace(".gif","_active_right.gif"))}$(f).attr("class","activeButton").insertBefore(d).fadeIn(fadeInTime).click(function(){fadeOutAtoAtl(fadeOutTime)})}function fadeinPopUpCart(d){fadeOutAtoAtl(fadeOutTime);if($(d).hasClass("addToOrder")){checkOlOrdersHeight($(d).next().find("ol.clear")[0])}var e=$(d).parent().parent().parent().find("div.divQuantity input.quantity");var j=$(d).parent().parent().parent().find("fieldset.fldSmartPlan input.quantity");var b;if($("body").is("#keysearch")||$("body").is("#subcategory")){b=$(d).parent().parent().parent().parent().parent().find("div.divSmartPlan input.checkbox")}else{if($(d).parent().parent().parent().parent().hasClass("quickView")){b=$(d).parent().parent().parent().parent().find("div.divSmartPlan input.checkbox")}else{b=$(d).parents("div.addToCartListOrder").find("div.divSmartPlan input.checkbox")}}var g=true;if($(d).hasClass("addToCart")&&!b.is(":checked")){g=false}if(g){e.css("background-color","#ddd").add(b).attr("disabled","disabled");$(d).parent().parent().parent().parent().parent().css("z-index","1");$(d).parent().parent().css("z-index","1");$(d).next().fadeIn(fadeInTime)}if(e.val().length==0){e.val(1)}if(b.is(":checked")&&e.val()>1&&($(d).hasClass("addToCart")||$(d).hasClass("addToOrder"))){if($(d).hasClass("addToOrder")){$("fieldset.fldAddToOrderNew").hide()}$("fieldset.fldSmartPlan").show();j.val(e.val());$("input.smartPlanNext").unbind().click(function(){$("p.errorMessage").fadeOut(fadeOutTime).remove();if((j.val()>=0&&j.val()>e.val())||isNaN(j.val())){var k=document.createElement("p");$(k).text("Please enter a valid quantity no larger than "+e.val()+".").addClass("errorMessage").insertBefore($(this)).fadeIn(fadeInTime);j.css("background-color","#fbe2e5").css("border-color","red")}else{if($(d).parent().parent().prev().hasClass("addToOrder")){$("fieldset.fldSmartPlan").fadeOut(fadeInTime,function(){$("fieldset.fldAddToOrderNew").fadeIn(fadeInTime)});j.css("background-color","inherit").css("border-color","#999")}else{if(fromPage=="QuickShop"){addQSItem(e.val(),itemPartNumber,qsATC_Id,smartCartFlag,displayImage)}else{if(fromPage=="SearchResults"){addItem(e.val(),itemPartNumber,smartCartFlag,displayImage)}else{if(fromPage=="Compare"){addItemToCart(itemCatEntryId,e.val(),itemPartNumber,smartCartFlag,displayImage)}else{if(fromPage=="Product"){addToCartProduct(smartCartFlag,e.val())}else{if(fromPage=="QuickView"){addToCartQV(displayImage)}}}}}fadeOutAtoAtl(fadeOutTime)}}})}if(g){var f=document.createElement("img");targetWidth=$(window).width()>800?$(window).width():800;if($(d).next().offset().left+$(d).next().width()+25>targetWidth||$(d).parent().parent().parent().parent().attr("class")=="quickView"){$(d).next().addClass("left");$(f).attr("src",$(d).attr("src").replace(".gif","_active_left.gif")).attr("style","margin-left:-3px;")}else{$(d).next().removeClass("left");$(f).attr("src",$(d).attr("src").replace(".gif","_active_right.gif"))}$(f).attr("class","activeButton").insertBefore(d).fadeIn(fadeInTime).click(function(){fadeOutAtoAtl(fadeOutTime)})}$(".addToCartListOrder a.close").click(function(){fadeOutAtoAtl(fadeOutTime);return false})}function fadeinPopUpList(f){var b=$(f).attr("id");var m=b.split("_");var l=m[1];if(typeof fnSaveToList!="undefined"){var e=fnSaveToList(l);if(!e){return false}}if(typeof callAddtoShoppingList!="undefined"){var n=callAddtoShoppingList(l);if(!n){return false}}fetchLists(l,f);fadeOutAtoAtl(fadeOutTime);$(f).parent().parent().parent().parent().parent().css("z-index","1");$(f).parent().parent().css("z-index","1");$(f).next().removeClass("left");$(f).next().fadeIn(fadeInTime);var d=$(f).parent().parent().parent().find("div.divQuantity input.quantity");var k=$(f).parent().parent().parent().find("fieldset.fldSmartPlan input.quantity");var j;if($("body").is("#keysearch")||$("body").is("#subcategory")){j=$(f).parent().parent().parent().parent().parent().find("div.divSmartPlan input.checkbox")}else{if($(f).parent().parent().parent().parent().hasClass("quickView")){j=$(f).parent().parent().parent().parent().find("div.divSmartPlan input.checkbox")}else{j=$(f).parent().parent().parent().find("div.divSmartPlan input.checkbox")}}d.css("background-color","#ddd").add(j).attr("disabled","disabled");if(typeof callAddtoShoppingList=="undefined"){if(d.val().length==0||d.val()==0){d.val(1)}}var g=document.createElement("img");targetWidth=$(window).width()>800?$(window).width():800;if($(f).next().offset().left+$(f).next().width()+25>targetWidth||$(f).parent().parent().parent().parent().attr("class")=="quickView"){$(f).next().addClass("left");$(g).attr("src",$(f).attr("src").replace(".gif","_active_left.gif")).attr("style","margin-left:-3px;")}else{$(f).next().removeClass("left");$(g).attr("src",$(f).attr("src").replace(".gif","_active_right.gif"))}$(g).attr("class","activeButton").insertBefore(f).fadeIn(fadeInTime).click(function(){fadeOutAtoAtl(fadeOutTime)});$(".addToCartListOrder a.close").click(function(){fadeOutAtoAtl(fadeOutTime);return false})}function doCollectionValidation(){catentryError=0;createFormValues();var b="addToOrders_"+popupCount;_global=$("input#"+b).offset();if(getTotalQuantity()==0){displayErrorMessage(AddToOrderSelectQuantity);return false}else{if(catentryError==1){displayErrorMessage(AddToOrderSingleSelectionMissing);return false}else{if(catentryError>=2){displayErrorMessage(AddToOrderMultipleSelectionMissing);return false}else{return true}}}}function bindCartOrderListInputClick(){var b;$("input.addToOrder").unbind().click(function(){if(typeof omAcct!="undefined"&&omAcct!=null&&omAcct!="undefined"&&typeof s_gi!="undefined"){var d=s_gi(omAcct);omEvent=d.events;d.events="event11";d.tl();d.events=omEvent;if(d.events!="event11"){omEvent=d.events;omEvt="event11";d.tl();omEvt=omEvent}}addToOrderDivId="div_"+$(this).attr("id");popupCount=$(this).attr("id").split("_")[1];if(typeof getTotalQuantity!="undefined"){if(doCollectionValidation()==true){fetchOrderDetails($(this),popupCount)}}else{fetchOrderDetails($(this),popupCount)
}});$("input.addToList").unbind().click(function(k){if(typeof omAcct!="undefined"&&omAcct!=null&&omAcct!="undefined"&&typeof s_gi!="undefined"){var f=s_gi(omAcct);omEvent=f.events;f.events="event12";f.tl();f.events=omEvent;if(f.events!="event12"){omEvent=f.events;omEvt="event12";f.tl();omEvt=omEvent}}if(userTypeId=="G"){var j='<div id="spuFeedback" style="width:200px;padding: 10px;line-height: 1.3; text-align:left;">';j+='<p>Please <a href="LogonFormView?storeId=10152&catalogId=10108">';j+="login or register</a> to use shopping lists.</p>";var g={pageX:k.pageX-150,pageY:k.pageY-20};var d={contentname:"#spuFeedback",jsonFlag:false,dynamicContent:false,windowWidth:"200px",windowHeight:"auto",staticContent:j};dynpop.ini(g,d)}else{fadeinPopUpList($(this))}})}function checkOlOrdersHeight(b){if(typeof b!="undefined"){if(b.offsetHeight>225){$(b).css({"overflow-y":"auto","overflow-x":"hidden",height:"225px"})}else{$(b).css({"overflow-y":"","overflow-x":"",height:"auto"})}}}function bindSubmitClicks(){if($("body").is("#keysearch")||$("body").is("#subcategory")){$("divAddToCart input").unbind().click(function(){highlightItem("cart",this)});$('div.addOrderWrapper input[type="image"]').unbind().click(function(){var b=false;$(this).prev().find('li input[type="radio"]').each(function(){if($(this).attr("class")=="recurringOrder"&&$(this).is(":checked")){$(this).parent().find("div.recurring li input").each(function(){if($(this).is(":checked")){b=true;return}});if(b){return}}else{if($(this).is(":checked")){b=true;return}}});if(b){highlightItem("order",this)}});$("div.addListWrapper input").unbind().click(function(){var b=$(this).prev()[0];if(b.selectedIndex>=0){if(b.options[b.selectedIndex].value=="newList"){fadeOutAtoAtl(fadeOutTime);$("div.modal").hide();$("div#createNewShoppingListHeader").fadeIn(200).bgiframe();window.location.href="#all"}else{highlightItem("list",this)}}})}fadeOutAtoAtl(fadeOutTime)}function fadeOutAtoAtl(b){$(".product, .buttons").css("z-index","0");$("fieldset.fldAddToOrderNew").show();$("fieldset.fldSmartPlan").hide();$("img.activeButton").fadeOut(b,function(){$(this).remove()});$("div.addOrderWrapper, div.addListWrapper, div.addCartWrapper").fadeOut(b);$("div.divQuantity input.quantity").css("background-color","#fff").add($("div.divSmartPlan input.checkbox")).attr("disabled","")}function highlightItem(b,d){var n=b+"_just_added.gif";var k=b+"_inside.gif";var j="";var e="ShowModule()";if(b=="cart"){j="cart"}else{if(b=="order"){j="scheduled order";e="ShowOrderConfirm()"}else{if(b=="list"){j="shopping list";e="ShowListConfirm()"}}}if($(d).parents(".quickView")[0]){if(b!="cart"){setTimeout(e,2500);fadeOutAtoAtl(fadeOutTime)}return false}var g="Just added to "+j;var f="In "+j;var m=$(d).parent().parent().parent().parent().parent();m.children("img").remove();function l(){m.addClass("add").prepend('<img class="inCart" src="'+imagePath+"img/quickshop/"+k+'" alt="'+f+'" />');$(".justAdded, .added").remove()}m.addClass("add").prepend('<div class="justAdded"></div>').prepend('<img class="added" src="'+imagePath+"img/quickshop/"+n+'" alt="'+g+'" />');$(".added").animate({opacity:0.35},1800);$(".justAdded").animate({opacity:0.35},1800,function(){m.prepend('<img class="inCart" src="'+imagePath+"img/quickshop/"+k+'" alt="'+f+'" />');$(".justAdded, .added").remove()});if(b!="cart"){setTimeout(e,2500)}fadeOutAtoAtl(fadeOutTime)}var buffer;function ShowOrderConfirm(){$("#verticalWrapper").css({"z-index":"0"});$("#callToAction li").css({"z-index":"5000"});buffer=$("ul#orderList").html();$("ul#orderList").children("li").remove();var b=document.createElement("li");$(b).text(addMessage).addClass("addToOrder");$("ul#orderList").append(b);$("#ordersLink").css("background-position","-104px -41px");$("#orderListWrapper").fadeIn(fadeInTime).animate({opacity:1},5000,function(){$("#ordersLink").css("background-position","-104px 0px")}).fadeOut(fadeOutTime,function(){$("ul#orderList").html(buffer)})}function ShowListConfirm(){$("#verticalWrapper").css({"z-index":"0"});$("#callToAction li").css({"z-index":"5000"});buffer=$("div#shoppingLists").html();$("div#shoppingLists").children().hide();var b=document.createElement("p");$(b).text("Item(s) added to list").addClass("addToList");$("div#shoppingLists").append(b);$("#listsLink").css("background-position","-192px -41px");$("#listsWrapper").fadeIn(fadeInTime).animate({opacity:1},5000,function(){$("#listsLink").css("background-position","-192px 0px")}).fadeOut(fadeOutTime,function(){$("div#shoppingLists p.addToList").remove();$("div#shoppingLists").children().show()})}function restrictQuantityInputs(){$(".addToCartListOrder input.quantity").keydown(function(f){var d=[8,37,38,39,40,46];d.push(48,49,50,51,52,53,54,55,56,57);d.push(96,97,98,99,100,101,102,103,104,105);for(var b=0;b<d.length;b++){if(d[b]==f.keyCode){if(!f.shiftKey){return true}}}return false})}function disableBox(b){var d=$(b).parent().parent().parent().find("div.divQuantity input.quantity");$chkSmartPlan=$(b).parent().parent().parent().parent().parent().find("div.divSmartPlan input.checkbox");d.css("background-color","#ddd").add($chkSmartPlan).attr("disabled","disabled")}function enableBox(b){var d=$(b).parent().parent().parent().find("div.divQuantity input.quantity");$chkSmartPlan=$(b).parent().parent().parent().parent().parent().find("div.divSmartPlan input.checkbox");d.css("background-color","#fff").add($chkSmartPlan).attr("disabled","")}function newOrderHighlight(b){addMessage=b;if(fromPage=="QuickShop"||fromPage=="SearchResults"||fromPage=="Compare"||fromPage=="QuickView"){highlightItem("order","input#addToOrders_"+popupCount)}else{ShowOrderConfirm()}}function initiateOKbutton(){$("#addOrderWrapperAjax input[alt='ok']").click(function(){$("#verticalWrapper").css({"z-index":"0"});$("#callToAction li").css({"z-index":"5000"})});$(".addListWrapper input[alt='ok']").click(function(){$("#verticalWrapper").css({"z-index":"0"});$("#callToAction li").css({"z-index":"5000"})})}function menuZindex(){$("div.divAddToOrder .addToOrder").click(function(){$("#verticalWrapper").css({"z-index":"1"});$("#callToAction li").css({"z-index":"1"})});$("#callToAction").hover(function(){if($("#addOrderWrapperAjax").is(":hidden")){$("#callToAction li").css({"z-index":"5000"})}},function(){});$("#verticalWrapper").hover(function(){if($("#addOrderWrapperAjax").is(":hidden")){$("#verticalWrapper").css({"z-index":"2400"})}},function(){});$("#addOrderWrapperAjax").hover(function(){$("#verticalWrapper").css({"z-index":"1"});$("#callToAction li").css({"z-index":"1"});initiateOKbutton()},function(){});$(".addListWrapper").hover(function(){$("#verticalWrapper").css({"z-index":"1"});$("#callToAction li").css({"z-index":"1"});initiateOKbutton()},function(){})}function bindRecurringOrderClick(){$('.fldAddToOrderNew input[type="radio"]').not($("div.recurring input")).each(function(){if($(this).hasClass("recurringOrder")){$($(this).parent().find("label")[0]).unbind().toggle(function(){$($(this).parent().find("div.recurring")[0]).fadeIn(fadeInTime);checkOlOrdersHeight($(this).parents("ol")[0])},function(){$($(this).parent().find("label")[0]).click(function(){$(".addOrderWrapper div.recurring").hide();var e=$(this).attr("for");var d=e.split("_");var b=d[0];$("input[name='selectOrders1']:checked").val()==0?$(this).parent().find("div#record"+b).hide():$(this).parent().find("div#record"+b).show()})})}else{$($(this).parent().find("label")[0]).unbind().toggle(function(){$("div.recurring").fadeOut(fadeOutTime);checkOlOrdersHeight($(this).parents("ol")[0]);$('div.recurring input[type="radio"]').each(function(){$(this).attr("checked","")})},function(){$($(this).parent().find("div.recurring")[0]).click(function(){$(".addOrderWrapper div.recurring").hide();var e=$(this).attr("for");var d=e.split("_");var b=d[0];$("input[name='selectOrders1']:checked").val()==0?$(this).parent().find("div#record"+b).hide():$(this).parent().find("div#record"+b).show()})})}})}function fnCheckType(d,e){if(d=="5"){$("#"+e).attr("checked",true);
addToOrderSubmit("1",e)}else{if(e=="new"){$("#newOrder").attr("checked",true);addToOrderSubmit("1",e)}else{if(d!=5){var b=e.split("_")[1];if(b=="weeklyOrder"){$("#"+e).attr("checked",true)}}}}}function bindEventsForRR(){$("a.mapLink").click(function(){mapClick(this)})}function isI18NConvReq(){var b=false;var f=false;var d=$("body").attr("id");if(typeof(intShipFlgSwitch)!="undefined"&&intShipFlgSwitch=="TRUE"){var e=fnParseCountryCookie();if(e!=null&&e.countryCode!=DEFAULT_COUNTRY_CODE){b=true}}return b}function fnCreateCountryCookie(d,b,e){if(d!=DEFAULT_COUNTRY_CODE&&b!=DEFAULT_CURRENCY_SYMBOL){$.cookie("IntnlShip",d+"|"+b+"|"+e)}}function fnParseCountryCookie(){var e,d=null;if(i18nCookieData!=null){d=i18nCookieData}else{e=$.cookie("IntnlShip");if(e!=null&&e.split("|").length==4){var b=e.split("|");countryCode=b[0];currencyCode=b[1];exgRate=b[2];quoteId=b[3];d={};d.countryCode=countryCode;d.currencyCode=currencyCode;d.exgRate=exgRate;d.quoteId=quoteId;if(d!=null){i18nCookieData=d}}}return d}function createNewWishListModalHeader(){var d=($(window).height()/2)+$(window).scrollTop()-105;var b=($(window).width()/2)-225;if(typeof(storeId)!="undefined"&&storeId!=""){storeID=storeId}if(typeof(catalogId)!="undefined"&&catalogId!=""){catalogID=catalogId}$("body").append('<div class="newListModalShadow"></div><div id="newListModal"></div>');$(".newListModalShadow").css({"top":d,"left":b,"filter":"alpha(opacity=50)","; -moz-opacity":"0.5","opacity":"0.5"});$("#newListModal").css({"top":d+5,"left":b+5});if(requestType=="https"){$("#newListModal").load("CreateNewListViewHttps?fromHeader=true&storeId="+storeID+"&catalogId="+catalogID+"&listType=wishlist")}else{$("#newListModal").load("CreateNewListView?fromHeader=true&storeId="+storeID+"&catalogId="+catalogID+"&listType=wishlist")}}var listType;function addWishList(){var b=document.getElementById("newShoppingListHeader").value;var b=b.trim();listType="wishlist";var d=fnWishListNameValidate(b);if(typeof(storeId)!="undefined"&&storeId!=""){storeID=storeId}if(typeof(catalogId)!="undefined"&&catalogId!=""){catalogID=catalogId}if(d==false){return false}var e=b;b=encodeURIComponent(b);$.ajax({url:requestType=="https"?"AddShoppingListCmdHttps":"AddShoppingListCmd",data:"storeId="+storeID+"&catalogId="+catalogID+"&newWishListName="+b+"&listType=wishlist&MGFlag=true",success:addwishListDisplay.createDelegate(this,[e],true)});closeModal()}function addWishListView(d,b){}function addShoppingListView(d,b){}function getWishListNames(){var e=1;var d=getUserIdFromCookie;var g;if(typeof(storeId)!="undefined"&&storeId!=""){storeID=storeId}if(typeof(catalogId)!="undefined"&&catalogId!=""){catalogID=catalogId}g="";var k;var j;var l=true;if(g!=null&&g!==""){if(g!=null&&g!==""){var b=g.length;k=g;if(k.indexOf("")!=-1){l=false}for(var f=0;f<g.length;f++){k=k.replace("","~*#");if(k.indexOf("")==-1){break}}g=k}if(l&&g!=null&&g!==""){j=g;if(j.indexOf("~*#")==-1){j=j.replace(/~/g,"~*#")}g=j}if(g=='""'){g=""}g=g+"~*#";var b=g.length;b=b-0;var f=0;while(g.length>1&&e!=0){b=g.length-0;g=g.substring(3,b);if(g.indexOf(":")){wishListIdArray[f]=g.substring(0,g.indexOf(":"));g=g.substring(g.indexOf(":"),b);wishListNameArray[f]=g.substring(1,g.indexOf("~*#"));g=g.substring(g.indexOf("~*#"),b)}f++}}}function addwishListDisplay(g,d){if(d!=""){fnUpdateListCenter(g,d);$("#newNav ul#actionMenu li#listsNav").addClass("active");$("#newNav ul#actionMenu li#listsNav").children(".inactive").hide();$("#newNav ul#actionMenu li#listsNav").children(".active").show();var k=$("#newNav ul#actionMenu li#listsNav").offset();$("body").append('<div id="listsMessage" class="menuMessage"><p>New Wish List Created</p></div>');$("#listsMessage").css({"top":k.top+33,"left":k.left-1});$("#listsMessage").slideDown("fast");setTimeout(killMessage,2000)}getWishListNames();var b="";var j="";var f="<dt>Wish Lists</dt>";for(i=0;i<wishListIdArray.length;i++){b=wishListIdArray[i];j=wishListNameArray[i];j=j.replace(/&#58/g,":");j=j.replace(/&#59/g,";");j=j.replace(/&#60/g,"<");j=j.replace(/&#61/g,"=");j=j.replace(/&#62/g,">");var e=j;if(e.length>15){e=e.substring(0,15)+"...."}if(typeof(storeId)!="undefined"&&storeId!=""){storeID=storeId}if(typeof(catalogId)!="undefined"&&catalogId!=""){catalogID=catalogId}f=f+'<dd><a href="ShoppingListSortCmd?catalogId='+catalogID+"&storeId="+storeID+"&listId="+b+'&listType=wishlist" title="View My '+e+' list ">'+e+"</a></dd>"}f+='<dd><a class="newList" href="##" onclick="createNewWishListModalHeader();" title="Create a new List">Create new Wish List </a></dd>';$("#existingWishLists").html(f)}function omLogin(){var e=$("#loginStatusUrl").val();var b=gup("pageFrom");var d=gup("loginModal");if(typeof s!="undefined"){if(e!=null&&e=="login"){s.events="event2";s.tl()}else{if(b!=null&&(b=="Logon"||b=="ModalLogon")){s.events="event2";s.tl()}else{if(d!=null&&d=="Y"){s.events="event2";s.tl()}}}}}function expandDL(){$(this).toggleClass("expanded");$(this).parent("dl").children("dd").toggle()}function initPageLoadMyChoiceSmartCart(){var l="_DAP_easyMeal";if(($.cookie("EacyMealDap")=="EacyMealInd")){var m=locationId;var k=defaultLocId;var C=unitNoFrmLoc;if(fnCheckCookie()){if((easyMealsLocations.indexOf(k)>=0)&&(unitNo==C)&&(userTypeVal=="C")){EacyMealNo="";document.cookie="EacyMealDap="+EacyMealNo;document.location.href="/shc/s/c_10152_10108_Food+%26+Grocery_Prepared+Foods"}}}var y="";var v=1;if(storeId==""){storeId=document.HeaderForm.storeId.value}if(typeof(storeId)!="undefined"&&storeId!=""){storeID=storeId}if(typeof(catalogId)!="undefined"&&catalogId!=""){catalogID=catalogId}var u=getCookie("MyGoferShoppingListCookie_"+storeID+"_"+getUserIdFromCookie);var F;var E;var H=true;if(u!=null&&u!==""){var x=u.length;F=u;if(F.indexOf("")!=-1){H=false}for(var w=0;w<u.length;w++){F=F.replace("","~*#");if(F.indexOf("")==-1){break}}u=F}if(H&&u!=null&&u!==""){E=u;if(E.indexOf("~*#")==-1){E=E.replace(/~/g,"~*#")}u=E}if(u=='""'){u=""}var D="<dt>Shopping Lists</dt>";u=u+"~*#";var x=u.length;x=x-0;while(u.length>1&&v!=0){var b;var j;x=u.length-0;u=u.substring(3,x);if(u.indexOf(":")){b=u.substring(0,u.indexOf(":"));if(!!b){u=u.substring(u.indexOf(":"),x);j=u.substring(1,u.indexOf("~*#"));j=j.replace(/&#58/g,":");j=j.replace(/&#59/g,";");j=j.replace(/&#60/g,"<");j=j.replace(/&#61/g,"=");j=j.replace(/&#62/g,">");var t=j;if(t.length>15){t=t.substring(0,15)+"...."}u=u.substring(u.indexOf("~*#"),x);if(typeof(storeId)!="undefined"&&storeId!=""){storeID=storeId}D+='<dd><a href="ShoppingListSortCmd?catalogId='+parentCatalogID+"&storeId="+storeID+"&listId="+b+"&listType=shoppingList&listName="+j+'" title="View My '+t+' list">'+t+"</a></dd>"}}}var o=" ";o=" Shopping ";if(typeof(storeId)!="undefined"&&storeId!=""){storeID=storeId}var n="";var F;var E;var H=true;if(n!=null&&n!==""){if(n!=null&&n!==""){var x=n.length;F=n;if(F.indexOf("")!=-1){H=false}for(var w=0;w<n.length;w++){F=F.replace("","~*#");if(F.indexOf("")==-1){break}}n=F}if(H&&n!=null&&n!==""){E=n;if(E.indexOf("~*#")==-1){E=E.replace(/~/g,"~*#")}n=E}if(n=='""'){n=""}var f="<dt>Wish Lists</dt>";n=n+"~*#";var x=n.length;x=x-0;while(n.length>1&&v!=0){var b;var j;x=n.length-0;n=n.substring(3,x);if(n.indexOf(":")){b=n.substring(0,n.indexOf(":"));if(!!b){n=n.substring(n.indexOf(":"),x);j=n.substring(1,n.indexOf("~*#"));j=j.replace(/&#58/g,":");j=j.replace(/&#59/g,";");j=j.replace(/&#60/g,"<");j=j.replace(/&#61/g,"=");j=j.replace(/&#62/g,">");var t=j;if(t.length>15){t=t.substring(0,15)+"...."}n=n.substring(n.indexOf("~*#"),x);if(typeof(storeId)!="undefined"&&storeId!=""){storeID=storeId}f+='<dd><a href="ShoppingListSortCmd?catalogId='+parentCatalogID+"&storeId="+storeID+"&listId="+b+"&listType=wishlist&listName="+j+'" title="View My '+t+' list">'+t+"</a></dd>"}}}}if(typeof(storeId)!="undefined"&&storeId!=""){storeID=storeId}var B=unescape($.cookie("MyGoferCartCookie_"+storeID)).split("|");var r=B[0];var G="";G=B[1];if(r==""){r=0}if((typeof(G)!="undefined")&&(G.indexOf(".")!="undefined")&&(G.indexOf(".")!=-1)){G=G.substring(0,G.indexOf(".")+3);
var d=G.indexOf(".");var p=G.substring(d+2);if(p==""){G=G+"0"}if(G.indexOf(".")==0){G="0"+G}}else{if(G==""){G=0}G=G+".00"}if(document.getElementById("pageCheck")&&document.getElementById("pageCheck").value=="THANKYOU"){r=0;G=0;G=G+".00"}D+='<dd><a class="newList" href="##" onclick="createNewListModalHeader();" title="Create New List">Create new'+o+"list </a></dd>";var q='<li><a href="javascript://" title="Click to show cart contents">'+r+" items</a></li>";q+='<li><a href="javascript://" title="Click to show cart contents">$'+G+"</a></li>";$("#itemsTotal").html(q);if(r==0){disableCartLink="true"}else{disableCartLink="false"}if(pageType=="true"){originalMessage=setCartMessage();$("#message").html(originalMessage)}var e=userTypeVal;var g=userTypeId;var A="/shc/s/LogonFormView?storeId=10152&catalogId=10108&langId=-1";A=A+"&URL=MGStarterListCmd";if(e==null||e==""||e=="loggedOut"||g=="G"||g==null||g==""||e==undefined){$("#existingLists").append("<dd>Make your next shopping list online, add it to a scheduled order or checkout right away. Save it and it's ready the next time you need to shop.</dd> <dd>You can also get ideas for special occasions and everyday needs from the starter lists mygofer has ready for you.</dd>"+'<dd><a href="javascript:fnShowLoginModal('+"'MGSTARTERLIST','"+A+"');"+'">Register</a> to manage all your shopping lists.</dd>');if(document.getElementById("existingWishLists")!=null){document.getElementById("existingWishLists").style.display="none"}if(document.getElementById("starterList")!=null){document.getElementById("starterList").style.display="none"}if(document.getElementById("divider")!=null){document.getElementById("divider").style.display="none"}}else{if(e=="C"||e=="P"){$("#existingLists").append(D);f+='<dd><a class="newList" href="##" onclick="createNewWishListModalHeader();" title="Create New List">Create new Wish List </a></dd>';$("#existingWishLists").append(f);if(document.getElementById("starterList")!=null){document.getElementById("starterList").style.display="block"}if(document.getElementById("divider")!=null){document.getElementById("divider").style.display="block"}}}$("dl.expand dt").unbind("click").bind("click",expandDL)}function showHideContainer(b){var d=$(b);if($.browser.msie){d[d.is(":visible")?"fadeOut":"fadeIn"]("slow")}}function showLoginPopup(){fnShowLoginModal("MGSTARTERLIST",$("#manageShopList").val())}function openWindow(e,d,f){var b=window.open(e,d,f);b.focus()}function goGlossary(d){var b=window.open(d,"glossary","height=500,width=300,resizeable,scrollable");b.focus()}function goPrintable(b){var d=window.open(b,"print_win");d.focus()}function validateEmailAddress(b){if(!FED.Util.isValidEmail(b)){return false}else{if(!FED.Util.isValidEmailUser(b)){alert(b+" is not allowed");return false}}return true}function verifyEmailAddresses(f,e){if(f==null||e==null){alert("Email address is required");return false}if(!validateEmailAddress(f)){alert("The e-mail address you entered appears incorrect. (Example of a correct address: sears@sears.com.) Please check your information and try again.");return false}if(!validateEmailAddress(e)){alert("The Confirm Email address you entered appears incorrect. (Example of a correct address: sears@sears.com.) Please check your information and try again.");return false}var b=f.replace(/\+/g,"\\+");var d=new RegExp("^"+b+"$","i");if(e.match(d)==null){alert(" The e-mail addresses you entered below are not the same. Please check your address and try again.");return false}return true}function checkZip(){zip=document.forms["zipForm"].elements["zip"].value;if(!FED.Util.isValidZipcode(zip)){alert("The zipcode you entered is not valid.  Please re-enter zipcode.");return false}else{return true}}function showhideBox(b){$("#"+b).toggle().css({top:"15px",left:"-5px"})}function whereAt(b){var l=document.getElementById("tabContent");var m=l.getElementsByTagName("img");var j=findPosY(document.getElementById("tabContent"));var k=findPosX(document.getElementById("tabContent"));for(var g=0;g<m.length;g++){if(g==b){document.getElementById("prodSpecInfo").style.top=(findPosY(m[g])-j-5)+"px";document.getElementById("prodSpecInfo").style.left=(findPosX(m[g])-k+0)+"px";showBox("prodSpecInfo")}}}initialvalue=6;function selectedsize_fn(e,d,b){chosensize=b;document.getElementById("size").innerHTML=b;document.getElementById("size").innerText=b;identity1=document.getElementById("size_1");identity1.className="unselectedsize";identity2=document.getElementById("size_2");identity2.className="unselectedsize";identity3=document.getElementById("size_3");identity3.className="unselectedsize";identity=document.getElementById(e);identity.className=d;initialvalue=""}var Switch={buttons:function(d){var b=document.getElementById("changeButton");b.firstChild.onclick=function(){switch(d){case"row":Switch.row();Switch.buttons("grid");this.src="img/icons/switch_grid.gif";break;case"grid":Switch.grid();Switch.buttons("row");this.src="img/icons/switch_row.gif";break}}},grid:function(){$("#contentWrapper").attr("className","grid")},row:function(){$("#contentWrapper").attr("className","row")}};function checkSKUSelection(){var d=document.forms.skuForm;for(var b=0;b<d.elements.length;b++){var e=d.elements[b];if(e.type.indexOf("select")!=-1){if(e.selectedIndex<=0){alert("Please select an option for "+e.options[0].value+".");e.focus();return false}}}return true}function submitSKUForm(){if(checkSKUSelection()){document.forms.skuForm.submit()}}function openInstallationCost(b){var d=window.open(b,"install_cost","scrollbars=yes,menubar=yes,toolbar=no,status=no,width=375,height=325,screenX=300,screenY=175");d.focus()}function openShipCalc(b){var d=window.open(b,"ship_calc","resizable=yes,directories=no,scrollbars=yes,menubar=no,toolbar=no,location=no,status=no,width=520,height=450");d.focus()}function openDeliveryCalc(){var b=window.open("/sears/popup_deliverycalc.html","deliver_calc","directories=no,scrollbars=yes,menubar=yes,toolbar=no,status=no,width=545,height=350");b.focus()}function verifyCheckoutParameters(e,f,b){var d;if(e.value==null||e.value==""){alert("Please, enter the password");d=-1;e.focus();return d}else{if(f.value==null||f.value==""){alert("Re-enter password is required field");d=-1;f.focus();return d}else{if(e.value!=f.value){alert("The password and the re-entered password must be the same");d=-1;f.focus();return d}else{if(hint.value==null||hint.value==""){alert("Password hint is required field");d=-1;hint.focus();return d}}}}return d}function hideSelect(b){$("#"+b).hide()}function unhideSelect(b){$("#"+b).show()}function openRebate(j){var f=j.split(","),g=f[f.length-1],b=$("#saveForLater").val(),d=$("body").attr("id");if(d=="vertical"||d=="category"||d=="subcategory"||d=="keysearch"||d=="shopbybrand"||d=="shopbyhome"||d=="hardline"||d=="softline"||d=="dynamiccategory"||d=="compare"||d=="collection"||d=="product"){specialOffers("rebateDet",storeId,catalogId,g)}else{if(b=="YES"){specialOffers("rebateDet",storeId,catalogId,g)}else{var e="RebateDetailsCmd?RebateId="+j+"&storeId="+storeId;window.open(e,"enlargedview","scrollbars=yes,titlebar=no,resizable=no,width=400,height=500")}}}if(window.location.search.match("guide")){$("head").append('<link rel="stylesheet" href="css/delivery_guide.css"><script type="text/javascript" src="js/delivery_guide.js"><\/script><script type="text/javascript" src="js/ifxscrollto.js"><\/script>')}function changeShipMeth(b){$(b).parents(".shipMethod").find("label").removeClass("current");$(b).parent("label").addClass("current")}var foT;var offsetLL="";var $saveStory;$(function(){if(typeof dynamicPopup!="undefined"){$("a.envFees").dynamicPopup({filename:dynamicPopup+"&vName=environmentfee",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"240px"});$("a.disFees").dynamicPopup({filename:dynamicPopup+"&vName=environmentfee",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"240px"});$("a.enviroLink").dynamicPopup({filename:dynamicPopup+"&vName=environmentfee",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"240px"})
}$(".saveStory").each(function(){if($(this).next().attr("class")=="localPrice"){$(this).hide(0)}});if(typeof imagePath!="undefined"&&allRegiSS!="undefined"&&allRegiSS.length){var d='<span class="morePrice">';d+="<div>";d+="<strong>ZIP Code:</strong>";d+='<input type="text" value="'+$.cookie("zipCode")+'" size="5" maxlength="5" />';d+='<img id="totalPriceGoButton" width="36" height="20" alt="go" src="'+imagePath+'img/buttons/auto_price_go.gif" />';d+='<p class="centerInfo">';d+="<strong>Nearest Sears Auto Center</strong>";d+="<br />";d+="Enter your ZIP Code to get the address and phone number.";d+="</p>";d+="</div>";d+="</span>";$("body").append(d)}$(".morePrice").hide(0);var b=0;$(".localPrice").hover(function(){$saveStory=$(this).prev();$(".morePrice").hide(0);offsetLL=$(this).offset();$(".morePrice").show().css({top:offsetLL.top+23,left:offsetLL.left-92});$(".localPrice a").removeClass("over");$(this).find("a").addClass("over");clearTimeout(foT)},function(){foT=setTimeout(function(){$(".morePrice").fadeOut();$(".localPrice a").removeClass("over")},500)});$(".morePrice").hover(function(){clearTimeout(foT)},function(){foT=setTimeout(function(){$(".morePrice").fadeOut();$(".localPrice a").removeClass("over")},500)});$("#cartButtons a:first").click(function(){if(($("body").attr("id")=="hardline")&&(b!=1)){var k=$("#cartButtons").offset();$("#warnLocal").show().css({top:k.top-350,left:k.left-145});$(".localPrice a").addClass("err");$("#warnLocal .okayButton").click(function(){$("#warnLocal").hide(0);$(".localPrice a").removeClass("err")})}});$("#totalPriceGoButton").click(function(){var l=/^\d{5}([\-]\d{4})?$/;var k=$(this).prev();var o=$(this).prev().val();var n=$(this).next();var m=$(this).prev();if(!FED.Util.isValidZipcode(o)){if(o==""||o=="0"){n.html("The Zip Code was blank. Please enter a ZIP Code to Get Local Price.").addClass("errZip")}else{n.html("Please enter a 5-digit U.S. ZIP Code.").addClass("errZip")}k.addClass("errZip")}else{doAjax(o,storeId);$(".centerInfo").html("<strong>Nearest Sears Auto Center</strong><br />Enter your ZIP Code to get the address and phone number.").removeClass("errZip");$(".morePrice").find("input").removeClass("errZip").val(o);$(".localPrice a").addClass("localPSel");if(b==0){if(($("body").attr("id")!="subcategory")){$(".morePrice").css({top:offsetLL.top+m.height()+42})}}$(".saveStory").show();$(".saveStory, p.centerInfo").animate({backgroundColor:"#FFFF99"},100).animate({backgroundColor:"white"},3000);b=1}});var e;if(null!=document.productOptionsDetails){e=document.productOptionsDetails.dynamicPopupPath.value;$("a.envFees").dynamicPopup({filename:e+"&vName=environmentfee",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"240px"});$("a.disFees").dynamicPopup({filename:e+"&vName=environmentfee",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"240px"});$("a.enviroLink").dynamicPopup({filename:e+"&vName=environmentfee",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"140px"});$("img#roadHazard").dynamicPopup({filename:e+"&vName=autohazard",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"240px"});$("img#installationServices").dynamicPopup({filename:e+"&vName=autoinstallation",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"140px"});$("img#maintenanceDetails").dynamicPopup({filename:e+"&vName=automaintenance",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"140px"});$("img#glossAlignment").dynamicPopup({filename:e+"&vName=autoalignment",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"140px"});$("img#glossOil").dynamicPopup({filename:e+"&vName=autooil",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"140px"});$("img#glossBrake").dynamicPopup({filename:e+"&vName=autobrake",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"140px"});$("img#glossInspection").dynamicPopup({filename:e+"&vName=autoinspection",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"140px"})}else{if(typeof dynamicPopupPath!="undefined"&&""!=dynamicPopupPath){e=dynamicPopupPath;if(typeof dynamicPopup!="undefined"&&""!=dynamicPopup){if($("a.enviroLink")[0]!=undefined){$("a.enviroLink").dynamicPopup({filename:e+"&vName=environmentfee",contentname:".enPleaseNote",windowWidth:"300px",windowHeight:"140px"})}}}}$("#totalPriceGoButton").prev().bind("keypress",function(l){var k=l.charCode||l.keyCode;if((k&&k==13)){$(".morePrice div img").click()}});var j=function(){$("#ajaxmodal img.cancelMod").click(function(){curtainOverlay({closing:true})})};function f(n){var l=["00000","11111","33333","66666","77777","88888","99999"];var m=l.length;for(var k=0;k<m;k++){if(l[k]==n){return true}}return false}if(allRegiSS.length>0){var g=getCookie("zipCode");if(g!=""){doAjax(g,storeId);$(".localPrice a").addClass("localPSel")}}tableProductClipper();txt_works();if(($("body").attr("id")=="myProfile")){if((null!=document.getElementById("appVantage"))&&(null!=document.getElementById("appCanVantage"))){$("body").append(appVantage).append(appCanVantage)}$("#modRenewal, #modCancel").hide(0);$(".btnRenewal").click(function(){var k=$(this).offset();$("#modRenewal").show().css({top:k.top-60,left:k.left-5});$(".clModRen").click(function(){$("#modRenewal").hide(0)})});$(".btnCancel").click(function(){var k=$(this).offset();$("#modCancel").show().css({top:k.top-60,left:k.left-182});$(".clModCan").click(function(){$("#modCancel").hide(0)})});var j=function(){$("#ajaxmodal img.cancelMod").click(function(){curtainOverlay({closing:true})})};$(".billAddressMod").click(function(){var k=document.getElementById("storeIdToBeSubmitted").value;var m=document.getElementById("catalogIdToBeSubmitted").value;var l="/shc/s/AddAddressModal?storeId="+k+"&catalogId="+m+"&langId=-1";curtainOverlay({ajaxmodal:true,ajaxclass:"addPayMod"});$.ajax({url:l,cache:false,success:function(n){$("#ajaxmodal").append(n);j()}});$(".addPayMod").centerOnScreen()});$(".editAddressMod").click(function(){var k=document.getElementById("addressChosen").value;var l="";l=populateSelectedAddressValues(k);curtainOverlay({ajaxmodal:true,ajaxclass:"editBillingMod"});$.ajax({url:l,cache:false,success:function(m){$("#ajaxmodal").append(m);j()}});$(".editBillingMod").centerOnScreen()});$(".addPaymentMod").click(function(){var l=document.getElementById("catalogId").value;var k="/shc/s/AddPaymentMethodModal?storeId=10153&catalogId="+l+"&langId=-1";curtainOverlay({ajaxmodal:true,ajaxclass:"addPayMod"});$.ajax({url:k,cache:false,success:function(m){$("#ajaxmodal").append(m);j()}});$(".addPayMod").centerOnScreen()});$(".editPaymentMod").click(function(){var k=document.getElementById("savedPayment").value;var l="";l=populateSelectedCardValues(k);curtainOverlay({ajaxmodal:true,ajaxclass:"editPayMod"});$.ajax({url:l,cache:false,success:function(m){$("#ajaxmodal").append(m);j()}});$(".editPayMod").centerOnScreen()})}});function popupSubmit(){var d=document.getElementById("storeId").value;var j=document.getElementById("langId").value;var g=document.getElementById("catalogId").value;for(i=0;i<document.GRForm.registry.length;i++){if(document.GRForm.registry[i].checked){var e=document.GRForm.registry[i].value;if(e=="create"){var f="&catEntryId_1="+catEntryIdScim+"&quantity_1=1";var b="~";f=f.replace(/&/g,b);window.location="WeddingRegistryCreateView?storeId="+d+"&langId="+j+"&catalogId="+g+"&cattId="+f}else{onRegistry(e)}}}if(document.GRForm.registry.checked){if(document.getElementById("registry").value=="create"){var f="&catEntryId_1="+catEntryIdScim+"&quantity_1=1";var b="~";f=f.replace(/&/g,b);window.location="WeddingRegistryCreateView?storeId="+d+"&langId="+j+"&catalogId="+g+"&cattId="+f}}}function popupWishlistSubmit(){var d=document.getElementById("storeId").value;var j=document.getElementById("langId").value;var g=document.getElementById("catalogId").value;for(i=0;i<document.GRForm.registry.length;i++){if(document.GRForm.registry[i].checked){var e=document.GRForm.registry[i].value;if(e=="create"){var f="&catEntryId_1="+catEntryIdScim+"&quantity_1=1";
var b="~";f=f.replace(/&/g,b);location.href="WeddingWishListCreateView?storeId="+d+"&langId="+j+"&catalogId="+g+"&cattId="+f}else{onWishlist(e)}}}if(document.GRForm.registry.checked){if(document.getElementById("registry").value=="create"){var f="&catEntryId_1="+catEntryIdScim+"&quantity_1=1";var b="~";f=f.replace(/&/g,b);location.href="WeddingWishListCreateView?storeId="+d+"&langId="+j+"&catalogId="+g+"&cattId="+f}}}function ajaxCallForShopCart(e,d,b){$.ajax({url:"GetProductOptionPrices",data:"storeId="+document.ShopCartForm.ajaxStoreId.value+"&catalogId="+document.ShopCartForm.catalogId.value+"&zipCode="+b+"&parentCatId="+e,success:function(m){var j=m.documentElement;var o=j.getElementsByTagName("PAPrices");for(var l=0;l<o.length;l++){var k=o[l].getElementsByTagName("PACatEntryId")[0].childNodes[0].nodeValue;var g=o[l].getElementsByTagName("Price")[0].firstChild.data;var f="pa_price_"+k+"_"+d;var n=document.getElementById(f);n.innerHTML="$"+formatCurrency(g)}},error:function(f){showBox("errorBox");$("#error1").html("Error processing your request, please try again later.")}})}function updateMiniCartDisplay(d,b){$("#items").html(d);$("#miniCartTotal").html("$"+formatCurrencyCheck(b))}function updateMiniCartDisplayLink(d,b){updateMiniCartDisplay(d,b);$("#miniCartLink").attr("href",$("#miniCartURL").val())}function specialOffers(e,f,k,j){var d=document.createElement("div");document.body.appendChild(d);omnDeals(e);d.id="rebateSpecialOffers";curtainOverlay({trans:"0.0",ajaxmodal:true,fade:false,closeonclick:true,ajaxclass:"rebateSpecialOffers",persistmodal:true});var d=$(".rebateSpecialOffers");var b='<link rel="stylesheet" type="text/css" media="all" href="'+imagePath+'css/rebateMessage.css">';var g='<link rel="stylesheet" type="text/css" media="print" href="'+imagePath+'css/rebates_print.css">';$(b).appendTo("head");$(g).appendTo("head");$.ajax({url:$("#saveForLater").val()=="YES"?"https://"+domain+"/shc/s/BrowseSpecialOfferViewHttps":"http://"+domain+"/shc/s/BrowseSpecialOfferView",data:"storeId="+f+"&activeTab="+e+"&catalogId="+k+"&catentryId="+j,success:function(l){$(d).html(l);$("#ajaxmodal").bgiframe().centerOnScreen();$(d).show();$("#curtain").add("#closeWinDeals").unbind().click(function(){$('head link[href *= "rebates_print.css"]').remove();curtainOverlay({closing:true});$("div#rebateSpecialOffers").remove()});rebates_tabs();rebateTabDisp();splFinTabDisp();scrollSize();detailView()}})}function omnDeals(b){if(b=="splOffr"){omPrefix="Special Offer > Deals Popup"}if(b=="splFin"){omPrefix="Special Financing > Deals Popup"}if(b=="rebateDet"){omPrefix="Rebate > Deals Popup"}if(b=="siteWide"){omPrefix="Site Wide > Deals Popup"}s.tl()}function rebateTabDisp(){if($("#intTab3_content").hasClass("visible")){mailInRebateAjax()}}function rebateDisp(){mailInRebateAjax();$("#intTab1_content").removeClass("visible").addClass("notVisible");$("#intTab1").removeClass("active");$("#intTab3_content").removeClass("notVisible").addClass("visible");$("#intTab3").addClass("active")}function splFinTabDisp(){if($("div#intTab2_content").hasClass("visible")){splFinanceAjax("splFinanceTab")}}function mailInRebateAjax(){if($("input#mailInRebPres").val()=="mailInRebatePresent"){$.ajax({url:$("#saveForLater").val()=="YES"?"RebateDetailsCmdSecure":"RebateDetailsCmd",data:"storeId="+storeId+"&RebateId="+$("input#rebateContent").val()+"&dealsPopUp=frmDealsPopUp",success:function(b){$("#pForm").html(b).show()}})}}function splFinanceAjax(b){if($("input#splFinPres").val()=="splFinPresent"){$("input#splFinPres").val("splFinLoaded");$.ajax({url:$("#saveForLater").val()=="YES"?"BrowseStaticPageCmdSecure":"BrowseStaticPageCmd",data:"storeId="+$("input#splFinStoreId").val()+"&catalogId="+$("input#splFinCatalogId").val()+"&langId="+$("input#splFinLangId").val()+"&catalogInd="+$("input#splFinCatalogInd").val()+"&vName="+$("input#splFinVName").val()+"&dzName="+$("input#dzName").val(),success:function(d){$("#splFinDet").html(d);$("#splFinDetails").append(d);$("#splFinDetails").show();if(b=="splOfferTab"){$("#splFinDet").show()}}})}}function rebates_tabs(){$("#dTabs li a").unbind().click(function(){var e=$(this).parent().attr("id"),d="#"+e,g=$(d).siblings(),b=d+"_content",f=$(b).siblings();$(g).removeClass("active");$(d).addClass("active");if($(d)){$(f).removeClass("visible").addClass("notVisible");$(b).removeClass("notVisible").addClass("visible")}})}function scrollSize(){if($("#intTab1_content img.adImg").length==0){$("#intTab1_content div.offerScroll").css({height:307})}}function detailView(){$(".detailHd").addClass("closed");$("a.showDetails").click(function(){if($(this).parent().hasClass("closed")){$(this).parent(".detailHd").removeClass("closed").addClass("open");$(this).text("Hide Details");$(this).parent().next(".details").fadeIn("fast")}else{$(this).parent(".detailHd").removeClass("open").addClass("closed");$(this).text("See Details");$(this).parent().next(".details").fadeOut("fast")}})}function setMinWidth(){var b=function(){},e=$("body").attr("id"),d=(e=="checkout"||e=="checkoutFLOW")?1030:1020;if($.browser.msie&&parseInt($.browser.version,10)==6){b=function(){var g=document.documentElement.offsetWidth<d-3?"auto":"hidden",f=document.documentElement.offsetWidth<d?d:"auto";$("html").css("overflow-x",g);$((e=="checkout"||e=="checkoutFLOW")?"#content":"#header").width(f)};if(e!="compare"){if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",b);window.attachEvent("onresize",b)}}}}function headerRadioEnable(){if(typeof userTypeVal!="undefined"&&(userTypeVal=="C"||userTypeVal=="P")){var b=checkCurrStore();if(b=="G"){if(document.getElementById("storePickUpRadio")){document.getElementById("storePickUpRadio").style.display="block"}if(document.getElementById("deliveryRadio")){document.getElementById("deliveryRadio").style.display="block"}}}}function fetchHeaderDetails(b,e){headerRadioEnable();if(typeof edgeCaching!="undefined"&&edgeCaching=="ON"&&typeof bodyIdKey!="undefined"){if(bodyIdKey=="MAINPAGE"||bodyIdKey=="COMPARE"||bodyClassKey=="STARTER_LIST"||bodyClassKey=="EVENT_LIST"||bodyIdKey=="KEYSEARCH"||bodyIdKey=="PRODUCT"||bodyIdKey=="VERTICAL"||bodyIdKey=="SUBCATEGORY"||bodyIdKey=="CATEGORY"||bodyIdKey=="NONBROWSE"||bodyIdKey=="DAP"){var d="";if(pageContextType=="https"){d="FetchHeaderDetails?storeId="+b+"&catalogId="+e+"&langId=-1&shcapiBypassSSO=true"}else{d="FetchHeaderDetails?storeId="+b+"&catalogId="+e+"&langId=-1&shcapiBypassSSO=true"}request=$.getJSON(d,returncheck)}}}var userTypeId;if(typeof edgeCaching!="undefined"&&edgeCaching=="ON"){var userTypeVal;var locationId;var defaultLocId;var unitNoFrmLoc;var currentDomainName;var isOrderHistory;var nextScheduleDate;var regTypeAtoStl;var designatedStore;var isOrgUser;var requestType;var getUserIdFromCookie;var tempCurrVal;var siteToStoreEnabledStores;var varstsStore;var requestType;var getUserIdFromCookie}function returncheck(j){var u=j;var k=u.isGoferPlusMember;var x=u.registerType;var b=u.firstName;var E=u.populateStore;isOrgUser=u.isOrgUser;var l=u.quantity;userTypeId=x;var t=u.quickshop_url;var n=u.port;var f=u.quickshopListFromDB;var J=u.domain;var g=u.selectedStore;var F=u.selectedStoreUnit;tempCurrVal=checkCurrStore();userTypeVal=u.userTypeVal;locationId=u.locationId;defaultLocId=u.defaultLocId;unitNoFrmLoc=u.unitNoFrmLoc;currentDomainName=u.currentDomainName;isOrderHistory=u.isOrderHistory;nextScheduleDate=u.fmtnextScheduleDate;var y=u.shoppingListsIdDesc;siteToStoreEnabledStores=u.siteToStoreEnabledStores;varstsStore="false";var d=siteToStoreEnabledStores.split(",");for(var A=0;A<d.length;A++){if(d[A]==F){varstsStore="true";break}}document.getElementById("strShoppingList").value=y;document.getElementById("userid").value=getUserIdFromCookie;showSignature(b,x);showRecommendations(b,x);showOrdersTab(x);if(isOrderHistory=="true"){$("#hasOrders").show()}document.getElementById("quickshopListFromDB").value=f;document.getElementById("port").value=n;document.getElementById("qsAction").value=t;document.getElementById("domain").value=J;
var e="";if(typeof f!="undefined"&&f!=""){var B=f.split("|");for(A=0;A<B.length;A++){if(B[A]!=""){e+="<dd>"+B[A]+'<a class="qs-remove" href="javascript:;"></a></dd>'}}$("dl#searchTerms").append(e);$("#searchTerms dd").bind("click",moveQuickSearch)}var o="MyGoferCartCookie_"+storeId;var v=getCookie(o).split("|");if(typeof v=="undefined"||v==""){var r=l.split("|");if(r!=""){var C=r[0];var I=r[1];var H=C+"|"+I;setCookie(o,H,"/")}}if(typeof isOrgUser!="undefined"&&isOrgUser=="true"){if(typeof userTypeVal!="undefined"&&locationId!=""&&typeof g!="undefined"&&g!=""&&typeof unitNoFrmLoc!="undefined"&&unitNoFrmLoc!=""&&typeof F!="undefined"){showOrgDeliveryMessaging(u,x);document.getElementById("organizationUser").style.display="block";document.getElementById("pubUser").style.display="none";document.getElementById("orgUserDisplay").style.display="block";if(tempCurrVal=="G"){if(document.getElementById("storePickUpRadio")){document.getElementById("storePickUpRadio").style.display="block"}if(document.getElementById("deliveryRadio")){document.getElementById("deliveryRadio").style.display="block"}}else{if(document.getElementById("storePickUpRadio")){document.getElementById("storePickUpRadio").style.display="none"}if(document.getElementById("deliveryRadio")){document.getElementById("deliveryRadio").style.display="none"}}$("#notOrgUser").remove();$("#pubUser").remove()}else{document.getElementById("notOrgUser").style.display="block";document.getElementById("pubUser").style.display="block";$("#orgUserDisplay").remove();$("#organizationUser").remove()}}else{$("#orgUserDisplay").remove();$("#organizationUser").remove();document.getElementById("notOrgUser").style.display="block";document.getElementById("pubUser").style.display="block"}updateHeader();var q="MyGoferShoppingListCookie_"+storeId+"_"+getUserIdFromCookie;var D=getCookie(q);if(typeof D=="undefined"||D==""){var H=y;setCookie(q,H,"/shc/s/")}if(k==true){if(document.getElementById("goferPlusLogo")){document.getElementById("goferPlusLogo").style.display=""}}initPageLoadMyChoiceSmartCart();if(typeof E!="undefined"&&E!=""){populateStore(isOrgUser)}loginEmailId=u.loginEmailId;if(loginEmailId!=null&&loginEmailId!=""&&loginEmailId.indexOf("#")!=-1){loginEmailId=loginEmailId.substring(0,loginEmailId.indexOf("#"))}$("#intEmail").val(loginEmailId);$("#feedbackEmailMeAddress").val(loginEmailId);$("#emailAddressFeedback").val(loginEmailId);if(typeof bodyIdKey!="undefined"){if(bodyIdKey=="KEYSEARCH"||bodyIdKey=="SUBCATEGORY"){var m=getCookieWrapper("searchPreferences");var G="";G=m.gridIndicator;if(G!="undefined"&&G!="aisleview"){if(typeof callsearchResults!="undefined"){callsearchResults()}}}else{if(bodyIdKey=="PRODUCT"){setProductPageActions()}else{if(bodyIdKey=="COMPARE"){for(var A=0;A<=countId;A++){displayMcGoferOrderlinks(A)}}}}}else{if(bodyClassKey=="STARTER_LIST"||bodyClassKey=="EVENT_LIST"){if(MGStoreType=="K"&&bodyClassKey!="EVENT_LIST"){if(isOrderHistory=="true"){document.getElementById("AddToOrder_1").style.display="block";document.getElementById("AddToOrder_2").style.display="block"}else{document.getElementById("AddToOrder_1").style.display="none";document.getElementById("AddToOrder_2").style.display="none"}}else{if(MGStoreType=="G"){if(isOrderHistory=="true"){document.getElementById("AddToOrder_1").style.display="block";document.getElementById("AddToOrder_2").style.display="block"}else{document.getElementById("AddToOrder_1").style.display="none";document.getElementById("AddToOrder_2").style.display="none"}}}changeLCStorePriceAvl();$(function(){bindAllCheckBoxes()})}}if(typeof firstTimeDropDown!="undefined"&&firstTimeDropDown!=""){if(firstTimeDropDown=="storeFound"){$("a#storeSelected").click()}if(firstTimeDropDown=="national"){$("#mystoreInfoModuleId").html('<a href="javascript:;" class="closeWin">Close</a><p>mygofer hasn\'t made it to your neighborhood quite yet.  We hope to be there soon! '+"In the meantime, you can still shop online and have your mygofer stuff shipped directly to you.</p>"+'<p><a class="mystoreChangeStore" href="javascript:fnClose();launchMapModal(10161,\'BROWSE\');">Click here</a> to find mygofer locations.</p>');var w=($(".myStoreHeader").position());$("#mystore-pop").addClass("popUpLayer").css({position:"absolute",left:w.left,top:w.top}).show()}}mygoferAlertsAjaxCall()}function showSignature(b,d){if(typeof b!="undefined"&&b!=""&&typeof d!="undefined"&&d!=""&&d=="R"){document.getElementById("showGuestUser").style.display="none";document.getElementById("showRegisteredUser").style.display="block";$("span.mgUserName").html(b+".")}else{if(typeof b!="undefined"&&b==""&&typeof d!="undefined"&&d!=""&&d=="R"){document.getElementById("showGuestUser").style.display="none";document.getElementById("showRegisteredUser").style.display="block";$("span.mgUserName").html("!")}else{if(typeof bodyIdKey!="undefined"&&bodyIdKey!="login"){document.getElementById("showGuestUser").style.display="block";document.getElementById("showRegisteredUser").style.display="none"}}}}function showRecommendations(b,d){if(typeof b!="undefined"&&b!=""&&typeof d!="undefined"&&d=="R"){$("#checkRecommendations").show()}}function showOrdersTab(k){if(typeof k!="undefined"&&k=="R"){var f=$("#openOrder").val();var j=$("#orderHistoryUrl").val();var b=$("#orderItemHistory").val();var f=$("#openOrder").val();regTypeAtoStl="R";$("#ordersNav").html('<a class="base myOrders" title="my orders" href="javascript:;">myorders</a> '+'<ul class="submenu"><li><dl class="expand expanded"><dd><a href='+f+">Open Orders</a><dd>"+"<a href="+j+'>Order History</a></dd><div id="hasOrders" style="display:none"><dd>'+"<a href="+b+">Reorder from Past Purchases</a></dd> </div><dd><a href="+f+">Go to Order Center</a></dd>"+"</dl></li></ul>").click(function(){var o="/shc/s/OpenOrdersView?storeId="+storeId+"&catalogId="+catalogId+"&langId="+document.HeaderForm.langId.value;if($.browser.msie&&parseInt($.browser.version,10)==6){setTimeout(function(){window.location.replace(o)},100)}else{window.location.replace(o)}})}else{var n=$("#trackOrderStatusURL").val();var g=$("#openOrdersLoginURL").val();var m=document.getElementById("ordersNav");var l="MGORDERLOGIN";var e=[];var d="TrackOrderStatus";m.innerHTML="";e.push('<a class="base myOrders" title="my orders" href="javascript:fnShowLoginModal(');e.push("'");e.push(l);e.push("'");e.push(",");e.push("'");e.push(g);e.push("'");e.push(');" title="my orders" class="base myOrders">myorders</a>');e.push('<ul class="submenu"><li><dl class="expand expanded"><dd>Check your <a href="javascript:fnShowLoginModal(');e.push("'");e.push(d);e.push("'");e.push(",");e.push("'");e.push(n);e.push("'");e.push(');">Order Status</a></dd><dd><a href="javascript:fnShowLoginModal(');e.push("'");e.push(l);e.push("'");e.push(",");e.push("'");e.push(g);e.push("'");e.push(');">Register</a> to manage all your orders.</dd>');e.push("</dl></li></ul>");orders=e.join("");$("#ordersNav").html(orders);regTypeAtoStl="G"}}function populateStore(d){if(fnCheckCookie()){if(tempCurrVal=="G"){}else{dynamicDispAvailMsgInHeaderKmartStore(d)}if(storeName==null||storeName==""){storeName=" "}if(city!=null&&city.length&&state!=null&&state.length){var b="<span class=yesLogin>";b+='<a id="storeSelected" class="locationAddress" href="javascript:;">'+storeName.titleCase()+", "+street.titleCase()+", "+city.titleCase()+", "+state.toUpperCase()+"</a>";b+="</span>";$("p#storeHeader").html(b)}}bindStore();if(typeof pageContextType!="undefined"){$("a#storeSelected").dynamicPopup({filename:(pageContextType=="http"?"storeSelectorCmdHTTP":"storeSelectorCmd")+"?storeId="+getStoreId(),contentname:"#storeSelect",windowWidth:"240px",windowHeight:"auto"})}}function redirectURLWhileLogin(){var g=document.location.href;var m=g.split("/");var l=m[m.length-1].split("?");var j=l[0];if(j!="ChangePassword"){var b=$.cookie("TransferURL");if(b!=""&&b!=null){$.cookie("TransferURL","");var k=replaceAll(b,"~","=");var d=k.split("?");var o=d[0];var f=k.split("/");f=f[f.length-1].split("?");var n=f[0];
var e="qs_${WCParam.storeId}_${WCParam.catalogId}";if(n==e){qsCookie=getCookie("quickshop_10152");qsCookieSplit=qsCookie.split("%");firstSearchItem=qsCookieSplit[0];URLSplitForqsi=b.split("|");lastItemInURL=URLSplitForqsi[URLSplitForqsi.length-1];o=o+"?keyword="+firstSearchItem+"&qsMode=search&qsi=0";if(lastItemInURL=="true"){document.location.href=o}else{document.location.href=k}}else{if(n!="MyProfileView"){if(n!="HomePageView"){if(n!="LogonFormView"){if(n!="OrderStatusView"){document.location.href=k}}}}}}}}function changeOrgStatus(b){var d="";if(typeof isOrgUser!="undefined"&&isOrgUser=="true"){if(typeof userTypeVal!="undefined"&&userTypeVal=="C"){document.cookie="mcOrgUser=atMyOrg"}else{if(typeof userTypeVal!="undefined"&&userTypeVal=="P"){document.cookie="mcOrgUser=atTheStore"}}}if(window.location.protocol=="https:"){d=$('input[name="pageFrom"]').val()=="ThankYouForm"?"shc/s/OrgNameCmd?":"OrgNameCmd?"}else{d="OrgNameCmdhttp?"}$.ajax({url:d,data:"UPDATE=Y&UPDATEVALUE="+b+"&storeId="+storeId,success:refreshCurrentPage})}function refreshCurrentPage(b){if(window.location.href.indexOf(storeId)!=-1){if($('input[name="pageFrom"]').val()=="pharmacyLanding"){window.location="mgh_10161_21651"}else{window.location.reload()}}}function setProductPageActions(){isSPUOnlyProduct();checkNearByStores();checkSPUProductActions();if(pickUpVar==1){CALLER_PAGE_NAME="PRODUCT_PAGE"}displayListlink();makeRTIPriceAvailabilityInq();if(storeIdReq=="10161"||storeIdReq=="10175"){if(typeof _Pd!="undefined"){if(typeof _Pd.prod.prodList!="undefined"){displayMsgAttributes(_Pd.prod.prodList)}}getRadioButtonValue();if(document.addToCart.IndicatorA.value!=""&&document.addToCart.IndicatorA.value!="delivery"){$("#pd_msg_enterZip").hide();$("#pd_msg_enterZip_msg").hide();$("#pd_msg_new").hide()}}else{$("#pd_msg_enterZip").hide();$("#pd_msg_enterZip_msg").hide();$("#pd_msg_new").hide()}}$(function(){if($.browser.msie&&parseInt($.browser.version,10)==6){try{document.execCommand("BackgroundImageCache",false,true)}catch(d){}}$("body").css("position","relative");setMinWidth();menuZindex();$(".shipMethod").find("input:radio").click(function(){changeShipMeth(this)});if(typeof dynamicPopupPath!="undefined"&&dynamicPopupPath!=""){if(typeof dynamicPopup!="undefined"&&""!=dynamicPopup){$("div.preOrderSelect a").dynamicPopup({filename:dynamicPopupPath+"&vName=PresellDetails",contentname:".preOrderNote",windowWidth:"400px",windowHeight:"375px"});$("a.preOrderLink").dynamicPopup({filename:dynamicPopupPath+"&vName=PresellDetails",contentname:".preOrderNote",windowWidth:"400px",windowHeight:"375px"})}}if(userTypeVal=="P"||userTypeVal=="C"){redirectURLWhileLogin()}$(".pricing-div").delegate("a.greatPrice","click",function(){var l,k=$(this),j=k.offset();$("#greatPrice").remove();l=$('<div id="greatPrice" class="floatWindow"></div').appendTo("body");l.html('<p onclick="remove(this.parentNode);"><a href="javascript:;" class="closeWindow">Close</a></p>'+'<br clear="all" />'+"<p>"+this.getAttribute("info")+"</p>").css({top:j.top+k.height()+10,left:j.left-l.width()+k.width()+60})});var b=function(){var e=($(window).scrollTop()+($(window).height())/2-100)+"px";$("#createNewShoppingList").css({top:e,zIndex:"7000"})};$(".addToList").click(function(){b()});$("#createNewShoppingList").clone(true).appendTo("body");$("#createNewShoppingList:first").remove();b();$(".addToCart").click(function(){$("#smartCartWrapper").show();$("#cartLink").css("background-position","-267px -41px")});if(typeof(currentView)!="undefined"&&currentView=="LogonFormView"){if($("#loginLink").length){$("#log").hide()}}$(".shipMethod").find("input:radio").click(function(){changeShipMeth(this)})});function fnZeroLandingLogin(d){var e=document.getElementById("ajaxmodal");if(typeof e!="undefined"&&e.value!=""){e.style.display="none";var b=document.getElementById("curtain");if(typeof b!="undefined"&&b.value!=""){b.style.display="none"}showLoginModalPopup(d)}}function showLoginModalPopup(e){var f=document.location.href;f=encodeURIComponent(f);var b=document.getElementById("loginURL");if(typeof b!="undefined"&&b.value!=""){urlVal=b.value}var d=urlVal+"&URL="+f;if(f.indexOf("%3F")==-1){d+=encodeURIComponent("?loginStatus=login")}else{d+=encodeURIComponent("&loginStatus=login")}d+="&screenName="+e;fnShowLoginModal(e=="REG"?"REG":"LOGIN",d)}function dynamicDispAvailMsgInHeaderGoferStore(r){var u="",m="Today",j=document.TimeZone,g=j.storeOpeningTime.value/3600,k=j.storeClosingTime.value/3600,q=j.storeProcessingTime.value,l=new Date(),b=(l.getTime()+(l.getTimezoneOffset()*60000)+TimezoneOffset*3600000),f=new Date(b),p=(f.getHours()+"."+f.getMinutes())*1,n=b+7200000,t=new Date(n),o=t.getHours(),e=t.getMinutes(),d=(o+"."+e)*1;if(d>g&&p>g&&d<k){u=o===0?"12":(""+(o>12?o-12:o))+(e<10?":0":":")+e;u+='<span class="ampm">'+(o>=12?" PM":" AM")+"</span>";m="Today"}else{if(p<=g){u=q;m="Today"}else{if(d>=g||p>=g){u=q;m="Tomorrow"}}}$("#mgTodaySelectId #mgToday").text(m.toUpperCase());$("#messagePickUp").html("Get it Now, "+m+" or Later").show()}function dynamicDispAvailMsgInHeaderKmartStore(msgVal){var storeOpeningTime="";if(document.TimeZone.storeOpeningTime!=null){storeOpeningTime=document.TimeZone.storeOpeningTime.value}var displayTime="",dynamicAvailabilityDay="today",storeOpeningTimeSec=storeOpeningTime/3600,storeClosingTime=document.TimeZone.storeClosingTime.value,storeClosingTimeSec=storeClosingTime/3600,storeProcessingTime=document.TimeZone.storeProcessingTime.value,localTime=new Date(),ms=(localTime.getTime()+(localTime.getTimezoneOffset()*60000)+TimezoneOffset*3600000),time=new Date(ms),hour=time.getHours(),minute=time.getMinutes(),checkTime=hour+"."+minute,ms1=ms+7200000,time1=new Date(ms1),hour1=time1.getHours(),minute1=time1.getMinutes(),currentTime=hour1+"."+minute1,curTime1=""+((hour1>12)?hour1-12:hour1);if(hour1==0){curTime1="12"}curTime1+=((minute1<10)?":0":":")+minute1;curTime1+='<span class="ampm">';curTime1+=(hour1>=12)?" PM":" AM";curTime1+="</span>";if((eval(currentTime)>eval(storeOpeningTimeSec))&&(eval(checkTime)>eval(storeOpeningTimeSec))&&(eval(currentTime)<eval(storeClosingTimeSec))){displayTime=curTime1;dynamicAvailabilityDay="today"}else{if(eval(checkTime)<=eval(storeOpeningTimeSec)){displayTime=storeProcessingTime;dynamicAvailabilityDay="today"}else{if((eval(currentTime)>=eval(storeOpeningTimeSec))||(eval(checkTime)>=eval(storeOpeningTimeSec))){displayTime=storeProcessingTime;dynamicAvailabilityDay="tomorrow"}}}if(msgVal=="true"){$(".mgTodaySelect #mgToday").text(dynamicAvailabilityDay.toUpperCase())}else{if($(".mgTodaySelect #mgToday").text().toUpperCase()!=dynamicAvailabilityDay.toUpperCase()){$(".mgTodaySelect #mgToday").text(dynamicAvailabilityDay.toUpperCase())}}$("#messagePickUp").html("Order now, and pick up at the store after "+displayTime+" "+dynamicAvailabilityDay).show()}(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,j){d.fx.step[j]=function(k){if(k.state==0){k.start=e(k.elem,j);k.end=f(k.end)}k.elem.style[j]="rgb("+[Math.max(Math.min(parseInt((k.pos*(k.end[0]-k.start[0]))+k.start[0]),255),0),Math.max(Math.min(parseInt((k.pos*(k.end[1]-k.start[1]))+k.start[1]),255),0),Math.max(Math.min(parseInt((k.pos*(k.end[2]-k.start[2]))+k.start[2]),255),0)].join(",")+")"}});function f(g){var j;if(g&&g.constructor==Array&&g.length==3){return g}if(j=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(j[1]),parseInt(j[2]),parseInt(j[3])]}if(j=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(j[1])*2.55,parseFloat(j[2])*2.55,parseFloat(j[3])*2.55]}if(j=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(j[1],16),parseInt(j[2],16),parseInt(j[3],16)]}if(j=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(j[1]+j[1],16),parseInt(j[2]+j[2],16),parseInt(j[3]+j[3],16)]}return b[d.trim(g).toLowerCase()]
}function e(g,k){var j;do{j=d.curCSS(g,k);if(j!=""&&j!="transparent"||d.nodeName(g,"body")){break}k="backgroundColor"}while(g=g.parentNode);return f(j)}var b={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);function fn_kw_checkKeyword(o,d,f){var p="";var q=0;var e=window.location.href;var t=document.getElementById("SSO_FLAGID").value;if($.browser.msie){if(document.MG2SearchForm!=null){if(e.indexOf("/bmi_proxy/")!=-1){q=e.indexOf("/bmi_proxy/")+11;p=e.substring(0,q)}document.MG2SearchForm.action=p+"/shc/s/"+d}}else{if($("body").is(".gecko")||$("body").is(".chrome")){if(document.MG2SearchForm!=null){if(t=="ON"){document.MG2SearchForm.action="/shc/s/"+d}else{document.MG2SearchForm.action=d}}}else{if(document.MG2SearchForm!=null){if(t=="ON"){document.MG2SearchForm.action=o+"/"+d}else{document.MG2SearchForm.action=d}}}}if($("#seoEnabledGlobal").length>0&&$("#seoEnabledGlobal").val()=="Y"){var m=document.MG2SearchForm.action;if(m.indexOf("/shc/s")>-1){m=m.replace("/shc/s","")}document.MG2SearchForm.action=m}var j=null;if(document.keywordForm!=null){j=document.keywordForm.keyword}else{if(document.MG2SearchForm!=null){j=document.MG2SearchForm.search}}var g=$("#nonLoggedinHomePage").val();if(typeof g!="undefined"&&"true"==g){if(document.MG2SearchForm!=null){j=document.MG2SearchForm.keyword}}var r=j.value;var l=0;var b="";var n=3;$("body").children("div.ac_results").find("ul").find("li").each(function(){if(r!=this.selectValue){l++;if(b!=""){b=b+"|"}b=b+this.selectValue;if(l==n){return false}}});if(b!=""){$("#MG2SearchForm").append("<input type='hidden' name='relatedwords' value='"+b+"'/>")}if(r==null||r.length==0||r=="Find your item"){return false}else{r=r.replace(/^\s+/,"");r=r.replace(/\s+$/,"");if(r!=null&&r.length>0&&!r.match(/\d+/)){r=r.toLowerCase()}j.value=r;return true}return false}function imageNA(b){b.src=jspStoreImgDir+"ue/swatches/na.gif"};
 /*   /opt/SVNBAAD/source/ECOM_REL_7-Dec-2011_20120104_1550_541_static/wcs-static/StaticWeb/WebContent/StaticContent/Mygofer/js/dod.js:407345   */
var isDodAvailable="",isStoreDodAvailable="",dodStoreQuantity="",dodStoreStockStatus="",dodStorePickAvl="",dodStoreShipAvl="",dodStoreChildCatentry="",dodStorePartNumber="",dodStorePrice="",dodStoreCatentryInOrder="",isSiteDodAvailable="",dodQuantity="",dodStockStatus="",dodPickAvl="",dodShipAvl="",dodChildCatentry="",dodPartNumber="",dodPrice="",dodRegularPrice="",dodStoreRegularPrice="",dodCatentryInOrder="",DEFAULT_COUNTRY_CODE="US",DEFAULT_CURRENCY_SYMBOL="USD",i18nCookieData=null,zipCode="",clipPageFlag="",moacpEnabled="",stopTime="",dodItem="NO",isDODPhase1Enable="OFF";function fetchDodDetails(b,h){if($.cookie("selectedStore")){var f=$.cookie("selectedStore").split("|");unitNo=f[0]}var a=$("#clipperTool").val();if(typeof a!="undefined"&&a!=null&&a=="true"){clipPageFlag="true"}else{clipPageFlag="false"}if(typeof isDODPhase1Enabled=="undefined"){isDODPhase1Enable="OFF"}else{isDODPhase1Enable=isDODPhase1Enabled}var e=window.location.href;if(typeof dodEnable!="undefined"&&dodEnable=="TRUE"&&(bodyIdKey=="MAINPAGE"||bodyIdKey=="PRODUCT"||bodyIdKey=="KEYSEARCH"||bodyClassKey=="ORDER_DETAILS"||(bodyIdKey=="SUBCATEGORY"&&!(e.indexOf("shc/s/qs_")>-1))||bodyClassKey=="SHOPPING_LIST"||bodyClassKey=="STARTER_LIST"||bodyIdKey=="LIST_CENTER"||(bodyIdKey=="VERTICAL"&&!(e.indexOf("shc/s/v_")>-1))||bodyIdKey=="CATEGORY"||bodyIdKey=="COMPARE"||bodyIdKey=="SAVINGS_CENTER")){if(clipPageFlag!="true"){var d="";if(typeof gup!="undefined"){d=gup("pastOrderItemSelected")}if((bodyIdKey=="MAINPAGE"||bodyIdKey=="PRODUCT"||bodyIdKey=="KEYSEARCH"||bodyIdKey=="SUBCATEGORY"||bodyClassKey=="ORDER_DETAILS"||bodyIdKey=="LIST_CENTER"||bodyClassKey=="LIST_CENTER"||bodyIdKey=="VERTICAL"||bodyIdKey=="CATEGORY"||bodyIdKey=="COMPARE"||bodyIdKey=="SAVINGS_CENTER")&&isDODPhase1Enable=="ON"&&d!="true"){var g=$("#lcHomePage").val();var c=$("#pgName").val();if((typeof g=="undefined"||g==null||g=="false")&&(typeof c=="undefined"||c==null||c!="SCEcouponPage")){$.ajax({dataType:"json",url:pageContextType=="https"?"/shc/s/FetchDealOfTheDayDetails":"/shc/s/FetchDealOfTheDayDetails",data:"storeId="+b+"&catalogId="+h+"&storeUnitNo="+unitNo+"&langId=-1&shcapiBypassSSO=true"+(bodyClassKey=="ORDER_DETAILS"&&(typeof orderId!="undefined")?"&orderId="+orderId:""),success:returnFunctionDod})}}else{if(d!="true"){if(typeof c=="undefined"||c==null||c!="SCEcouponPage"){$.ajax({dataType:"json",url:pageContextType=="https"?"/shc/s/FetchDodDetails":"/shc/s/FetchDodDetails",data:"storeId="+b+"&catalogId="+h+"&storeUnitNo="+unitNo+"&langId=-1&shcapiBypassSSO=true"+(bodyClassKey=="ORDER_DETAILS"&&(typeof orderId!="undefined")?"&orderId="+orderId:""),success:returnFunctionDod})}}}}}}function getFormCatentryId(){var a=document.addToCart;if(a){return a.catEntryId_1.value}else{return null}}function returnFunctionDod(H){if(typeof(TECAjax)!="undefined"){TECAjax()}var k=[],x,C,I,D,c,e;if(typeof imagePath=="undefined"){imagePath=$("#imagePath").val()}e='<img src="'+imagePath+'images/{0}" alt="{1}" class="{2}" />';dodEnable=H.dodEnable;isDodAvailable=H.isDodAvailable;isStoreDodAvailable=H.isStoreDodAvailable;dodStoreQuantity=H.dodStoreQuantity;dodStoreParentCatentry=H.dodStoreParentCatentry;dodStoreChildCatentry=H.dodStoreChildCatentry;dodStorePartNumber=H.dodStorePartNumber;w=H.dodStorePrice;if(w!=""){w=(w*1).toFixed(2)}dodStoreCatentryInOrder=H.dodStoreCatentryInOrder;dodStoreStockStatus=H.dodStoreStockStatus;dodStorePickAvl=H.dodStorePickAvl;dodStoreShipAvl=H.dodStoreShipAvl;isSiteDodAvailable=H.isSiteDodAvailable;dodQuantity=H.dodQuantity;dodParentCatentry=H.dodParentCatentry;dodChildCatentry=H.dodChildCatentry;dodPartNumber=H.dodPartNumber;j=H.dodPrice;if(j!=""){j=(j*1).toFixed(2)}dodPriceCopy=j;dodStoreCatentryInOrder=H.dodStoreCatentryInOrder;dodSiteCatentryInOrder=H.dodSiteCatentryInOrder;dodStockStatus=H.dodStockStatus;dodPickAvl=H.dodPickAvl;dodShipAvl=H.dodShipAvl;dodSiteChildCatentry=H.dodSiteChildCatentry;dodStoreCatentryInOrder=H.dodStoreCatentryInOrder;siteOrderItemIds=H.siteOrderItemIds;storeOrderItemIds=H.storeOrderItemIds;resFfmSite=H.resFfmSite;resFfmStore=H.resFfmStore;dodStoreRegularPrice=H.dodStoreRegularPrice;if(dodStoreRegularPrice!=""){dodStoreRegularPrice=(dodStoreRegularPrice*1).toFixed(2)}dodRegularPrice=H.dodRegularPrice;if(dodRegularPrice!=""){dodRegularPrice=(dodRegularPrice*1).toFixed(2)}dodStoremaxLimit=H.dodStoremaxLimit;dodSitemaxLimit=H.dodSitemaxLimit;moacpEnabled=H.moacpEnabled;dodLdElig=H.dodLdElig;dodOrgDelElig=H.dodOrgDelElig;var u=$("#newHP2HomePage").val();var B=$("#hpPhaseIIVal").val();if(!(bodyIdKey=="PRODUCT")&&(typeof u!="undefined"&&u=="ON")||(typeof B!="undefined"&&B=="true")){var d=function(J,i){if(isDODPhase1Enable=="ON"){$("#deal-wrap").find(".deal-time-left").countdown({until:new Date(i),timezone:dodTimezoneOffset,format:"HMS",alwaysExpire:true,onExpiry:function(){$(J).hide()}})}else{$("#deal-wrap").find(".deal-time-left").countdown({until:new Date(i),timezone:TimezoneOffset,format:"HMS",alwaysExpire:true,onExpiry:function(){$(J).hide()}})}}}else{var d=function(J,i){if(isDODPhase1Enable=="ON"){$("#defaultCountdown").countdown({until:new Date(i),timezone:dodTimezoneOffset,format:"HMS",alwaysExpire:true,onExpiry:function(){$(J).hide()}})}else{$("#defaultCountdown").countdown({until:new Date(i),timezone:TimezoneOffset,format:"HMS",alwaysExpire:true,onExpiry:function(){$(J).hide()}})}}}var F=function(i){return String.format(e,i.img||"spacer.gif",i.alt||"",typeof i.cls=="string"?i.cls:"dotdSubCat")};if(dodEnable=="TRUE"){if(isDodAvailable=="true"){var v="p_"+storeId+"_"+catalogId+"_"+H.dodPartNumber;var p="p_"+storeId+"_"+catalogId+"_"+H.dodStorePartNumber;if(bodyIdKey=="PRODUCT"){$("#dodStorePrice, #dodStoreSavings, #dodStoreOrigPrice, #dodPrice, #dodSavings, #dodOrigPrice, .limitedItems").remove();$("#dotdProduct").html("");$("#summary .saveStory").find(".pricing, .origPrice, .savings, .youPay, .callout").show();var m=getFormCatentryId();if(isDODPhase1Enable=="ON"){if(isStoreDodAvailable=="true"&&(m==H.dodStoreChildCatentry||$("#partnumber").val()==dodStorePartNumber)){k.push('<div id="dotd"><div class="time_left" id="dotd_module_hot_banner">');k.push('<img src="'+imagePath+'/img/deal_like_hot.png">');if(dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){k.push('<div class="dotd_time_left"><p class="dotd_title_01 legend">Time left to Save</p><p class="time"><span id="defaultCountdown"></span></p></div>');k.push('</div><p style="margin: 0pt 0pt 0pt 10px; font-size: 18px;" class="dotd_title_01" id="product_Store_dealIsOn_message">This deal is only available at your store.</p></div>')}else{k.push("</div></div>")}k.push('<div class="dotdTimeLeft">');if(dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){D=(dodStoreRegularPrice-w).toFixed(2);w=(w*1).toFixed(2);$("#summary .saveStory").find(".pricing, .origPrice, .savings, .youPay, .callout").hide();if(H.dodStoreProductType=="VARIATION"){if(dodStoremaxLimit!="999"){$("#summary .saveStory").append('<div class="origPrice" id="dodStoreOrigPrice">Reg Price:$'+dodStoreRegularPrice+"</div>"+'<div class="savings" id="dodStoreSavings">Savings:$'+D+"</div>"+'<div class="youPay" id="dodStorePrice"><span class="finalPrice">$'+w+"</span></div>"+'<span class="limitedItems">*This Deal of the Day has a limit of '+dodStoremaxLimit+"per order<br /> ** Deal Applicable only at this Store</span>");if($("#dodStoreOrigP").length==0){$("#mainInfoCol2").append('<input type="hidden" id="dodStoreOrigP" value="Reg Price:$'+dodStoreRegularPrice+'"/><input type="hidden" id="dodStoreS" value="Savings:$'+D+'"/><input type="hidden" id="dodStoremaxLimit" value="*This Deal of the Day has a limit of '+dodStoremaxLimit+' per order" onlyAtThisStore />')}}else{$("#summary .saveStory").append('<div class="origPrice" id="dodStoreOrigPrice">Reg Price:$'+dodStoreRegularPrice+"</div>"+'<div class="savings" id="dodStoreSavings">Savings:$'+D+"</div>"+'<div class="youPay" id="dodStorePrice"><span class="finalPrice">$'+w+"</span></div>"+'<span class="limitedItems">* Limited quantity Available at this Price <br /> ** Deal Applicable only at this Store</span>');
if($("#dodStoreOrigP").length==0){$("#mainInfoCol2").append('<input type="hidden" id="dodStoreOrigP" value="Reg Price:$'+dodStoreRegularPrice+'"/><input type="hidden" id="dodStoreS" value="Savings:$'+D+'"/><input type="hidden" id="dodStoremaxLimit" value="* Limited quantity Available at this Price " onlyAtThisStore />')}}}else{if(dodStoremaxLimit!="999"){$("#summary .saveStory").append('<div class="origPrice" id="dodStoreOrigPrice">Reg Price:$'+dodStoreRegularPrice+"</div>"+'<div class="savings" id="dodStoreSavings">Savings:$'+D+"</div>"+'<div class="youPay" id="dodStorePrice"><span class="finalPrice">$'+w+"</span>"+'<span class="limitedItems">*This Deal of the Day has a limit of '+dodStoremaxLimit+"per order<br /> ** Deal Applicable only at this Store</span></div>");if($("#dodStoreOrigP").length==0){$("#mainInfoCol2").append('<input type="hidden" id="dodStoreOrigP" value="Reg Price:$'+dodStoreRegularPrice+'"/><input type="hidden" id="dodStoreS" value="Savings:$'+D+'"/><input type="hidden" id="dodStoremaxLimit" value="*This Deal of the Day has a limit of '+dodStoremaxLimit+' per order" onlyAtThisStore />')}}else{$("#summary .saveStory").append('<div class="origPrice" id="dodStoreOrigPrice">Reg Price:$'+dodStoreRegularPrice+"</div>"+'<div class="savings" id="dodStoreSavings">Savings:$'+D+"</div>"+'<div class="youPay" id="dodStorePrice"><span class="finalPrice">$'+w+"</span>"+'<span class="limitedItems">* Limited quantity Available at this Price <br /> ** Deal Applicable only at this Store</span></div>');if($("#dodStoreOrigP").length==0){$("#mainInfoCol2").append('<input type="hidden" id="dodStoreOrigP" value="Reg Price:$'+dodStoreRegularPrice+'"/><input type="hidden" id="dodStoreS" value="Savings:$'+D+'"/><input type="hidden" id="dodStoremaxLimit" value="* Limited quantity Available at this Price " onlyAtThisStore />')}}}}else{k.push('<span class="dotdSoldOut" style="color: #C71818;font-size: 20px;" >SOLD OUT</span>');$("#specialOffers").hide()}$("#dotdProduct").html(k.join(""));stopTime=H.dodStoreStopTime;dodItem="YES";if(typeof dodTimezoneOffset!="undefined"&&typeof offsetDefined!="undefined"&&offsetDefined=="YES"){d("#dotdProduct, #specialOffers",H.dodStoreStopTime)}$("#dotdProduct").show()}else{if(isSiteDodAvailable=="true"&&($.cookie("selectedStore")!=null||dodShipAvl=="true")&&(m==H.dodChildCatentry||$("#partnumber").val()==dodPartNumber)){k.push('<div id="dotd"><div class="time_left" id="dotd_module_hot_banner">');k.push('<img src="'+imagePath+'/img/deal_like_hot.png">');if(dodQuantity>0&&H.dodStockStatus=="true"){k.push('<div class="dotd_time_left"><p class="dotd_title_01 legend">Time left to Save</p><p class="time"><span id="defaultCountdown"></span></p></div>');k.push('</div><p style="margin: 0pt 0pt 0pt 10px; font-size: 18px;" class="dotd_title_01" id="product_Site_dealIsOn_message">This deal is on, buy soon.</p></div>')}else{k.push("</div></div>")}k.push('<div class="dotdTimeLeft">');if(dodQuantity>0&&H.dodStockStatus=="true"){D=(dodRegularPrice-j).toFixed(2);j=(j*1).toFixed(2);$("#summary .saveStory").find(".pricing, .origPrice, .savings, .youPay, .callout").hide();$("#summary .saveStory").append('<div class="origPrice" id="dodOrigPrice">Reg Price:$'+dodRegularPrice+"</div>"+'<div class="savings" id="dodSavings">Savings:$'+D+"</div>");if(H.dodSiteProductType=="VARIATION"){if(dodSitemaxLimit!="999"){$("#summary .saveStory").append('<div class="youPay" id="dodPrice"><span class="finalPrice">$'+j+"</span></div>"+'<span class="limitedItems">*This Deal of the Day has a limit of'+dodSitemaxLimit+"per order</span>");if($("#dodStoreOrigP").length==0){$("#mainInfoCol2").append('<input type="hidden" id="dodStoreOrigP" value="Reg Price:$'+dodRegularPrice+'"/><input type="hidden" id="dodStoreS" value="Savings:$'+D+'"/><input type="hidden" id="dodStoremaxLimit" value="*This Deal of the Day has a limit of '+dodSitemaxLimit+' per order" />')}}else{$("#summary .saveStory").append('<div class="youPay" id="dodPrice"><span class="finalPrice">$'+j+"</span></div>"+'<span class="limitedItems">*Limited Quantity available at this Price+</span>');if($("#dodStoreOrigP").length==0){$("#mainInfoCol2").append('<input type="hidden" id="dodStoreOrigP" value="Reg Price:$'+dodRegularPrice+'"/><input type="hidden" id="dodStoreS" value="Savings:$'+D+'"/><input type="hidden" id="dodStoremaxLimit" value="*Limited Quantity available at this Price" />')}}}else{if(dodSitemaxLimit!="999"){$("#summary .saveStory").append('<div class="youPay" id="dodPrice"><span class="finalPrice">$'+j+"</span>"+'<span class="limitedItems">*This Deal of the Day has a limit of'+dodSitemaxLimit+"per order</span></div>");if($("#dodStoreOrigP").length==0){$("#mainInfoCol2").append('<input type="hidden" id="dodStoreOrigP" value="Reg Price:$'+dodRegularPrice+'"/><input type="hidden" id="dodStoreS" value="Savings:$'+D+'"/><input type="hidden" id="dodStoremaxLimit" value="*This Deal of the Day has a limit of '+dodSitemaxLimit+' per order" />')}}else{$("#summary .saveStory").append('<div class="youPay" id="dodPrice"><span class="finalPrice">$'+j+"</span>"+'<span class="limitedItems">*Limited Quantity available at this Price+</span></div>');if($("#dodStoreOrigP").length==0){$("#mainInfoCol2").append('<input type="hidden" id="dodStoreOrigP" value="Reg Price:$'+dodRegularPrice+'"/><input type="hidden" id="dodStoreS" value="Savings:$'+D+'"/><input type="hidden" id="dodStoremaxLimit" value="*Limited Quantity available at this Price" />')}}}}else{k.push('<span class="dotdSoldOut" style="color: #C71818;font-size: 20px;">SOLD OUT</span>');$("#specialOffers").hide()}$("#dotdProduct").html(k.join(""));stopTime=H.dodStopTime;dodItem="YES";if(typeof dodTimezoneOffset!="undefined"&&typeof offsetDefined!="undefined"&&offsetDefined=="YES"){d("#dotdProduct, #specialOffers",H.dodStopTime)}$("#dotdProduct").show()}else{if(isSiteDodAvailable=="true"&&($.cookie("selectedStore")==null&&dodShipAvl!="true")&&(m==H.dodChildCatentry||$("#partnumber").val()==dodPartNumber)){$("#specialOffers").hide()}}}}else{if(isStoreDodAvailable=="true"&&m==H.dodStoreChildCatentry){k.push('<span class="dotdTitle"><br />'+F({img:"dotd-home.gif",alt:"MyStore Deal of the day",cls:""})+"</span>");k.push('<div class="dotdTimeLeft">');if(dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){D=(dodStoreRegularPrice-w).toFixed(2);w=(w*1).toFixed(2);k.push('<span class="dotdTimeLeft">TIME LEFT:</span><span id="defaultCountdown"></span>');$("#summary .saveStory").find(".pricing, .origPrice, .savings, .youPay, .callout").hide();if(dodStoremaxLimit!="999"){$("#summary .saveStory").append('<div class="origPrice" id="dodStoreOrigPrice">Reg Price:$'+dodStoreRegularPrice+"</div>"+'<div class="savings" id="dodStoreSavings">Savings:$'+D+"</div>"+'<div class="youPay" id="dodStorePrice"><span class="finalPrice">$'+w+"</span>"+'<span class="limitedItems">*This Deal of the Day has a limit of '+dodStoremaxLimit+"per order<br /> ** Deal Applicable only at this Store</span></div>")}else{$("#summary .saveStory").append('<div class="origPrice" id="dodStoreOrigPrice">Reg Price:$'+dodStoreRegularPrice+"</div>"+'<div class="savings" id="dodStoreSavings">Savings:$'+D+"</div>"+'<div class="youPay" id="dodStorePrice"><span class="finalPrice">$'+w+"</span>"+'<span class="limitedItems">* Limited quantity Available at this Price <br /> ** Deal Applicable only at this Store</span></div>')}}else{k.push('<span class="dotdSoldOut">SOLD OUT</span>');$("#specialOffers").hide()}$("#dotdProduct").html(k.join(""));d("#dotdProduct, #specialOffers",H.dodStoreStopTime);$("#dotdProduct").show()}else{if(isSiteDodAvailable=="true"&&m==H.dodChildCatentry){k.push('<span class="dotdTitle"><br />'+F({img:"dotd-home.gif",alt:"MyGofer Deal of the day",cls:""})+"</span>");k.push('<div class="dotdTimeLeft">');if(dodQuantity>0&&H.dodStockStatus=="true"){D=(dodRegularPrice-j).toFixed(2);j=(j*1).toFixed(2);k.push('<span class="dotdTimeLeft">TIME LEFT:</span><span id="defaultCountdown"></span>');$("#summary .saveStory").find(".pricing, .origPrice, .savings, .youPay, .callout").hide();
$("#summary .saveStory").append('<div class="origPrice" id="dodOrigPrice">Reg Price:$'+dodRegularPrice+"</div>"+'<div class="savings" id="dodSavings">Savings:$'+D+"</div>");if(dodSitemaxLimit!="999"){$("#summary .saveStory").append('<div class="youPay" id="dodPrice"><span class="finalPrice">$'+j+"</span>"+'<span class="limitedItems">*This Deal of the Day has a limit of'+dodSitemaxLimit+"per order</span></div>")}else{$("#summary .saveStory").append('<div class="youPay" id="dodPrice"><span class="finalPrice">$'+j+"</span>"+'<span class="limitedItems">*Limited Quantity available at this Price+</span></div>')}}else{k.push('<span class="dotdSoldOut">SOLD OUT</span>');$("#specialOffers").hide()}$("#dotdProduct").html(k.join(""));d("#dotdProduct, #specialOffers",H.dodStopTime);$("#dotdProduct").show()}}}if(isStoreDodAvailable=="true"){$("#similarItems_dod_"+H.dodStorePartNumber,"#similarItems_dod_"+H.dodPartNumber).show()}}else{if(bodyIdKey=="KEYSEARCH"||bodyIdKey=="SUBCATEGORY"||bodyIdKey=="VERTICAL"){if(isDODPhase1Enable=="ON"){if(isStoreDodAvailable=="true"&&dodStoreQuantity>0){var l=H.dodStorePartNumber.substring(0,H.dodStorePartNumber.length-1);D=(dodStoreRegularPrice-w).toFixed(2);w=(w*1).toFixed(2);if($("#pro_"+l+"P").length){c=$("#pro_"+l+"P");if(c.length&&c.find(".cardProdTitle").length){c.find(".cardProdTitle").before('<div class="only_today_label">Today Only</div>')}else{if(c.find(".searchQvBtn").length){c.find(".searchQvBtn").before('<div class="only_today_label">Today Only</div>')}}c.find(".cardProdPricing").html('<span class="price">$'+w+'</span><span class="oldPrice">$'+dodStoreRegularPrice+"</span>");c.find(".cardProdPricingFull").html('<span style="font-weight: bold; font-size: 13px; margin-bottom: 7px;">Price Details</span><div class="origPrice"><span class="text">Compare at </span><span class="pricing"><del> $'+dodStoreRegularPrice+'</del></span></div><div class="savings"><span class="text">Save: </span><span class="pricing"> $'+D+'</span></div><div class="youPay"><span class="pricing"> $'+w+"</span>")}else{if($("#pro_"+l).length){C=$("#pro_"+l+" div.cardImgCont");if(C.length){C.find(".searchQvBtn").before('<div class="only_today_label">Today Only</div>');$("#pro_"+l).find(".cardProdPricing").html('<span class="price">$'+w+'</span><span class="oldPrice" style="display: none;">$'+dodStoreRegularPrice+"</span>")}}else{if($("#brandName_"+l+"P").length){c=$("#brandName_"+l+"P").parent("div .cardContainer");if(c.length&&c.find(".cardProdTitle").length){c.find(".cardProdTitle").before('<div class="only_today_label">Today Only</div>')}else{if(c.find(".searchQvBtn").length){c.find(".searchQvBtn").before('<div class="only_today_label">Today Only</div>')}}c.find(".cardProdPricing").html('<span class="price">$'+w+'</span><span class="oldPrice">$'+dodStoreRegularPrice+"</span>");c.find(".cardProdPricingFull").html('<span style="font-weight: bold; font-size: 13px; margin-bottom: 7px;">Price Details</span><div class="origPrice"><span class="text">Compare at </span><span class="pricing"><del> $'+dodStoreRegularPrice+'</del></span></div><div class="savings"><span class="text">Save: </span><span class="pricing"> $'+D+'</span></div><div class="youPay"><span class="pricing"> $'+w+"</span>")}}}}if(isSiteDodAvailable=="true"&&($.cookie("selectedStore")!=null||dodShipAvl=="true")&&dodQuantity>0){var h=H.dodPartNumber.substring(0,H.dodPartNumber.length-1);D=(dodRegularPrice-j).toFixed(2);j=(j*1).toFixed(2);if($("#pro_"+h+"P").length){c=$("#pro_"+h+"P");if(c.length&&c.find(".cardProdTitle").length){c.find(".cardProdTitle").before('<div class="only_today_label">Today Only</div>')}else{if(c.find(".searchQvBtn").length){c.find(".searchQvBtn").before('<div class="only_today_label">Today Only</div>')}}c.find(".cardProdPricing").html('<span class="price">$'+j+'</span><span class="oldPrice"> $'+dodRegularPrice+"</span>");c.find(".cardProdPricingFull").html('<span style="font-weight: bold; font-size: 13px; margin-bottom: 7px;">Price Details</span><div class="origPrice"><span class="text">Compare at </span><span class="pricing"><del> $'+dodRegularPrice+'</del></span></div><div class="savings"><span class="text">Save: </span><span class="pricing"> $'+D+'</span></div><div class="youPay"><span class="pricing"> $'+j+"</span>")}else{if($("#pro_"+h).length){C=$("#pro_"+h+" div.cardImgCont");if(C.length){C.find(".searchQvBtn").before('<div class="only_today_label">Today Only</div>');$("#pro_"+h).find(".cardProdPricing").html('<span class="price">$'+j+'</span><span class="oldPrice" style="display: none;"> $'+dodRegularPrice+"</span>")}}else{if($("#brandName_"+h+"P").length){c=$("#brandName_"+h+"P").parent("div .cardContainer");if(c.length&&c.find(".cardProdTitle").length){c.find(".cardProdTitle").before('<div class="only_today_label">Today Only</div>')}else{if(c.find(".searchQvBtn").length){c.find(".searchQvBtn").before('<div class="only_today_label">Today Only</div>')}}c.find(".cardProdPricing").html('<span class="price">$'+j+'</span><span class="oldPrice"> $'+dodRegularPrice+"</span>");c.find(".cardProdPricingFull").html('<span style="font-weight: bold; font-size: 13px; margin-bottom: 7px;">Price Details</span><div class="origPrice"><span class="text">Compare at </span><span class="pricing"><del> $'+dodRegularPrice+'</del></span></div><div class="savings"><span class="text">Save: </span><span class="pricing"> $'+D+'</span></div><div class="youPay"><span class="pricing"> $'+j+"</span>")}}}}}else{$(".dotdSubCat, #dodStorePrice, #dodPrice").remove();if(isSiteDodAvailable=="true"){if(dodQuantity>0){var h=H.dodPartNumber.split("P")[0];if($("#pro_"+h).length){c=$("#pro_"+h+" div.av-photo");if(c.length){k.push(c.html());c.html(F({alt:"Mygofer Deal of the Day",img:"dotd-subcat.gif"})+"<br />"+k.join(""));$("#pro_"+h+" div.av-price").hide();$("#pro_"+h+" div").append('<div class="av-price" id="dodPrice"> $'+j+"</div>")}else{C=$("#pro_"+h+" div.photoSwatchContainer div.photo a");k.push(C.html());C.html(F({alt:"Mygofer Deal of the Day",img:"dotd-subcat.gif"})+"<br />"+k.join(""));x=$("#pro_"+h+" div.saveStory");x.find("div.youPay, div.origPrice, div.savings").hide();x.append('<div class="youPay bl" id="dodPrice"> <span class="pricing"> $'+j+"</span> </div>")}}}}if(isStoreDodAvailable=="true"){if(dodStoreQuantity>0){var l=H.dodStorePartNumber.split("P")[0];if($("#pro_"+l).length){c=$("#pro_"+l+" div.av-photo");if(c.length){k.push(c.html());c.html(F({alt:"Mystore Deal of the Day",img:"dotd-subcat.gif"})+"<br />"+k.join(""));$("#pro_"+l+" div.av-price").hide();$("#pro_"+l+" div").append('<div class="av-price" id="dodStorePrice"> $'+w+"</div>")}else{C=$("#pro_"+l+" div.photoSwatchContainer div.photo a");k.push(C.html());C.html(F({alt:"Mystore Deal of the Day",img:"dotd-subcat.gif"})+"<br />"+k.join(""));x=$("#pro_"+l+" div.saveStory");x.find("div.youPay, div.origPrice, div.savings").hide();x.append('<div class="youPay bl" id="dodStorePrice"><span class="pricing"> $'+w+"</span></div>")}}}}}}else{if(bodyClassKey=="SHOPPING_LIST"||bodyIdKey=="LIST_CENTER"||bodyClassKey=="LIST_CENTER"){if(isDODPhase1Enable=="ON"){if(isStoreDodAvailable=="true"){if(bodyIdKey=="LIST_CENTER"){var l=H.dodStorePartNumber.substring(0,H.dodStorePartNumber.length-1);if($("#"+l).length){c=$("#"+l);D=(dodStoreRegularPrice-w).toFixed(2);w=(w*1).toFixed(2);dodStoreRegularPrice=(dodStoreRegularPrice*1).toFixed(2);if(c.find(".prod").length){c.find(".prod").after('<div class="only_today_label">Today Only</div>');c.find(".cardProdPricing").html('<span class="price">$'+w+'</span><span class="oldPrice"> $'+dodStoreRegularPrice+"</span>");c.find(".cardProdPricingFull").html('<span style="font-weight: bold; font-size: 13px; margin-bottom: 7px;">Price Details</span><div class="origPrice"><span class="text">Reg Price: </span><span class="pricing"><del> $'+dodStoreRegularPrice+'</del></span></div><div class="savings"><span class="text">Savings: </span><span class="pricing"> $'+D+'</span></div><div class="youPay"><span class="pricing"> $'+w+"</span>")
}}}else{var l=H.dodStorePartNumber.substring(0,H.dodStorePartNumber.length-1);if($("#"+l+"P").length){c=$("#"+l+"P");if(c.find(".prod").length){c.find(".prod").after('<div class="only_today_label">Today Only</div>')}}}}if(isSiteDodAvailable=="true"&&($.cookie("selectedStore")!=null||dodShipAvl=="true")){if(bodyIdKey=="LIST_CENTER"){var h=H.dodPartNumber.substring(0,H.dodPartNumber.length-1);if($("#"+h).length){C=$("#"+h);D=(dodRegularPrice-j).toFixed(2);dodRegularPrice=(dodRegularPrice*1).toFixed(2);j=(j*1).toFixed(2);if(C.find(".prod").length){C.find(".prod").after('<div class="only_today_label">Today Only</div>');C.find(".cardProdPricing").html('<span class="price">$'+j+'</span><span class="oldPrice"> $'+dodRegularPrice+"</span>");C.find(".cardProdPricingFull").html('<span style="font-weight: bold; font-size: 13px; margin-bottom: 7px;">Price Details</span><div class="origPrice"><span class="text">Reg Price: </span><span class="pricing"><del> $'+dodRegularPrice+'</del></span></div><div class="savings"><span class="text">Savings: </span><span class="pricing"> $'+D+'</span></div><div class="youPay"><span class="pricing"> $'+j+"</span>")}}}else{var h=H.dodPartNumber.substring(0,H.dodPartNumber.length-1);if($("#"+h+"P").length){C=$("#"+h+"P");if(C.find(".prod").length){C.find(".prod").after('<div class="only_today_label">Today Only</div>')}}}}}else{$(".dotdSubCat").remove();if(isStoreDodAvailable=="true"){k.push($("#prodImage_"+dodStoreChildCatentry).parent().html());$("#prodImage_"+dodStoreChildCatentry).parent().html(F({alt:"Mystore Deal of the Day",img:"dotd-subcat.gif"})+k.join(""));I=$("#ksn_"+dodStoreChildCatentry).val();$("#sstory_"+I).html(w)}if(isSiteDodAvailable=="true"){k.push($("#prodImage_"+dodChildCatentry).parent().html());$("#prodImage_"+dodChildCatentry).parent().html(F({alt:"Deal of the Day",img:"dotd-subcat.gif"})+k.join(""));I=$("#ksn_"+dodChildCatentry).val();c.find(".cardProdPricing").html('<span class="price">$'+j+'</span><span class="oldPrice"> $'+dodRegularPrice+"</span>");c.find(".cardProdPricingFull").html('<span style="font-weight: bold; font-size: 13px; margin-bottom: 7px;">Price Details</span><div class="origPrice"><span class="text">Reg Price: </span><span class="pricing"><del> $'+dodRegularPrice+'</del></span></div><div class="savings"><span class="text">Savings: </span><span class="pricing"> $'+D+'</span></div><div class="youPay"><span class="pricing"> $'+j+"</span>")}}}else{if(bodyClassKey=="STARTER_LIST"){$(".dotdSubCat").remove();if(isStoreDodAvailable=="true"){k.push($("#prodImage_"+dodStoreChildCatentry).parent().html());$("#img_"+dodStoreChildCatentry).parent().html(F({alt:"Mystore Deal of the Day",img:"dotd-subcat.gif"})+k.join(""));$("#price_"+dodStoreChildCatentry).html(w)}if(isSiteDodAvailable=="true"&&($.cookie("selectedStore")!=null||dodShipAvl=="true")){k.push($("#prodImage_"+dodChildCatentry).parent().html());$("#img_"+dodChildCatentry).parent().html(F({alt:"Deal of the Day",img:"dotd-subcat.gif"})+k.join(""));$("#price_"+dodStoreChildCatentry).html(j)}}else{if(bodyIdKey=="COMPARE"){if(isStoreDodAvailable=="true"){var l=H.dodStorePartNumber.substring(0,H.dodStorePartNumber.length-1);c=$("#"+l);if($("#"+l).length){var D=(dodStoreRegularPrice-w).toFixed(2);var w=(w*1).toFixed(2);$("#ss_"+l+"P_top").find("div[id^='pricing_']").html('<div class="origPrice"><span class="text">Reg Price: </span><span class="pricing"><del>$'+dodStoreRegularPrice+'</del></span></div><div class="savings"><span class="text">Savings: </span><span class="pricing youpay">$'+D+'</span></div><div class="youPay"><span class="pricing">$'+w+"</span></div></div>");$("#ss_"+l+"P_bottom").find(".titles").html('<div class="origPrice"><span class="text">Reg Price: </span><span class="pricing"><del>$'+dodStoreRegularPrice+'</del></span></div><div class="savings"><span class="text">Savings: </span><span class="pricing youpay">$'+D+'</span></div><div class="youPay"><span class="pricing">$'+w+"</span></div></div>")}}if(isSiteDodAvailable=="true"&&($.cookie("selectedStore")!=null||dodShipAvl=="true")){var h=H.dodPartNumber.substring(0,H.dodPartNumber.length-1);c=$("#"+h);if($("#"+h).length){var D=(dodRegularPrice-j).toFixed(2);var j=(j*1).toFixed(2);$("#ss_"+h+"P_top").find("div[id^='pricing_']").html('<div class="origPrice"><span class="text">Reg Price: </span><span class="pricing"><del>$'+dodRegularPrice+'</del></span></div><div class="savings"><span class="text">Savings: </span><span class="pricing youpay">$'+D+'</span></div><div class="youPay"><span class="pricing">$'+j+"</span></div></div>");$("#ss_"+h+"P_bottom").find(".titles").html('<div class="origPrice"><span class="text">Reg Price: </span><span class="pricing"><del>$'+dodRegularPrice+'</del></span></div><div class="savings"><span class="text">Savings: </span><span class="pricing youpay">$'+D+'</span></div><div class="youPay"><span class="pricing">$'+j+"</span></div></div>")}}}else{if(bodyIdKey=="MAINPAGE"){var u=$("#newHP2HomePage").val();var B=$("#hpPhaseIIVal").val();if((typeof u!="undefined"&&u=="ON")||(typeof B!="undefined"&&B=="true")){if(isStoreDodAvailable=="true"&&$.cookie("selectedStore")!=null){if(isDODPhase1Enable=="ON"){$("#dod-banners-wrap").hide();x=(H.dodStorePrice*1).toFixed(2);k.push('<a href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1" escapeXml="false"><div class="deal-header"><p class="title">');k.push(H.dodStoreBrandName+" "+H.dodStoreItemName);k.push("</p></div></a>");var t=(H.dodStorePartNumber).replace(/P$/g,"");var E=(H.dodStoreImageUrl);k.push('<div class="deal-body">');k.push('<div class="deal-info">');k.push('<p class="deal-price">$'+x+"</p>");if(H.dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){k.push('<div class="deal-buy">');if(H.dodStoreProductType=="VARIATION"){k.push('<a class="buy-button" href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1"><span>Buy Now</span></a>')}else{k.push('<a class="buy-button" href="javascript:dodAddToCart();"><span>Buy Now</span></a>')}k.push("</div>")}else{k.push('<div class="dod-sold-out" style="color: #C71818;">SOLD OUT</div>')}if(H.dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){k.push('<div class="deal-time"><span>Time Left </span>');k.push('<span class="deal-time-left"></span>');k.push("</div>")}var f=(dodStoreRegularPrice-x).toFixed(2);var b=(f/dodStoreRegularPrice)*100;k.push('<div class="deal-price-details"><p class="regular-price">Reg Price <span>$'+dodStoreRegularPrice+'</span></p><p class="savings">Savings <span>$'+f+'</span></p><p class="discount">Discount <span>'+b.toFixed(0)+"%</span></p></div>");k.push('<div class="deal-share"><ul><li class="deal-facebook"><a target="_blank" href="http://www.facebook.com/sharer/sharer.php?s=100&p[title]=Check%20out%20todays%20Deal%20of%20the%20Day%20%3A%20'+H.dodStoreBrandName+" "+H.dodStoreItemName+"&p[url]=http%3A%2F%2Fwww.mygofer.com%2FFBDealOfTheDay&p[images][0]="+scene7URL+E+'"></a>');var n=H.dodStoreBrandName;var r=H.dodStoreItemName;n=encodeURI(n);n=n.replace("%E2%84%A2","");n=n.replace("%AE","");n=decodeURI(n);r=encodeURI(r);r=r.replace("%E2%84%A2","");r=r.replace("%AE","");r=decodeURI(r);var A=r;if(A.length>40){A=A.substring(0,40)}k.push('</li><li class="deal-twitter"><a target="_blank" href="http://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.mygofer.com%2FTWDealOfTheDay%0A%0A&text=Check%20out%20todays%20Deal%20of%20the%20Day%20%3A%20'+n+","+A+' http://bit.ly/ue4v0M"></a>');k.push("</li></ul></div>");k.push("</div>");k.push('<div class="deal-image"><a href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1"><img width="170px" height="170px" src="');k.push(scene7URL+E+'?hei=170&amp;wid=170&amp;op_sharpen=1&amp;qlt=65" /></a></div>');k.push("</div>");$(".deal-of-the-day").html(k.join("")).show();stopTime=H.dodStoreStopTime;dodItem="YES";if(typeof dodTimezoneOffset!="undefined"&&typeof offsetDefined!="undefined"&&offsetDefined=="YES"){d(".deal-of-the-day",H.dodStoreStopTime)}}}else{if(isSiteDodAvailable=="true"&&($.cookie("selectedStore")!=null||dodShipAvl=="true")){if(isDODPhase1Enable=="ON"){$("#dod-banners-wrap").hide();
x=(H.dodPrice*1).toFixed(2);k.push('<a href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1"><div class="deal-header"><p class="title">');k.push(H.dodBrandName+" "+H.dodItemName);k.push("</p></div></a>");var E=(H.dodImageUrl);k.push('<div class="deal-body">');k.push('<div class="deal-info">');k.push('<p class="deal-price">$'+x+"</p>");if(H.dodQuantity>0&&H.dodStockStatus=="true"){k.push('<div class="deal-buy">');if(H.dodStoreProductType=="VARIATION"){k.push('<a class="buy-button" href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1"><span>Buy Now</span></a>')}else{k.push('<a class="buy-button" href="javascript:dodAddToCart();"><span>Buy Now</span></a>')}k.push("</div>")}else{k.push('<div class="dod-sold-out" style="color: #C71818;">SOLD OUT</div>')}if(H.dodQuantity>0&&H.dodStockStatus=="true"){k.push('<div class="deal-time"><span>Time Left </span>');k.push('<span class="deal-time-left"></span>');k.push("</div>")}var g=(dodRegularPrice-x).toFixed(2);var b=(g/dodRegularPrice)*100;k.push('<div class="deal-price-details"><p class="regular-price">Reg Price <span>$'+dodRegularPrice+'</span></p><p class="savings">Savings <span>$'+g+'</span></p><p class="discount">Discount <span>'+b.toFixed(0)+"%</span></p></div>");k.push('<div class="deal-share"><ul><li class="deal-facebook"><a target="_blank" href="http://www.facebook.com/sharer/sharer.php?s=100&p[title]=Check%20out%20todays%20Deal%20of%20the%20Day%20%3A%20'+H.dodBrandName+" "+H.dodItemName+"&p[url]=http%3A%2F%2Fwww.mygofer.com%2FFBDealOfTheDay&p[images][0]="+scene7URL+E+'"></a>');var n=H.dodBrandName;var r=H.dodItemName;n=encodeURI(n);n=n.replace("%E2%84%A2","");n=n.replace("%AE","");n=decodeURI(n);r=encodeURI(r);r=r.replace("%E2%84%A2","");r=r.replace("%AE","");r=decodeURI(r);var A=r;if(A.length>40){A=A.substring(0,40)}k.push('</li><li class="deal-twitter"><a target="_blank" href="http://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.mygofer.com%2FTWDealOfTheDay%0A%0A&text=Check%20out%20todays%20Deal%20of%20the%20Day%20%3A%20'+n+" "+A+' http://bit.ly/ue4v0M"></a>');k.push("</li></ul></div>");k.push("</div>");k.push('<div class="deal-image"><a href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1"><img width="170px" height="170px" src="');k.push(scene7URL+E+'?hei=170&amp;wid=170&amp;op_sharpen=1&amp;qlt=65" /></a></div>');k.push("</div>");$(".deal-of-the-day").html(k.join("")).show();stopTime=H.dodStopTime;dodItem="YES";if(typeof dodTimezoneOffset!="undefined"&&typeof offsetDefined!="undefined"&&offsetDefined=="YES"){d(".deal-of-the-day",H.dodStopTime)}}}else{$(".deal-of-the-day").html(F({img:"dotd-home.gif",alt:"Deal of the day",cls:""})+"<p>There is no Deal available today. Please check later!!</p>").hide();$("#dod-banners-wrap").show()}}}else{if(typeof newHomePage!="undefined"&&newHomePage=="ON"){if(isStoreDodAvailable=="true"&&$.cookie("selectedStore")!=null){if(isDODPhase1Enable=="ON"){x=(H.dodStorePrice*1).toFixed(2);k.push('<a href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1"><h2 id="dodh2">');k.push("Deal it like its hot");if(H.dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){k.push('<span class="dod-countdown" style="background:url('+imagePath+'/img/bk.png) repeat-x scroll 0 0 transparent;">Time Left:<span id="dod-countdown-time" class="hasCountdown">');k.push('<span class="countdown_row countdown_amount" id="defaultCountdown"></span></span></span>')}else{k.push('<span class="dod-countdown">Sold Out</span>')}k.push("</h2></a>");var t=(H.dodStorePartNumber).replace(/P$/g,"");var E=(H.dodStoreImageUrl);k.push('<div class="product_image">');k.push('<a href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1"><img src="');k.push(scene7URL+E+'?hei=77&amp;wid=77&amp;op_sharpen=1&amp;qlt=65" alt="product image" width="77" height="77" /></a>');k.push('<div class="social">');k.push('<a title="Share on Facebook" class="btn facebook" href="http://www.facebook.com/sharer/sharer.php?s=100&p[title]=Check%20out%20todays%20Deal%20of%20the%20Day%20%3A%20'+H.dodStoreBrandName+" "+H.dodStoreItemName+"&p[url]=http%3A%2F%2Fwww.mygofer.com%2FFBDealOfTheDay&p[images][0]="+scene7URL+E+'" target="_blank"></a>');k.push('<a title="Share on Twitter" class="btn twitter" href="http://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.mygofer.com%2FTWDealOfTheDay%0A%0A&text=Check%20out%20todays%20Deal%20of%20the%20Day%20%3A%20'+H.dodStoreBrandName+" "+H.dodStoreItemName+'" target="_blank"></a>');k.push("</div>");k.push("</div>");k.push('<p class="dod-prd-title">');k.push('<a href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1" escapeXml="false">');k.push(H.dodStoreBrandName+" "+H.dodStoreItemName);k.push("</a></p>");k.push('<div class="dod-cols clearfix">');k.push('<p class="product_price">');k.push('<span class="price">$'+x+"</span>");if(H.dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){k.push('<div class="dod-atc-col" style="float: right;" >');if(H.dodStoreProductType=="VARIATION"){k.push('<a id="a_dod-atc" class="btn-blue btn-blue-85" href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1">Buy now</a>')}else{k.push('<a id="a_dod-atc" class="btn-blue btn-blue-85" href="javascript:dodAddToCart();">Buy now</a>')}k.push("</div>")}else{k.push('<div class="dod-atc-col dod-prd-title" style="color: #C71818;">SOLD OUT</div>')}k.push("</p>");var f=(dodStoreRegularPrice-x).toFixed(2);var b=(f/dodStoreRegularPrice)*100;k.push('</div><div class="savings"><div class="detail"><p class="price">$'+dodStoreRegularPrice+'</p> REG PRICE</div><div class="detail"><p class="price">$'+f+'</p> SAVINGS</div><div class="detail"><p class="price">'+b.toFixed(0)+"%</p> DISCOUNT</div></div>");if(H.dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){k.push('<br><br><p id="product_Store_dealIsOn_message" class="dotd_title_01" style="font-weight: bold; font-style: italic;color: #C71818; margin: -1pt 5pt 5pt 100px; font-size: 12px;">This deal is only available at your store.</p>')}$("#mod_dealOfTheDay").html(k.join("")).show();d("#mod_dealOfTheDay",H.dodStoreStopTime)}else{x=(H.dodStorePrice*1).toFixed(2);k.push('<a href="MyGoferDealOfTheDay?storeId=10175&catalogId=27151&langId=-1"><h2>');k.push("<strong>deal</strong> of the <strong>day</strong>");if(H.dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){k.push('<span class="dod-countdown">TIME LEFT <span id="dod-countdown-time" class="hasCountdown">');k.push('<span class="countdown_row countdown_amount" id="defaultCountdown"></span></span></span>')}else{k.push('<span class="dod-countdown">SOLD OUT</span>')}k.push("</h2></a>");k.push('<div class="dodShare">');k.push('<div class="dodfLike">');k.push('<iframe id="dOdLikeIt" src="'+"http://"+domain+"/shc/s/"+$("#iLikeIt").attr("href")+'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; float:left; width:270px; height:24px;" allowTransparency="true"></iframe>');k.push("</div>");k.push('<div class="dodShareRight">');k.push("<!--FACEBOOK BUTTON-->");k.push('<a name="fb_share" type="icon" class="fBtn"></a>');k.push('<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"><\/script>');k.push("<!--TWITTER BUTTON-->");k.push('<a target="_blank" href="" id="dOdtShareIt" class="twitBtn" data-count="none"></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"><\/script>');k.push("</div>");k.push("</div>");var t=(H.dodStorePartNumber).replace(/P$/g,"");var E=(H.dodImageUrl);k.push('<img src="');k.push(scene7URL+E+'?hei=77&amp;wid=77&amp;op_sharpen=1&amp;qlt=65" alt="product image" width="77" height="77" />');k.push('<p class="dod-prd-title"><a href="');k.push(p+'" escapeXml="false" id="iLikeIt">');k.push(H.dodStoreBrandName+" "+H.dodStoreItemName);k.push("</a></p>");k.push('<div class="dod-cols clearfix">');if(H.dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){k.push('<div class="dod-atc-col">');k.push('<a id="a_dod-atc" class="btn-blue btn-blue-85" href="javascript:dodAddToCart();">Add to Cart</a>');
k.push("</div>")}else{k.push('<div class="dod-atc-col dod-prd-title">SOLD OUT</div>')}k.push('<div class="dod-savestory"><span class="dod-prd-price">$'+x+"</span>");k.push('<span class="dod-prd-regprice">$'+dodStoreRegularPrice+"</span></div>");k.push('</div><p class="dod-qtylimit-note">Limited Quantity Available, Deal Applicable only at this Store.</p></div>');$("#mod_dealOfTheDay").html(k.join("")).show();d("#mod_dealOfTheDay",H.dodStoreStopTime);facebookLikeTest("#iLikeIt","#dOdLikeIt");twitterShareTest("#iLikeIt","#dOdtShareIt")}}else{if(isSiteDodAvailable=="true"&&($.cookie("selectedStore")!=null||dodShipAvl=="true")){if(isDODPhase1Enable=="ON"){x=(H.dodPrice*1).toFixed(2);k.push('<a href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1"><h2 id="dodh2">');k.push('<span class="title">Deal it like its hot</span>');if(H.dodQuantity>0&&H.dodStockStatus=="true"){k.push('<span class="dod-countdown" style="background:url('+imagePath+'/img/bk.png) repeat-x scroll 0 0 transparent;" >Time Left:<span id="dod-countdown-time" class="hasCountdown">');k.push('<span class="countdown_row countdown_amount" id="defaultCountdown"></span></span></span>')}else{k.push('<span class="dod-countdown">SOLD OUT</span>')}k.push("</h2></a>");var E=(H.dodImageUrl);k.push('<div class="product_image">');k.push('<a href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1"><img src="');k.push(scene7URL+E+'?hei=77&amp;wid=77&amp;op_sharpen=1&amp;qlt=65" alt="product image" width="77" height="77" /></a>');k.push('<div class="social">');k.push('<a title="Share on Facebook" class="btn facebook" href="http://www.facebook.com/sharer/sharer.php?s=100&p[title]=Check%20out%20todays%20Deal%20of%20the%20Day%20%3A%20'+H.dodBrandName+" "+H.dodItemName+"&p[url]=http%3A%2F%2Fwww.mygofer.com%2FFBDealOfTheDay&p[images][0]="+scene7URL+E+'" target="_blank"></a>');k.push('<a title="Share on Twitter" class="btn twitter" href="http://twitter.com/intent/tweet?url=http%3A%2F%2Fwww.mygofer.com%2FTWDealOfTheDay%0A%0A&text=Check%20out%20todays%20Deal%20of%20the%20Day%20%3A%20'+H.dodBrandName+" "+H.dodItemName+'" target="_blank"></a>');k.push("</div>");k.push("</div>");k.push('<p class="dod-prd-title">');k.push('<a href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1">');k.push(H.dodBrandName+" "+H.dodItemName);k.push("</a></p>");k.push('<div class="dod-cols clearfix">');k.push('<p class="product_price">');k.push('<span class="price">$'+x+"</span>");if(H.dodQuantity>0&&H.dodStockStatus=="true"){k.push('<div class="dod-atc-col" style="float: right;">');if(H.dodSiteProductType=="VARIATION"){k.push('<a id="a_dod-atc" class="btn-blue btn-blue-85" href="/shc/s/MGDealOfTheDay?storeId=10175&amp;catalogId=27151&amp;langId=-1">Buy now</a>')}else{k.push('<a id="a_dod-atc" class="btn-blue btn-blue-85" href="javascript:dodAddToCart();">Buy now</a>')}k.push("</div>")}else{k.push('<div class="dod-atc-col dod-prd-title" style="color: #C71818;" >SOLD OUT</div>')}k.push("</p>");var g=(dodRegularPrice-x).toFixed(2);var b=(g/dodRegularPrice)*100;k.push('</div><div class="savings"><div class="detail"><p class="price">$'+dodRegularPrice+'</p> REG PRICE</div><div class="detail"><p class="price">$'+g+'</p> SAVINGS</div><div class="detail"><p class="price">'+b.toFixed(0)+"%</p> DISCOUNT</div></div>");if(H.dodQuantity>0&&H.dodStockStatus=="true"){k.push('<br><br><p id="product_Site_dealIsOn_message" class="dotd_title_01" style="font-weight: bold; font-style: italic;color: #C71818; margin: -1pt 5pt 5pt 100px; font-size: 12px;">This deal is on, buy soon.</p>')}$("#mod_dealOfTheDay").html(k.join("")).show();d("#mod_dealOfTheDay",H.dodStopTime)}else{x=(H.dodPrice*1).toFixed(2);k.push('<a href="MyGoferDealOfTheDay?storeId=10175&catalogId=27151&langId=-1"><h2>');k.push("<strong>deal</strong> of the <strong>day</strong>");if(H.dodQuantity>0&&H.dodStockStatus=="true"){k.push('<span class="dod-countdown">TIME LEFT <span id="dod-countdown-time" class="hasCountdown">');k.push('<span class="countdown_row countdown_amount" id="defaultCountdown"></span></span></span>')}else{k.push('<span class="dod-countdown">SOLD OUT</span>')}k.push("</h2></a>");k.push('<div class="dodShare">');k.push('<div class="dodfLike">');if(typeof($("#iLikeIt").attr("href"))!="undefined"&&$("#iLikeIt").attr("href")!=null){var q="'+'http://'+domain+'/shc/s/'+$('#iLikeIt').attr('href')+'"}else{var q=""}k.push('<iframe id="dOdLikeIt" src='+q+' scrolling="no" frameborder="0" style="border:none; overflow:hidden; float:left; width:270px; height:24px;" allowTransparency="true"></iframe>');k.push("</div>");k.push('<div class="dodShareRight">');k.push("<!--FACEBOOK BUTTON-->");k.push('<a name="fb_share" type="icon" class="fBtn"></a>');k.push('<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"><\/script>');k.push("<!--TWITTER BUTTON-->");k.push('<a target="_blank" href="" id="dOdtShareIt" class="twitBtn" data-count="none"></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"><\/script>');k.push("</div>");k.push("</div>");var E=(H.dodImageUrl);k.push('<img src="');k.push(scene7URL+E+'?hei=77&amp;wid=77&amp;op_sharpen=1&amp;qlt=65" alt="product image" width="77" height="77" />');k.push('<p class="dod-prd-title"><a href="');k.push(v+'" escapeXml="false" id="iLikeIt">');k.push(H.dodBrandName+" "+H.dodItemName);k.push("</a></p>");k.push('<div class="dod-cols clearfix">');if(H.dodQuantity>0&&H.dodStockStatus=="true"){k.push('<div class="dod-atc-col">');k.push('<a id="a_dod-atc" class="btn-blue btn-blue-85" href="javascript:dodAddToCart();">Add to Cart</a>');k.push("</div>")}else{k.push('<div class="dod-atc-col dod-prd-title">SOLD OUT</div>')}k.push('<div class="dod-savestory"><span class="dod-prd-price">$'+x+"</span>");k.push('<span class="dod-prd-regprice">Regularly $'+dodRegularPrice+"</span></div>");k.push('</div><p class="dod-qtylimit-note">Limited Quantity Available, Deal Applicable only at this Store.</p>');$("#mod_dealOfTheDay").html(k.join("")).show();d("#mod_dealOfTheDay",H.dodStopTime);facebookLikeTest("#iLikeIt","#dOdLikeIt");twitterShareTest("#iLikeIt","#dOdtShareIt")}}else{$("#mod_dealOfTheDay").html(F({img:"dotd-home.gif",alt:"Deal of the day",cls:""})+"<p>There is no Deal available today. Please check later!!</p>").hide();$("#mod_socialConnect").show()}}}else{if(isStoreDodAvailable=="true"){x=(H.dodStorePrice*1).toFixed(2);k.push('<span class="dotdTitle">'+F({img:"dotd-home.gif",alt:"MyStore Deal of the day",cls:""})+"</span>");k.push('<div class="dotdProd"><span class="dotdProdName"><a href="');k.push(p+'">');k.push(H.dodStoreBrandName+" "+H.dodStoreItemName);k.push("</a></span>");k.push('<span class="dotdProdPrice"><a href="'+p+'">$'+x+'</a></span><span class="limitedItems">Regular Price:$'+dodStoreRegularPrice+"</span>");k.push('</div><div class="dotdRight">');if(H.dodStoreQuantity>0&&H.dodStoreStockStatus=="true"){k.push('<span class="dotdTimeLeft">TIME LEFT:</span><span id="defaultCountdown"></span>');k.push('<a href="javascript:dodAddToCart();" class="dotdAddToCart"></a>')}else{k.push('<span class="dotdSoldOut">SOLD OUT</span>')}k.push('<span class="limitedItems">Deal Applicable only at this Store</span>');k.push('<span class="limitedItems">Limited Quantity Available</span>');k.push("</div>");$("#dotdHome").html(k.join("")).show();d("#dotdHome",H.dodStoreStopTime)}else{if(isSiteDodAvailable=="true"){x=(H.dodPrice*1).toFixed(2);k.push('<span class="dotdTitle">'+F({img:"dotd-home.gif",alt:"Deal of the day",cls:""})+"</span>");k.push('<div class="dotdProd"><span class="dotdProdName"><a href="');k.push(v+'">');k.push(H.dodBrandName+" "+H.dodItemName);k.push("</a></span>");k.push('<span class="dotdProdPrice"><a href="'+v+'">$'+x+'</a></span><span class="limitedItems">Regular Price:$'+dodRegularPrice+"</span>");k.push('</div><div class="dotdRight">');if(H.dodQuantity>0&&H.dodStockStatus=="true"){k.push('<span class="dotdTimeLeft">TIME LEFT:</span><span id="defaultCountdown"></span>');
k.push('<a href="javascript:dodAddToCart();" class="dotdAddToCart"></a>')}else{k.push('<span class="dotdSoldOut">SOLD OUT</span>')}k.push('<span class="limitedItems">Limited Quantity Available</span>');k.push("</div>");$("#dotdHome").html(k.join("")).show();d("#dotdHome",H.dodStopTime)}}}}}else{if(bodyClassKey=="ORDER_DETAILS"){$(".dotdSubCat").remove();$("#dodImage_"+dodStoreChildCatentry).html('<img src="'+imagePath+'/img/label_today_only.png"  alt="My Store Deal of the Day" class="dodImage">');$("#dodImage_"+dodSiteChildCatentry).html('<img src="'+imagePath+'/img/label_today_only.png" alt="My Store Deal of the Day" class="dodImage">')}else{if(bodyIdKey=="PRODUCTOPTIONS"){$("#dotdCart").remove();$(".item_price").html($("#itemPrice").val());var o=$("#childCatentry").val();if(isStoreDodAvailable=="true"&&o==dodStoreChildCatentry){k.push($(".item_image").html());$(".item_image").html('<div id="dotdCart" class="dotdCart">'+F({img:"dotd-cart.gif",alt:"MyStore Deal of the day",cls:""})+"</div>"+k.join(""));$(".item_price").html(w)}else{if(isSiteDodAvailable=="true"&&o==dodChildCatentry){k.push($(".item_image").html());$(".item_image").html('<div id="dotdCart" class="dotdCart">'+F({img:"dotd-cart.gif",alt:"MyGofer Deal of the day",cls:""})+"</div>"+k.join(""));$(".item_price").html(j)}}}}}}}}}}}else{if(bodyIdKey=="MAINPAGE"){var u=$("#newHP2HomePage").val();var B=$("#hpPhaseIIVal").val();if((typeof u!="undefined"&&u=="ON")||(typeof B!="undefined"&&B=="true")){$(".deal-of-the-day").html(F({img:"dotd-home.gif",alt:"Deal of the day",cls:""})+"<p>There is no Deal available today. Please check later!!</p>").hide();$("#dod-banners-wrap").show()}else{$("#mod_dealOfTheDay").html(F({img:"dotd-home.gif",alt:"Deal of the day",cls:""})+"<p>There is no Deal available today. Please check later!!</p>").hide();$("#mod_socialConnect").show()}}else{if(bodyIdKey=="PRODUCT"){$("#dodStorePrice, #dodStoreSavings, #dodStoreOrigPrice, #dodPrice, #dodSavings, #dodOrigPrice, .limitedItems").remove();$("#dotdProduct").hide().html("");$("#summary .saveStory").find(".pricing, .origPrice, .savings, .youPay, .callout").show();$("#similarItems_dod_"+dodStoreChildCatentry,"#similarItems_dod_"+dodChildCatentry).hide()}else{if(bodyIdKey=="PRODUCTOPTIONS"){$("#dotdCart").remove();$(".item_price").html($("#itemPrice").val())}}}}if(bodyClassKey=="ORDER_DETAILS"){var a=siteOrderItemIds.split("|"),G=F({alt:"Deal of the Day in the past Order",img:"dotd-subcat.gif"});for(var y=1,z=a.length;y<z;y++){$("#dodImage_"+a[y]).html(G)}}}}function dodAddToCart(){if(isStoreDodAvailable=="true"){var d="false";if(resFfmStore==null||typeof(resFfmStore)==undefined){resFfmStore=""}if(dodStorePickAvl=="true"){d="true";if((resFfmStore=="KDRES"||resFfmStore=="VRES")&&varstsStore=="false"){d="false"}var b=$.cookie("selectedStore");var e="";if(b!=null){var a=b.split("|");e=a[10]}if(dodStoreShipAvl=="true"&&e=="SHIP"){dodATCajax(dodStoreChildCatentry,dodStorePartNumber,"ship",resFfmStore)}else{if(d=="true"){dodATCajax(dodStoreChildCatentry,dodStorePartNumber,"pickup",resFfmStore)}else{dodATCajax(dodStoreChildCatentry,dodStorePartNumber,"ship",resFfmStore)}}}else{if(dodStoreShipAvl=="true"){dodATCajax(dodStoreChildCatentry,dodStorePartNumber,"ship",resFfmStore)}}}else{if(isSiteDodAvailable=="true"){var c="false";if(resFfmSite==null||typeof(resFfmSite)==undefined){resFfmSite=""}if(dodPickAvl=="true"){c="true";if($.cookie("selectedStore")==null||((resFfmSite=="KDRES"||resFfmSite=="VRES")&&varstsStore=="false")){c="false"}if(c=="true"){dodATCajax(dodChildCatentry,dodPartNumber,"pickup",resFfmSite)}else{dodATCajax(dodChildCatentry,dodPartNumber,"ship",resFfmSite)}}else{if(dodShipAvl=="true"){dodATCajax(dodChildCatentry,dodPartNumber,"ship",resFfmSite)}}}}}function dodATCajax(h,g,a,b){if(typeof omRedesignEnabled!="undefined"&&omRedesignEnabled){trackDealOfDay(g,dodPriceCopy,a)}if(moacpEnabled!="true"){if(document.getElementById("mygoferMoacpEnabled")){moacpEnabled=$("#mygoferMoacpEnabled").val()}if(document.getElementById("mystoreMoacpEnabled")){moacpEnabled=$("#mystoreMoacpEnabled").val()}}var i="storeId=10175&catalogId=27151&URL=SmartCartUpdateView&catEntryId_1="+h+"&quantity_1=1&partNumber="+g+"&url=SmartCartUpdateView&fwdURL=SmartCartUpdateView&IndicatorA="+a;if(a=="pickup"&&LMPEnabled=="true"){i=i+"&ffm_1="+b}if(a=="pickup"){var d=$.cookie("selectedStore");var c="";if(d!=null){var e=d.split("|");c=e[10]}var f="";if(c=="OD"&&dodOrgDelElig=="Y"){f="lmpOrgDelivery"}else{if(c=="HD"&&dodLdElig=="Y"){f="lmpLocalDelivery"}else{if(c=="SPU"||c=="PUN"){f="lmpPickup"}}}i=i+"&lmpPickUpMode="+f}$.ajax({url:"/shc/s/ProductOptionsOrderItemAddCmd",data:i,success:function(j){$("#smartcartresponse").append(trim(j));if($("#statusOfATC").val()=="SUCCESS"){if(moacpEnabled=="true"){location.href="/shc/s/ShoppingCartDisplay?storeId=10175&catalogId=27151&screenName=MOACPSHOPPINGCART&orderId=."}else{location.href="/shc/s/OrderItemDisplay?storeId=10175&catalogId=27151&orderId=."}}else{addToCartAjax(val,"smartCartSingle")}}})}function trackDealOfDay(c,b,a){if(typeof omRedesignEnabled!="undefined"&&omRedesignEnabled){if(typeof omAcct!="undefined"&&omAcct!=null&&omAcct!="undefined"&&typeof s_gi!="undefined"){s.linkTrackVars="eVar18,eVar46,eVar50,events,products,prop12";s.linkTrackEvents="scAdd,scOpen,event36,event37";s.events="scAdd,scOpen,event36,event37";s.prop12="Deal of the day > Add to Cart";s.products=";"+c+";;;event36="+b+"|event37=1;eVar50="+c+"|eVar18=MyGofer Today|eVar46="+a;s.tl(true,"o","Deal of the day > Add to Cart")}}}var dOdLikeIt=$("#dOdLikeIt");if(dOdLikeIt.length){var src=dOdLikeIt.attr("src")||"";dOdLikeIt.attr("src",src.replace("?&","%3FshcapiBypassSSO%3Dtrue&"))}function trackDODClickAction(c,b,a){if(typeof omRedesignEnabled!="undefined"&&omRedesignEnabled){if(typeof omAcct!="undefined"&&omAcct!=null&&typeof s_gi!="undefined"&&typeof(s)!="undefined"){s.linkTrackVars="prop12,prop10,channel,prop1,prop2,prop3,prop27,prop28";s.prop12=b;s.tl(c,"o",a)}}}function startCounter(){$("#defaultCountdown").countdown({until:new Date(stopTime),format:"HMS",timezone:dodTimezoneOffset,alwaysExpire:true,onExpiry:dodExpire})}function shareAndSave(){$.ajax({url:"UpdateSocialClickAttribute",data:"storeId=10175&catalogId=27151&type=UPDATE&socialClick=Y",success:function(a){}})}$(document).ready(function(e){e(".dod-prd-title").click(function(){if(typeof omRedesignEnabled!="undefined"&&omRedesignEnabled){trackDODClickAction(this,"Deal of the day","Deal of the day")}});e(".dotdProdName").click(function(){if(typeof omRedesignEnabled!="undefined"&&omRedesignEnabled){trackDODClickAction(this,"Deal of the day","Deal of the day")}});var d=e("#userTypeVal").val();var c=e("#storeType");var g="selectedStore";if(e.cookie("selectedStore")!=null){var b=e.cookie("selectedStore");b=decodeURIComponent(b);var a=b.split("|");if(a[10]==null||a[10]==""){var f=a[0]+"|"+a[1]+"|"+a[2]+"|"+a[3]+"|"+a[4]+"|"+a[5]+"|"+a[6]+"|"+a[7]+"|"+a[8]+"|"+a[9];if(d=="C"){f=f+"|OD"}else{if(d=="P"||d=="G"||d==""||d=="undefined"){if(c=="G"){f=f+"|PUN"}else{f=f+"|SPU"}}}e.cookie(g,f,{expires:360,path:"/"})}}});
