
/* ie text selection bug fix */
if( document.compatMode && document.compatMode == "CSS1Compat" ) {
  document.onreadystatechange = function fixIE6AbsPos() {
    if( !document.body ) { return; }
    document.body.style.height = document.documentElement.scrollHeight + 'px';
  }
}


$.fn.toggleSlidebar = function() {
  return this.each(function(){
      var d = $.css(this,"display");
      if ( d == "none" || d == '' ) {
      $("a.whatis").html("Wat is BestThings.nl verbergen");
      $(this).slideDown("slow");
      }
      else {
      $("a.whatis").html("Wat is Bestthings.nl?");
      $(this).slideUp("slow"); 
      }
      });
}


$(document).ready(function(){
    setBigHover();

    $("a.whatis").bind("click",function() {  
      $("div.slidebar").toggleSlidebar();
      this.blur();
      return false;
      });
    });

function setBigHover() {
  $('td.product')
    .click(function() {
        var url = $("a", $(this))[0].href; 
        window.location = url;
        } )
  .hover (function() {
      $(this).toggleClass("bighover-on");
      } , function() {
      $(this).toggleClass("bighover-on");
      } )
}


function popUp(url, name, width, height)

{
  window.open(url, name,'width=' + width + ',height=' + height + ',scrollbars=yes,toolbar=no,location=no'); 
  return false;
}

function toggleOther(chosen) {
  if (chosen == 'other') {
    document.register.country2.style.visibility = 'visible';
  } else {
    document.register.county2.style.visibility = 'hidden';
    document.register.country2.value = '';
  }
}
