/**
 * @author webadm innovations
 */
 
$('document').ready(function(){
			$('#eula_accept').click(function(){
				if($('#eula_accept').attr('checked')){
					// Write in non flash html
					$('#airbadge').html('<p class="error"><em> Your flash player  <br /> is not compatible.  <br /> Please download the  <br /> latest version <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" title="Download Adobe Flash Player">here</a>  </em></p>');
			
					//Write air badge
					var appServer = "http://skyticker.sky.com";
					var theAppVersion = "v1.0";
	
					//Name of the containing folder
					var projName = "";

					// version 9.0.115 or greater is required for launching AIR apps.
					var so = new SWFObject(appServer +"/"+ projName + "swf/AIRInstallBadge.swf", "Badge", "215", "180", "9.0.115", "#000000");
	
					so.useExpressInstall(appServer +"/"+ projName +"swf/expressinstall.swf");
					// these parameters are required for badge install:
	
					so.addVariable("airversion", "1.1"); // version of AIR runtime required
					so.addVariable("appname", "Sky Ticker"); // application name to display to the user
					so.addVariable("appurl", appServer +"/"+ projName + "air/SkyTicker.air"); // absolute URL (beginning with http or https) of the application ".air" file
					// these parameters are required to support launching apps from the badge (but optional for install):
		
					so.addVariable("appid", "www.sky.com.skyticker"); // the qualified application ID (ex. com.gskinner.air.MyApplication)
    				so.addVariable("pubid", "C3A7B9F41647BC5F0EE1B970EEE9837B4B9B49F1.1"); // publisher id
	
					// this parameter is required in addition to the above to support upgrading from the badge:
	
					so.addVariable("appversion", theAppVersion ); // AIR application version
					// these parameters are optional:
	
					so.addVariable("imageurl", "images/badge_image.png"); // URL for an image (JPG, PNG, GIF) or SWF to display in the badge (205px wide, 170px high)
					so.addVariable("appinstallarg", "installed from web"); //passed to the application when it is installed from the badge
					so.addVariable("applauncharg", "launched from web"); //passed to the application when it is launched from the badge
					so.addVariable("helpurl", appServer + "/"+ "faqs.html"); // optional url to a page containing additional help, displayed in the badge's help screen
					so.addVariable("hidehelp", "true"); //hides the help icon if "true"
					so.addVariable("skiptransition", "true"); //skips the initial transition if "true"
					so.addVariable("titlecolor", "#ff0066");
					so.addVariable("buttonlabelcolor", "#ff0066");
					so.addVariable("str_tryagain", "Install%20Now");
					so.addVariable("str_close", "Launch%20Now");
					so.addVariable("appnamecolor", "##ff0066"); //changes the color of the application name if the image is not specified or loaded
					// these parameters allow you to override the default text in the badge:
	
					// supported strings: str_error, str_err_params, str_err_airunavailable, str_err_airswf, str_loading, str_install, str_launch, str_upgrade, str_close, str_launching, str_launchingtext, str_installing, str_installingtext, str_tryagain, str_beta3, str_beta3text, str_help, str_helptext
					so.addVariable("str_err_airswf", "<u>Running locally?</u><br/><br/>The AIR proxy swf won't load properly when this demo is run from the local file system."); // overrides the error text when the AIR proxy swf fails to load
					so.write("airbadge");
			
				}
			})	
		});



