//This file contains all the javascript to run the shopping cart
//load the main stuff when the page loads
$(function() {
	//hide the detail div
	loadInclude();

});

function loadInclude(){
	$(".menuItem").click(function(){
		$("#contentData").load("includes/"+this.id+".html",function(){
			$(".hideScreenshot").hide();
			showScreenshots();
			//loadThickbox();
			});
			
	});
}

function loadThickbox(){
	tb_init('a.thickbox');
	//pass where to apply thickbox
	imgLoader = new Image();// preload image
	imgLoader.src = tb_pathToImage;
}

function showScreenshots(){
	$(".screenshotLink").click(function(){
		$("#theContent").show("slow").load("includes/screenshot.php",function(){
			$(".hideScreenshot").show().click(function(){
				$("#theContent").toggle("slow");
				if($(".hideScreenshot").html() == "view screenshot"){
					$(".hideScreenshot").html("hide screenshot");
				}else{
					$(".hideScreenshot").html("view screenshot");
				}
	
		});
			$(".screenshotLink").hide();
			
		});// alert("show screenshot");
	});
}