$(function() 
{

	/* MENUS - SWITCH AMONG THEM */
		
	$(".underneath").live('click', function(event)
	{
		$(".menu").removeClass("displayed");
		$(".menu").addClass("underneath");
		$(this).hide();
		$(this).appendTo("#menus");
		$(this).removeClass("underneath");
		$(this).addClass("displayed");
		$(this).show("puff", { 
			percent: 200 
		}, 500);
	});	

	/* MENUS - MOUSEOVER ACCORDION TO REVEAL AND HIDE EACH TEASER */

	$("#menus .inactive h3").hoverIntent(function()
	{$(this).next("p").slideDown(150);},
	function()
	{
	}
	);

	$("#menus .inactive").bind("mouseleave", function(e)
	{$(this).children("p").slideUp(150);}
	);

	/* MENUS - CLICK AN ENTRY */

	$("#menus p, #menus h3").bind("click", function(e)
	{
		$(this).show("shake", { 
			distance: 5 
		}, 150 );
	});

	// TESTIMONIALS SLIDER

	$("#nuggets").easySlider({
		auto: true,
		continuous: true,
		controlsShow: false
	});

	// SCROLL BACK TO TOP
	
	$.localScroll();
	
	// FROM MONO TO COLOR
	
	$('.illustration').hoverIntent(function()
	{
		$("#color-image").fadeTo('fast', '1');
	},
	function()
	{
		$("#color-image").fadeTo('fast', '0.01');
	}
	);
	
	$('#username').focus(function()
	{
		if ( $(this).val() == "Your username" )
		{$(this).val('');}
	});
	
	if ( $("#username").val() == "" )
	{
		$("#username").val('Your username');
	}

	$('#password').focus(function()
	{
		if ( $(this).val() == "Your password" )
		{$(this).val('');}
	});
	
	if ( $("#password").val() == "" )
	{
		$("#password").val('Your password');
	}
	

});
