$(function(){
   $("#tsMb div:not(:first)").hide();
   $("#titOp li").each(function(index){
       $(this).mouseover(
      function(){
  $("#titOp li.current").removeClass("current");
     $(this).addClass("current");
     $("#tsMb > div:visible").hide();
     $("#tsMb div:eq(" + index + ")").show();
   })
   })
})

$(function(){
   $("#tsMb01 div:not(:first)").hide();
   $("#titOp01 li").each(function(index){
       $(this).mouseover(
      function(){
  $("#titOp01 li.current").removeClass("current");
     $(this).addClass("current");
     $("#tsMb01 > div:visible").hide();
     $("#tsMb01 div:eq(" + index + ")").show();
   })
   })
})


$(function(){
   $("#tsMb02 div:not(:first)").hide();
   $("#titOp02 li").each(function(index){
       $(this).mouseover(
      function(){
  $("#titOp02 li.current").removeClass("current");
     $(this).addClass("current");
     $("#tsMb02 > div:visible").hide();
     $("#tsMb02 div:eq(" + index + ")").show();
   })
   })
})

$(function(){
   $("#tsMb03 div:not(:first)").hide();
   $("#titOp03 li").each(function(index){
       $(this).mouseover(
      function(){
  $("#titOp03 li.current").removeClass("current");
     $(this).addClass("current");
     $("#tsMb03 > div:visible").hide();
     $("#tsMb03 div:eq(" + index + ")").show();
   })
   })
})

$(function(){
   $("#tsMb04 div:not(:first)").hide();
   $("#titOp04 li").each(function(index){
       $(this).mouseover(
      function(){
  $("#titOp04 li.current").removeClass("current");
     $(this).addClass("current");
     $("#tsMb04 > div:visible").hide();
     $("#tsMb04 div:eq(" + index + ")").show();
   })
   })
})


function menuFix() {
        var sfEls = document.getElementById("nav").getElementsByTagName("li");
        for (var i=0; i<sfEls.length; i++) {
                sfEls[i].onmouseover=function() {
                this.className+=(this.className.length>0? " ": "") + "sfhover";
                }
                sfEls[i].onMouseDown=function() {
                this.className+=(this.className.length>0? " ": "") + "sfhover";
                }
                sfEls[i].onMouseUp=function() {
                this.className+=(this.className.length>0? " ": "") + "sfhover";
                }
                sfEls[i].onmouseout=function() {
                this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), 
"");
                }
        }
}
window.onload=menuFix;

