formatFont = function(){
	Cufon.replace('.menu, #content .block-text h1, .page-content-small h1, #footer, .block h2, #top-contato, .xoxo .textwidget, .textwidget p, .page-content h2, .page-content h3, .page-content h4, .page-content h5, #reply-title, .box-related-page-text h2, .box-related-page-text h3, .box-related-page-text h4, .box-related-page-text h5, .box-related-page-text h6, .entry-title, .post_author, .post_date, #content h3.portfolio-summary-subtitle, #content h2, #content h3, #content h4, #content h5, #content h6, .small-title, .block ul li a, .box-small a, .equipe-nome, a.equipe-email, .case-outro-title, .leia-mais', { fontFamily : "Myriad Pro Regular" , fontWeight: 'normal' });
Cufon.replace('#content h2.portfolio-summary-title, .single #content h2, #content .entry-title, #content .entry-title a, span.green, a.leia-mais.verde', { fontFamily : "Myriad Pro Regular" , fontWeight: 'normal' });
Cufon.replace('#content .page-title h1', { fontFamily : "Myriad Pro Bold Condensed" , fontWeight: 'bold' });
}

formatFont();

jQuery(function()
	{
		jQuery('p.comment-form-author .required, p.comment-form-email .required').each(function(){ jQuery(this).siblings('input').after($(this)); });
		
		jQuery('#menu-menu-principal li').bind('mouseover', function(){ jQuery(this).children('ul').show(); });
		jQuery('#menu-menu-principal li').bind('mouseout', function(){ jQuery(this).children('ul').hide(); });
		
		// pagina de empresa
		if(jQuery('.block-content img').length){
			jQuery('.block-content img').wrap('<div class="block-content-img" />');
			jQuery('.block-content br').remove();
		}
		
		formatFont();
		
		jQuery('#home-content').add('#header').add('#footer').mouseover(function() { jQuery('.navigation-image a').css('visibility', 'hidden'); });
		jQuery('#main_image').add('.navigation-image').mouseover(function() { jQuery('.navigation-image a').css('visibility', 'visible'); });
	}
);

var ngg_gallery_callback_passed = false;
ngg_gallery_callback = function() {
	if(ngg_gallery_callback_passed == false) {
		jQuery('#main_image').after('<div class="navigation-image"></div>');
		jQuery('.navigation-image').append('<a class="gallery-prev" onClick="ngg_gallery_slideshow.cycle(\'prev\');"></a>');
		jQuery('.navigation-image').append('<a class="gallery-next" onClick="ngg_gallery_slideshow.cycle(\'next\');"></a>');
		
		jQuery('#main_image img:eq(0)').click(function (){
			document.location.href = '/qual-e-a-importancia-da-eficiencia-energetica-para-o-planeta';
		}).css('cursor', 'pointer');
		
		jQuery('#main_image img:eq(1)').click(function (){
			document.location.href = '/vitalux-a-10-anos-ajudando-sua-empresa';
		}).css('cursor', 'pointer');
		
		jQuery('#main_image img:eq(2)').click(function (){
			document.location.href = '/por-um-planeta-sustentavel';
		}).css('cursor', 'pointer');
		
		ngg_gallery_callback_passed = true;
	}	
}

/* 
var ngg_gallery_callback_passed = false;
ngg_gallery_callback = function() {
	if(ngg_gallery_callback_passed == false) {
		jQuery('#main_image').after('<div class="navigation-image"></div>');
		count_images = jQuery('.ngg-slideshow img').length;
		
		for(i = 0; i < count_images; i++) {
			item_image = jQuery('.ngg-slideshow img:eq(' + i +')');
			div_item = '<a href="javascript:void(0);" onClick="ngg_gallery_slideshow.cycle(' + i +')" class="navigation-item"></a>';
			jQuery('.navigation-image').append(div_item);
		}
		
		ngg_gallery_callback_passed = true;
	}	
} */
