jQuery.noConflict()

jQuery(document).ready(function(){

  //external window
  jQuery('a[class="external"]').click(function(){
    this.target = "_blank";
  });
  
  //popup window
  jQuery('a[class="popup"]').click(function(){
    window.open(this.href, 'Popup', 'height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0,left=50,top=50', 'false');
    return false;
  });
  
  //close popup window link
  jQuery('a[class="popup_close"]').click(function(){
    window.close();
    return false;
  });
  
  //print link
  jQuery('a[class="print"]').click(function(){
    window.print();
    return false;
  });
  
  //confirm link
  jQuery('a[class="confirm"]').click(function(){
    return confirm(this.title);
  });
  
  //bookmark link 
  jQuery("a.bookmark").click(function(event){
    event.preventDefault();
    var url = this.href;
    var title = this.title;
    if (window.sidebar) {
      window.sidebar.addPanel(title, url, "");
    }
    else 
      if (window.external) {
        window.external.AddFavorite(url, title);
      }
      else {
        alert('Uw browser ondersteunt helaas niet deze optie.');
      }
  });
  
  //iframe replacement
  jQuery('a[class="iframe"]').each(function(i){
    jQuery(this).replaceWith("<iframe src='" + this.getAttribute("href") + "' frameborder='0' scrolling='no' width='934' height='600'></iframe>");
  });
  
  //image rollover
  jQuery("img.rollover").hover(function(){
    this.src = this.src.replace("_off.", "_on.");
  }, function(){
    this.src = this.src.replace("_on.", "_off.");
  });
  
  //forms - focus
  jQuery("input[type=password], input[type=text], textarea").focus(function(){
    jQuery(this).addClass("focus");
  });
  jQuery("input[type=password], input[type=text], textarea").blur(function(){
    if (jQuery(this).find(".focus")) {
      jQuery(this).removeClass("focus");
    }
  });
  
  //forms - hover
  jQuery("input.submit").hover(function(){
    jQuery(this).addClass("hover");
  }, function(){
    jQuery(this).removeClass("hover");
  });
  
  //forms - auto submit
  jQuery(".auto_submit").change(function(){
    jQuery(this.form).submit();
  });
  
  //forms - no javascript button
  jQuery('.no_javascript').hide();
  
  //flash
  jQuery('.media_flash').media({
    type: 'swf',
    caption: false
  });

  jQuery('.media').media({
    caption: false,
    width: 200,
    height: 150
  });
  
  //toggle
  jQuery("dd.content").hide();
  jQuery("dt.toggle a").click(function(){
    jQuery(this).parent().next("dd").toggle();
    return false;
  });
  
  //dropdown menu - hover IE6
  jQuery('div#footer ul li').hover(function(){
    jQuery(this).addClass('hover');
  }, function(){
    jQuery(this).removeClass('hover');
  });
  
  //forms - autoclear
  jQuery('form#form_search input[type="text"]').attr({
    value: 'Zoek'
  }).focus(function(){
    if (jQuery(this).val() == "Zoek") {
      jQuery(this).val("");
    }
  }).blur(function(){
    if (jQuery(this).val() == "") {
      jQuery(this).val("Zoek");
    }
  });
  
  //tabs
  var tabContainers = jQuery('div#tabs > div');
  jQuery('div#tabs ul.tab_options a').hover(function(){
    tabContainers.hide().filter(this.hash).fadeIn('300');
    jQuery('div#tabs ul.tab_options a').removeClass('selected');
    jQuery(this).addClass('selected');
    return false;
  }).filter(':first').hover();
  
});
