// JavaScript Document

 jQuery.extend({
                           hiddenOne: function(obj){
                              obj.css("display","none")
                           },
                           showOne:function(obj){
                              obj.css("display","block")
                           }	
                        })
								
                        $(".tb").each(function(i){
                           $.hiddenOne($(this));
                           if(i==currentIndex)
                           {
                              $.showOne($(this));
                           }
                        })
                        $(".FourButton a").each(function(i){
									
                           $(this).data("key",i)
								
                        })
								
                        $(".FourButton a").click(function(){
							
                           var num=$(this).data("key")
									
                           $(".tb").each(function(i){
                              if(i==num)
                              {
                                 $.showOne($(this));
                              }
                              else
                              {
                                 $.hiddenOne($(this));
                              }
                           })
									
                           $(".FourButton li").each(function(i){
                              $(this).addClass("unselect")
                              $(this).removeClass("select")
                           })
                           $(this).parent().parent().removeClass("unselect")
                           $(this).parent().parent().removeClass("select")
                           $(this).parent().parent().addClass("select")

                        })
								
                        $(".FourButton li").each(function(i){
                           if(i==currentIndex)
                           {
                              $(this).removeClass("unselect");
                              $(this).removeClass("select");
                              $(this).addClass("select");
                           }
                           else
                           {
                              $(this).removeClass("unselect");
                              $(this).removeClass("select");
                              $(this).addClass("unselect");									
                           }
                        })
								
								
