//////
/////
/////I suck at Javascript. Don't judge me :D
/////
/////

//Get Random Color Set
function getRandomColorSet() {
	new Ajax.Request('random.php',
	  {
	  	onCreate: $('loader').style.display = "",
	    onSuccess: function(transport){
	      var colors = transport.responseText || "fail";
	      onComplete: $('loader').style.display = "none";
	      if(colors != "fail"){
	     	 var c1 = colors.slice(0,6);
	     	 var c2 = colors.slice(6,12);
	     	 var c3 = colors.slice(12,18);
	     	 var c4 = colors.slice(18,24);
	     	 var c5 = colors.slice(24,30);
	     	 $('c1').style.background = "#"+c1;
	     	 $('c2').style.background = "#"+c2;
	     	 $('c3').style.background = "#"+c3;
	     	 $('c4').style.background = "#"+c4;
	     	 $('c5').style.background = "#"+c5;
	     	 $('download_link').href = "download.php?c1="+c1+"&c2="+c2+"&c3="+c3+"&c4="+c4+"&c5="+c5+"";
	      }else{
	      	 alert('Something went wrong and we couldn\'t get a random color set.');
	      }
	    },
	    onFailure: function(){ alert('Something went wrong and we couldn\'t get a random color set.') }
	  });
}

/////
function instructions() {
	alert('Hit "randomize" until you find a color set you like, then hit the download link. Hold your finger on the image to save, go to your photos, select the image and set it as your background, now you\'re done!');
}
function contact() {
	alert('mail@stripedbgs.com');
}













