﻿// fantabulous
// ===========
// Written by Mark Oakley on 2010 11 30
// jQuery Plugin to display a fail-safe menu along the top of the page.

(function ($) {
    $.fn.fantabulous = function () {
        return this.each(function () {

            $(this).wrap('<div class="fantabulousContainer">');
            $as = $(this).find('a');

            // Attach the mouseover events
            $as.each(function () {
                $(this).hover(
                    function () {
                        $(this).stop().animate({ marginTop: '-11px', color: 'red' }, 250, 'easeOutQuint');
                    },
                    function () {
                        $(this).stop().animate({ marginTop: '0px' }, 750, 'easeOutElastic');
                    }
                );
            });

            // Add the class to the links
            $as.addClass('fantabulousLink');

        });
    }
})(jQuery);
