/////////////////////////////////////////////////
//		Inicializador de JavaScripts
/////////////////////////////////////////////////
jQuery(document).ready(
	function($){
		/////////////////////////////////
		// PNG FIX (IE)
		$(document).pngFix();
		////////////////////////////////
		// FUNCOES PARA O WEBMENU DE CATEGORIAS E LINKS
		$("#webmenu_categ, #webmenu_links, .webmenu_fechar, #favoritos").removeAttr("href");
		$("#webmenu_categ, #webmenu_links").click(
			function(){
				var element = $(this).attr("id");
				if(element == 'webmenu_categ'){
					var other = 'webmenu_links';
				}else{
					var other = 'webmenu_categ';
				}
				//////////////////////////////////////////////
				if($("#"+element+"_box").is(":visible") == true){					
					$("#"+element+"_box").fadeOut();
					$("#webmenu").fadeOut();
					$("#webmenu_back").hide();
					$("#"+element).removeClass('current_web_item');
				}else if($("#"+element+"_box").is(":hidden") == true){
					$("#"+other+"_box").fadeOut('fast');
					$("#webmenu_back").fadeTo("opacity", 0.95);
					$("#webmenu").fadeIn('fast');
					$("#"+element+"_box").fadeIn();
					$("#"+element).addClass('current_web_item');
					$("#"+other).removeClass('current_web_item');
				}
				//////////////////////////////////////////////
			}
		);
		$(".webmenu_fechar").click(
			function(){
				$("#webmenu_categ_box, #webmenu_links_box").fadeOut('fast');
				$("#webmenu").fadeOut('fast');
				$("#webmenu_back").hide();
				$("#webmenu_categ, #webmenu_links").removeClass('current_web_item');
			}
		);
		////////////////////////////////
		// FUNCOES PARA O WEBMENU DE CATEGORIAS E LINKS
		$('.webmenu_meio ul').makeacolumnlists({
				cols:3,
				colWidth:210,
				equalHeight:false,
				startN:1
		});
		////////////////////////////////
		// AJUSTE DE LINK PARA TARGET (_BLANK)
		$('a[href*="http://"]:not([href*="'+location.hostname+'"])').attr('target','_blank');
		////////////////////////////////
		// Scroll to Top
		$("#goTop").scrollToTop();
		////////////////////////////////
		// Scroll to Top
		$("#flybanner").WebScroller();
		$("#fly_full_close").click(
			function(){
				$("#fly_aviso").fadeIn();
				$("#fly_full, #fly_full_close").hide();
			}
		);
		$("#fly_full_open").click(
			function(){
				$("#fly_aviso").hide();
				$("#fly_full, #fly_full_close").fadeIn();
			}
		);
		////////////////////////////////
	}
);
/////////////////////////////////////////////////
/////////////////////////////////////////////////
Cufon.replace('#destaques h1, #sidebar h2, #rodape h1, .single_titulo, .topo_titulo, .page_titulo', {
	fontFamily: 'webartz_diavlo',
	textShadow: '1px 1px #000',
	hover: {
		textShadow: '1px 1px #C00'
	}	
});
Cufon.replace('.post_titulo, #box_comments ul li h1, #box_pingbacks ul li h1, .nopost h1', {
	fontFamily: 'webartz_arial',
	textShadow: '1px 1px #999',
	hover: {
		textShadow: '1px 1px #999'
	}	
});
Cufon.replace('.post_conteudo blockquote', {
	fontFamily: 'webartz_arial',
	textShadow: '1px 1px #FFF',
	hover: {
		textShadow: '1px 1px #FFF'
	}	
});
Cufon.replace('#wp_page_numbers li, .autor_nome, #box_comments ul li h2, #box_pingbacks ul li h2, #box_comments ul li h3, #box_pingbacks ul li h3, #fly_full', {
	fontFamily: 'webartz_arial',
	textShadow: '1px 1px #000',
	hover: {
		textShadow: '1px 1px #000'
	}	
});
Cufon.replace('.post_conteudo h1, .post_conteudo h2, .post_conteudo h3, .post_conteudo h4', {
	fontFamily: 'webartz_arial'
});
Cufon.replace('.comments_titulo, .form_titulo', {
	fontFamily: 'webartz_diavlo',
	textShadow: '2px 2px #000'
});
/////////////////////////////////////////////////
/////////////////////////////////////////////////