var JQUERY_THEME = BC_URL+'/lib/include/jquery/themes/base';

$(document).ready(function() {
        $.insert(JQUERY_THEME+'/jquery-ui.css');

        /* Start jQuery application slimbox 2 */
        if($("a[rel^='lightbox']").length) {
            $.insert(JQUERY_THEME+'/jquery.slimbox2.css');
            $.insert(BC_URL+'/lib/include/jquery/plugins/jquery-slimbox2-min.js');
/*
            $(function() {
                $('img').slimbox({counterText: this.title}).attr("src");
            });
*/
        }

        /* Start jQuery application fancybox - can use only with IE and if is not lightbox in use */
        else if($("a[rel^='fancybox']").length) {
            $.insert(JQUERY_THEME+'/fancybox/fancy.css');
            $.insert(BC_URL+'/lib/include/jquery/plugins/jquery-fancybox.js');
            $(function($) {
                $("img").fancybox({'hideOnContentClick':true,
                                   'overlayShow':true});
            });
        }
        /* build round corners for a div with class name rounded or rounded2 */
        if($(".rounded, .rounded_top, .rounded_bottom, .rounded_left, .rounded_right").length) {
            $.insert(BC_URL+'/lib/include/jquery/plugins/jquery-corner.js');
            $(function($) {
               $(".rounded").corner('round 18px'); /* runde Ecken*/
               $(".rounded_top").corner('top 18px'); /* meinetwegen auch nur obere Ecken*/
               $(".rounded_bottom").corner('bottom 18px'); /* oder nur untere Ecken*/
               $(".rounded_left").corner('round tl 18px').corner('round bl 18px'); /* runde Ecken links*/
               $(".rounded_right").corner('round tr 18px').corner('round br 18px'); /* runde Ecken rechts*/
            });
        }
/*
        $.insert(JQUERY_THEME+'/ui.theme.css');
*/
});