﻿
$(document).ready(function () {

    $(".button").button();

    //TODO do something about that
    //$(".button").parent().addClass("spaceless"); // set margin and padding to zero

    $(".button.disabled").button("disable");

    $("input[type=submit]").button();


    $(".schedule .tooltip").tooltip(
        {
            track: true,
            delay: 0,
            showURL: false,
            bodyHandler: function () {



                var title = $(this).find('.dataTitle').html();
                var content = $(this).find('.dataContent').html();


                var scheduling = $(this).find('.dataScheduling').html();

                var authorList = $(this).find('.dataAuthor').html();

                var room = $(this).find('.dataRoom').html();

                var ret = "";

                ret += '<h3>' + title + '</h3>'
                ret += content;
                ret += '<br/>';

                if (authorList != null) {
                    ret += authorList;
                    ret += '<br/><br/>';
                }

                ret += scheduling;

                return ret;




            },
            fade: 0
        }
    );

    $("body").removeClass("fallback");

    $("a[rel='colorbox']").colorbox();

    $("a[rel='colorbox_iframe']").colorbox({ iframe: true, width: "700px", height: "520px" });

    $(".tab").tabs(
        {
            cookie: { expires: 30 }
        }
    );



});


