jQuery(document).ready(function($){

	// Charlie's rotation script: 'Revolver'
	// Need divs with class of 'revolver' and ID of 'revolver_1', 'revolver_2' etc

	var groups = $('div.revolver').size(); // how many revolving sections do we have? Only do animation if more than one
	if (groups > 1) {
		var i = 1;
		
		$('div.revolver').hide();
		$('#revolver_'+i).show(); // show first group
	
		var aniCar = setInterval(function() // rotate through groups in a loop
		{
			$('#revolver_'+i).hide();
			i += 1;
			if ( i > groups ) i = 1;
			$('#revolver_'+i).fadeIn('slow');		
		}, 5000);	
	}
		

$('.join-in-button').mouseover(function() {
	$(this).attr('src', 'http://raptureworld.co.uk/registration/images-registration/JoinNow-Glow.gif')
});

$('.join-in-button').mouseleave(function() {
	$(this).attr('src', 'http://raptureworld.co.uk/registration/images-registration/JoinNow-noGlow.gif')
});

	/// CARACTERES LIMIT
	jQuery('#text_area_example textarea').show_char_limit(255, {
    status_element: '#text_area_example .status',
    error_element: '#text_area_example'
  } );

}); // End Jquery






  // Internet Explorer Input yellow fields
  // This is caused by having the Google Toolbar installed and the AutoFill option enabled

  if(window.attachEvent)
    window.attachEvent("onload",setListeners);

  function setListeners(){
    inputList = document.getElementsByTagName("INPUT");
    for(i=0;i<inputList.length;i++){
      inputList[i].attachEvent("onpropertychange",restoreStyles);
      inputList[i].style.backgroundColor = "";
    }
    selectList = document.getElementsByTagName("SELECT");
    for(i=0;i<selectList.length;i++){
      selectList[i].attachEvent("onpropertychange",restoreStyles);
      selectList[i].style.backgroundColor = "";
    }
  }

  function restoreStyles(){
    if(event.srcElement.style.backgroundColor != "")
      event.srcElement.style.backgroundColor = "";
  }//-->
