$(document).ready(function(){
	mainmenu();  //adds animation to the dropdown menu
    
    //smooth scroll for top link in footer
    $("#top").click(function() {
        $.scrollTo("#wrapper", {duration:400});
        return false;
    });      
    
    //smooth scroll for comments link in the blog
    $(".numcom").click(function() {
        $.scrollTo("#comments", {duration:600});
        return false;
    });  
});

function mainmenu(){
    $(" #nav ul ").css({display: "none"}); // Opera Fix
    $(" #nav a").removeAttr("title");
    $(" #nav li").hover(function() {
        $(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(400);
        },function(){
        $(this).find('ul:first').fadeOut(300, function() { $(this).css({visibility: "hidden",display: "none"}) });
    });
}


/*====== Plugins =============================================================*/

//just a shell for now
(function($){
    $.fn.modal_img = function(options) {
        var opts = $.extend({}, $.fn.modal_img.defaults, options);
        
        return this.each(function() {          
            
            //code here

        });
      
    };
    // plugin defaults
    $.fn.modal_img.defaults = {
        //none
    };
})(jQuery);

