/*Inizio News*/
var newsitems;
var curritem=0;
var iPause=0;


$(document).ready(function(){
    var tickerSelector = "ul#ticker li";
    newsitems = $(tickerSelector).hide().hover(
        function(){
            $(this).addClass("hovered");
            iPause=1;
        },
        function(){
            $(this).removeClass("hovered");
            iPause=0;
        }
    ).filter(":eq(0)").show().add(tickerSelector).size();
    setInterval(ticknews,5000); //time in milliseconds
});


function ticknews() {
  if (iPause==0){
    $("#ticker li:eq("+curritem+")").fadeOut("slow",function(){$(this).hide();});
    curritem = ++curritem%newsitems;
    $("#ticker li:eq("+curritem+")").fadeIn("slow");
    }
}

/*$(document).ready(function() {
						   	
if($('#password').val() != null) {
	
$('#password').keyup(function(){$('#result').html(passwordStrength($('#password').val()))})
$('#password').ready(function(){$('#result').html(passwordStrength($('#password').val()))})

}

});
*/
/*Fine News*/
/*Inizio submit animato*/
	function jump_button(oggetto) {
			$(oggetto).children("img")
                .animate({top:"-10px"}, 200).animate({top:"-5px"}, 200) // first jump
                .animate({top:"-7px"}, 100).animate({top:"-5px"}, 100) // second jump
                .animate({top:"-6px"}, 100).animate({top:"-5px"}, 100); // the last jump
        } 
/*Fine submit animato*/

