var landing = function(){

	this.initHover();
	this.initTabs();

}

landing.prototype.initHover = function(){

	$('.helpSmallModule, .helpBigModule').find('.sprite').css({'opacity': '0'})

	$('.helpSmallModule, .helpBigModule').bind('mouseenter', function(){
		$(this).find('.sprite').animate({opacity: '1'}, 300);
	}).mouseleave(function(){
		$(this).find('.sprite').animate({opacity: '0'}, 300);
	});

}

landing.prototype.initTabs = function(){

	$('.smallTabs li.inactive').live('click', function(){
		var type = this.id.split('_')[0];
		var typeID = this.id.split('_')[1];

		if(type == 'fe'){
			$('#featuredEducation ul li').attr('class', 'inactive');
			$('#' + this.id).attr('class', 'active');

			$('#featuredEducation .featEventsDiv').attr('class', 'featEventsDiv tabOff');
			$('#div_fe_' + typeID).attr('class', 'featEventsDiv tabOn');

		}else if(type == 'il'){
			$('#interactiveLearning ul li').attr('class', 'inactive');
			$('#' + this.id).attr('class', 'active');

			$('#interactiveLearning .interactiveLearningDiv').attr('class', 'interactiveLearningDiv tabOff');
			$('#div_il_' + typeID).attr('class', 'interactiveLearningDiv tabOn');
		}
	})
}

$(document).ready(function(){
	landingJS = new landing();
});