$(function() {		
	
	//dropdown select menu	
            $(".dropdown dt a").click(function() {
                $(".dropdown dd ul").toggle();
            });
                        
            $(".dropdown dd ul li a").click(function() {
                var text = $(this).html();
                $(".dropdown dt a span").html(text);
                $(".dropdown dd ul").hide();
                $("#result").html("Selected value is: " + getSelectedValue("sample"));
            });
                        
            function getSelectedValue(id) {
                return $("#" + id).find("dt a span.value").html();
            }

            $(document).bind('click', function(e) {
                var $clicked = $(e.target);
                if (! $clicked.parents().hasClass("dropdown"))
                    $(".dropdown dd ul").hide();
            });
	
	//toggle menu
	$("#nav-expanded").hover(function () {
		$("#nav-expanded ul").fadeToggle("fast, linear");
	});
	
	if ($.browser.msie && $.browser.version < 8) return;
	
	//jQueryColor/*
	$('#book li a').hover(
	function () {$(this).stop().animate({paddingLeft: 80, paddingRight: 15, backgroundColor: "rgba(166,193,46, 0.99)"},{queue:false, duration:1000, easing: 'swing'} );},
	function () {$(this).stop().animate({paddingLeft: 15, paddingRight: 25, backgroundColor: "rgba(0,0,0,0.70)"},{queue:false, duration:600, easing: 'swing'} );}
	);
	$('#top_menu li').hover(
	function () {$(this).children().stop().animate({paddingLeft: 80, paddingRight: 15, backgroundColor: "rgba(166,193,46, 0.99)"},{queue:false, duration:1000, easing: 'swing'} );},
	function () {$(this).children().stop().animate({paddingLeft: 15, paddingRight: 25, backgroundColor: "rgba(0,0,0,0.70)"},{queue:false, duration:600, easing: 'swing'} );}
	); 
	$('#lang_box dt').hover(
	function () {$(this).children().stop().animate({ backgroundColor: "rgba(166,193,46, 0.99)"},{queue:false, duration:1000, easing: 'swing'} );},
	function () {$(this).children().stop().animate({ backgroundColor: "rgba(0,0,0,0.70)"},{queue:false, duration:600, easing: 'swing'} );}
	); 
});
