/**
 * @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/skymedia";
					var theAppVersion = "v1.02";
	
					//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:
	
			var params = { allowfullscreen : "true",  bgcolor : "#ffffff"};
			

			var attributes = { id: "airbadge", name: "airbadge"	};
	
	
			var flashvars ={
						"airversion":"1.1",
						"appname": "Sky Ticker",
						"appurl": appServer +"/"+ projName + "air/SkyTicker.air",
						"appid": "www.sky.com.skyticker",
						"pubid": "C3A7B9F41647BC5F0EE1B970EEE9837B4B9B49F1.1",
						"appversion": theAppVersion ,
						"imageurl": "http://www.skymedia.co.uk/ticker/images/badge_image.png",
						"appinstallarg": "installed from web",
						"applauncharg": "launched from web",
						"helpurl": appServer + "/"+ "faqs.html",
						"hidehelp": "true",
						"skiptransition": "true",
						"titlecolor": "#1196b4",
						"buttonlabelcolor": "#1196b4",
						"str_tryagain": "Install%20Now",
						"str_close": "Launch%20Now",
						"appnamecolor": "#1196b4",
						"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."
					}
					
					
					swfobject.embedSWF( appServer + "/swf/AIRInstallBadge.swf", "airbadge", "215", "180", "9.0.115", "/swf/expressInstall.swf", flashvars, params, attributes);
				}
			})	
		});



