	var _current_menu = 4;
	var _currunt_mene_item_count = 0;

	function fn_MenuStart(n){
		_current_menu = n;
		fn_GetData();
	}

	function fn_GetData(){
		if(_current_menu == 4){
			$.post('/Shops/Quick/Quick_0.php',function(data){
					$(".OutPut").html(data);
			});
		}else{
			$.post('/Shops/Quick/Quick_'+(_current_menu+1)+'.php',function(data){
					$(".OutPut").html(data);
					$("#quick_box").show();
			});
		_quick_height = 273;
		setPosition();
		}
	}

	function fn_ListShow(){
		try{
			if($("#quick_box").css("display") == "block"){
				_quick_height = 46;
				setPosition();
				fn_MenuStart(4);
			}else{
				_quick_height = 271;
				setPosition();
				fn_ListShowSub();
			}
		}catch(e){
			fn_MenuStart(0);
		}
	}

	function fn_ListShowSub(){

		className = $("#quick_top td").eq(_current_menu).attr("class");
		setName = className.replace("_1","");
		$("."+className).removeClass().attr("class",setName);
		$("#quick_box").show();
	}

	function fn_GetClassName(str, mode){
		str = str.indexOf("_1") > 0 ? str : str + "_1";
		return str;
	}

	function fn_SetCountUp(code){
		$.post('/Shops/Quick/Quick_'+(_current_menu+1)+'.php',{code:code, type:"up"},function(data){
				$(".OutPut").html(data);
		});
	}

	function fn_SetCountDown(code){
		var setNum = Number($("#"+code).val())-1;
		if(setNum < 1){
			return;
		}
		$.post('/Shops/Quick/Quick_'+(_current_menu+1)+'.php',{code:code, type:"down"},function(data){
				$(".OutPut").html(data);
		});
	}


var _quick_height = 43;



$(document).ready(function(){
	fn_MenuStart(_current_menu);
	$(".ProdList").click(function(){
		if($("#apDiv1").css("display") == "block"){

			$("#apDiv1").hide("normal");
		}else{

			$("#apDiv1").show("normal");
		}
	});

	// var currentPosition = parseInt($("#CheckHeight").css("top"));
	

	setPosition();

	$(window).scroll(function() {
		setPosition();
	});

	$(window).resize(function() {
		setPosition();
	});



});

function setPosition(){
	var h = $(window).height();
	var st = $(window).scrollTop();
	var top = st+h-_quick_height+3;
    
    if (top < document.body.scrollHeight){
        $("#OutPut").css({"top":top+"px"}, 50);
    }
}
