/* Js for , Version=1775933639 */
 if(typeof(v) != "object") v = {};v.theme = {"template":"default","theme":"wide","device":"desktop"};;v.lang = {"confirmDelete":"\u60a8\u786e\u5b9a\u8981\u6267\u884c\u5220\u9664\u64cd\u4f5c\u5417\uff1f","deleteing":"\u5220\u9664\u4e2d","doing":"\u5904\u7406\u4e2d","loading":"\u52a0\u8f7d\u4e2d","updating":"\u66f4\u65b0\u4e2d...","timeout":"\u7f51\u7edc\u8d85\u65f6,\u8bf7\u91cd\u8bd5","errorThrown":"<h4>\u6267\u884c\u51fa\u9519\uff1a<\/h4>","continueShopping":"\u7ee7\u7eed\u8d2d\u7269","required":"\u5fc5\u586b","back":"\u8fd4\u56de","continue":"\u7ee7\u7eed","bindWechatTip":"\u53d1\u5e16\u529f\u80fd\u8bbe\u7f6e\u4e86\u7ed1\u5b9a\u5fae\u4fe1\u7684\u9650\u5236\uff0c\u8bf7\u5148\u7ed1\u5b9a\u5fae\u4fe1\u4f1a\u5458\u3002","importTip":"\u53ea\u5bfc\u5165\u4e3b\u9898\u7684\u98ce\u683c\u548c\u6837\u5f0f","fullImportTip":"\u5c06\u4f1a\u5bfc\u5165\u6d4b\u8bd5\u6570\u636e\u4ee5\u53ca\u66ff\u6362\u7ad9\u70b9\u6587\u7ae0\u3001\u4ea7\u54c1\u7b49\u6570\u636e"};;   $(function()
   {
        $(".brand-container p").each(function()
        {
            var maxwidth=83;
            if($(this).text().length>maxwidth){ $(this).text($(this).text().substring(0,maxwidth)); $(this).html($(this).html()+'…');
        }
        });
    });
    var turn = function(target,time,opts)
    {
        target.find('a').hover(function()
        {
            $(this).find('img').stop().animate(opts[0],time,function()
            {
                $(this).hide().next().show();
                $(this).next().animate(opts[1],time);
            });
        },function()
        {
            $(this).find('.info').animate(opts[0],time,function()
            {
                $(this).hide().prev().show();
                $(this).prev().animate(opts[1],time);
            });
        });
    }
        var verticalOpts = [{'width':0},{'width':'220px'}];
    turn($('#vertical'),200,verticalOpts);
    var horizontalOpts = [{'height':0,'top':'120px'},{'height':'150px','top':0}];
    turn($('#horizontal'),200,horizontalOpts);
    
    // 数据提交
		$(".submit").on('click', function () {
			// 需求类型
			var type = $("select[name='type'] option:selected").val();
            // 获取学历的值
            var edu = $("select[name='edu'] option:selected").val();
            // 获取毕业年限的值
            var gy = $("select[name='gy'] option:selected").val();
            // 获取电话
			var tel = $("input[name='tel']").val();
			if (type == 0 || edu==0 || tel=='' || gy==''){
				alert('请将信息填写完整^_^');
				return;
			}
			// 验证手机号码是否正确
            var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
            if (!myreg.test(tel)) {
                alert('请填写正确的手机号码^_^');
                return;
            }

            // 发送ajax
			$.post("assist-index", {"type":type,"edu":edu,"gy":gy,"tel":tel}, function (res) {
			    var ress = eval('(' + res + ')'); 
				if (ress.code < 0){
					alert("服务器忙，请稍后再试！您还可以直接拨打电话咨询^_^");
				}else if(ress.code == 1) {
                    alert("提交成功，我们将会有专人联系您，请保持手机畅通^_^");
                    window.location.reload();
				}else {
                    alert("您已提交过信息^_^");
				}
            });

        })
        
            //人才寻访
              $(document).ready(function() { 
                $.ajax({ 
                    type : "POST", 
                    url : "https://rck.yuejianschool.com/api/mzcy/Custom/index", 
                    dataType : "json", 
                    data : {}, 
                    success:function(data){
                        if(data['code']==1){
                            var one=data['data'][1];
                            var tow=data['data'][0];
                            for (var x in one) {
                                $('#search1').append("<div class='search-na'><div class='search-naa'>"+ one[x].title +"</div><div class='search-nab'>"+ one[x].received +"W以上/年</div><div style='clear:both'></div><div class='search-nac'>"+ one[x].username +"&nbsp;|&nbsp;"+ one[x].sex +"&nbsp;|&nbsp;"+ one[x].age +"岁&nbsp;|&nbsp;"+ one[x].cssfid +"&nbsp;|&nbsp;"+ one[x].phone +"</div><div class='search-nad'>职称:"+ one[x].zc +"</div><div class='search-nae'>意向性质:"+ one[x].yxxz +"</div><div class='search-nad'>识别编号:"+ one[x].ywrckid +"</div><div class='search-nae'>安全员证书"+ one[x].aqyzs +"</div><div style='clear:both'></div></div>");
                            }
                            for (var x in tow) {
                                $('#search2').append("<div class='search-na'><div class='search-naa'>"+ tow[x].title +"</div><div class='search-nab'>"+ tow[x].received +"W以上/年</div><div style='clear:both'></div><div class='search-nac'>"+ tow[x].username +"&nbsp;|&nbsp;"+ tow[x].sex +"&nbsp;|&nbsp;"+ tow[x].age +"岁&nbsp;|&nbsp;"+ tow[x].cssfid +"&nbsp;|&nbsp;"+ tow[x].phone +"</div><div class='search-nad'>职称:"+ tow[x].zc +"</div><div class='search-nae'>意向性质:"+ tow[x].yxxz +"</div><div class='search-nad'>识别编号:"+ tow[x].ywrckid +"</div><div class='search-nae'>安全员证书"+ tow[x].aqyzs +"</div><div style='clear:both'></div></div>");
                            }
                        }
                    },
                        error(data) {
                            console.log('报错');
                        }
                }); 
            })
            $(".searche").click(function(){
                var name=$(this).index();
                if(name==1){

                    $(".searche").eq(0).removeClass("seyse");
                    $(".searche").eq(1).addClass("seyse");
                    $("#search1").hide();
                    $("#search2").show();
                }else{
                    
                    $(".searche").eq(1).removeClass("seyse");
                    $(".searche").eq(0).addClass("seyse");
                    $("#search2").hide();
                    $("#search1").show();
                }
            });

// 选择服务领域
 $("#rcxf").each(function (i) {
        $(this).on('change',function () {
           var zhi = $("#rcxf option:selected").val();
           var str = '';
           console.log(zhi);
            if(zhi=='职训服务'){
                var arr = [
                '五大员',
                '八大工',
                'ABC证' ,
                '建造师',
                '二级造价师',
                'BIM考培服务' ,
                '消防设施操作员', 
                '应急救援员',
                '注册消防工程师' ,
                ' 注册安全工程师' ,
                '消防安全责任人' , 
                '管理人' ,
                '单位消防安全培训'
                ];
                // 循环数组
                $.each(arr,function(index,value){
                     str += "<option value="+value+">"+value+"</option>";
                });
            }else if(zhi=='企业服务'){
                var arr = ['资质咨询服务','安证咨询服务','企业认证' ,'知识产权','科技项目'];
                // 循环数组
                $.each(arr,function(index,value){
                     str += "<option value="+value+">"+value+"</option>";
                });
            }else if(zhi=='人才服务'){
                var arr = ['建筑企业人才寻访','职称评审'];
                // 循环数组
                $.each(arr,function(index,value){
                     str += "<option value="+value+">"+value+"</option>";
                });
            } else if(zhi=='科技服务') {
                var arr = ['BIM技术服务','大湾区职训网','信息通信服务'];
                // 循环数组
                $.each(arr,function(index,value){
                     str += "<option value="+value+">"+value+"</option>";
                });
            } else if(zhi=='项目服务') {
                var arr = ['工程监理服务',
                '工程造价咨询服务',
                '工程项目管理服务',
                '工程技术咨询服务',
                '工程建设项目招标代理服务',
                '编制工程概算、预算服务',
                '工程结算服务'];
                // 循环数组
                $.each(arr,function(index,value){
                     str += "<option value="+value+">"+value+"</option>";
                });
            }
            // 先清空 咨询服务项目选项
            $('#projects').find("option").remove();
            $("#projects").append(str);
        })
 })

    // 咨询数据提交
		$(".search-submit").on('click', function () {
			// 需求类型
			var type = $("select[name='type1'] option:selected").val();
            // 获取企业或专业名称
            var name = $("#projects option:selected").val();
            // 获取用户姓名
            var username = $("input[name='username']").val();
            var rem = '暂无';
            // 获取电话
			var tel = $("input[name='phone']").val();
			if (type == 0 || name==0 || tel=='' || username==''  ){
				alert('请将信息填写完整^_^');
				return;
			}
			
			// 验证手机号码是否正确
            var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
            if (!myreg.test(tel)) {
                alert('请填写正确的手机号码^_^');
                return;
            }

            // 发送ajax
			$.post("assist-index", {"type":type,"name":name,"username":username,"tel":tel,'rem':rem}, function (res) {
			    var ress = eval('(' + res + ')'); 
				if (ress.code < 0){
					alert("服务器忙，请稍后再试！您还可以直接拨打电话咨询^_^");
				}else if(ress.code == 1) {
                    alert("提交成功，我们将会有专人联系您，请保持手机畅通^_^");
                    window.location.reload();
				}else {
                    alert("您已提交过信息^_^");
				}
            });

        })
        
    // 数据提交
		$(".zcrh-submit").on('click', function () {
			// 需求类型
			var type ='入户测评';
            // 年龄阶段
            var age = $("select[name='age'] option:selected").val();
            // 学历
            var edu = $("select[name='edu1'] option:selected").val();
            // 社保年限
            var yoss = $("select[name='yoss'] option:selected").val();
            // 获取电话
			var tel = $("input[name='phone1']").val();
			if (type == 0 || tel=='' || age=='' || edu=='' || yoss==''){
				alert('请将信息填写完整^_^');
				return;
			}
			// 验证手机号码是否正确
            var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
            if (!myreg.test(tel)) {
                alert('请填写正确的手机号码^_^');
                return;
            }
            // 发送ajax
			$.post("assist-index", {"type":type,"age":age,"edu":edu,"tel":tel,'yoss':yoss}, function (res) {
			    var ress = eval('(' + res + ')'); 
				if (ress.code < 0){
					alert("服务器忙，请稍后再试！您还可以直接拨打电话咨询^_^");
				}else if(ress.code == 1) {
                    alert("提交成功，我们将会有专人联系您，请保持手机畅通^_^");
                    window.location.reload();
				}else {
                    alert("您已提交过信息^_^");
				}
            });

        });

var currentBlockID = 320;


if(typeof($('#block' + currentBlockID).parent('.col').data('grid')) === 'undefined' && $('#block' + currentBlockID).parent('.col').data('probability') === 'undefined')
{
    var grid = $('#block' + currentBlockID).parents('.blocks').data('grid');
    grid = typeof(grid) == 'undefined' ? 12 : grid;

    $('#block' + currentBlockID).parent('.col').attr('data-grid', grid).attr('class', 'col col-' + grid);
}

$('.articleTitleA').each(function()
{
    $(this).css('max-width', $(this).parents('li').width() - $(this).prev('.category').width() - $(this).next('.sticky').width() - $(this).parent().next('.article-date').width() - 10);
})
$('.articleTitleB').each(function()
{
    $(this).css('max-width', $(this).parent('li').width() - $(this).next('.sticky').width() - 10);
})
;

var currentBlockID = 319;


if(typeof($('#block' + currentBlockID).parent('.col').data('grid')) === 'undefined' && $('#block' + currentBlockID).parent('.col').data('probability') === 'undefined')
{
    var grid = $('#block' + currentBlockID).parents('.blocks').data('grid');
    grid = typeof(grid) == 'undefined' ? 12 : grid;

    $('#block' + currentBlockID).parent('.col').attr('data-grid', grid).attr('class', 'col col-' + grid);
}

$('.articleTitleA').each(function()
{
    $(this).css('max-width', $(this).parents('li').width() - $(this).prev('.category').width() - $(this).next('.sticky').width() - $(this).parent().next('.article-date').width() - 10);
})
$('.articleTitleB').each(function()
{
    $(this).css('max-width', $(this).parent('li').width() - $(this).next('.sticky').width() - 10);
})
;

var currentBlockID = 318;


if(typeof($('#block' + currentBlockID).parent('.col').data('grid')) === 'undefined' && $('#block' + currentBlockID).parent('.col').data('probability') === 'undefined')
{
    var grid = $('#block' + currentBlockID).parents('.blocks').data('grid');
    grid = typeof(grid) == 'undefined' ? 12 : grid;

    $('#block' + currentBlockID).parent('.col').attr('data-grid', grid).attr('class', 'col col-' + grid);
}

$('.articleTitleA').each(function()
{
    $(this).css('max-width', $(this).parents('li').width() - $(this).prev('.category').width() - $(this).next('.sticky').width() - $(this).parent().next('.article-date').width() - 10);
})
$('.articleTitleB').each(function()
{
    $(this).css('max-width', $(this).parent('li').width() - $(this).next('.sticky').width() - 10);
})
;$('.num').each(function(){
    var w =$(this).width()
    var h =$(this).height()
    $(this).on('mouseenter',function(){
        $(this).append('<div class="divtop"></div><div class="divleft"></div><div class="divright"></div><div class="divbottom"></div>')
        $('.divtop').width(''+(w+2)+'')
        $('.divbottom').width(''+(w+2)+'')
        $('.divleft').height(''+(h+2)+'')
        $('.divright').height(''+(h+4)+'')
    })
    $(this).on('mouseleave',function(){
        $(this).children('.divtop').remove()
        $(this).children('.divbottom').remove()
        $(this).children('.divleft').remove()
        $(this).children('.divright').remove()
    })
});$().ready(function() { $('#execIcon').tooltip({title:$('#execInfoBar').html(), html:true, placement:'right'}); }); ;$(document).ready(function()
{          
    // add "index" class to the body element.
    $('body').addClass('index');

    $('.nav-system-home:first').addClass('active');
})
function addlx(){
    $("#siteSlogan").empty();
    var html = "<span>建筑业全链条价值服务提供商</span><div class='h-ri'><div class='hot-line'>服务热线：<span>158-1884-6481</span></div></div>";
	$("#siteSlogan").append(html);
};
addlx();$("#headTitle #navbar a").removeAttr("data-toggle");
;
function loadCartInfo(twinkle)
{
    $('#siteNav').load(createLink('misc', 'printTopBar'),
        function()
        {
            if(twinkle) 
            {
                bootbox.dialog(
                {  
                    message: v.addToCartSuccess,  
                    buttons:
                    {  
                        back:
                        {  
                            label:     v.lang.continueShopping,
                            className: 'btn-primary',  
                            callback:  function(){location.reload();}  
                        },
                        cart:
                        {  
                            label:     v.gotoCart,  
                            className: 'btn-primary',  
                            callback:  function(){location.href = createLink('cart', 'browse');}  
                        }  
                    }  
                });
            }
        }
    );
}
