/**
  * @category  
  * @package	Alev Eken
  * @author		Bilal Cinarli
  * @copyright	2005 - 2010 Bilal Cinarli
  * @license   
  * @version   
  * @filesource	
  * @link		http://bcinarli.com
  * @see       
  * @since     
  **/
  
  $(function(){
    setInterval('highlight($("span.new"))', 1000);
    
    var isNS = (navigator.appName == "Netscape") ? 1 : 0;
    if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
    function mischandler(){
       return false;
     }
      function mousehandler(e){
     	var myevent = (isNS) ? e : event;
     	var eventbutton = (isNS) ? myevent.which : myevent.button;
        if((eventbutton==2)||(eventbutton==3)) return false;
     }
     document.oncontextmenu = mischandler;
     document.onmousedown = mousehandler;
     document.onmouseup = mousehandler;
     disableSelection();
  });
  
  function highlight($obj){
	$obj.css({ color : '#ff0000'});
	$obj.animate( { fontSize: '12px' }, 500).queue(function(){
		$obj.css({ color : '#6f436c'});
		$(this).dequeue();
	});
  }
  
  function disableSelection(){
    target = document.getElementById("wrapper");
    
    if (typeof target.onselectstart!="undefined") //IE route
    	target.onselectstart=function(){return false}
    else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
    	target.style.MozUserSelect="none"
    else //All other route (ie: Opera)
    	target.onmousedown=function(){return false}
    target.style.cursor = "default"
  }