// Created on 22 March 2010 by J Fitz //
$(document).ready(function() {
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
	// Create the "hooks" we need on tab clicks //	
	$("#overview").click(function(){				
		jQuery.loadTab("overview/index_copy.cfm"); // Load our new information via Ajax GET //
		$("#menu div img").fadeOut(250); // Fade all of the "selected" images if active (should only be one at a time) //
		$("#overview img").fadeIn(250); // Fade IN our newly selected tab //
	});
	
	$("#specs").click(function(){			
		jQuery.loadTab("specs/index_copy.cfm");
		$("#menu div img").fadeOut(250);
		$("#specs img").fadeIn(250);						
	});	
	
	$("#storage").click(function(){			
		jQuery.loadTab("storage/index.cfm");
		$("#menu div img").fadeOut(250);
		$("#storage img").fadeIn(250);
	});
	
	$("#accessories").click(function(){			
		jQuery.loadTab("accessories/index_copy.cfm");
		$("#menu div img").fadeOut(250);
		$("#accessories img").fadeIn(250);
	});
	
	$("#power").click(function(){
		jQuery.loadTab("power/index.cfm");
		$("#menu div img").fadeOut(250);
		$("#power img").fadeIn(250);
	});
	
	$("#software").click(function(){			
		jQuery.loadTab("software/index.cfm");
		$("#menu div img").fadeOut(250);
		$("#software img").fadeIn(250);
	});
	
	$("#customization").click(function(){	
		jQuery.loadTab("customize/index.cfm");		
		$("#menu div img").fadeOut(250);
		$("#customization img").fadeIn(250);
	});
	
	$("#faqs").click(function(){
		jQuery.loadTab("faq/index_copy.cfm");			
		$("#menu div img").fadeOut(250);
		$("#faqs img").fadeIn(250);
	});
	
	// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
	
	// Load a the page specified via AJAX (HTTP GET method) //
	$.loadTab = function(page)
	{
		$.get(page, function(data) {
			$("#content_details").html(data);
		});
	}
});	