// Slideshow homepage
$(document).ready(function() {
	$('#slideshow')
	/*.after('')*/
	/*.after()*/
	.cycle({ 
		fx:     'scrollHorz', 
		speed:  800, 
		timeout: 6500,
		pager:  '#slideshownav',
		next:   '#next', 
		prev:   '#prev',
		pause:   1
	});
});


// Top nav effect
$(document).ready(function() {
    $('#top-nav li a').hover(
		function() {
			if ($(this).attr('class') == 'active'){
				$(this).css({background: "#878787"}).animate({backgroundColor: "#878787"}, 200);
				}else{
				$(this).css({background: "#222"}).animate({backgroundColor: "#cb1f57"}, 200);
				}
			},
			
		function() {
			if ($(this).attr('class') == 'active'){
				$(this).animate({backgroundColor: "#878787"}, 200);
				}else{
				$(this).animate({backgroundColor: "#222"}, 200);
				}
			}
		)
});

// Top nav effect
$(document).ready(function() {
    $('#sub-nav li a').hover(
		function() {
			if ($(this).attr('class') == 'active'){
				$(this).css({background: "#ef9310"}).animate({backgroundColor: "#ef9310"}, 200);
				}else{
				$(this).css({background: "#878787"}).animate({backgroundColor: "#cb1f57"}, 200);
				}
			},
			
		function() {
			if ($(this).attr('class') == 'active'){
				$(this).animate({backgroundColor: "#ef9310"}, 200);
				}else{
				$(this).animate({backgroundColor: "#878787"}, 200);
				}
			}
		)
});


/*------------ Alert -----------*/
$(document).ready(function() {
    $('#alert').hover(
		function() {
			$(this).css({background: "#cb1f57"}).animate({backgroundColor: "#7f001f"}, 500);
			},
		function() {
			$(this).animate({backgroundColor: "#cb1f57"}, 500);
			}
		)
});


/*------------ Boxes homepage -----------*/
$(document).ready(function() {
    $('.quarter, .third').hover(
			function() {
			//$(this).find('.zone-title').css({"background-color": "transparent"});
			mycolor = $(this).find('.zone-title').css("background-color");
			var bordercolor = $(this).find('.zone-title').css("border-bottom-color");
			$(this).find('.zone-title').css({"background-color": '"'+ mycolor +'"'}).animate({"background-color":  '"'+ bordercolor +'"'}, 300);
			},
		function() {
			$(this).find('.zone-title').animate({"background-color":  '"'+ mycolor +'"'}, 300);
			}
		)
	$('.third').hover(
			function() {
			$(this).find('.zone-description').css({"background-color": "#ededed"}).animate({"background-color":  "#dcdcdc"}, 300);
			},
		function() {
			$(this).find('.zone-description').animate({"background-color": "#ededed"}, 300);
			}
		)
});

/*------------ Buttons  -----------*/
$(document).ready(function() {
	$('.buttons').hover(
			function() {
			$(this).css({"border-color": "#7F001F", "background-color": "#CB1F57"}).animate({"border-color":  "#B94D02", "background-color": "#EF9310"}, 300);
			},
		function() {
			$(this).animate({"border-color": "#7F001F", "background-color": "#CB1F57"}, 300);
			}
		)
});


/*----------- Events listing  -----------*/
$(document).ready(function() {
	$('.events-listing').hover(
			function() {
			$(this).css({"border-color": "#EEEBE2"}).animate({"border-color":  "#878787"}, 300);
			$(this).find('.title-box').css({"background-color": "#878787"}).animate({"background-color": "#CB1F57"}, 300);
			$(this).find('.title-box .dates').css({"color": "#000"}).animate({"color":  "#fff"}, 300);
			},
		function() {
			$(this).animate({"border-color": "#EEEBE2"}, 300);
			$(this).find('.title-box').animate({"background-color":  "#EEEBE2"}, 300);
			$(this).find('.title-box .dates').animate({"color":  "#000"}, 300);
			}
		)
});


/*----------- Secondary nav  -----------*/
$(document).ready(function() {
	$('#secondary-nav li a').hover(
			function() {
			$(this).css({"background-color": "#F5F5ED"}).animate({"background-color":  "#CB1F57"}, 200);
			},
		function() {
			$(this).animate({"background-color": "#F5F5ED"}, 200);
			}
		)
});




