﻿LM = {};


LM.Index = {

	CreateAccordion: function()
	{
		new Accordion($$('.toggler').getParent(),$$('.slideout'),{
			display: -1,
			alwaysHide: true
		})
	},
	
	InitDropdownAjax: function(dropdown)
	{
		if($chk(dropdown))
		{
			dropdown.addEvent('change', function() {
				 var myHTMLRequest = new Request.HTML({
					 url: siteRoot + '/dropdown.php',
					 update: $('sectionPosts'),
					 onComplete: function() {
						 $('logo').set('class','logo_' + dropdown.value);
					 }
				 }).post({'catName': dropdown.value});
			})
		}
	},
	
	InitVideoFlash: function(siteRoot)
	{
			var flashvars1 = 
			{
				//custom flash vars go here as JavaScript object properites
				//use native data types where necessary i.e. Boolean, Number, String
				dataPath: '/assets/xml/data.xml',
				sitePath: siteRoot
			};
			var params = 
			{
				// properties of the embed and object html tags
				menu: 	"true",
				scale: 	"noscale", 
				wmode: 	"transparent"
			};
			var attributes = 
			{
				// any custom HTML attributes
				id: 	"flashMovie",
				name: 	"flashMovie"
			};
			
			// does the actual embed, replace all values wrapped in <>
			swfobject.embedSWF(siteRoot + "/flash/UCF_VideoPlayer.swf", "videoPlayerHolder", "752", "316", "9.0.0", "js/swfobject/expressInstall.swf", flashvars1, params, attributes);

	}
}
