



function start(){
   startMenu();
   if($(".news_li")) startNews();

}

function startNews(){

    $(".news_li li").each(function (i) {
            $(this).hover(function(){
                if (this.className != "act" && this.className != "pag" && this.className != "pag_next" && this.className != "pag_prev") {
                    $(this).css({backgroundImage: "url(img/page.gif)", cursor: "pointer", "background-repeat":"no-repeat", backgroundPosition: "0 5px"});
                }
            }, function() {
                if (this.className != "act" && this.className != "pag" && this.className != "pag_next" && this.className != "pag_prev") 
                    $(this).css({backgroundImage: "none"});
            });
            
            $(this).click(function(){                      
                document.location.href = ($(this).children())[0].href;
            });
      });
      $(".news a img").hover(function() {
            s = $(this).attr("src").replace(/\.(.+)$/i, "_.gif");
            $(this).attr("src", s);
      }, function() {
            s = $(this).attr("src").replace(/_\.(.+)$/i, ".gif");
            $(this).attr("src", s);
      });
}

function startMenu(){ 
   
$(".mnu1, .mnu2, .mnu3, .mnu4, .mnu5, .mnu6").hide();    
        /* 0 */

        /* 1 */
        $('#menu div').each(
             function( intIndex ){
             
                $("#nav"+intIndex).hover(function() {
                    $(this).animate({backgroundColor: "#4e4e4e"}, {queue : false, duration: 200});
                    $(".mnu"+intIndex).show();   
                }, function() {
                    $(this).animate({backgroundColor: "#000"}, {queue : false, duration: 200});
                    $(".mnu"+intIndex).hide();   
                });
                
                
                $(".mnu"+intIndex+" li").hover(function() {
                    $(this).animate({backgroundColor: "#6da82e"}, {queue : false, duration: 150});       
                }, function() {
                    $(this).animate({backgroundColor: "#4e4e4e"}, {queue : false, duration: 150});  
                });
                
                 $(".mnu"+intIndex+" li").click(function(){                      
                        document.location.href = ($(this).children())[0].href;
                });
            
                })  
     
}

         