$(document).ready(function(){
	
	$(document).pngFix();
	theRotator();
	
	var volatile = $(".field input")
    volatile.focus(function(event){
        if ($(this).val() == $(this).attr("title") ){        
            $(this).val("");
        }}, volatile.blur(function(event){
            if ($(this).val() == "" ){        
                $(this).val($(this).attr("title"));
            }
        }
    ));
	
	$(".field select").sexyCombo({
	});
	
});

function theRotator() {
	$('.latestNews ul li').css({opacity: 0.0});
	$('.latestNews ul li').css('display', 'none');
	$('.latestNews ul li:first').css('display', 'inline').css({opacity: 1.0});
	setInterval('rotate()',6000);
}

function rotate() {	
	var current = ($('.latestNews ul li.show')? $('.latestNews ul li.show') : $('.latestNews ul li:first'));
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('.latestNews ul li:first') :current.next()) : $('.latestNews ul li:first'));	
	next.css('display', 'inline');
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);
	current.css('display', 'none');
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
};

