( function( $ )
{
	$( function()
	{
		var destaques = $( "div.destaques" ),
			destaque = $( "div.posts", destaques ),
			box = $( "div.box" ),
			abas = $( "ul.abas", box ),
			container = $( "> div", box );
			
		Cufon.replace( "body.home h2, #footer h2" );
		
		// DESTAQUE
		destaque.cycle(
		{
			fx: "fade",
			prev: ".anterior",
			next: ".proxima",
			pager: "div.navegacao ul",
			timeout: 5000
		});
		
		$( "button.pausar", destaques ).click( function()
		{
			destaque.cycle( "pause" );
			return false
		});
		
		$( "#header form input, div.comentar input" ).resetDefaultValue();

		// ABAS
		$( "li a ", abas ).click( function()
		{
			var $this = $( this ),
				parent = $this.closest( "li" );

			if( parent.is( ".ativo" ) )
				return false;

			parent
				.addClass( "ativo" )
				.siblings( ".ativo" ).removeClass( "ativo" );

			container.filter( "div." + parent.attr( "class" ).replace( /ativo/gi, "" ) )
				.fadeIn( function()
				{
					$( this ).addClass( "ativo" )
				})
				.siblings( ".ativo" )
					.hide()
					.removeClass( "ativo" );

			return false;
		});
		
		var commentsList = $( "div.commentsList" );
		
		if( commentsList.length )
		{
			commentsList.addClass( "ativo" );
			
			$( "h2", commentsList ).click( function()
			{
				var $this = $( this ).parent();
				
				$this.find( "div" ).slideToggle( function()
				{
					$this.toggleClass( "ativo" )
				});
				
				console.error( $this );
				
				$this.siblings( ".ativo" ).removeClass( "ativo" ).slideUp();
			})
		}
		
		var block = $( "div.comentar div.block" );
		
		block.length && block.is( ":hidden" )
			&& $( "div.respondTit h3" ).click( function()
			{
				block.slideDown();
			})
	})
	
	/**
	 * jQuery resetDefaultValue plugin
	 * @version 0.9.1
	 * @author Leandro Vieira Pinho 
	 */
	$.fn.resetDefaultValue = function()
	{
		function _clearDefaultValue() {
			var _$ = $(this);
			if ( _$.val() == this.defaultValue ) { _$.val(''); }
		};
		function _resetDefaultValue() {
			var _$ = $(this);
			if ( _$.val() == '' ) { _$.val(this.defaultValue); }
		};
		return this.click(_clearDefaultValue).focus(_clearDefaultValue).blur(_resetDefaultValue);
	}
})( jQuery )

$.browser.msie && $.browser.version && "6.0" && DD_belatedPNG
	&& DD_belatedPNG.fix( 'div#header h1 a, #header div.meio, #header .bt_twitter a, #header div.menu, #header div.menu a, #header div.menu ul, #header div.menu li, #header div.meio p.sebrae, #header div.meio form, #header div.meio h2, #header div.meio a.rss, #content, #footer, #footer h2, #footer li, #footer span.bottom, #content div.tvSebrae ul span' );