﻿	
$(".show_up").height( $("body").height() );	
function setCookie (name, value, expires, path, domain, secure) 
{
      document.cookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function getCookie(name) {
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}

timer_i = setInterval(function(){ check_session(); clearInterval(timer_i); }, 1000);


function check_session() {				

				if( getCookie("notfirst")!="true_")
				{
					$(".show_up").css('display','block');
					$(".show_up").css('opacity','0');
					
								$(".show_up").animate({ 
								opacity: 1,
								filter: ''
								}, 1000,
									function() {	
									
										timer_i2 = setInterval(function(){ $(".show_up").animate({opacity: 0,filter: ''}, 500,function() {$(".show_up").css('display','none');}); clearInterval(timer_i2); }, 8000);
								
									 }		  
								 );
					
				}
			
			  setCookie ("notfirst", "true_");
				
}


$('.show_up').click(function() {
	$(".show_up").animate({opacity: 0,filter: ''}, 500,function() {$(".show_up").css('display','none');});			
});	

