/// <reference path="jquery-1.4.1.js" />

var $j = jQuery.noConflict();

// Use jQuery via $j(...)
$j(document).ready(function(){

//    $j('.datepicker input, input.datepicker').datePicker({ startDate: '01.01.2010' });

    $j('#carousel').carousel({ type: 'normal', binds: 'click' });
    $j('.thumbs').thumbs();

    var hidehotelpreviewtimeout = 2000;
    var hidehotelpreview = function () {
        $j('.h-preview').hide();
    }

    $j('a#h-prev').mouseenter(function () {
        $j('.h-preview').hide();
        $j(this).next('div').css({
            top: '-20px',
            left: '20px',
            'z-index': 1000
        }).show();
        clearTimeout(TM);
        TM = setTimeout(hidehotelpreview, hidehotelpreviewtimeout);
    });

    var TM = setTimeout(hidehotelpreview, hidehotelpreviewtimeout);
    $j('a#h-next').mouseenter(function () {
        $j('a#h-prev').next('.h-preview').hide();
        $j(this).next('div').css({
            top: '-20px',
            left: '40px',
            'z-index': 1000
        }).show();
        clearTimeout(TM);
        TM = setTimeout(hidehotelpreview, hidehotelpreviewtimeout);
    });

    $j('.h-preview').mouseleave(function () {
        $j(this).hide();
    }).mouseenter(function () {
        clearTimeout(TM);
    });

    $j('table.content-table tr th:first-child').addClass('first');
    $j('table.content-table tr td:first-child').addClass('first');
    $j('table.content-table tr th:last-child').addClass('last');
    $j('table.content-table tr td:last-child').addClass('last');
    $j('table.content-table').each(function () {
        $j('tr:odd', this).addClass('alternate');
    });
});	 
