( function( $ )
{
	$.browser.msie && $.browser.version == "6.0"
		&& DD_belatedPNG.fix( 'div#header h1, div#header form button, div.navegacao, #content div.img h6, #footer span.top, #footer h2, #footer div.widget_text, form .sendbutton' );
	
	$( function()
	{
		$( ".bt_imprimir button" ).click( function()
		{
			window.print();
			
			return false;
		})
		
		$( "#header form input" ).resetDefaultValue();
		
		$( "#header div.menu li:first" ).addClass( "home" );
		
		$.browser.msie && $.browser.version == "6.0"
			&& DD_belatedPNG.fix( "#header div.menu li.home" )
			
		$( "#content div.main.post div.flickr img, #content div.main.post div.contentPost img" ).each( function()
		{
			$( this ).removeAttr( "height" );
		} );
		
		var more = $( "div.destaque a.more-link" );
		
		$( "div.ultimosFotos img" ).each( function()
		{
			$( this )
				.removeAttr( "height" )
				.removeAttr( "width" );
		});
		
		// TAGS para analitycs
		$( "ul.redesSociais li a" ).click( function()
		{
			pageTracker._trackEvent('menu','redes-sociais','rs-' + $( this ).parent().attr( "class" ) );
		});
		
		$( ".tt-flickr-Thumbnail img" ).click( function()
		{
			pageTracker._trackEvent('galeria','clique', "foto-" + $( this ).parent().attr( "title" ) + "-" + $( this ).parent().attr( "id" ).replace( "photo-", "" ) );
		});
		
		/trackEvent/gi.test( window.location )
			&& pageTracker._trackEvent( $.trim( $( "h2" ).text() ) ,'enviar', 'comentário' );
			
		$( "li.bt_email a" ).click( function()
		{
			email = $( "div.porEmail" );
			
			email.modal(
			{
				closeCallback: function()
				{
					jQuery( "#modal" ).fadeOut();
					email[ 0 ].style.display = "none";
				}
			});
			
			return false;
		})
	});
	
	$.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 )