$(document).ready(function() {
	$('li.activitynote').each(function() {
		var elementh = this;
		$(elementh).children('em').append(currentTime());
		$(elementh).children('span').append(appName());
	});

	$('li.devnav_inactive').hover(function () {
		$(this).attr('class', this.className.replace('devnav_inactive', 'devnav_hover')).mousedown(function(){
			$(this).attr('class', this.className.replace('devnav_hover', 'devnav_down')).mouseup(function(){
			$(this).attr('class', this.className.replace('devnav_down', 'devnav_hover')).mouseout(function(){
			$(this).attr('class', this.className.replace('devnav_down', 'devnav_inactive'));
	});
	})
	});
	}, function () {
		$(this).attr('class', this.className.replace('devnav_hover', 'devnav_inactive'));
	}
	);
	
	//$('a#showmarketinglink').click(function() { showmarketform() });
	$('div.btn_close').click(function() { hidemarketform() });
	
	function showmarketform() {
		$('#marketingform:hidden').show();
	}
	function hidemarketform() {
		$('#marketingform:visible').hide();
	}
		
	function currentTime() {
		var currTime = new Date();
		
		var hour = currTime.getHours();
		var mins = currTime.getMinutes();
		var houroffset = 12;
		var day = "am";
		
		if(hour > houroffset) {
			day = "pm";
			hour = hour - houroffset;
		}
		if(hour == 0)
			hour = houroffset;
		if(mins <= 9)
			mins = "0" + mins;
		
		return(hour + ":" + mins + " " + day);
	};
	
	function appName() {
		var appname;
		var appnames = new Array();
		
		appnames[0] = "Vitual Fish Tank";
		appnames[1] = "Question It!";
		appnames[2] = "Predict It!";
		appnames[3] = "Community Word War";
		appnames[4] = "Top Friends";
		appnames[5] = "3D Friends Cube";
		appnames[6] = "Monkey Kick Ball";
		appnames[7] = "Fan Fit";
		appnames[8] = "Super Goal";
		appnames[9] = "Who's Checkin' Me Out";
		appnames[10] = "Chat Room";
		
		var rand_no = Math.floor(10*Math.random());
		
		appname = appnames[rand_no];
		return appname;
	};
});


// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000;

// Duration of crossfade (seconds)
var crossFadeDuration = 3;

// Specify the image files
var Pic = new Array(); // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = '_images/fboxdev_preview_01.gif';
Pic[1] = '_images/fboxdev_preview_02.gif';
// =======================================
// do not edit anything below this line
// =======================================

var t;
var j = 0;
var p = Pic.length;

var preLoad = new Array();
for (i = 0; i < p; i++){
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i];
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)";
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply();      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
   }
   j = j + 1
   if (j > (p-1)) { j = 0; }
   t = setTimeout('runSlideShow()', slideShowSpeed);
}
