jQuery(document).ready(function(){
    jQuery('.dropdown').unbind().click(function(){
        var button=jQuery(this);
        jQuery.ajax({
            'url': 'dropdown.html',
            'dataType': 'html',
            'complete': function(transport,status) {
                switch (transport.status) {
                }
            },
            'success': function(result) {
                button.addClass('dropdown_dropped');
                jQuery('#dropdown').html(result).fadeIn(250);
                jQuery('body').unbind().click(function(){
                    jQuery('#dropdown').fadeOut(100);
                    button.removeClass('dropdown_dropped');
                    jQuery('body').unbind();
                });
            }
        });
        return false;
    });
    
    jQuery.ajax({
        'url': 'slider.html',
        'dataType': 'html',
        'complete': function(transport,status) {
            switch (transport.status) {
            }
        },
        'success': function(result) {
            jQuery('#slider').html(result);
            jQuery('#slider').nivoSlider({
                directionNav:false,
                directionNavHide:true,
                controlNav:false,
                effect:'fade'
            });
        }
    });
});
