$(function () {
	
	// Start Homepage Slides
	//$('.slides').cycle({
	//	speed: 1000,
	//	timeout: 7500
	//});
	
	// Start News Ticker
	$('#js-news').ticker({ titleText: '', controls: true });
	
	// Card Slider Function
	$('.card').click(function(){
	
		var cardID = $(this).attr('id');
		
		$(this).animate({
			top: "70px",
			left: "0px"
		});
		
		$(this).css({ "z-index": "3", "background": "url(css/images/card-blue.png) no-repeat 0 0" });

		if (cardID == 'card1') { 

			$('#card2').animate({
				top: "35px",
				left: "20px"
			});
			
			$('#card2').css({ "z-index": "2", "background": "url(css/images/card-lt-grey.png) no-repeat 0 0" });

			$('#card3').animate({
				top: "0px",
				left: "40px"
			});
			
			$('#card3').css({ "z-index": "1", "background": "url(css/images/card-grey.png) no-repeat 0 0" });

		} else if (cardID == 'card2') {

			$('#card1').animate({
				top: "0px",
				left: "40px"
			});
			
			$('#card1').css({ "z-index": "1", "background": "url(css/images/card-grey.png) no-repeat 0 0" });

			$('#card3').animate({
				top: "35px",
				left: "20px"
			});
			
			$('#card3').css({ "z-index": "2", "background": "url(css/images/card-lt-grey.png) no-repeat 0 0" });

		} else if (cardID == 'card3') {

			$('#card2').animate({
				top: "35px",
				left: "20px"
			});
			
			$('#card2').css({ "z-index": "2", "background": "url(css/images/card-lt-grey.png) no-repeat 0 0" });

			$('#card1').animate({
				top: "0px",
				left: "40px"
			});
			
			$('#card1').css({ "z-index": "1", "background": "url(css/images/card-grey.png) no-repeat 0 0" });

		}
			
	});
	
});		
