
$(document).ready(function() {

	$('.lm-category[opened="0"]').hide();
    $('.lm-category ul[opened="0"]').hide();
	$('.lm-ctitle').click(
		function() {
			
			var checkElement = $(this).next();
			var old = $('.lm-category:visible');

			if((checkElement.attr("class") == undefined) || (checkElement.is(':visible'))) {
				return false;
			}else {
				old.slideUp('normal');
				checkElement.slideDown('normal');
			}
			
			return false;
		});	

	if(typeof($(".top-menuItemSelected").attr("id")) != "undefined")
		$("#" + $(".top-menuItemSelected").attr("id").replace("menu","tab")).css('backgroundColor','#577186');
	
    $(".top-menuItem").hover(
        function () {
              $("#" + $(this).attr("id").replace("menu","tab")).css('backgroundColor','#577186');
              $("#" + $(this).attr("id").replace("menu","tab")).animate({opacity: 0.65}, 500);
        },

        function () {
              $("#" + $(this).attr("id").replace("menu","tab")).css('backgroundColor','#FFF');
              $("#" + $(this).attr("id").replace("menu","tab")).animate({opacity: 1}, 500);
        }
    );

	$('.translate a').click(function() {
		if($('#fish').is(':visible')){
			$('#fish').fadeOut("fast");
			  $(this).parent().animate({
				    height: "24"
				    
				  }, 500);
		}else{
			  $(this).parent().animate({
				    height: "80"
				    
				  }, 500, function() {
					  $('#fish').fadeIn("normal");
				  });		
		}
		return false;
	
	});      		
});
