var carousel = (function() {
        // Configurable Variables
        var init_autoRun = true;
        var autoSpeed = 3500;
        // Common Variables
        var li_posL = parseInt($('#js-carousel ul').css('left'));
        var li_w = $('#js-carousel li').outerWidth();
        var ul_posL = li_w * (-0);

        function rotation() {
            var indent = li_posL - li_w;
            $('#js-carousel ul').animate({ 'left': indent }, 1500, function() {
                $('#js-carousel li:last').after($('#js-carousel li:first'));
                $('#js-carousel ul').css({ 'left': ul_posL });
            });
            return false;
        }

        $('#js-carousel li:first').before($('#js-carousel li:last'));
        $('#js-carousel ul').css({ 'left': ul_posL });
        if (init_autoRun) {
            var autoRun = setInterval(rotation, autoSpeed);
            //if mouse hover, pause the auto rotation, otherwise rotate it
            jQuery('#js-carousel').hover(function() {
                clearInterval(autoRun);
            }, function() {
                autoRun = setInterval(rotation, autoSpeed);
            });
        }
    });

    jQuery(document).ready(function() {
        carousel();
    });
