// JavaScript Document


function detectMacXFF2() {

  var userAgent = navigator.userAgent.toLowerCase();
  if (/firefox[\/\s](\d+\.\d+)/.test(userAgent)) {
    var ffversion = new Number(RegExp.$1);
    if (ffversion < 3 && userAgent.indexOf('mac') != -1) {
      return true;
    }	
  }
   return false;
}

$(document).ready(function(){
	var ffMc2 = detectMacXFF2();

	$("ul.drop").hide();

	$("li.dropdown").hover(

		function(){
                        $(this).find('a').removeClass('selected');
		
			//problems with firefox displaying the animation on mac so this detects and shows relevant version

			if(ffMc2){
				$("ul.drop", this).show();
				$("div.flashHolder").css({
					//display:"relative"
				});
			} else {
				$("ul.drop", this).fadeIn("fast");
			}
		},
		function(){
			if(ffMc2){
				$("ul", this).hide();
			} else {
				$("ul", this).fadeOut("fast");
			}
		
		
		}
		
    );
});
