$(document).ready(function(){
    $("#content #cnt").hide();
    $("#content #cnt").show('slide', {direction: 'left'}, 1000);
    $('.reflected').vflection({
      color:"#1c9cc0",
      parent: 'div',
      height: 15,
      darkness: 20,
      opacity: 40
    });
    $("#slider ul li a").append("<div>&nbsp;</div>"); //Only shows drop down trigger when js is enabled - Adds empty span tag after ul.subnav
    $('#slider').cycle({
		fx:     'scrollHorz',
	    timeout: 5000,
	    prev: '.previous',
		next: '.next'
	});
	$(".galleria").colorbox({transition:"fade"});
	$(".ajnews").colorbox({width:"80%", height:"80%"});
    jQuery("a[rel='external']").each(function(i){
    	if (typeof jQuery(this).attr('title') == "undefined" )
    		jQuery(this).attr('title',jQuery(this).attr('href')+' (apre in nuova finestra)');
    	else
    		jQuery(this).attr('title',jQuery(this).attr('title')+' (apre in nuova finestra)');
    	jQuery(this).append('<span class="external" title="'+jQuery(this).attr('title')+'"></span>').click(function(){
    		window.open(jQuery(this).attr('href')); return false;
    	});
    });
    $('.sximg').cycle({
		fx:     'fade',
	    timeout: 3000,
	    prev: '.previous',
		next: '.next'
	});
    $('.newsimg').cycle({
		fx:     'fade',
	    timeout: 2000,
	    prev: '.previous',
		next: '.next'
	});
    $( "input:submit").button();
    $( "button").button();
});
