﻿// execute your scripts when DOM is ready. this is a good habit
$(document).ready(function() {
    // initialize lightBox
    $('#thumbs a').lightBox();
    // initialize scrollable 
    $("div.scrollable").scrollable({
        size: 1,
        items: '#thumbs',
        hoverClass: 'hover'
    });
});


// execute your scripts when DOM is ready. this is a good habit
$(document).ready(function () {
    var dlg = $('#Besichtigung').dialog({
        autoOpen: false,
        draggable: false,
        resizable: false,
        closeOnEscape: true,
        modal: true,
        width: 723,
        open: function (event, ui) {
            var el = document.getElementById('Besichtigung');
            var elP = el.parentNode;
            if (!elP.id) {
                // dynamically add the id, and then the scroll follow code
                elP.setAttribute('id', 'dialogOuter');
                $('#dialogOuter').scrollFollow(
                                                {
                                                    speed: 1000,
                                                    offset: 0
                                                }
                        );
            }
        }
    });

    dlg.parent().appendTo($("form:first"));


    $('.dialog').click(function () {
        dlg.dialog('open');
    });

});



