// JavaScript Document

$(document).ready(function(){
	$(".add_new").click(function(){
		$(".manage_form").slideToggle("slow");						 
	})
	$(".manage_menu a").each(function(i){
		$(this).click(function(){
			$(this).addClass("active");
			$(this).siblings().removeClass("active");
			$("#manage_table_"+i).show();
			$("#manage_table_"+i).siblings().hide();
	    });
	});
	if($.browser.msie&&$.browser.version=="6.0") {	
	   $(".img").mouseover(function(){
			$(this).find(".img_footer").show();	
			$(this).find(".img_title").show();
		}).mouseout(function(){
			$(this).find(".img_footer").hide();	
			$(this).find(".img_title").hide();
		})
	}
	$(".leftarrow a").click( function() { 
		if($.browser.msie&&$.browser.version=="6.0") {	
		   $(".manage_table select").hide();
		   $(".shade").height($(document).height());
		}
	    $(".shade").toggle("slide", { direction:"up" }, "fast");
		$(".left_pop").toggle("slide", { direction:"left" }, "slow");
	});
	$(".leftbock a").click( function() { 
		if($.browser.msie&&$.browser.version=="6.0") {	
		   $(".manage_table select").hide();
		   $(".shade").height($(document).height());
		}
	    $(".shade").toggle("slide", { direction:"up" }, "fast");
		$(".left_pop").toggle("slide", { direction:"left" }, "slow");
	});
	
	$("a.close").click(function(){
		$(this).parents(".left_pop").hide();
		$(".shade").hide();
		
		if($.browser.msie&&$.browser.version=="6.0") {	
		   $(".manage_table select").show();
		}
	});
	$(".popmenu_bar .fleft a").each(function(i){
		$(this).click(function(){
			$(this).addClass("active");
			$(this).siblings("a").removeClass("active");
			$("#lab"+i).show();
			$("#lab"+i).siblings(".lab").hide();
	    });
	});
	$("a.delete").mouseover(function(){
		$(this).find("img").attr("src","/images/delete-hover.gif");						 
	}).mouseout(function(){
		$(this).find("img").attr("src","/images/delete.gif");	
    });
	$("a.next").mouseover(function(){
		$(this).find("img").attr("src","/images/next-02.png");						 
	}).mouseout(function(){
		$(this).find("img").attr("src","/images/next-03.png");	
    });
	$("a.pre").mouseover(function(){
		$(this).find("img").attr("src","/images/pre-02.png");						 
	}).mouseout(function(){
		$(this).find("img").attr("src","/images/pre-03.png");	
    });
	
	if($.browser.msie&&$.browser.version=="6.0") {	
	   $(".table_two tr").mouseover(function(){
		$(this).find("td").css("background","#000000");	
		$(this).find("td").css("color","#ffffff");
	   }).mouseout(function(){
			$(this).find("td").css("background","#ffffff");	
		    $(this).find("td").css("color","#a0a0a0");
	   })
	}
	 
	 $(".table_three tr").mouseover(function(){
		$(this).find("td:first").css("background","#000000");	
		$(this).find("td:first").css("color","#ffffff");
	   }).mouseout(function(){
			$(this).find("td:first").css("background","#ffffff");	
		    $(this).find("td:first").css("color","#a0a0a0");
	   })
})