// apply to all png images 
    $(document.body).ready(function () {
$('img[@src$=.png]').ifixpng(); 
 });


$(document).ready(function (){

//alert($("body").width());

//alert($("body").height());
	$(".stateLink > a").bind("click",function(e){
			var linkloc = this.toString();

			$("body").append("<div id='overlay'></div>");

			$("#overlay").load(linkloc);
			var y = e.pageY - 400;
			$("#overlay").css("top",y);
			$("#overlay").fadeIn("slow");
			return false;
			});

});    


$(document).ready(function(){

$(".div-lists a").bind("click",function(e){
            var URL = this.toString();
            day = new Date();
            id = day.getTime();
            eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=740,height=740,left = 370,top = 50');");          
			return false;
			});						


$(".flash-pop a").bind("click",function(e){
            var URL = this.toString();
            day = new Date();
            id = day.getTime();
            eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=630,height=660,left = 300,top = 50');");          
			return false;
			});						

$(".img-pop a").bind("click",function(e){
    /*var cssObj = {
        //background: "url( '" + this.title.toString() + "') no-repeat top left",
        background: "url( '/uploadedImages/Products/towel-warmer-features.jpg' ) no-repeat top left",
        border: "solid 15px black",
        height: "500px",
        width: "600px"
        }
          $("#img_popup").css(cssObj);   */
            var URL = this.toString();
            day = new Date();
            id = day.getTime();
            eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=630,height=660,left = 300,top = 50');");          
			
			return false;
			});			

$(".big-img-pop a").bind("click",function(e){
            var URL = this.toString();
            day = new Date();
            id = day.getTime();
            eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=950,height=760,left = 300,top = 50');");          
			
			return false;
			});				
		
		$(".small-img-pop a").bind("click",function(e){
            var URL = this.toString();
            day = new Date();
            id = day.getTime();
            eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=630,height=360,left = 300,top = 50');");          
			
			return false;
			});	
		
						
});

$(document).ready(function(){
$("#ddcolortabs ul li a").click(function() {
//$("#ddcolortabs ul li").removeAttr("id");

$("#ddcolortabs ul li a").css("background-color", "#687B81"); 
$(this).css("background-color", "#3a4247"); 
});
});


function hidegrid(gridno){
$(".gridc" + gridno).css("display", "none"); 
}

function showgrid(gridno){
$(".gridc" + gridno).css("display", "block"); 
}



$(document).ready(function(){

$("#nav1").mouseover(function()
	{	
	var location= $(this).position();
	var cssObj = {
    top: location.top + 23,
    left: location.left,
    display: "block"
    }
	$("#sub1").css(cssObj);
	
	$("#sub1").mouseover(function()
	{	
    $("#sub1").css("display", "block");
	}).mouseout(function() {
	$("#sub1").css("display", "none");
	});
	
	}).mouseout(function() {
	$("#sub1").css("display", "none");
	});
	
$("#nav2").mouseover(function()
	{	
	var location= $(this).position();
	var cssObj = {
    top: location.top + 23,
    left: location.left,
    display: "block"
    }
	$("#sub2").css(cssObj);
	
	$("#sub2").mouseover(function()
	{	
    $("#sub2").css("display", "block");
	}).mouseout(function() {
	$("#sub2").css("display", "none");
	});
	
	}).mouseout(function() {
	$("#sub2").css("display", "none");
	});
$("#nav3").mouseover(function()
	{	
	var location= $(this).position();
	var cssObj = {
    top: location.top + 23,
    left: location.left,
    display: "block"
    }
	$("#sub3").css(cssObj);
		
	$("#sub3").mouseover(function()
	{	
    $("#sub3").css("display", "block");
	}).mouseout(function() {
	$("#sub3").css("display", "none");
	});
	
	}).mouseout(function() {
	$("#sub3").css("display", "none");
	});


$("#nav4").mouseover(function()
	{	
	var location= $(this).position();
	var cssObj = {
    top: location.top + 23,
    left: location.left,
    display: "block"
    }
	$("#sub4").css(cssObj);
		
	$("#sub4").mouseover(function()
	{	
    $("#sub4").css("display", "block");
	}).mouseout(function() {
	$("#sub4").css("display", "none");
	});
	
	}).mouseout(function() {
	$("#sub4").css("display", "none");
	});

        
$("#nav5").mouseover(function()
	{	
	var location= $(this).position();
	var cssObj = {
    top: location.top + 23,
    left: location.left,
    display: "block"
    }
	$("#sub5").css(cssObj);
		
	$("#sub5").mouseover(function()
	{	
    $("#sub5").css("display", "block");
	}).mouseout(function() {
	$("#sub5").css("display", "none");
	});
	
	}).mouseout(function() {
	$("#sub5").css("display", "none");
	});
});        
        
function emailForm(){ 

var daReferrer = document.URL; 
var email = ""; 
var subject = "Check out this page from the Mr. Steam Web site"; 
var body_message = "I wanted you to see this page from www.mrsteam.com: %0D%0D"+ daReferrer + "%0D%0DThanks for visiting www.mrsteam.com." ; 

var mailto_link = 'mailto:'+email+'?subject='+subject+'&body='+body_message; 

win = window.open(mailto_link,'emailWindow'); 
if (win && win.open &&!win.closed) win.close(); 
} 

