(function($) {

$(document).ready(function() {
    $("#nav ul").css('display', 'none');
    $("#nav li").hover(function() {
        $(this).find('ul:first').css({visibility: 'visible', display: 'none'}).slideDown(100);
    }, function() {
        $(this).find('ul:first').css({visibility: 'hidden'}).slideUp(100);
    });

    $("a.youtube").click(function() {
        $.fancybox({
            'padding'       : 0,
            'autoScale'     : false,
            'transitionIn'  : 'none',
            'transitionOut' : 'none',
            'title'         : this.title,
            'width'         : 480,
            'height'        : 385,
            'href'          : 'http://www.youtube-nocookie.com/v/' + this.id,
            'type'          : 'swf',
            'swf'           : {
                'wmode'             : 'transparent',
                'allowfullscreen'   : 'true'
            }
        });
    });

    $('.twitter-feed').each(function() {
        var $this = $(this);
        $this.tweet({
            username: $this.data('username'),
            count:    $this.data('count'),
            template: '{text}{time}',
        });
    });
});

})(jQuery);

