//function initImageScroll(){
//    jQuery("#content-images div.csc-textpic-imagewrap ul").addClass("jcarousel-skin-tango");
//
//    jQuery("#content-images div.csc-textpic-imagewrap ul:first").jcarousel({
//        scroll:1,
//        animation:"slow",
//        easing:"swing"
//    });
//    jQuery("#content-images div.csc-textpic-imagewrap").width(Math.floor(jQuery("#content-outer-box").width()*0.96));
//    //jQuery(".jcarousel-clip-horizontal, div.jcarousel-container").width(Math.floor(jQuery("#content-outer-box").width()*0.96)-80);
//    //jQuery(".jcarousel-list").width(1000);
//}

function replaceMailLinks(){
    jQuery("#content-inner-box a").each(function(){
       var addr = jQuery(this).text();
       var addr_n = addr.replace("(at)","@");
       //addr = addr.replace("[PUNKT]",".");
       if(addr != addr_n)
	  jQuery(this).text(addr_n);

       //addr = jQuery(this).attr("href");
       //addr = addr.replace("[AT]","@");
       //addr = addr.replace("[PUNKT]",".");
       //jQuery(this).attr("href",addr);
    });

    
}

$.noConflict();
jQuery(document).ready(function($){
    

    
    replaceMailLinks();

    //avoid use of "alt" as "title" in IE
    jQuery("img,area").attr("title","");
    $(".tooltip-target").ezpz_tooltip();

    $(".imagebox").jcarousel({
      "initCallback":function(){   
      $(".jcarousel-item").each(function(){
	  $(this).width($(this).find("img").width()+14);
      });}
    });
    $(".multicolumnContainer").each(function(){
	var height1=$(this).find("li.column1 div.columnItems").height();
	var height2=$(this).find("li.column2 div.columnItems").height();
    
	if(height1>height2)
	  $(this).find("div.columnItems").height(height1+3);
	else
	  $(this).find("div.columnItems").height(height2+3);
    });

    

    
    $(".chairplan").each(function(){
      $(this).children().hide();
      $(this).find("h1").show();
      var nav = $("<div id='chairplan-nav'>");
      var img = $("<div id='chairplan-img'>");
      var plan = this;
      $(plan).append($(this).find("h1"));
      $(plan).find("dl").each(function(){
	var link=$("<a href='#' onclick='return false;'>");
	link.html($(this).find("dd").text());
	var dl = this;
	link.mouseenter(function(){
	  //img.animate({opacity:0.0},100).html($(dl).find("dt").html()).animate({opacity:1.0},100);
	  img.html($(dl).find("dt").html());
	}).mouseleave(function(){
	  img.html($(plan).find("dl:first dt").html());
	});
	nav.append(link);
      });
      $(plan).append(nav);
      $(plan).append(img);
      img.html($(plan).find("dl:first dt").html());
    });
    $("input.date").datepicker();
    $("input.date").datepicker( "option", "dateFormat",'dd.mm.yy');
    //jQuery(".reflection img").reflect();
});


