
$(document).ready(function(){	

    $('#img_header div:first').show(); 
	
	if ($('#img_header div').length>1) {
        top_flag=0; 
		count_slide = $('#img_header div').length; 
        delay=5000;       
        my_id=setTimeout('slide_show(top_flag+1)',delay);
    }	
	
	
	$("#menu2 div.li a").click( function() {        
        if ($(this).parents('li').find('ul').length) {            
            $(this).parents('li').siblings().find('ul:visible').each(function(i){ 
                 $(this).slideUp(); 
            });
           $(this).parents('li').find('ul').slideToggle();
           return false;
        }                
    } );
    
    $("#menu2 div.li a").focus(function(){
        $(this).blur();
    }); 

    
});

function slide_show(number) {   
        if (number==count_slide) number=0;             
        $('#img_header div').eq(top_flag).fadeOut(500);
        $('#img_header div').eq(number).fadeIn(500);	
        top_flag=number; 
        my_id=setTimeout('slide_show(top_flag+1)',delay);  
}


