var JSjquery		= "http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js";
//var JSjquery_easy	= "http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js";
var JSjquery_easy	= "/lib/plugin/jquery.easing.1.3.js";
var JSscrollTo		= "/lib/plugin/jquery.scrollTo-min.js";
var JSlocalScroll	= "/lib/plugin/jquery.localscroll-min.js";
var JSserialScroll	= "/lib/plugin/jquery.serialScroll-min.js";
var JScodaslider	= "/lib/plugin/coda-slider/coda-slider.js";
var JSFB			= "http://connect.facebook.net/"+lang+"_"+country.toUpperCase()+"/all.js#xfbml=1";
var JSPO			= "https://apis.google.com/js/plusone.js";

//var CSScodaslider	= "/lib/plugin/coda-slider/coda-slider.css";
/*<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>*/
/*var JSvalidator		= "http://ajax.microsoft.com/ajax/jquery.validate/1.8/jquery.validate.min.js";
var JSvalidatorPlus	= "http://ajax.microsoft.com/ajax/jquery.validate/1.8/additional-methods.min.js";
var JSvalidatorLoc		= "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8/localization/messages_it.js"
var JSJQForm		= "/lib/plugin/jquery.form.js";*/

yepnope({
	load: [JSjquery, JSjquery_easy, JSscrollTo, JSFB],
	callback : function(url, result, key) {
		//console.info(url, result, key);
		window.scrollTo(0, 1);
		switch (key) {
			case "1": $(".new_window").attr({target: "_blank", rel: "nofollow"}); salta(); break;
			case "2": yepnope(JSlocalScroll); yepnope(JSserialScroll); yepnope(JScodaslider); break;
		}
	}
});

function salta() {
	$("#social_network a").mouseenter(function() {
		$(this)
			.animate({top:"21px"}, 200).animate({top:"25px"}, 200) // primo salto
			.animate({top:"23px"}, 100).animate({top:"25px"}, 100) // salto salto
			.animate({top:"24px"}, 100).animate({top:"25px"}, 100); // ultimo salto
	});
}

function printMail(nome, dominio, testo) {
	document.write('<a href=\"mailto:' + nome + '@' + dominio + '\">');
	if (testo=='') {document.write(nome + '@' + dominio)}
	else {document.write(testo)};
	document.write('</a>')
}

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3248724-12']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

