radColors = ['2DA47E','43C2EF','0184B0','FFB790','89A5B0','EA3C21','EE699E','C5B0B5','DD0069','E4E679','CB99BF','2CBCF1','FEF898','811314','FED102','FAC9DF','6E2D19','FFFEB3','69BA99','FFE500','911367','042D49','FF9B07','021274','FFD102','D82835','99A9A9','DE0056','A3D1E8','F3E20C','012887','FCB9CA','026839','A7A342','0291DF','F186B0','E82716','4D165A','FFDBE9','CE9707','C65A94','E20530','133C1E','7BAF27','EE5691','986053','CDEBED','F7024F','068B30','863615','04856F','03A2E6','FFE44D','B4A391','0060AC','0185DA','FEDBC8','014C25','F14537','F5C0AE','FFF565','6FAB27','A09B97','FFF86C','217693','F46215','86CFD8','FFA739','A9E1F8','F7F6A6','DF0827','00837B','042D49','DD0161','68171E','ED3C12','FFECE5','FF9A24','925417','31992A','CBAC8D','B29829','FDF202','71BB86','CCBD6A','FDFCCE','08ACCF','7DB868','76B1D1','816D0E','FCE148','FCD590','80D216','FF5F13','72C8D7','8C8FBC','B4C612','FFF88E','E52522','FFD573','E28410','C5ECFD','A8C314','FFEAC5','D30837','64C6E9','FFF342','431464','E1E78F','015965','961416','026AA1','FDECD2','31992A','FEE202','F8DDA6','B18C6F','933976','EE5D96','FF860F','CAE8F3','C40D43','E30824','E0D700','FFF311','8F1165','0172C0','E3F6FD','02377D','E16F93'];

//this is called onload
$(document).ready(function(){
	//var radColorIdx = -1;
	$("div.littleblock").each(function(i) {
		radColorIdx = Math.floor(Math.random() * (radColors.length));
		this.style.background = "#"+radColors[radColorIdx];
		radColors.splice(radColorIdx, 1);
	});
	$("div.downloadLink").each(function(i) {
		$(this).mouseover(function() {
			$(this).siblings("a")[0].style.background = "#38d3ff";
			$(this).siblings("a")[0].style.color = "#38d3ff";
			$(this).siblings("div.tip")[0].style.display = "inline";
			$(this).siblings("div.tip").html("Download");
		});
		$(this).mouseout(function() {
			$(this).siblings("a")[0].style.background = "#221a18";
			$(this).siblings("a")[0].style.color = "#fff";
			$(this).siblings("div.tip")[0].style.display = "none";
		});
	});
	$("div.playLink").each(function(i) {
		$(this).mouseover(function() {
			$(this).siblings("a")[0].style.background = "#38d3ff";
			$(this).siblings("a")[0].style.color = "#38d3ff";
			$(this).siblings("div.tip")[0].style.display = "inline";
			$(this).siblings("div.tip").html("Play");
		});
		$(this).mouseout(function() {
			$(this).siblings("a")[0].style.background = "#221a18";
			$(this).siblings("a")[0].style.color = "#fff";
			$(this).siblings("div.tip")[0].style.display = "none";

		});
	});
	$("div.title a").each(function(i) {
		$(this).mouseover(function() {
			this.style.background = "#38d3ff";
		});
		$(this).mouseout(function() {
			this.style.background = "#221a18";
		});
	});
});

function playTrack(file, title) {
	var so = new SWFObject("swf/streamer.swf", "Streamer", "200", "34", "7", "#160e0c");
	so.addVariable("_file", file);
	so.addVariable("_title", title);
	so.write("player");
}

function openSmallWindow(URL, wWidth, wHeight, scrolly) {
	window.open(URL, '_blank', 'toolbar=0,menubar=0,status=0,resizable=1,dependent=1,scrollbars=' + scrolly + ',width=' + wWidth + ',height=' + wHeight);
}

