/**
 * footer_icons.js
 *
 * @author		Jonathan Pitre
 * @description	This file contains the various JavaScript functions which control the mouseover
 *				events for the link icons in the website footer of www.builditsoftware.com. Modifying
 *				this file might result in the loss of mouseover functionality for footer icons.
 * @changelog
 * --------------------------------------------------------------------------------------------------
 * Jonathan Pitre		13/06/2011	Final release of script.
 * --------------------------------------------------------------------------------------------------
 */

// Constant file starters (locations)
var CONST_TWITTER_START = "../../img/twitter_";
var CONST_RSS_START = "../../img/RSS_";
var CONST_YOUTUBE_START = "../../img/youtube_";

// File extension
var CONST_EXT = "_trans.png";

// Changes the color of an icon on mouse over.
function iconMouseIn(obj){
	var id = obj.id;
	if (id == "twitter_icon"){
		obj.src = CONST_TWITTER_START + "color" + CONST_EXT;
	}
	else if (id == "rss_icon"){
		obj.src = CONST_RSS_START + "color" + CONST_EXT;
	}
	else if (id == "youtube_icon"){
		obj.src = CONST_YOUTUBE_START + "color" + CONST_EXT;
	}
}

// Restores the color of an icon on mouseout.
function iconMouseOut(obj){
	var id = obj.id;
	if (id == "twitter_icon"){
		obj.src = CONST_TWITTER_START + "bw" + CONST_EXT;
	}
	else if (id == "rss_icon"){
		obj.src = CONST_RSS_START + "bw" + CONST_EXT;
	}
	else if (id == "youtube_icon"){
		obj.src = CONST_YOUTUBE_START + "bw" + CONST_EXT;
	}
}
