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

}





$(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;
		 });

	});


	$("#products .product a").each( function(){

		$(this).click( function(){
			var prodId = $(this).attr("id").replace("product_", "");
			url = 'http://www.chitogenics.net/storefront/index.php?main_page=add_new_visitor&products_id=' + prodId + '&cart_quantity=1&use_template=forcesleep';

			window.location = url;
		 	return false;
		 });

	});



	// 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;
	});



});
