$(document).ready(function(){

	set_heights();	
	hot_news();
	
	
	$("input[name=ara]").click(function(){
	
	
	
		if($(this).val()=="anket arsivinde ara"){
		
			$(this).val("");
		}
	
	})
	
	$bar	=$(".r-bar").height();
	$detail =$(".r-detail").height();
	
	if($detail > $bar) $(".r-bar").css("height",$detail+"px");
	
})



function accordion()
{
	/* akordiyon içindeki he lere basılınca */
	$(".a_title").click(function(){
		
		/* önce açık olanı kapat */
		$(".a_title").parent("li.active").removeClass("active").children("ol").css("display","none");
		
		/* daha sonra basılanı aç */
		$(this).parent("li").addClass("active").children("ol").css("display","block");
	})

}


	
/* yorum alanı karakter sayacı */
function comment_charcounter()
{
	$("#comment_body").charCounter(600, {
		container:"#comment_charcounter",
		format: "yazı sınırı [%1/ 600]",
		pulse: true,
		delay: 100
		
	});
}	
	
	
/* Bazı alanların yüksekliği değişiyor */
function set_heights()
{
	var news_cap=$(".post-caption h1").height();
	
	if($.browser.msie==false) $(".post-caption h1").css('min-height','40px');	
	
	if(news_cap < 41){
		
		if($.browser.safari==true){
			
			$(".post-caption p span").css('height','44px');
		}
		
		if($.browser.msie==true){
			
			$(".post-caption p span").css('height','auto');
			$(".post-caption p span").css('padding-top','18px');
		}
		
	}
	else{
		
		$(".post-caption h1").css('padding-top','0');
		
		if($.browser.safari==true){
			news_cap=(news_cap-6)
			$(".post-caption p span").css('height',news_cap+'px');
		}
		else
		{
			if($.browser.msie==true){
			
				$(".post-caption p span").css('height','auto');
				news_cap=(news_cap-26)
				$(".post-caption p span").css('padding-top',news_cap+'px');
			}
			else
			{
				$(".post-caption p span").css('height',news_cap+'px');
			}
		}
		
	}

}



