$(document).ready(function(){
	$(".hide").hide();
	$("a[rel=resim-grup]").fancybox({'overlayShow': true});
	$("a#inline").fancybox({
						   'overlayShow': true,
						   'frameWidth': 340,
						   'frameHeight': 322
						   });
	$("a#iletisim").fancybox({
							'hideOnContentClick': false, 
						   	'overlayShow': true,
						   	'frameWidth': 390,
						   	'frameHeight': 500
						   	});
	$("#haberler a.haber:not(:first)").hide();
	$("#haberler a.haber").css("visibility","visible");
	if ($("#haberler").is("div")) {
		setTimeout(f_haberler, 5000);
	}
});

function sleep(ms) {
	var date = new Date(); 
	var curDate = null; 

	do { curDate = new Date(); } 
	while(curDate-date < ms); 
	}

function f_haberler() {
	$("#haberler a.haber:visible").fadeOut("fast", function(){
		if ($(this).next().is("a")) {
			$(this).next().fadeIn("fast");
		} else {
			$("#haberler a.haber:first").fadeIn("fast");
		}
	});
	setTimeout(f_haberler, 5000);
	}
