function changeFocus(id){var obj=document.getElementById("focus");var obj2=document.getElementById("focus_link");switch(id)
{case 1:obj.style.backgroundImage='url(images/focus_indian.jpg)';obj2.href='category~Indian-Jewelry~2690';break;case 2:obj.style.backgroundImage='url(images/focus_montblanc.jpg)';obj2.href='category~Montblanc-Pens~466';break;case 3:obj.style.backgroundImage='url(images/focus_rado.jpg)';obj2.href='category~Rado-Watches~1485';break;case 4:obj.style.backgroundImage='url(images/focus_ganesh.jpg)';obj2.href='category~Ganesh-Pendant-by-Chopard~2650';break;default:obj.style.backgroundImage='url(images/focus_indian.jpg)';obj2.href='category~Indian-Jewelry~2690';}}
$(function()
{$('.scroll-pane').jScrollPane();});function changeImage(el,id,toNew){if(toNew){el.src="images/icon"+id+".jpg";}else{el.src="images/icon"+id+"_bw.jpg";}}
function toggleMenu(objectID1,objectID2,objectID3,objectID4,objectID5,objectID6)
{var object1=document.getElementById(objectID1);var object2=document.getElementById(objectID2);var object3=document.getElementById(objectID3);var object4=document.getElementById(objectID4);var object5=document.getElementById(objectID5);var object6=document.getElementById(objectID6);if(object1.style.display==''||object2.style.display==''||object3.style.display==''||object4.style.display=='')
{object1.style.display='none';object2.style.display='none';object3.style.display='none';object4.style.display='none';object5.style.display='none';object6.style.display='none';}
if(object1.style.display=='none')
{object1.style.display='block';object2.style.display='none';object3.style.display='none';object4.style.display='none';object5.style.display='none';object6.style.display='none';}
return;}
function display(el,id)
{if(id)
el.className="item_on";else
el.className="item_off";}
function changeDiv(idx_div,total_divs)
{for(i=1;i<=total_divs;i++)
{obj=document.getElementById("catalog_"+i);obj.style.display="none";}
obj=document.getElementById("catalog_"+idx_div);obj.style.display="block";obj=document.getElementById("page_number_link");obj.innerHTML="Page "+idx_div+" of "+total_divs;obj=document.getElementById("page_number_link_top");obj.innerHTML="Page "+idx_div+" of "+total_divs;}
function changeDivImage(src,divID)
{var obj=document.getElementById(divID);obj.innerHTML=src;}
function display_education(filename)
{window.open(filename,"Image","height=625, width=450 top=50 left=50 scrollbars","scrollbars");}
function recommend()
{show_pop_up('z2gray','recommend_popup');}
function print_page()
{assign_specs();printIt('print_form');}
function assign_specs()
{var specs=document.getElementById('product_specs');var spec2=specs.innerHTML;var print_elem=document.getElementById('print_specs');print_elem.innerHTML=spec2;}
function hide_pop_up(elem_name,show_form)
{var elem_p=document.getElementById(elem_name);var elem_p2=document.getElementById(show_form);elem_p.style.display='none';elem_p2.style.display='none';}
function show_pop_up(elem_name,show_form)
{var elem_p=document.getElementById(elem_name);var elem_p2=document.getElementById(show_form);elem_p.style.width=window.screen.width;elem_p.style.height=document.body.scrollHeight;elem_p.style.display='block';elem_p2.style.display='block';if(document.getElementById("send_button").style.visibility=="hidden")
document.getElementById("send_button").style.visibility="visible";document.getElementById("msg_recommend").innerHTML="";document.getElementById("recipients_email").value='Recipient\'s e-mail*';document.getElementById("recipients_name").value='Recipient\'s name*';}
function printIt(div_name)
{var winOpt="height=800, width=800, top=10, left=180, scrollbars=yes, status=yes, menubar=yes, titlebar=no, resize=yes";myWindow=window.open('','',winOpt);myWindow.document.write(document.getElementById(div_name).innerHTML);myWindow.focus();myWindow.print();}
function printItem()
{print();window.close();}
function hide_elem(elem_name)
{var elem_p=document.getElementById(elem_name);var elem_p2=document.getElementById('email_popup');elem_p.style.display='none';elem_p2.style.display='none';}
function show_elem(elem_name)
{var elem_p=document.getElementById(elem_name);var elem_p2=document.getElementById('email_popup');elem_p.style.width=window.screen.width;elem_p.style.height=document.body.scrollHeight;elem_p.style.display='block';elem_p2.style.display='block';}
function refreshValue(el,val)
{if(el.value==val){el.value="";}}
function validate_recommend(recipients_email,recipients_name,from_email,from_name)
{v_recipients_name="Recipient's name*";v_from_name='Your name*';var msg="";error=0;if(recipients_email==''||recipients_name==''||from_email==''||from_name=='')
error=1;if(error==1)
{msg='<h2><font color="#FF0000">&nbsp;ERROR: All fields are required</font></h2>';}
var atpos=recipients_email.indexOf("@");var dotpos=recipients_email.lastIndexOf(".");if(atpos<1||dotpos<atpos+2||dotpos+2>=recipients_email.length)
{msg=msg+'<h2><font color="red">&nbsp;ERROR: Recipient\'s Email format seems to be wrong! (Format: you@domain.com)</font></h2>';error=1;}
if((recipients_name.replace(/^\s+|\s+$/g,"")=='')||(recipients_name==v_recipients_name))
{msg=msg+'<h2><font color="red">&nbsp;ERROR: Please enter the Recipient\'s Name </font></h2>';error=1;}
var atpos=from_email.indexOf("@");var dotpos=from_email.lastIndexOf(".");if(atpos<1||dotpos<atpos+2||dotpos+2>=from_email.length)
{msg=msg+'<h2><font color="red">&nbsp;ERROR: Your Email format seems to be wrong! (Format: you@domain.com)</font></h2>';error=1;}
if((from_name.replace(/^\s+|\s+$/g,"")=='')||(from_name==v_from_name))
{msg=msg+'<h2><font color="red">&nbsp;ERROR: Please enter the Your Name </font></h2>';error=1;}
if(error==1)
{document.getElementById("msg_recommend").innerHTML=msg;return false;}
return true;}
function sendRecommend()
{document.getElementById("msg_recommend").innerHTML="";recipients_email=document.getElementById("recipients_email").value;recipients_name=document.getElementById("recipients_name").value;from_email=document.getElementById("from_email").value;from_name=document.getElementById("from_name").value;from_message=document.getElementById("your_message").value;item_code=document.getElementById("item_code").value;catID=document.getElementById("catID").value;cmd=document.getElementById("cmd").value;if(validate_recommend(recipients_email,recipients_name,from_email,from_name))
{if(window.XMLHttpRequest)
{xmlhttp=new XMLHttpRequest();}
else
{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
xmlhttp.onreadystatechange=function()
{if(xmlhttp.readyState==4&&xmlhttp.status==200)
{document.getElementById("msg_recommend").innerHTML="<h2>"+xmlhttp.responseText+'</h2>';if((document.getElementById("msg_recommend").innerHTML).search("Error")>0)
{document.getElementById("send_button").style.visibility="visible";}
else
{document.getElementById("msg_recommend").innerHTML="<h2>Message Sent!</h2>"
document.getElementById("send_button").style.visibility="hidden";}}}
var params="item_code="+item_code+"&catID="+catID+"&recipients_email="+recipients_email;params+="&from_name="+from_name+"&from_message="+from_message;params+='&cmd='+cmd+"&recipients_name="+recipients_name+"&from_email="+from_email;params+='&'+(new Date()).getTime();xmlhttp.open("POST","email_this_page.php",true);document.getElementById("send_button").style.visibility="hidden";document.getElementById("msg_recommend").innerHTML="<h2>Please wait. We are sending your message...</h2>"
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlhttp.send(params);}}
;var ContentHeight=320;var TimeToSlide=250.0;var openAccordion='';function runAccordion(index)
{var nID="Accordion"+index+"Content";if(openAccordion==nID)
nID='';setTimeout("animate("+new Date().getTime()+","+TimeToSlide+",'"+openAccordion+"','"+nID+"')",33);openAccordion=nID;}
function animate(lastTick,timeLeft,closingId,openingId)
{var curTick=new Date().getTime();var elapsedTicks=curTick-lastTick;var opening=(openingId=='')?null:document.getElementById(openingId);var closing=(closingId=='')?null:document.getElementById(closingId);if(timeLeft<=elapsedTicks)
{if(opening!=null)
opening.style.height=ContentHeight+'px';if(closing!=null)
{closing.style.display='none';closing.style.height='0px';}
return;}
timeLeft-=elapsedTicks;var newClosedHeight=Math.round((timeLeft/TimeToSlide)*ContentHeight);if(opening!=null)
{if(opening.style.display!='block')
opening.style.display='block';opening.style.height=(ContentHeight-newClosedHeight)+'px';}
if(closing!=null)
closing.style.height=newClosedHeight+'px';setTimeout("animate("+curTick+","+timeLeft+",'"+closingId+"','"+openingId+"')",33);}
;(function(A){A.fn.slides=function(B){B=A.extend({},A.fn.slides.option,B);return this.each(function(){A("."+B.container,A(this)).children().wrapAll('<div class="slides_control"/>');var V=A(this),J=A(".slides_control",V),Z=J.children().size(),Q=J.children().outerWidth(),M=J.children().outerHeight(),D=B.start-1,L=B.effect.indexOf(",")<0?B.effect:B.effect.replace(" ","").split(",")[0],S=B.effect.indexOf(",")<0?L:B.effect.replace(" ","").split(",")[1],O=0,N=0,C=0,P=0,U,H,I,X,W,T,K,F;function E(c,b,a){if(!H&&U){H=true;B.animationStart(P+1);switch(c){case"next":N=P;O=P+1;O=Z===O?0:O;X=Q*2;c=-Q*2;P=O;break;case"prev":N=P;O=P-1;O=O===-1?Z-1:O;X=0;c=0;P=O;break;case"pagination":O=parseInt(a,10);N=A("."+B.paginationClass+" li."+B.currentClass+" a",V).attr("href").match("[^#/]+$");if(O>N){X=Q*2;c=-Q*2;}else{X=0;c=0;}P=O;break;}if(b==="fade"){if(B.crossfade){J.children(":eq("+O+")",V).css({zIndex:10}).fadeIn(B.fadeSpeed,B.fadeEasing,function(){if(B.autoHeight){J.animate({height:J.children(":eq("+O+")",V).outerHeight()},B.autoHeightSpeed,function(){J.children(":eq("+N+")",V).css({display:"none",zIndex:0});J.children(":eq("+O+")",V).css({zIndex:0});B.animationComplete(O+1);H=false;});}else{J.children(":eq("+N+")",V).css({display:"none",zIndex:0});J.children(":eq("+O+")",V).css({zIndex:0});B.animationComplete(O+1);H=false;}});}else{J.children(":eq("+N+")",V).fadeOut(B.fadeSpeed,B.fadeEasing,function(){if(B.autoHeight){J.animate({height:J.children(":eq("+O+")",V).outerHeight()},B.autoHeightSpeed,function(){J.children(":eq("+O+")",V).fadeIn(B.fadeSpeed,B.fadeEasing);});}else{J.children(":eq("+O+")",V).fadeIn(B.fadeSpeed,B.fadeEasing,function(){if(A.browser.msie){A(this).get(0).style.removeAttribute("filter");}});}B.animationComplete(O+1);H=false;});}}else{J.children(":eq("+O+")").css({left:X,display:"block"});if(B.autoHeight){J.animate({left:c,height:J.children(":eq("+O+")").outerHeight()},B.slideSpeed,B.slideEasing,function(){J.css({left:-Q});J.children(":eq("+O+")").css({left:Q,zIndex:5});J.children(":eq("+N+")").css({left:Q,display:"none",zIndex:0});B.animationComplete(O+1);H=false;});}else{J.animate({left:c},B.slideSpeed,B.slideEasing,function(){J.css({left:-Q});J.children(":eq("+O+")").css({left:Q,zIndex:5});J.children(":eq("+N+")").css({left:Q,display:"none",zIndex:0});B.animationComplete(O+1);H=false;});}}if(B.pagination){A("."+B.paginationClass+" li."+B.currentClass,V).removeClass(B.currentClass);A("."+B.paginationClass+" li:eq("+O+")",V).addClass(B.currentClass);}}}function R(){clearInterval(V.data("interval"));}function G(){if(B.pause){clearTimeout(V.data("pause"));clearInterval(V.data("interval"));K=setTimeout(function(){clearTimeout(V.data("pause"));F=setInterval(function(){E("next",L);},B.play);V.data("interval",F);},B.pause);V.data("pause",K);}else{R();}}if(Z<2){return;}if(D<0){D=0;}if(D>Z){D=Z-1;}if(B.start){P=D;}if(B.randomize){J.randomize();}A("."+B.container,V).css({overflow:"hidden",position:"relative"});J.children().css({position:"absolute",top:0,left:J.children().outerWidth(),zIndex:0,display:"none"});J.css({position:"relative",width:(Q*3),height:M,left:-Q});A("."+B.container,V).css({display:"block"});if(B.autoHeight){J.children().css({height:"auto"});J.animate({height:J.children(":eq("+D+")").outerHeight()},B.autoHeightSpeed);}if(B.preload&&J.find("img:eq("+D+")").length){A("."+B.container,V).css({background:"url("+B.preloadImage+") no-repeat 50% 50%"});var Y=J.find("img:eq("+D+")").attr("src")+"?"+(new Date()).getTime();if(A("img",V).parent().attr("class")!="slides_control"){T=J.children(":eq(0)")[0].tagName.toLowerCase();}else{T=J.find("img:eq("+D+")");}J.find("img:eq("+D+")").attr("src",Y).load(function(){J.find(T+":eq("+D+")").fadeIn(B.fadeSpeed,B.fadeEasing,function(){A(this).css({zIndex:5});A("."+B.container,V).css({background:""});U=true;B.slidesLoaded();});});}else{J.children(":eq("+D+")").fadeIn(B.fadeSpeed,B.fadeEasing,function(){U=true;B.slidesLoaded();});}if(B.bigTarget){J.children().css({cursor:"pointer"});J.children().click(function(){E("next",L);return false;});}if(B.hoverPause&&B.play){J.bind("mouseover",function(){R();});J.bind("mouseleave",function(){G();});}if(B.generateNextPrev){A("."+B.container,V).after('<a href="#" class="'+B.prev+'">Prev</a>');A("."+B.prev,V).after('<a href="#" class="'+B.next+'">Next</a>');}A("."+B.next,V).click(function(a){a.preventDefault();if(B.play){G();}E("next",L);});A("."+B.prev,V).click(function(a){a.preventDefault();if(B.play){G();}E("prev",L);});if(B.generatePagination){if(B.prependPagination){V.prepend("<ul class="+B.paginationClass+"></ul>");}else{V.append("<ul class="+B.paginationClass+"></ul>");}J.children().each(function(){A("."+B.paginationClass,V).append('<li><a href="#'+C+'">'+(C+1)+"</a></li>");C++;});}else{A("."+B.paginationClass+" li a",V).each(function(){A(this).attr("href","#"+C);C++;});}A("."+B.paginationClass+" li:eq("+D+")",V).addClass(B.currentClass);A("."+B.paginationClass+" li a",V).click(function(){if(B.play){G();}I=A(this).attr("href").match("[^#/]+$");if(P!=I){E("pagination",S,I);}return false;});A("a.link",V).click(function(){if(B.play){G();}I=A(this).attr("href").match("[^#/]+$")-1;if(P!=I){E("pagination",S,I);}return false;});if(B.play){F=setInterval(function(){E("next",L);},B.play);V.data("interval",F);}});};A.fn.slides.option={preload:false,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:false,next:"next",prev:"prev",pagination:true,generatePagination:true,prependPagination:false,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:false,randomize:false,play:0,pause:0,hoverPause:false,autoHeight:false,autoHeightSpeed:350,bigTarget:false,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}};A.fn.randomize=function(C){function B(){return(Math.round(Math.random())-0.5);}return(A(this).each(function(){var F=A(this);var E=F.children();var D=E.length;if(D>1){E.hide();var G=[];for(i=0;i<D;i++){G[G.length]=i;}G=G.sort(B);A.each(G,function(I,H){var K=E.eq(H);var J=K.clone(true);J.show().appendTo(F);if(C!==undefined){C(K,J);}K.remove();});}}));};})(jQuery);
