var mUtils = {};

// Static methods

mUtils.ui = {

	watermark : function(strInputId, strMessage, color)
	{
		var el = $("#" + strInputId);
		
		if(!color) color = "#d5d5d5";
		
		el.unbind("blur");
		el.unbind("focus");

		el.bind("blur", function(){
			mUtils.ui.watermark(strInputId, strMessage, color)}
		);
		
		el.bind("focus", function(){
			if (el.val() == strMessage) {
				el.val("");
				el.css("color", "#000");
			}
		});
		
		if (el.val() == "" || el.val() == strMessage){
			el.css("color", color);
			el.val(strMessage);
		}
	},
	
	isIE : function()
	{
		if (navigator.userAgent.indexOf("MSIE") != -1) return true;
		else return false;
	},
	
	isIE6 : function()
	{
		if (navigator.userAgent.indexOf("MSIE 6.") != -1) return true;
		else return false;
	},
	
	hovermenu : function(strNavListId)
	{
		$("#" + strNavListId + " li").bind("mouseover", toggleState);
		$("#" + strNavListId + " li").bind("mouseout", toggleState);
			
		function toggleState() {
			$(this).toggleClass("hover");
		}
	}
}
