/* BELOW code will need to be deleted once determined not in use */
/* function slide()
{
	Effect.SlideUpAndDown = function(element) {
  element = $('products');
  if(Element.visible(element)) new Effect.SlideUp(element);
  else new Effect.SlideDown(element);
	}
}

function switchItOLD(){
	var div = $('products')
	var header = $('header')
	if (div.style.display == 'none') {
		div.show();
	} else {
		div.hide();
	}
} 
function switchIt(){
	var div = $('products')
	var header = $('header')
	if (div.style.display == 'none') {
		Effect.SlideDown(div, {duration:.25});
		Effect.SlideDown(header, {duration:.25});
	} else {
		Effect.SlideUp(div, {duration:.25});
		Effect.SlideDown(header, {duration:.25});
	}
}
*/

/* END ABOVE code will need to be deleted once determined not in use */



function checkText(theField) {
	if (theField.value == '') {
		theField.className = 'searchField';
		theField.value = theField.defaultValue;
	}
}

function clearText(thefield){
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
}

function clearStyle(theField) {
	if (theField.className == 'searchField') {
		theField.className = 'searchActive';
	}
}

/* 
Product Slider Menu
Below Code is used to slide the Product menu up and down.
*/

$(document).ready(function () {

/*    $("#products").hide();
    $("#productsBtn").click(function () {
        $("#products").toggle("blind", { direction: "vertical" }, 100);
        return false;
    }); */

    /* 
    END Product Slider Menu */

    /* BEGIN SwapImage Action */
    /* This swaps the swapimage when the cursor hovers over a link */

    /* BEGIN First dropdown */

/*    $('.pool_and_spa').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool266.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool266.jpg");
    });

    $('#menu_1_0').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool266.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool266.jpg");
    });


    $('#menu_1_1').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/R410AtitaniumHeatPump.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/R410AtitaniumHeatPump.jpg");
    });

    $('#menu_1_2').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/Digital_Low_NOx_Pool_Heater.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/Digital_Low_NOx_Pool_Heater.jpg");
    });

    $('#menu_1_3').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/Digital_And_Millivolt_Pool_Heater.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/Digital_And_Millivolt_Pool_Heater.jpg");
    });

    $('#menu_1_4').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool_266.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool_266.jpg");
    });

    $('#menu_1_5').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pr267.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pr267.jpg");
    });

    $('#menu_1_6').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool_electric_spapak.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool_electric_spapak.jpg");
    });

    $('#menu_1_7').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/R410AtitaniumHeatPump.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/R410AtitaniumHeatPump.jpg");
    });

    $('#menu_1_8').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool_130.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool_130.jpg");
    });

    $('#menu_1_9').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool_image.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool_image.jpg");
    });

    $('#menu_1_10').hover(function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool266.jpg");
    }, function () {
        $('#swapImage').attr("src", "/_themes/raypak/v1/images/pool266.jpg");
    }); */



    /* END First dropdown */

    /* BEGIN Second dropdown */

/*    $('.residential_hydronic').hover(function () {
        $('#swapImage2').attr("src", "/_themes/raypak/v1/images/gas_fired_boiler.jpg");
    }, function () {
        $('#swapImage2').attr("src", "/_themes/raypak/v1/images/gas_fired_boiler.jpg");
    });

    $('#menu_2_0').hover(function () {
        $('#swapImage2').attr("src", "/_themes/raypak/v1/images/gas_fired_boiler.jpg");
    }, function () {
        $('#swapImage2').attr("src", "/_themes/raypak/v1/images/gas_fired_boiler.jpg");
    });


    $('#menu_2_1').hover(function () {
        $('#swapImage2').attr("src", "/_themes/raypak/v1/images/commercial_hi_delta_ss.gif");
    }, function () {
        $('#swapImage2').attr("src", "/_themes/raypak/v1/images/commercial_hi_delta_ss.gif");
    });

    $('#menu_2_2').hover(function () {
        $('#swapImage2').attr("src", "/_themes/raypak/v1/images/gas_fired_boiler.jpg");
    }, function () {
        $('#swapImage2').attr("src", "/_themes/raypak/v1/images/gas_fired_boiler.jpg");
    });

    $('#menu_2_3').hover(function () {
        $('#swapImage2').attr("src", "/_themes/raypak/v1/images/xpak.jpg");
    }, function () {
        $('#swapImage2').attr("src", "/_themes/raypak/v1/images/xpak.jpg");
    }); */



    /* END SwapImage Action */

    /* BEGIN Second dropdown */
    //COMMERCIAL DHW//
/*    $('.commercial').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/commercial_hi_delta_group.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/commercial_hi_delta_group.jpg");
    });

    $('#menu_3_0').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/commercial_hi_delta_group.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/commercial_hi_delta_group.jpg");
    });

    $('#menu_3_1a').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Blank.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Blank.jpg");
    });

    $('#menu_3_1b').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Blank.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Blank.jpg");
    });
    $('#menu_3_1c').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/raytherm-hydronic-boiler.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/raytherm-hydronic-boiler.jpg");
    });
    $('#menu_3_1d').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Hi-Delta-Water-Heater.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Hi-Delta-Water-Heater.jpg");
    });
    $('#menu_3_1e').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/MVB-Water-Heater-Vertical.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/MVB-Water-Heater-Vertical.jpg");
    });
    $('#menu_3_1f').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/xFyre-Hydronic-Boiler.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/xFyre-Hydronic-Boiler.jpg");
    });
    $('#menu_3_1g').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Xtherm-Hydronic-Boiler.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Xtherm-Hydronic-Boiler.jpg");
    });
    //COMMERCIAL HYDRONIC BOILERS//
    $('#menu_3_2').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Pool_Hi_Delta_302-902.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Pool_Hi_Delta_302-902.jpg");
    });
    $('#menu_3_2a').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/raytherm-hydronic-boiler.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/raytherm-hydronic-boiler.jpg");
    });
    $('#menu_3_2b').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Hi-Delta-Water-Heater.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Hi-Delta-Water-Heater.jpg");
    });
    $('#menu_3_2c').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/MVB-Water-Heater-Vertical.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/MVB-Water-Heater-Vertical.jpg");
    });
    $('#menu_3_2d').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/xFyre-Hydronic-Boiler.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/xFyre-Hydronic-Boiler.jpg");
    });
    $('#menu_3_2e').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Xtherm-Hydronic-Boiler.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Xtherm-Hydronic-Boiler.jpg");
    });
    //COMMERCIAL POOL HEATERS//
    $('#menu_3_3').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/commercial_pool.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/commercial_pool.jpg");
    });
    $('#menu_3_3a').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/ASME_Pool_Heater.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/ASME_Pool_Heater.jpg");
    });
    $('#menu_3_3b').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Digital_Low_NOx_Pool_Heater.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Digital_Low_NOx_Pool_Heater.jpg.jpg");
    });
    $('#menu_3_3c').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/raytherm-pool-heater.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/raytherm-pool-heater.jpg");
    });
    $('#menu_3_3d').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Hi-Delta-Water-Heater.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Hi-Delta-Water-Heater.jpg");
    });
    $('#menu_3_3e').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/MVB-Water-Heater-Vertical.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/MVB-Water-Heater-Vertical.jpg");
    });
    $('#menu_3_3f').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/xFyre-Hydronic-Boiler.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/xFyre-Hydronic-Boiler.jpg");
    });
    $('#menu_3_3g').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Xtherm-Hydronic-Boiler.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Xtherm-Hydronic-Boiler.jpg");
    });
    $('#menu_3_3h').hover(function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Blank.jpg");
    }, function () {
        $('#swapImage3').attr("src", "/_themes/raypak/v1/images/Blank.jpg");
    }); */


    /* END SwapImage Action */

    /* BEGIN Drop Down Menu hover Action */
    /* This displays the drop down menu */

/*    $('.pool_and_spa').hover(
		function () {
		    $('.pool_and_spa .dropdown').fadeIn(260, function () {
		        $('.menu').fadeIn(100);
		    });
		},
		function () {
		    $('.pool_and_spa .dropdown').fadeOut(150);
		});

    $('.residential_hydronic').hover(
		function () {
		    $('.residential_hydronic .dropdown').fadeIn(260, function () {
		        $('.menu').fadeIn(260);
		    });
		},
		function () {
		    $('.residential_hydronic .dropdown').fadeOut(150);
		});

    $('.commercial').hover(
		function () {
		    $('.commercial .dropdown').fadeIn(260, function () {
		        $('.menu').fadeIn(100);
		    });
		},
		function () {
		    $('.commercial .dropdown').fadeOut(150);
		});

    $('.inside_raypak').hover(
		function () {
		    $('.inside_raypak .dropdown').fadeIn(260, function () {
		        $('.menu').fadeIn(100);
		    });
		},
		function () {
		    $('.inside_raypak .dropdown').fadeOut(150);
		});

    $('.support').hover(
		function () {
		    $('.support .dropdown').fadeIn(260, function () {
		        $('.menu').fadeIn(100);
		    });
		},
		function () {
		    $('.support .dropdown').fadeOut(150);
		}); */



    /* END Drop Down Menu hover Action */

    /* BEGIN menuArea dropdownlink */

/*    $(".dropDownlink_01").click(function () {
        $(".dropDown_01").toggle("blind", { direction: "vertical" }, 250);
    });

    $(".dropDownlink_02").click(function () {
        $(".dropDown_02").toggle("blind", { direction: "vertical" }, 250);
    });

    $(".dropDownlink_03").click(function () {
        $(".dropDown_03").toggle("blind", { direction: "vertical" }, 250);
    });

    $(".dropDownlink_04").click(function () {
        $(".dropDown_04").toggle("blind", { direction: "vertical" }, 250);
    });

    $(".dropDownlink_05").click(function () {
        $(".dropDown_05").toggle("blind", { direction: "vertical" }, 250);
    }); */

    /* END menuArea dropdownlink */

    var cache = [];
    // Arguments are image paths relative to the current page.
/*    $.preLoadImages = function () {
        var args_len = arguments.length;
        for (var i = args_len; i--; ) {
            var cacheImage = document.createElement('img');
            cacheImage.src = arguments[i];
            cache.push(cacheImage);
        }
    }

    jQuery.preLoadImages(

	'/_themes/raypak/v1/images/pool_heat_pump.jpg',
	'/_themes/raypak/v1/images/pool_266_ASME.jpg',
	'/_themes/raypak/v1/images/pool_267_ASME.jpg',
	'/_themes/raypak/v1/images/pool_266.jpg',
	'/_themes/raypak/v1/images/pool_electric_spapak.jpg',
	'/_themes/raypak/v1/images/pool_heat_pump.jpg',
	'/_themes/raypak/v1/images/pool_image.jpg',
	'/_themes/raypak/v1/images/pool_130.jpg',
	'/_themes/raypak/v1/images/gas_fired_boiler.jpg',
	'/_themes/raypak/v1/images/gas_fired_boiler.jpg',
	'/_themes/raypak/v1/images/commercial_hi_delta_ss.gif',
	'/_themes/raypak/v1/images/gas_fired_boiler.jpg',
	'/_themes/raypak/v1/images/xpak.jpg',
	'/_themes/raypak/v1/images/commercial_hi_delta.jpg',
	'/_themes/raypak/v1/images/pool_spa_xfyre.jpg',
	'/_themes/raypak/v1/images/commercial_pool.jpg',
	'/_themes/raypak/v1/images/hi_delta_group.jpg',
    '/_themes/raypak/v1/images/Hi-Delta-Water-Heater.jpg',
    '/_themes/raypak/v1/images/MVB-Water-Heater-Vertical.jpg',
    '/_themes/raypak/v1/images/raytherm-hydronic-boiler.jpg',
    '/_themes/raypak/v1/images/raytherm-pool-heater.jpg',
    '/_themes/raypak/v1/images/xFyre-Hydronic-Boiler.jpg',
    '/_themes/raypak/v1/images/Xtherm-Hydronic-Boiler.jpg',
    '/_themes/raypak/v1/images/Blank.jpg',
    '/_themes/raypak/v1/images/ASME_Pool_Heater.jpg',
    '/_themes/raypak/v1/images/Digital_And_Millivolt_Pool_Heater.jpg',
    '/_themes/raypak/v1/images/Digital_Low_NOx_Pool_Heater.jpg',
    '/_themes/raypak/v1/images/products-a00.jpg' */

    //		'/_themes/raypak/v1/images/products-a1.jpg',
    //		'/_themes/raypak/v1/images/products-a2.jpg',
    //		'/_themes/raypak/v1/images/products-a3.jpg',
    //		'/_themes/raypak/v1/images/products-a4.jpg',
    //		'/_themes/raypak/v1/images/products-a5.jpg',
    //		'/_themes/raypak/v1/images/products-a6.jpg',
    //		'/_themes/raypak/v1/images/products-a7.jpg',
    //		'/_themes/raypak/v1/images/products-a8.jpg',
    //		'/_themes/raypak/v1/images/products-a9.jpg'
	//);

});


/*

function init(){
	var div = $('products')
	div.hide();
}

*/
