
$(document).ready(function() { 

	$("#m1").mouseover(function(e){
			
			$("#m1").addClass("DQ_menu"+1+"_off").removeClass("DQ_menu"+1+"_on");
			$("#subMenu_1").hide();
			for(j = 2; j<=7; j++){
				$("#m"+j).addClass("DQ_menu"+j+"_on").removeClass("DQ_menu"+j+"_off");
				if(j != 7){
					$("#subMenu_"+j).hide();
				}
			}
	});

	$("#m2").mouseover(function(e){
			$("#m2").addClass("DQ_menu2_off").removeClass("DQ_menu2_on");
			$("#subMenu_1").show();
			for(j = 1; j<=7; j++){
				
				
				if(j != 7 && j != 1){
					$("#subMenu_"+j).hide();
				}
				
				if(j == 2){
					continue;
				}
				$("#m"+j).addClass("DQ_menu"+j+"_on").removeClass("DQ_menu"+j+"_off");
			}
	});
	
	$("#m3").mouseover(function(e){
			$("#m3").addClass("DQ_menu3_off").removeClass("DQ_menu3_on");
			$("#subMenu_2").show();
			for(j = 1; j<=7; j++){
				
				if(j != 7 && j != 2){
					$("#subMenu_"+j).hide();
				}
				if(j == 3){
					continue;
				}
				$("#m"+j).addClass("DQ_menu"+j+"_on").removeClass("DQ_menu"+j+"_off");
			}
	});
	
	$("#m4").mouseover(function(e){
			$("#m4").addClass("DQ_menu4_off").removeClass("DQ_menu4_on");
			$("#subMenu_3").show();
			for(j = 1; j<=7; j++){
				
				if(j != 7 && j != 3){
					$("#subMenu_"+j).hide();
				}
				if(j == 4){
					continue;
				}
				$("#m"+j).addClass("DQ_menu"+j+"_on").removeClass("DQ_menu"+j+"_off");
			}
	});
	
	$("#m5").mouseover(function(e){
			$("#m5").addClass("DQ_menu5_off").removeClass("DQ_menu5_on");
			$("#subMenu_4").show();
			for(j = 1; j<=7; j++){
				
				if(j != 7 && j != 4){
					$("#subMenu_"+j).hide();
				}
				if(j == 5){
					continue;
				}
				$("#m"+j).addClass("DQ_menu"+j+"_on").removeClass("DQ_menu"+j+"_off");
			}
	});
	
	$("#m6").mouseover(function(e){
			$("#m6").addClass("DQ_menu6_off").removeClass("DQ_menu6_on");
			$("#subMenu_5").show();
			for(j = 1; j<=7; j++){
				
				if(j != 7 && j != 5){
					$("#subMenu_"+j).hide();
				}
				if(j == 6){
					continue;
				}
				$("#m"+j).addClass("DQ_menu"+j+"_on").removeClass("DQ_menu"+j+"_off");
			}
	});
	
	$("#m7").mouseover(function(e){
			$("#m7").addClass("DQ_menu7_off").removeClass("DQ_menu7_on");
			//$("#subMenu_6").show();
			for(j = 1; j<=7; j++){
				
				if(j != 7 && j != 6){
					$("#subMenu_"+j).hide();
				}
				
				if(j == 7){
					continue;
				}
				$("#m"+j).addClass("DQ_menu"+j+"_on").removeClass("DQ_menu"+j+"_off");
			}
	});
	
  	 $("#DQ_body,.DQ_right,.xcontent,#DQ_conts").mouseover(function(e){
		 
			for(j = 1; j<=7; j++){
				$("#m"+j).addClass("DQ_menu"+j+"_on").removeClass("DQ_menu"+j+"_off");
				if(j != 7){
					$("#subMenu_"+j).hide();
				}
			}
			
			$("#m"+$("#currmenuid").val()).addClass("DQ_menu"+$("#currmenuid").val()+"_off").removeClass("DQ_menu"+$("#currmenuid").val()+"_on");

			
	 });
});


function menucre(){
		
document.writeln(" <!-- 子菜单一start -->");
document.writeln("        <div class=\"sub1_container ext_uv\" id=\"\" >");
document.writeln("           ");
document.writeln("           <div class=\"xmenustyle1\">                    ");
document.writeln("                    <div class=\"xmenustyle2\">");
document.writeln("");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"brandstory.html\">品牌故事</a>");
document.writeln("                    </div>");
document.writeln("                    ");
document.writeln("                    <div class=\"ext_uv\">");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"newslist.html\">迪巧新闻</a>");
document.writeln("                    </div>");
document.writeln("            </div>");
document.writeln("            ");
document.writeln("             <div class=\"xmenustyle1\">                    ");
document.writeln("                    <div class=\"xmenustyle2 ext_uv\">");
document.writeln("");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"honor.html\">迪巧荣誉</a>");
document.writeln("                    </div>");
document.writeln("                    ");
document.writeln("                    <div class=\"ext_uv\">");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"actiongy.html\">迪巧公益活动</a>");
document.writeln("                    </div>");
document.writeln("            </div>");
document.writeln("            ");
document.writeln("        </div>");
document.writeln("        <!-- 子菜单一 end-->                <!-- 子菜单二start -->");
document.writeln("        <div class=\"sub2_container\" id=\"subMenu_2\">");
document.writeln("            <div class=\"float_left sub_menu_leftbg\"></div>");
document.writeln("            <div class=\" float_left sub2_center_width sub_center_height sub_menu_centerbg\" sizcache=\"1\" sizset=\"4\" style=\"width:950px;\">");
document.writeln("                <div class=\"nounderlinkstyle height_75 marginTop_12 floatLeft\" sizcache=\"1\" sizset=\"4\" style=\"margin-left:14px; width:240px;\">");
document.writeln("                    <div class=\"width_85px float_left\" sizcache=\"1\" sizset=\"4\"><A href=\"wdg.html\" sizcache=\"1\" sizset=\"4\"><IMG src=\"images/menu/sub2_1.jpg\" width=77 height=75></A></div>");
document.writeln("                    <div class=ext_menu_i1>");
document.writeln("                        <div class=ext_menu_f2><A class=\"DQ_subMenuA\" href=\"wdg.html\">迪巧®（维D钙咀嚼片）</A></div>");
document.writeln("                        <div class=\" ext_menu_f1\">专为成人设计</div>");
document.writeln("                    </div>");
document.writeln("                    <div class=\"float_left \" sizcache=\"1\" sizset=\"5\"><IMG src=\"images/menu/dottedline.jpg\"></div>");
document.writeln("                </div>");
document.writeln("                <div class=\"float_left nounderlinkstyle height_75 marginTop_12\" sizcache=\"1\" sizset=\"6\" style=\"margin-left:0px; width:250px;\">");
document.writeln("                    <div class=\"width_85px float_left\" sizcache=\"1\" sizset=\"6\"><A href=\"xekl.html\" sizcache=\"1\" sizset=\"6\"><IMG src=\"images/menu/sub2_2.jpg\" width=77 height=75></A></div>");
document.writeln("                    <div class=\"ext_menu_i1\">");
document.writeln("                        <div class=\"ext_menu_f2 nounderlinkstyle\"><A class=\"DQ_subMenuA\" href=\"xekl.html\">迪巧®（小儿碳酸钙D3颗粒）</A></div>");
document.writeln("                        <div class=\"ext_menu_f1 nounderlinkstyle\">专为0~3岁宝宝设计</div>");
document.writeln("                    </div>");
document.writeln("                    <div class=\"float_left\" sizcache=\"1\" sizset=\"7\"><IMG src=\"images/menu/dottedline.jpg\" style=\"margin-left:14px;\"></div>");
document.writeln("                </div>");
document.writeln("                <div class=\"float_left nounderlinkstyle height_75 marginTop_12\" sizcache=\"1\" sizset=\"8\" style=\"width:230px; overflow:hidden;\">");
document.writeln("                    <div class=\"width_85px float_left\" sizcache=\"1\" sizset=\"8\"><A href=\"etwdg.html\" sizcache=\"1\" sizset=\"8\"><IMG src=\"images/menu/sub2_3.jpg\" width=77 height=75></A></div>");
document.writeln("                    <div class=ext_menu_i1>");
document.writeln("                        <div class=ext_menu_f2><A class=\"DQ_subMenuA\" href=\"etwdg.html\">迪巧®（儿童维D钙咀嚼片）</A></div>");
document.writeln("                        <div class=\" ext_menu_f1\">专为3岁以上儿童设计</div>");
document.writeln("                    </div>");
document.writeln("                    <div class=\"float_left \" sizcache=\"1\" sizset=\"5\"><IMG src=\"images/menu/dottedline.jpg\"></div>");
document.writeln("                </div>");
document.writeln("                <div class=\"float_left nounderlinkstyle height_75 marginTop_12\" sizcache=\"1\" sizset=\"8\" style=\"width:200px; margin-left:10px;\">");
document.writeln("                    <div class=\"width_85px float_left\" sizcache=\"1\" sizset=\"8\"><A href=\"honor.html\" sizcache=\"1\" sizset=\"8\"><IMG src=\"images/menu/sub2_4.jpg\" width=77 height=75></A></div>");
document.writeln("                    <div class=\"ext_menu_i1\" style=\"width:100px;\">");
document.writeln("                        <div class=\"ext_menu_f2\"><A class=\"DQ_subMenuA\" href=\"honor.html\">迪巧荣誉</A></div>");
document.writeln("                        <div class=\"ext_menu_f1\">迪巧获得的荣誉</div>");
document.writeln("                    </div>");
document.writeln("                </div>");
document.writeln("            </div>");
document.writeln("            <div class=\" float_left sub_menu_rightbg\"></div>");
document.writeln("        </div>");
document.writeln("        <!-- 子菜单二 end-->");
document.writeln("        <!-- 子菜单四start -->");
document.writeln("        <div class=\"sub4_container\" id=\"subMenu_4\" >");
document.writeln("            <div class=\"xmenustyle1\">                    ");
document.writeln("                    <div class=\"xmenustyle2\">");
document.writeln("");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"faq.html\">常见问题库</a>");

document.writeln("                    </div>");
document.writeln("                    ");
document.writeln("                    <div>");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"customertel.html\">咨询订购热线</a>");
document.writeln("                    </div>");
document.writeln("            </div>");
document.writeln("            ");
document.writeln("             <div class=\"xmenustyle1\">                    ");

document.writeln("                    <div class=\"xmenustyle2\">");
document.writeln("");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"t.html\">迪巧微博</a>");
document.writeln("                    </div>");

document.writeln("                    <div>");
document.writeln("");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"afterser1.html\">留言板</a>");
document.writeln("                    </div>");

document.writeln("                    ");
document.writeln("                  ");
document.writeln("                  ");
document.writeln("            </div>");
document.writeln("         </div>");
document.writeln("        <!-- 子菜单四 end-->");
document.writeln("        <!-- 子菜单五start -->");
document.writeln("        <div class=\"sub5_container\" id=\"subMenu_5\">");
document.writeln("            ");
document.writeln("             <div class=\"xmenustyle1\">                    ");
document.writeln("                    <div class=\"xmenustyle2\">");
document.writeln("");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"chengrenbugai.html\">成人补钙");
document.writeln("</a>");
document.writeln("                    </div>");
document.writeln("                    ");
document.writeln("                    <div>");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"ertongbugai.html\">儿童补钙</a>");
document.writeln("                    </div>");
document.writeln("            </div>");
document.writeln("            ");
document.writeln("             <div class=\"xmenustyle3\">                    ");
document.writeln("                    <div class=\"xmenustyle2\">");
document.writeln("");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"baobaobugai.html\">宝宝补钙");
document.writeln("</a>");
document.writeln("                    </div>");
document.writeln("                    ");
document.writeln("                    <div class=\"xmenustyle2 \">");
document.writeln("");
document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
document.writeln("                        <a class='DQ_subMenuA' href=\"###\">巧博士答疑</a>");
document.writeln("                    </div>");
document.writeln("                  ");
document.writeln("                  ");
document.writeln("            </div>");
document.writeln("            ");
document.writeln("        </div>");
document.writeln("        <!-- 子菜单五 end-->");
document.writeln("        <!-- 子菜单六start -->");
document.writeln("        <div class=\"sub6_container\" id=\"subMenu_6\" >" );
//document.writeln("            <div class=\"xmenustyle1\">                    ");
//document.writeln("                    <div class=\"xmenustyle2\">");
//document.writeln("");
//document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
//document.writeln("                        <a class='DQ_subMenuA' href=\"afterser1.html\">留言板</a>");
//document.writeln("                    </div>");
//document.writeln("                    ");
//document.writeln("                    <div>");
//document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
//document.writeln("                        <a class='DQ_subMenuA' href=\"mail.html\">客服邮箱</a>");
//document.writeln("                    </div>");
//document.writeln("            </div>");
//document.writeln("            ");
//document.writeln("             <div class=\"xmenustyle1\">                    ");
//document.writeln("                    <div class=\"xmenustyle2\">");
//document.writeln("");
//document.writeln("                        <img src=\"images/menu/arrow.gif\" />");
//document.writeln("                        <a class='DQ_subMenuA' href=\"customertel.html\">客服电话</a>");
//document.writeln("                    </div>");
//document.writeln("                    ");
//document.writeln("                  ");
//document.writeln("                  ");
//document.writeln("            </div>");
document.writeln("        </div>");
document.writeln("        <!-- 子菜单六 end-->");
}

/*
*Tabcount,pre,currId分别是选项卡的个数,内容前缀,当前的
*例如:tabSwitch(5,'sub_0',1)
*/
function tabSwitch(Tabcount,pre,currId){
	var id=pre+currId;
	var pre2=pre+'0';
	document.getElementById(id).style.display="block";
	for(var i=1; i<=Tabcount; i++){
		if(i==currId){
			document.getElementById(pre2+currId).className='on';
			continue;
		}else{
			document.getElementById(pre2+i).className='off';
			document.getElementById(pre+i).style.display="none";
		}
	}
}


/***/
	var currimgid = 1;
	$(function(){
		//照片展示
		var total_num = $(".DQ_proimgx img").length;
		$("#xnext").click(function(){
			$("#simg_"+currimgid).removeClass("ed");
			currimgid++;
			if(currimgid > total_num){
				currimgid = 1;
			}	
			var cur_img = $("#simg_"+currimgid).attr("bimg");
			$("#xbimg").attr("src",cur_img);
			$("#simg_"+currimgid).addClass("ed");
		});
		$(".DQ_proimgx img").click(function(){
			var index = $(".DQ_proimgx img").index($(this)); 
			$("#simg_"+currimgid).removeClass("ed");
			currimgid = index+1;
			var cur_img = $("#simg_"+currimgid).attr("bimg");
			$("#xbimg").attr("src",cur_img);
			$("#simg_"+currimgid).addClass("ed");
		});
		$("#xpre").click(function(){
			$("#simg_"+currimgid).removeClass("ed");
			currimgid--;
			if(currimgid <=0){
				currimgid = total_num;
			}	
			var cur_img = $("#simg_"+currimgid).attr("bimg");
			$("#xbimg").attr("src",cur_img);
			$("#simg_"+currimgid).addClass("ed");
		});
	});


/**
*author:xwuxin
*email:xwuxin@xwuxin.com
*website:www.xwuxin.com
**/
var sina_tstr = "http://v.t.sina.com.cn/share/share.php";
var kaixin_tstr="http://www.kaixin001.com/repaste/share.php";
var renren_tstr="http://share.renren.com/share/buttonshare.do";
var qqspace_tstr="http://sns.qzone.qq.com/"+
"cgi-bin/qzshare/cgi_qzshare_onekey";
var qqtag_tstr="http://shuqian.qq.com/post";
var douban_tstr="http://www.douban.com/recommend/";
var cangbaidu_tstr="http://cang.baidu.com/do/add";
var gbookmark_tstr="http://www.google.com/bookmarks/mark";
var gbuzz_tstr="http://www.google.com/reader/link";
var delicious_tstr="http://del.icio.us/post";
var baiduiba_tstr="http://tieba.baidu.com/i/sys/share";  
var qqmicro_tstr="http://v.t.qq.com/share/share.php";  


var target_str='_blank';
//打开窗口的大小
var window_size="scrollbars=no,width=600,height=450,"
+"left=75,top=20,status=no,resizable=yes";

//分享至新浪
function share_sina(){
	window.open(sina_tstr+'?title='+getencodewebtitle()+'&amp;url='
	+getencodelochref()+'&amp;rcontent=',target_str,window_size);
}

//分享至开心
function share_kaixin(){
	window.open(kaixin_tstr+'?rtitle='+getencodewebtitle()+'&amp;rurl='
	+getencodelochref()+'&amp;rcontent=',target_str,window_size);
}

//分享至人人
function share_renren(){
	window.open(renren_tstr+'?title='+getencodewebtitle()+
	'&amp;link='+getencodelochref()+'&amp;content=',target_str,window_size);
}

//分享至QQ空间
function share_qqspace(){
	window.open(qqspace_tstr+'?url='+ getencodelochref()+
	'&title='+getencodewebtitle(),target_str,window_size);
}

//分享至qq书签
function share_qqtag(){
	window.open(qqtag_tstr+'?title='+getencodewebtitle()+
	'&amp;uri='+getencodelochref()+
	'&amp;jumpback=2&amp;noui=1','favit');
}

//分享至豆瓣
function share_douban(){
	window.open(douban_tstr+'?url='+getencodelochref()+
	'& title='+getencodewebtitle(),target_str,window_size);
}

//分享至百度搜藏
function share_cangbaidu(){
	window.open(cangbaidu_tstr+'?it='
	+getencodewebtitle()+'&iu='+getencodelochref()+
	'&dc=&fr=js#nw=1',target_str,window_size);
}

//分享至google书签
function share_gbookmark(){
	window.open(gbookmark_tstr+'?op=add&bkmk='
	+getencodelochref()+'&title='+getencodewebtitle());
}

//分享至google buzz
function share_gbuzz(){
	window.open(gbuzz_tstr+'?url='
	+getencodelochref()+'&title='+getencodewebtitle());
}

//分享至Delicious书签
function share_delicious(){
	window.open(delicious_tstr+'?url='
	+getencodelochref()+'&title='
	+encodeURIComponent(document.title)+'&notes=');
}

//分享至百度说吧
function share_baidusay(){
	window.location.href="http://t.baidu.com/";
}

//分享至百度i贴吧
function share_baiduiba(){
	window.open(baiduiba_tstr+'?link='+getencodelochref()+'&title='+encodeURIComponent(document.title)+'&notes=',target_str,window_size);  

}

//分享至飞信
function share_fetion(){
	window.open('https://feixin.10086.cn/account/login?returnurl=http://space.feixin.10086.cn/api/share?source=sharelink&title='+getencodewebtitle()+'&url='+getencodelochref(),target_str,window_size);
	
}

//分享天涯社区
function share_tiaya(){
	window.open('http://co.tianya.cn/third/export/thirdLoginDiv.jsp?fowardURL=http://share.tianya.cn/openapp/restpage/activity/appendDiv.jsp?app_id=bshare&ccTitle='+document.title+'&ccUrl='+document.location,target_str,window_size);
}

//分享到腾讯微博
function share_qqmicro(){
	 window.open(qqmicro_tstr+'?title='+encodeURI(document.title)+'&url='+encodeURIComponent(document.location),target_str,window_size); 	
}

function getencodelochref(){
	return encodeURIComponent(document.location.href);
}

function getencodewebtitle(){
	return encodeURIComponent(document.title.substring(0,76));
}


function showvideo(no,id,param){
	var p;
	p=param || {width:"306",height:"230"};
	$('#'+id).html("Loadding...");
	var str ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width='+p.width+' height='+p.height+' align="middle">';
    str +='<param name="allowScriptAccess" value="sameDomain" />';
    str +='<param name="movie" value='+no+' />';
    str +='<param name="quality" value="high" />';
	str +='<param name="WMODE" value="Opaque" />';
    str +='<embed';
    str +=' src='+no;
    str +=' width='+p.width;
    str +=' height='+p.height;
    str +=' quality="high"';
    str +=' swLiveConnect=true';
    str +=' align="middle"';
    str +=' allowScriptAccess="sameDomain"';
    str +=' type="application/x-shockwave-flash"';
    str +=' pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	str +='</object>';
	$('#'+id).html(str);
}	



