$(document).ready(function(){

	if($.browser.msie && $.browser.version < 7) {
		// Con IE6 il bordo destro è disallineato
		var w = $('.roundCorner4').width() - 2;
		$('.roundCorner4').wrapInner('<div style=\'width:'+w+'px;\'><div style=\'margin:1px 0 1px 1px;\'></div></div>');
		w = $('.roundCorner6').width() - 6;
		$('.roundCorner6').wrapInner('<div style=\'width:'+w+'px;\'><div style=\'margin:3px 0 3px 3px;\'></div></div>');
	} else {
		// IE fix per curvycorners: http://seanmccullough.ca/blog/?p=15
		$('.roundCorner4').css('padding', '0 1px').corner({
			tl: { radius: 4 },
			tr: { radius: 4 },
			bl: { radius: 4 },
			br: { radius: 4 },
			antiAlias: true,
			autoPad: true
		});
		$('.roundCorner6').css('padding', '0 4px').corner({
			tl: { radius: 6 },
			tr: { radius: 6 },
			bl: { radius: 6 },
			br: { radius: 6 },
			antiAlias: true,
			autoPad: true
		});
	}
/*
	var oldBg = $('.admin-message').eq(0).css('backgroundColor');
	$('.admin-message').animate({backgroundColor:'#2d2d2d'}, 1000)
		.animate({backgroundColor:oldBg}, 1000)
		.animate({backgroundColor:'#2d2d2d'}, 1000)
		.animate({backgroundColor:oldBg}, 1000);
*/
	$('.clickExpand').css('cursor', 'pointer')
		.click(function(){
		    // Lo .slideToggle() non funziona correttamente in IE8
			if($.browser.msie) {
				$(this).children('div').toggle($(this).children('div').css('display') == 'none');
			} else {
				$(this).children('div').slideToggle('slow');
			}
		})
		.children('div').hide();

});
