function inputUp(id) {
    var value = parseInt($('#'+id).val());
    if (value < 10) {
        value += 1;
        $('#'+id).val(value);
    }
}

function inputDown(id) {
    var value = parseInt($('#'+id).val());
    if (value > 1) {
        value -= 1;
        $('#'+id).val(value);
    }
}



function getValues() {
    var href = $('#book_url').val() + '?webresid=' + $('#book_webresid').val() + '&LANG=' + $('#book_lang').val();
    href += '&arrival=' + $('#book_arrival').val() + '&departure=' + $('#book_departure').val();
    href += '&persons=' + $('#book_persons').val() + '&rooms=' + $('#book_rooms').val();
    $('#book_submit').attr('href',href);
}

$(document).ready(function() { 
    $("#book_submit").fancybox({ 
        'callbackOnStart' : getValues,
        'zoomSpeedIn': 300, 
        'zoomSpeedOut': 300, 
        'frameWidth': 800,
        'frameHeight':400
    });
    
    $("#palais_reservation").fancybox({ 
    	'zoomSpeedIn': 300, 
        'zoomSpeedOut': 300, 
        'frameWidth': 980,
        'frameHeight':550
    }); 
    
    $(".palais_reservation_content").fancybox({ 
    	'zoomSpeedIn': 300, 
        'zoomSpeedOut': 300, 
        'frameWidth': 980,
        'frameHeight':550
    }); 
    
    $('.input_date').numeric({allow:"."});
    $('.input_number').numeric();
    
    $('.input_date_3').datepicker({
        dateFormat: 'dd.mm.yy',
        minDate: 0,
        changeMonth: true,
        changeYear: true,
        showButtonPanel: true,
        firstDay: 1
    });
    
    $('.input_date_1').datepicker({
        dateFormat: 'dd.mm.yy',
        minDate: 0,
        changeMonth: true,
        changeYear: true,
        showButtonPanel: true,
        firstDay: 1,
        dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
        monthNamesShort: ['Jan','Feb','März','April','Mai','Juni','Juli','Aug','Sep','Okt','Nov','Dez'],
        currentText: 'Heute',
        closeText: 'Schließen',
        nextText: 'Vor',
        prevText: 'Zurück'
    });
    
    
    $('#headanimation').innerfade({ 
        speed: 2000,
        timeout: 5000,
        type: 'sequence', 
        containerheight: '210px' 
    });
     
    $(".fancy_gallery").fancybox({ 
        'zoomSpeedIn': 300, 
        'zoomSpeedOut': 300
    }); 
    
    
    
}); 