$(document).ready(function(){
	
	/* tira rolagem horizontal */
	$("body").css("overflowX","hidden");
	
	/* smooth scrolling */
    $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                return false;
            }
        }
    });
	
	/* menu */
	$(".main_menu li:not([class])").hover(
		function(){
			$(this).css("cursor","pointer");
			if (jQuery.browser.msie && parseInt(jQuery.browser.version) == 6) {
				$("a",this).animate({ 
					marginTop: "0px"
				}, "fast", function(){
					$("cite",this).fadeIn("slow").css("display","block").removeClass("h");	
				});
			} else {
				$("cite",this).fadeIn("slow").css("display","block").removeClass("h");
				$("a",this).animate({ 
					marginTop: "0px"
				}, "fast" );
			}
		},
		function(){
			$(this).css("cursor","");
			$("cite",this).addClass("h");
			$("a",this).animate({
				marginTop: "14px"
			});
		}
	);
	
	Cufon.replace('.main_menu li.selected a, #sendEmail span.ctButtons',{
		textShadow: "#8aa18c 1px 1px"
	});
	
});