$(document).ready(function(){
	$('.book h1').tooltip({showURL: false});
	$('.book img').tooltip({showURL: false});
	$('ul.share_ul a').tooltip({showURL: false});
	$('a.network').tooltip({showURL: false});
	
	/*$(function(){
		$("#slider_container ul li a").each(function(){
		$(this).hover(function(){
			$(this).animate({width: "700px"}, {queue:false, duration:450});
		  },function() {
			  $(this).animate({width: "70px"}, {queue:false, duration:450});
		  });
		});
	});*/
	
	$("#slider_container ul li span.click").click(function() {
		$("#slider_container ul li.open").animate({width: "70px"}, {queue:false, duration:450});
		$('#slider_container li').removeClass('open');
		$(this).parent().animate({width: "730px"}, {queue:false, duration:450}).addClass('open');
	});
	
	$("span#focus").hover(function(){
		$(this).addClass('focushover').removeClass('focus');
	},function() {
		//alert(3);
		if(  ! $(this).parent().hasClass('open')  ) {
			//alert(2);
			$(this).addClass('focus').removeClass('focushover');
		}
	});
	$('span.focus').click(function() {
		$(this).removeClass('focus');
		$(this).addClass('focushover');
		$('span#latest').removeClass('latesthover').addClass('latest');
		$('span#high').removeClass('highhover').addClass('high');
	});
	
	
	$("span#latest").hover(function(){
		$(this).addClass('latesthover').removeClass('latest');
	},function() {
		if(  ! $(this).parent().hasClass('open')  ) $(this).addClass('latest').removeClass('latesthover');
	});
	$('span.latest').click(function() {
		$(this).removeClass('latest');
		$(this).addClass('latesthover');
		$('span#focus').removeClass('focushover').addClass('focus');
		$('span#high').removeClass('highhover').addClass('high');
	});
	
	
	$("span#high").hover(function(){
		$(this).addClass('highhover').removeClass('high');
	},function() {
		if(  ! $(this).parent().hasClass('open')  ) $(this).addClass('high').removeClass('highhover');
	});
	$('span.high').click(function() {
		$(this).addClass('highhover').removeClass('high');
		$('span#focus').removeClass('focushover').addClass('focus');
		$('span#latest').removeClass('latesthover').addClass('latest');
	});
        
        $.ajax({
        type: 'POST',
        url: LINK + 'index/statistics/',
        data: 'data=1',
        success: function(cevap) {
            $('#statistics-area').html(cevap);
        }
        });
        
        $.ajax({
        type: 'POST',
        url: LINK + 'index/popular/',
        data: 'data=1',
        success: function(cevap) {
            $('#popular-area').html(cevap);
        }
        });
	
	
});



