// jQuery Start
jQuery(document).ready(function() {

	//Home
	jQuery('.post').each(function(e){
		var jQueryelem = jQuery(this).find('p:eq(0):not(:has(img))');
		if (jQueryelem) {
			jQueryelem.prev().prev().css({height: '90px'});
		};
	});

	//Sidebar
	jQuery('#mainbar .widgets .widget_recent_entries h3').each(function(){
		var txt = jQuery(this).text();
		txt = txt.replace('Posts','<strong>Posts</strong>')
		jQuery(this).html(txt);
	});
	
	jQuery('#mainbar .widgets .widget_links h3').each(function(){
		var txt = jQuery(this).text();
		txt = txt.replace('DivaDiz','<strong>DivaDiz</strong>')
		jQuery(this).html(txt);
	});
	
	jQuery('#mainbar .widgets .widget_search h3').remove();
	
	jQuery('#mainbar .widgets .search input')
	.bind('focus',function(){
		if( jQuery(this).val() == 'pesquise:' ) jQuery(this).val('');
	}).bind('blur',function(){
		if( jQuery(this).val() == '' ) jQuery(this).val('pesquise:');
	});

	jQuery('#mainbar .widgets').css({visibility: 'visible', display: 'block'});

	//Footer
	jQuery('#footerbg .subnavbar').css({width: jQuery('#wrap').offset().left+jQuery('#content').outerWidth(true)+60 })

	jQuery('#footerbg .sideblock ul li').each(function(e){
		jQuery(this).addClass('l'+e);
		jQuery(this).find('a:last').addClass('font');
		var texto = jQuery(this).find('a:last').text();
		if(texto.length >= 35) {
			texto = texto.substring(37,0);
			jQuery(this).find('a:last').text(texto+'...');
		}
	});
	
	jQuery('.wp-pagenavi').each(function(){
		jQuery(this).find('a:contains(next)').addClass('next');
		jQuery(this).find('a:contains(previous)').addClass('previous');
		jQuery(this).find('a.first').remove();
		jQuery(this).find('a.last').remove();
	});

// jQuery End
});