$(document).ready(function() {
      
    function addMega(){
      $(this).addClass("hovering");
    }

    function removeMega(){
      $(this).removeClass("hovering");
    }

    var megaConfig = {
         interval: 200,
         sensitivity: 4,
         over: addMega,
         timeout: 500,
         out: removeMega
    };

    $(".top-menu").hoverIntent(megaConfig);

    $('.top-menu > a').click( function(e){
        $this = $(this);
        if( $this.siblings('.sub-menu').length ){
            if ( ! $this.hasClass("hovering") ) {
                e.preventDefault();
                $this.addClass("hovering");
            }

        }
        
    });
});
$(document).ready(function() {
    $('#notes').find('li').each( function(i,el){
        var wobble = Math.floor(Math.random() * 16) -8;
        var shift = Math.floor(Math.random() * 20) -10;
        $(el).css({
            '-webkit-transform': 'rotate(' + wobble + 'deg)',
            '-moz-transform': 'rotate(' + wobble + 'deg)',
            '-o-transform': 'rotate(' + wobble + 'deg)',
            'top' : shift + 'px'
        });
        var wobbleTape = Math.floor(Math.random() * 4);
        $(el).addClass('wobble-' + wobbleTape);
    });
});

