/* ------------------------------------------- /
	Fun¨›es Principais
	Sgobin Studio
	
	Autor: Richard Sgobin
	
	Use esse arquivo para apreender, mas n‹o copie
	e se copiar cite a fonte.

	(CC)
/ ------------------------------------------- */

// Altera cor do link na pagina atual
// Altera cor do link na pagina atual
function paginaAtual() {
    var loc = window.location.toString().split("/")
    loc = loc[loc.length - 1]
    $("ul#nav li a[href=\"" + loc + "\"]").addClass("ativo");
};

function paginaAtualMenu(menu) {
    $("ul#nav li a[href=\"" + menu + ".aspx\"]").addClass("ativo");
};


// Hover sobre os box da homepage
function hoverBoxHome() {
	var caixas = $(".box-home");
	
	caixas
	
	.hover(function() {
		   $(this)
				.addClass("box-hover")
		}, function() {
		   $(this)
				.removeClass("box-hover")
		})
		
	.click(function() {
			window.location = $(this).find("a").attr("href");
		});
};

// Equaliza Altura das colunas 
function equalizarColunas() {
	
	var altura = ($('#conteudo').height()) - 50;
	
	$('#sidebar-content').css({'height': altura});
	
}

//BG on Focus Forms
function bgFocus() {
	$(".form-contato input").focus(function() {
		$(this).parent().addClass("bg-on-focus")
	});
	$(".form-contato input").blur(function() {
		$(this).parent().removeClass("bg-on-focus")
	});
};

//Google Maps
function initialize() {
    var latlng = new google.maps.LatLng(-23.583357, -46.670738);
    var myOptions = {
      zoom: 19,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.HYBRID
    };
    
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    
    var icone = 'imagens/icone-mapa.png';
    var marker = new google.maps.Marker({
      position: latlng, 
      map: map,
      icon: icone, 
      title:"Master Minds Capital"
  });
   
};

// Hover sobre os box de noticias
function hoverBoxArticle() {
	var caixas = $("ul.lista-news li");
	
	caixas
	
	.hover(function() {
		   $(this)
				.addClass("box-hover")
		}, function() {
		   $(this)
				.removeClass("box-hover")
		})
		
	.click(function() {
			window.location = $(this).find("a").attr("href");
		});
};
