function rand (min, max) {
  var argc = arguments.length;
  if (argc === 0) {  min = 0; max = 2147483647;  } else if (argc === 1) {
      throw new Error('Warning: rand() expects exactly 2 parameters, 1 given');
  }
  return Math.floor(Math.random() * (max - min + 1)) + min;
}



jQuery(document).ready(function(){
  jQuery(document).pngFix(); 
  
  //jQuery(".sf-menu").superfish();
  
	
  //randomize header img {
  /*var randomheadimg = 'images/splashimg'+rand(1,5)+'.jpg';
  jQuery(".headerimg img").attr('src',randomheadimg);
  //}*/
  
  jQuery("#headerimg_cont").cycle({
		fx: 'scrollHorz',
		next: '.btnext',
		prev: '.btprev',
		speed: 1000,
		timeout: 7000,
		manualTrump: false
	}); 
	
	jQuery("#nav li").live('mouseover',function(){
		jQuery(this).addClass('sfHover'); 
		jQuery(this).parent().addClass('sfHover');
	});
	jQuery("#nav li").live('mouseout',function(){
		jQuery(this).removeClass('sfHover');
		jQuery(this).parent().removeClass('sfHover');
	});
	
	jQuery('#nav').replaceWith('<div id="nav">'+jQuery("#nav").html()+'</div>');
	
  //make main content and sidebar height the same {
  //var mch = jQuery("#main_content").height();
  //var sbh = jQuery("#sidebar_right").height();
  //if(mch > sbh){
    //jQuery("#sidebar_right").height(mch-60+50);
  //} else {
  //  jQuery("#main_content").height(sbh-50+60);
  //}
  //}
});
