﻿LM.Index = {
	InitBlogScroller: function() {
		$('quickMid').setStyle('position', 'relative');
		this.scroller = new LM.Scroll($('quickMid'), $$('.blogWall'), 3, 93);
		$$('#quickBottom a.scrollDown').addEvent('click', this.scroller.scrollDown.bindWithEvent(this.scroller, '/home/forum/down'));
		$$('#quickTop a.scrollUp').addEvent('click', this.scroller.scrollUp.bindWithEvent(this.scroller, '/home/forum/up'));
		//fix for issue with IE
		if (Browser.Engine.trident) {
			$$('#quickBottom a.scrollDown').fireEvent('click');
			$$('#quickTop a.scrollUp').fireEvent('click');
		}
	},
	InitNoticeBoardScroller: function() {
		$('noticeMid').setStyle('position', 'relative');
		this.Nscroller = new LM.Scroll($('noticeMid'), $$('.noticePost'), 2, 101);
		$$('#noticeBottom a.scrollDown').addEvent('click', this.Nscroller.scrollDown.bindWithEvent(this.Nscroller, '/home/notice_board/down'));
		$$('#noticeTop a.scrollUp').addEvent('click', this.Nscroller.scrollUp.bindWithEvent(this.Nscroller, '/home/notice_board/up'));
		//fix for issue with IE
		if (Browser.Engine.trident) {
			$$('#noticeBottom a.scrollDown').fireEvent('click');
			$$('#noticeTop a.scrollUp').fireEvent('click');
		}
	},
	InitTitlesScroller: function() {
		$('moreTitles').setStyle('position', 'relative');
		this.Tscroller = new LM.Scroll($('moreTitles'), $$('.moreTitles'), 4, 89);
		$$('#moreTitlesLeft a.scrollLeft').addEvent('click', this.Tscroller.scrollLeft.bindWithEvent(this.Tscroller, '/home/titles/previous'));
		$$('#moreTitlesRight a.scrollRight').addEvent('click', this.Tscroller.scrollRight.bindWithEvent(this.Tscroller, '/home/titles/next'));
		//fix for issue with IE
		if (Browser.Engine.trident) {
			$$('#moreTitlesRight a.scrollRight').fireEvent('click');
			$$('#moreTitlesLeft a.scrollLeft').fireEvent('click');
		}
	},
	EmbedFlash: function() {
		var flashvars =
		{
		//custom flash vars go here as JavaScript object properites
		//use native data types where necessary i.e. Boolean, Number, String
	};
	var params =
		{
			// properties of the embed and object html tags
			menu: "true",
			scale: "noscale",
			wmode: "opaque"
		};
	var attributes =
		{
			// any custom HTML attributes
			id: "VideoPlayer",
			name: "flashMovie"
		};
	// does the actual embed, replace all values wrapped in <>
	swfobject.embedSWF(path + "/flash/portalVideoPlayer.swf", "VideoPlayer", "639", "250", "9.0.0", "js/swfobject/expressInstall.swf", flashvars, params, attributes);

}
};

