(function($) {

    $(document).ready(function() {

        // dnn menu  
        $("div.dnnActionMenu").each(function(index) {

            $(this).mouseover(function() {
                //$(this).parents(".DnnModule").css("position", "fixed");
            });

            $(this).mouseout(function() {
                //$(this).parents(".DnnModule").css("position", "relative");
            });

        });

        // Featured content
        // -get the first element found and hide the rest
        $('.FeaturedContent').hide()

        var panel = $('.FeaturedContent').first();
        panel.show();

        var img = panel.children().first();

        if (!img.attr('height')) {
            img.css('height', '30px');
        }
        img.css('visibility', 'hidden');

        $('.ContentBody').css('background', 'url(' + img.attr('src') + ')');
        $('.ContentBody').css('background-repeat', 'no-repeat');

        if (img.attr('topoffset')) {
            $('.ContentBody').css('margin-top', img.attr('topoffset') + 'px');
        }

        if (img.attr('bg')) {
            $('.ContentBody').css('background-color', img.attr('bg'));
        }

        // Center all instanse of EasyDNNGallery
        $('.ModEasyDNNGalleryC').wrap('<center />');

    });

})(jQuery);
