// JavaScript Document

$(document).ready(function(){
	

//country






function easeInOut(minValue,maxValue,totalSteps,actualStep,powr) {
	var delta = maxValue - minValue;
	var stepp = minValue+(Math.pow(((1 / totalSteps)*actualStep),powr)*delta);
	return Math.ceil(stepp)
}

function addFade() {
		doBGFade(this,[255,255,100],[255,255,255],'transparent',75,20,4);
	}
	
function doBGFade(elem,startRGB,endRGB,finalColor,steps,intervals,powr) {
	if (elem.bgFadeInt) window.clearInterval(elem.bgFadeInt);
	var actStep = 0;
	elem.bgFadeInt = window.setInterval(
		function() {
			elem.style.backgroundColor = "rgb("+
				easeInOut(startRGB[0],endRGB[0],steps,actStep,powr)+","+
				easeInOut(startRGB[1],endRGB[1],steps,actStep,powr)+","+
				easeInOut(startRGB[2],endRGB[2],steps,actStep,powr)+")";
			actStep++;
			if (actStep > steps) {
			elem.style.backgroundColor = finalColor;
			window.clearInterval(elem.bgFadeInt);
			}
		}
		,intervals)
}


});


function GetCountry(thisValue)
{
if(thisValue == "NONUK"){                     $("div#form").find("div#freqdiv:hidden").slideDown("slow");                 }	
if(thisValue == "UK"){                     $("div#form").find("div#freqdiv:visible").slideUp("slow");                 }
}


function GetMusTypes(thisValue)
{
	
if(thisValue == "INDIVIDUAL")
{
$("div#form").find("div#talentsdiv:hidden").slideDown("slow");
$("div#form").find("div#banddiv:visible").slideUp("slow");
}	

if(thisValue == "GROUP")
{
$("div#form").find("div#banddiv:hidden").slideDown("slow");
$("div#form").find("div#talentsdiv:visible").slideUp("slow");  
$("div#form").find("div#instrumentdiv:visible").slideUp("slow");   
document.location="#banddiv";
}

}


function GetTalentTypes(thisValue)
{
if(thisValue == "VOCALISTANDINSTRUMENT" || thisValue == "INSTRUMENT")
{
$("div#form").find("div#instrumentdiv:hidden").slideDown("slow");
document.location="#instrumentdiv";
}
	
if(thisValue == "VOCALIST")
{
$("div#form").find("div#instrumentdiv:visible").slideUp("slow");                 }
}

