window.addEvent('domready', function(){
	var b = '<div id="legal-notice-content"> \
		<div id="legal-notice-header"> \
			<h1 class="title cufon">Yasal Uyarı</h1> \
			<div id="legalNoticeCloser" style="position: absolute; top: 8px; right: 8px;"> \
				<a href="javascript:void(0);" style="border: none;">[ KAPAT ]</a> \
			</div> \
		</div> \
		<div id="legal-notice-body"> \
			<p class="content"> \
				<img class="left" src="img/legal-logo.png" /> \
				Bu site <em><strong>Estetik Plastik ve Rekonstrüktif Cerrahi</strong></em> konusunda bilgi vermek amacıyla hazırlanmıştır. Ticari bir amacı yoktur. Web sitemizde kanunlara aykırı bir bir konu gördü iseniz tarafımıza bildirmenizi rica ederiz. Ayrıca yine yasa ve yönetmelikler gereği ameliyat öncesi ve sonrası fotoğraflar ve ameliyatlarla ilgili detaylı bilgiler verememekteyiz. \
			</p> \
		</div> \
	</div>';
	b = new Element("div").set("html", b).inject(document.body);
	$("legalNoticeCloser").addEvent("click", function () {
		$("legal-notice-content").morph({
			opacity: [1, 0]
		});
		(function () {
			$("legal-notice-content").setStyles({
				left: 0,
				top: 0,
				width: 0,
				height: 0
			})
		}).delay(500);
		a.morph({
			opacity: [0.5, 0]
		});
		(function () {
			a.setStyles({
				width: 0,
				height: 0
			})
		}).delay(500)
	});
	var a = new Element("div", {
		styles: {
			"background-color": "#444",
			opacity: 0,
			position: "absolute",
			left: 0,
			top: 0,
			width: 0,
			height: 0,
			"z-index": 999
		}
	}).addEvent("click", function () {
		$("legal-notice-content").morph({
			opacity: [1, 0]
		});
		(function () {
			$("legal-notice-content").setStyles({
				left: 0,
				top: 0,
				width: 0,
				height: 0
			})
		}).delay(500);
		a.morph({
			opacity: [0.5, 0]
		});
		(function () {
			a.setStyles({
				width: 0,
				height: 0
			})
		}).delay(500)
	}).inject(document.body);
	$("legal-link").getElement("a").addEvent("click", function (c) {
		c.stop();
		a.setStyles({
			width: window.getScrollSize().x,
			height: window.getScrollSize().y
		});
		a.morph({
			opacity: [0, 0.5]
		});
		$("legal-notice-content").setStyles({
			left: (window.getSize().x - 600) / 2,
			top: window.getScroll().y + ((window.getSize().y - 200) / 2),
			width: 600,
			height: 200,
			position: "absolute"
		});
		$("legal-notice-content").morph({
			opacity: [0, 1]
		})
	})
});