function marcar() {
	//$("a.marca").click(function(){
	//	$("a.marca").attr("style","background:#ffffe0 url(imgs/bot_laranja.gif) no-repeat 0 0;")
	//	$(this).attr("style","background:#ffffe0 url(imgs/bot_verde.gif) no-repeat 0 0;")
	//});		
}
function carregaFlash() {
	//-- carrega flas
	$("#top_home").html(objSWF("temporizador","779","275"));
/*	$(".portifolio").html(objSWF("portifolio","779","165"));
	$(".sobre").html(objSWF("sobre","779","165"));
	$(".solucoes").html(objSWF("solucoes","779","165"));
	$(".trabalhe").html(objSWF("trabalhe","779","165"));
	$(".contato").html(objSWF("contato","779","165"));
	$(".mapa").html(objSWF("contato","779","165"));*/
	// --
}
//jquery history
function pageload(hash) {
		// hash doesn't contain the first # character.
		if(hash) {
			// restore ajax loaded state`
			arID = hash.split("=")
			//alert(arID[2])
			//$("a.marca").attr("style","background:#ffffe0 url(imgs/bot_laranja.gif) no-repeat 0 0;")
			//$("#marca"+arID[2]).attr("style","background:#ffffe0 url(imgs/bot_verde.gif) no-repeat 0 0;")
			$("a.marca").removeClass("marcado")
			$("#marca"+arID[2]).addClass("marcado")
			$("#coluna_direita").load(hash);
		} else {
			// start page
//			$("#conteudo").empty();
		}
	}
	
$(document).ready(function(){
	$.historyInit(pageload);
	$("a[@rel='history']").click(function(){
		id = $(this).attr("href")
		arID = id.split("&")		
		hash = "controlador.php?session=portifolio_det&"+arID[1]
		$.historyLoad(hash);
		return false;
	});


	$("a[@rel='history2']").click(function(){
		id = $(this).attr("href")
		arID = id.split("&")		
		hash = "controlador.php?session=solucoes_det&"+arID[1]
		$.historyLoad(hash);
		return false;
	});
	// - marca conteudo
	marcar();
	// -
	// - carrega flash
	carregaFlash()
	// -
	
	// - EVENTOS APOS AJAX
	$("#conteudo").ajaxComplete(function() {
		marcar(); // - MARCA SESSÃO
		carregaFlash(); // - CARREGA FLASH
	});
	// - 
	


});
	
	//-- fim jquery history -- //
	
	// -- altera o estilo do input (botão) de upload de arquivos -- //
	$(document).ready(function(){
		$("input[type=file]").filestyle({ 
		image: "imgs/bg_enviar_curriculo.gif",
		imageheight : 30,
		imagewidth : 72,
		width : 245
		});
	});
	// --

$(document).ready(function(){
// HOME - limpa os inputs do cadastre-se quando os inputs tem foco
	$("#demonstracao label input").focus(function(){
	  /* $(this).val("");*/
	   texto=$(this).val();
	   $(this).attr("title",texto);
	   if(texto=="Seu nome" || texto=="Seu e-mail"){
	   $(this).val("");
	   };
	   return false;
	 });
	 $("#demonstracao label input").blur(function(){
	  /* $(this).val("");*/
	   texto=$(this).val();
	   if(texto==""){
	   $(this).val($(this).attr("title"));
	   };
	   return false;
	 });
	 
	 //--
	 

	 
// TRABALHE CONOSCO - Controla os radio buttons das habilidades PHP, ASP, etc...
$('form.form_curriculo fieldset.habilidades input#php').click(function(){
	   $('div#formata_php').toggle();		   
	 });	
	
	$('form.form_curriculo fieldset.habilidades input#asp').click(function(){
	   $('div#formata_asp').toggle();		
	 });
	
	$('form.form_curriculo fieldset.habilidades input#javascript').click(function(){
	   $('div#formata_javascript').toggle();		
	 });
	
	$('form.form_curriculo fieldset.habilidades input#flash').click(function(){
	   $('div#formata_flash').toggle();		
	 });
	
	$('form.form_curriculo fieldset.habilidades input#css').click(function(){
	   $('div#formata_css').toggle();		
	 });
	
	$('form.form_curriculo fieldset.habilidades input#design').click(function(){
	   $('div#formata_design').toggle();		
	 });
});

//CONTATO - ENVIO POR AJAX
// prepare the form when the DOM is ready 
$(document).ready(function() { 
    //AUTO TAB
	$('#prefixo_fone').keyup(function(){ 
		//alert($(this).val());
		valor = $(this).val()
		tm = valor.length
		//alert(tm)
		if (tm >= 2) {
			$("#fone").focus();
		}
	});
	
	
	
	
	//AUTO TAB

	var options = { 
        target:        '#alerta_contato',   // target element(s) to be updated with server response 
        beforeSubmit:  showRequest_contato,  // pre-submit callback 
        success:       showResponse_contato  // post-submit callback 

    }; 
 
    // bind form using 'ajaxForm' 
    $('#form_contato').ajaxForm(options); 
}); 
 
// pre-submit callback 
function showRequest_contato(formData, jqForm, options) { 
    var queryString = $.param(formData); 
    return true; 
} 
 
// post-submit callback 
function showResponse_contato(responseText, statusText)  { 
	$('#alerta_contato').css("display", "block");
	//Mensagem enviada com sucesso!
	resposta = $('#alerta_contato').html()
	if (resposta=="Mensagem enviada com sucesso!") $('#form_contato').resetForm();
} 

//FORM TRABALHE CONOSCO - ENVIO POR AJAX
// prepare the form when the DOM is ready 
$(document).ready(function() { 
    var options = { 
        target:        '#alerta_trabalhe',   // target element(s) to be updated with server response 
        beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse  // post-submit callback 
    }; 
 
    // bind form using 'ajaxForm' 
    $('#form_curriculo').ajaxForm(options); 
}); 
 
// pre-submit callback 
function showRequest(formData, jqForm, options) { 
    var queryString = $.param(formData); 
    return true; 
} 
 
// post-submit callback 
function showResponse(responseText, statusText)  { 
	$('#alerta_trabalhe').css("display", "block");
	resposta = $('#alerta_contato').html()
	if (resposta=="Mensagem enviada com sucesso!") $('#form_curriculo').resetForm();
	
} 

//--
<!--GOOGLE MAPS-->

//<![CDATA[
pubGoogleIcon = function() {
	var icon = new GIcon();
	icon.image = "http://maps.google.com/mapfiles/kml/pal3/icon21.png";
	icon.shadow = "http://maps.google.com/mapfiles/kml/pal3/icon21s.png";
	icon.iconSize = new GSize(32, 32);
	icon.shadowSize = new GSize(56, 32);
	icon.iconAnchor = new GPoint(6, 20);
	icon.infoWindowAnchor = new GPoint(5, 1);
	icon.infoShadowAnchor = new GPoint(6, 20);
	return icon;
}


function load() {
  if (GBrowserIsCompatible()) {

	var map = new GMap2(document.getElementById("map"));
	
	map.addControl(new GLargeMapControl());
	map.addControl(new GMapTypeControl());

	var icon = new pubGoogleIcon();
	
	var pt = new GLatLng(-20.54316502876386,-47.41070508956909);
	map.setCenter(pt, 13);
	//map.setMapType(G_HYBRID_MAP);
	var marker = new GMarker(pt, icon);
	map.addOverlay(marker);
	
var myHtml = "<b>Visualcom Ag&ecirc;ncia de Internet</b><br/>Rua Ituverava, 566<br/>Jardim Francano";
	map.setCenter(new GLatLng(-20.54316502876386,-47.41070508956909), 17);
	        map.openInfoWindow(map.getCenter(),myHtml)

						   
  }
}

//]]>



/*$(document).ready(function(){
    
    $("ul.menu li a").click(function () {
      $("body").css("background","#ffffe0 url(imgs/bg_curto.jpg) repeat-x 0 0");
    });

  });*/



 