var streepnum = 1;
//var bimg_path = "http://"+document.domain+"/";
var bimg_path = "";

function OneByOneHide(j)
	{
	if(j==1)
	
	{
		$('.button'+j).attr("src",bimg_path+"images/"+j+".jpg");
	}
	else if(j==2)
	{ 
		$('.button'+j).attr("src",bimg_path+"images/"+j+".jpg");
	}
	else if(j==3)
	{ 
		$('.button'+j).attr("src",bimg_path+"images/"+j+".jpg");
	}
	else if(j==4)
	{ 
		$('.button'+j).attr("src",bimg_path+"images/"+j+".jpg");
	}
	   

	}

function OneByOne() {

if(streepnum==1)
	{
		$('#strip'+streepnum+' a').trigger('mouseover');
		$('.button'+streepnum).attr("src",bimg_path+"images/live.png");
		//$('.button'+streepnum).css({opacity: '0.9'});
		$('.button'+streepnum).fadeOut(0);$('.button'+streepnum).fadeIn(100);
		
	}
	else if(streepnum==2)
	{ 
		  $('#strip'+streepnum+' a').trigger('mouseover');
     	  $('.button'+streepnum).attr("src",bimg_path+"images/stay.png");
     	  //$('.button'+streepnum).css({opacity: '0.9'});
     	  $('.button'+streepnum).fadeOut(0);$('.button'+streepnum).fadeIn(100);
     
	}
	
	else if(streepnum==3)
	{
		$('#strip'+streepnum+' a').trigger('mouseover');
		$('.button'+streepnum).attr("src",bimg_path+"images/indulge.png");
		//$('.button'+streepnum).css({opacity: '0.9'});
		$('.button'+streepnum).fadeOut(0);$('.button'+streepnum).fadeIn(100);
	
	}
	else if(streepnum==4)
	{
	 	$('#strip'+streepnum+' a').trigger('mouseover');
	 	$('.button'+streepnum).attr("src",bimg_path+"images/relax.png");
	 	//$('.button'+streepnum).css({opacity: '0.9'});
	 	$('.button'+streepnum).fadeOut(0);$('.button'+streepnum).fadeIn(100);	
	}
   
	setTimeout("OneByOneHide("+streepnum+")",2000);
	streepnum += 1 ;
	if(streepnum > 4)
	{
		streepnum = 1;
	}
}
	
$(document).ready(function() {
	
$(".button1").hover(function() {
	
		$(this).attr("src",bimg_path+"images/live.png");
			//$(this).css({opacity: '0.9'});
		    $(this).fadeOut(0);$(this).fadeIn(100);
		}, function() {
		$(this).attr("src",bimg_path+"images/1.jpg");
	

	});
	
		
$(".button2").hover(function() {
		$(this).attr("src",bimg_path+"images/stay.png");
			//$(this).css({opacity: '0.9'});
		  	$(this).fadeOut(0);$(this).fadeIn(100);
		}, function() {
		$(this).attr("src",bimg_path+"images/2.jpg");
	

	});
		
$(".button3").hover(function() {
		$(this).attr("src",bimg_path+"images/indulge.png");
			//$(this).css({opacity: '0.9'});
		  	$(this).fadeOut(0);$(this).fadeIn(100);
		}, function() {
		$(this).attr("src",bimg_path+"images/3.jpg");
	

	});
		

		
$(".button4").hover(function() {
		$(this).attr("src",bimg_path+"images/relax.png");
			//$(this).css({opacity: '0.9'});
		  	$(this).fadeOut(0);$(this).fadeIn(100);
		}, function() {
		$(this).attr("src",bimg_path+"images/4.jpg");
	

	});
		

	/************************* Auto Slide*********************************/
	
	var test =setInterval('OneByOne('+streepnum+')',2000);

	$(".jimgMenu").mousemove(function(){
	
		clearInterval(test);
		   
 		},function(){
	});
	
	//************************** Auto start after mouse out*********************
   	$('#contentarea_home').mouseout( function () { 
   		//alert("Mouse over content area Home"); 
		test =setInterval('OneByOne('+streepnum+')',2000);
     },  
 	 function () {}  
   	);
 
  
	$('.jimgMenu ul').kwicks({max: 450, duration: 500, easing: 'swing'});	

});
