//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)","@");
       if(addr != addr_n)
	  jQuery(this).text(addr_n);
    });

    
}

$.noConflict();
jQuery(document).ready(function($){
    
    //$(".header-img .csc-default").height($("#header-image-l").height());
    //$(".header-img .csc-default").dropShadow({left:-1,top:-1,blur:3,opacity:0.4,color:"black"});
    replaceMailLinks();

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

    

    $("input.csc-mailform-submit").parent().removeClass("csc-mailform-field");
    //$("input.csc-mailform-submit").dropShadow({left:1,top:2,blur:2,opacity:0.4,color:"black",swap:false});
    //$("input.csc-mailform-submit").mouseenter(function(){
	//$(this).removeShadow();
	//$(this).dropShadow({left:1,top:2,blur:1,opacity:0.4,color:"black",swap:false});
	//$(this).css("margin","11px");
    //}).mouseleave(function(){
	//$(this).dropShadow({left:1,top:2,blur:2,opacity:0.4,color:"black",swap:false});
	//$(this).css("margin","10px");
    //});

    $("ul.menu a:not(.active)").mouseenter(function(){
	//$(this).parents("li").dropShadow({left:0,top:0,blur:2,opacity:0.3,color:"white",swap:false});
	$(this).parents("li").css({'background-color':"#133545"});      
    }).mouseleave(function(){
      //$(this).parents("li").removeShadow();
      $(this).parents("li").css({'background-color':"#0f3141"});
    });
    $("ul.menu a.active").each(function(){
	//$(this).parents("li").dropShadow({left:0,top:0,blur:3,opacity:0.3,color:"white",swap:false});
	$(this).parents("li").css({'background-color':"#8db322"});
	//$(this).css({"color":"#0f3141"});
      
    });

    $(".imagebox").jcarousel({
    });

    $(".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);
    });

    //jQuery(".reflection img").reflect();
    
    jQuery(".news-single-item").each(function(){
      var imglink = jQuery(this).find("img:first").parent("a");
      var file = jQuery(this).find(".news-single-files a:first").attr("href");
      if(imglink && file)
	imglink.attr("rel","").attr("href",file).attr("target","_blank");
    });
});


