$(function(){
	$('a.file').each(function(){
		uri = $(this).attr('href');
		$(this).parent()
			.mousedown(function(){
					$(this)
						.removeClass('hover')
						.addClass('active')
					.end();
					//window.open(uri,"blank","");
					return false;
			})
			.mouseup(function(){
					$(this)
						.removeClass('active')
						.addClass('hover')
						.css('cursor','pointer')
					.end();
			})
			.hover(
				function(){
					$(this)
						.addClass('hover')
						.css('cursor','pointer')
				},
				function(){
					$(this).removeClass('hover')
				}
			)
		.end();
	})
	.mousedown(function(){
		$(this).parent().addClass('active');
	})
	.end();
	
	$('li.image')
		.each(function(i){
			src = 'movieplayer.swf';
			MovieID = 'mov' + i;
			$(this).find('img')
				.attr('id',MovieID)
			.end();
			var flashvars = {
			 movieNum: i,
			 xmlsrc: "movie.xml"
			};
			var params = {
			  wmode:"window",
			  menu: "false",
			  allowFullScreen: "true",
			  allowScriptAccess: "sameDomain"
			};
			var attributes = {
			  id: MovieID,
			  name: MovieID
			};
			
			swfobject.embedSWF(src, MovieID, "180", "101", "8.0.0","", flashvars, params, attributes);

		})
	.end();
});
