/*
	Script: common.js
	Applicazione: MIC
	Versione: 2.00
	Data: 07/09/2011
	Scopo: Funzionalita' di animazione JavaScript
*/
$('document').ready(function() {
	$('a.slb').lightBox({imageLoading: 'http://www.micfaenza.org/images/lightbox-ico-loading.gif', imageBtnClose: 'http://www.micfaenza.org/images/lightbox-btn-close.gif', imageBlank: 'http://www.micfaenza.org/images/lightbox-blank.gif', imageBtnPrev: 'http://www.micfaenza.org/images/lightbox-btn-prev.gif', imageBtnNext: 'http://www.micfaenza.org/images/lightbox-btn-next.gif'});
	$('input[title], textarea[title]').each(function() {
		var strTitle = $(this).attr('title');
		if ($(this).val() == '')
			$(this).addClass('placeHolder').val(strTitle);
		$(this).focus(function() {
			strTitle = $(this).attr('title');
			if (this.value == strTitle)
				$(this).removeClass('placeHolder').val('');
		}).blur(function() {
			strTitle = $(this).attr('title');
			if ($.trim(this.value) == '')
				$(this).addClass('placeHolder').val(strTitle);
			else
				$(this).removeClass('error');
		});
	});
	$('.calendar ul').hide();
});

WebFont.load({
	custom: {
		families: [ 'Judson' ],
		urls: ['css/font-face.css']
	}
});

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11287066-2']);
_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);
})();
