$(function(){

// Sağ panel

   $("a#searchh").toggle(function(){ $(".search").slideDown(); }, function(){ $(".search").fadeOut(200); });
   
   $("a#rsss").toggle(function(){ $(".rss").slideDown(); }, function(){ $(".rss").fadeOut(200); });

// Yukarı ışınla

   $(window).scroll(function() {
							 
      if($(this).scrollTop() != 0) { $('.jump').fadeIn(); } else { $('.jump').fadeOut(); }
	  
   });

   $('.jump').click(function() { $('body,html').animate({ scrollTop:0 },750); });


// İkincil menüde ilk elemanın hizalama sorunu giderildi

   $(".footer-middling li:first").css({ paddingLeft : "0", border : "0" });

// Yorumlar - İlk yorumun çerçeve sorunu giderildi

   $(".article-comments li:first").css("border","0");

// Yorum yazma

   $(".leave-comment-text").focusin(function(){

      $(this).css("outline","none"); $(this).stop().animate({ width : "200px", backgroundColor : "#FFF" });

   });
   
   $(".leave-comment-text").focusout(function(){

      $(this).css("outline","none"); $(this).stop().animate({ width : "130px", backgroundColor : "#FAFAFA" });
	  
   });
   
   $(".leave-comment-textarea").focusin(function(){ $(this).css("outline","none"); $(this).stop().animate({ backgroundColor : "#FFF" }); });
   
   $(".leave-comment-textarea").focusout(function(){ $(this).css("outline","none"); $(this).stop().animate({ backgroundColor : "#FAFAFA" }); });
   
   $(".leave-comment-submit").hover(function(){ $(this).stop().animate({ backgroundColor : "#333" }, 500); 

   }, function(){ $(this).stop().animate({ backgroundColor : "#0f4678" }, 500); });
   
   $(".writeName").focusin(function(){ var vl = $(this).val(); if(vl == "İsim") { $(this).val(""); } });
   
   $(".writeName").focusout(function(){ var vl = $(this).val(); if (vl == "") { $(this).val("İsim"); } });
   
   $(".writeMail").focusin(function(){ var vl = $(this).val(); if(vl == "Mail") { $(this).val(""); } });
   
   $(".writeMail").focusout(function(){ var vl = $(this).val(); if (vl == "") { $(this).val("Mail"); } });
   
   $(".writeWebsite").focusin(function(){ var vl = $(this).val(); if(vl == "Website") { $(this).val(""); } });
   
   $(".writeWebsite").focusout(function(){ var vl = $(this).val(); if (vl == "") { $(this).val("Website"); } });
   
   $(".writeComment").focusin(function(){ var vl = $(this).text(); if(vl == "Mesaj") { $(this).text(""); } });
   
   $(".writeComment").focusout(function(){ var vl = $(this).text(); if (vl == "") { $(this).text("Mesaj"); } });
   
   $(".search-text").focusin(function(){ $(this).css("outline","none"); var vl = $(this).val(); if(vl == "Arama") { $(this).val(""); } });
   
   $(".search-text").focusout(function(){ $(this).css("outline","none"); var vl = $(this).val(); if (vl == "") { $(this).val("Arama"); } });
   
   $(".rss-text").focusin(function(){ $(this).css("outline","none"); var vl = $(this).val(); if(vl == "Mail Adresiniz") { $(this).val(""); } });
   
   $(".rss-text").focusout(function(){ $(this).css("outline","none"); var vl = $(this).val(); if (vl == "") { $(this).val("Mail Adresiniz"); } });
   
   $(".try-again").focusin(function(){ 

      $(this).css("outline","none"); 
	  var vl = $(this).val(); 
	  if(vl == "Tekrar deneyin" || vl == "Aramayı deneyin") { $(this).val(""); } 

   });
   
});
