			$(document).ready(function(){
			$("ul#menu span").css("opacity","0");
			$("ul#menu span").css("display","block");
			
			$("ul#menu span").hover(function () {
			$(this).stop().animate({
			opacity: 1
			}, 500);
		},
		
		function () {
			$(this).stop().animate({
			opacity: 0
			}, 500);
		});
		
	$('.news_letters input[type="text"]').addClass("idleField");
       		$('.news_letters input[type="text"]').focus(function() {
       			$(this).removeClass("idleField").addClass("focusField");
    		    if (this.value == this.defaultValue){ 
    		    	this.value = '';
				}
				if(this.value != this.defaultValue){
	    			this.select();
	    		}
    		});
    		$('input[type="text"]').blur(function() {
    			$(this).removeClass("focusField").addClass("idleField");
    		    if ($.trim(this.value) == ''){
			    	this.value = (this.defaultValue ? this.defaultValue : '');
				}
    		});
			
			 $('#submit').hover(
            function(){ // Change the input image's source when we "roll on"
                $(this).attr({ src : 'http://www.chat-room.com/wp-content/themes/chatroom/images/submit_rol.jpg'});
            },
            function(){ // Change the input image's source back to the default on "roll off"
                $(this).attr({ src : 'http://www.chat-room.com/wp-content/themes/chatroom/images/submit.jpg'});             }
        );
	
	/*	 $('.cat_img').hover(
            function(){ // Change the input image's source when we "roll on"
                $(this).addClass('brdr3');
            },
            function(){ // Change the input image's source back to the default on "roll off"
                $(this).removeClass('brdr3');             }
        );
      */
	
		$('.member').hover(
            function(){ // Change the input image's source when we "roll on"
                $(this).addClass('brdr1');
            },
            function(){ // Change the input image's source back to the default on "roll off"
                $(this).removeClass('brdr1');             }
        );
		
		$('.featured_games').hover(
            function(){ // Change the input image's source when we "roll on"
                $(this).children('.game_thumb').addClass('brdr1');
            },
            function(){ // Change the input image's source back to the default on "roll off"
                $(this).children('.game_thumb').removeClass('brdr1');             }
        );
		
		$(window).scroll(function() {
		$('.scrlbtn').stop().animate({top: $(document).scrollTop()+225},'slow','easeOutBack');});	
		$('.featured_games').hover(
  function () {
 $(this).children('.g_name').stop().animate({  bottom: '1px'});
  },
  function () {
 $(this).children('.g_name').stop().animate({bottom: '-27px' });
  }
);


setInterval(userprofile, 5000);

var userArray = ['f_profile1.jpg','f_profile2.jpg','f_profile3.jpg','f_profile4.jpg','f_profile5.jpg','f_profile6.jpg','f_profile7.jpg','f_profile8.jpg','f_profile9.jpg','f_profile10.jpg','f_profile11.jpg','f_profile12.jpg','f_profile13.jpg','f_profile14.jpg','f_profile15.jpg','f_profile16.jpg','f_profile17.jpg','f_profile18.jpg','f_profile19.jpg','f_profile20.jpg','f_profile21.jpg','f_profile22.jpg','f_profile23.jpg','f_profile24.jpg','f_profile25.jpg','f_profile26.jpg','f_profile27.jpg','f_profile28.jpg','f_profile29.jpg','f_profile30.jpg','f_profile31.jpg','f_profile32.jpg','f_profile33.jpg','f_profile34.jpg','f_profile35.jpg','f_profile36.jpg','f_profile37.jpg','f_profile38.jpg','f_profile39.jpg','f_profile40.jpg','f_profile41.jpg','f_profile42.jpg','f_profile43.jpg','f_profile44.jpg','f_profile45.jpg','f_profile46.jpg','f_profile47.jpg','f_profile48.jpg','f_profile49.jpg','f_profile50.jpg','m_profile1.jpg','m_profile2.jpg','m_profile3.jpg','m_profile4.jpg','m_profile5.jpg','m_profile6.jpg','m_profile7.jpg','m_profile8.jpg','m_profile9.jpg','m_profile10.jpg','m_profile11.jpg','m_profile12.jpg','m_profile13.jpg','m_profile14.jpg','m_profile15.jpg','m_profile16.jpg','m_profile17.jpg','m_profile18.jpg','m_profile19.jpg','m_profile20.jpg','m_profile21.jpg','m_profile22.jpg','m_profile23.jpg','m_profile24.jpg','m_profile25.jpg','m_profile26.jpg','m_profile27.jpg','m_profile28.jpg','m_profile29.jpg','m_profile30.jpg','m_profile31.jpg','m_profile32.jpg','m_profile33.jpg','m_profile34.jpg','m_profile35.jpg','m_profile36.jpg'];
var arr = $.shuffle(userArray);
var i=0;


$(".member").each(function(){
	$(this).find("img").attr({src :'http://www.chat-room.com/wp-content/themes/chatroom/chatusers/'+arr[i]});
	i++;
	});
	


function userprofile()
{
	$('.member').removeClass('brdr1');
	$(".member").eq(Math.floor(Math.random()*12)).animate({opacity:0},function()
	{
		/*if ( (arr[i] == false) || (arr[i] == 'undefined') || (!arr[i].match(/_profile/gi)) )
		{
			alert(i);
		}*/
		$(this).find("img").attr({src :'http://www.chat-room.com/wp-content/themes/chatroom/chatusers/'+arr[i]});
		$(this).animate({opacity:1}).addClass('brdr1');
		if(i==85)
		{i=0;}
	});
	i++;
}
	$("#slideshow").css('display','block');
	
		});
