    $.lazy({
        src: baseUrl+'/js/jquery/jquery.tagbox.js',
        name: 'tag_box',
        dependencies: {
            css: [baseUrl+'css/jquery/tagbox.css']
        }
    });

    $.lazy({
        src: baseUrl+'js/jquery/jquery.maskedinput-1.2.2.min.js',
        name: 'mask'
    });


    $.lazy({
        src: baseUrl+'js/jquery/fancybox/jquery.fancybox-1.3.2.pack.js',
        name: 'fancybox',
        dependencies: {
            css: [baseUrl+'js/jquery/fancybox/jquery.fancybox-1.3.2.css']
        }
    });

    $.lazy({
        src: baseUrl+'js/jquery/ical/jquery-ical.js',
        name: 'ical',
        dependencies: {
            css: [baseUrl+'js/jquery/ical/jquery-ical.css']
        }
    });

    $.lazy({
        src: baseUrl+'js/jquery/jquery.fileUploader.js',
        name: 'fileUploader',
        dependencies: {
            css: [baseUrl+'css/jquery/fileUploader.css']
        }
    });

jQuery(document).ready(function() {

    $(".newscontent:gt(0)").children("div").hide();
    $(".newscontent h2").hover(
            function() {
                $(this).addClass('ui-state-hover');
            },
            function() {
                $(this).removeClass('ui-state-hover');
            }
        );
    $(".newscontent h2").click(function() {
        $(".newscontent").children("div").slideUp();
        $(this).siblings().slideDown();        
    });
    // Activate Accordions
    $(".accordion").accordion({autoHeight: false});
    // Activate Tabs
    $(".tabbed").tabs();

    // Zebra Tables
    $(".datalist:not(.nozebra) tr:nth-child(odd)").addClass("ui-state-highlight");

    // Style Tables
    $("th").addClass("ui-state-default");

    // Style buttons
    $('.button').each(function() {
        $(this).addClass('fg-button ui-state-default ui-corner-all');
        $(this).hover(
            function() {
                $(this).addClass('ui-state-hover');
            },
            function() {
                $(this).removeClass('ui-state-hover');
            }
        );
    });

    // Initialize DatePicker
    $("input.datepick").datepicker({
        dateFormat: 'dd.mm.yy',
        changeMonth: true,
        changeYear: true,
        gotoCurrent: true
    });

    // Special settings for birthdate picker
    today = new Date();
    currentYear = today.getFullYear();

    $("input.agepick").datepicker('option','defaultDate', '-16y');
    $("input.agepick").datepicker('option','yearRange',(currentYear-40)+':'+currentYear);
    $("input.agepick").datepicker('option','maxDate', 0);

    // Activate CKEDITOR
    $('textarea').ckeditor({
            width: "400",
            language: 'de',
            EnterMode: 'br',
            resize_enabled: false
    });
});

function fboxTitle(title, currentArray, currentIndex, currentOpts) {
    return '<div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img src="/data/closelabel.gif" /></a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';
}


