/*
CSS Browser Selector v0.3.1
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',h=document.getElementsByTagName('html')[0],b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3')?g+' ff3':is('gecko/')?g:/opera(\s|\/)(\d+)/.test(ua)?'opera opera'+RegExp.$2:is('konqueror')?'konqueror':is('chrome')?w+' '+s+' chrome':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);

$(document).ready(function(){
    // toggleText('search', 'cerca nel sito...');
	toggleText('info', 'informazioni');
	$(".entryContainer:nth-child(2) .entry:nth-child(1) .articleContent").addClass("number1");
	$(".entryContainer:nth-child(2) .entry:nth-child(2) .articleContent").addClass("number2");
	$(".entryContainer:nth-child(3) .entry:nth-child(1) .articleContent").addClass("number3");
	$(".entryContainer:nth-child(3) .entry:nth-child(2) .articleContent").addClass("number4");
	$(".entryContainer:nth-child(4) .entry:nth-child(1) .articleContent").addClass("number5");
	$(".entryContainer:nth-child(4) .entry:nth-child(2) .articleContent").addClass("number6");
	$(".entryContainer:nth-child(5) .entry:nth-child(1) .articleContent").addClass("number7");
	$(".entryContainer:nth-child(5) .entry:nth-child(2) .articleContent").addClass("number8");
	$(".entryContainer:nth-child(6) .entry:nth-child(1) .articleContent").addClass("number9");
	$(".entryContainer:nth-child(6) .entry:nth-child(2) .articleContent").addClass("number10");
	$('.readMore a').css("color","#f15523");
	$('#header a').css("color","#FFFFFF");
	$('h1 a, h2 a, h3 a, #cityList a, .menu a, .cityMenu a').css("color","#0c2245");
	$('.readMore a').bind("mouseenter",function(){
		$(this).animate({ 
			color: "#ce4920"
		}, 300 );
	}).bind("mouseleave",function(){
		$(this).animate({ 
			color: "#f15523"
		}, 300 );
	});
	$('#header a[class!=active]').bind("mouseenter",function(){
		$(this).animate({ 
			color: "#f15523"
		}, 300 );
	}).bind("mouseleave",function(){
		$(this).animate({ 
			color: "#FFFFFF"
		}, 300 );
	});
	$('h1 a, h2 a, h3 a, #cityList a, .menu a, .cityMenu a').bind("mouseenter",function(){
		$(this).animate({ 
			color: "#f15523"
		}, 300 );
	}).bind("mouseleave",function(){
		$(this).animate({ 
			color: "#0c2245"
		}, 300 );
	});
	$('a[rel*=facebox]').facebox();
});

function toggleText(p1, p2){
    $('input'+'#'+p1).focus(function () {
        if (this.value == p2) {this.value = '';}
    });
    $('input'+'#'+p1).blur(function () {
        if (this.value == '') {this.value = p2;}
    });
}

jQuery(window).bind("load", function() {
	jQuery("div#articlesWrap").codaSlider()
});