
// @author: John Madrigal
// Purpose: Handle any javascript for Bluecaribe
// Copyright: 2010 © Hitcents

 $(function(){
 	
	// Home Navigation Fading
	$(".home_links a").hover(
		function(){
			aTitle = $(this).attr('alt');
			$(this).append("<span class='aTitle'>"+aTitle+"</span>");
			$("img", this)
			.stop()
			.animate({
				opacity: .2
			}, 300);
		}, function(){
			$('span.aTitle').hide();
			$("img", this)
			.stop()
			.animate({
				opacity: 1
			}, 100);
		}
	);
	
	// Sports Coming Soon
	$(".csoon").hover(
	function(){
		$(this).stop().append("<p class='closebtn' style='display:none'>Coming Soon</p>");
		$(".closebtn").stop().fadeIn(500);
			
	}, function(){ 
		$(".closebtn").fadeOut(300, function(){
			$(this).remove();
		});
	});
	
	// Colorbox Readmore Pages
	$("a.btn_readmore").colorbox({
		width:"50%", 
		inline:true, 
		href:".readmore", 
		onLoad: function(){
			$(".readmore").css('display', 'block')
		},
		onCleanup: function(){
			$(".readmore").css('display', 'none')
		}
	});
	
	// Colorbox Readmore Tradition Pages
	$("a.btn1_readmore").colorbox({
		width:"50%", 
		height:"50%", 
		inline:true, 
		href:".rm_1", 
		onLoad: function(){
			$(".rm_1").css('display', 'block')
		},
		onCleanup: function(){
			$(".rm_1").css('display', 'none')
		}
	});
	$("a.btn2_readmore").colorbox({
		width:"50%", 
		height:"50%", 
		inline:true, 
		href:".rm_2", 
		onLoad: function(){
			$(".rm_2").css('display', 'block')
		},
		onCleanup: function(){
			$(".rm_2").css('display', 'none')
		}
	});
	
	$("a.btn3_readmore").colorbox({
		width:"50%", 
		height:"50%", 
		inline:true, 
		href:".rm_3", 
		onLoad: function(){
			$(".rm_3").css('display', 'block')
		},
		onCleanup: function(){
			$(".rm_3").css('display', 'none')
		}
	});
	
	$("a.btn4_readmore").colorbox({
		width:"50%", 
		height:"50%", 
		inline:true, 
		href:".rm_4", 
		onLoad: function(){
			$(".rm_4").css('display', 'block')
		},
		onCleanup: function(){
			$(".rm_4").css('display', 'none')
		}
	});
	
	// Colorbox Vide Pages
	$("a.btn_video").colorbox({
		innerwidth:"620px", 
		inline:true, 
		href:".video", 
		onLoad: function(){
			$(".video").css('display', 'block')
		},
		onCleanup: function(){
			$(".video").css('display', 'none')
		}
	});

	
 });


