function slideSwitch() {
    var $active = $('.slideshow li.active');

    if ( $active.length == 0 ) $active = $('.slideshow li.first');

    var $next =  $active.next().length ? $active.next()
    : $('.slideshow li.first');

    $active.addClass('last-active');

    $next.css({
        opacity: 0.0
    })
    .addClass('active')
    .animate({
        opacity: 1.0
    }, 1000, function() {
        $active.removeClass('active last-active');
    });
}

$(document).ready(function(){
    $('#booking .submit').click(function(){
        $('#booking form').submit();
        return false;
    });
	
    $('#reviews_form .submit').click(function(){
        $('#reviews_form form').submit();
        return false;
    });	

    $('#deals li.deal .about .show a, #deals li.deal .about .hide a, #news li.new .about .show a, #news li.new .about .hide a').click(function(){
        var el = $(this).parents('.about').find('.text');
		var hide = $(this).parents('.about').find('.hide');
		var show = $(this).parents('.about').find('.show');
        var display = el.css('display');
        if(display=='none'){
            el.slideDown('slow');
			setTimeout( function(){
				show.hide();
				hide.show();
			}, 150);
        }else{
            el.slideUp('slow');
			setTimeout( function(){
				hide.hide();             
				show.show();
			}, 150);			
        }
        return false;
    });

    $('#header .booking .form select[name="f_count"]')	.change(function(){
		if($(this).val()=='more'){
		      $(this).before("<input type='text' name='f_count' value='' />");
			  $(this).remove();
		}
	});
});

