function ns_newsticker($items_to_fade, $ticker_time) {
	
	tickerchange = setInterval(ns_start_ticker, $ticker_time);
	var $tickeritem = $($items_to_fade);
	var i = 1;
	
	function ns_start_ticker()
	{
	$tickeritem.filter(":eq("+i+")").trigger('fade');
	i+1 < $tickeritem.length ? i++ : i = 0;	
	}
	
	  $tickeritem.each(function(i)
	  {
		  $(this).bind("fade",function()
		  {	
			  $new_ticker_item = $tickeritem.filter(":eq("+i+")");
			  
			  if( $new_ticker_item.css("display") == "none" )
			  {
				  $tickeritem.filter(":visible").fadeOut(400, function()
				  {	
					  $new_ticker_item.fadeIn(400);
				  });
			  }
			  
		  });
	  });
}

$(document).ready(function(){
	
	var LBlockState = $(".LeftMenu").css("display");
	var RBlockState = $(".SagKolon").css("display");
	if ( LBlockState == null && RBlockState == null ) { $(".MainContentContainer").width(1000);  }
	if ( LBlockState == null && RBlockState == null ) { $(".MainContentMiddle").width(970);  }

	ns_newsticker(".ticker span", 4500);
	
	$(".Uyelik").colorbox();

	$("#popIptal").click(function(){ });
	
});

function Deneme( UN, PA ) {

	$.post("/uyelik.php", { UN:UN, PA:PA }, function(data){
	
		if ( data == "OK" ) { window.location = ""; } else {
		
			$("#message").attr("innerHTML","");
			$("#message").attr("innerHTML",data);
			
			$.fn.colorbox.resize();
		
		}
	
	});

}

