$(document).ready( function() {


  if(!jQuery.support.opacity && !jQuery.support.style && !(typeof document.documentElement.style.maxHeight != "undefined") ){
    window.location.href = '/env.html';
  }


  $('.pagetop a').click(function(){
      $('html,body').animate({ scrollTop: 0 }, {duration:500,queue:false});
      return false;
  });
  
  $('.hide').hide();

  $('.btnToggle').toggle(
    function() {
      btn = $(this);
      $($(this).attr('href')).slideDown('fast', function(){btn.css('background-image', 'url(/common/img/btn-close.png)'); btn.siblings('.coloricons').hide(); });
      return false;
    },
    function() {
      btn = $(this);
      $($(this).attr('href')).slideUp('fast', function(){btn.css('background-image', 'url(/common/img/btn-open.png)'); btn.siblings('.coloricons').show(); });
      return false;
    }
  );

  $(".btnHover").hover(
    function () {
	    $(this).attr('src', $(this).attr('src').replace("-off.", "-on."));
    },function () {
	    $(this).attr('src', $(this).attr('src').replace("-on.", "-off."));		
    }
  );


});
