$(document).ready(function(){
    $("#topdrawer").hide();
	$("#topdrawer").css("height", "150px");
	
    $("#drawertoggle").click(function () {
	  if ($("#topdrawer").is(":hidden")) {
        $("#topdrawer").slideDown("slow");
		$("#drawertoggle").css({ "background-position" : "0 -12px" } );
      } else {
	  	$("#topdrawer").slideUp("slow");
		$("#drawertoggle").css({ "background-position" : "0 0px" } );
      }
    });




$("a[href*=#]").click(function() {
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
	&& location.hostname == this.hostname) {
	  var $target = $(this.hash);
	  $target = $target.length && $target
	  || $('[name=' + this.hash.slice(1) +']');
	  if ($target.length) {
		var targetOffset = $target.offset().top;
		$('html,body')
		.animate({scrollTop: targetOffset}, 500);
	   return false;
	  }
	}
  });


// fade showcase
$("#fadepanels").innerfade({  animationtype: 'fade',
							speed: 2000,
							timeout: '5000',
							type: 'random_start',
							containerheight: '150px',
							runningclass: 'sc' });

});