///////////////////////////////////////////////////////////
// window onload event !!
///////////////////////////////////////////////////////////
$(function(){
    /**
     * review_revcnt_popup
     * ----------------------------------------- */
    initPopupBox(false);
    $(window).resize(function () { setPopupBox(false); });

});

///////////////////////////////////////////////////////////
// Functions
///////////////////////////////////////////////////////////
/**
 * review_revcnt_popup
 */

//for IE6.0 init
try {
	document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

//popuup box init
function initPopupBox(top_flg) {
	setPopupBox(top_flg);
	$("#rev-cnt-click").css('cursor','pointer');
	$("#rev-cnt-click").css('text-decoration','underline');

	//click.event: rev-cnt-click Effects
	$("#rev-cnt-click").click(function() {
	    $("#rev-cnt-popup").animate({height: "show", opacity: 1.0}, 400, "linear");
	});
	
	//click.event: close Effects
	$(".close input").click( function() {
		$("#rev-cnt-popup").animate({height: "hide", opacity: 0}, 400, "linear");
	});
}

//popuup box style setting
function setPopupBox(top_flg) {

	if (top_flg == true)
	{
		var y = $("div#container").position().top - 85;
		var x = $("div#container").position().left + 150;
	}
	else
	{
		var y = - 110;
		var x = 190;
	}

	//set position
	$("#rev-cnt-popup").css('position', 'absolute');
	$("#rev-cnt-popup").css('top', y);
	$("#rev-cnt-popup").css('left', x);
}



