$(document).ready(function() {

// Set styles for windows
// jQuery.each(jQuery.browser, function() {
//   //var browser = $.browser.firefox;
//   var win = $.browser.win;
//   if (win) {
//     $('#main-nav ul li').mouseover(function() { 
//       $('#main-nav ul ul').css('margin-left', '-74px');
//     });
//   }
// });

//////////////////////////////////////////////////////////////////////////// Navigation

// Header-nav pipes, no pipe on first nav item
  $('#header-nav ul li:first').addClass('first');
  
  var currentHover = "";

// Main-nav drop-downs   
  $('#main-nav ul li:has(ul)').hover(function()
  {
    $(this).addClass('nav-on');
     $(this).children('ul').show();
     $("#copy").addClass('transparent');
     currentHover = this;
  },
  function()
  {
    $(this).removeClass('nav-on');
     $(this).children("ul").hide();
     $("#copy").removeClass('transparent');
  });

// Footer-nav pipes, no pipe on first nav item
  $('#footer ul li:first').addClass('first');

//////////////////////////////////////////////////////////////////////////// Project Details

// Set alternating row color
  $('#details table tr:odd').css('background-color', '#e6e6e6');
  $('#details table tr:even').css('background-color', '#cccccc');


////////////////////////////////////////////////////////////////////////////swfobject call

  var flashvars = {};
  var params = {
      menu: "false",
      wmode: "transparent"
      };
  var attributes = {};
  
  swfobject.embedSWF("swf/gears.swf", "flash-gears", "475", "225","9.0.0", "", flashvars, params, attributes);
	
////////////////////////////////////////////////////////////////////////////siFR call
	
  $("#commentForm").validate();

  // fix for the form hovers
  $('#commentForm').hover(function()
  {
    $(currentHover).removeClass('nav-on');
     $(currentHover).children('ul').hide();
     $("#copy").removeClass('transparent');
     //alert("hovering over comment form");
  },
  function()
  {
    //don't do anything
  });

	// if(typeof sIFR == "function"){
	// 	sIFR.replaceElement("h1", named({sFlashSrc: "swf/sifr.swf", sColor: "#0000", sWmode: "transparent"}));
	// };
	//ScrollBar
	
  // $('#copy').jScrollPane({
  // 	   showArrows: false,
  // 	   scrollbarWidth: 9,
  // 	   dragMinHeight: 20,
  // 	   dragMaxHeight: 75
  // });

}); //end document.ready

$(function(){
	$('#copy').jScrollPane({
	   showArrows: false,
	   scrollbarWidth: 9,
	   dragMinHeight: 75,
	   dragMaxHeight: 75
    });
});
