eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('o.L.M=5(c){c=o.N({3:6,2:C,s:t,u:"O",w:"P",p:"Q",x:"R",D:"S"},c);0 d;0 e;0 f=q;0 g=t;0 h=o(T);0 i;0 j;0 k=5(){h.y();e=h.z();4(h.z()>c.3){h.U(":V("+(c.3-1)+")").A();d=c.3;n()}};0 l=5(){4(!f){0 a=d+c.3;h.A();h.E(d,a).y();d=a;4(d>=e){f=t;i.B("r")}4(c.s)c.2.7("."+c.p).v(d/c.3);j.F("r");g=q}};0 m=5(){4(!g){0 a=d-c.3;h.A();h.E((a-c.3),a).y();d=a;4(d==c.3){g=t;j.B("r")}4(c.s)c.2.7("."+c.p).v(d/c.3);i.F("r");f=q}};0 n=5(){4(c.2===C){c.2=o(\'<G 8="W"></G>\');h.X(h.z()-1).H(c.2)}0 a=$(\'<a 8="\'+c.u+\'" I="#">&Y; Z</a><a 8="\'+c.w+\'" I="#">10 &11;</a>\');o(c.2).12(a);4(c.s){0 b=\'<9 8="\'+c.D+\'"><9 8="\'+c.p+\'"></9> / <9 8="\'+c.x+\'"></9></9>\';c.2.7("."+c.u).H(b);c.2.7("."+c.p).v(1);c.2.7("."+c.x).v(13.14(e/c.3))}i=c.2.7("."+c.w);j=c.2.7("."+c.u);j.B("r");i.J(5(){l();K q});j.J(5(){m();K q})};k()};',62,67,'var||pager|perpage|if|function||find|class|span|||||||||||||||jQuery|pagenumber|false|qp_disabled|showcounter|true|prev|text|next|totalnumber|show|size|hide|addClass|null|counter|slice|removeClass|div|after|href|click|return|fn|quickpaginate|extend|qp_next|qp_prev|qp_pagenumber|qp_totalnumber|qp_counter|this|filter|gt|qc_pager|eq|nbsp|<img src="sitesample/images/mainblocknavileft.png" border="0" alt="Önceki">|<img src="sitesample/images/mainblocknaviright.png" border="0" alt="Önceki">|nbsp|append|Math|ceil'.split('|'),0,{}))
$(document).ready(function(){

jQuery.fn.fadeIn = function(speed, callback) { 
    return this.animate({opacity: 'show'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 
 
jQuery.fn.fadeOut = function(speed, callback) { 
    return this.animate({opacity: 'hide'}, speed, function() { 
        if (jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 
 
jQuery.fn.fadeTo = function(speed,to,callback) { 
    return this.animate({opacity: to}, speed, function() { 
        if (to == 1 && jQuery.browser.msie)  
            this.style.removeAttribute('filter');  
        if (jQuery.isFunction(callback)) 
            callback();  
    }); 
}; 

// ana menu script
	$("#topmenu a").hover(function () {
		$("#topmenu a").removeClass("tabbed");
		$(this).addClass("tabbed");
		var toShow = $(this).attr('rel');
		var toCon = $(this).attr('con');
		$("#" + toCon + " div.active").addClass("passive");
		$("#" + toCon + " div.active").removeClass("active");
		$("#" + toShow).removeClass("passive");
		$("#" + toShow).addClass("active");
	});

// manset script
	$("#headlinenewslist a").hover(function () {
		$("#headlinenewslist a").removeClass("active");
		$(this).addClass("active");
		var toShow = $(this).attr('rel');
		if($("#mantitle" + toShow).is(":hidden")) {
		$("#headlinecon > *").hide();
			$("#mantitle" + toShow).fadeIn("slow");
			$("#manspot" + toShow).fadeIn("slow");
			$("#manimg" + toShow).fadeIn("slow");
		}
	});
	
	$("#headlinenewslist2 a").hover(function () {
		$("#headlinenewslist2 a").removeClass("active");
		$(this).addClass("active");
		var toShow = $(this).attr('rel');
		if($("#mantitle" + toShow).is(":hidden")) {
		$("#headlinecon > *").hide();
			$("#mantitle" + toShow).fadeIn("slow");
			$("#manspot" + toShow).fadeIn("slow");
			$("#manimg" + toShow).fadeIn("slow");
		}
	});

$("#manset a.bugun").click(function () {
		var toShow = $(this).attr('rel');
		$(".headlinenewslist").hide();
		$("#" + toShow).show();
		$(".switch").css("right", "143px")
	});
	
	$("#manset a.dun").click(function () {
		var toShow = $(this).attr('rel');
		$(".headlinenewslist").hide();
		$("#" + toShow).show();
		$(".switch").css("right", "77px")
	});

// kategori kutusu script
	$(".bluebox a.regular").hover(function () {
		var toShow = $(this).attr('rel');
		var toAlt = $(this).attr('alt');
		var toCon = $(this).attr('catid');
		var toLink = $(this).attr('href');
		$("#box"+ toCon +" a.image img").attr("src", toShow);
		$("#box"+ toCon +" a.image img").attr("alt", toAlt);
		$("#box"+ toCon +" a.image").attr("title", toAlt);
		$("#box"+ toCon +" a.image").attr("href", toLink);
	});
// tab script
	$(".tabs a").click(function () {
		var toShow = $(this).attr('rel');
		var toCon = $(this).attr('con');
		if($("#" + toShow).is(":hidden")) {
			$("#" + toCon + " .tabs a").removeClass("activetab");
			$("#" + toCon + " .tabs a").addClass("passivetab");
			$(this).removeClass("passivetab");
			$(this).addClass("activetab");
			$("#" + toCon + " .tabbedcontent").hide()
			$("#" + toShow).fadeIn("slow");
			$("#" + toCon + " .tabbedcontent").removeClass("passive");
		}
	});
// arama
	$("#searchbar :radio").click(function () {
		var act = $(this).attr('act');
		var met = $(this).attr('rel');
		$("#searchbar").attr('action', act);
		$("#searchbar").attr('method', met);
	});

	$(".authorswitch div").click(function () {
		var con = $(this).attr('con');
		$(".authorswitch .switchon").addClass('switchoff');
		$(".authorswitch .switchon").removeClass('switchon');
		$(this).removeClass('switchoff');
		$(this).addClass('switchon');
		$(".autcon").hide();
		$("#authorwithnavi" + con).css('display', 'block');
		$(".authorswitch ~ .bottom").hide();
		$("#authornavi" + con).css('display', 'block');
	});
});

// input ipucu
(function ($) {
$.fn.hint = function (blurClass) {
  if (!blurClass) { 
    blurClass = 'blur';
  }
  return this.each(function () {
    var $input = $(this),
      title = $input.attr('title'),
      $form = $(this.form),
      $win = $(window);
    function remove() {
      if ($input.val() === title && $input.hasClass(blurClass)) {
        $input.val('').removeClass(blurClass);
      }
    }
    if (title) { 
      $input.blur(function () {
        if (this.value === '') {
          $input.val(title).addClass(blurClass);
        }
      }).focus(remove).blur();
      $form.submit(remove);
      $win.unload(remove);
    }
  });
};

})(jQuery);

(function($) {
	$.fn.easySlider = function(options){
		var defaults = {
			prevId: 		'prevBtn',
			prevText: 		'Önceki',
			nextId: 		'nextBtn',
			nextText: 		'Sonraki',
			controlsShow:	true,
			controlsBefore:	'',
			controlsAfter:	'',
			controlsFade:	true,
			firstId: 		'firstBtn',
			firstText: 		'First',
			firstShow:		false,
			lastId: 		'lastBtn',
			lastText: 		'Last',
			lastShow:		false,
			vertical:		false,
			speed: 			800,
			auto:			false,
			pause:			2000,
			ajaxload:		'',
			ajaxcontainer:	'',
			continuous:		false
		};
		var options = $.extend(defaults, options);
		this.each(function() {
			var obj = $(this);
			var s = $("li", obj).length;
			var w = $("li", obj).width();
			var h = $("li", obj).height();
			obj.width(w);
			obj.height(h);
			obj.css("overflow","hidden");
			var ts = s-1;
			var t = 0;
			$("ul", obj).css('width',s*w);
			if(!options.vertical) $("li", obj).css('float','left');
			if(options.controlsShow){
				var html = options.controlsBefore;
				if(options.firstShow) html += '<span id="'+ options.firstId +'"><a href=\"javascript:void(0);\">'+ options.firstText +'</a></span>';
				html += ' <span id="'+ options.prevId +'"><a href=\"javascript:void(0);\" class="qp_next">'+ options.prevText +'</a></span>';
				html += ' <span id="'+ options.nextId +'"><a href=\"javascript:void(0);\" class="qp_prev">'+ options.nextText +'</a></span>';
				if(options.lastShow) html += ' <span id="'+ options.lastId +'" class="'+ options.lastId +'"><a href=\"javascript:void(0);\">'+ options.lastText +'</a></span>';
				html += options.controlsAfter;
				$(obj).after(html);
			};
			$("a","#"+options.nextId).click(function(){
				animate("next",true);
			});
			$("a","#"+options.prevId).click(function(){
				animate("prev",true);
			});
			$("a","#"+options.firstId).click(function(){
				animate("first",true);
			});
			$("a","#"+options.lastId).click(function(){
				animate("last",true);
			});
			function animate(dir,clicked){
				var ot = t;
				switch(dir){
					case "next":
						t = (ot>=ts) ? (options.continuous ? 0 : ts) : t+1;
						break;
					case "prev":
						t = (t<=0) ? (options.continuous ? ts : 0) : t-1;
						break;
					case "first":
						t = 0;
						break;
					case "last":
						t = ts;
						break;
					default:
						break;
				};

				var diff = Math.abs(ot-t);
				var speed = diff*options.speed;
				if(!options.vertical) {
					p = (t*w*-1);
					$("ul",obj).animate(
						{ marginLeft: p },
						speed
					);
				} else {
					p = (t*h*-1);
					$("ul",obj).animate(
						{ marginTop: p },
						speed
					);
				};
				if(!options.continuous && options.controlsFade){
					if(t==ts){
						$("a","#"+options.nextId).hide();
						$("a","#"+options.lastId).hide();
					} else {
						$("a","#"+options.nextId).show();
						$("a","#"+options.lastId).show();
					};
					if(t==0){
						$("a","#"+options.prevId).hide();
						$("a","#"+options.firstId).hide();
					} else {
						$("a","#"+options.prevId).show();
						$("a","#"+options.firstId).show();
					};
				};
				if(clicked){
					clearTimeout(timeout);
					if(options.ajaxcontainer != ''){
						var startp = (t*10);
						$.ajax({
							type: 'GET',
							url: options.ajaxload,
							data: 'p=' + startp,
							success: function(ajaxCevap) {
								$(options.ajaxcontainer).html(ajaxCevap);
								$(".headlineimg > *:not(:first), .spotcon > .title:not(:first), .spotcon > .spot:not(:first), .spotcon > span:not(:first)").hide();
							}
						});
					}
				}
				if(options.auto && dir=="next" && !clicked){;
					timeout = setTimeout(function(){
						animate("next",false);
					},diff*options.speed+options.pause);
				};
			};
			var timeout;
			if(options.auto){;
				timeout = setTimeout(function(){
					animate("next",false);
				},options.pause);
			};
			if(!options.continuous && options.controlsFade){
				$("a","#"+options.prevId).hide();
				$("a","#"+options.firstId).hide();

			};
		});
	};
})(jQuery);

$(function(){ 
	$('input[title!=""]').hint();
});

$(document).ready(function(){	
	$("#authorwithnavi1").easySlider({
		controlsBefore:	'<center id="authornavi1" class="bottom">',
		controlsAfter:	'</center>',
		auto: false,
		continuous: true,
		prevId: 'authors1_prev',
		nextId: 'authors1_next'
	});
});

$(function(){
	$(".listcon2 a").quickpaginate({ perpage: 7, pager : $(".listconnavi") });
});

