jQuery.noConflict();    

foo={
  "list1":"div1",
  "list2":"div2",
  "list3":"div3",
  "list4":"div4"
}

var anchor = '';

// Use jQuery via jQuery(...)
jQuery(document).ready(function() {

  jQuery('#col_center_top').addClass('foo_olol');

  jQuery("#div1").attr("style","display:none");
  jQuery("#div2").attr("style","display:none");
  jQuery("#div3").attr("style","display:none");
  jQuery("#div4").attr("style","display:none");

  var activeTab = location.href.split('#')[1];
  if(!activeTab) {
    setActiveTab("list1");
  } else {
    var tab = "list"+activeTab;
    setActiveTab(tab);
  }
  
  // only if clicked ---------------------------------------------------------
  jQuery("ul.content_nav li").click(function() {
    
    // init
    jQuery("#div1").attr("style","display:none");
    jQuery("#div2").attr("style","display:none");
    jQuery("#div3").attr("style","display:none");
    jQuery("#div4").attr("style","display:none");
    jQuery("ul.content_nav li").removeAttr("class");
    
    jQuery("#img1").css("display", "block");
    jQuery("#img2").css("display", "none");      

    var listId = this.id.substr(4, 5);
    if(window.location.hash == listId) {
    } else {
      window.location.hash = listId;
    }

    jQuery(this).attr("class", "current");
    setActiveTab('list'+listId);

    if(this.id != 'list4')
      document.getElementById('tmp2').style.display="none";
    else
      document.getElementById('tmp2').style.display="block";
  
 });
});

function setActiveTab(id) {
  
  if(jQuery("#"+id)) {
    jQuery("#"+id).attr("class", "current");
  }

  switch(id) {
    case 'list1':
      jQuery("#list1").attr("class", "current first");
      jQuery("#div1").attr("style","display:block");
      jQuery("#img1").css("display", "block");
      jQuery("#img2").css("display", "none");
    break;
    case 'list2':
      jQuery("#div2").attr("style","display:block");
      jQuery('#list1').attr('class','first');
      jQuery("#img1").css("display", "block");
      jQuery("#img2").css("display", "none");
    break;
    case 'list3':
      jQuery("#div3").attr("style","display:block");
      jQuery('#list1').attr('class','first');
      jQuery("#img1").css("display", "none");
      jQuery("#img2").css("display", "none");
    break;
    case 'list4':
      jQuery("#div4").attr("style","display:block");
      jQuery('#list1').attr('class','first');
      jQuery("#img1").css("display", "none");
      jQuery("#img2").css("display", "none");
    break;
  }
}
/*
function setAnchor(id) {

jQuery('#col_center_top').addClass('foo_olol');
  var uri = jQuery("span#uri").text();
  var js = jQuery("span#js2").text();
  var tUri = uri + '#'+id;
  var newWindowOpenString = js.replace(uri, tUri);
  newWindowOpenString+=';return false;';
  //jQuery(".print").attr("onclick", newWindowOpenString);//.attr('href', 'javascript:void(0)');
  jQuery(".print").each(function () 
  {
    // window.open(jQuery(this).attr('href'), 'blabla');
    // return false;
    //jQuery(this).attr("onclick", 'window.open("'+jQuery(this).attr('href')+'", "foo");return false;').attr('href', '#');
    console.log(jQuery(this).attr("onclick").val());
    
  });
  //jQuery(".print").attr("onclick", 'window.open("'+jQuery(".print").attr('href')+'");return false;'); 
  
  // jQuery(".print").attr("onClick", newWindowOpenString);

}
  */
// Shadowbox Flashmovies
Shadowbox.loadSkin('classic', 'fileadmin/templates/script/skin');
Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], 'fileadmin/templates/script/player');
Shadowbox.loadLanguage('de-DE', 'fileadmin/templates/script/lang');


window.onload = Shadowbox.init;