var winWidth,winHeight;

var offtopt = 0;

var movtopt = 0;

/*  浏览器宽高  */
function winhw(){
	
	winWidth = $(window).width();
	winHeight = $(window).height();
	
	}




function cluck(){
	$(".cd-nav-trigger").click(function(){
		if(!$(this).hasClass("close-nav")){
			$(this).addClass("close-nav");
			$(".cd-nav-trigger-link").slideDown();
			$(".tohlk").slideDown();
			}	
		else{
			$(this).removeClass("close-nav");
			$(".cd-nav-trigger-link").slideUp();
			$(".tohlk").slideUp();
			}
		})
	}


function widtwin(){
	if(winWidth<501){
		$(".cd-nav-trigger-link").hide();
		$(".tohlk").hide();
		$(".cd-nav-trigger").removeClass("close-nav");
		}
	else{
		$(".cd-nav-trigger-link").show();
		$(".tohlk").show();
		$(".cd-nav-trigger").removeClass("close-nav");
		}
	}

function movtwin(){
	if(winWidth<641){
		movtopt = 1
		$(".soldtpmv").removeAttr("style");
		}
	else{		
		movtopt = 0;
		}
	}

/*  文档加载完成  */
$(document).ready(function(){
	winhw();
	widtwin();
	movtwin();
	cluck();
})


/*  整体页面加载完成  */
$(window).load(function() {
	winhw();
});

/*  页面高度改变后  */
$(window).resize(function() {
    winhw();
	widtwin();
	movtwin();
});

$(window).scroll(function () {
	if(movtopt ==0){
		offtopt = $(window).scrollTop();
		$(".soldtpmv").css({"bottom":-(offtopt*.4)});
	}
});