
J(document).ready(function () {
							
	//Top bar menu
	J("#top_menu_bar ul li").hover(function() {
		J(this).css({ 'background' : '#B73075'});
		J(this).find("span").show();
	} , function() { 
		J(this).css({ 'background' : 'none'}); 
		J(this).find("span").hide();
	});
							
	// Sliding sidebar menu
  J('#subMenu > ul > li > a').click(function(){
    if (J(this).attr('class') != 'active'){
      J('#subMenu ul li ul').slideUp();
      J(this).next().slideToggle();
      J('#subMenu ul li a').removeClass('active');
      J(this).addClass('active');
    }else{
		J('#subMenu ul li ul').slideUp();
		J('#subMenu ul li a').removeClass('active');
	}
  });
  
  J('#fonseca > p.squareLink > a').click(function(){
	J('#franklim').slideDown(1000);
	J('#fonseca').slideUp(1000);
  });
  
  J('#franklim > p.squareLink > a').click(function(){
	J('#fonseca').slideDown(1000);
	J('#franklim').slideUp(1000);
  });
  
  if (pagina == 'historia'){
 	J("#controllerPresiden").jFlow({
            slides: "#slidesPresiden",
            width: "649px",
            height: "92px"
    });
  }else{
	J("#controller").jFlow({
            slides: "#slides",
            width: "672px",
            height: "225px"
    });
  }
});

// Share on Twitter
function twitter(){
	u=location.href;
	t=document.title;
	window.open('http://twitter.com/intent/tweet?text='+encodeURIComponent(t)+'&url='+encodeURIComponent(u)+'&via=bandasilvalde&related=bandasilvalde','sharer','toolbar=0,status=0,width=626,height=436');
}

// Share on Facebook
function facebook() {
	u=location.href;
	t=document.title;
	window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
}

// Share by email
function email() {
}

