jQuery(function(){
	
	function ttClientHeight(){
        return document.documentElement.clientHeight;
    };
	function ttScrollTop(){
        return document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;
        };
	function topnow()
	{	document.getElementById("newnotice").style.top =  ttScrollTop()+ttClientHeight() - jQuery("#newnotice").height()+"px"};
	
	jQuery(window).scroll(function(){topnow();});
	
    jQuery(window).load(function(){
		jQuery("#inquiryframe").hide();
        jQuery("#newnotice").slideDown("slow");
		topnow();

    });

    jQuery("label[id=tomin]").click(function(){
		jQuery("#noticetip").show();
		jQuery("#inquiryframe").hide();
		jQuery("#newnotice").animate({width:"160px"},"fast",function(){topnow()});
		
	});
        
    jQuery("label[id=toclose]").click(function(){
        jQuery("div[id=newnotice]").hide();
		topnow();
    });
	
	jQuery("#noticetip,#tomax").click(function(){
		jQuery("#noticetip").hide();
		jQuery("#newnotice").animate({width:"100%"},"fast");
		jQuery("#noticecon").slideDown();		
		jQuery("#inquiryframe").show();
		topnow();
	});
	
});

