( function( $ )
{
	$.fn.resetDefaultValue = function( now )
	{
		return this.each( function()
		{
			var d = this.defaultValue,
				clear = function()
				{
					this.value == d && ( this.value = '' );
				},	
				reset = function()
				{
					this.value == '' && ( this.value = d );
				}
			
			$( this )
				.click( clear )
				.focus( clear )
				.blur( reset );
		});
	}
	
	$( function()
	{
		var menu = $( "div.menu" ),
			lateral = $( "div#lateral" ),
			i = 1,
			geral = $( "#geral" );

		if( window.screen.width == 800 )
			geral.addClass( "screen" );
		
		if( /Macintosh|Darwin|Apple/.test( window.navigator.userAgent ) && $.browser.mozilla  )
			geral.addClass( "mac" );
		
		jQuery( "form#commentform input" ).resetDefaultValue();
		$( "form#commentform input" ).resetDefaultValue();
		$( "#rodape ul li:last" ).addClass( "none" );
		
		/*$( "ul a", menu ).each( function()
		{
			var $this = $( this ),
				parents = $this.parent();
			
			parents.addClass( $this.text().toLowerCase() );
		});*/
	
		$( "form#searchform input", menu ).resetDefaultValue();
	
		// Remove background das ultimas lis de destaque
		$( "div.recentes ul li:last", lateral ).addClass( "ultimo" );
		
		$( "div.banners ul li:odd", lateral ).addClass( "left" );
		
	})
})( jQuery )
