$(document).ready(function() {
	$('.inputField').focus(function () { 
		$(this).attr("value", ""); 
		$(this).html(""); 	
		$(this).animate({
			borderColor:'#CCCCCC'
     	 }, 500 );
	});
	$('.inputField').blur(function () { 	
   		$(this).animate({
			borderColor:'#201F1E'
     	 }, 500 );
	});
	
	$('.staffMember:last').addClass('bottom');
	
	$('#gallery a').each(function(index) {
    if ((index+1) % 4 ==0) {
      $(this).addClass("last");
    }
  });

});

Shadowbox.init({   
    players: ["img","html"]
});


// Read a page's GET URL variables and return them as an associative array.
function getUrlVars() {
	var vars = [], hash;
	var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
	for(var i = 0; i < hashes.length; i++)
	{
		hash = hashes[i].split('=');
		vars.push(hash[0]);
		vars[hash[0]] = hash[1];
	}
	return vars;	
}
	
	
window.onload = function(){
    getUrlVars;
	if (getUrlVars()["SENT"] == "TRUE") {
		 Shadowbox.open({ 
			content:    '<div style="margin:20px auto; text-align:center">Mail inviata con successo</div>',
			player:     "html",
			title:      "",
			height:     160,
			width:      300
     	}); 
	}
	
	
	var ie55 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 5.5") != -1);
	var ie6 = (navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) == 4 && navigator.appVersion.indexOf("MSIE 6.0") != -1);

if (jQuery.browser.msie && (ie55 || ie6)) {
	Shadowbox.open({ 
		content:    '<div style="margin:20px auto; text-align:center; padding:0 20px">Il browser in uso &egrave; Internet Explorer 6 o inferiore. <br />Per una corretta visualizzazione del sito <a href="http://www.microsoft.com/italy/windows/internet-explorer/default.aspx" target="_blank" style="color:#BF1D03; text-decoration:none" >aggiornare</a> il browser a una versione superiore o utilizzare Mozilla Firefox.</div>',
		player:     "html",
		title:      "",
		height:     160,
		width:      200
	}); 
}
};






