$(document).ready(function(){
	// find the elements to be eased and hook the hover event
	$("div.jimgMenu ul li a").hover(function() {

		// if the element is currently being animated (to a easeOut)...
		if ($(this).is(":animated")) {
			$(this).stop().animate({width: "514px"}, {duration: 450, easing:"easeOutQuad"});
		} else {
			// ease in quickly
			$(this).stop().animate({width: "514px"}, {duration: 400, easing:"easeOutQuad"});
		}
	}, function () {
		// on hovering out, ease the element out
		if ($(this).is(":animated")) {
			$(this).stop().animate({width: "40px"}, {duration: 400, easing:"easeInOutQuad"})
		} else {
			// ease out slowly
			$(this).stop("animated:").animate({width: "40px"}, {duration: 450, easing:"easeInOutQuad"});
		}
	});
	
	// Site search form
	if($("input[name='textfield']").val() != $("input[name='search_default_text']").val() && $("input[name='textfield']").val() != '') 
	{
		$("input[name='textfield']").css({color:"#000000"});
	}
	
	$('#search_form input[name="textfield"]').blur
	(
		function ()
		{
			if($(this).val() == '')
			{
				$(this).css({color:"#A4A7A3"});
				$(this).val($("input[name='search_default_text']").val());
			}
		}
	);
	
	$('#search_form input[name="textfield"]').focus
	(
		function ()
		{
			if($(this).val() == $("input[name='search_default_text']").val()) 
			{
				$(this).val('');
				$(this).css({color:"#000000"});
			}
		}
	);
});

