$(document).ready(function() {

	$(".toolsCol > .colContent > a").click(function(event){
		event.preventDefault();
		var tempID = this.id.replace("a", "");
		if ($("#game" + tempID).is('.hidden')) {
			$("#game" + tempID + ' > .game-more-info > .game-art').load('/includes/php/get-game-info.php',{id:tempID});
			
			$("#game" + tempID + ' > .game-more-info > .game-rate').load('/includes/php/get-user-rating.php',{id:tempID});
			
			$("#game" + tempID).removeClass("hidden");
			tb_init('a.thickbox, area.thickbox, input.thickbox');	
		} else {
			$("#game" + tempID).addClass("hidden");
		}
	});
	
	$("a.thickbox_ajax").live("click", function(event){
		event.preventDefault();
		var t = this.title || this.name || null;
		var g = this.rel || false;
		tb_show(t,this.href,g);
		this.blur();
	});
	
	$(".star-scale > a").live("mouseover", function(event){
		$(this).parent().removeClass("star-rating0");
		$(this).parent().removeClass("star-rating1");
		$(this).parent().removeClass("star-rating2");
		$(this).parent().removeClass("star-rating3");
		$(this).parent().removeClass("star-rating4");
		$(this).parent().removeClass("star-rating5");
		$(this).parent().removeClass("star-rating6");
		$(this).parent().removeClass("star-rating7");
		$(this).parent().removeClass("star-rating8");
		$(this).parent().removeClass("star-rating9");
		$(this).parent().removeClass("star-rating10");
		$(this).parent().addClass("star-rating" + $(this).attr("title"));
	});
	
	$(".star-scale > a").live("mouseout", function(event){
		var last_rating;
		if ($(this).parent().is('.currentRating0')) {last_rating = "star-rating0";}
		if ($(this).parent().is('.currentRating1')) {last_rating = "star-rating1";}
		if ($(this).parent().is('.currentRating2')) {last_rating = "star-rating2";}
		if ($(this).parent().is('.currentRating3')) {last_rating = "star-rating3";}
		if ($(this).parent().is('.currentRating4')) {last_rating = "star-rating4";}
		if ($(this).parent().is('.currentRating5')) {last_rating = "star-rating5";}
		if ($(this).parent().is('.currentRating6')) {last_rating = "star-rating6";}
		if ($(this).parent().is('.currentRating7')) {last_rating = "star-rating7";}
		if ($(this).parent().is('.currentRating8')) {last_rating = "star-rating8";}
		if ($(this).parent().is('.currentRating9')) {last_rating = "star-rating9";}
		if ($(this).parent().is('.currentRating10')) {last_rating = "star-rating10";}
		 
		$(this).parent().removeClass("star-rating0");
		$(this).parent().removeClass("star-rating1");
		$(this).parent().removeClass("star-rating2");
		$(this).parent().removeClass("star-rating3");
		$(this).parent().removeClass("star-rating4");
		$(this).parent().removeClass("star-rating5");
		$(this).parent().removeClass("star-rating6");
		$(this).parent().removeClass("star-rating7");
		$(this).parent().removeClass("star-rating8");
		$(this).parent().removeClass("star-rating9");
		$(this).parent().removeClass("star-rating10");
		$(this).parent().addClass(last_rating);
		/*THEN UPDATE AVERAGE RATING FOR GAME BASED ON THE NEW VALUES*/
	});
	
	$(".star-scale > a").live("click", function(event){
		event.preventDefault();
		var game_to_rate = $(this).parent().parent().parent().parent().attr("id");
		game_to_rate = game_to_rate.replace("game", "");
		new_game_rating = $(this);
		new_game_rating.parent().removeClass("currentRating0");
		new_game_rating.parent().removeClass("currentRating1");
		new_game_rating.parent().removeClass("currentRating2");
		new_game_rating.parent().removeClass("currentRating3");
		new_game_rating.parent().removeClass("currentRating4");
		new_game_rating.parent().removeClass("currentRating5");
		new_game_rating.parent().removeClass("currentRating6");
		new_game_rating.parent().removeClass("currentRating7");
		new_game_rating.parent().removeClass("currentRating8");
		new_game_rating.parent().removeClass("currentRating9");
		new_game_rating.parent().removeClass("currentRating10");
		new_game_rating.parent().addClass("currentRating" + $(this).attr("title"));
		$.post("/includes/php/rate-game.php",{id:game_to_rate,rate:$(this).attr("title")}, function(data){
			//new_game_rating.parent().addClass("currentRating" + data);
		});
		
	});
	
	$(".collection > a.cadd").live("click", function(event){
		event.preventDefault();
		tempLinkClass = $(this);
		$.get("/includes/php/add-to-collection.php",{id:$(this).attr("href")}, function(data){
			if (data == "success"){
				//alert("add this game?");
				//alert(tempLinkClass.attr("class"));
				tempLinkClass.removeClass("cadd");
				tempLinkClass.addClass("cremove");
			} else {
				//alert(data);	
			}
		});
	});

	$(".collection > a.cremove").live("click", function(event){
		event.preventDefault();
		tempLinkClass = $(this);
		$.get("/includes/php/remove-from-collection.php",{id:$(this).attr("href")}, function(data){
			if (data == "success"){
				//alert("remove this game?");
				//alert(tempLinkClass.attr("class"));
				tempLinkClass.removeClass("cremove");
				tempLinkClass.addClass("cadd");
			} else {
				//alert(data);	
			}
		});
	});
	
	$(".wishlist > a.cadd").live("click", function(event){
		event.preventDefault();
		tempLinkClass = $(this);
		$.get("/includes/php/add-to-wishlist.php",{id:$(this).attr("href")}, function(data){
			if (data == "success"){
				//alert("add this game?");
				//alert(tempLinkClass.attr("class"));
				tempLinkClass.removeClass("cadd");
				tempLinkClass.addClass("cremove");
			} else {
				//alert(data);	
			}
		});
	});

	$(".wishlist > a.cremove").live("click", function(event){
		event.preventDefault();
		tempLinkClass = $(this);
		$.get("/includes/php/remove-from-wishlist.php",{id:$(this).attr("href")}, function(data){
			if (data == "success"){
				//alert("remove this game?");
				//alert(tempLinkClass.attr("class"));
				tempLinkClass.removeClass("cremove");
				tempLinkClass.addClass("cadd");
			} else {
				//alert(data);	
			}
		});
	});
	
	$("#new-comments-submit").click(function(event){
		var idToUse = $(this).parent().parent().parent().attr("class");		
		
		$.post("/includes/php/add-comment.php",{id:idToUse,comment:$('#newComment').val()}, function(data){
			//alert(data);
			if (data == "success"){
				$('#leave-a-comment').addClass("hidden");
				$('#game-comments').load('/includes/php/show-comments.php',{id:idToUse,pagenum:"1"});
			} else {
			}
		});
	});
	
	$("#comments_next").live("click", function(event){	
		event.preventDefault();
		var idToUse = $('#game-comments').attr("class");
		var pagenum = $('#comments_next').attr("class");
		$('#game-comments').load('/includes/php/show-comments.php',{id:idToUse,pagenum:pagenum});
	});
	
	$("#comments_first").live("click", function(event){
		event.preventDefault();
		var idToUse = $('#game-comments').attr("class");
		var pagenum = $('#comments_first').attr("class");
		$('#game-comments').load('/includes/php/show-comments.php',{id:idToUse,pagenum:pagenum});
	});
	
	$("#comments_previous").live("click", function(event){
		event.preventDefault();
		var idToUse = $('#game-comments').attr("class");
		var pagenum = $('#comments_previous').attr("class");
		$('#game-comments').load('/includes/php/show-comments.php',{id:idToUse,pagenum:pagenum});
	});
	
	$("#comments_last").live("click", function(event){
		event.preventDefault();
		var idToUse = $('#game-comments').attr("class");
		var pagenum = $('#comments_last').attr("class");
		$('#game-comments').load('/includes/php/show-comments.php',{id:idToUse,pagenum:pagenum});
	});
	
	$("#friends-features > a.followuser").live("click", function(event){
		event.preventDefault();
		tempFriendAddClass = $(this);
		$.get("/includes/php/add-friend.php",{id:$(this).attr("href")}, function(data){
			if (data == "success"){
				tempFriendAddClass.removeClass("followuser");
				tempFriendAddClass.addClass("stopfollowuser");
				$("#friends-features > a > img").attr("src","/images/stop-follow-user-button.jpg");
			} else {
				$("#profile-right > #error_message").html(data);
			}
		});
	});
	
	$("#friends-features > a.stopfollowuser").live("click", function(event){
		event.preventDefault();
		tempFriendAddClass = $(this);
		$.get("/includes/php/remove-friend.php",{id:$(this).attr("href")}, function(data){
			if (data == "success"){
				tempFriendAddClass.removeClass("stopfollowuser");
				tempFriendAddClass.addClass("followuser");
				$("#friends-features > a > img").attr("src","/images/follow-user-button.jpg");
			} else {
				$("#profile-right > #error_message").html(data);
			}
		});
	});
	
	$("a#status-link").click(function(event){
		event.preventDefault();
		if ($("#status-update").is('.hidden')) {
			$("#status-update").removeClass("hidden");
		} else {
			$("#status-update").addClass("hidden");
		}
	});
	
	$("a#status-box-close").click(function(event){
		event.preventDefault();
		$("#status-update").addClass("hidden");
	});
	
	$("#status").click(function(event){
		if ($("#status").val() == "update your status?"){
			$("#status").val("");
		}
		if ($("#status").val() == "update failed: try again later."){
			$("#status").val("");
		}
	});
	
	$("#status-submit").click(function(event){
		$.post("/includes/php/add-status.php",{status:$("#status").val()}, function(data){
			if (data == "success"){
				$("#last-status-update").html("<strong>Current:</strong> " + $("#status").val());
				$("#status").val("update your status?");
			} else {
				$("#status").val("update failed: try again later.");
			}
		});
	});
	
	//Status Bar Password
	$("#formPasswordFake").focus(function(event){
		$("#formPasswordFake").addClass("hidden");
		$("#formPassword").removeClass("hidden");
		$("#formPassword").focus();
	});
	
	$("#formPassword").blur(function(event){
		temppwcheck = $("#formPassword").val();
		temppwcheck = trim(temppwcheck);
		if(temppwcheck == ""){
			$("#formPassword").val("");
			$("#formPassword").addClass("hidden");
			$("#formPasswordFake").removeClass("hidden");
		}
	});
	
	$(".avatarSeriesSelect").change(function(event){
		//alert($(this).val());
		if($(this).val() =="Castlevania"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/castlevania-dracula.png" /><img src="/images/avatars/castlevania-dracula-2nd-form.png" /><img src="/images/avatars/castlevania-3.gif" /><img src="/images/avatars/castlevania-4.gif" /><img src="/images/avatars/castlevania-5.gif" /><img src="/images/avatars/castlevania-6.gif" /><img src="/images/avatars/castlevania-7.gif" /><img src="/images/avatars/castlevania-8.gif" /><img src="/images/avatars/castlevania-9.gif" /><img src="/images/avatars/castlevania-10.gif" /><img src="/images/avatars/castlevania-11.gif" /><img src="/images/avatars/castlevania-12.gif" /><img src="/images/avatars/castlevania-13.gif" /><img src="/images/avatars/castlevania-14.gif" /><img src="/images/avatars/castlevania-15.gif" /><img src="/images/avatars/castlevania-16.gif" /><img src="/images/avatars/castlevania-17.gif" /><img src="/images/avatars/castlevania-18.gif" /><img src="/images/avatars/castlevania-19.gif" /><img src="/images/avatars/castlevania-20.gif" /><img src="/images/avatars/castlevania-21.gif" /><img src="/images/avatars/castlevania-22.gif" /><img src="/images/avatars/castlevania-23.gif" /><img src="/images/avatars/castlevania-24.gif" /><img src="/images/avatars/castlevania-25.gif" /><img src="/images/avatars/castlevania-26.gif" /><img src="/images/avatars/castlevania-27.gif" />	');
		}else if($(this).val()=="FinalFantasy"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/final-fantasy-black-belt.png" /><img src="/images/avatars/final-fantasy-black-belt-profile.png" /><img src="/images/avatars/final-fantasy-black-mage.png" /><img src="/images/avatars/final-fantasy-black-mage-profile.png" /><img src="/images/avatars/final-fantasy-black-wizard.png" /><img src="/images/avatars/final-fantasy-black-wizard-profile.png" /><img src="/images/avatars/final-fantasy-fighter.png" /><img src="/images/avatars/final-fantasy-fighter-profile.png" /><img src="/images/avatars/final-fantasy-knight.png" /><img src="/images/avatars/final-fantasy-knight-profile.png" /><img src="/images/avatars/final-fantasy-master.png" /><img src="/images/avatars/final-fantasy-master-profile.png" /><img src="/images/avatars/final-fantasy-ninja-profile.png" /><img src="/images/avatars/final-fantasy-red-mage-profile.png" /><img src="/images/avatars/final-fantasy-red-wizard.png" /><img src="/images/avatars/final-fantasy-red-wizard-profile.png" /><img src="/images/avatars/final-fantasy-thief-profile.png" /><img src="/images/avatars/final-fantasy-white-mage.png" /><img src="/images/avatars/final-fantasy-white-wizard.png" /><img src="/images/avatars/final-fantasy-white-wizard-profile.png" />');
		}else if($(this).val()=="LegendOfZelda"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/legend-of-zelda-dragon.png" /><img src="/images/avatars/legend-of-zelda-fairy.png" /><img src="/images/avatars/legend-of-zelda-ganon.png" /><img src="/images/avatars/legend-of-zelda-heart.png" /><img src="/images/avatars/legend-of-zelda-key.png" /><img src="/images/avatars/legend-of-zelda-link.png" /><img src="/images/avatars/legend-of-zelda-link-blue.png" /><img src="/images/avatars/legend-of-zelda-moblin.png" />');
		}else if($(this).val()=="MegaMan"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/mega-man-mega-man.png" /><img src="/images/avatars/mega-man-mega-man-shoot.png" />');
		}else if($(this).val()=="Sonic"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/sonic-the-hedgehog-golden-sonic.png" /><img src="/images/avatars/sonic-the-hedgehog-golden-sonic-flying.png" /><img src="/images/avatars/sonic-the-hedgehog-sonic.png" /><img src="/images/avatars/sonic-the-hedgehog-sonic-running.png" />');
		}else if($(this).val()=="SuperMarioBros"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/super-mario-bros-mario.png" /><img src="/images/avatars/super-mario-bros-mario-fire.png" /><img src="/images/avatars/super-mario-bros-mario-small.png" /><img src="/images/avatars/super-mario-bros-luigi.png" /><img src="/images/avatars/super-mario-bros-luigi-small.png" /><img src="/images/avatars/super-mario-bros-toad.png" /><img src="/images/avatars/super-mario-bros-princess.png" /><img src="/images/avatars/super-mario-bros-bowser.png" /><img src="/images/avatars/super-mario-bros-flying-goomba.png" /><img src="/images/avatars/super-mario-bros-flying-koopa.png" /><img src="/images/avatars/super-mario-bros-fish.png" /><img src="/images/avatars/super-mario-bros-beetke.png" /><img src="/images/avatars/super-mario-bros-cloud.png" /><img src="/images/avatars/super-mario-bros-plant.png" /><img src="/images/avatars/super-mario-bros-bullet.png" /><img src="/images/avatars/super-mario-bros-1up.png" /><img src="/images/avatars/super-mario-bros-coin.png" /><img src="/images/avatars/super-mario-bros-question-block.png" /><img src="/images/avatars/super-mario-bros-mushroom.png" /><img src="/images/avatars/super-mario-bros-flower.png" /><img src="/images/avatars/super-mario-bros-star.png" /><img src="/images/avatars/super-mario-bros-2-mario.png" /><img src="/images/avatars/super-mario-bros-2-luigi.png" /><img src="/images/avatars/super-mario-bros-2-toad.png" /><img src="/images/avatars/super-mario-bros-2-peach.png" />');
		}else if($(this).val()=="Metroid"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/metroid-1.gif" /><img src="/images/avatars/metroid-2.gif" /><img src="/images/avatars/metroid-3.gif" /><img src="/images/avatars/metroid-4.gif" /><img src="/images/avatars/metroid-5.gif" /><img src="/images/avatars/metroid-6.gif" /><img src="/images/avatars/metroid-7.gif" /><img src="/images/avatars/metroid-8.gif" /><img src="/images/avatars/metroid-9.gif" /><img src="/images/avatars/metroid-10.gif" /><img src="/images/avatars/metroid-11.gif" /><img src="/images/avatars/metroid-12.gif" /><img src="/images/avatars/metroid-13.gif" /><img src="/images/avatars/metroid-14.gif" /><img src="/images/avatars/metroid-15.gif" /><img src="/images/avatars/metroid-16.gif" /><img src="/images/avatars/metroid-17.gif" /><img src="/images/avatars/metroid-18.gif" />');
			}else if($(this).val()=="DonkeyKong"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/donkey-kong-1.gif" /><img src="/images/avatars/donkey-kong-2.gif" /><img src="/images/avatars/donkey-kong-3.gif" /><img src="/images/avatars/donkey-kong-4.gif" /><img src="/images/avatars/donkey-kong-5.gif" /><img src="/images/avatars/donkey-kong-6.gif" /><img src="/images/avatars/donkey-kong-7.gif" /><img src="/images/avatars/donkey-kong-8.gif" /><img src="/images/avatars/donkey-kong-9.gif" /><img src="/images/avatars/donkey-kong-10.gif" /><img src="/images/avatars/donkey-kong-11.gif" /><img src="/images/avatars/donkey-kong-12.gif" /><img src="/images/avatars/donkey-kong-13.gif" /><img src="/images/avatars/donkey-kong-14.gif" /><img src="/images/avatars/donkey-kong-15.gif" /><img src="/images/avatars/donkey-kong-16.gif" /><img src="/images/avatars/donkey-kong-17.gif" /><img src="/images/avatars/donkey-kong-18.gif" /><img src="/images/avatars/donkey-kong-19.gif" />');
		}else if($(this).val()=="SpaceInvaders"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/space-invaders-1.gif" /><img src="/images/avatars/space-invaders-2.gif" /><img src="/images/avatars/space-invaders-3.gif" /><img src="/images/avatars/space-invaders-4.gif" /><img src="/images/avatars/space-invaders-5.gif" /><img src="/images/avatars/space-invaders-6.gif" /><img src="/images/avatars/space-invaders-7.gif" />');
		}else if($(this).val()=="PacMan"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/pac-man-1.gif" /><img src="/images/avatars/pac-man-2.gif" /><img src="/images/avatars/pac-man-3.gif" /><img src="/images/avatars/pac-man-4.gif" /><img src="/images/avatars/pac-man-5.gif" /><img src="/images/avatars/pac-man-6.gif" /><img src="/images/avatars/pac-man-7.gif" /><img src="/images/avatars/pac-man-8.gif" /><img src="/images/avatars/pac-man-9.gif" /><img src="/images/avatars/pac-man-10.gif" /><img src="/images/avatars/pac-man-11.gif" /><img src="/images/avatars/pac-man-12.gif" /><img src="/images/avatars/pac-man-13.gif" />');
		}else if($(this).val()=="DragonWarrior"){
			$("#avatarSelectionBox").html('<img src="/images/avatars/dragon-warrior-1.gif" /><img src="/images/avatars/dragon-warrior-2.gif" /><img src="/images/avatars/dragon-warrior-3.gif" /><img src="/images/avatars/dragon-warrior-4.gif" /><img src="/images/avatars/dragon-warrior-5.gif" /><img src="/images/avatars/dragon-warrior-6.gif" /><img src="/images/avatars/dragon-warrior-7.gif" /><img src="/images/avatars/dragon-warrior-8.gif" /><img src="/images/avatars/dragon-warrior-9.gif" /><img src="/images/avatars/dragon-warrior-10.gif" /><img src="/images/avatars/dragon-warrior-11.gif" /><img src="/images/avatars/dragon-warrior-12.gif" /><img src="/images/avatars/dragon-warrior-13.gif" /><img src="/images/avatars/dragon-warrior-14.gif" /><img src="/images/avatars/dragon-warrior-15.gif" /><img src="/images/avatars/dragon-warrior-16.gif" /><img src="/images/avatars/dragon-warrior-17.gif" /><img src="/images/avatars/dragon-warrior-18.gif" /><img src="/images/avatars/dragon-warrior-19.gif" /><img src="/images/avatars/dragon-warrior-20.gif" /><img src="/images/avatars/dragon-warrior-21.gif" /><img src="/images/avatars/dragon-warrior-22.gif" />');
		}
	});
		
	$("#avatarSelectionBox img").live("click", function(event){
		var thisImg = $(this).attr("src");
		//alert(thisImg);
		$("#Avatar").val(thisImg);
        $("#avatarSelectionBox").html('Selected Avatar: <img src="' + thisImg + '" width="50" height="50" alt="" />');
	});

	/*
	$('.toolsCol .colContent img.sumImage').qtip({
	   content: 'Game Info',
	   position: {
		  corner: {
			 target: 'bottomMiddle',
			 tooltip: 'topMiddle'
		  }
	   },
	   style: { 
	   		name: 'light',
		  	color: 'black',
      		textAlign: 'center'
	   },
	   show: 'mouseover',
	   hide: 'mouseout'
	});
	
	$('.toolsCol .colContent img.boxImage').qtip({
	   content: 'Box or Cart Pics',
	   position: {
		  corner: {
			 target: 'bottomMiddle',
			 tooltip: 'topMiddle'
		  }
	   },
	   style: { 
	   		name: 'light',
		  	color: 'black',
      		textAlign: 'center'
	   },
	   show: 'mouseover',
	   hide: 'mouseout'
	});
	
	$('.toolsCol .colContent img.videoImage').qtip({
	   content: 'Video',
	   position: {
		  corner: {
			 target: 'bottomMiddle',
			 tooltip: 'topMiddle'
		  }
	   },
	   style: { 
	   		name: 'light',
		  	color: 'black',
      		textAlign: 'center'
	   },
	   show: 'mouseover',
	   hide: 'mouseout'
	});
	
	$('.toolsCol .colContent img.screenshotsImage').qtip({
	   content: 'Screenshots',
	   position: {
		  corner: {
			 target: 'bottomMiddle',
			 tooltip: 'topMiddle'
		  }
	   },
	   style: { 
	   		name: 'light',
		  	color: 'black',
      		textAlign: 'center'
	   },
	   show: 'mouseover',
	   hide: 'mouseout'
	});
	
	$('.toolsCol .colContent img.toolsImage').qtip({
	   content: 'Tools',
	   position: {
		  corner: {
			 target: 'bottomMiddle',
			 tooltip: 'topMiddle'
		  }
	   },
	   style: { 
	   		name: 'light',
		  	color: 'black',
      		textAlign: 'center'
	   },
	   show: 'mouseover',
	   hide: 'mouseout'
	});
	*/
	
$('#console2600').qtip({
prerender: true,		
content: 'Atari 2600 (October 1977)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});		
	
$('#consoleintel').qtip({
prerender: true,		
content: 'Intellivision (1979, 1980)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});		
	
$('#consolecoleco').qtip({
prerender: true,		
content: 'Colecovision (August 1982)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});	
	
$('#consolenes').qtip({
prerender: true,		
content: 'Nintendo Entertainment System (October 1985)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});	
	
$('#consolesnes').qtip({
prerender: true,		
content: 'Super Nintendo Entertainment System (August 1991)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});	
	
$('#consolems').qtip({
prerender: true,		
content: 'Sega Master System (June 1986)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});	
	
$('#consolegenesis').qtip({
prerender: true,		
content: 'Sega Genesis (August 1989)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});	
	
$('#consolescd').qtip({
prerender: true,		
content: 'Sega CD (November 1992)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});	
	
$('#console32x').qtip({
prerender: true,		
content: 'Sega 32X (November 1994)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});	
	
$('#consoletg16').qtip({
prerender: true,					   
content: 'TurboGrafx-16 (August 1989)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});	
	
$('#consoletcd').qtip({
prerender: true,		
content: 'TurboGrafx-CD (August 1990)',
position: {  corner: {	 target: 'bottomMiddle',	 tooltip: 'bottomMiddle'  }},
style: { name: 'light',color: 'black',textAlign: 'center'},show: 'mouseover', hide: 'mouseout'	});	


});
