Event.observe(window, 'load', init, false);

function init() {
	Event.observe('next', 'click', next, false);
}

function next(event)	{
//	Event.stop(event);
	Effect.Fade('next',{duration:0.5,queue:'end'});
	
/*	var url = 'http://www.elliotswan.com/revolver/image.php';
	var pars = 'pg=2';
    var target = 'revolver';
	var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: pars, onComplete: processComplete}); */
}

function processComplete() {
	Effect.Appear('next',{duration:0.5,queue:'end'});
	}

//Move and Copy Elements

var Move =	{

	copy	:	function(e, target)	{
				var eId      = $(e);
				var copyE    = eId.cloneNode(true);
				var cLength  = copyE.childNodes.length -1;
				copyE.id     = e+'-copy';
	
				for(var i = 0; cLength >= i;  i++)	{
				if(copyE.childNodes[i].id) 		{
				var cNode	= copyE.childNodes[i];
				var firstId	= cNode.id;
				cNode.id	= firstId+'-copy';	}
				}
				$(target).appendChild(copyE);
				},
	element	:	function(e, target, type)	{
				var eId =  $(e);
				if(type == 'move')	{
				   $(target).appendChild(eId);
				}
	
				else if(type == 'copy')	{
				   this.copy(e, target);
				}
				}
}


Ajax.Responders.register({
  onCreate: function() {
    if($('innernews') && Ajax.activeRequestCount>0)
	Effect.Fade('innernews',{duration:0.5,queue:'end'});
  },
  onComplete: function() {
    if($('innernews') && Ajax.activeRequestCount==0)
    Effect.Appear('innernews',{duration:0.5,queue:'end'});
  }
}); 
