	$(document).ready(function(){
	
		//loop through all a tags if one has a nested image then apply a fade to it unless the image has a class set to 'nofade'	
		$('a').each(function(){

			if($(this).children('img').hasClass('fade') == true){
				$(this).children('img').mouseover(function(){
					$(this).animate({opacity: "0.75"}, 100);
				});
				
				$(this).children('img').mouseout(function(){
					$(this).animate({opacity: "1.0"}, 300);
				});
			}
		});
		
		//loop through all 'li a' tags apply a fade to the parent li on 'a' mousover unless the image has a class set to 'nofade'	
		$('li a').each(function(){

			if($(this).hasClass('fade') == true){
				$(this).mouseover(function(){
					$(this).parent('li').animate({opacity: "0.65"}, 100);
				});
				
				$(this).mouseout(function(){
					$(this).parent('li').animate({opacity: "1.0"}, 300);
				});
			}
		});
		
		//loop through all 'li a' tags apply a fade to the parent li on 'a' mousover unless the image has a class set to 'nofade'	
		$('dd a').each(function(){

			if($(this).hasClass('fade') == true){
				$(this).mouseover(function(){
					$(this).parent('dd').animate({opacity: "0.65"}, 100);
				});
				
				$(this).mouseout(function(){
					$(this).parent('dd').animate({opacity: "1.0"}, 300);
				});
			}
		});
		
		
		
		//loop through all input tags if one has a type set to 'image' then apply a fade to it unless the image has a class set to 'nofade'
		$('input').each(function(){
			
			if($(this).hasClass('fade') == true){
				if($(this).attr('type') == "image"){
					$(this).mouseover(function(){
						$(this).animate({opacity: "0.75"}, 100);
					});
					
					$(this).mouseout(function(){
						$(this).animate({opacity: "1.0"}, 300);
					});
				}
			}
		});
		
	});
