$(document).ready(function(){
	$('#datepicker').DatePicker({
		format:'d-m-Y',
		date: $('#datepicker').attr('rel'),
		position: 'bottom',
		onChange: function(formated, dates){
			$('#datepicker').val(formated);
			$('#datepicker').DatePickerHide();
			var lang = $('#datepicker').attr('alt');
			window.location = '/'+lang+'/news/date/'+formated;
		}
	})
	
	$('#menu li').mouseover(function() {
		$(this).children("ul").removeClass('none');
	})
	$('#menu li').mouseout(function() {
		$(this).children("ul").addClass('none');
	})
});

$(function(){
/*Sliding the 1st tabs with animation */
	$("#tab2").click(function(){
		$("#tab1_1").hide();	
		$("#tab1_3").hide();	
		$("#tab1 a").removeClass();	
		$("#tab3 a").removeClass();		
		$("#tab1_2").show("slow");
		$("#tab2 a").addClass("active");		
	});
	
	$("#tab3").click(function(){
		$("#tab1_1").hide();	
		$("#tab1_2").hide();	
		$("#tab1 a").removeClass();	
		$("#tab2 a").removeClass();		
		$("#tab1_3").show("slow");
		$("#tab3 a").addClass("active");		
	});
	
	$("#tab1").click(function(){
		$("#tab1_2").hide();	
		$("#tab1_3").hide();	
		$("#tab2 a").removeClass();	
		$("#tab3 a").removeClass();		
		$("#tab1_1").show("slow");
		$("#tab1 a").addClass("active");		
	});
	/*Sliding the 2nd tabs with animation */
		$("#tab5").click(function(){
		$("#tab2_1").hide();	
		$("#tab2_3").hide();	
		$("#tab4 a").removeClass();	
		$("#tab6 a").removeClass();		
		$("#tab2_2").show("slow");
		$("#tab5 a").addClass("active");		
	});
	
	$("#tab6").click(function(){
		$("#tab2_1").hide();	
		$("#tab2_2").hide();	
		$("#tab4 a").removeClass();	
		$("#tab5 a").removeClass();		
		$("#tab2_3").show("slow");
		$("#tab6 a").addClass("active");		
	});
	
	$("#tab4").click(function(){
		$("#tab2_2").hide();	
		$("#tab2_3").hide();	
		$("#tab5 a").removeClass();	
		$("#tab6 a").removeClass();		
		$("#tab2_1").show("slow");
		$("#tab4 a").addClass("active");		
	});
	/*Sliding the 3rd tabs with animation */
		$("#tab7").click(function(){
		$("#tab3_2").hide();	
		$("#tab3_3").hide();	
		$("#tab8 a").removeClass();	
		$("#tab9 a").removeClass();		
		$("#tab3_1").show("slow");
		$("#tab7 a").addClass("active");		
	});
	
	$("#tab8").click(function(){
		$("#tab3_1").hide();	
		$("#tab3_3").hide();	
		$("#tab7 a").removeClass();	
		$("#tab9 a").removeClass();		
		$("#tab3_2").show("slow");
		$("#tab8 a").addClass("active");		
	});
	
	$("#tab9").click(function(){
		$("#tab3_2").hide();	
		$("#tab3_1").hide();	
		$("#tab7 a").removeClass();	
		$("#tab8 a").removeClass();		
		$("#tab3_3").show("slow");
		$("#tab9 a").addClass("active");		
	});
});
