/* Window Scroller */
/* -------------------------------------------------------------------- */

function mk_window_scroller() {
    if (!$.exists('.mk-window-scroller')) {
        return false;
    }

    $('.mk-window-scroller').each(function() {
        var $this = $(this),
            $container_h = $this.attr('data-height'),
            $image = $this.find('img'),
            $speed = parseInt($this.attr('data-speed'));

        $this.stop(true, true).hoverIntent(function() {
            $image.animate({
                'top': -($image.height() - $container_h)
            }, $speed);

        }, function() {
            $image.animate({
                'top': 0
            }, $speed / 3);
        });
    });

}