$(document).ready(function(){
						   
						   
	tooltip();
						   
	// Clear field value when clicked
	$(".has_default_value").focus(function (){
		if ( $(this).val() == $(this).attr("title") ) { 
			$(this).val("");
		}
	});
	$(".has_default_value").blur(function (){ 
		if ( $(this).val() == "" ) {
			$(this).val($(this).attr("title"));
		}
	});
	
	// Rollovers
	$(".rollover").hover(function(){
		this.src = this.src.replace("_off","_on");
	},
	function(){
		this.src = this.src.replace("_on","_off");
	});
	$(".rollover").each(function(){
		rollover_src = $(this).attr("src");
		rollover_activate = rollover_src.replace(/_off/gi, "_on");
		$("<img>").attr("src", rollover_activate);
	});
	
	
	// FadeRoll
	$('a.faderoll').hover(function(){
		$(this).find('img').stop().fadeTo(100, 0.85);
	}, function(){
		$(this).find('img').stop().fadeTo(300, 1.00);
	});
	
	// FadeRoll
	$('a.faderoll2').hover(function(){
		$(this).find('img').stop().fadeTo(0, 0.85);
	}, function(){
		$(this).find('img').stop().fadeTo(300, 1.00);
	});
	
	// Collapse Menu
	
	// Expand only the active menu, which is determined by the class name
	$(".menu > li > a[@class=expanded] ").find("+ ul").slideToggle("medium");

	// Toggle the selected menu's class and expand or collapse the menu
	$(".menu > li > a").click(function() {
		$(this).toggleClass("expanded").toggleClass("collapsed").find("+ ul").slideToggle("medium");
	});
	
	
});
