$(document).ready(  function()
{

        $('#main_page_visual').innerfade({
            speed: 2000,
            timeout: 6000,
            type: 'sequence',
            containerheight: '342px'
        });    
    


  
    //********************************************************************************************//
    //	             верхнее меню                                                                 //
    
    //  ****         убираем title они тут не нужны
    //$(".sf-menu a").attr({ "title" : "" });
    
    //  ****         борем глюк в IE8
    if ( $.browser.msie && $.browser.version > 7 )  speedMenu = 20;
    else                                            speedMenu = 300;
    
    //  ****         выводим вкладки на визуале
    $("ul.sf-menu").superfish({ 
		    hoverClass:    'sfHover',          // класс по которому меню срабатывает 
		    pathClass:     'overideThisToUse', // класс, который Вы применили к пунктам списка, которые приводят к текущей странице 
		    pathLevels:    1,                  // число уровней подменю, которые остаются открытыми или восстановлены, используя pathClass
		    delay:         800,                // задержка для закрытия меню
		    animation:     {opacity:'show'},   // an object equivalent to first parameter of jQuery’s .animate() method 
		    speed:         speedMenu,          // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method 
		    autoArrows:    false,              // показать автоматом стрелки для меню
		    dropShadows:   true,               // тень нада или нет
		    disableHI:     false,              // set to true to disable hoverIntent detection 
		    onInit:        function(){},       // callback function fires once Superfish is initialised – 'this' is the containing ul 
		    onBeforeShow:  function(){},       // callback function fires just before reveal animation begins – 'this' is the ul about to open 
		    onShow:        function(){},       // callback function fires once reveal animation completed – 'this' is the opened ul 
		    onHide:        function()          // callback function fires after a sub-menu has closed – 'this' is the ul that just closed 
            {
                if ( $.browser.opera )
                {
                    //  ****         В опере глюки какие то дикие, по этому выпадалки в опере ваще не показываем
                    $(".sf-menu_hidden").hide();
                }   
            }        
    });    

    //	             КОНЕЦ верхнее меню                                                           //
    //********************************************************************************************//
    
    
    //********************************************************************************************//
    //	             Крутилка для логотипов                                                       //
    $("#arrow_right").css( { display : 'block' } );
    
    $("#arrow_right").click( 
	function() 
	{
            $("#logos_conteyner").stop().scrollTo( { top:0, left:'+=864'}, 500, {onAfter:check_pos} );
			return false;
	});      
    
    $("#arrow_left").click( 
	function() 
	{
            $("#logos_conteyner").stop().scrollTo( { top:0, left:'-=864'}, 500, {onAfter:check_pos} );
			return false;
	});    
    //	             КОНЕЦ Крутилка для логотипов                                                 //
    //********************************************************************************************//
    
    
   
}); // конец  document.ready


            
//********************************************************************************************//
//	             Прячем / показываем кнопки прокрутки для лого                                //
function check_pos ()
{
    ofss =  $("#logos_table").offset();
    
    if ( ofss.left < -3000 )    $("#arrow_right").css( { display : 'none' } );
    else                        $("#arrow_right").css( { display : 'block' } ); 
                
    if ( ofss.left > 50 )       $("#arrow_left").css( { display : 'none' } ); 
    else                        $("#arrow_left").css( { display : 'block' } );
}            
//	             КОНЕЦ Прячем / показываем кнопки прокрутки для лого                          //
//********************************************************************************************//

