function getRem() {
	var w = document.documentElement.offsetWidth;
	var fs;
	if(w >= 1024) {
		fs = w / 1920 * 100 + 'px';
		
	} else if(w >= 960) {
		fs = w / 1024 * 100 + 'px';
	}else{
		fs = w / 960 * 100 + 'px';
	}

	document.documentElement.style.fontSize = fs;

}
getRem()
window.onresize = function() {
	getRem();
}

$(function() {

	$(".icon-menu").on('click', function() {
		$(".nav").slideToggle();
	})
	
	$("#top-search-btn").on('click', function() {
		$(".searchbox").animate({top:0},300);
	})
	$(".searchbox .icon-close").on('click', function() {
		$(".searchbox").animate({top:'-100%'},300);
	})
	
	
	$(".sec-tab span").click(function(){
				  	var index = $(this).index();
				  	$(this).addClass("on").siblings().removeClass("on");
				  	$(".sec-cont").eq(index).stop().fadeIn().siblings(".sec-cont").hide();
				  	
				  })
})