// initialise plugins
$(document).ready(function() {
	//non home feature image
	$(function() {
		$('#feature').cycle(); 
	});
	
	$(function() {
		$('.home #feature').cycle({
			before: onBefore 
		}); 
	});
	$(function() {
		$('#quotelink').cycle({ }); 
	});
	function onBefore() {
		$('#quotename').html(this.alt);
		$('#quotecontent').html(this.title);
	}	
	
	jQuery('.home #feature img').click(function (){
     	document.location.href = jQuery(this).attr('longdesc');
    }).css('cursor', 'pointer');
	
	
	
	//change bg color form submits
	$("input.submit, input.contact-submit").hover(function () {
    	$(this).css({'background' : '#008caf', 'color' : '#ffffff'});
    },
    function () {
    	var cssObj = {
			'background' : '#d6effa',
			'color' : '#008caf'
    	}
    	$(this).css(cssObj);
    });
    
    //change graphical form submit buttons
	$("a img").hover(function () {
		$(this).stop().animate({
			opacity: 0.8
		}, "fast");
	},
	function () {
		$(this).stop().animate({
			opacity: 1
		});
	});
    
});