jQuery.fn.center = function () {
    this.css("position","absolute");
    this.css("top", ( $(window).height() - this.height() ) / 2 + "px");
    this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
    return this;
}


$(function(){
$(".req_btn_box a").click(function(){
$("#popup").center();
$("#popup").show();
$("#closebutton").show();
$("#overlay").fadeTo(200, .5);
$("#overlay").css({"position":"fixed",
				  "width":"100%",
				  "height":"100%",
				  "left":"0px",
				  "right":"0px"
				  }).show();
});

$("a.download").click(function(){

$("#popup3").center();
$("#popup3").show();
$("#closebutton3").show();
$("#overlay").fadeTo(200, .5);
$("#overlay").css({"position":"fixed",
				  "width":"100%",
				  "height":"100%",
				  "left":"0px",
				  "right":"0px"
				  }).show();
});


$("a.request").click(function(){

$("#popup2").center();
$("#popup2").show();
$("#closebutton2").show();
$("#overlay").fadeTo(200, .5);
$("#overlay").css({"position":"fixed",
				  "width":"100%",
				  "height":"100%",
				  "left":"0px",
				  "right":"0px"
				  }).show();
});



$(".right_sidebar a").click(function(){

$("#popup").center();
$("#popup").show();
$("#closebutton").show();
$("#overlay").fadeTo(200, .5);
$("#overlay").css({"position":"fixed",
				  "width":"100%",
				  "height":"100%",
				  "left":"0px",
				  "right":"0px"
				  }).show();
});


$("#closebutton").click(function(){
	$("#popup").hide();
	$(this).hide();
	$("#overlay").hide();
});
$("#closebutton2").click(function(){
	$("#popup2").hide();
	$(this).hide();
	$("#overlay").hide();
});

$("#closebutton3").click(function(){
	$("#popup3").hide();
	$(this).hide();
	$("#overlay").hide();
});







$("#services").mouseover(function(){
$("#dropmenu1").show();
$("#dropmenu2").hide();				   
});

$("#addons").mouseover(function(){
$("#dropmenu1").hide();				   
});

$("#logobox").mouseover(function(){
$("#dropmenu1").hide();				   
});

$("#team").mouseover(function(){
$("#dropmenu1").hide();				   
});

$("#dropmenu1").mouseout(function(){
$(this).hide();				   
});


$("#software").mouseover(function(){
$("#dropmenu2").show();
$("#dropmenu1").hide();
});

$("#services").mouseover(function(){
$("#dropmenu2").hide();				   
});

$("#addons").mouseover(function(){
$("#dropmenu2").hide();				   
});

$("#logobox").mouseover(function(){
$("#dropmenu2").hide();				   
});

$("#dropmenu2").mouseout(function(){
$(this).hide();				   
});

});
