var ProductInfo=Class.create();
ProductInfo.prototype={settings:{loadingMessage:"Please wait ..."},initialize:function(a,b,e){Object.extend(this.settings,e);this.createWindow();var c=this;$$(a).each(function(d,f){d.observe("click",c.loadInfo.bind(c))});$$(b).each(function(d,f){d.observe("mouseover",c.showButton);d.observe("mouseout",c.hideButton)})},createLoader:function(){var a=new Element("div",{id:"ajax-preloader"});a.innerHTML="<p class='loading'><img src="+this.settings.loader+" /><br/>"+this.settings.loadingMessage+"</p>";
document.body.appendChild(a);$("ajax-preloader").setStyle({position:"absolute",top:document.viewport.getScrollOffsets().top+200+"px",left:document.body.clientWidth/2-75+"px"})},destroyLoader:function(){$("ajax-preloader").remove()},showButton:function(a){for(el=this;el.tagName!="P";)el=el.up();$(el).getElementsBySelector(".ajax")[0].setStyle({display:"block"})},hideButton:function(a){for(el=this;el.tagName!="P";)el=el.up();$(el).getElementsBySelector(".ajax")[0].setStyle({display:"none"})},createWindow:function(){var a=
new Element("div",{id:"quick-window"});a.innerHTML='<div id="quickview-header"><a href="javascript:void(0)" id="quickview-close"></a></div><div class="quick-view-content"></div>';document.body.appendChild(a);$("quickview-close").observe("click",this.hideWindow.bind(this))},showWindow:function(){$("quick-window").setStyle({top:document.viewport.getScrollOffsets().top+100+"px",left:document.body.clientWidth/2-$("quick-window").getWidth()/2+"px",display:"block"})},setContent:function(a){$$(".quick-view-content")[0].insert(a)},
clearContent:function(){$$(".quick-view-content")[0].replace('<div class="quick-view-content"></div>')},hideWindow:function(){this.clearContent();$("quick-window").hide()},loadInfo:function(a){a.stop();var b=this;this.createLoader();new Ajax.Request(a.element().href,{onSuccess:function(e){b.clearContent();b.setContent(e.responseText);b.destroyLoader();b.showWindow()}})}};