﻿jQuery.noConflict();
jQuery(document).ready(function(){
    DefaultObject.init();
});

var DefaultObject = {
    bright_diamond_drawer:new Object,
    init:function()
    {
       this.bright_diamond_drawer = jQuery(".s_nav ul li");
        if (this.bright_diamond_drawer.length>0)  // 存在璀璨钻石部分
        {
            this.initBrightDiamond();
        }
        if(jQuery(".cont2_01_close").length>0)
        {
            this.initLeftCategoryTree();
        }
        if (jQuery(".tit_07 ul li").length >0)
        {
            this.initGoodsService();
        }
        if (jQuery(".tit_01_2 li").length >0)
        {
            this.initHotInfo();
        }
    },
    initBrightDiamond:function()  // 初始化璀璨珠宝
    {            
        this.bright_diamond_drawer.each(function(index, el){
            jQuery(el).mouseover(function(){
                jQuery(".s_nav ul li").each(function(k, ele){
			    jQuery(ele).removeClass("current");
		        });
		        jQuery(".cont_03").each(function(i, el){
		            jQuery(el).css('display','none');
		            if (i==index){
		                jQuery(el).css('display','block');
		            }
		        });
		        jQuery(el).addClass('current');
            });
        });
    },
    initLeftCategoryTree:function()
    {
        jQuery(".cont2_01_close").each(function(index, el){
            jQuery(el).mouseover(function(){
		        jQuery(".cont2_01_open").each(function(i, el){
		            jQuery(el).css('display','none');
		            if (i==index){
		                jQuery(el).css('display','block');
		            }
		        });
            });
        });
    },
   initGoodsService: function ()
   {
        jQuery(".tit_07 ul li").each(function(index, el){
            jQuery(el).mouseover(function(){
                jQuery(".tit_07 ul li").each(function(k, ele){
			    jQuery(ele).removeClass("current");
		        });
		        jQuery(".cont_07").each(function(i, el){
		            jQuery(el).css('display','none');
		            if (i==index){
		                jQuery(el).css('display','block');
		            }
		        });
		        jQuery(el).addClass('current');
            });
        });
   },
   initHotInfo:function ()
   {
        jQuery(".tit_01_2 li").each(function(index, el){
            jQuery(el).mouseover(function(){
                jQuery(".tit_01_2 li").each(function(k, ele){
			    jQuery(ele).removeClass("tit_01_2_a");
			    jQuery(ele).addClass("tit_01_2_b");
		        });
		        jQuery(".cont_06").each(function(i, el){
		            jQuery(el).css('display','none');
		            if (i==index){
		                jQuery(el).css('display','block');
		            }
		        });
		        jQuery(el).addClass('tit_01_2_a');
            });
        });
   }
}