$(document).ready(function(){
  $("#headSearchSubmit").mouseover(function(){
    $(this).attr("base", $(this).attr("src"));
    $(this).attr("src", $(this).attr("active") );
  }).mouseout(function(){
    $(this).attr("src", $(this).attr("base") );
  });
  $("#contentNavigationSelect").fdd2div({AnimationSpeed: "fast", GenerateHyperlinks:1, OpenStatus:0, maxHeight:5});
  $('form#contactSubjectForm').jForms({listSize:10});

// select "Suche" on click
  $("#searchValue").focus(function (e) {
    $(this).select(); 
  });
// tag cloud
  $(".tagCloud li").each(function(i,e){
    switch (i) {
      case 0:
        $(e).addClass("tagCloud11");
        break;
      case 1:
        $(e).addClass("tagCloud13");
        $(e).css("marginLeft", "10px");
        break;
      case 2:
        $(e).addClass("tagCloud15");
        $(e).css("textAlign", "center");
        break;
      case 3:
        $(e).addClass("tagCloud17");
        break;
      case 4:
        $(e).addClass("tagCloud15");
        $(e).css("textAlign", "right");
        $(e).css("marginRight", "10px");
        break;
      case 5:
        $(e).addClass("tagCloud13");
        $(e).css("marginLeft", "28px");
        break;
      case 6:
        $(e).addClass("tagCloud11");
        break;
    }
  });
    
    
// add rounded corners ti images with the class "roundedCorners"
  htmlStr  = "<div class='imageCornerBR'></div>";
  htmlStr += "<div class='imageCornerBL'></div>";
  $("img.roundedCorners").after(htmlStr);
  $("#largeStageTeaserAnimation").after(htmlStr);

// image gallery
  htmlStr = "<a href='javascript:void(0)' class='imageGalleryThunbnailsBG'><div></div></a>";
  $(".imageGalleryThunbnails img").wrap(htmlStr).click(function(){
    $(".imageGalleryImage img").attr("src", $(this).attr("zoomLargeUrl"));
    $(".imageGalleryImage img").attr("zoomParam", $(this).attr("zoomGalleryParam"));
    $(".imageGalleryImage img").attr("zoomurl", $(this).attr("zoomGalleryUrl"));
    $(".imageGalleryThunbnailsBG div").css("backgroundImage", "none");
    $(this).parent().css("height", "56px");
    $(this).parent().css("backgroundImage", "url(/cb/308662/data/-/galerie_thumb_bg-a.jpg.jpg )");
  });
// iconBookmark
  if($('meta[name=language]').attr("content") == "en"){
    $("a.iconBookmark").html("Bookmark this page");
  }
}); // document.ready
var flashvars = {};
var attributes = {};
var params = {
  wmode: "transparent",
  menu: "false",
  quality: "high",
  allowscale: "false",
  allowScriptAccess: "always"
};
$.fn.wait = function(time, type) {
    time = time || 1000;
    type = type || "fx";
    return this.queue(type, function() {
        var self = this;
        setTimeout(function() {
            $(self).dequeue();
        }, time);
    });
};
