$(document).ready(function(){
	var topx = 0;
	var leftx = 0;
	jQuery.fn.center = function () {
		topx = ((( $(window).height() - this.height() ) / 2+$(window).scrollTop())-25) + "px";
		leftx = ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px";
		this.css("position","absolute");
		this.css("top", topx);
		this.css("left", leftx);
		return this;
	}
	$("div#net").center();
	$("#giris").css("top",  ( $(window).height() - $("#giris").height() ) / 2+$(window).scrollTop() + $("div#net").height() / 2 + "px");
	$("#giris").css("left", ( $(window).width() - $("#giris").width() ) / 2+$(window).scrollLeft() + "px");
	$("div#net").easydrag();
	$("div#net").ondrop(function(){
		$('div#net').stop().animate(
			{ top:topx, left:leftx},
					{duration: 600, easing: 'easeOutElastic'}
			);
		});		
});

