// Making the Blog Index page my marionette with Mouvement...

	var mainMenu = Array();
	// Mouvement launch sequence
	Page.onReady = function() {
		// Set up input watching for the comment field. (Mobile browsers only - this variable is fed through PHP).
		var hifi = false;
		var OSString = navigator.appVersion;
		if (OSString.indexOf("Win") != -1 || OSString.indexOf("Mac") != -1 || OSString.indexOf("X11") != -1 || OSString.indexOf("Linux") != -1) {
			hifi = true;
		}

		if (hifi) { /* High-fidelity mode activates only on a desktop browser as these effects are more resource intensive */
			kLogo = Page.preShine('kashmaniacLogo', true);
			
			var menuBtns = Array("mainHomeBtn", "mainBlogBtn", "mainPortfolioBtn", "mainKashiBtn", "mainContactBtn");
			var thisPage = 1;
			var i = menuBtns.length;
			while (i--) {
				var currentBtn = Page.grabItem(menuBtns[i]);
				currentBtn.display.alpha = 0;
				if (i !== thisPage) {
					Page.hoverFade(currentBtn, 100, 0, 0.25, 0.5);
					var menuImage = Page.grabItem(currentBtn.domElement.firstChild);
					menuImage.placeHolder = true;
					menuImage.move("nowhere", 76, 0.5);

					var slide = function(e) {
						var menuItem = (e.currentTarget !== undefined) ? e.currentTarget : e.srcElement;
						if (menuItem.tagName === 'IMG') {
							var mouveItem = Page.grabItem(menuItem);
						} else if (menuItem.tagName === 'DIV') {
							var mouveItem = Page.grabItem(menuItem.nextSibling);
						} else {
							var mouveItem = Page.grabItem(menuItem.lastChild);
						}
						
						if (e.type === "mouseover") {
							mouveItem.move("nowhere", 0, 0.5);
						} else {
							mouveItem.move("nowhere", 76, 0.5);
						}
					}
				
					if (currentBtn.domElement.addEventListener != undefined) {
						currentBtn.domElement.addEventListener('mouseover', slide, false);
						currentBtn.domElement.addEventListener('mouseout', slide, false);
					} else {
						currentBtn.domElement.attachEvent('onmouseover', slide);
						currentBtn.domElement.attachEvent('onmouseout', slide);
					}
				} else {
					currentBtn.display.alpha = 0;
					currentBtn.alpha(100, 0.5);
				}
			}	
		
		}
		
		
		
		if (Page.isIE) {}

		setTimeout(function() {Page.play();}, Page.heartbeat);
	}
