$(function(){
	var pmw=window.innerWidth,
		pmh=window.innerHeight;
	$('.head .ss a').click(function(){
		$('.head .ss').stop(true,true).fadeToggle();
	});

	$('.head .ss .close').click(function(){
		$('.head .ss').stop(true,true).fadeOut();
	});

	$('.navico').click(function(){
		$('.head .menu').stop(true,true).fadeIn();
		$(".head .menu").css("overflow-y","auto");
	});

	$('.head .menu .close').click(function(){
		$('.head .menu').stop(true,true).fadeOut();
		$(".head .menu").css("overflow-y","hidden");
	});
});
//top
$('.headH').height($('.head').height());
$(window).scroll(function(){
	var iScrollTop=$(window).height()||$(document).height()||$(document.body).height()||$(document.body).outerHeight(true),
	bodyTop=$(document).scrollTop();
	var pmw=window.innerWidth,
		pmh=window.innerHeight;
	if (pmw>300) {
		if (bodyTop<2) {
			$('.head').removeClass('heads');
			$('.headH').slideDown();
		} else{
			$('.head').addClass('heads');
			$('.headH').slideUp();
		}
	};

});

$(window).scroll(function(){
			var iScrollTop=$(window).height()||$(document).height()||$(document.body).height()||$(document.body).outerHeight(true),
	bodyTop=$(document).scrollTop();
			var pmw=window.innerWidth,
				pmh=window.innerHeight;
				console.log(pmw)
				for (var i=0; i<$('.dbox').length; i++) {
					if ($('.dbox').eq(i).offset().top-bodyTop <iScrollTop*0.75) {
						$('.dbox').eq(i).addClass('dcur');
					}
				}
		});
//Î±¼ÓÔØ

$(function(){
    var $body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body'); //operaFix
    $(".to_top").click(function(){
        $body.animate({scrollTop: 0});
    });
    window.onscroll=function(){
    if((document.documentElement.scrollTop + document.body.scrollTop)>200){
        $(".to_top").show();
    }else{
        $(".to_top").hide();
    }
    };
});
//返回顶部

//$('.main').height($('body').height()-$('.head').height());
$(".tanchuang").hide();
	$(".video img").click(function(){
		$(".tanchuang").show();
		$(".bg").show();
		$(".tanchuang span").show();
		$(".tanchuang video").show();
		var _src=$(this).attr("_src");
		$(".tanchuang video").attr("src",_src)
	})
	$(".bg,.tanchuang span").click(function(){
		$(".tanchuang video").attr("src","");
		$(".tanchuang video,.bg,.tanchuang").hide();
	})