var edwardian={src:'/skin/frontend/default/twelvepearls/sifr_edwardian_font.swf',ratios:[6,1.41,9,1.35,15,1.29,21,1.25,22,1.22,27,1.24,29,1.21,34,1.22,41,1.21,45,1.2,46,1.21,59,1.2,68,1.19,69,1.2,96,1.19,97,1.18,102,1.19,103,1.18,112,1.19,114,1.18,116,1.19,120,1.18,121,1.19,1.18]};sIFR.delayCSS=true;sIFR.activate(edwardian);sIFR.replace(edwardian,{selector:'body h1',css:{'.sIFR-root':{'background-color':'#f1f1f2','color':'#86898d','font-size':'33px'}}});document.observe("dom:loaded",function(){TwelvePearls.manageTitleTips();TwelvePearls.scrollToConfigure();});Event.observe(window,'load',function(){TwelvePearls.ieImgLabels();});var TwelvePearls={manageTitleTips:function(){$$('span.info').each(function(e){if(e.hasClassName('grade-aa')){e.writeAttribute({title:'The surface will have a very high luster, and at least 75% of the surface will be free from any type of defect. The luster will be high, and have a total nacre thickness (Akoya pearls only) of at least .5mm.'});}else if(e.hasClassName('grade-aaa')){e.writeAttribute({title:'The highest-quality pearl, virtually flawless. The surface will have a very high luster, and at least 95% of the surface will be free from any type of defect. The pearl will be round, and have a mirror-like luster, and a total nacre thickness (Akoya pearls only) of at least .75mm.'});}else if(e.hasClassName('gia')){e.writeAttribute({title:'Gemological Institute Of America'});}});},scrollToConfigure:function(){$$('.configure-product').each(function(e){e.observe('click',function(event){Effect.ScrollTo('customise-heading',{duration:'0.4',offset:-10,queue:{position:'front',scope:'configureScope'}});new Effect.Highlight('product-options-wrapper',{queue:{position:'end',scope:'configureScope'}});Event.stop(event);});});},ieImgLabels:function(){if(Prototype.Browser.IE){$$('label img').each(function(eimg){eimg.observe('click',function(evt){inpt=eimg.up('li').down('input');inpt.checked=true;}.bind(this));}.bind(this));}}}
function popUp(url,name){console.log(window.screenLeft)
var l=(window.screenLeft!=undefined)?window.screenLeft:window.screenX;var t=(window.screenTop!=undefined)?window.screenTop:window.screenY;var w=document.viewport.getWidth(),h=document.viewport.getHeight();var popW=500,popH=400;var leftPos=l+(w-popW)/2,topPos=t+(h-popH)/2;window.open(url,name,'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=1,width='+popW+',height='+popH+',left = '+leftPos+',top = '+topPos);}
function toggleMenu(one,two){};(function(){var eventMatchers={'HTMLEvents':/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,'MouseEvents':/^(?:click|mouse(?:down|up|over|move|out))$/}
var defaultOptions={pointerX:0,pointerY:0,button:0,ctrlKey:false,altKey:false,shiftKey:false,metaKey:false,bubbles:true,cancelable:true}
Event.simulate=function(element,eventName){var options=Object.extend(defaultOptions,arguments[2]||{});var oEvent,eventType=null;element=$(element);for(var name in eventMatchers){if(eventMatchers[name].test(eventName)){eventType=name;break;}}
if(!eventType)
throw new SyntaxError('Only HTMLEvents and MouseEvents interfaces are supported');if(document.createEvent){oEvent=document.createEvent(eventType);if(eventType=='HTMLEvents'){oEvent.initEvent(eventName,options.bubbles,options.cancelable);}
else{oEvent.initMouseEvent(eventName,options.bubbles,options.cancelable,document.defaultView,options.button,options.pointerX,options.pointerY,options.pointerX,options.pointerY,options.ctrlKey,options.altKey,options.shiftKey,options.metaKey,options.button,element);}
element.dispatchEvent(oEvent);}
else{options.clientX=options.pointerX;options.clientY=options.pointerY;oEvent=Object.extend(document.createEventObject(),options);element.fireEvent('on'+eventName,oEvent);}
return element;}
Element.addMethods({simulate:Event.simulate});})()
