/** ################################################################################
 *	home.js
 *	image swap functionality
 *	chris casciano 8/11/2008
 *  ################################################################################
 */

window.clues.home = window.clues.home || {};

/** ------------------------------------------------------
 *	this namespace contains the profile image swap logic
 */
clues.home = {
	setup : function() {
		var button = document.getElementById("loginBtn");
		if (button) {
			button.out = new Image();
			button.out.src = button.src;
			button.over = new Image();
			button.over.src = button.src.replace(/.jpg/g, "_over.jpg");

		    button.onmouseover = function() {
                        clues.home.buttonOver();
                    }
		    button.onmouseout = function() {
                        clues.home.buttonOut();
                    }
		}
	},
	buttonOver : function() {
		this.src = this.over.src;
	},
	buttonOut : function() {
		this.src = this.out.src;
	}
}

/** ------------------------------------------------------
 *	Page load 
 */
window.addEvent('domready', clues.home.setup);

