// implementing jquery for envirosys.com
$(document).ready(function () {
    //Career descriptions displayed in page
	$('div.content-from-html').css({'minHeight': '900px'});
	$('#selectlist a').click(function(e) {
		 var url = $(this).attr('href') + ' #jobdescription';
		$('#careerlisting').fadeOut('fast', function(){	
			$('#careerlisting').load(url);
			});
		$('#careerlisting').fadeIn('fast');
		e.preventDefault();
    });
    //Display Faces of ESC bios and animate buttons
	  $('#bionav li img').hover(function(){
			$(this).animate({marginTop: '-=6px', marginLeft: '+=6px'}, 200);
		  }, function(){
			$(this).animate({marginTop: '+=6px', marginLeft: '-=6px'}, 200);
	  });
	$('#bionav a').click(function(e) {
		var headurl = $(this).attr('href') + ' div.bioheader>img';
		var bodyurl = $(this).attr('href') + ' div.biobody';
		$('#bioheader').stop(true).load(headurl);	
		$('#biobody').stop(true).html('<div style="width:514px;height:350px;">loading...</div>').hide().load(bodyurl).slideDown('slow');						
		e.preventDefault();	
     });
    //animating the user group button --img id="UGRegButton"
    $('#regcode').css('color', '#ff0000');
    $('#UGRegButton').hover(function () {
        $(this).attr('src', 'http://envirosys.com/cfs-file.ashx/__key/CommunityServer.Components.SiteFiles/Site+Images.usergroup/RegisterBtnOver.gif'), 600;
        }, function () {
            $(this).attr('src', 'http://envirosys.com/cfs-file.ashx/__key/CommunityServer.Components.SiteFiles/Site+Images.usergroup/RegisterBtnUp.gif'), 200;
    });
	
	
});
