$.fn.clearForm=function(){return this.each(function(){var a=this.type,b=this.tagName.toLowerCase();if(b=="form")return $(":input",this).clearForm();if(a=="text"||a=="password"||b=="textarea")this.value="";else if(a=="checkbox"||a=="radio")this.checked=false;else if(b=="select")this.selectedIndex=-1})};
$(function(){toggleTabs($(".bestSellers_boxLinks > ul").find("a"));$(".enlarge_link a").click(function(){var a=$(".gallery > li:first");productTris_toggle(a[0],0)});$(".breadCrumbs > a").mouseover(function(){$(this).css("text-decoration","underline")}).mouseout(function(){$(this).css("text-decoration","none")});$(".send_again").click(function(){$("#send_idomoo_form").clearForm();$("#form_body").show();$("#send_again").hide()})});
(function(a){var b=[];a.preLoadImages=function(){for(var c=arguments.length;c--;){var d=document.createElement("img");d.src=arguments[c];b.push(d)}}})(jQuery);String.prototype.capitalize=function(){return this.replace(/\w+/g,function(a){return a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()})};String.prototype.clean=function(){return this.replace("-","").replace("<br/>","")};String.prototype.normalize=function(){return this.toLowerCase().replace(" ","_")};
String.prototype.shorten=function(){return this.replace("Excellent","Exc").replace("Very Good","VG").replace("-","").replace("<br/>","")};function toggleTabs(a){$(a).each(function(){if(this.className.indexOf(" selectedTab")!=-1){x=this.className.split(" selectedTab");$(this).css("background","url(/images/"+x[0]+"-hover-new.gif)")}else $(this).css("background","url(/images/"+this.className+"-new.gif)")})}
function toggleBestSeller(a,b,c){temp=a.parentNode;temp=temp.parentNode;bestSeller_tabs=temp.getElementsByTagName("A");for(i=0;i<bestSeller_tabs.length;i++)if(bestSeller_tabs[i].className.indexOf(" selectedTab_2Lines")!=-1)bestSeller_tabs[i].className=bestSeller_tabs[i].className.split(" selectedTab_2Lines")[0];else if(bestSeller_tabs[i].className.indexOf(" selectedTab")!=-1)bestSeller_tabs[i].className=bestSeller_tabs[i].className.split(" selectedTab")[0];a.className+=" selectedTab";toggleTabs(bestSeller_tabs);
temp=temp.parentNode;temp=temp.parentNode;bestSeller_div=temp.getElementsByTagName("div");bestSeller_content=[];for(i=0;i<bestSeller_div.length;i++)if(bestSeller_div[i].className=="bestSellers_contentDiv")bestSeller_content[bestSeller_content.length]=bestSeller_div[i];for(i=0;i<bestSeller_content.length;i++)bestSeller_content[i].style.display="none";bestSeller_content[c].style.display="block"}
function toggleBestSeller_arr(a,b){temp=a.parentNode;temp=temp.parentNode;bestSeller_arrs=temp.getElementsByTagName("A");for(i=0;i<bestSeller_arrs.length;i++)if(bestSeller_arrs[i].className!="")bestSeller_arrs[i].className="";a.className="selectedArr";temp=temp.parentNode;temp=temp.parentNode;bestSeller_div=temp.getElementsByTagName("div");bestSeller_contentDiv=[];for(i=0;i<bestSeller_div.length;i++)if(bestSeller_div[i].className=="bestSellers_contentDetailsDiv")bestSeller_contentDiv[bestSeller_contentDiv.length]=
bestSeller_div[i];if(bestSeller_contentDiv.length>0){for(i=0;i<bestSeller_contentDiv.length;i++)bestSeller_contentDiv[i].style.display="none";if(bestSeller_contentDiv[b])bestSeller_contentDiv[b].style.display="block"}}function searchProduct(a){if(a=="")alert("please enter a search keyword!");else window.location.href="/jewelry-store/search-results/"+a}
function submitenter(a,b){var c,d=$(b).attr("id");if(window.event)c=window.event.keyCode;else if(a)c=a.which;else return true;if(c==13){if(document.getElementById(d).value!="")window.location.href="/jewelry-store/search-results/"+document.getElementById(d).value;else alert("please enter a search keyword!");return false}else return true}
function submitNewsletter(a,b,c,d){$(a).hide("slow");$(b).show("slow");$.ajax({data:$(a).serialize(),dataType:"json",global:false,success:function(e){$(b).hide("slow");if(e=="success")$(c).show();else{$(d).show("slow").fadeTo(1300,1).hide("slow");$(a).fadeTo(1300,1).show("slow")}},type:"POST",url:"/structMyAccount/newsletterSignup"})}
function sendIdomooToFriend(a){$.ajax({data:$(a).serialize(),dataType:"json",global:false,success:function(b){if(b=="success"){$("#form_body").hide();$("#send_again").show()}},type:"POST",url:"/structMyAccount/sendIdomooToFriend"})}
function initFlashWheel(){AC_FL_RunContent==0?alert("This page requires AC_RunActiveContent.js."):AC_FL_PrependContentInto(".liteUpdate_center","codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0","width","115","height","91","src","/images/loading_01","quality","high","pluginspage","http://www.macromedia.com/go/getflashplayer","align","middle","play","true","loop","true","scale","showall","wmode","window","devicefont","false","id","loading","bgcolor","#ffffff",
"name","loading","menu","false","allowFullScreen","false","allowScriptAccess","sameDomain","movie","/images/loading_01","salign","")}function mailpage(){mail_str="mailto:?subject=Check Out This Product From Zoara";mail_str+="&body=I thought you might be interested in this product from Zoara. \n";mail_str+=" You can view it at: "+location.href+"\n";mail_str+=" For more information about Zoara, please visit www.zoara.com";location.href=mail_str}
function wopen(a,b,c,d){a=window.open(a,b,"width="+c+",height="+d+", location=no, menubar=no, status=no, toolbar=no, scrollbars=yes, resizable=no");a.resizeTo(c,d);a.focus()};