var img1 = new Image();
img1.src = "/images/menu_bg.png"; 
var flash_here = true;
$(document).ready(function() {
	//alert("This is " + jQuery.browser.version);
	//Browser's classes
	 if (jQuery.browser.opera ) {
	  jQuery("#wrapper").addClass("opera");
	}
	if (jQuery.browser.msie ) {
		jQuery("#wrapper").addClass("ie_" + parseInt(jQuery.browser.version));
		//alert("ie_" + parseInt(jQuery.browser.version));
	}
	
	if (jQuery.browser.safari) {
		var sf_ver = jQuery.browser.version;
		var build_no = parseInt(sf_ver.substr(0,3));
		if (build_no < 533) {
			jQuery("body").addClass("safari_3");
		} else {
			if ((jQuery.client.os == 'Mac')&&(jQuery.browser.version == '533.19.4')) {
				//jQuery("#wrapper").addClass("no_flash_here");
				flash_here = false;
				
			}
			jQuery("body").addClass("safari_5");
		}	
	}
	var is_chrome = /chrome/.test( navigator.userAgent.toLowerCase() );
	if (is_chrome) {
		jQuery("#wrapper").addClass("chrome");
	}
	//click link with class external
	$("a.external").click(function() {
		window.open( $(this).attr('href') );
        return false;
	});
	$("#main_menu").lavaLamp({
		fx: "backout", 
		speed: 700,
		click: function(event, menuItem) {
			return true;
		}
	});
	$("#main_menu li.level_1").hover(
	  function () {
		$(this).find(".opacity_wrapper").css('filter', 'alpha(opacity=85)');
		$(this).find(".sub_main_menu a").css('filter', 'alpha(opacity=100)');
		$(this).find(".sub_main_menu").fadeIn(700); 
		/* $(this).find(".sub_main_menu").css("display", "block"); */
	  }, 
	  function () {
		$(".sub_main_menu").css("display", "none");
	  }
	);
	/*Flash for home page START*/
	var flashvars = {
	};
	var params = {
	  menu: "false",
	  wmode:"opaque"
	};
	var attributes = {
	  id: "flash_content",
	  name: "flash_content"
	};
	if (($("#flash_content").length == 1)&&(flash_here)) {
		swfobject.embedSWF("./swf/drdodde.swf", "flash_content", "990", "354", "9.0.0", "./swf/expressInstall.swf", flashvars, params, attributes);
	}
	/*Flash for home page END*/
});
$(window).load(function () {
	$('#overlay').css('display', 'none');
});
