// XML
// Load in the theme_options.xml and call the xmlParser function
$.ajax({     
   type     : "GET",
   url      : "XML/theme_options.xml",
   dataType : "xml",
   success  : xmlSucceed,
   error    : xmlFailed
}); 

function xmlFailed() {
	// XML did not load
}

function xmlSucceed(xml) {
	// This checks to see if the flashPaper should be on (true)	
	$(xml).find(pageName).each(function () {		
		if (($(this).find("flashPaper").text()) == "true") {
		  CreateFlashPaper();	
		}
    });	
}

// FLASH PAPER
// Flashpaper is for future proofing the website to allow full screen wallpapers that use flash
function CreateFlashPaper()
{ 
  var flashvars = {pageName: pageName};
  var params = {};
  var attributes = {};
  
  params.menu = "false";
  params.wmode = "transparent";
  params.allowfullscreen = "true";  
  swfobject.embedSWF("flash/flashpaper.swf", "flashpaper", "100%", "100%", "9.0.0", "flash/expressInstall.swf", flashvars, params, attributes);
}
