$(document).ready(function()
{ 
	$("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
	gizle()
	listele();
	$("div.epostayaz").show("slow");
	original = $('.solmenulevel2').css('background-color');
	
	$('.solmenulevel2').hover(function() { //mouseover

	var colors = ["#dddddd","#cccccc"];
 	var col= colors[Math.floor(Math.random() * colors.length)];

	$(this).animate({'backgroundColor': col}, 700);
	},function() { //mouseout
	$(this).animate({'backgroundColor': original},300);
	});
	
	
	$("#nav li ul a").hover(function() {
                $(this).stop().animate({ backgroundColor: "#999999" }, 1000);
        },function() {
                 $(this).stop().animate({ backgroundColor: "#666666" }, 500);
        });

	
});

function yorumyaz()
{
	$("div.yorumyaz").toggle("normal");
	$("div.bilgi_ajax").hide();
}
function gizle()
{
	$("div.yorumyaz").hide();
	$("div.bilgi_ajax").hide();
	
}

function postaekle()
{
$.ajax({
			type: 'POST',
			url: 'cs_postaekle.php',
			data: $("#form1").serialize(),
			success: function(ajaxCevap) {
				$('.bilgi_ajax').html(ajaxCevap);
			}
		});
		$("form1.elements.kapca").val("");
		$("div.bilgi_ajax").show("fast");
}


function postasil()
{
$.ajax({
		type: 'POST',
		url: 'cs_postasil.php',
		data: $("#form2").serialize(),
		success: function(ajaxCevap) {
		$('.bilgi_ajax').html(ajaxCevap);
		}
		});
		$("form2.elements.kapca").val("");
		$("div.bilgi_ajax").show("fast");
}
function bilgiekle()
{
		$.ajax({
			type: 'POST',
			url: 'cs_deftereyaz.php',
			data: $("#form1").serialize(),
			success: function(ajaxCevap) {
				$('.bilgi_ajax').html(ajaxCevap);
			}
		});
		
		
		$("div.bilgi_ajax").ajaxStart(function()
		{
			$(this).html('<img src="images/yukleniyor.gif" />');
		});
		$("form1.elements.kapca").val("");
		$("div.bilgi_ajax").show("slow");
		listele();
		
		
		
		
}

function uyeekle()
{
	
		$.ajax({
			type: 'POST',
			url: 'cs_uyeekle.php',
			data: $("#form1").serialize(),
			success: function(ajaxCevap) {
				$('.bilgi_ajax').html(ajaxCevap);
			}
		});
		
		$("div.bilgi_ajax").ajaxStart(function()
		{
			$(this).html('<img src="images/yukleniyor.gif" />');
		});

		$("div.bilgi_ajax").show("slow");
		
		
		
}

function iletisimformu()
{
		$.ajax({
			type: 'POST',
			url: 'cs_iletisim.php',
			data: $("#form1").serialize(),
			success: function(ajaxCevap) {
				$('.bilgi_ajax').html(ajaxCevap);
				
			}
		});
		$("form1.elements.kapca").val("");
		$("div.bilgi_ajax").show("fast");
}

function listele()
{
	$.ajax({
		type: 'POST',
		url: 'cs_defterlistele.php',
		data: $("#form1").serialize(),
		success: function(ajaxCevap) {
			$('.defterlistele').html(ajaxCevap);
		}
	});	

}


