document.title = '海居网-新年专题';	
	$(function(){
		$('.Mbutom a').on('click',function() {
	       $('body,html').animate({scrollTop:0},500);
           return false;
	    });
	    var topposrt = $('.ynZTboxhead').offset().top+$('.ynZTboxhead').height();
		$(window).scroll(function(){
		    if($(window).scrollTop()>topposrt){
		        $(".rightxg").show();
		    }else{
		        $(".rightxg").hide();
		    }
		});
		if($(window).scrollTop()>topposrt){
		    $(".rightxg").show();
		}else{
		    $(".rightxg").hide();
		}
		$('.rightxg_m').smint({
		    'scrollSpeed' : 1000
		});

		$('.applyct').on('click',function(){
			var hid=$(this).attr('data-hid');
			var source=$(this).attr('data-source');
			// var city=$(this).attr('data-city');
			$('.tanchung_form input[name="hid"]').val(hid)
			$('.tanchung_form input[name="source"]').val(source)
			// $('.tanchung_form input[name="intention_city"]').val(city)
			group();
		})
		$('.tanchung_gb').on('click',function(){
			delbox()
		})


		//报名验证提交的调用 底下报名
    	PublicAction.AjaxSend({CORID:'butt_s'/*操作ID*/});
		$('.submit_area .butt_s').on('click',function(){
		    setTimeout(function(){
		        var _html = $('.alert-container .alert-content').html();
		        if(_html == '提交成功'){
		            delbox();
		            $('.in_ti').val('');
		            $('.in_od').val('');
		        }
		        console.log(_html);
		    },300)  
		 
		})
	})


	function group(){
	    iBoxWidth = $(".tanchung").width();
	    iBoxHeight = $(".tanchung").height();
	    iWinWidth = $(window).width();
	    iWinHeight = $(window).height();
	    $(".tanchung").css("left", (iWinWidth / 2 - iBoxWidth / 2) + "px");
	    $(".tanchung").css("top", ((iWinHeight / 2 - iBoxHeight / 2)-50) + "px");
	    $(".tanchung").fadeIn();
	    $(".tanchung_bg").height(document.body.offsetHeight);
	    $(".tanchung_bg").show();
	}
	function delbox(){
	    $(".tanchung").fadeOut();
	    $(".tanchung_bg").hide();
	}