$(document).ready(function(){
    $(".scrollable").scrollable({
        circular: true

    })
    .autoscroll({
        autoplay: true,
        autopause: true,
        interval: 5000
    });
    $("#mainmenu.mainpage a[title]").tooltip({
        delay: 100,
        position: 'bottom center',
        predelay: 0,
        offset: [0, 0],
        effect: 'slide'
    })
    .dynamic({
        bottom: {
            direction: 'down',
            bounce: true
        }
    });

    $("#mainmenu.innerpages a[title]").tooltip({
        delay: 100,
        position: 'bottom center',
        predelay: 0,
        offset: [20, 0],
        effect: 'slide'
    })
    .dynamic({
        bottom: {
            direction: 'down',
            bounce: true
        }
    });

    $("#new_addr").tooltip({
        delay: 100,
        position: 'bottom center',
        predelay: 0,
        offset: [3, 0],
        effect: 'slide',
        tipClass : 'new_addr_tooltip'
    })
    .dynamic({
        bottom: {
            direction: 'down',
            bounce: true
        }
    });


    var str = document.location.toString();

    $("#mainmenu a").each(function(indx,elm){
        $(elm).hover(function(){
            $(elm).parent('li').addClass('hover');
        }, function(){
            $(elm).parent('li').removeClass('hover');
        });
        if (str.indexOf($(elm).attr('href')) >= 0) {
            $(elm).parent('li').addClass('mmenu_active')
        }
    });
});
