$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade'
	});
	$('.slideshow').hover(function() { 
    $(this).cycle('pause'); 
	});
	$('.slideshow').mouseout(function() { 
    $(this).cycle('resume'); 
	});
	$('#ss1').cycle({
		random: 1
	});
	$('#ss2').cycle({
		random: 1,
		delay:200
	});
	$('#ss3').cycle({
		random: 1,
		delay:400
	});
	$('#ss4').cycle({
		random: 1,
		delay:600
	});
	$('#ss1 img').hover(function() { 
    $('#galtitle').css({'color' : '#9e0039'});
    	var src = $(this).attr("src").match(/[^\.]+/) + "-over.jpg";
            $(this).attr("src", src);
	});
	$('#ss1 img').mouseout(function() { 
    $('#galtitle').css({'color' : '#353735'});
			var src = $(this).attr("src").replace("-over", "");
            $(this).attr("src", src); 
	});
	$('#ss2 img').hover(function() { 
    $('#casatitle').css({'color' : '#9e0039'});
	var src = $(this).attr("src").match(/[^\.]+/) + "-over.jpg";
            $(this).attr("src", src);
	});
	$('#ss2 img').mouseout(function() { 
    $('#casatitle').css({'color' : '#353735'});
	var src = $(this).attr("src").replace("-over", "");
            $(this).attr("src", src);
	
	});
	$('#ss3 img').hover(function() { 
    $('#teamtitle').css({'color' : '#9e0039'}); 
	var src = $(this).attr("src").match(/[^\.]+/) + "-over.jpg";
            $(this).attr("src", src);
	});
	$('#ss3 img').mouseout(function() { 
    $('#teamtitle').css({'color' : '#353735'}); 
	var src = $(this).attr("src").replace("-over", "");
            $(this).attr("src", src);
	});
	$('#ss4 img').hover(function() { 
    $('#contactitle').css({'color' : '#9e0039'});
	var src = $(this).attr("src").match(/[^\.]+/) + "-over.jpg";
            $(this).attr("src", src);
	});
	$('#ss4 img').mouseout(function() { 
    $('#contactitle').css({'color' : '#353735'});
	var src = $(this).attr("src").replace("-over", "");
            $(this).attr("src", src); 
	});
});
