	jQuery(document).ready(function(){
		
		// cycle images based on hotel div hover
		jQuery('#main-visual').cycle({
			timeout: 0,
		    pager:  '#main',
			pagerEvent: 'mouseover',
		    pagerAnchorBuilder: function(idx, slide) { 
		        // return selector string for existing anchor 
				return 'div#hotel' + (idx +1);
		    }
		});
		
		// to make hotel links work after hover
		// rebind the href's
		jQuery('div.hotel a.pager').each(
			function(intIndex) {
				var hotelLink = jQuery(this).attr("href");
				jQuery(this).bind("click", function() {
					location = hotelLink;
				});
		});
		
		// to make book now links work after hover
		// rebind the href's
		jQuery('span.book-link a').each(
			function(intIndex) {
				var bookLink = jQuery(this).attr("href");
				jQuery(this).bind("click", function() {
					location = bookLink;
				});
		});
		
		// hover effect on hotel divs
		jQuery('div.hotel').hover(
			function() {
				jQuery(this).css("opacity", "0.9")
			},
			function() {
				jQuery(this).css("opacity", "1.0")
			}
		)
		
		// rotate best rates
		jQuery('.best-rate-slides-content').cycle({
			delay: 4000,
			timeout: 4000
		});
		
	}); // end doc ready