$(function(){
	
	var winheight = $(window).height();
	var winwidth = $(window).width();
	var defaultHeight = 521;
	var defaultWidth = 991;
	var height = defaultHeight;
	var width = defaultWidth;
	var difference = 712 - winheight;
	if(difference > 0){
		nv = (defaultHeight - difference);
		percent = nv/defaultHeight;
		height = parseInt(defaultHeight*percent);
		width = parseInt(defaultWidth*percent);
	}
	$(".placeholder").css("height",height+"px");
	//$(".placeholder").css("width",width+"px");
	$(".placeholder").css("background-image","none");
	var flash = AC_FL_RunContent(
		'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
		'width', '991',
		'height', height,
		'src', 'flashmenu',
		'quality', 'high',
		'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
		'align', 'middle',
		'play', 'true',
		'loop', 'true',
		'scale', 'showall',
		'wmode', 'transparent',
		'devicefont', 'false',
		'id', 'flashmenu',
		'bgcolor', '#3d0401',
		'name', 'flashmenu',
		'menu', 'true',
		'allowFullScreen', 'false',
		'allowScriptAccess','sameDomain',
		'movie', 'flashmenu',
		'salign', ''
	);
	
	$(".placeholder").html(flash);

	var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
	
	$("#lwp_2_searchbutton").removeAttr("style");
	
});
