
function showInfo(id){
	$(".center_info").hide();
	$(id).show();

}

function popitup(url, name) {
	newwindow=window.open(url, name,'height=300,width=300');
	if (window.focus) {newwindow.focus()}
	return false;
}



$(document).ready( function(){

/* This is going to have to be changed on the next jquery upgrade, it's going to use http://docs.jquery.com/Utilities/jQuery.support */
	if ($.browser.msie ) {


		if($.browser.version < 7.0){
				$("#force_sleep_bottle").attr({ src: "includes/templates/forcesleep/images/force_sleep.gif"})

		}
	}

	$("#toc ul li a").each( function(){

		$(this).hover( function(){

			showInfo("#" + $(this).attr("id") + "_box");
		      },
			function () {
			return;
		      })
		 .click( function(){

		 	return;
		 });

	});

	// Dialog
	$('#dialog').dialog({
		autoOpen: false,
		width: 500,
		height: 400,
		bgiframe: true,
		modal: true,
		buttons: {
			"I understand and agree": function() {
				$(this).dialog("close");
			}
			}

	});

	// Dialog Link
	$("#showTerms").click(function(){
		$('#dialog').dialog('open');
		return false;
	});

	$(".product_image, .product_link").click( function(){
		popitup($(this).attr("href"), "Product View");
		return false;

	});

});

