// loading dialog
$(document).ready(function(){			
	$("<div/>")
	.attr("id","blockLayer")
	.css({
		width:"100%",
		height:$(document).height()+"px",
		position:"absolute",
		left:"0px",
		top:"0px",
		zIndex:"50000",
		background:"black",
		opacity:"0.8"
	})
	.appendTo("body")
	.ajaxStart(function(){
		$(this).css({height:$(document).height()+"px"});
		$(this).show("blind")
	})
	.ajaxStop(function(){
		$(this).css({height:$(document).height()+"px"});
		$(this).hide("blind");
	})
	.hide()
	
	$("#containerLoading").each().length>0 ? 	$("#containerLoading").remove() : ""
	$("<div/>")
	.attr("id","containerLoading")
	.css({
		background:"white",
		border:"5px solid #777777",
		width:"300px",
		height:"120px",
		padding:"15px",
		position:"absolute",
		left:"35%",
		top:"35%",
		opacity:"1",
		zIndex:"50001"
	})
	.attr("class","ui-state-default ui-corner-all")
	.attr("align","center")
	.html((
	$("<div />")
	.css({
		marginTop:"30px"
	})
	.html("<img src='objects/icons/loaders/20.gif' />"+"<br><br>"+
	"<span style='font-size:15px; color:#333333;'>Yükleniyor, Lütfen Bekleyiniz<span>")
	))
	.appendTo("body")
	.hide()
	.ajaxStart(function(){
		$(this).show()
	})
	.ajaxStop(function(){
		$(this).hide()
	})
	//$(window).resize(function(){$("#blockLayer").css({height:$(document).height()+"px"})});
});

