$(document).ready(function() {
	$('#product').css('backgroundColor',  '#5dcbff');
		$('#pmore').css('backgroundColor',  '#5dcbff');
	$('#content_menu a').click(function(e){
		e.preventDefault();	
		var i = this.id.substr(1);
		if( $('#pmore a').attr('href') != 'cat/'+i ) {
			var i2 = $(this).attr('class').substr(1);
			slideSwitch(i2-1);
			var id = this.id.substr(1) % 7;
			switch(id)
			{
				case 2:
					$('#product').animate({ backgroundColor: '#55c2fe' }, 500);
					$('#pmore').animate({ backgroundColor: '#55c2fe' }, 500);
				break;
				case 3:
					$('#product').animate({ backgroundColor: '#4bb8f4' }, 500);
					$('#pmore').animate({ backgroundColor: '#4bb8f4' }, 500);
				break;
				case 4:
					$('#product').animate({ backgroundColor: '#40aee9' }, 500);
					$('#pmore').animate({ backgroundColor: '#40aee9' }, 500);
				break;
				case 5:
					$('#product').animate({ backgroundColor: '#3eace9' }, 500);
					$('#pmore').animate({ backgroundColor: '#3eace9' }, 500);
				break;
				case 6:
					$('#product').animate({ backgroundColor: '#34a2df' }, 500);
					$('#pmore').animate({ backgroundColor: '#34a2df' }, 500);
				break;
				case 0:
					$('#product').animate({ backgroundColor: '#2998d4' }, 500);
					$('#pmore').animate({ backgroundColor: '#2998d4' }, 500);
				break;
				case 1:
				default:
					$('#product').animate({ backgroundColor: '#2290cb' }, 500);
					$('#pmore').animate({ backgroundColor: '#2290cb' }, 500);
			}
			$('#pmore a').attr('href', 'cat/'+i);
		} else {
			//$('#pmore a').trigger( 'click' );
			//alert("test");
			window.location = 'cat/'+i;
		}	
	});
});

