$(function(){
	/*
setInterval(function(){
		var style = $("link[rel=stylesheet]:first");
		var href = style.attr("href");
		style.attr("href", href+"?rn="+Math.floor(Math.random()*1100));
		
	}, 1000);
*/

Cufon.replace("h1, h2, h3, .featured-entry span, .featured-entry em", {
        hover : true
    });

/* Img Border for Firefox */
if($.browser.mozilla){
	$('.post img:not(.entry img, img.biglietteria, .post-slug-biglietteria img, .fscreen-gallery img), .latest-post img, .featured .thumb img').after("<span class='moz-image-border'></span>");
	$('.moz-image-border').each(function(){
		var thespan = $(this);
		var theimg = $(this).prev();
		theimg.load(function(){
			var w = theimg.css("width");
		if(!w){
			w = theimg.width();
			var h = theimg.height();
		}else{
			var h = theimg.css("height");
		}
		thespan.width(w).height(h).css({"backgroundImage" : "url('"+theimg.attr("src")+"')", display : "block"});
		theimg.remove();
		});
	});
}

$('.section-navigation li:has(ul)').addClass('has-children');
if($.browser.version < 8){
    if($.browser.msie){
        DD_roundies.addRule('.featured, .thumb img, .featured-details ul, .module h4, .module-table, .module-title, .calendar', '5px');
    }
}
//$('.fscreen-box img').gallerizr();
$(".fullscreen").click(function(){
//    $(".fscreen-box").appendTo("body");
//    $(".galleria_wrapper").height($("window").height());
//    $('ul.fscreen-gallery').galleria();
//    $(".close").click(function(){
//        $(".fscreen-box").appendTo(".gallery-page");
//    });
    $('.fscreen-box a').gallerizr();
});
//DD_roundies.addRule('#top form input.text', '20px');
//DD_roundies.addRule('.go-to-post', '10px');

});