var showPart = '';

$(document).ready(function() {

	
    // Maps on contact page
    if($('a.map').length) // check element exists on page
    {
        $('a.map').colorbox();
    }   
        
    
	$('.home-logos a').hover(function() {	
	    $(".brands").hide();
		var id = $(this).attr("title");
		id = id.replace('&','');		
		id = id.replace(' ','');		
		$('#brand_'+id).slideDown('slow');
	});	
	
	

		$('.brand-overlay-close').live('click',function(){
			  $('.brands').slideUp('slow');
			  return false;
        });
		

	/**
	 * 
	 * $('a[href$="businesses/an-media"]').hover(function() {	
		$('#ANBrands').slideDown('slow');
	});
	
	
	$('#ANBrands').hover(function() {
		$('#ANBrands').show();	
	});
	
	$('#ANBrands').mouseout(function() {
		//$('#ANBrands').hide();	
	});
	
	$('a[href$="businesses/an-media"]').mouseout(function() {
		//$('#ANBrands').hide();
	});
	
	
	 **/	
	
	
	$(this).next('.calendar_toggle').slideDown('slow'); 
	
        if (showPart) $("#" + showPart).addClass("selected");
        $("#our_profile").addClass("selected");

        jQuery('#list1a').accordion({
        	autoheight: false

        });

        jQuery('#list1b').accordion({
          autoheight: false,
          active: '.selected'
        });

        jQuery('#list1c').accordion({
        autoheight: false
        });

         jQuery('#boardofdirectors').accordion({
         active: '.selected' ,
          autoHeight: false
        }); 
        
        $("#video_content").html("<div id='fl'><p>Flash player required.</p></div>");

         $("#content .sub_col:last").addClass('last');

         autoFill($("#search_field"), "Enter Keyword(s)");

         $("tr:odd").addClass("odd");


        $(".email-page").click(function() {
           window.location = "mailto:"+"?subject=Daily Mail and General Trust" + "&body=" + "I thought this link might interest you: " + document.title + ", which is available at the following address, " + document.location;
        	return false;
        });    
                  
        $(".print-link").click(function() {
         window.print();
         return false;
        });  
        
        $(".bookmark-link").click(function() {
                var url = document.location;
				var title = document.title; 
				if (window.sidebar) 
					{
					// Mozilla						
					window.sidebar.addPanel(title, url,"");						
					} else if( window.external ) 
					{
					// IE Favorite
					window.external.AddFavorite( url, title);
					}
					else if(window.opera && window.print) 
					{
					// Opera
					}
			return false;
        });  
        return false;   
        
       
  
});
    
