// JavaScript Document
function changeTab(i){
	$("#tab1").removeClass();
	$("#tab2").removeClass();
	if (i==1){
		$("#tab1").addClass("tinmoi");
		$("#tab2").addClass("tinmoi2");
		$("#tab1_content").attr("style", "display:block");
		$("#tab2_content").attr("style", "display:none");
	}else{
		$("#tab1").addClass("tinmoi2");
		$("#tab2").addClass("tinmoi");		
		$("#tab1_content").attr("style", "display:none");
		$("#tab2_content").attr("style", "display:block");
	}
}
function start_topnav(){
	$("ul#topnav li").hover(
		function() { //Hover over event on list item
			$(this).css({ 'background' : '#1376c9 url(../images/topnav_active.gif) repeat-x'}); //Add background color + image on hovered list item
			$(this).find("span").show(); //Show the subnav
		} , 
		function() { //on hover out...
			$(this).css({ 'background' : 'none'}); //Ditch the background
			$(this).find("span").hide(); //Hide the subnav
			$("#topnav_li_1").addClass("current");
			$("#topnav_span_1").show();
		}
	);
}
function setMenuClicked(i){
	var options = { path: '/', expires: 1 };
	$.cookie('menu_a_clicked', i, options);
}
function getMenuClicked(){
	return $.cookie('menu_a_clicked');
}
function deletetMenuClicked(){
	var options = { path: '/', expires: 1 };
	$.cookie('menu_a_clicked', null, options);
}
function setMenuActive(){
	var i;
	i = getMenuClicked();
	if (i==0 || i==null) i = 1;
	$("#menu_a_" + i).addClass("active");
	$("#menu_li_" + i).addClass("active");
}
