﻿/***************************/
/*@Autor: Simeon Ivanov	*/			
/***************************/
//centering popup
function centerPopup(){
	//request data for centering
	var windowWidth = document.documentElement.clientWidth;
	var windowHeight = document.documentElement.clientHeight;
	var popupHeight = $("#bannercontact").height();
	var popupWidth = $("#bannercontact").width();
    var popupHeight = $("#bannerbackground").height();
	var popupWidth = $("#bannerbackground").width();
	//centering
	$("#bannercontact").css({
		"position": "fixed",
		//"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
    
	//only need force for IE6
	$("#bannerbackground").css({
		"position": "fixed",
		//"top": windowHeight/2-popupHeight/2,
		"left": windowWidth/2-popupWidth/2
	});
	
}

$(document).ready(function() {
    centerPopup();
 $("#bannerbackground").css({
  "opacity": "0.7"
 });
 $('#bannerbackground, #bannercontact').slideDown('slow', function() {
 });
 setTimeout(function(){
  $("#bannerbackground").slideUp("slow");
  $("#bannercontact").slideUp("slow");
 }, 10000);
});

function hideBanner () 
{
 $("#bannerbackground").stop(true, true).slideUp("slow");
 $("#bannercontact").slideUp("slow");
}
