$(document).ready(function()
{
  
     $.preloadImages("images/lakeside_minnows_lodge_1.jpg", "images/lakeside_minnows_lodge_2.jpg", "images/lakeside_minnows_lodge_3.jpg", "images/lakeside_minnows_lodge_4.jpg", "images/lakeside_minnows_lodge_5.jpg" , "images/lakeside_minnows_lodge_6.jpg");
    
    

    $('#one').css({'left' : '-150px'});
    var $marginOne = $('#one');
    $marginOne.animate( 
    {marginLeft:'150px'},500); 
   
   
    $('#two').css({'left' : '-350px'});
    var $marginTwo = $('#two');
    $marginTwo.animate( 
    {marginLeft:'500px'},1500); 
    
     
   $('#three').css({'left' : '-500px'});
    var $marginThree = $('#three');
   $marginThree.animate( 
    {marginLeft:'1000px'},2900); 
    
     var $marginFour = $('#four');
     $marginFour.animate(
     {marginLeft:'500px'},500); 
    
    
  

    $(document).ready(function()
    {
    
      var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'-500px'},0);    
                $('#holder2').css({'left' : '-500px'});
                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'500px'},0); 
                
                  $(this).delay(0,function(){

                     $('#holder2').html('<img  src="images/lakeside_minnows_lodge_1.jpg" alt=""  />'); 

                });
       
    });
    
    
      
      
      $('#image7').click(function () 
     {

                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'-500px'},500);    
                $('#holder2').css({'left' : '-500px'});
                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'500px'},1500); 
                
                  $(this).delay(500,function(){

                     $('#holder2').html('<img  src="images/lakeside_minnows_lodge_1.jpg" alt=""  />'); 

                });
    
      });
      
      $('#image8').click(function () 
     {

                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'-500px'},500);    
                $('#holder2').css({'left' : '-500px'});
                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'500px'},1500); 
                
                  $(this).delay(500,function(){

                     $('#holder2').html('<img  src="images/lakeside_minnows_lodge_2.jpg" alt=""  />'); 

                });
    
      });
      
       $('#image9').click(function () 
     {

                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'-500px'},500);    
                $('#holder2').css({'left' : '-500px'});
                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'500px'},1500); 
                
                  $(this).delay(500,function(){

                     $('#holder2').html('<img  src="images/lakeside_minnows_lodge_3.jpg" alt=""  />'); 

                });
    
      });
      
             $('#image10').click(function () 
     {

                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'-500px'},500);    
                $('#holder2').css({'left' : '-500px'});
                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'500px'},1500); 
                
                  $(this).delay(500,function(){

                     $('#holder2').html('<img  src="images/lakeside_minnows_lodge_4.jpg" alt=""  />'); 

                });
    
      });
      
      $('#image11').click(function () 
     {

                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'-500px'},500);    
                $('#holder2').css({'left' : '-500px'});
                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'500px'},1500); 
                
                  $(this).delay(500,function(){

                     $('#holder2').html('<img  src="images/lakeside_minnows_lodge_5.jpg" alt=""  />'); 

                });
    
      });
      
      
       $('#image12').click(function () 
     {

                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'-500px'},500);    
                $('#holder2').css({'left' : '-500px'});
                var $marginFour = $('#holder2');
                $marginFour.animate(
                {marginLeft:'500px'},1500); 
                
                  $(this).delay(500,function(){

                     $('#holder2').html('<img  src="images/lakeside_minnows_lodge_6.jpg" alt=""  />'); 

                });
    
      });
      
    
      
      $('#rates').css({'right' : '-503px'});
      $('#ratesTab').click(function () 
      {
                
                var ratesCheck = $('#rates').css('margin-right');
                if (ratesCheck=='508px')
                {
                
                    var $marginRates = $('#rates');
                    $marginRates.animate(
                    {marginRight:'-508px'},500); 
                }
                else
                {
                
                    var $marginRates = $('#rates');
                    $marginRates.animate(
                    {marginRight:'508px'},500); 
                
                }
      });
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
     
      

           
       
       
       
       
       
       
 
           
       
       
       
       
       
           

      


    
    


    
});  

jQuery.fn.delay = function(time,func){
    this.each(function(){
        setTimeout(func,time);
    });
    
    return this;
};
  
    

jQuery.preloadImages = function()
{
for(var i = 0; i<arguments.length; i++)
{
    jQuery("<img>").attr("src", arguments[i]);
}
}


    