
$(document).ready(function() {
	$('.black').hover(function(){
	    $('.ms').fadeOut();
	    $('.blackm').fadeIn();
	});
	$('.grey').hover(function(){
	    $('.ms').fadeOut();
	    $('.greym').fadeIn();
	});
	$('.green').hover(function(){
	    $('.ms').fadeOut();
	    $('.greenm').fadeIn();
	});
	$('.red').hover(function(){
	    $('.ms').fadeOut();
	    $('.redm').fadeIn();
	});
	$('.violet').hover(function(){
	    $('.ms').fadeOut();
	    $('.violetm').fadeIn();
	});
	$('.yellow').hover(function(){
	    $('.ms').fadeOut();
	    $('.yellowm').fadeIn();
	});
	$('.magenta').hover(function(){
	    $('.ms').fadeOut();
	    $('.magentam').fadeIn();
	});
	$('.blue').hover(function(){
	    $('.ms').fadeOut();
	    $('.bluem').fadeIn();
	});
	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});
});

