function formSubmit(c,b){if(b){for(var a in b){if(b[a]!=null){document.getElementById(a).value=b[a]}}}frm=document.getElementById(c);frm.submit()}function InPlaceEdit_Show(o,l,d,a,g){if(a==null){return}var q="hid_txt_"+a;if(document.getElementById(q)){return}var h=document.getElementById(o);if(h==null){return}var p=h.innerHTML;var n=p;var f=document.getElementById(g);if(f!=null){n=f.innerHTML}var e="";var c=document.getElementById(l);if(c!=null){e=c.innerHTML}if(d!=null){d["#the content#"]=n;for(var b in d){var m=d[b];if(m!=null){e=e.replace(new RegExp(b,"g"),m)}}}e=e.concat(' ');e=e.concat(' ');h.innerHTML=e;return}function InPlaceEdit_Cancel(d){if(d==null){return}var a=document.getElementById("hid_txt_"+d);if(a==null){return}var b=document.getElementById("hid_inplaceid_"+d);if(b==null){return}var c=document.getElementById(b.value);if(c==null){return}c.innerHTML=unescape(a.value)}function showElement(c,a){var b=document.getElementById(c);if(a==null){a="block"}b.style.display=a}function showElementInline(c,a){var b=document.getElementById(c);if(a==null){a="inline"}b.style.display=a}function hideElement(b){var a=document.getElementById(b);a.style.display="none"}function clearInput(b){var a=document.getElementById(b);a.value=""}function setInput(c,b){var a=document.getElementById(c);a.value=b}function setInputFocus(b){var a=document.getElementById(b);a.focus()}function addEvtListener(obj,evt,fn,cap){if(obj.addEventListener){obj.addEventListener(evt,fn,cap)}else{if(obj.attachEvent){obj.attachEvent("on"+evt,fn)}else{eval("obj.on"+evt+"="+fn)}}}function trim(a){return a.replace(/^\s*|\s*$/g,"")}function loadPage(a,b){if(b){window.parent.window.location.href=a}else{window.location.href=a}}var pubPriHelpWin;function showPubPriHelp(b){try{pubPriHelpWin.focus()}catch(a){pubPriHelpWin=window.open(b,"","top=100,left=200,height=300,width=500,fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")}}function pubPriHelpWinClosed(){pubPriHelpWin=null}var itemVotingHelpWin;function showItemVotingHelp(){try{itemVotingHelpWin.focus()}catch(a){itemVotingHelpWin=window.open("/ht/html/itemVotingHelp.html","","top=100,left=200,height=300,width=500,fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")}}function itemVotingHelpWinClosed(){itemVotingHelpWin=null}var pagePurposeHelpWin;function pagePurposeHelpWinClosed(){pagePurposeHelpWin=null}var htmlTagsHelpWin;function showHtmlTagsHelp(){try{htmlTagsHelpWin.focus()}catch(a){htmlTagsHelpWin=window.open("/ht/html/htmlTagSupportGuide.html","","top=100,left=200,height=500,width=500,fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")}}function htmlTagsHelpWinClosed(){htmlTagsHelpWin=null}function scale_to_fit(b,a){var c=a*1;if(b.classname=="processed"){return}if(b.height>b.width&&b.height>c){b.width=parseInt(b.width*c/b.height);b.classname="processed"}else{if(b.width>=b.height&&b.width>c){b.width=c;b.classname="processed"}else{}}b.style.visibility="visible"}function onLoadForScaling(c,a){var b=document.getElementById(c);if(b==null){return}if(b.height==0&&b.width==0){setTimeout("scale_to_fit(document.getElementById('"+c+"'), "+a+")",500)}else{scale_to_fit(document.getElementById(c),a)}}function findPosX(a){var b=0;if(a.offsetParent){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(a.x){b+=a.x}}return b}function findPosY(b){var a=0;if(b.offsetParent){while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(b.y){a+=b.y}}return a}function URLEncode(e){var g="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()";var b="0123456789ABCDEF";var f="";for(var c=0;c255){alert("Unicode Character '"+d+"' cannot be encoded using standard URL encoding.\n(URL encoding only supports 8-bit characters.)\nA space (+) will be substituted.");f+="+"}else{f+="%";f+=b.charAt((a>>4)&15);f+=b.charAt(a&15)}}}}return f}function URLDecode(){var a="0123456789ABCDEFabcdef";var e=document.URLForm.F2.value;var d="";var b=0;while(b]+>/gi,"")}function escapeHTML(a){var c=document.createElement("div");var b=document.createTextNode(a);c.appendChild(b);return c.innerHTML}function unescapeHTML(b){var a=document.createElement("div");a.innerHTML=stripTags(b);return a.childNodes[0].nodeValue}function limitCharacters(c,b){var a=c.value.length;if(a>b){c.value=c.value.substring(0,b)}}function isI18N(b){if(b==null){return false}for(var a=0;a255){return true}}return false}function addBookmark(a,b){if(window.sidebar){window.sidebar.addPanel(b,a,"")}else{if(document.all){window.external.AddFavorite(a,b)}else{alert("Sorry, your browser doesn't support bookmarks")}}}function validateImageFile(a,b,n,e,h){if(typeof b=="undefined"){b=true}if(typeof h=="undefined"){h="Invalid image. Please upload a file ending with JPG, JPEG, GIF, or PNG."}var m=document.getElementById(a).value;if(m==""){if(b){document.getElementById(e).innerHTML=h;setInputFocus(a)}return(!b)}var f=true;if(navigator.appVersion.indexOf("MSIE")>=0){var g=navigator.appVersion.split("MSIE");var l=parseFloat(g[1]);if(l<7){f=(m.indexOf(":")==1)}}if(!f){document.getElementById(e).innerHTML="Please specify a valid path";setInputFocus(a);return false}if(!(m=="")&&f){var c=m;var o=c.lastIndexOf(".");if(o!=-1){c=c.substr(o+1).toLowerCase()}else{c=""}if((c=="jpeg")||(c=="jpg")||(c=="gif")||(c=="png")){if(typeof n!="undefined"&&n!=null){var d=document.getElementById(n);d.value=m}if(typeof e!="undefined"&&e!=null){document.getElementById(e).innerHTML=""}return true}if(typeof e!="undefined"&&e!=null){document.getElementById(e).innerHTML=h}setInputFocus(a);return false}}function showUserPagesCall(d,c){var b=document.getElementById("myPagesLink");var a=document.getElementById("myPagesDefContainer").innerHTML;showPopupAboveRight(b,300,160,a,true,-35,158,"popUpMyPagesDiv","popUpMyPagesContent");formSubmitAJAX("/za/userPages",null,"showUserPagesCallback")}function showUserPagesCallback(f,d){if(f.firstChild){var c="";for(var e=0;e= 5)
try {
xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (exception1) {
try {
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (exception2) {
xmlhttp = false;
}
}
@else
xmlhttpRequest = false;
@end @*/
if(!xmlHttpRequest&&typeof XMLHttpRequest!="undefined"){try{xmlHttpRequest=new XMLHttpRequest()}catch(exception){xmlHttpRequest=false}}return xmlHttpRequest}var requestsArray=new Array();var MAX_REQUEST_SIZE=5;function processResponse(index){var request=requestsArray[index];if(request.httpRequester.readyState==4){if(request.httpRequester.status==200){try{request.complete=true;var xmlResponse=request.httpRequester.responseXML;var resultStatus=xmlResponse.getElementsByTagName("result")[0].firstChild.nodeValue;if(resultStatus==0){var results=xmlResponse.getElementsByTagName("results")[0];eval(request.callbackMethod)(results,request.callbackParams);try{var trackNodes=xmlResponse.getElementsByTagName("track");if(trackNodes!=null&&trackNodes.length>0){var track=trackNodes[0].firstChild.nodeValue;if(typeof popv!="undefined"&&track!=null&&track.length>0){setTimeout("popv(eval("+track+"))",5)}}var operationEle=xmlResponse.getElementsByTagName("operation");if(operationEle&&operationEle.length>0){var operation=operationEle[0].firstChild.nodeValue;if(typeof tcLink!="undefined"&&operation!=null&&operation!=""){setTimeout("tcLink(true,'"+operation+"')",5)}}}catch(trackError){}}else{if(resultStatus==3){if(!request.ignoreError){document.location.href="/za/activity-limited"}else{eval(request.callbackMethod)(null,request.callbackParams)}}else{if(resultStatus==2){if(!request.ignoreError){alert("Oops! You need to be logged in to do this. The page will refresh after you click ok");document.location.reload()}else{eval(request.callbackMethod)(null,request.callbackParams)}}else{if(!request.ignoreError){alert("Oops! Something went wrong. Error code: CL-1. The page will refresh after you click ok");document.location.reload()}else{eval(request.callbackMethod)(null,request.callbackParams)}}}}}catch(error){if(!request.ignoreError){alert("Oops! Something went wrong. Error code: CL-2. The page will refresh after you click ok");document.location.reload()}else{eval(request.callbackMethod)(null,request.callbackParams)}}}else{if(request.httpRequester.status!=0){if(!request.ignoreError){alert("Oops! Something went wrong. Error code: CL-3. The page will refresh after you click ok");document.location.reload()}else{eval(request.callbackMethod)(null,request.callbackParams)}}}}}function initialize(b){var c=requestsArray[b];if(c.varMap){for(var a in c.varMap){if(c.varMap[a]!=null){if(c.postValueStr==""){c.postValueStr=a+"="+encodeURIComponent(c.varMap[a])}else{c.postValueStr+="&"+a+"="+encodeURIComponent(c.varMap[a])}}}}}function initializeForm(a){var d=requestsArray[a];if(d.formid){var c=document.getElementById(d.formid);for(var b=0;b0){p.style.height=this.height+"px"}if(this.width>0){p.style.width=this.width+"px";q.style.width=(this.width+9)+"px"}q.style.position="absolute";if(this.yPosition){q.style.top=(this.yPosition)+"px"}if(this.xPosition){q.style.left=(this.xPosition)+"px"}}q.style.display="block"};this.closePopup=function(){hideElement(this.popUpDivId)}}function getViewWidth(){var a;if(navigator.appVersion.indexOf("MSIE")>=0){if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){a=parseInt(document.documentElement.clientWidth)}else{a=parseInt(document.getElementsByTagName("body")[0].clientWidth)}}else{a=parseInt(window.innerWidth)}return a}function getViewHeight(){var a;if(navigator.appVersion.indexOf("MSIE")>=0){if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){a=parseInt(document.documentElement.clientHeight)}else{a=parseInt(document.getElementsByTagName("body")[0].clientHeight)}}else{a=parseInt(window.innerHeight)}return a}function onMouseMovedPopup(b){var a=popupArray[b];clearTimeout(a.blanktimeout)}function onMouseOutPopup(b){var a=popupArray[b];if(a.mouseOutTime==undefined){a.blanktimeout=setTimeout("hideElement('"+a.popUpDivId+"')",500)}else{a.blanktimeout=setTimeout("hideElement('"+a.popUpDivId+"')",a.mouseOutTime)}a.srcEle.onmouseout="";a.srcEle.onmousemove=""}function calcXCoordinates(c,e,d,b){var a=findPosX(c);if(!b){a+=c.offsetWidth}if(typeof d!="undefined"){a+=d}if(a<0){a=0}return a}function calcYCoordinates(b,a,c){var d;if(a>0){d=findPosY(b)+b.offsetHeight-a}else{d=findPosY(b)+b.offsetHeight}if(typeof c!="undefined"){d+=c}if(d<0){d=0}return d}function showPopupAboveRight(g,c,h,e,d,a,f,l,b){showAndReturnPopupAboveRight(g,c,h,e,d,a,f,l,b)}function showAndReturnPopupAboveRight(l,d,n,f,e,b,h,o,c,a,g){if(typeof o=="undefined"||o==null){o="popUpDiv"}if(typeof c=="undefined"||c==null){c="popUpContent"}hideSelectBoxes();var m=new KaboodlePopup(l,d,n,e,b,h,o,c,false,a,g);m.populateHtml(f);m.showPopup();return m}function showAndReturnPopupAboveLeft(h,c,m,e,d,a,g,n,b,f){if(typeof n=="undefined"||n==null){n="popUpDiv"}if(typeof b=="undefined"||b==null){b="popUpContent"}hideSelectBoxes();var l=new KaboodlePopup(h,c,m,d,a,g,n,b,true,false,f);l.populateHtml(e);l.showPopup();return l}function hideSelectBoxes(){if(navigator.appVersion.indexOf("MSIE")>=0){var d=navigator.appVersion.split("MSIE");var a=parseFloat(d[1]);if(a<7&&document.body.filters){var c=document.getElementsByTagName("SELECT");if(c!=null){for(var b=0;b=0){var c=navigator.appVersion.split("MSIE");var a=parseFloat(c[1]);if(a<7&&document.body.filters){var b=document.getElementsByTagName("SELECT");if(b!=null){for(k=0;k=0){var d=navigator.appVersion.split("MSIE");var a=parseFloat(d[1]);if(a<7&&document.body.filters){for(i=0;i0){f=f.replaceAll(" ","-")}_gaq.push(["_trackEvent","Search","Product","/search/"+f]);document.getElementById(a).action="/search/";document.getElementById(a).submit()}else{if(document.getElementById(e).value=="collage"){document.getElementById(a).action="/search-styleboard/";document.getElementById(a).submit()}else{if(document.getElementById(e).value=="page"){document.getElementById(a).action="/search-list/";document.getElementById(a).submit()}else{if(document.getElementById(e).value=="user"){document.getElementById(a).action="/search-people/";document.getElementById(a).submit()}else{if(document.getElementById(e).value=="retailer"){document.getElementById(a).action="/search-store/";document.getElementById(a).submit()}}}}}}}}function callOnEnterKey(event,callBack){if(event.keyCode==13){eval(callBack)}}function getCookie_c(c){var b=document.cookie;var e=c+"=";var d=b.indexOf("; "+e);if(d==-1){d=b.indexOf(e);if(d!=0){return null}}else{d+=2}var a=document.cookie.indexOf(";",d);if(a==-1){a=b.length}return unescape(b.substring(d+e.length,a))}function setCookie_c(b,d,a,f,c,e){document.cookie=b+"="+escape(d)+((a)?"; expires="+a.toGMTString():"")+((f)?"; path="+f:"")+((c)?"; domain="+c:"")+((e)?"; secure":"")}function deleteCookie_c(a,c,b){if(getCookie_c(a)){document.cookie=a+"="+((c)?"; path="+c:"")+((b)?"; domain="+b:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}}function checkIfBrowserSupportCookies(){if(document.cookie!=null&&document.cookie!=""){return true}else{setCookie_c("hp","0");if(getCookie_c("hp")){deleteCookie_c("hp");return true}else{return false}}}function clearActionText(){if(document.getElementById("actionDivId")){document.getElementById("actionDivId").style.display="none"}}function generateAJAXResponseHTML(b){var a="";for(var c=0;c0){var bitlyResObj=eval("("+bitlyResponse+")");url=bitlyResObj.data.url}}catch(e){}eval(callbackParams.callbackFn)(url,callbackParams.cParams)}function validateFormField(e,a,c){if(e!=null&&trim(e)!=""){var d=new Object();d.fieldValue=e;d.fieldType=a;var b=new Object();b.errorId=c;formSubmitAJAX("/za/validate-field",d,"validateFormFieldCallback",b,true)}}function validateFormFieldCallback(d,b){var a=d.getElementsByTagName("fieldError");try{if(a.length>0){var e=a[0].firstChild.nodeValue;document.getElementById(b.errorId).innerHTML=e;document.getElementById(b.errorId).style.display=""}else{document.getElementById(b.errorId).innerHTML="";document.getElementById(b.errorId).style.display="none"}}catch(c){}}function showNFPopuup(d){var c=document.getElementById("NFPopUp_"+d);var b=document.getElementById("NFImg_"+d);var a=b.offsetLeft-2*b.offsetWidth;var e=b.offsetTop+b.offsetHeight;c.style.position="absolute";c.style.top=e+"px";c.style.left=a+"px";c.style.display=""}function showNFPopup(d){var c=document.getElementById("NFPopUp_"+d);var b=document.getElementById("NFImg_"+d);var a=b.offsetLeft-b.offsetWidth;var e=b.offsetTop+b.offsetHeight;c.style.position="absolute";c.style.top=e+"px";c.style.left=a+"px";c.style.display=""}function closeNFPopuup(a){hideElement("NFPopUp_"+a)}var userMiniProfilePopup;function showMiniProfilePopup(a,c,b){hideMiniProfilePopup();document.getElementById("umppscreenName").innerHTML=c;document.getElementById("umppuserLists").href="/member/"+c+"/lists";document.getElementById("umppuserFriends").href="/member/"+c+"/friends";document.getElementById("umppuserGroups").href="/member/"+c+"/groups";document.getElementById("umppuserPolls").href="/member/"+c+"/polls";document.getElementById("umppuserPhotos").href="/member/"+c+"/photos";document.getElementById("umppuserBrands").href="/member/"+c+"/stores";document.getElementById("umppuserBlogazine").href="/member/"+c+"/blogs";document.getElementById("umppuserStyleboards").href="/member/"+c+"/styleboards";if(document.getElementById("umppminiPopupAddFriendImg")!=null){document.getElementById("umppminiPopupAddFriendImg").href="javascript:checkForFriendAJAX('"+b+"','"+c+"','addFriend');";document.getElementById("umppminiPopupAddFriendLnk").href="javascript:checkForFriendAJAX('"+b+"','"+c+"','addFriend');";document.getElementById("umppcomposeMessagePopupImg").href="javascript:checkForFriendAJAX('"+b+"','"+c+"','sendMessage');";document.getElementById("umppcomposeMessagePopupLnk").href="javascript:checkForFriendAJAX('"+b+"','"+c+"','sendMessage');"}userMiniProfilePopup=new KaboodlePopup(a,141,220,false,-110,170,"umppuserMiniProfilePopup","umppuserMiniProfilePopup",false,false);userMiniProfilePopup.showPopup()}function hideMiniProfilePopup(){document.getElementById("umppscreenName").innerHTML="#";document.getElementById("umppuserLists").href="#";document.getElementById("umppuserFriends").href="#";document.getElementById("umppuserGroups").href="#";document.getElementById("umppuserPolls").href="#";document.getElementById("umppuserPhotos").href="#";document.getElementById("umppuserBrands").href="#";document.getElementById("umppuserBlogazine").href="#";document.getElementById("umppuserStyleboards").href="#";if(document.getElementById("umppminiPopupAddFriendImg")!=null){document.getElementById("umppminiPopupAddFriendImg").href="#";document.getElementById("umppminiPopupAddFriendLnk").innerHTML="Add as a Friend";document.getElementById("umppcomposeMessagePopupLnk").innerHTML="Send Message";document.getElementById("umppminiPopupAddFriendLnk").href="#";document.getElementById("umppcomposeMessagePopupImg").href="#";document.getElementById("umppcomposeMessagePopupLnk").href="#"}if(userMiniProfilePopup!=null){userMiniProfilePopup.closePopup()}}function checkForFriendAJAX(c,e,b){var d=new Object();d.userUid=c;d.action="userFriendCheck";var a=new Object();a.friendUid=c;a.next=b;a.friendScreenName=e;formSubmitAJAX("/za/userProfile",d,"addFriendMiniProfileCallback",a)}function addFriendMiniProfileCallback(d,c){var a=d.getElementsByTagName("isFriend");if(a.length>0){var b=generateAJAXResponseHTML(a[0].childNodes);if(b=="false"){if(c.next=="addFriend"){var e=new Object();e.friendUid=c.friendUid;e.ajax="true";formSubmitAJAX("/za/inviteInSystemFriend",e,"userFriendCallback")}else{if(c.next=="sendMessage"){document.getElementById("umppcomposeMessagePopupLnk").innerHTML="User is not your friend."}}}else{if(c.next=="addFriend"){document.getElementById("umppminiPopupAddFriendLnk").innerHTML="User is already your friend."}else{if(c.next=="sendMessage"){showComposeMessagePopup(null,null,c.friendScreenName)}}}}}function userFriendCallback(b,a){document.getElementById("umppminiPopupAddFriendLnk").innerHTML="Request Pending"}var sendButtonClicked=false;function showComposeMessagePopup(f,d,e,b,c,l){var a=new Object();a.action="getPopupView";if(c!=null&&typeof c!="undefined"){a.contentTheme=c}if(l!=null&&typeof l!="undefined"){a.currentUrl=l}if(f!=null&&typeof f!="undefined"){a.replyTo=f.to;a.subject=f.subject;a.retailerName=f.retailerName}populateEntityMapInfo(a,d);if(e!=null&&typeof e!="undefined"){a.toSN=e;a.to=e}if(b!=null&&typeof b!="undefined"){a.allowNonFriend=b}var h=new Object();var g=document.getElementById("messageSpinner").innerHTML;showAndReturnPopupAboveRight(null,-1,-1,g,false,850,300,"messagePopup","messagePopupContent",true);formSubmitAJAX("/za/compose-message",a,"getComposeMessageCallback",h)}function cm_split(a){return a.split(/,\s*/)}function cm_extractLast(a){return cm_split(a).pop()}function getComposeMessageCallback(results,callbackParams){var evalScript=results.getElementsByTagName("evalScript");if(evalScript.length>0){var evalString=generateAJAXResponseHTML(evalScript[0].childNodes);eval(evalString)}var view=results.getElementsByTagName("view");if(view.length>0){var htmlValue=generateAJAXResponseHTML(view[0].childNodes);document.getElementById("messagePopupContent").innerHTML=htmlValue}var recaptcha=results.getElementsByTagName("recaptchaEnabled");if(recaptcha.length>0){var recaptchaEnabled=generateAJAXResponseHTML(recaptcha[0].childNodes);if(recaptchaEnabled=="true"){var recaptchaKey=generateAJAXResponseHTML(results.getElementsByTagName("recaptchaPublickey")[0].childNodes);$.getScript("http://www.google.com/recaptcha/api/challenge?k="+recaptchaKey);$.getScript("http://www.google.com/recaptcha/api/js/recaptcha_ajax.js",function(){Recaptcha.create(recaptchaKey,"recaptcha_image",{theme:"custom",custom_theme_widget:"recaptcha_image",lang:"en"})})}}$(".has_placeholder").keyup(function(eventObject){if(this.value!=""){$(this).parent().children(".placeholder").hide()}else{$(this).parent().children(".placeholder").show()}});if(!$.fn.emailsSelect){defineEmailsSelect()}if(friendsIdNameList){$("#msgToID1").emailsSelect({autocomplete:{appendTo:".sharePopup .newPopupContent",itemClass:"ddItem",labelprop:"username",itemtemplate:'{username} ',source:friendsIdNameList}})}}function defineEmailsSelect(){(function(d,e){var b=function(f,g){if(typeof(g)!="function"){throw"Not a function"}var h=Array.prototype.slice.call(arguments,2);return function(){var l=h.concat(Array.prototype.slice.call(arguments));return g.apply(f,l)}};var a=function(g,f){return g.replace(/\{([^\}]+)\}/gi,function(l,h){return typeof(f[h])=="undefined"?h:f[h]})};var c=function(g,h){if(!g.is("input[type=text]")){d.error("$.emailsSelect: Element is not a text input");return null}this.options=h;g.wrap('
').closest("label").append(' ').closest(".emailsSelectWrap").prepend('Error test here ');var f=g.attr("placeholder");f=h.placeholder||f;g.attr("placeholder","").closest("label").find(".fieldplaceholder").text(f);g.bind({focus:b(this,this.focusHandler,g),blur:b(this,this.blurHandler,g),paste:b(this,this.pasteHandler,g),keyup:b(this,this.keyupHandler,g),keydown:b(this,this.keydownHandler,g)});g.closest(".emailsSelectWrap").click(b(this,function(l){l.focus();return false},g));if(h.autocomplete){this.createAutocomplete(g,h.autocomplete)}if(!!h.value){this.setVal(g,h.value)}return{getvalue:b(this,this.getVal,g),setvalue:b(this,this.setVal,g)}};c.prototype={selectedItems:null,options:null,focusHandler:function(g,f){this.toggleError(g,false);g.closest("label").find(".fieldplaceholder").hide()},blurHandler:function(g,f){this.toggleError(g,false);if(!d.trim(g.val())){g.closest("label").find(".fieldplaceholder").show()}},pasteHandler:function(g,f){this.toggleError(g,false)},keyupHandler:function(g,f){var h=d.trim(g.val());if(h&&({";":true,",":true})[h[h.length-1]]){g.val(h.replace(/[;,]/gi,""));this.addItem(g)}},removeItem:function(g,h){this.toggleError(g,false);if(h){if(this.selectedItems){var f=h.data("item.emailsSelect").value+","}var l=d("#msgToID").val();l=l.replace(f,"");d("#msgToID").val(l);delete this.selectedItems[h.data("item.emailsSelect")];h.remove()}return false},validate:function(f,h){var g=true;if(!!this.options.validate){if(typeof(this.options.validate)=="function"){g=this.options.validate(h)}else{if(typeof(this.options.validate)=="string"){g=new RegExp(this.options.validate,"i").test(h)}else{if(!!this.options.validate&&typeof(this.options.validate.test)=="function"){g=this.options.validate.test(h)}}}g=typeof(g)==e?true:!!g}this.toggleError(f,!g?"Please enter a valid Email address":!!g);return g},addItem:function(g,f){var m=d.extend({value:d.trim(g.val())},(f||{}));this.selectedItems=this.selectedItems||{};if(m&&(f||this.validate(g,m.value))){var h=d(a((this.options.tagtemplate||c.defaults.tagtemplate),m));h.appendTo(g.closest(".emailsSelectWrap").find(".items")).find(".emailsSelectItemCloseBtn").click(b(this,this.removeItem,g,h));var l=d("#msgToID").val();l=l+g.val()+",";d("#msgToID").val(l);h.data("item.emailsSelect",m);g.val("").focus();this.selectedItems[m.value]=true}},keydownHandler:function(g,f){this.toggleError(g,false);var h;switch(f.which){case 13:case 9:if(g.val()==""){h=true;break}case 32:h=false;this.addItem(g);break;case 8:h=this.checkRemove(g);default:console.log(f.which);break}return h},checkRemove:function(g){var l=g.val();if(l.length==0){var h=g.closest(".emailsSelectWrap").find(".items").children().last();var f=h.data("item.emailsSelect");if(h.length>0&&!!f){this.removeItem(g,h);g.val(f.value);return false}}return true},toggleError:function(g,h){var f=g.closest(".emailsSelectWrap").toggleClass("error",!!h);if(typeof(h)=="string"&&!!h){f.find(".errorBubble").text(h)}},getVal:function(f){var g=[];f.closest(".emailsSelectWrap").find(".items").children().each(function(){var h=d(this).data("item.emailsSelect");if(h&&"value" in h){g.push(h.value)}});return g},setVal:function(h,n){var g=[];if(typeof(n)=="string"||n instanceof String){g=n.split(new RegExp("["+(this.options.separator||"").replace(/([\.\[\]\{\}\(\)\-\_])/ig,"\$1")+"]","i"))}else{if(n instanceof Array){g=n}}for(var m=0,f=g.length;m').addClass(h.itemClass).data("item.autocomplete",o).append(a((h.itemtemplate||c.defaults.autocomplete.itemtemplate),o)).appendTo(l.addClass("emailsSelectAutocomplete"+(h.listClass||"")))}}}};c.defaults={placeholder:"",value:"",separator:",",validate:"^\\w[a-z0-9\\-_\\.]*\\@\\w[a-z0-9\\-_\\.]*\\.\\w\\w+$",tagtemplate:'{value}x ',autocomplete:{itemClass:"",labelprop:"label",itemtemplate:"{label} "}};c.create=function(g,f){var h=g.data("emailsSelect");if(!h){var l=d.extend({},this.defaults,f);if(!("autocomplete" in (f||{}))){delete l.autocomplete}h=new this(g,l);if(h){g.data("emailsSelect",h)}}return h};c.callMethod=function(h,f,g){var l=h.data("emailsSelect");if(l){if(typeof(l[f])=="function"){return l[f].apply(l,g)}else{d.error("$.emailsSelect has no method "+f)}}else{d.error("Element "+h.selector+" is not an $.emailsSelect")}};d.fn.emailsSelect=function(f){if(typeof(f)=="object"||!f){return this.each(function(){return c.create(d(this),f)})}else{if(typeof(f)=="string"){return this.each(function(){return c.callMethod(d(this),f,Array.prototype.slice.call(arguments,1))})}else{d.error("$.emailsSelect: not supported")}}}})(jQuery)}function hideComposeMessagePopup(){hideSmartInputFloater();document.getElementById("messagePopupContent").innerHTML="";hideElement("messagePopup")}function sendNewMessage(f,d,m,e,p,n,l,g){if(f=="sendShareMsg"){$("#errorToField").html("");$("#msgDescriptionID_error").html("");var b=$("#msgToID1").val();if(b.trim()!=""){var c=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;if(!c.test(b)){$("#errorToField").html("Enter valid email id");return}b=","+b}var h=$("#msgToID").val();$("#msgToID").val(h+b);if($("#msgToID").val().trim()==""){$("#errorToField").html("Message recipients cannot be blank");return}if($("#msgDescriptionID").val().trim()==""){$("#msgDescriptionID_error").html("Message body cannot be blank");return}}var a=new Object();a.action=f;a.subject=document.getElementById("msgSubjectID").value;a.description=document.getElementById("msgDescriptionID").value;if(p!=null&&typeof p!="undefined"){a.currentUrl=p}if(f=="sendShareMsg"){a.recaptcha_challenge_field=$("#recaptcha_challenge_field").val();a.recaptcha_response_field=$("#recaptcha_response_field").val()}if(d!=null&&typeof d!="undefined"&&d!=""){a.replyTo=d;a.to=d;if(l!=null&&typeof l!="undefined"&&l!=""){a.retailerName=l}}else{if(document.getElementById("msgToID")){a.to=document.getElementById("msgToID").value}}populateEntityMapInfo(a,m);if(n!=null&&typeof n!="undefined"&&n!=""){a.to=n;a.toSN=n}if(g!=null&&typeof g!="undefined"&&g!=""){a.contentTheme=g}if(e!=null&&typeof e!="undefined"){a.allowNonFriend=e}var o=new Object();hideElement("msgSendBtns");showElement("msgSendSpinner");if(f!=null&&typeof f!="undefined"&&f=="sendUserMsg"){sendButtonClicked=true}formSubmitAJAX("/za/compose-message",a,"sendNewMessageCallback",o)}function sendNewMessageCallback(d,c){var a=d.getElementsByTagName("view");
if(a.length>0){var b=generateAJAXResponseHTML(a[0].childNodes);document.getElementById("messagePopupContent").innerHTML=b;$("#msgToID1").emailsSelect({autocomplete:{appendTo:".sharePopup .newPopupContent",itemClass:"ddItem",labelprop:"username",itemtemplate:'{username} ',source:friendsIdNameList}});var e=generateAJAXResponseHTML(d.getElementsByTagName("recaptchaEnabled")[0].childNodes);if(e=="true"){var f=generateAJAXResponseHTML(d.getElementsByTagName("recaptchaPublickey")[0].childNodes);$.getScript("http://www.google.com/recaptcha/api/challenge?k="+f);$.getScript("http://www.google.com/recaptcha/api/js/recaptcha_ajax.js",function(){Recaptcha.create(f,"recaptcha_image",{theme:"custom",custom_theme_widget:"recaptcha_image",lang:"en"})})}$(".has_placeholder").keyup(function(g){if(this.value!=""){$(this).parent().children(".placeholder").hide()}else{$(this).parent().children(".placeholder").show()}})}else{hideComposeMessagePopup();if(!loggedIn){_gaq.push(["_trackEvent","Share","Non-Logged-in",""])}else{_gaq.push(["_trackEvent","Share","Logged-in",""])}}}function populateEntityMapInfo(b,a){if(a!=null&&typeof a!="undefined"){if(typeof a.entityId!="undefined"&&a.entityId!=""){b.entityId=a.entityId}if(typeof a.entityType!="undefined"&&a.entityType!=""){b.entityType=a.entityType}if(typeof a.storeDomain!="undefined"&&a.storeDomain!=""){b.storeDomain=a.storeDomain}if(typeof a.allFans!="undefined"&&a.allFans!=""){b.allFans=a.allFans;if(b.allFans){b.to="All Fans"}}if(typeof a.articleId!="undefined"&&a.articleId!=""){b.articleId=a.articleId}if(typeof a.itemId!="undefined"&&a.itemId!=""){b.itemId=a.itemId}if(typeof a.currentUrl!="undefined"&&a.currentUrl!=""){b.currentUrl=a.currentUrl}if(typeof a.entityName!="undefined"&&a.entityName!=""){b.entityName=a.entityName}if(typeof a.entityIdHex!="undefined"&&a.entityIdHex!=""){b.entityIdHex=a.entityIdHex}if(typeof a.channelUFName!="undefined"&&a.channelUFName!=""){b.channelUFName=a.channelUFName}if(typeof a.sectionUFName!="undefined"&&a.sectionUFName!=""){b.sectionUFName=a.sectionUFName}if(typeof a.contentType!="undefined"&&a.contentType!=""){b.contentType=a.contentType}}}function removeDefaultText(a){hideElement("inputTextBox");showElement("inputTextArea");if(document.getElementById("msgToID")){document.getElementById("msgToID").focus()}}function addDefaultTextIfEmpty(b){if(document.getElementById("msgToID")){var a=document.getElementById("msgToID").value;if(a.length==0){hideElement("inputTextArea");showElement("inputTextBox")}}}function closeClicked(){hideElement("showfriendscreen");showElement("sharescreen")}var selectedFollowersForMessage=0;var limitFollowers=false;function selectAllFriends(a){if(a){$("#friendsData > li").each(function(b){$(this).addClass("selected")});$("#selectAllUsers").attr("onClick","javascript:selectAllFriends(false);")}else{$("#friendsData > li").each(function(b){$(this).removeClass("selected")});$("#selectAllUsers").attr("onClick","javascript:selectAllFriends(true);")}}function selectAll(b){var a=document.getElementById("friendsData");var e=a.getElementsByTagName("input");if(e!=null){selectedFollowersForMessage=0;for(var d=0;d10){var c=e.length-1;while(selectedFollowersForMessage>10){if(e[c].type=="checkbox"&&e[c].checked){e[c].checked=false;selectedFollowersForMessage=selectedFollowersForMessage-1;c=c-1}}}if(limitFollowers&&!b){selectedFollowersForMessage=0}}}function showFriendsScreen(b){limitFollowers=b;selectedFollowersForMessage=0;var c=document.getElementById("msgToID").value;var a=document.getElementById("friendsData");if(a!=null){var e=a.getElementsByTagName("input");if(e!=null){for(var d=0;de[d].value.length&&c.substring(0,c.indexOf(","))==e[d].value){e[d].checked=true}else{if(c.substring(c.lastIndexOf(",")+2)==e[d].value){e[d].checked=true}else{e[d].checked=false}}}}}if(limitFollowers&&e[d].checked){selectedFollowersForMessage=selectedFollowersForMessage+1}}}}}hideElement("sharescreen");showElement("showfriendscreen");if(limitFollowers){if(selectedFollowersForMessage>10){showElement("max10errormessage")}else{hideElement("max10errormessage")}}}function validateAndUpdateFollowerNumber(a){if(limitFollowers){if(a.checked){if(selectedFollowersForMessage>=10){showElement("max10errormessage");a.checked=false}else{selectedFollowersForMessage=selectedFollowersForMessage+1}}else{selectedFollowersForMessage=selectedFollowersForMessage-1;if(selectedFollowersForMessage<=10){hideElement("max10errormessage")}}}}function doneChoosing(c,b){if(limitFollowers&&selectedFollowersForMessage>10){return}if(c==document.getElementById("msgToID").value){document.getElementById("msgToID").value=""}if(b==document.getElementById("msgToID").value){document.getElementById("msgToID").value=""}var d=document.getElementById("msgToID").value;var a=document.getElementById("friendsData");var f=a.getElementsByTagName("input");if(d.indexOf(",")!=-1){if(trim(d.substring(d.lastIndexOf(",")+1))==""){d=d.substring(0,d.lastIndexOf(","))}}if(f!=null){for(var e=0;ef[e].value.length&&d.substring(0,d.indexOf(","))==f[e].value){d=d.substring(d.indexOf(",")+2)}else{if(d.substring(d.lastIndexOf(",")+2)==f[e].value){d=d.substring(0,d.lastIndexOf(","))}}}}}else{if(d.length==0){d=f[e].value}else{if(d.indexOf(f[e].value)==-1){d+=", "+f[e].value}else{if(f[e].value==d||d.indexOf(",")!=-1&&((d.length>f[e].value.length&&d.substring(0,f[e].value.length+1)==(f[e].value+","))||(d.substring(d.lastIndexOf(",")+2)==f[e].value)||(d.indexOf(", "+f[e].value+",")!=-1))){continue}else{d+=", "+f[e].value}}}}}}document.getElementById("msgToID").value=d;if(d!=""&&document.getElementById("errorToField")!=null){hideElement("errorToField")}}hideElement("showfriendscreen");showElement("sharescreen");if(document.getElementById("msgToID").value.length==0){hideElement("inputTextArea");showElement("inputTextBox")}else{hideElement("inputTextBox");showElement("inputTextArea")}}function getMatch(a,b){var c=' ';if(b=="n"){if(document.getElementById("next-btn")){document.getElementById("next-btn").innerHTML=c}}else{if(document.getElementById("prev-btn")){document.getElementById("prev-btn").innerHTML=c}}queryString+="&startIndex="+a;document.getElementById("fb_form").action=queryString;document.location.href=queryString}function getItem(c,b){var a="";if(typeof b!="undefined"&&(b==true||b=="true")){a+="/store"}a+="/"+document.getElementById("userName").value;a+="/"+document.getElementById("listName").value;if(c!=""){a+="?"+c}window.location.href=a}function getPreviousNextFB(b,c){var a="/"+document.getElementById("userName").value;a+="/"+b;if(c!=""){a+=c}window.location.href=a}function searchTextFocus(d,a,g){var e="st";if(g){e+=g}var c=document.getElementById(e).value;var b="Search for ";if(c=="item"||c=="Items"){b+="products"}else{if(c=="page"){b+="lists"}else{if(c=="collage"){b+="styleboards"}else{if(c=="user"){b+="people"}else{if(c=="deal"){b+="sales"}else{if(c=="retailer"){b+="stores"}}}}}}var f=d;if(g){f+=g}if(document.getElementById(f).value==b){document.getElementById(f).value=""}document.getElementById(f).style.fontStyle="normal";onFocusTopSearchbox(f,a)}function searchTextBlur(q,d,f){var h="st";if(f){h+=f}var m=document.getElementById(h).value;var n="Search for ";var o="products";var e="lists";var g="styleboards";var l="people";var c="sales";var b="stores";var p;if(m=="item"||m=="Items"){p=o}else{if(m=="page"){p=e}else{if(m=="collage"){p=g}else{if(m=="user"){p=l}else{if(m=="deal"){p=c}else{if(m=="retailer"){p=b}}}}}}var a=q;if(f){a+=f}if(((document.getElementById(a).value==n+o||document.getElementById(a).value==n+e||document.getElementById(a).value==n+g||document.getElementById(a).value==n+c||document.getElementById(a).value==n+b||document.getElementById(a).value==n+l)||document.getElementById(a).value==""||document.getElementById(a).value.length<=0)){$("#searchPlaceHolderId").attr("value",n+p);$("#search_range .text").text(p);document.getElementById(q).value="";searchBoxBlur();return false}document.getElementById(a).style.fontStyle="normal";return true}function onFocusTopSearchbox(n,a){if(typeof topSearchACOptions=="undefined"){var m;try{m=document.standardCreateElement("script")}catch(b){m=document.createElement("script")}m.type="text/javascript";m.src="http://cn2.kaboodle.com/ht/scripts/searchAutoCompleteList.js?v="+a;document.getElementsByTagName("head")[0].appendChild(m)}if(typeof YAHOO=="undefined"||typeof YAHOO.widget.AutoComplete=="undefined"){var l;var h;var g;var f;var d;var c;try{l=document.standardCreateElement("script");h=document.standardCreateElement("script");g=document.standardCreateElement("script");f=document.standardCreateElement("script");d=document.standardCreateElement("script");c=document.standardCreateElement("script")}catch(b){l=document.createElement("script");h=document.createElement("script");g=document.createElement("script");f=document.createElement("script");d=document.createElement("script");c=document.createElement("script")}l.type="text/javascript";l.src="http://cn2.kaboodle.com/ht/scripts/yui/yahoo-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(l);h.type="text/javascript";h.src="http://cn2.kaboodle.com/ht/scripts/yui/dom/dom-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(h);g.type="text/javascript";g.src="http://cn2.kaboodle.com/ht/scripts/yui/event/event-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(g);f.type="text/javascript";f.src="http://cn2.kaboodle.com/ht/scripts/yui/animation/animation-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(f);d.type="text/javascript";d.src="http://cn2.kaboodle.com/ht/scripts/yui/datasource/datasource-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(d);c.type="text/javascript";c.src="http://cn2.kaboodle.com/ht/scripts/yui/autocomplete/autocomplete-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(c)}pollAndLoadSearchAutoComplete(n,"topSearchACSection")}var topSearchAC=null;function pollAndLoadSearchAutoComplete(a,b){if(typeof YAHOO=="undefined"||typeof YAHOO.widget.AutoComplete=="undefined"||typeof topSearchACOptions=="undefined"){window.setTimeout(function(){pollAndLoadSearchAutoComplete(a,b)},200)}else{if(topSearchAC==null){topSearchAC=new YAHOO.widget.AutoComplete(a,b,new YAHOO.util.LocalDataSource(topSearchACOptions));topSearchAC.minQueryLength=0;topSearchAC.allowBrowserAutocomplete=false;topSearchAC.autoHighlight=false;topSearchAC.maxResultsDisplayed=15;topSearchAC.queryMatchContains=true}}}String.prototype.replaceAll=function(c,d){var a=this;var b=a.indexOf(c);while(b!=-1){a=a.replace(c,d);b=a.indexOf(c)}return a};function toggleTopSearchMode(a){$(".searchvariants").toggleClass("kHidden");$(a).toggleClass("hot")}function tmOver(d){var a=document.getElementById("navTab"+d);var e=document.getElementById("popNavDiv");if(document.getElementById("topNavdd"+d)){var c=document.getElementById("topNavdd"+d).innerHTML;if(navigator.appVersion.indexOf("MSIE")>=0){var f=navigator.appVersion.split("MSIE");var b=parseFloat(f[1]);if(b==6||b==8){showAndReturnPopupAboveLeft(a,-1,-1,c,true,1,-7,"popNavDiv","popNavContent",0)}else{if(b==7){showAndReturnPopupAboveLeft(a,-1,-1,c,true,0,-7,"popNavDiv","popNavContent",0)}}}else{showAndReturnPopupAboveLeft(a,-1,-1,c,true,1,-8,"popNavDiv","popNavContent",0)}}}function tmOut(){var a=document.getElementById("popNavContent");if(a){a.innerHTML="";hideElement("popNavDiv")}}function topnav(){$("div.header-global-tabs ul li").hover(function(){name=$(this).attr("id")});$("div#popNavDiv").hover(function(){$("li#"+name+" a").addClass("on")},function(){$("li#"+name+" a").removeClass("on")})}function topnavIE(){$("ul.sn li:last-child").each(function(){$(this).addClass("last")});$("div.popNav").css("padding-bottom","3px")}function loadJS(c,b,a){var f=document.createElement("script");f.setAttribute("type","text/javascript");var d=c;if(b!=""){d+="?v="+b}f.setAttribute("src",d);var e=document.getElementById(a);if(e&&typeof f!="undefined"){e.appendChild(f)}}function heartingAction(e,c,d,l,h,g,b){var a=new Object();a.entityId=e;a.entityType=c;a.userRating="1";a.blogId=d;a.storeId=l;var f=new Object();f.uniqueId=g;f.entityType=c;f.loadPageforNLI=b;if(h!=""&&h!=" "){a.oldRating=h;f.oldRating=h}else{a.oldRating="-1";f.oldRating="-1"}if(document.getElementById(g+"_spanHeartLink")){document.getElementById(g+"_spanHeartLink").innerHTML="loading...";document.getElementById(g+"_spanHeartSpinning").style.display="inline"}formSubmitAJAX("/za/universalAction",a,"heartingActionCB",f)}function heartingActionCB(c,f){var a=c.getElementsByTagName("isUserLoggedIn")[0].firstChild.nodeValue;if(a=="false"||!a){var b=f.loadPageforNLI;location.href=b}else{var e=c.getElementsByTagName("isActivityLimited")[0].firstChild.nodeValue;if(e=="true"){var d=c.getElementsByTagName("activityRedirect")[0].firstChild.nodeValue;location.href=d}else{actionAlreadyTaken=c.getElementsByTagName("actionAlreadyTaken")[0].firstChild.nodeValue;if(actionAlreadyTaken=="true"){if(f.entityType=="10"||f.entityType=="13"){actionText="Yay! I'm a fan!"}else{if(f.entityType=="1"){actionTaken=c.getElementsByTagName("actionTaken")[0].firstChild.nodeValue;if(actionTaken=="alreadyFollowing"){actionText="Already Following"}else{if(actionTaken=="following"){actionText="Following"}else{if(actionTaken=="requested"){actionText="Request Pending"}else{if(actionTaken=="BlockedUser"){actionText="User has blocked you"}else{if(actionTaken=="YouBlockedUser"){actionText="You have blocked this user"}}}}}}else{if(f.entityType=="11"){if(c.getElementsByTagName("isadmin")[0].firstChild){isAdmin=c.getElementsByTagName("isadmin")[0].firstChild.nodeValue;if(isAdmin=="true"){actionText="You're an admin"}else{actionText="You heart this"}}else{actionText="You heart this"}}else{actionText="You heart this"}}}}else{if(f.entityType=="10"||f.entityType=="13"){actionText="Yay! I'm a fan!"}else{if(f.entityType=="1"){actionText="Invite pending"}else{actionText="Hearted";trackHeartingEvent(f.entityType)}}}if(actionAlreadyTaken=="false"||f.oldRating=="-1"){if(c.getElementsByTagName("totalRating")[0].firstChild){returnValue=c.getElementsByTagName("totalRating")[0].firstChild.nodeValue;document.getElementById(f.uniqueId+"_spanHeart").innerHTML=returnValue}}document.getElementById(f.uniqueId+"_spanHeartLink").innerHTML=actionText;$("#"+f.uniqueId+"_spanHeartLink").addClass("hearted");document.getElementById(f.uniqueId+"_spanHeartSpinning").style.display="none"}}}function fixElements(){if($("div.k-footer-cross-links div.moduleOneSixth").length){$("div.k-footer-cross-links div.moduleOneSixth:last").each(function(){$(this).addClass("last")})}}function showAddToWSLPopUp(a){var c="#"+a+"_overlay";var b="#"+a+"_id";var d="#"+a+"_listId";var f=new Object();f.action="GET_OPTIN_STATE";f.divId=a;f.itemId=$(b).html();f.listId=$(d).html();var e=new Object();e.divId=a;formSubmitAJAX("/za/addToWeeklyShoppingList",f,"showAddToWSLPopUpCallBack",e,null,null,null,"POST")}function showAddToWSLPopUpCallBack(g,n){var e=g.getElementsByTagName("addToListPopUp");if(e.length>0){document.getElementById("addToWeeklyListPopUp").innerHTML=generateAJAXResponseHTML(e[0].childNodes)}var q=n.divId;var h="#"+n.divId+"_overlay";var p=$("#"+n.divId+"_title").html();var d=$("#"+n.divId+"_expiryDate").html();var m=$("#"+n.divId+"_description").html();var l=$("#"+n.divId+"_price").html();var o=$("#"+n.divId+"_availableOnline").html();var c="";if($("#"+n.divId+"_customLink")&&$("#"+n.divId+"_customLink").html()!=""){c=unescapeHTML($("#"+n.divId+"_customLink").html())}var b;if($(h).parents("div.overlayWrap").length>0){b=$(h).parents("div.overlayWrap").children("a").children("img").attr("src");if(typeof b=="undefined"){b=$(h).parents("div.overlayWrap").children("div.itemPic").children("a").children("img").attr("src")}}if($(h).parents("div.articleGridCont").length>0){b=$(h).parents("div.articleGridCont").children("div.holderout").children("div.holderin").children("div.imgWrap").children("a").children("img").attr("src")}if(typeof b=="undefined"){b=$("#"+n.divId+"_title").parents("div.itemPic").children("a").children("img").attr("src")}if(document.getElementById("titleDiv")){document.getElementById("titleDiv").innerHTML=p}if(document.getElementById("imgEle")){document.getElementById("imgEle").src=b;document.getElementById("imgEle").title=p;document.getElementById("imgEle").alt=p}if(document.getElementById("endDateEle")){document.getElementById("endDateEle").innerHTML=d}if(document.getElementById("priceDiv")){document.getElementById("priceDiv").innerHTML=l}if(document.getElementById("summaryDiv")){document.getElementById("summaryDiv").innerHTML=m}if(document.getElementById("buyItText")){if(c!=""&&(o=="Y"||o=="y"||o=="true"||o==true)){document.getElementById("buyItAnchor").innerHTML=c;showElement("buyItText")}else{hideElement("buyItText")}}if(document.getElementById("addToListLink")){document.getElementById("addToListLink").href="javascript:addToWeeklyShoppingListPopupUH('"+q+"','addToListLink');"}if(document.getElementById("close-link")){document.getElementById("close-link").href="javascript:closeWLAddItemPopup('WSLPopUpItemDiv');"}if(document.getElementById("contestDiv")){if(document.getElementById("showOptin").value=="true"){hideElement("contestDiv")}else{showElement("contestDiv")}}var f=document.getElementById(q);var a=document.getElementById("weekly-item-container").innerHTML;document.getElementById("weekly-item-container").innerHTML="";showAndReturnPopupAboveRight(f,-1,-1,a,false,560,350,"WSLPopUpItemDiv","WSLPopUpItemContent",true)}function addToWeeklyShoppingListPopupUH(b,a){var f=new Object();var d="#"+b+"_overlay";var c="#"+b+"_id";var e="#"+b+"_listId";f.divId=d;f.title=$("#"+b+"_title").html();f.itemId=$(c).html();f.listId=$(e).html();f.weeklyItemComment=document.getElementById("weeklyItemComment").value;f.action="COPY_WEEKLY_ITEM";if(document.getElementById("enterContest")){f.enterContest=document.getElementById("enterContest").checked}var h=new Object();h.divId=b;var g=' ';if(a!=null&&typeof a!="undefined"){h.srcDivId=a;h.srcHtml=document.getElementById(a).innerHTML;document.getElementById(a).innerHTML=g}formSubmitAJAX("/za/addToWeeklyShoppingList",f,"addToWeeklyShoppingListPopupCallback",h,null,null,null,"POST")}function addToWeeklyShoppingListPopupCallback(e,h){var c=document.getElementById(h.divId);var g=e.getElementsByTagName("listOverFlow");var m="";var f=false;if(h.srcDivId!=null&&typeof h.srcDivId!="undefined"){document.getElementById(h.srcDivId).innerHTML=h.srcHtml}if(g.length!=0){var a=generateAJAXResponseHTML(g[0].childNodes);if(a){closeWLAddItemPopup("WSLPopUpItemDiv");var g=e.getElementsByTagName("listOverFlow");if(document.getElementById("maxErrorMyListUrl")){var b=e.getElementsByTagName("pageUrl");var n=generateAJAXResponseHTML(b[0].childNodes);document.getElementById("maxErrorMyListUrl").href=n}showListMaxItemsPopUp()}}else{closeWLAddItemPopup("WSLPopUpItemDiv");if(h.divId!=null&&h.divId!=""){linkElement=document.getElementById("addToListAnchor_"+h.divId);if(linkElement){linkElement.innerHTML=" Just added!";linkElement.style.color="#535353"}}if(e.firstChild){for(var d=0;d')}else{m=this.createElement("IFRAME")}m.id=this.AUTH_IFRAME_ID;m.name=this.AUTH_IFRAME_ID;m.src=a+"&ncl="+this.noCloseLink;m.scrolling="no";m.frameBorder="0";m.allowTransparency="true";m.style.cssText="border: 0px; width: "+b+"px; height: "+l+"px; background-color: transparent; display:block;";h.appendChild(m);if(typeof this.parentId!="undefined"){document.getElementById(this.parentId).appendChild(h)}else{this.getBody().appendChild(h);centerElement(h,l,b)}h.style.visibility="visible"};this.removeAuthWindow=function(){var a=document.getElementById(this.AUTH_ELEMENT_ID);if(a){if(typeof this.parentId!="undefined"){document.getElementById(this.parentId).removeChild(a)}else{this.getBody().removeChild(a)}}};this.createElement=function(a){try{var b=document.standardCreateElement(a);if(typeof(b)=="object"){return b}}catch(c){}return document.createElement(a)};this.getBody=function(){var a=null;try{a=document.getElementsByTagName("body")[0]}catch(b){a=document.body}return a}}var kaboodleAuthenticatePopup=new AuthenticatePopup();function showKAuthPopup(m,l,e,f,h,b,g,d){var c="";if(l!=null&&l.length>0){c="&postReg="+l;c=c+"&postreg="+l}var a="";if(d){var n=d;for(param in n){a=a+"&"+param+"="+n[param]}}if(!g){g=""}if(m){window.parent.location="/za/login?p_ret="+g+c+a}else{window.parent.location="/za/signup?p_ret="+g+c+a}}function closeKAuthPopup(){var a=window.parent.kaboodleAuthenticatePopup;if(a==undefined){a=kaboodleAuthenticatePopup}a.removeAuthWindow()}function redirectFromAuthPopup(a){window.parent.location.href=a}function kAuthPopupSuccessCB(isUserReg,HDMJumpUrl){closeKAuthPopup();var authObj=window.parent.kaboodleAuthenticatePopup;if(authObj==undefined){authObj=kaboodleAuthenticatePopup}if(typeof authObj.callbackMethod!="undefined"&&authObj.callbackMethod!=null){eval(authObj.callbackMethod)(isUserReg)}else{if(typeof authObj.returnUrl!="undefined"&&authObj.returnUrl!=null){window.location.href=window.location.protocol+"//"+window.location.hostname+authObj.returnUrl}else{var urlToGO=window.location.protocol+"//"+window.location.hostname;if(isUserReg){urlToGO+="/za/choose-brands?postreg=hp"}else{urlToGO+="/my"}if(hdmSSOConfig.ssoEnabled&&!hdmSSOConfig.isAdmin&&HDMJumpUrl!=""){urlToGO=HDMJumpUrl+encodeURIComponent(urlToGO)}window.location.href=urlToGO}}}function shareEntity(b,d,c,g,f){var e=new Object();e.entityId=b;e.entityType=d;e.entityName=c;e.sharedOn=g;e.source=f;var a=new Object();a.entityId=e.entityId;a.sharedOn=g;formSubmitAJAX("/za/trackEntitySharing",e,"shareEntityCB",a)}function shareEntityCB(b,a){}function centerElement(d,e,b){var c=getViewWidth();var a=getViewHeight();if(e>a){a=(e-a)/2}else{a=(a-e)/2}if(c<940){c=180}else{c=(c-b)/2}d.style.position="absolute";d.style.left=c+"px";if(navigator.userAgent.indexOf("Safari")>=0){d.style.top=(a+parseInt(document.body.scrollTop))+"px"}else{d.style.top=(a+parseInt(document.documentElement.scrollTop))+"px"}}function createAffiliateExitForm(c,f,m,e){var d=new Date();var n="item."+d.getTime();var b=document.createElement("form");b.id=n;b.action="/za/exitPageRedirect";b.method="post";b.target="_blank";var o=document.createElement("input");o.setAttribute("type","hidden");o.setAttribute("name","buyItLink");o.setAttribute("value",c);b.appendChild(o);var h=document.createElement("input");h.setAttribute("type","hidden");h.setAttribute("name","externalDomain");h.setAttribute("value",f);b.appendChild(h);if(e!=""){var g=document.createElement("input");g.setAttribute("type","hidden");g.setAttribute("name","exitTrackingData");g.setAttribute("value",e);b.appendChild(g)}if(m!=""){var a=m.split("&");if(a.length>0){for(var l=0;l0){var errorMessage=generateAJAXResponseHTML(results.getElementsByTagName("validationError")[0].childNodes);if(callbackParams.popup){document.getElementById("entityCommentPopupError_"+callbackParams.entityId).innerHTML=errorMessage;hideElement("addEntityCommentPopupSpinner_"+callbackParams.entityId);showElement("addEntityCommentPopupBtn_"+callbackParams.entityId);showElement("addEntityCommentPopupCancelLink_"+callbackParams.entityId)}else{document.getElementById("entityCommentError_"+callbackParams.entityId).innerHTML=errorMessage;if(callbackParams.hidden){showElement("addEntityCommentCancelLink_"+callbackParams.entityId)}showElement("addEntityCommentBtn_"+callbackParams.entityId);hideElement("addEntityCommentSpinner_"+callbackParams.entityId)}return}callbackParams.commentId=generateAJAXResponseHTML(results.getElementsByTagName("commentId")[0].childNodes);callbackParams.commentHTML=generateAJAXResponseHTML(results.getElementsByTagName("comment")[0].childNodes);eval(callbackParams.func)(callbackParams);if(callbackParams.popup){hideCommentPopupDiv(callbackParams.entityId);hideElement("addEntityCommentPopupSpinner_"+callbackParams.entityId);showElement("addEntityCommentPopupBtn_"+callbackParams.entityId);showElement("addEntityCommentPopupCancelLink_"+callbackParams.entityId);document.getElementById("entityCommentPopupError_"+callbackParams.entityId).innerHTML=""}else{if(callbackParams.hidden){hideElement("addComment_"+callbackParams.entityId);showElement("addEntityCommentCancelLink_"+callbackParams.entityId)}document.getElementById("entityCommentText_"+callbackParams.entityId).value="";$("#entityCommentText_"+callbackParams.entityId).textlimit("#textCommentSize_"+callbackParams.entityId,1000);showElement("addEntityCommentBtn_"+callbackParams.entityId);document.getElementById("entityCommentError_"+callbackParams.entityId).innerHTML="";hideElement("addEntityCommentSpinner_"+callbackParams.entityId);if($("#addCommentIcon_"+callbackParams.entityId).size()>0){showElement("addCommentIcon_"+callbackParams.entityId)}}}function deleteEntityComment(c,b,d,g,h,a){var f=new Object();f.action="deleteComment";f.entityId=b;f.entityType=d;f.commentId=c;if(a&&a!=""){f.parentEntityId=a}var e=new Object();e.delFunc=h;e.commentId=c;e.source=g;e.entityId=b;formSubmitAJAX("/za/entity-comment",f,"deleteEntityCommentCallback",e)}function deleteEntityCommentCallback(results,callbackParams){eval(callbackParams.delFunc)(callbackParams)}function hideCommentPopupDiv(a){hideElement("addCommentPopup");$("#addCommentPopup").find('div[id*="Hearting"]').hide();document.getElementById("entityCommentPopupError_"+a).innerHTML="";document.getElementById("entityCommentTextPopup_"+a).value="";$("#entityCommentTextPopup_"+a).textlimit("#textPopupCommentSize_"+a,1000)}function showCommentPopupDiv(a,b){document.getElementById("entityCommentTextPopup_"+a).value="";if(b){$("#addCommentPopup").find('div[id*="Hearting"]').show()}showElement("addCommentPopup");centerElement(document.getElementById("addCommentPopup"),0,1200)}function K4Dialog(b,a){this.ciPopupDiv;this.dialogId=b;this.dialogTitle=null;this.isModalOpen=false;this._dialogTitleVisible=false;if(!this.ciPopupDiv){$("body").append("
");this.ciPopupDiv=$("#"+this.dialogId);this.ciPopupDiv.dialog({autoOpen:false})}this.ciPopupDiv.addClass("clearfix");this.ciPopupDiv.dialog("option","dialogClass",null);this.ciPopupDiv.dialog("option","draggable",false);this.ciPopupDiv.dialog("option","resizable",false);this.ciPopupDiv.dialog("option","closeOnEscape",false);this.ciPopupDiv.dialog("option","minHeight",0);this.ciPopupDiv.dialog("option","maxHeight",400);this.ciPopupDiv.dialog("option","height","auto");this.ciPopupDiv.dialog("option","minWidth",0);this.ciPopupDiv.dialog("option","maxWidth",600);this.ciPopupDiv.dialog("option","closeText","");this.widget=this.ciPopupDiv.dialog("widget");this.dialogTitle=jQuery(this.widget.children()[0]);this.dialogTitle.detach();this.dialogTitle.attr("visible",false);if(a){if(a.title){this.ciPopupDiv.dialog("option","title",a.title);if(a.titleClass){this.dialogTitle.addClass(a.titleClass)}this.ciPopupDiv.before(this.dialogTitle);this.dialogTitle.attr("visible",true)}if(a.contentClass){this.ciPopupDiv.addClass(a.contentClass)}if(a.dialogClass){this.ciPopupDiv.dialog("option","dialogClass",a.dialogClass)}if(a.draggable){this.ciPopupDiv.dialog("option","draggable",true)}if(a.resizable){this.ciPopupDiv.dialog("option","resizable",true)}if(a.closeOnEscape){this.ciPopupDiv.dialog("option","closeOnEscape",true)}if(a.minHeight){this.ciPopupDiv.dialog("option","minHeight",a.minHeight)}if(a.maxHeight){this.ciPopupDiv.dialog("option","maxHeight",a.maxHeight)}if(a.height){this.ciPopupDiv.dialog("option","height",a.height)}if(a.minWidth){this.ciPopupDiv.dialog("option","minWidth",a.minWidth)}if(a.maxWidth){this.ciPopupDiv.dialog("option","maxWidth",a.maxWidth)}if(a.width){this.ciPopupDiv.dialog("option","width",a.width)}if(a.closeText){this.ciPopupDiv.dialog("option","closeText",a.closeText)}if(a.zIndex){this.ciPopupDiv.dialog("option","zIndex",a.zIndex)}}this.appendElement=function(c){this.ciPopupDiv.append(c)};this.bindEvent=function(c,d){this.ciPopupDiv.bind(c,d)};this.unbindEvent=function(c){this.ciPopupDiv.unbind(c)};this.triggerEvent=function(c,d){this.ciPopupDiv.trigger(c,d)};this.openDialog=function(c){if(c){this.isModalOpen=true;$("body").append('
');$("#k4dialog_modal_overlay").height(jQuery(document).height());$("#k4dialog_modal_overlay").width(jQuery(document).width());$("#k4dialog_modal_overlay").css("z-index",this.ciPopupDiv.dialog("option","zIndex")-1)}this.ciPopupDiv.dialog("open")};this.closeDialog=function(){if(this.isModalOpen){$("#k4dialog_modal_overlay").remove()}this.ciPopupDiv.dialog("close")};this.disableDialog=function(c){this.ciPopupDiv.dialog("option","disabled",c)};this.killDialog=function(){this.ciPopupDiv.remove()};this.width=function(c){if(c){this.ciPopupDiv.dialog("option","width",c)}else{return this.ciPopupDiv.dialog("option","width")}};this.height=function(c){if(width){this.ciPopupDiv.dialog("option","height",c)}else{return this.ciPopupDiv.dialog("option","height")}};this.setTitle=function(d,c){if(d){this.ciPopupDiv.dialog("option","title",d);if(c){this.dialogTitle.addClass(c)}if(!this.isTitleVisible()){this.ciPopupDiv.before(this.dialogTitle);this.dialogTitle.attr("visible",true)}}else{return this.ciPopupDiv.dialog("option","title")}};this.isTitleVisible=function(){return this.dialogTitle.attr("visible")};this.isDialogOpen=function(){return this.ciPopupDiv.dialog("isOpen")};this.setInlineDialogStyle=function(c){this.widget.css(c)};this.positionRelative=function(e,g,d,f,c){this.widget.position({my:e,at:g,of:d,collision:f,using:c})};this.positionAbsolute=function(d,c){this.ciPopupDiv.dialog("option","position",[d,c])};this.getDialogOffset=function(){return this.widget.offset()}}var k4CatHover;function K4CatalogItemPopup(a){if(k4CatHover&&k4CatHover!="undefined"){return k4CatHover}this.enterTimeout=500;this.leaveTimeout=500;if(a){if(a.enterTimeout){this.enterTimeout=a.enterTimeout}if(a.leaveTimeout){this.leaveTimeout=a.leaveTimeout}}this._k4CatalogDivId="catalogItemHoverDiv";this._k4CatalogContentIFrameId="catalogItemHoverContentIFrame";this._k4CatalogDivSpinnerId="catalogHoverSpinner";this._k4CatalogLeftArrowId="catalogHoverLeftArrow";this._k4CatalogRightArrowId="catalogHoverRightArrow";this.ciDialog;this.ciPopupSpinner;this.ciPopupContentIFrame;this.ciPopupLeftArrow;this.ciPopupRightArrow;this.currentTarget=null;this.loadedCatalogItemId=null;this.popupTimer=null;this._catalogLoadedContents=new Array();if(!this.ciDialog){var a={contentClass:"prodHoverBorder clearfix",zIndex:"99998",width:"400px"};this.ciDialog=new K4Dialog(this._k4CatalogDivId,a);this.ciDialog.setInlineDialogStyle({position:"absolute"});this.ciDialog.bindEvent("mouseleave",function(){k4CatHover.clearTimer();k4CatHover.startTimer("k4CatHover.hide();",k4CatHover.leaveTimeout)});this.ciDialog.bindEvent("mouseenter",function(){k4CatHover.clearTimer()});this.ciDialog.appendElement(" ");this.ciDialog.appendElement(" ");this.ciDialog.appendElement(" ");this.ciPopupLeftArrow=$("#"+this._k4CatalogLeftArrowId);this.ciPopupRightArrow=$("#"+this._k4CatalogRightArrowId);this.ciDialog.appendElement(" ");this.ciPopupSpinner=$("#"+this._k4CatalogDivSpinnerId);var b="";this.ciDialog.appendElement(b);this.ciPopupContentIFrame=$("#"+this._k4CatalogContentIFrameId)}this._setIFrameContents=function(c){if(this._catalogLoadedContents[c]){this.ciPopupContentIFrame.contents().find("body").html(this._catalogLoadedContents[c]);this.ciPopupContentIFrame.show()}else{var d="/za/catalogItemHover?catalogitemid="+c;this.ciPopupContentIFrame.attr("src",d);this.ciPopupSpinner.show()}};this.triggerHoverAction=function(d,c){};this.showCatalog=function(c){this.ciDialog.openDialog();this.ciDialog.positionRelative("left top","right top",this.currentTarget,"flip");this._showArrow();this._setIFrameContents(c);this.loadedCatalogItemId=c};this._showArrow=function(){var c=this.currentTarget.offset().top+this.currentTarget.height()/4-this.ciDialog.getDialogOffset().top;if(this.ciDialog.getDialogOffset().left");this.usrDialog.appendElement(" ");this.usrDialog.appendElement(" ");this.usrPopupLeftArrow=$("#"+this._k4UserLeftArrowId);this.usrPopupRightArrow=$("#"+this._k4UserRightArrowId);this.usrDialog.appendElement(" ");this.usrPopupSpinner=$("#"+this._k4UserDivSpinnerId);var b="";this.usrDialog.appendElement(b);this.usrPopupContentIFrame=$("#"+this._k4UserContentIFrameId)}this._setIFrameContents=function(c){if(this._userLoadedContents[c]){this.usrPopupContentIFrame.contents().find("body").html(this._userLoadedContents[c]);this.usrPopupContentIFrame.show();this.usrPopupContentIFrame.contents().find(".followingLinkDk, .followingLink").hover(function(){$(this).addClass("unfollowLink")},function(){$(this).removeClass("unfollowLink")})}else{var d="/za/userHover?uid="+c+"&retUrl="+URLEncode(URLEncode(window.location.href));this.usrPopupContentIFrame.attr("src",d);this.usrPopupSpinner.show()}};this.triggerHoverAction=function(d,c){};this.showUser=function(c){this.usrDialog.openDialog();this.usrDialog.positionRelative("left top","right top",this.currentTarget,"flip");this._showArrow();this._setIFrameContents(c);this.loadedUserId=c};this._showArrow=function(){var c=this.currentTarget.offset().top+this.currentTarget.height()/4-this.usrDialog.getDialogOffset().top;if(c>185){c=185}if(this.usrDialog.getDialogOffset().left100){b=b.substring(0,99)}setObjectId(c,b,a)}}function getAppModuleTrends(e,h,g,a,d,b){var f=new Object;f.tc=e;f.numTrends=h;f.numTrendProducts=g;f.action="loadTrendAndProducts";f.cmsTrackingValue=a;f.containerModuleSize=b;var c=new Object;c.moduleId=d;formSubmitAJAX("/trends",f,"getAppModuleTrendsCallback",c)}function getAppModuleTrendsCallback(b,a){var c=b.getElementsByTagName("trendsResponse");if(c.length>0){var d=generateAJAXResponseHTML(c[0].childNodes);document.getElementById(a.moduleId).innerHTML=d}}function enableDates(a,b){if(b==1){hideElement(a)}else{showElement(a)}}function campaignSubmit(){document.getElementById("configureWADSponsor").submit()}function showActionStatusAjax(a,b){$("#"+a).html(''+b+" ")}function removeSameSurfButton(){if(!window.parent.document.getElementById("samesurf_frame_position")){if(getCookie_c("ss_se")=="1"){deleteCookie_c("ss_se","/")}}}function getOffset(a){var c=0;var b=0;var d=a;if(a.offsetParent){c+=a.offsetLeft;b+=a.offsetTop;a=a.offsetParent;while(a){c+=a.offsetLeft;b+=a.offsetTop;c-=a.scrollLeft;b-=a.scrollTop;d=a;a=a.offsetParent}}return{x:c,y:b}}function setTop(b,a){document.getElementById(b).style.top=(getOffset(a).y-20)+"px"}function link_opener(a,c){var b=c.href;if(window.parent.document.getElementById("samesurf_frame_position")&&samesurf_clientapi.location(b,true)){if(navigator.appVersion.indexOf("MSIE")>=0){a.cancelBubble=true}else{a.preventDefault()}return false}return true}function initMemberLists(){var b=document.getElementById("memberLists").children;var g=new Array();if(b&&b.length>0){for(var d=0;d0){for(var d=0;d0){var f=new Object();f.listIds=g;f.action="loadListItems";var c=new Object();c.listIds=g;formSubmitAJAX("/za/member-lists",f,"initMemberListsCallback",c)}}function initMemberListsCallback(f,d){var b=d.listIds;var e=null;while(b.length>0){var a=b.pop();var c=f.getElementsByTagName(a)[0];if(c){listhtml=generateAJAXResponseHTML(c.childNodes);document.getElementById(a+"_items").innerHTML=listhtml}}}function initDisplayMemberLists(e){var b=document.getElementById("memberLists").children;var h=new Array();if(b&&b.length>0){for(var d=0;d0){for(var d=0;d0){var g=new Object();g.listIds=h;g.groupId=e;g.action="loadLists";var c=new Object();c.listIds=h;formSubmitAJAX("/za/member-lists",g,"initDisplayMemberListsCallback",c)}}function initDisplayMemberListsCallback(e,d){var b=d.listIds;b.reverse();while(b.length>0){var a=b.pop();var c=e.getElementsByTagName(a)[0];if(c){var f=generateAJAXResponseHTML(c.childNodes);document.getElementById(a).innerHTML=f}}}function hideUserOptions(a){}function showUserOptions(b,a){if(a){showElement("overlaySpin_"+b);hideElement("overlayCon_"+b)}else{hideElement("overlaySpin_"+b);showElement("overlayCon_"+b)}}function lg_RatingCallBack(b,a){var c=b.getElementsByTagName("rating")[0].firstChild;var f=a.itemId+"_catPage";var e="catVoteCont_"+f;if(c!=null&&c.nodeValue>0){var d="catVoteEle_"+f;if(d!=null){$("#"+e).hide();$("#"+d).addClass("loved");$("#"+d).show()}}else{if(c==null){$("#"+e).hide()}}document.getElementById("itemDiv_"+a.itemIndex).onmouseover=function(){};showUserOptions(a.itemId,false)}function getExitUrl(a,f,e,b){if(a==""&&f!=""){var c=new Object();c.catalogId=f;c.action="fetchExitUrl";var d=new Object();d.catalogItemId=f;d.itemIndex=b;d.itemId=e;formSubmitAJAX("/ci",c,"lg_ExitUrlCallBack",d)}}function lg_ExitUrlCallBack(a,d){var c=a.getElementsByTagName("exitUrlHtml");if(c.length>0){var b=generateAJAXResponseHTML(c[0].childNodes);document.getElementById("exitUrl_"+d.catalogItemId).innerHTML=b}document.getElementById("itemDiv_"+d.itemIndex).onmouseover=function(){showElement("overlay_"+d.itemId)}}function megaHoverOver(){$(this).find(".arrow, .dropdownNav").stop().fadeTo("medium",1).show()}function megaHoverOut(){$(this).find(".arrow, .dropdownNav").stop().fadeTo("medium",0,function(){$(this).hide()})}function topNavInit(){searchAutocomplete()}function searchAutocomplete(){var a=["1950's Shoes","abbey dawn","abby cadabby","abercrombie","acai","Accu-Length Expandable","adam slight","adeline","adidas","airstream string lights","ALE Japanese Import Kokka","Alesana","alex","alias phone covers","all members","American Living Matte Jersey Slip Dress","anami and janine","andy warhol","armless roll back chaise","art","aussiebum pilobtr","AUSTIN BUCKLE","avenged sevenfold seize the day messenger bag","axel cosplay","baby","baby booties","baby bottles","baby milan diaper bag","baby paper set","baby registry","backgammon pink orange","backpacks for kids","Bags","balenciaga","bandage dress","bandai blueberry","baseball","baseball bats","bearing","beatties basics","beauty and the beast doll","bedding","bedspreads","Before Baby Boost","belly rings","best chocolate chip cookies","beyond by jovani","BIG cheery panda pillow","bike racks","bingo","bioset","biva.com","black and ivory damask","black and white bedroom","black dolman","black tutu","blooming bouquet","blu ray ripper","blythe","books","boots","box","bracelet","brass knuckles","BRASS KNUCKLES NECKLACE","Breckelle Avalon-22 Boot Brown","bubble umbrella","buckle","bunny love","cake toppers","california earth minerals","camera","camera necklace","camouflage headbands","cardigan","care bears","catherine holm","cb2","Ceiling","Celebrity","cell phone covers","centerpieces","Chambray","chanel bag","charging station","Chef","cherry blossom silk fan","cherry desk","church birdcages","cialis","Clandestine Industries","class ring","classic pooh","clocks","cloths","coach sneakers","COACH Taryn","cobra starship","Coffee maker","color jeans","comforter","computer","conair","converse","copper tumbler","corset","cotton time march 2007","crooked furniture","crop in style","cross filament","crown","cupcake","cupcake purse","cupcakes","current fashion","curve cologne","cynelena","damask","damask print","davids bridal alpha shoe","daybed","dc","deadwood","Death Note","decals","demi bra","denim shorts","dentek","dgk","diaper cake","dinosaur necklace","discgear 120","dk rage","domestic bliss","dr. seuss","dress","Dripping Zombie Necklace","dumbell","duvet covers","DVD","DVD STORAGE","earrings","Ed Hardy","edun","Eeyore","electronic stapler","emily","enchanted forest","Entourage","espadrille","etsy","explorer bike trailer","facebook","famous","fashion gloves","faux fireplace","feathered headband","fimo","firefly notes","firemam sam water squiter","Fisher Price Imaginext Seablade Octopus L3523","Flat shoes","fleur de lis","flower bedding","footies","french furniture","fresherlonger miracle food storage","frooblie","furniture","fuzzy leggings","gamegiants","games","garden treasures pergola","George Baby","glass lantern","glassfancy","gloomy bear","gold tone boombox necklace","goth","gothic","Grady Nautel","green irish chain","gucci","guitar learning software","Guns n Roses","Gyllen wall lamp","hair extension fringe","Hairspray Broadway musical","half sink dish drainer","hand soap","hannah montana","Hannah Montana Cologne","headband","heart and crossbones necklace","heels","hello kitty","hello kitty apparel","high backed wing chair","hip scarves","hippie tunic","hollister","holly madison socks","Homer Simpson","hoodies","hookah","hunting cake toppers","ice cream","i-gotU","ikea","ilex","ingrown hair terminator","Jack skellington","jansport","Japanese School Uniform Cosplay Costume","jar hex","jewelry","John","jolly jumper","jones N.Y. in the classroom tee shirt","juicy","june tailor creative cuts","kaiya eve","karen millen","Kasbah Double Door Wicker Space Saver","Kawaii","Kitchen","kits scooter outfit","kitson sneakers","klempner woodworks.com","koi fish","L.A.M.B.","lace peds","lace trim dress","lady's bootie","laptop case","lateral file cabinet","laundry baskets","Laure Rosnovsky handbags","leather bag","leather gloves","leggings","leopard","levitra","lil dino","Lila Jang's Canape","Lilu perfume","lingerie","lip balm","lipglossandblack","littlegirlmart.com","ln17c","loofah back strap","louis vuitton","lovelylowrider","Lucky Brand Braided Halter Top","macbook air","mam pacifier","Marvel Heroes: Men's Lounge Pants","maternity","matryoshka","maxi dress","mcfarlane military","mckenzie","media stand","megakepemonen","megan fox dresses","Melamine","melamine dinnerware set","michael jackson","milkfuls","Mini Charlie the Chick Oval Plush","monokuro boo","mortgage","Motorola S9-HD Bluetooth","My pet Octopus","naked","necklace","New Jersey","new york cosmos","Nightmare before christmas","nightmare before christmas car accessories","nike","nike ankle weights","nike bLAZERS","nirvana","not rated","Occasion","off shoulder","oil painting","olympus","opium shelving","organic","organic food","ornate clock","orphan","owl","owl jewelry","owls","pacifier key chain souvenir","panda","paper bag puppet","paper plate","Paramore","party dress","patio table covers","patriotic children","PATTERNS","pea coats","peace","pen camera","people","perfume","perfumes","peter rabbit","phone number","picture frame","pier 1 phoenix armchair","PIG","pilota","pink leopard","pirate ship","plant pot","pleo dinosaur","plus size swimwear","plush","PODS","polaroid a520","polka dot dress","ponh","poppy decal","Printed Strapless Evening Gowns from Nicole Miller","prints","prom dress","ps3","puma","puma mostro","pure orange oil","purse","purses","real estate","recipe journals","red crystal chandelier","Red Dress","remote control sofa organizer","resin necklace","resist today","retail packaging","rings","ringtones","rira","robert best","rocawear","rocketdog","Rolex Daytona","roller skate","rolling stones","romper","room divider","Ruffle","rugs","safes","schoox","secure gsm phone","seventeen","SF Bay Area","shaggy raggy rug","shipping","Shiva Rea","shoes","sleep mask","slicksticks","smore invitations","snoopy","soap","soap nuts","sofas","solia spiral curling iron","sony dvd cover","soy candles","sports shoes","sportskids","square chargers","steampunk","strawberry","suede fringe bags","summer dresses","Sunglasses","survey","susanjane","sweepstakes","swingers","tattoo cover kit","tattoo necklace","tea leaves valance","teepee","The Nightmare Before Christmas Jack Bling Necklace","thimbles","tights","Tigi Rockaholic Rock Out Shine Blaster","tinkerbell","toilet dog bowl","toms shoes","tops","touchless trash cans","tripp","tripp pants","turtle","tutu","twilight","twilight bracelet","twilight key chain","twisted","twisted cabinets","twisted furniture","umbrellas","undershelf baskets","unicorn fetus","uniquecreations2c","university","ushers","Vacu-Seal","Vampire","vanity","vans","Vans Suspender Bikini Bottom - Black","vases","vera bradley dog collar","very red lipstick","vial","victoria secret","victoria secret gift bag","victoria's secret tuxedo lingerie demi bra","video glasses","video production melbourne","Vintage","vintage eyeglasses","virgin cream","Volkswagon Key","vuitton","wallets","walmart","wastenot saks","waterwatch","wayfarer sunglasses","wedding","wedding dresses","whistle","wii fit","woman's messenger bags","womens pajamas","wood jewelry","Wool-cashmere coat","WSU","zazzle","zebra","zebra backpack","zebra jacket","zebra necklaces","zebra print","zebra print onesies","ZEBRA STEERING WHEEL COVER","amazon.com","etsy.com","target.com","forever21.com","ebay.com","toysrus.com","walmart.com","overstock.com","urbanoutfitters.com","zappos.com","shop.nordstrom.com","asos.com","shopbop.com","ikea.com","jewelrysales24x7.com","jewelryonlinesales.com","macys.com","victoriassecret.com","anthropologie.com","jcpenney.com","bestbuy.com","karmaloop.com","sephora.com","amazon.co.uk","astore.amazon.com","cafepress.com","kohls.com","bluefly.com","neimanmarcus.com","hottopic.com","search.barnesandnoble.com","wetseal.com","bedbathandbeyond.com","dealextreme.com","scrapbookcraze.info","yesstyle.com","revolveclothing.com","drugstore.com","kaboodle.com","oldnavy.com","gap.com","ae.com","net-a-porter.com","amiclubwear.com","store.scrapgirls.com","jcrew.com","nordstrom.com","saksfifthavenue.com","store.delias.com","barnesandnoble.com","imdb.com","crateandbarrel.com","zazzle.com","topshop.com","orientaltrading.com","dbwg.org","kitchencraze.info","sas.factpry.com","crazyapparel.com","ordercharms.com","gojane.com","artandhome.info","charlotterusse.com","cookwarecraze.info","supplies4bird.com","bathandbodyworks.com","sears.com","uncommongoods.com","allposters.com","bloomingdales.com","abercrombie.com","gameroomsupply.info","potterybarn.com","ffffound.com","shop.pacsun.com","modcloth.com","homebargins.info","qvc.com","torrid.com","newegg.com","sweetshoppedesigns.com","freepeople.com","homedepot.com","eluxury.com","dillards.com","artfire.com","blogspot.com","bonluxat.com","orderpiercing.com","art.com","rei.com","google.com","designerdigitals.com","allbedroomfurniture.info","endless.com","delias.com","productsource.info","bananarepublic.com","flickr.com","joann.com","childrens-furniture.info","gymboree.com","pleasureforest.com","play.com","thinkgeek.com","mooncostumes.com","hollisterco.com","yahoo.com","shoes.com","lulus.com","lowes.com","productcraze.info","buckle.com","bhphotovideo.com","williams-sonoma.com","wrapables.com","toytown.info","store.alloy.com","threadless.com","80spurple.com","costco.com","babyflair.info","justdogs.info","piperlime.com","overstride.com","squidoo.com","tillys.com","disneyshopping.go.com","gamestop.com","ebags.com","barefeetshoes.com","containerstore.com","circuitcity.com","productcorral.info","pinupgirlclothing.com","themovielibrary.net","bebe.com","coach.com","newport-news.com","oscraps.com","allaccentfurniture.info","aeropostale.com","yahoo.net","store.apple.com","craigslist.org","scrapbookgraphics.com","allbaby.info","apple.com","homedecorators.com","ulta.com","buy.com","lakeside.com","surlatable.com","couturecandy.com","landsend.com","store.americanapparel.net","youtube.com","llbean.com","productdepot.info","westelm.com","potterybarnkids.com","panchmed.com","devicetree.com","wikipedia.org","juicycouture.com","pro-movies.com","perpetualkid.com","hautelook.com","odgirl.com","retrosportsapparel.info","shirtcraze.info","babyvillage.info","pbteen.com","lnt.com","organize.com","fredericks.com","worldmarket.com","nyandcompany.com","goodmoviesministry.com","theginkamos.com","henryandjune.com","mymoviesearch.com","greatglam.com","kmart.com","smartbargains.com","scrapgirls.com","framesrx.com","justbathroomfurniture.info","jildorshoes.com","teakandwicker.info","bedroommart.info","6pm.com","diningroomflair.info","facebook.com","scrapbookbytes.com","babygirlboutique.com","armynavydepot.info","betseyjohnson.com","metropolitandecor.com","perfumestock.info","polyvore.com","earrings-store.com","moderneurodesign.com","ebay.co.uk","go.com","outdoorandmore.info","80stees.com","handbagsell.com","kidcorner.info","tiffany.com","justsleepwear.info","otterlakemarina.net","cb2.com","drjays.com","journeys.com","foodnetwork.com","horchow.com","okbuyphone.com","zaphonshoes.com","mothercare.com","traxms.com","allmusicboxes.info","prankroom.com","shoemecca.info","shop.sanrio.com","goneblue.com","mookiegifts.com","fredflare.com","stores.channeladvisor.com","bcheap.com","looksmartpro.com","folica.com","gifts.com","hitechproducts.info","cooking.com","designpublic.com","scrapartist.com","lillianvernon.com","yoox.com","hammacher.com","shop.guess.com","charmstree.com","borders.com","sourpussclothing.com","funkyplaygrounddesigns.com","jbbilliards.com","newoutlet.com","asilvershop.com","barneys.com","fossil.com","argos.co.uk","bestamulets.com","w-movies.com","completeoffice.info","costumeselection.com","perfumecraze.info","petfurnituredepot.info","ezinearticles.com","allkitchenappliances.info","allcollegejerseys.info","sterling-silver-store.com","specialtygourmet.info","thegreenhead.com","rockworldeast.com","nanaluluslinensandhandkerchiefs.com","hobby-estore.com","diningroomdecor.info","ansgear.com","saved-products.info","giftcollector.com","electronicsstop.info","bluerainbowdesign.com","deepdiscount.com","classygifts.info","poshtots.com","glitterglamgirl.com","weddingcraze.info","peanutgallerygifts.com","wilton.com","expanded-products.info","digishoptalk.com","zlio.com","zeta.zappos.com","icecreamdrops.mybisi.com","babyphat.com","alldecor.info","downloadmoviefiles.com","digitalscrapbookpages.com","sweetretreatkids.com","bergdorfgoodman.com","shop.avon.com","angiehearts.net","leather2go.com","gatewaystore.info","wallartmania.info","sflorg.com","cigarcraze.info","digiscrapwarehouse.com","traxnyc.com","piamovies.com","shirtstree.com","justmanga.com","hkfashionmall.com","anonymousvenice.com","pier1.com","premierlingerie.info","actionprintinginc.com","marthastewart.com","inandoutgifts.com","brides.com","shopkawaii.com","qualityinks.com","pyramidcollection.com","shopkami.com","labellaflorachildrensboutique.com","moreclocks.info","cdromplanet.info","bluedogaudio.com","pinkmascara.com","betterstores.info","camerastree.com","commercial-use.com","directvmovies.com","amazon.de","bodycandy.com","velocityartanddesign.com","allrecipes.com","goodluckstore.info","bargainsdelivered.com","alloy.com","anntaylorloft.com","gaiam.com","skimecca.info","thedigichick.com","pricecompstore.info","scrapbook101.com","oompa.com","emitations.com","myclocks.info","debenhams.com","imbuyingnow.info","bridalsource.info","booyahvillage.com","spiegel.com","sundancecatalog.com","giftmarketplace.info","ourbestprices.info","blenderclothing.com","justblankets.info","bgstores.co.uk","zaphon.com","babyearth.com","astitchclub.com","pacsun.com","discover.co.uk","samsclub.com","fye.com","buycostumes.com","dvdmoviesonly.com","etoys.com","solutions.com","childrensplace.com","megastoresale.info","bhg.com","onlypressurewashers.info","collectionsetc.com","vermontcountrystore.com","hkfashionshop.com","activeendeavors.com","accenttheparty.com","shopintuition.com"];
$("#searchBoxKFour").autocomplete({source:a,minLength:2})}function initCarousel(){$("#homeCarouselCont img.loading").hide();$("#homeCarousel").css({visibility:"visible"});if($.browser.safari){jQuery("#homeCarousel").jcarousel({scroll:1,initCallback:mycarousel_initCallback,setupCallback:showBtnSaf,auto:5,animation:800,wrap:"both",itemVisibleInCallback:highlightSaf,itemVisibleOutCallback:removehighlightSaf})}else{jQuery("#homeCarousel").jcarousel({scroll:1,initCallback:mycarousel_initCallback,auto:5,animation:800,wrap:"circular",itemVisibleInCallback:highlight,itemVisibleOutCallback:removehighlight})}}function mycarousel_initCallback(a){jQuery(".carouselControl a").bind("click",function(){a.scroll(jQuery.jcarousel.intval(jQuery(this).text()));return false});a.clip.hover(function(){a.stopAuto()},function(){a.startAuto()});if($.browser.safari){$(".jcarousel-prev,.jcarousel-next").hide()}}function highlight(c,d,b,a){actindex=parseInt(b%6);if(actindex==0){actindex=actindex+6}jQuery(".carouselControl a:nth-child("+actindex+")").addClass("active")}function removehighlight(c,d,b,a){actindex=parseInt(b%6);if(actindex==0){actindex=actindex+6}jQuery(".carouselControl a:nth-child("+actindex+")").removeClass("active")}function highlightSaf(c,d,b,a){jQuery(".carouselControl a:nth-child("+b+")").addClass("active")}function removehighlightSaf(c,d,b,a){jQuery(".carouselControl a:nth-child("+b+")").removeClass("active")}function showBtnSaf(){$(".jcarousel-prev,.jcarousel-next").show()}function initFblike(){if($){$(".kfblike-content").each(function(a){var b=$(this).html().replaceAll("kfb:like","fb:like");$(this).html(b)});$(".kfbshare-btn").each(function(a){var b=$(this).html().replaceAll("kfb:script","script");$(this).html(b)})}}function addToListPopup(o,h,b,t,p,d,c,l,g,a,m){var n=new Object();n.id=o;n.index=h;n.divId=p;n.inSection=d;var r=new Object();r.index=h;r.divId=p;r.inSection=d;r.isThroughUniversalHeartingPopUp=l;r.catalogItemId=o;r.pid=g;r.listItemId=a;r.queryString=b;var q=' ';if(c!=null&&typeof c!="undefined"){r.srcDivId=c;r.srcHtml=document.getElementById(c).innerHTML;document.getElementById(c).innerHTML=q}var f=document.getElementById(p);var e=' ';showAndReturnPopupAboveRight(f,-1,-1,e,false,400,300,"catalogItemPopupDiv","catalogItemPopupContent","true");if(l){formSubmitAJAX("/za/addToListPopup?itemId="+o+"©CatalogItem=true&UHPopUpUniqueId="+h+"&throughUniversalHeartingPopUp=true&userHearts="+t+"&divId="+p+"&inSection="+d+"&pid="+g+"&parentChannel="+s.channel+b,n,"addToListPopupCallback",r,null,null,null,"GET")}else{formSubmitAJAX("/za/addToListPopup?itemId="+o+"&listItemId="+a+"&sourcePage="+m+"©CatalogItem=true&index="+h+"&userHearts="+t+"&divId="+p+"&inSection="+d+"&parentChannel="+s.channel+b,n,"addToListPopupCallback",r,null,null,null,"GET")}}function addToListPopupCallback(c,b){var f=new Object();f.id=b.catalogItemId;f.index=b.index;f.divId=b.divId;f.inSection=b.inSection;var e=document.getElementById("itemDiv_"+b.index);if(!e){e=document.getElementById(b.divId)}if(b.srcDivId!=null&&typeof b.srcDivId!="undefined"){document.getElementById(b.srcDivId).innerHTML=b.srcHtml}var d=generateAJAXResponseHTML(c.getElementsByTagName("htmlResult")[0].childNodes);var a=showAndReturnPopupAboveRight(e,-1,-1,d,false,560,350,"catalogItemPopupDiv","catalogItemPopupContent","true");b.kPopup=a;if($('textarea[name="itemNote"]').length){$('textarea[name="itemNote"]').each(function(){var g=$("#overlayCharCounter");$(this).textlimit(g,1000)})}if(b.isThroughUniversalHeartingPopUp){formSubmitAJAX("/za/addToListPopup?itemId="+b.catalogItemId+"©CatalogItem=true&throughUniversalHeartingPopUp=true&pid="+b.pid+"&loadLists=true&parentChannel="+s.channel+b.queryString,f,"addToListPopupListDataCallback",b,null,null,null,"GET")}else{formSubmitAJAX("/za/addToListPopup?itemId="+b.catalogItemId+"&listItemId="+b.listItemId+"©CatalogItem=true&loadLists=true&parentChannel="+s.channel+b.queryString,f,"addToListPopupListDataCallback",b,null,null,null,"GET")}}function addToList(e,b,h,a,f,g){var d=document.getElementsByName("owningRadio");if(d!="undefined"&&d.length>0&&d[d.length-1].checked){if(document.getElementById("owningHidden")){document.getElementById("owningHidden").value=true}}else{if(document.getElementById("owningHidden")){document.getElementById("owningHidden").value=false}}var m=new Object();m.index=e;m.divId=h;var l=' ';if(a!=null&&typeof a!="undefined"){m.srcDivId=a;m.srcHtml=document.getElementById(a).innerHTML;document.getElementById(a).innerHTML=l}m.isThroughUniversalHeartingPopUp=f;var c=document.getElementById(h);htmlFormSubmitAJAX("/za/addToListPopup?ajaxCall=true&sourcePage="+g,b,"addToListCallback",m)}function addToListCallback(e,l){var g=e.getElementsByTagName("listOverFlow");var m=document.getElementById("itemDiv_"+l.index);if(!m){m=document.getElementById(l.divId)}if(l.srcDivId!=null&&typeof l.srcDivId!="undefined"){document.getElementById(l.srcDivId).innerHTML=l.srcHtml}if(g.length!=0){var b=generateAJAXResponseHTML(g[0].childNodes);if(b){hideElement("catalogItemPopupDiv");showListMaxItemsPopUp()}}else{if(e.firstChild){var n="",o="";var a=false;for(var d=0;d0){var a=document.getElementById("sectionSelectEleID");a.options.length=0;for(var d=0;d ');var c=new Object();c.action="loadMoreRecentProducts";c.lastItemDate=b;var a=new Object();formSubmitAJAX("/products",c,"getRecentItemsForHomePageCB",a)}function getRecentItemsForHomePageCB(d,a){_gaq.push(["_setAccount","UA-34492129-1"]);pageNum=pageNum+1;_gaq.push(["_trackPageview","/home/landingPage/"+pageNum]);var g=generateAJAXResponseHTML(d.getElementsByTagName("itemsNotFound")[0].childNodes);if(g=="true"){$("#more_products").remove();return}var e=generateAJAXResponseHTML(d.getElementsByTagName("column1")[0].childNodes);$("#prod_col1").append(e);e=generateAJAXResponseHTML(d.getElementsByTagName("column2")[0].childNodes);$("#prod_col2").append(e);e=generateAJAXResponseHTML(d.getElementsByTagName("column3")[0].childNodes);$("#prod_col3").append(e);e=generateAJAXResponseHTML(d.getElementsByTagName("column4")[0].childNodes);$("#prod_col4").append(e);e=generateAJAXResponseHTML(d.getElementsByTagName("column5")[0].childNodes);$("#prod_col5").append(e);var f=generateAJAXResponseHTML(d.getElementsByTagName("moreProducts")[0].childNodes);var c=generateAJAXResponseHTML(d.getElementsByTagName("lastItemDate")[0].childNodes);var b="'"+a.url+"'";if(f=="true"){$("#more_products").html("More Items ')}else{$("#more_products").remove()}}function displayUserOptions(f,e,g,b,a){if(e==""){}if(a==""){getExitUrl(a,e,f,b)}if(g==""){showUserOptions(f,false)}else{showUserOptions(f,true);var c=new Object();c.entityId=e;c.entityType=4;c.action="itemRatingStatus";var d=new Object();d.itemId=f;d.itemIndex=b;d.catalogItemId=e;formSubmitAJAX("/za/entityRating",c,"lg_RatingCallBack",d)}}function hideUserOptions(a){}function showUserOptions(b,a){if(a){showElement("overlaySpin_"+b);hideElement("overlayCon_"+b)}else{hideElement("overlaySpin_"+b);showElement("overlayCon_"+b)}}function changeFilter(d,c,b){var a=d+c+b;window.location.href=a}function fetchFreshLists(){var a=new Object();a.action="fetchFreshLists";formSubmitAJAX("/za/fresh-lists",a,"fetchFreshListsCallBack",null,"GET")}function fetchFreshListsCallBack(b,a){var c=generateAJAXResponseHTML(b.getElementsByTagName("listsResponse")[0].childNodes);$("#freshLists").append(c)}function addItem(l,f,a,n,m,c,d,b,g,e,h){if(!isUserLoggedIn){location.href=c}else{addToListPopup(l,f,a,n,m,d,b,g,e,"",h)}}var link_id;function scroll_handler(){var a=document.body.clientHeight;var b=$(window).height();var c=$(window).scrollTop();var threshold=50;threshold=a/4;if(threshold>=(a-c-b)){if($(link_id).children("a.link").length>0){hreftxt=$(link_id).children("a.link").attr("href");if(typeof hreftxt!="undefined"){eval(hreftxt.replace("javascript:",""))}}else{if($(link_id).children("img")!=null){}}}}function searchBoxFocus(){if(document.getElementById("searchBoxKFour").value==document.getElementById("searchPlaceHolderId").value){document.getElementById("searchBoxKFour").value=""}}function searchBoxBlur(){var a=document.getElementById("searchBoxKFour").value;if(a==null||a==""){}}function redirectURL(a){window.location.href=a}function isSnAvailable(){if($("#regSNErrorId").html()!=""){document.getElementById("snAvailable").innerHTML="";return}screenNameAvailable=false;var a=document.getElementById("screenName").value;var b=new Object();b.action="usernameExists";b.screenName=a;formSubmitAJAX("/za/signup",b,"isSnAvailableCallback")}function isSnAvailableCallback(b,a){var d=b.getElementsByTagName("snAvailable")[0];var c=generateAJAXResponseHTML(d.childNodes);if(trim(c)=="true"){document.getElementById("snAvailable").innerHTML=' available ';screenNameAvailable=true}else{document.getElementById("snAvailable").innerHTML=' unavailable ';screenNameAvailable=false}}function dismissNotificationBar(){var f="pp=";var a=document.cookie.split(";");for(var d=0;d0){$(".friendsList .user").removeClass("selected");var a=c.split(",");for(var b=0;b=10){showElement("max10errormessage");element.checked=false}else{selectedFollowersForMessage=selectedFollowersForMessage+1}}else{selectedFollowersForMessage=selectedFollowersForMessage-1;if(selectedFollowersForMessage<=10){hideElement("max10errormessage")}}}function doneChoosing1(){var a=$("#msgToID").val();$(".friendsList .user").each(function(b){if($(this).hasClass("selected")){var c=$(this).children("div.userName").text()+",";if(a.indexOf(c)=="-1"){a+=c;var d=''+c.replace(",","")+'x ";$(".emailsSelectWrap > span").append(d)}}else{var c=$(this).children("div.userName").text()+",";if(a.indexOf(c)!="-1"){a=a.replace(c,"");$("span.emailsSelectItem").each(function(f){var e=$(this).text();c=c.replace(",","");if(e.indexOf(c)!=-1){$(this).remove()}})}}});$("#msgToID").val(a)}function removeEntry(a,c){$(a).parent().remove();var b=$("#msgToID").val();b=b.replace(c,"");$("#msgToID").val(b);$("div.userName").each(function(e){var d=$(this).text();if(d.indexOf(c)!=-1){$(this).parent().toggleClass("selected")}})};/*
* Modernizr v2.5.3
* www.modernizr.com
*
* Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
* Available under the BSD and MIT licenses: www.modernizr.com/license/
*/
window.Modernizr=(function(B,c,h){var K="2.5.3",x={},z=true,N=c.documentElement,a="modernizr",J=c.createElement(a),F=J.style,M=c.createElement("input"),D=":)",b={}.toString,k=" -webkit- -moz- -o- -ms- ".split(" "),i="Webkit Moz O ms",G=i.split(" "),L=i.toLowerCase().split(" "),I={svg:"http://www.w3.org/2000/svg"},m={},q={},g={},e=[],l=e.slice,t,o=function(V,X,Q,W){var P,U,S,O=c.createElement("div"),T=c.body,R=T?T:c.createElement("body");if(parseInt(Q,10)){while(Q--){S=c.createElement("div");S.id=W?W[Q]:a+(Q+1);O.appendChild(S)}}P=["",""].join("");O.id=a;R.innerHTML+=P;R.appendChild(O);if(!T){R.style.background="";N.appendChild(R)}U=X(O,V);!T?R.parentNode.removeChild(R):O.parentNode.removeChild(O);return !!U},H=function(Q){var P=B.matchMedia||B.msMatchMedia;if(P){return P(Q).matches}var O;o("@media "+Q+" { #"+a+" { position: absolute; } }",function(R){O=(B.getComputedStyle?getComputedStyle(R,null):R.currentStyle)["position"]=="absolute"});return O},p=(function(){var P={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function O(Q,S){S=S||c.createElement(P[Q]||"div");Q="on"+Q;var R=Q in S;if(!R){if(!S.setAttribute){S=c.createElement("div")}if(S.setAttribute&&S.removeAttribute){S.setAttribute(Q,"");R=s(S[Q],"function");if(!s(S[Q],"undefined")){S[Q]=h}S.removeAttribute(Q)}}S=null;return R}return O})();var j=({}).hasOwnProperty,f;if(!s(j,"undefined")&&!s(j.call,"undefined")){f=function(O,P){return j.call(O,P)}}else{f=function(O,P){return((P in O)&&s(O.constructor.prototype[P],"undefined"))}}if(!Function.prototype.bind){Function.prototype.bind=function d(Q){var R=this;if(typeof R!="function"){throw new TypeError()}var O=l.call(arguments,1),P=function(){if(this instanceof P){var U=function(){};U.prototype=R.prototype;var T=new U;var S=R.apply(T,O.concat(l.call(arguments)));if(Object(S)===S){return S}return T}else{return R.apply(Q,O.concat(l.call(arguments)))}};return P}}function E(O){F.cssText=O}function v(P,O){return E(k.join(P+";")+(O||""))}function s(P,O){return typeof P===O}function u(P,O){return !!~(""+P).indexOf(O)}function A(Q,O){for(var P in Q){if(F[Q[P]]!==h){return O=="pfx"?Q[P]:true}}return false}function r(P,S,R){for(var O in P){var Q=S[P[O]];if(Q!==h){if(R===false){return P[O]}if(s(Q,"function")){return Q.bind(R||S)}return Q}}return false}function n(S,O,R){var P=S.charAt(0).toUpperCase()+S.substr(1),Q=(S+" "+G.join(P+" ")+P).split(" ");if(s(O,"string")||s(O,"undefined")){return A(Q,O)}else{Q=(S+" "+(L).join(P+" ")+P).split(" ");return r(Q,O,R)}}var y=(function(R,Q){var P=R.join(""),O=Q.length;o(P,function(V,X){var U=c.styleSheets[c.styleSheets.length-1],T=U?(U.cssRules&&U.cssRules[0]?U.cssRules[0].cssText:U.cssText||""):"",S=V.childNodes,W={};while(O--){W[S[O].id]=S[O]}x.touch=("ontouchstart" in B)||B.DocumentTouch&&c instanceof DocumentTouch||(W.touch&&W.touch.offsetTop)===9;x.csstransforms3d=(W.csstransforms3d&&W.csstransforms3d.offsetLeft)===9&&W.csstransforms3d.offsetHeight===3;x.generatedcontent=(W.generatedcontent&&W.generatedcontent.offsetHeight)>=1;x.fontface=/src/i.test(T)&&T.indexOf(X.split(" ")[0])===0},O,Q)})(['@font-face {font-family:"font";src:url("https://")}',["@media (",k.join("touch-enabled),("),a,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",k.join("transform-3d),("),a,")","{#csstransforms3d{left:9px;position:absolute;height:3px;}}"].join(""),['#generatedcontent:after{content:"',D,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);m.flexbox=function(){return n("flexOrder")};m["flexbox-legacy"]=function(){return n("boxDirection")};m.canvas=function(){var O=c.createElement("canvas");return !!(O.getContext&&O.getContext("2d"))};m.canvastext=function(){return !!(x.canvas&&s(c.createElement("canvas").getContext("2d").fillText,"function"))};m.webgl=function(){try{var P=c.createElement("canvas"),O;O=!!(B.WebGLRenderingContext&&(P.getContext("experimental-webgl")||P.getContext("webgl")));P=h}catch(Q){O=false}return O};m.touch=function(){return x.touch};m.geolocation=function(){return !!navigator.geolocation};m.postmessage=function(){return !!B.postMessage};m.websqldatabase=function(){return !!B.openDatabase};m.indexedDB=function(){return !!n("indexedDB",B)};m.hashchange=function(){return p("hashchange",B)&&(c.documentMode===h||c.documentMode>7)};m.history=function(){return !!(B.history&&history.pushState)};m.draganddrop=function(){var O=c.createElement("div");return("draggable" in O)||("ondragstart" in O&&"ondrop" in O)};m.websockets=function(){for(var P=-1,O=G.length;++P";return(O.firstChild&&O.firstChild.namespaceURI)==I.svg};m.smil=function(){return !!c.createElementNS&&/SVGAnimate/.test(b.call(c.createElementNS(I.svg,"animate")))};m.svgclippaths=function(){return !!c.createElementNS&&/SVGClipPath/.test(b.call(c.createElementNS(I.svg,"clipPath")))};function C(){x.input=(function(Q){for(var P=0,O=Q.length;P";P=("hidden" in Z);R=Z.childNodes.length==1||(function(){try{(W.createElement)("a")}catch(aa){return true}var ab=W.createDocumentFragment();return(typeof ab.cloneNode=="undefined"||typeof ab.createDocumentFragment=="undefined"||typeof ab.createElement=="undefined")}())}());function X(Z,ab){var ac=Z.createElement("p"),aa=Z.getElementsByTagName("head")[0]||Z.documentElement;ac.innerHTML="x";return aa.insertBefore(ac.lastChild,aa.firstChild)}function T(){var Z=S.elements;return typeof Z=="string"?Z.split(" "):Z}function V(aa){var Z={},ad=aa.createElement,ab=aa.createDocumentFragment,ac=ab();aa.createElement=function(af){var ae=(Z[af]||(Z[af]=ad(af))).cloneNode();return S.shivMethods&&ae.canHaveChildren&&!Q.test(af)?ac.appendChild(ae):ae};aa.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+T().join().replace(/\w+/g,function(ae){Z[ae]=ad(ae);ac.createElement(ae);return'c("'+ae+'")'})+");return n}")(S,ac)}function O(aa){var Z;if(aa.documentShived){return aa}if(S.shivCSS&&!P){Z=!!X(aa,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")}if(!R){Z=!V(aa)}if(Z){aa.documentShived=Z}return aa}var S={elements:Y.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!(Y.shivCSS===false),shivMethods:!(Y.shivMethods===false),type:"default",shivDocument:O};U.html5=S;O(W)}(this,c));x._version=K;x._prefixes=k;x._domPrefixes=L;x._cssomPrefixes=G;x.mq=H;x.hasEvent=p;x.testProp=function(O){return A([O])};x.testAllProps=n;x.testStyles=o;x.prefixed=function(Q,P,O){if(!P){return n(Q,"pfx")}else{return n(Q,P,O)}};N.className=N.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(z?" js "+e.join(" "):"");return x})(this,this.document);function fold(a){$(a.target).parents(".item").toggleClass("unfolded")}var flag=0;function menuLikePopup(a){flag=2;$(".overlay_box.overlay_popup").hide();$(this).next(".overlay_box.overlay_popup").show();$(this).next(".overlay_box.overlay_popup").find(".menu a").each(function(b,c){$(this).click(function(){$(a.target).next(".overlay_box.overlay_popup").hide()})})}function overlay(a){$(a.target).next(".item_overlay").toggleClass("hidden")}function initDocReady(){$("select.styled").each(function(){var a=$(this).attr("title");if($("option:selected",this).val()!=""){a=$("option:selected",this).text()}$(this).css({"z-index":10,opacity:0,"-khtml-appearance":"none","-webkit-appearance":"none"}).after(''+a+"
").change(function(){val=$("option:selected",this).text();$(this).next().text(val)})});$(".hover_popup").mouseenter(function(a){$(".overlay_box.overlay_popup").hide();$(this).children(".overlay_box.overlay_popup").show()});$(".hover_popup").mouseleave(function(a){$(this).children(".overlay_box.overlay_popup").hide()});$(window).scroll(function(){$("body").toggleClass("fixed",$(this).scrollTop()>document.getElementById("ScrollableHeaderPart").scrollHeight)});$("#SideNavBlock .caption").click(function(a){$(a.target).parents(".item").toggleClass("unfolded");return false});$(".selectbox .text").click(function(a){flag=1;if(!$(this).next(".options").is(":visible")){$(".selectbox").children(".options").hide();$(this).next(".options").show();$(this).next(".options").children(".item").each(function(b,c){$(this).click(function(){$(a.target).text($(c).text());$(a.target).next(".options").hide()})})}else{$(this).next(".options").hide()}});$(".action_popup").click(menuLikePopup);$(".adv_search_box .overlay_popup li a").click(function(a){var b=$(this).parents(".adv_search_box").children(".searchbox_input");if(b.parents().is(".search_no_results")){b.attr("placeholder","Please type a new word or phrase to search for "+$(this).text())}else{b.attr("placeholder","Search for "+$(this).text())}return true});$(".popup_box").click(function(a){flag=3;$(".overlay_box").hide();var b=$(this).next(".overlay_box").show();b.find(".buttons").children().each(function(c,d){$(this).click(function(){$(a.target).next(".overlay_box").hide()})})});$(".folding_box .fold_control").click(function(c){if($(this).parents(".folding_box").hasClass("unique")){if(!$(this).parents(".folding_box").children(".folded_items").hasClass("expanded")){var b=$(this).parents(".folding_box").parent();$(b).children(".folding_box.unique").each(function(a){$(this).children(".folded_items").removeClass("expanded");$(this).children(".caption").children(".fold_control").each(function(d){this.innerText="Expand"})});$(this).parents(".folding_box").children(".folded_items").toggleClass("expanded");if($(this).parents(".folding_box").children(".folded_items").hasClass("expanded")){this.innerText="Collapse"}else{this.innerText="Expand"}}}else{$(this).parents(".folding_box").children(".folded_items").toggleClass("expanded");if($(this).parents(".folding_box").children(".folded_items").hasClass("expanded")){this.innerText="Collapse"}else{this.innerText="Expand"}}});$(".folding_box .control.clear_checks").click(function(a){$(this).parents(".folding_box").children(".folded_items").find('input[type="checkbox"]').each(function(b,c){c.checked=false;$(this).siblings("label").removeClass("checked")})});$('input[type="checkbox"]').change(function(a){$(this).siblings("label").toggleClass("checked")});$(window).click(function(a){if(flag!=1){$(".selectbox").children(".options").hide()}if(flag!=2){$(".action_popup").next(".overlay_box.overlay_popup").hide();$(".search_popup").children(".overlay_box.overlay_popup").hide()}if(flag!=4){$(".overlay_box.poll_zoom").hide()}flag=0});$("#inputField").bind("input",function(){var a=$(this).attr("maxLength")-$(this).val().length;$(this).parent().siblings("#charCounter").text(a+" characters remaining")});$(".input_field").bind("input",function(){var a=$(this).attr("maxLength")-$(this).val().length;$(this).parent().siblings(".char_counter").text(a+" characters remaining")});$(".input_field").keypress(function(a){var b=$(this).attr("maxLength")-$(this).val().length;$(this).parent().siblings(".char_counter").text(b+" characters remaining")});$(".zoom_popup_action").click(function(b){flag=4;$(".overlay_box").hide();var a=$(this).nextAll(".overlay_box.poll_zoom");if(a.length==0){a=$(this).parent().nextAll(".overlay_box.poll_zoom")}a.css("left",-(a.width()-a.parent().width())/2+"px");a.css("top",-(a.height()-a.parent().height())/2+"px");a.show()});$(".question").click(function(a){$(this).parent().toggleClass("expanded")})};