﻿/**
 * 导航当前项高亮
 */
function menuHighLight(menu){
	var locationHref = window.location.href;
	var $menus = $(menu).find('a');
	$menus.not(':first').each(function(){
		if(locationHref.indexOf(this.href) != -1){
			$(this).addClass('on');
		}
	});
}
$(function(){
    $("#menu ul li").hover(function(){
      $(this).children("ul").show();
     },function(){
      $(this).children("ul").hide();
     })
     $("#menu ul li ul li").hover(function(){
       $(this).css("background","#ccc");
     },function(){
       $(this).css("background","#f9f9f9");
     })
      $("#list_show ul li").each(function(i){
        $(this).click(function(){
        $("#case_list").show();
        $("#custom_list").hide();
        $(this).addClass("bg").siblings().removeClass("bg");
        $(".custom_list").removeClass("red_col");
        $("#case_list").children("div").eq(i).show().siblings().hide();
       })
       })
      $(".custom_list").click(function(){
      $(this).addClass("red_col").siblings().removeClass("red_col");
       $("#custom_list").show();
       $("#case_list").hide();
       $("#list_show ul li").removeClass("bg");
      })
      $("#case_list table tr td:first-child").css({"text-align":"center","background":"#f2f5f0"});
      $("#case_list table tr:first-child").css({"font-size":"12px","font-weight":"bold","color":"#666"});
      $(".img_small1 img").each(function(i){
          $(this).mouseover(function(){
          $(this).parent().siblings(".img_big").children("img").eq(i).show().siblings().hide();
          $(this).parent().siblings(".img_word").children("h2").eq(i).show().siblings().hide();
        })
      })
     $(".img_small2 img").each(function(i){
          $(this).mouseover(function(){
          $(this).parent().siblings(".img_big").children("img").eq(i).show().siblings().hide();
          $(this).parent().siblings(".img_word").children("h2").eq(i).show().siblings().hide();
        })
      })
      $(".img_small3 img").each(function(i){
          $(this).mouseover(function(){
          $(this).parent().siblings(".img_big").children("img").eq(i).show().siblings().hide();
          $(this).parent().siblings(".img_word").children("h2").eq(i).show().siblings().hide();
        })
      })
      $(".show").each(function(){
     $(this).children("table:gt(1)").hide();
      })
      $(".show p").click(function(){
        $(this).siblings("table:gt(1)").show();
        $(this).hide();
      })
      $(".show img").width(200).height(50);
});
jQuery(function($){
	menuHighLight("#menu");
});
//屏蔽右键
function stop(){
	//return false;//iablee,20110915去掉右键屏蔽
}
document.oncontextmenu = stop;
document.onselectstart = stop;
document.onsdragstart = stop;
