	$(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('nofade') == false){
				$(this).children('img').mouseover(function(){
					$(this).animate({opacity: "0.75"}, 500);
				});
				
				$(this).children('img').mouseout(function(){
					$(this).animate({opacity: "1.0"}, 500);
				});
			}
		});
		
		//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('nofade') == false){
				if($(this).attr('type') == "image"){
					$(this).mouseover(function(){
						$(this).animate({opacity: "0.75"}, 500);
					});
					
					$(this).mouseout(function(){
						$(this).animate({opacity: "1.0"}, 500);
					});
				}
			}
		});
		
	});