jQuery.noConflict();
(function($){
    // CONTENT: Clean up page title, and breadcrumbs
    if ( $('#page-title').css('display') == 'none' && $('#breadcrumbs ul').size() == 0 ) {
        $('#page-title').remove();
        $('#content-wrapper').css('paddingTop','0px');
    }
    if ( $('#breadcrumbs ul').size() == 0 ) {
        $('#breadcrumbs').remove();
    }

    // HEADER: Clean up title, slogan, and logo
    if ( $('#title').text() == '' && $('#slogan').text() == '' && $('#logo').html() == '' ) {
        $('#title,#slogan,#logo').remove();
        $('#header').css({ paddingTop:'36px', paddingBottom:'0px' });
    }

    // MENU: Setup drop down menus
    $('#menu ul ul li:has(ul) > a').addClass('parent');

    // GLOBAL: Enable prettyPhoto
    $('a[rel^="prettyPhoto"]').prettyPhoto();

    // BLOG: Clean up blog sidebar
    if ( $('.blog-entry').size() > 0 ) {
        if ( $('#sidebar-title').text() == '' ) {
            $('#sidebar-title').hide();
            $('#blog-categories').css('marginTop','0px');
        }
        if ( $('#blog-categories').html() == '' ) {
            $('#blog-categories').hide();
        }
        if ( $('#blog-archives').html() == '' ) {
            $('#blog-archives').hide();
        }
    }

    // FILE SHARING: Clean up File Sharing Description if unused
    if ( $('.filesharing-description').size() > 0 ) {
        if ( $('.filesharing-description').html() == '' ) {
            $('.filesharing-description').hide();
        }
    }

    // IE6 drop downs
    if ( $.browser.msie && parseFloat($.browser.version) < 7.0 ) {
        $('#menu > ul > li.current > ul,#menu > ul > li.current-ancestor > ul').css('display','block');
        $('#menu ul ul li').hover(
            function(){
                $('ul:first',this).show();
            },
            function(){
                $('ul:first',this).hide();
            }
        );
    }
})(jQuery);
