$(document).ready(function(){
		
	bg_over_hover();
	over_hover();
	
	pover();
	
	$("#photos").cycle({
		fx: 'fade',
		random: 1,
		speed: 2000
	});
	
	$("input[type=text],textarea").focus(function(){
		$(this).css('border-color', '#333');
	});
	$("input[type=text],textarea").blur(function(){
		$(this).css('border-color', '#aaa');
	});

});

function bg_over_hover(){
	
	$(".bgover").hover(function(){
		
		source = $(this).css('background-image');
		newSource = source.replace(".png","_over.png");
		
		$(this).css('background-image',newSource);
		
	},function(){
		
		source = $(this).css('background-image');
		newSource = source.replace("_over.png",".png");
		
		$(this).css('background-image',newSource);
		
	});
	
}

function over_hover(){
	
	$(".over").hover(function(){
		
		source = $(this).attr('src');
		newSource = source.replace(".png","_over.png");
		
		$(this).attr('src',newSource)
		
	},function(){
		
		source = $(this).attr('src');
		newSource = source.replace("_over.png",".png");
		
		$(this).attr('src',newSource)
		
	});
	
	$("#logo_top").click(function(){window.location='?p=home'});
	
}

function pover(){
	
	$("p").hover(function(){
		
		$(this).css('color',"#000");
		$(this).find("a").css('color',"#000");
		
	},function(){
		
		$(this).css('color',"#666");
		$(this).find("a").css('color',"#666");
		
	});
	
}

