//	www.lucazaccaro.it	//
//	versione 4.2.0		//
//	10/07/2011			//
var check = 1;
var block = 0;
$(document).ready(function() {
	$("a#linkHome").click(function () {
		block = 1;
	});
	$("a#linkTwitter").click(function () {
		block = 1;
		window.open('http://twitter.com/#!/lucazaccaro','blank');
	}); 
	$("a#linkFacebook").click(function () {
		block = 1;
		window.open('http://www.facebook.com/lucazaccaro','blank');
	}); 
	$("div#titleBar").click(function () {
		if(check == 0){
			if (block == 0)
			{
				check = 1;
				$("div#titleButton").removeClass('divAdd');
				$("div#titleButton").addClass('divMinus');
				$("div#aboutBar").show("slow");
			}
		}
		else if (check == 1) {
			if (block == 0)
			{
				check = 0;
				$("div#titleButton").removeClass('divMinus');
				$("div#titleButton").addClass('divAdd');
				$("div#aboutBar").hide("slow");	
			}			
		}
		block = 0;
	}); 
	$('#blogBar').mouseover(function(){
		$(this).removeClass('mouseOut');
		$(this).addClass('mouseOver');
	});
	$('#blogBar').mouseout(function(){
		$(this).removeClass('mouseOver');
		$(this).addClass('mouseOut');
	});
	$('#blogBar').click(function(){
		window.open('http://www.lucazaccaro.it/blog','blank');
	});
	$('#newsBar').mouseover(function(){
		$(this).removeClass('mouseOut');
		$(this).addClass('mouseOver');
	});
	$('#newsBar').mouseout(function(){
		$(this).removeClass('mouseOver');
		$(this).addClass('mouseOut');
	});
	$('#newsBar').click(function () {
		window.location.href = "news.php";
	});
	$('#labsBar').mouseover(function(){
		$(this).removeClass('mouseOut');
		$(this).addClass('mouseOver');
	});
	$('#labsBar').mouseout(function(){
		$(this).removeClass('mouseOver');
		$(this).addClass('mouseOut');
	});
	$('#labsBar').click(function () {
		window.location.href = "projects.php";
	});
	$('#linkBar').mouseover(function(){
		$(this).removeClass('mouseOut');
		$(this).addClass('mouseOver');
	});
	$('#linkBar').mouseout(function(){
		$(this).removeClass('mouseOver');
		$(this).addClass('mouseOut');
	});
	$('#linkBar').click(function () {
		window.location.href = "contatti.php";
	});
	/*$('#blogBar').qtip({
      content: '<img src="images/omnia_logo.png" alt="Omnia - Uno sguardo sul mondo" />'
   	});*/
});
