code: function swaptitle(title){
  	
  		if(a.length===0){
  			a = [document.title];
  		}
  
  		a.push(title);
  
  		if(!iv){
  			iv = setInterval(function(){
  
  				// has document.title changed externally?
  				if(a.indexOf(document.title) === -1 ){
  					// update the default title
  					a[0] = document.title;
  				}
  				
  				document.title = a[++i%a.length];
  			}, 1000);
  		}
  	}
docs: Swap the document.title with the notification