$(document).ready(function(){
	$('#changeLanguage').change (function(){
		document.location = $(this).val();
	});
	
	$("dl.dropdown").hover(function() {
	    $(".dropdown dd ul").show();
	},function() {
	    $(".dropdown dd ul").hide();
	});
	
	$(".dropdown dd ul li a").click(function() {
	    var text = $(this).html();
	    $(".dropdown dt a span").html(text);
	    $(".dropdown dd ul").hide();
	}); 
	$(document).bind('click', function(e) {
	    var $clicked = $(e.target);
	    if (! $clicked.parents().hasClass("dropdown"))
	        $(".dropdown dd ul").hide();
	});

    $(document).ready(function(){
		$('#sidebar .sidebar-content:last').css({backgroundImage:'none'});
    })
});

function getFloat (id)
{
	var i = parseFloat($(id).val());
	if (isNaN(i))
		return 0;
	else if (i<0)
		return 0;
	else
		return i;

}
