
function ad(type) {
    var randomico = Math.ceil(20 * Math.random());

	switch (type) {

        case '300x250-home-topo':
			document.writeln(unescape("%3Cscript type='text/javascript'>"));
			document.writeln('GA_googleFillSlot("MCA_Home_Topo_300x250");');
			document.writeln(unescape("%3C/script%3E"));
            break;

        case '300x250-home-baixo':
			document.writeln(unescape("%3Cscript type='text/javascript'>"));
			document.writeln('GA_googleFillSlot("MCA_Home_Baixo_300x250");');
			document.writeln(unescape("%3C/script%3E"));
            break;

        case '300x250-interna-topo':
			document.writeln(unescape("%3Cscript type='text/javascript'>"));
			document.writeln('GA_googleFillSlot("MCA_Interna_Topo_300x250");');
			document.writeln(unescape("%3C/script%3E"));
            break;

        case '300x250-interna-baixo':
			document.writeln(unescape("%3Cscript type='text/javascript'>"));
			document.writeln('GA_googleFillSlot("MCA_Interna_Baixo_300x250");');
			document.writeln(unescape("%3C/script%3E"));
            break;

        case '728x15':
            document.writeln(unescape("%3Cscript type='text/javascript'><!--"));
            document.writeln("google_ad_client = 'pub-7607241971555317';");
            document.writeln("google_ad_slot = '6371701644';");
            document.writeln("google_ad_width = 728;");
            document.writeln("google_ad_height = 15;");
            document.writeln("//-->");
            document.writeln(unescape("%3C/script%3E"));
            document.write(unescape("%3Cscript src='http://pagead2.googlesyndication.com/pagead/show_ads.js' type='text/javascript'%3E%3C/script%3E"));
            break;

        case '728x90-home':
			document.writeln(unescape("%3Cscript type='text/javascript'>"));
			document.writeln('GA_googleFillSlot("MCA_Home_Topo_728x90");');
			document.writeln(unescape("%3C/script%3E"));
            break;
        case '728x90-interna':
			document.writeln(unescape("%3Cscript type='text/javascript'>"));
			document.writeln('GA_googleFillSlot("MCA_Interna_Topo_728x90");');
			document.writeln(unescape("%3C/script%3E"));
            break;
        case '728x90-interna-rodape':
			document.writeln(unescape("%3Cscript type='text/javascript'>"));
			document.writeln('GA_googleFillSlot("MCA_Interna_Rodape_728x90");');
			document.writeln(unescape("%3C/script%3E"));
            break;
        case 'menu-lateral':
			//document.writeln(unescape('<div class="item pubmenu"><a href="http://goo.gl/3VRoC" target="_blank">Amostras Grátis</a><br>Solicite a sua agora mesmo</div>'));
            break;
        case 'ultradownloads':
			//document.writeln(unescape('<iframe src="http://ultradownloads.com.br/vitrine_ciasoft_iframe.php?vt=6&bgc=ffffff" framespacing="0" frameborder="no" scrolling="no" width="140" height="170"></iframe>'));
            break;
    }
}

function suggest() {

	/*
	document.writeln("<div>");
	document.writeln(unescape("%3Cscript type='text/javascript'>"));
	document.writeln('var linkwithin_site_id = 1087889;');
	document.writeln(unescape("%3C/script%3E"));
	document.write(unescape("%3Cscript src='http://www.linkwithin.com/widget.js' type='text/javascript'%3E%3C/script%3E"));
	document.writeln('<a href="http://www.linkwithin.com/"><img src="http://www.linkwithin.com/pixel.png" alt="Related Posts Plugin for WordPress, Blogger..." style="border: 0" /></a>');
	document.writeln("b</div>");
	*/

	/*
	document.writeln("<div>");
	document.writeln(unescape("%3Cscript type='text/javascript'>"));
	document.writeln("var OB_langJS = 'http://widgets.outbrain.com/lang_bp.js'; var OBITm = '1326891291682';var OB_raterMode = 'none';var OB_recMode = 'strip';");
	document.writeln("var OutbrainPermaLink='"+document.location.href+"';");
	if ( typeof(OB_Script)!='undefined' )OutbrainStart(); else { var OB_Script = true; var str = unescape("%3Cscript src=\'http://widgets.outbrain.com/OutbrainRater.js\' type=\'text/javascript\'%3E%3C/script%3E"); document.write(str); }
	//document.writeln("if ( typeof(OB_Script)!='undefined' )OutbrainStart(); else { var OB_Script = true; var str = unescape('%3Cscript src=\'http://widgets.outbrain.com/OutbrainRater.js\' type=\'text/javascript\'%3E%3C/script%3E'); document.write(str); }");
	document.writeln(unescape("%3C/script%3E"));
	document.writeln("a</div>");
	*/
	
}


//MODAL 640x400
$(document).ready(function(){
	$.fn.abrirpop = function(){
		$('#pp').fadeIn();
		var margintop = ($('#pp').height() + 20) / 2;
		var marginleft = ($('#pp').width() + 20) / 2;
		$('#pp').css({ 
			'margin-top' : -margintop,
			'margin-left' : -marginleft
		});
		
		$('body').append('<div id="fundo2"></div>'); 
		$('#fundo2').css({'filter' : 'alpha(opacity=80)'}).fadeIn();
		
	};

	var wl=document.location.href;
	if(wl.match("/([a-zA-Z0-9_-]+/)?[a-zA-Z0-9_]+.htm"))
	//if(wl.match("/frases_bonitas.htm"))
	{
		if ($.cookie("cookiemca")!="pop")
		{
			$.cookie("cookiemca", "pop", { expires: 1 });
			setTimeout(function(){ $(this).abrirpop(); }, 10000);
			
		}
		//$(this).abrirpop();
		//$.cookie("meucookie", null);
		//document.write($.cookie("meucookie123"));
	}
	
	$('a.close, #fundo2').live('click', function() { 
		$('#fundo2 , #pp').fadeOut(); 
		$('#fundo2').remove();
		return false;
	});

	// TOOLTIP PAGINATION
	$('.pagination.tooltip span').append('<strong>Quer ver mais mensagens?</strong><br>Utilize a navegação abaixo');
	setTimeout(function(){ $('.pagination.tooltip span').remove(); }, 15000);


	// SCROLL ANCHOR
    if (window.location.hash != "")
	{
		$e=$('#'+window.location.hash.substring(2));
		$('html,body').animate({scrollTop:$e.offset().top-100}, 1000);
		$e.css('background-color','#eee');
	}

});






