var urlSegment = jQuery.url.segment(0);

$(document).ready(function() {

switch(urlSegment)
    {
        case "amenities": 
        	$('#slideshow').crossSlide({
			  fade: 1
			}, [
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_pool_4.jpg',
			    from: 'bottom right',
			    to:   'top left 1.5x',
			    time: 5   
			      
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_grounds_7.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4
			  },
			  { 
				src: '/wp-content/themes/lucaya/style/images/slider/slider_gym.jpg',
			    from: 'top left',
			    to:   'bottom right 1.5x',
			    time: 4
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_lobby_3.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4  		  
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_pool_4.jpg',
			    from: 'top left',
			    to:   'bottom right 1.5x',
			    time: 4  
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_spa.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4  
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_pool_8.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4  
			  }
			]);
			
			$('img.hoverButton').hover(
			function()
				{
					this.src = this.src.replace("_off","_on");
	 			},
			function()
				{
					this.src = this.src.replace("_on","_off");
				}
			);
	
			$('a.dropdownAbout').hover(
			function()
				{
					$("div#dropdownAbout").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownAbout").addClass("hideMe");
				}
			);
			
			$('a.dropdownArea').hover(
			function()
				{
					$("div#dropdownArea").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownArea").addClass("hideMe");
				}
			);
			
			$('a.dropdownFAQ').hover(
			function()
				{
					$("div#dropdownFAQ").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownFAQ").addClass("hideMe");
				}
			);
			
			$('.dropdown').hover(
			function()
				{
					$(this).removeClass("hideMe");
	 			},
			function()
				{
					$(this).addClass("hideMe");
				}
			);
        break;
        case "accommodations": 
        	$('#slideshow').crossSlide({
			  fade: 1
			}, [
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_exterior005.jpg',
			    from: 'bottom right',
			    to:   'top left 1.5x',
			    time: 5   
			      
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_kitchen.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4
			  },
			  { 
				src: '/wp-content/themes/lucaya/style/images/slider/slider_interior_4_br.jpg',
			    from: 'top left',
			    to:   'bottom right 1.5x',
			    time: 4
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_bathroom.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4  		  
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_bedroom.jpg',
			    from: 'top left',
			    to:   'bottom right 1.5x',
			    time: 4  
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_LR_Closeup.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4  
			  }
			  
			]);
			
			$('img.hoverButton').hover(
			function()
				{
					this.src = this.src.replace("_off","_on");
	 			},
			function()
				{
					this.src = this.src.replace("_on","_off");
				}
			);
	
			$('a.dropdownAbout').hover(
			function()
				{
					$("div#dropdownAbout").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownAbout").addClass("hideMe");
				}
			);
			
			$('a.dropdownArea').hover(
			function()
				{
					$("div#dropdownArea").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownArea").addClass("hideMe");
				}
			);
			
			$('a.dropdownFAQ').hover(
			function()
				{
					$("div#dropdownFAQ").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownFAQ").addClass("hideMe");
				}
			);
			
			$('.dropdown').hover(
			function()
				{
					$(this).removeClass("hideMe");
	 			},
			function()
				{
					$(this).addClass("hideMe");
				}
			);
        break;
        
        case "partners": 
        	$('#slideshow').crossSlide({
			  fade: 1
			}, [
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_entrance_1.jpg',
			    from: 'top left',
			    to:   'bottom right 1.5x',
			    time: 4   
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_grounds_7.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4
			  },
			  { 
				src: '/wp-content/themes/lucaya/style/images/slider/slider_livingRoom_6.jpg',
			    from: 'top left',
			    to:   'bottom right 1.5x',
			    time: 4
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_lobby_3.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4  		  
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_pool_4.jpg',
			    from: 'top left',
			    to:   'bottom right 1.5x',
			    time: 4  
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_pool_8.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4  
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/slider_villas_5.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 4  
			  }
			]);
			
			$('img.hoverButton').hover(
			function()
				{
					this.src = this.src.replace("_off","_on");
	 			},
			function()
				{
					this.src = this.src.replace("_on","_off");
				}
			);
	
			$('a.dropdownAbout').hover(
			function()
				{
					$("div#dropdownAbout").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownAbout").addClass("hideMe");
				}
			);
			
			$('a.dropdownArea').hover(
			function()
				{
					$("div#dropdownArea").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownArea").addClass("hideMe");
				}
			);
			
			$('a.dropdownFAQ').hover(
			function()
				{
					$("div#dropdownFAQ").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownFAQ").addClass("hideMe");
				}
			);
			
			$('.dropdown').hover(
			function()
				{
					$(this).removeClass("hideMe");
	 			},
			function()
				{
					$(this).addClass("hideMe");
				}
			);
        break;
        
        default:
        	$('#slideshow').crossSlide({
			  fade: 1
			}, [
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/default_slider_entrance_1.jpg',
			    from: 'bottom right',
			    to:   'top left 1.5x',
			    time: 5     
			      
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/default_slider_grounds_7.jpg',
			    from: 'top left',
			    to:   'bottom right 1.5x',
			    time: 5
			  },
			  { 
				src: '/wp-content/themes/lucaya/style/images/slider/default_slider_lobby_3.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 5 
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/default_slider_pool_4.jpg',
			    from: 'top left',
			    to:   'bottom right 1.5x',
			    time: 5  		  
			  },
			  {
				src: '/wp-content/themes/lucaya/style/images/slider/default_slider_villas_5.jpg',
			    from: 'bottom left',
			    to:   'top right 1.5x',
			    time: 5  
			  }
			  
			]);
			
			$('img.hoverButton').hover(
			function()
				{
					this.src = this.src.replace("_off","_on");
	 			},
			function()
				{
					this.src = this.src.replace("_on","_off");
				}
			);
	
			$('a.dropdownAbout').hover(
			function()
				{
					$("div#dropdownAbout").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownAbout").addClass("hideMe");
				}
			);
			
			$('a.dropdownArea').hover(
			function()
				{
					$("div#dropdownArea").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownArea").addClass("hideMe");
				}
			);
			
			$('a.dropdownFAQ').hover(
			function()
				{
					$("div#dropdownFAQ").removeClass("hideMe");
	 			},
			function()
				{
					$("div#dropdownFAQ").addClass("hideMe");
				}
			);
			
			$('.dropdown').hover(
			function()
				{
					$(this).removeClass("hideMe");
	 			},
			function()
				{
					$(this).addClass("hideMe");
				}
			);
        break;
    }

});
