var slider;
/*邮箱或账号注册开关*/
var ifEmailReg = "off";
var mobHeight;
$(function () {
    wmNavFun(); // 手机端导航方法
    mobHeight=$(window).height();
    moSeachAll();//移动端搜索页面页面
    OpenUrl();
});
//移动端导航显示与隐藏
var wmNavFun = function() {
    var wmBtn = $(".mw-nav-btn"),
        hmMask = $(".h-mobile-mask"),
        wH = $(window).height();
    $(".head-mobile").css("height", wH+"px");
    wmBtn.click(function() {
        if (!wmBtn.hasClass("mw-tap")) {
            $(this).addClass("mw-tap");
            $("html").addClass("active");
            hmMask.show().css("opacity","1");
        } else {
            $(this).removeClass("mw-tap");
            $("html").removeClass("active");
            hmMask.css("opacity","0").hide();
        }
    });
    hmMask.click(function() {
        if(!hmMask.is(":hidden")) {
            wmBtn.removeClass("mw-tap");
            $("html").removeClass("active");
            hmMask.css("opacity","0").hide();
        }
    });
};
//向上滚动方法
var upSlideFun = function(od) {
    var _upWrap = $(od),
        _sTime = 5000,
        _moving;
    _upWrap.hover(function() {
        clearInterval(_moving);
    }, function() {
        _moving = setInterval(function() {
            var _mC = _upWrap.find("li:first");
            var _mH = _mC.height();
            _mC.animate({"margin-top" : -_mH + "px"}, 600, function() {
                _mC.css("margin-top", 0).appendTo(_upWrap);
            });
        }, _sTime);
    }).trigger("mouseleave");
};

//滚动定位
function cTabFun(op) {
    var cTab = op;
    cTab.each(function() {
        var _this = $(this),
            _tName = _this.attr("name");
        _this.click(function() {
            _this.parent().parent().find("a").removeClass("current");
            _this.addClass("current").siblings().removeClass("current");
            //$("html,body").animate({"scrollTop":$("."+_tName+"-content").offset().top}, 500);
        })
    })
}
// 课程分享
function shareShow() {
    //share show
    $(".kcShare").hover(function() {
        var _this = $(this);
        _this.stop().animate({"width" : "205px"}, 200);
        _this.siblings("span").css({"width" : "50px"});
        _this.children("#bdshare").stop().animate({"right" : "0"}, 200);
    }, function() {
        var _this = $(this);
        _this.stop().animate({"width" : "50px"}, 200);
        _this.children("#bdshare").stop().animate({"right" : "-160px"}, 200);
    });
}

//选项卡公共方法
function cardChange(oTitle, oCont, current, callback) {
    var oTitle = $(oTitle),
        oCont = $(oCont),
        _index;
    oTitle.click(function() {
        _index = oTitle.index(this);
        $(this).addClass(current).siblings().removeClass(current);
        oCont.eq(_index).show().siblings().hide();
        if (typeof callback === "function") {
            callback();
        }
    }).eq(0).click();
}
// scrollLoad 滚动响应加载调用图片方法
var scrollLoad = (function (options) {
    var defaults = (arguments.length == 0) ? { src: 'xSrc', time: 500} : { src: options.src || 'xSrc', time: options.time ||500};
    var camelize = function (s) {
        return s.replace(/-(\w)/g, function (strMatch, p1) {
            return p1.toUpperCase();
        });
    };
    this.getStyle = function (element, property) {
        if (arguments.length != 2) return false;
        var value = element.style[camelize(property)];
        if (!value) {
            if (document.defaultView && document.defaultView.getComputedStyle) {
                var css = document.defaultView.getComputedStyle(element, null);
                value = css ? css.getPropertyValue(property) : null;
            } else if (element.currentStyle) {
                value = element.currentStyle[camelize(property)];
            }
        }
        return value == 'auto' ? '' : value;
    };
    var _init = function () {
        if(document.getElementById("aCoursesList")==null){
            return;
        }
        var offsetPage = window.pageYOffset ? window.pageYOffset : window.document.documentElement.scrollTop,	//滚动条滚动高度
            offsetWindow = offsetPage + Number(window.innerHeight ? window.innerHeight : document.documentElement.clientHeight),
            docImg = document.getElementById("aCoursesList").getElementsByTagName("img"),			//通过ID查找获取图片节点
            _len = docImg.length;
        if (!_len) return false;
        for (var i = 0; i < _len; i++) {
            var attrSrc = docImg[i].getAttribute(defaults.src),
                o = docImg[i], tag = o.nodeName.toLowerCase();
            if (o) {
                postPage = o.getBoundingClientRect().top + window.document.documentElement.scrollTop + window.document.body.scrollTop;
                postWindow = postPage + Number(this.getStyle(o, 'height').replace('px', ''));
                if ((postPage > offsetPage && postPage < offsetWindow) || (postWindow > offsetPage && postWindow < offsetWindow)) {	//判断元素始终在可见区域内
                    if (tag === "img" && attrSrc !== null) {
                        o.setAttribute("src", attrSrc);
                    }
                    o = null;
                }
            }
        }
        window.onscroll = function () {
            setTimeout(function () {
                _init();
            }, defaults.time);
        }
    };
    return _init();
});
//公共弹框
/*******
 *** @param dTitle : 弹框标题名称;
 *** @param index : 调用弹框的类型;
 *** index == 0 : 支付结果反馈弹出框;
 *** index == 1 : 正确提示弹出框;
 *** index == 2 : 错误提示弹出框;
 *** index == 3 : 确认提示弹出框；
 */
function dialog(dTitle,msg,index) {
	$("#tisbutt,#dClose,#qujiao").click();
    var oBg = $('<div class="bMask"></div>').appendTo($("body")),
	dialogEle = $('<div class="dialogWrap"><div class="dialog-ele"><h4 class="d-s-head pr"><a id="dClose" href="javascript:void(0)" title="关闭" class="dClose icon16 pa">&nbsp;</a><span class="d-s-head-txt">'+dTitle+'</span></h4><div class="of bg-fff"><div id="dcWrap" class="mt20 mb20 ml20 mr20 "></div></div></div></div>').appendTo($("body"));
	if(index==1){
		var result='<div class="d-tips-2"><em class="pa d-t-icon-3"></em><p class="fsize14 c-666">'+msg+'</p><div class="tac mt30"><a id="qujiao" href="javascript:void(0)" title="" class="order-submit">确定</a></div></div>'
	}else if(index==2){
		var result='<div class="d-tips-2"><em class="pa d-t-icon-2"></em><p class="fsize14 c-666">'+msg+'</p><div class="tac mt30"><a id="qujiao" href="javascript:void(0)" title="" class="order-submit">确定</a></div></div>'
	}
	$("#dcWrap").html(result);
	var dTop = (parseInt(document.documentElement.clientHeight, 10)/2) + (parseInt(document.documentElement.scrollTop || document.body.scrollTop, 10)),
	dH = dialogEle.height(),
	dW = dialogEle.width(),
	dHead = $(".dialog-ele>h4");
	dialogEle.css({"top" : (dTop-(dH/2)) , "margin-left" : -(dW/2)});
	//dHead.css({"width" : (dW-"12")}); //ie7下兼容性;
	$("#tisbutt,#dClose,#qujiao").bind("click", function() {dialogEle.remove();oBg.remove();});
   
}
function paydialog(dTitle,msg) {
	$("#tisbutt,#dClose,#qujiao").click();
    var oBg = $('<div class="bMask"></div>').appendTo($("body")),
	dialogEle = $('<div class="dialogWrap"><div class="dialog-ele"><h4 class="d-s-head pr"><a id="dClose" href="javascript:void(0)" title="关闭" class="dClose icon16 pa">&nbsp;</a><span class="d-s-head-txt">'+dTitle+'</span></h4><div class="of bg-fff"><div id="dcWrap" class="mt20 mb20 ml20 mr20 "></div></div></div></div>').appendTo($("body"));
	var result='<div class="d-tips-2 c-payerror-desc"><p class="fsize14 c-666">'+msg+'</p><div class="tac mt30 pay-error-btn"><a id="qujiao" href="javascript:disOrderSuccess()" title="" class="mr40"><em class="c-pay-btn1">&nbsp;</em><tt>重新支付</tt></a>  <a href="javascript:void(0)" onclick="chcckCoursePay()" title="" class="ml40"><em class="c-pay-btn2">&nbsp;</em><tt>已完成支付</tt></a></div></div>'
	$("#dcWrap").html(result);
	var dTop = (parseInt(document.documentElement.clientHeight, 10)/2) + (parseInt(document.documentElement.scrollTop || document.body.scrollTop, 10)),
	dH = dialogEle.height(),
	dW = dialogEle.width(),
	dHead = $(".dialog-ele>h4");
	dialogEle.css({"top" : (dTop-(dH/2)) , "margin-left" : -(dW/2)});
	//dHead.css({"width" : (dW-"12")}); //ie7下兼容性;
	$("#tisbutt,#dClose,#qujiao").bind("click", function() {dialogEle.remove();oBg.remove();});
   
}
/*
* 快捷登录/注册
* type 1 头部点击登陆 2 注册 选中
*/
function lrFun(type) {
    var phoneProving=$("#mobile_verify").val()
    var mobileProvingCodeHtml = "";//手机验证码输入
    /*如果手机验证开关打开了 把对应的手机验证的标签写到注册里*/
    if (phoneProving=="1"){
        mobileProvingCodeHtml =
            '<li>'+
            '<input id="pp-randomcode-reg" class="fl yazm-input" type="text" placeholder="请输入验证码"  name="" value="" onkeyup="$(this).next().next().next().html(\'\');" maxlength="4">'+
            '<a href="javascript:void(0)" onclick="sendMessage()" title="" class="vam ml10 disIb fl mobile-yz-btn">获取验证码</a>'+
            '<p style="clear: both;" class="lr-tip-wrap"></p>'+
            '</li>';
    }
    var oBg = $('<div class="bMask"></div>').appendTo($("body")),
        dialogEle = $('<div class="dialogWrap" style="position: absolute;overflow-x:hidden;overflow-y: auto;"><div class="dialog-ele new-loigin"><h4 class="d-s-head pr new-header"><a id="dClose" href="javascript:void(0)" title="关闭" class="dClose icon16 pa new-close">&nbsp;</a><span id="d-s-head-tab" class="d-s-head-tab"><a href="javascript:void(0)" class="current">登录</a><a href="javascript:void(0)">注册</a></span></h4><div class="of"><div id="lrEleWrap" class="mt10 mb20 ml50 mr50"></div></div></div></div>').appendTo($("body")),
        rlEle = [
            '<div id="d-s-head-cont" class="lrWrap">'+
                '<section class="dis e-login-ele">'+
                    '<div class="mt10">'+
                        '<p class="e-l-jy"></p>'+
                    '</div>'+
                    '<div>'+
                        '<ol class="e-login-options">'+
                            '<li>'+
                                '<em class="lo-ico zc-dl-ioc">&nbsp;</em><input id="u-email" type="text" placeholder="请输入账户/手机号"  name="" value="" onkeyup="$(this).next().html(\'\');">'+
                                '<p class="lr-tip-wrap"></p>'+
                            '</li>'+
                            '<li>'+
                                '<em class="zc-ico zc-dl-ioc">&nbsp;</em><input id="u-password" type="password" placeholder="请输入密码"  name="" value="" onkeyup="$(this).next().html(\'\');">'+
                                '<p class="lr-tip-wrap"></p>'+
                            '</li>'+
                        '</ol>'+
                        '<section class="hLh30 of pl10">'+
                        '<label class="hand c-999 vam fl"><input type="checkbox" style="vertical-align: -2px;" checked="checked" id="autoThirty">自动登录</label><a class="vam ml10 c-blue fr" title="" href="javascript:void(0)" onclick="findpass()">忘记密码?</a></section>'+
                        '<section class="mt20 tac mb50">'+
                            '<a href="javascript:void(0)" title="登 录" class="e-login-btn" onclick="dialogLogin('+type+')">登 录</a>'+
                        '</section>'+
                    '</div>'+
                '</section>'+
                '<section class="undis e-login-ele">'+
                    '<div class="mt10">'+
                        '<p class="e-l-jy"></p>'+
                    '</div>'+
                    '<div>'+
                        '<ol class="e-login-options">'+
                            '<li>'+
                                '<em class="sjh-ico zc-dl-ioc">&nbsp;</em><input id="u-email-reg" type="text" placeholder="请输入手机号"  name="registerEmail" value="" onkeyup="$(this).next().html(\'\');">'+
                                '<p class="lr-tip-wrap"></p>'+
                            '</li>'+mobileProvingCodeHtml+
							              '<li>'+
                                '<em class="lo-ico zc-dl-ioc">&nbsp;</em><input id="u-nick-reg" type="text" placeholder="请输入昵称"  name="registerEmail" value="" onkeyup="$(this).next().html(\'\');">'+
                                '<p class="lr-tip-wrap"></p>'+
                            '</li>'+
                            '<li>'+
                                '<em class="zc-ico zc-dl-ioc">&nbsp;</em><input id="u-password-reg" type="password" placeholder="请输入密码"  name="" value="" onkeyup="$(this).next().html(\'\');">'+
                                '<p class="lr-tip-wrap"></p>'+
                            '</li>'+
                            '<li>'+
                                '<em class="zc-ico zc-dl-ioc">&nbsp;</em><input id="u-passwordre-reg" type="password" placeholder="请再输入一次密码"  name="" value="" onkeyup="$(this).next().html(\'\');">'+
                                '<p class="lr-tip-wrap"></p>'+
                            '</li>'+
							'<li>'+
                                '<em class="lo-ico zc-dl-ioc">&nbsp;</em><input id="PromoterCode" type="text" placeholder="推广员注册奖励码，非必须！"  name="" value="" onkeyup="$(this).next().html(\'\');">'+
                                '<p class="lr-tip-wrap"></p>'+
                            '</li>'+
                            
                        '</ol>'+
                        '<section class="tac mt20">'+
                            '<a href="javascript: void(0)" onclick="dialogRegister()" title="注 册" class="e-login-btn">注 册</a>'+
                        '</section>'+
                    '</div>'+
                '</section>'+
            '</div>'
        ];
    $("#lrEleWrap").html(rlEle[0]);
    placeholderFun();//placeholder兼容IE方法
    var dTop = (parseInt(document.documentElement.clientHeight, 10)/2) + (parseInt(document.documentElement.scrollTop || document.body.scrollTop, 10)),
        dH = dialogEle.height(),
        dW = dialogEle.width(),
        dHead = $(".dialog-ele>h4");
		dialogEle.css({"top" : (dTop-(dH/2)) , "margin-left" : -(dW/2)});
		dHead.css({"width" : (dW-"6")}); //ie7下兼容性;
		loginDialogChange("#d-s-head-tab>a", "#d-s-head-cont>section", "current",dialogEle.height(), function() {
    	var dH = dialogEle.height();
    	dialogEle.css({"top" : (dTop-(dH/2)) , "margin-left" : -(dW/2)});
    });
    $("#dClose").bind("click", function() {dialogEle.remove();oBg.remove();});

    if(type==2){
        $("#d-s-head-tab").find("a:eq(1)").click();
    }
}
function loginDialogChange(oTitle, oCont, current,olddialogHeight, callback) {
    var oTitle = $(oTitle),
        oCont = $(oCont),
        _index;
    oTitle.click(function() {
        _index = oTitle.index(this);
        $(this).addClass(current).siblings().removeClass(current);
        oCont.eq(_index).show().siblings("section").hide();
        if (typeof callback === "function") {
            callback();
        }

        //手机端重新设置 高度 ，实现滚动条
        if(checkIsMobile()){
            //如果手机屏幕的高度小于 弹出框的高度
            //var mobHeight=$(window).height();
            var dialogHeight=$(".dialogWrap").height();
            if(mobHeight<=dialogHeight){
                if(_index==0){
                    var dTop = (parseInt(document.documentElement.clientHeight, 10)/2) + (parseInt(document.documentElement.scrollTop || document.body.scrollTop, 10));
                    dialogHeight=$(".dialogWrap").height("auto").height();
                    $(".dialogWrap").css({"top" : (dTop-(olddialogHeight/2)) });
                }else{
                    $(".dialogWrap").css("height", mobHeight+"px");
                    $(".dialogWrap").css({"top" : 0});
                }
            }
        }
    }).eq(0).click();
}
//placeholder兼容IE方法
function placeholderFun() {
    //判断浏览器是否支持placeholder属性
    supportPlaceholder='placeholder'in document.createElement('input');

    //当浏览器不支持placeholder属性时，调用placeholder函数
    if(!supportPlaceholder){
        $("input").not("input[type='password']").each(//把input绑定事件 排除password框
            function(){
                if($(this).val()=="" && $(this).attr("placeholder")!=""){
                    $(this).val($(this).attr("placeholder"));
                    $(this).focus(function(){
                        if($(this).val()==$(this).attr("placeholder")) $(this).val("");
                    });
                    $(this).blur(function(){
                        if($(this).val()=="") $(this).val($(this).attr("placeholder"));
                    });
                }
            });
        //对password框的特殊处理
        var pwdField    = $("input[type=password]");
        pwdField.each(function() {
            var _this = $(this),
                index = _this.index(),
                pwdVal = _this.attr('placeholder');
            _this.after('<input id="pwdPlaceholder'+index+'" type="text" value='+pwdVal+' autocomplete="off" />');
            var pwdFieldColn = _this.next();
            pwdFieldColn.show();
            _this.hide();

            pwdFieldColn.focus(function(){
                pwdFieldColn.hide();
                _this.show();
                _this.focus();
            });

            _this.blur(function(){
                if(_this.val() == '') {
                    pwdFieldColn.show();
                    _this.hide();
                }
            });
        });
    }
}
//右侧浮动 在线客服，官方微信， 返回顶部
function goTopFun() {
    var _gt = $("#goTopBtn");
    _gt.bind("click", function() {
        $("html,body").animate({"scrollTop" : 0}, 500);
    });
    var goTop = function() {
        var sTop = $(document).scrollTop();
        (sTop > 120) ? _gt.fadeIn(50) : _gt.fadeOut(50);
    };
    $(window).bind("scroll" , goTop);
}

/**
 *手机用户个人中心登录拦截跳转
 */
function mobileHrefCheckLogin(hrefUrl){
    if(isLogin()){
        window.location.href=hrefUrl;
    }else{
        lrFun();
    }
}


//联合登录,重新打开窗口
function thirdPartyLogin(appType){
   
}

/*性别默认为1（男）*/
var sex = 1;
/*选择性别*/
function selectSex(num,obj) {
    $(obj).parent().children().removeClass("current");
    $(obj).addClass("current");
    $("input[name='user.sex']").val(num);
    $("#sexPrompt").html("");
    sex = num;
}
/*切换邮箱还是账号注册方式*/
function turnIfEmailReg() {

    if (ifEmailReg=="off"){
        ifEmailReg="on";
        $("#u-email-reg").attr("placeholder","请输入邮箱");
        $(".check-email-reg").text("账号注册")
    }else {
        ifEmailReg="off";
        $("#u-email-reg").attr("placeholder","请输入账号");
        $(".check-email-reg").text("邮箱注册")

    }
}

function mtitShow(){
    var _width = $(".u-r-tit-all").width(),
        _height = $(".u-body").height();
    $(".u-m-tit-abox").on('click', '.more',function(){
        $(".u-m-tit-abox .u-m-n-box").addClass("nameshow");
        $(".u-m-tit-abox .u-m-tit-a-warp").css({width:_width,height:_height});
        $(".u-m-tit-abox .u-m-tit-a-warp").show();
    });
    $(".u-m-tit-abox").on('click', '.u-m-tit-a-warp .u-m-t-ab-in ul li', function(){
        var _this = $(this);
        if (!_this.hasClass("m-current")) {
            _this.addClass("m-current").siblings().removeClass("m-current");
        } else {
            _this.removeClass("m-current");
        }
        $(".u-m-tit-abox .u-m-n-box").removeClass("nameshow");
        $(".u-m-tit-abox .more").text(($(".u-m-t-ab-in .m-current a").text()));
        $(".u-m-tit-abox .u-m-tit-a-warp").hide();
    })
}
function aNewTitShow(){
    var _width = $(".comm-title").width(),
        _height = $(".i-article").height();
    $(".u-m-tit-abox").on('click', '.more',function(){
        $(".u-m-tit-abox .u-m-n-box").addClass("nameshow");
        $(".u-m-tit-abox .u-m-tit-a-warp").css({width:_width,height:_height});
        $(".u-m-tit-abox .u-m-tit-a-warp").show();
    });
    $(".u-m-tit-abox").on('click', '.u-m-tit-a-warp .u-m-t-ab-in ul li', function(){
        var _this = $(this);
        if (!_this.hasClass("m-current")) {
            _this.addClass("m-current").siblings().removeClass("m-current");
        } else {
            _this.removeClass("m-current");
        }
        $(".u-m-tit-abox .u-m-n-box").removeClass("nameshow");
        $(".u-m-tit-abox .more").text(($(".u-m-t-ab-in .m-current a").text()));
        $(".u-m-tit-abox .u-m-tit-a-warp").hide();
    })
}

/**
 * 弹出框 （弱提示）
 * @param info 消息内容
 * @param success true 成功 false 失败
 * @param timeNum 显示时长毫秒
 */
function msgshow(info,success,timeNum){
    $("#message").remove();
    $(".mes-warp-0").remove();
    if(isEmpty(timeNum)){
        timeNum=3000;
    }
    var msgBox = $('<div id="message"></div>').appendTo($("body")).fadeIn("fast").delay(timeNum).fadeOut("slow");
    if (success=="false"){
        var msgTxt =
            '<div class="mes-warp-0">'+
            '<div class="msg-cg msg-nr msg-nr-cw"><em class="rts-ico"><img src="/themes/classics/Public/images/rts-cw.png"></em><span>'+info+'</span></div>'+
            '</div>'
    }else{
        var msgTxt =
            '<div class="mes-warp-0">'+
            '<div class="msg-cg msg-nr msg-nr-zq"><em class="rts-ico"><img src="/themes/classics/Public/images/rts-zq.png"></em><span>'+info+'</span></div>'+
            '</div>'
    }

    $("#message").html(msgTxt);
    var dTop = (parseInt(document.documentElement.clientHeight, 10)/2) + (parseInt(document.documentElement.scrollTop || document.body.scrollTop, 10)),
        dH = msgBox.height(),
        dW = msgBox.width(),
        timer = null;
    //dClose;
    msgBox.css({"top" : (dTop-(dH/2)) , "margin-left" : -(dW/2)});
    //dClose = function() {msgBox.remove();};
}
function goHistory() {
    history.go(-1)
}

function moSeachAll() {
    if(checkIsMobile()){
        $("body").css("min-height",$(window).height());
    }
    var headHeight = $(".all-header").height();
    var bgHeight = $(window).height()-headHeight;
    var seachWidth = $(".mw-nav-seach").width();
    var seachIn =$(".h1-mw-seach-input").width();
    $(".mo-all-seach-warp").height(bgHeight);
    $(".h1-mw-seach-input").focus(function () {
        $("body").css({"height":"100%","overflow":"hidden"});
        $(this).val();
        $(".mo-all-seach-warp").animate({bottom:0},300);
        $(".mw-nav-btn").css("display","none");
        $(".mw-nav-seach").css({"right":"8px","width":seachWidth+55});
        $(".h1-mw-seach-input").css("width",seachIn+55);
    })
    $(".c-master").click(function () {
        $("body").css({"height":"auto","overflow":"hidden"});
        $(".mo-all-seach-warp").animate({bottom:"-100%"},300);
        $(".mw-nav-btn").css("display","block");
        $(".mw-nav-seach").css({"right":"55px","width":seachWidth});
        $(".h1-mw-seach-input").css("width",seachIn);
    })
  /*  $(".h1-mw-seach-input").blur(function () {
        $("body").css({"height":"auto","overflow":"hidden"});
        $(".mo-all-seach-warp").animate({bottom:"-100%"},300);
        $(".mw-nav-btn").css("display","block");
        $(".mw-nav-seach").css({"right":"55px","width":seachWidth});
        $(".h1-mw-seach-input").css("width",seachIn);
    })*/
}

function optionShow(){
    var _heigth = $(".c-sort-box").height()-40;
    if(_heigth<$(window).height()){
        _heigth=$(window).height()
    }
    $(".kcfl-li").click(function(){
        /* 如果另外两个筛选条件有选中去掉选中*/
        if ($(".zhpx-li").hasClass("cur")){
            $(".zhpx-li").click()
        }
        if ($(".sxtj-li").hasClass("cur")){
            $(".sxtj-li").click()
        }
        if($(".kczy-box").hasClass("box-se")){
            $(".kczy-box").removeClass("box-se");
            $(this).removeClass("cur");
            $(".kczy-list-a").css("display","none");
            $(".mo-op-body").removeClass("mo-op-body-se");
        }else {
            $(".kczy-box").addClass("box-se");
            $(this).addClass("cur").siblings().removeClass("cur");
            $(".kczy-list-a").css("display","block");
            $(".mo-op-body").addClass("mo-op-body-se");
            $(".mo-op-body").css("height", _heigth);
        }
        if (parentSubjectId !=0){
            $("#kczy-a").find(".current").click()
        }
    });
    $(".kczy-list-a li").click(function(){
        var bH=$(".kczy-list-a").height();
		$(".kczy-list-c").css("display", "none");
        if(!$(this).hasClass("allSubject")){
			$(".kczy-list-a").css({width:"50%",height:"100%"});
        }
        $(".kczy-list-b").css({width:"50%",left:"50%",height:"100%"});
		$(".kcfl-li.cur a tt").text(($(this).children().text()));
        $(this).addClass("current").siblings().removeClass("current");
    });
     $(".kczy-list-b li").click(function(){
       
        $(this).addClass("current").siblings().removeClass("current");
    });
	$(".kczy-list-c li").click(function(){
        $(this).addClass("cater").siblings().removeClass("cater");
        $(".kcfl-li.cur a tt").text(($(this).children().text()));
        $(".kczy-box").removeClass("box-se");
        $(".mo-op-body").removeClass("mo-op-body-se");
        $(".kcfl-li").removeClass("cur");
    });
    $(".zhpx-li").click(function(){
        if ($(".kcfl-li").hasClass("cur")){
            $(".kcfl-li").click()
        }
        if ($(".sxtj-li").hasClass("cur")){
            $(".sxtj-li").click()
        }
        if($(".zhpx-box").hasClass("box-se")){
            $(".zhpx-box").removeClass("box-se");
            $(this).removeClass("cur");
            $(".zhpx-list").css("display","none");
            $(".mo-op-body").removeClass("mo-op-body-se");
        }else {
            $(this).addClass("cur").siblings().removeClass("cur");
            $(".zhpx-list").css("display","block");
            $(".zhpx-box").addClass("box-se");
            $(".mo-op-body").addClass("mo-op-body-se");
            $(".mo-op-body").css("height", _heigth);
        }
    });
    
    

}
