









$.noConflict();
jQuery(document).ready(function($) {
	// Code that uses jQuery's $ can follow here.

    // Checks to see if we're editing the header.
	if ($("#navigation ul li.edit").length == 0){
        $("#navigation ul li").hover(function() {
            $(this).css({ 'z-index' : 100 });
            $(this).find(".dd, .flyout").show();
            $(this).find("a:eq(0)").addClass('hover');
        }, function() {
            $(this).css({ 'z-index' : 1 });
            $(this).find(".dd, .flyout").hide();
            $(this).find("a:eq(0)").removeClass('hover');
        });
    }
	
	$('.search-form, .share, .smart-search .form').hover(function () {
		$(this).find('.search-dd').show();
		$(this).find('.share-dd').show();
		$(this).find('.smart-dd').show();
	}, function () {
		$(this).find('.search-dd').hide();
		$(this).find('.share-dd').hide();
		$(this).find('.smart-dd').hide();
	});
	
	$('.blink')
		.focus(function(){
			if( $(this).val() == $(this).attr('title') ) {
				$(this).val('');
			}
		})
		.blur(function(){
			if( $(this).val() == '' ) {
				$(this).val( $(this).attr('title') );
			}
		});
		
	// accordion
	$('.sidebar-nav').accordion({
		change: function(event, ui) { 
			$('.sidebar-nav h2 a').each(function () {
				$(this).removeClass('active');
			});
			//$('.sidebar-nav h2 a').addClass('active');
			$(ui.newHeader).children('a:eq(0)').addClass('active');
			//console.log(ui.newHeader);
			
			/*if ($(".tab-content a.header").index(ui.oldHeader) != $(".tab-content a.header").length - 1) {
				$(ui.oldHeader).addClass("border");
			}*/
		 }
	});
});
// Code that uses other library's $ can follow here.

