$(document).ready(function(){				   
	aa = new Image();
	aa.src = "images/headbgrd.jpg";
		
	aaa= new Image();
	aaa.src = "images/navtop.gif";
	
	ab = new Image();
	ab.src = "images/navmid.gif";
	
	abb = new Image();
	abb.src = "images/navbtm.gif";
	
	ac = new Image();
	ac.src = "images/bodybgrd.jpg";	
	
	acc = new Image();
	acc.src = "images/tonybentley.gif";	
	
	ad = new Image();
	ad.src = "images/li.gif";	 
	
	$("#left h2,#srv h2").each(function(){
			$(this).next("div").hide();
			$(this).bind("click",function(){
				toggle($(this).next("div").attr("id"));
			});
		});
	
	if(document.location.hash){
		var  urlhash = 	document.location.hash.replace("#","");
		toggle(urlhash);
	}
    var inprog = 0;
        $("#tonybentley").hover(function() {
         if (inprog == 0) {
             inprog = 1;
            $(this).children("img").slideDown(400);
         }
    }, function() {
         $(this).children("img").slideUp(400, function() {inprog = 0;});
    });
});


function MenuLink(el){
document.location.href=$(el).children('a').attr('href');
}
function toggle(el){
	var ups = false;
	$('.tog').each(function(){
		if($(this).attr("id") == el){
			ups = true;
		}
		$(this).removeClass('tog');
		$(this).slideUp();
	});
	if(!ups){
		$('#'+el).slideDown();
		$('#'+el).addClass('tog');
	}
} 