jQuery.fn.mailto = function() {
	return this.each(function(){
		var email = $(this).attr('href').replace(/\s*\(.+\)\s*/, "@");
		$(this).attr('href', 'mailto:'+email);
		//alert(email);
		//$(this).before('<a href="mailto:' + email + '" rel="nofollow" title="Email ' + email + '">' + email + '</a>').remove();
	});
};
function onReadyFunc() {
	$('.email').mailto();
	$('.foreignLetter').click(function() {
		var txt = $('#searchTerm').attr('value');
		txt+=$(this).text();
		$('#searchTerm').attr('value', txt);
		$('#searchTerm').focus();
	});
	
	//if($('searchForm')) {
		$('#searchForm').bind('submit', function() {
			if($('#searchTerm').attr('value').length < 3) {
				alert('Lütfen arama yapabilmek için en az 3 karakter uzunluğunda bir sözcük giriniz.');
				return false;
			}
		});
	//}
	//$('.searchFormBox').corners("3px");
	//$('.resultList thead td img').css('opacity', 0.6);
	
	//if($('#searchTerm').attr('value')=='') $('#searchTerm').focus();
	//$('#middle').corners("8px");
	//$('.columnBox').corners("8px");
	
	/*
	$(".resultList").mouseover(function () {
      $(this).find('thead td img').css('opacity', 1);
    });
	$(".resultList").mouseout(function () {
      $(this).find('thead td img').css('opacity', 0.6);
    });
	*/

}

$(document).ready(function() {
	onReadyFunc();
});

function addBookmark(title,url) {
  var msg_other    = "Tarayıcınız bu işlevin kullanılmasına izin vermemektedir.";
  var agt          = navigator.userAgent.toLowerCase();

  if (agt.indexOf("opera") != -1)
  {
    if (window.opera && window.print)
    {
      return true;
    } else
    {
      alert(msg_other);
    }
  }
  else if (agt.indexOf("firefox") != -1) window.sidebar.addPanel(title,url,"");
  else if ((agt.indexOf("msie") != -1) && (parseInt(navigator.appVersion) >=4)) window.external.AddFavorite(url,title);
  else if (agt.indexOf("netscape") != -1) window.sidebar.addPanel(title,url,"")
  else if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(title,url,"");
  else alert(msg_other);
}




