$(function(){
    $('.item').hover(function(){
	$(this).find('.submenu').stop(true, true);
        $(this).find('.submenu').slideDown(200);
        $(this).find('a.lvl1').addClass('hover');
    },
    function(){
	$(this).find('.submenu').stop(true, true);
        $(this).find('.submenu').slideUp(200);
        $(this).find('a.lvl1').removeClass('hover');
    }
    );
        
    $('#menu a.lvl2').each(function(){
        $(this).css('width', $(this).parent().outerWidth() + 'px')
    });
    
    $('#mp_banners .banner:last').css('margin-right', '0');
    
    $('.content ol').nestedDecimalList();
    $('.content ul').not('#mycarousel').nestedDecimalList();
    
    
    
     
        
    if( $("#myController").get(0))    {
        $("#myController").jFlow({
            controller: ".jFlowControl", // must be class, use . sign
            slideWrapper : "#jFlowSlider", // must be id, use # sign
            slides: "#mySlides",  // the div where all your sliding divs are nested in
            selectedWrapper: "jFlowSelected",  // just pure text, no sign
            width: "958px",  // this is the width for the content-slider
            height: "345px",  // this is the height for the content-slider
            duration: 400,  // time in miliseconds to transition one slide
            prev: ".jFlowPrev", // must be class, use . sign
            next: ".jFlowNext", // must be class, use . sign
            auto: true	
        });
    }
    
   
});

function mycarousel_initCallback(carousel) {


    jQuery('.jFlowNext').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('.jFlowPrev').bind('click', function() {
        carousel.prev();
        return false;
    });
};



	
	

    
    


