eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(4($){j g,$m,$T,$5,$1g,$J,$E,$K,$L,k,1z={n:"5",o:"",1h:.8,q:"22",r:"23",1A:"24...",1B:"25",1C:"26",1D:"28",1E:4(){}},v={},13=F,U=$([]);$.5=4(){k=$.M({},1z,$.5.k);6($.z.14&&$.z.15<7){U=U.1i("29")}1F();1G()};4 1G(){$("a[1j^=5],2a[1j^=5]").1H(4(){j b=$(1k),16=b.A("1j"),17=16.1l(/^5\\[([^#\\.\\]]+)/)[1],1m=16.1I("5","").1l(/([#\\.][^#\\.\\]]+)/g)||[],1n=k.n,1o=k.o;1k.1J=16.1I("5["+17+1m.2b("")+"]","");$.1H(1m,4(i,a){6(a.18(0,1)=="#"){1n=a.18(1)}V 6(a.18(0,1)=="."){1o+=" "+a.18(1)}});6(17.2c(/^19|W|B|1p|1q$/)!=-1){b.5(17,{n:1n,o:1o})}})};$.2d.5=4(a,b){b=$.M({},k,b);$.5[a](1k,b)};$.M($.5,{19:4(b,c,d){j f=N(b.C(0)),X=F;6(f&&d=="W")X=f[1];V 6(f)X=f[0];b.9(4(e){e.1a();Y();6(d=="W")1K(b,f[0]);Z(4(){j a=F,$1b;6(X){a=X.1c("x")}$1b=$(\'<2e 1L="\'+b.A("1d")+\'" 1M="\'+(b.A("1M")||b.2f())+\'" />\');$1b.1N(4(){1O($1b,a);11({o:"19 "+c.o,n:c.n});12()}).l($h)})})},W:4(a,b){j c=N(a.C(0));6(!v[c[0]]){v[c[0]]=[]}v[c[0]].2g(a);a.C(0).1P=(v[c[0]].2h-1);$.5["19"](a,b,"W")},B:4(b,c){j d=N(b.C(0));b.9(4(e){e.1a();Y();Z(4(){j a=F,$B;6(d){a=d[0].1c("x")}c=$.M({},c,{q:a[0]||c.q,r:a[1]||c.r});$B=$(\'<B 1L="\'+b.A("1d")+\'" 2i="\'+b.A("1d")+\'" 2j="0" 2k="2l" 2m="0" G="\'+c.q+\'" t="\'+c.r+\'"></B>\');$B.1N(4(){$5.G(c.q+"w");$h.t(c.r+"w");11({o:"B "+c.o,n:c.n});12()}).l($h)})})},1p:4(b,c){j d=N(b.C(0));b.9(4(e){e.1a();Y();Z(4(){j a=F;6(d)a=d[0].1c("x");c=$.M({},c,{q:a[0]||c.q,r:a[1]||c.r});$5.G(c.q+"w");$h.t(c.r+"w");$(b.A(\'1d\')).2n().l($h).H();11({o:"1p "+c.o,n:c.n});12()})})},1q:4(c,d){j f=N(c.C(0));c.9(4(e){e.1a();Y();Z(4(){j b=F;6(f&&f[3]){b=f[3].1c("x")}d=$.M({},d,{q:b[0]||d.q,r:b[1]||d.r});$5.G(d.q+"w");$h.t(d.r+"w");$.C(f[2],4(a){$(a).l($h)});11({o:"1q "+d.o,n:d.n});12()})})}});4 N(a){2o a.1J.1l(/([^\\[\\]]+)/g)};4 1O(a,b){$5.G(a.G()+($h.s("2p").1Q(0,-2)-0)+($h.s("2q").1Q(0,-2)-0));$h.t(a.t());6(b&&b[0]!=""){$5.G(b[0]+"w")}6(b&&b[1]!=""&&b[1]>a.t()){$h.t(b[1]+"w")}};4 1K(a,b){$E.H();13=1R;j c=a.C(0).1P+1,1r=c-2;6(v[b][c]){$K.1S("1e").O("9").1s("9",4(){v[b][c].9()})}V $K.1T("1e").O("9");6(v[b][1r]){$L.1S("1e").O("9").1s("9",4(){v[b][1r].9()})}V $L.1T("1e").O("9")};4 11(a){$5.A("P",a.n).A("Q",a.o)};4 1U(){$(1V).O("1t");$J.y();$E.y();$m.y().s({I:"2r",D:0});$h.1W()};4 1u(a){1U();g.2s(1v,4(){U.H()});13=F};4 Z(a){j b=4(){6($.z.14&&$.z.15<7){$m.s({I:"1f",D:"1w%"})}U.y();$J.H();a()};6(13){g.s("1x",k.1h).H();b()}V{g.s("1x",0).H().1X(1v,k.1h,b)}};4 Y(){$m.H();$h.1W();$5.s({I:"1f",D:"-2t"})};4 12(a,b){$J.y();$(1V).O("1t").1s("1t",4(e){6(e.1y==27)1u();6(e.1y==2u&&$K.1Y(":1Z"))$K.9();6(e.1y==2v&&$L.1Y(":1Z"))$L.9()});$5.s({I:"2w",D:0,1x:0});6($.z.14&&$.z.15<8){$5.s({I:"2x",D:"-1w%"});6($.z.14&&$.z.15<7)$m.s({I:"1f",D:"1w%"})}6($(2y).t()<$m.t()){$m.s({I:"1f",D:($m.2z().D+10)+"w"})}k.1E();$5.1X(1v,1)};4 1F(){6(!$.5.20){g=$(\'<u P="5-2A"></u>\').l("21").y();$m=$(\'<u P="5-m"></u>\').l("21").y();$T=$(\'<u P="5-T"></u>\').l($m);$5=$(\'<u P="5"></u>\').l($T);$h=$(\'<u P="5-h"></u>\').l($5);$E=$(\'<p Q="E"></p>\').l($5).y();$L=$(\'<a Q="2B"><R><S>\'+k.1C+\'</S></R></a>\').l($E);$K=$(\'<a Q="2C"><R><S>\'+k.1D+\'</S></R></a>\').l($E);$1g=$(\'<p Q="2D"><a><R><S>\'+k.1B+\'</S></R></a></p>\').2E($5).2F("a");$J=$(\'<p Q="J">\'+k.1A+\'</p>\').l($T).y();g.1i($m).1i($1g).9(4(){1u()});$5.9(4(e){e.2G()});$.5.20=1R}}})(2H);',62,168,'||||function|superbox|if|||click||||||||innerbox||var|settings|appendTo|wrapper|boxId|boxClasses||boxWidth|boxHeight|css|height|div|galleryGroups|px||hide|browser|attr|iframe|get|top|nextprev|false|width|show|position|loading|nextBtn|prevBtn|extend|getRelSettings|unbind|id|class|strong|span|container|hideElts|else|gallery|dimensions|prepareBox|initLoading||setBoxAttrs|showBox|galleryMode|msie|version|relAttr|type|substr|image|preventDefault|curImg|split|href|disabled|absolute|closeBtn|overlayOpacity|add|rel|this|match|boxCurrentAttrs|newBoxId|newBoxClasses|content|ajax|prevKey|bind|keydown|hideAll|300|50|opacity|keyCode|defaultSettings|loadTxt|closeTxt|prevTxt|nextTxt|beforeShow|createElements|dispatch|each|replace|_relSettings|nextPrev|src|title|load|resizeImageBox|_superboxGroupKey|slice|true|removeClass|addClass|hideBox|document|empty|fadeTo|is|visible|elementsReady|body|600|400|Loading|Close|Previous||Next|select|area|join|search|fn|img|text|push|length|name|frameborder|scrolling|auto|hspace|clone|return|paddingLeft|paddingRight|fixed|fadeOut|99999px|39|37|static|relative|window|offset|overlay|prev|next|close|prependTo|find|stopPropagation|jQuery'.split('|'),0,{}));

jQuery(InitSite);

function InitSite()
{
    $("#header .board img").hover(
        function() {this.src=this.src.replace("_off","_on");},  
        function() {this.src=this.src.replace("_on","_off");}
    );
	 
	$.superbox();   
}
var siteurl='http://www.funsongs.co.uk/';
function email(str) {
	    var error = "";
  		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){  
		document.getElementById("email").style.backgroundColor = '#FFDFE3';	
		
		   error = "Invalid E-mail\n";
		   return error;
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){  
	document.getElementById("email").style.backgroundColor = '#FFDFE3';	
		
		   error = "Invalid E-mail\n";
		   return error;
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
	document.getElementById("email").style.backgroundColor = '#FFDFE3';	
		
		       error = "Invalid E-mail\n";
		   return error;
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		document.getElementById("email").style.backgroundColor = '#FFDFE3';
		
		     error = "Invalid E-mail\n";
		   return error;
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){	 
	document.getElementById("email").style.backgroundColor = '#FFDFE3';
	
		      error = "Invalid E-mail\n";
		   return error;
		 }

		 if (str.indexOf(dot,(lat+2))==-1){	
		document.getElementById("email").style.backgroundColor = '#FFDFE3';
		
		   error = "Invalid E-mail\n";
		   return error;
		 }
		
		 if (str.indexOf(" ")!=-1){
		     error = "Invalid E-mail\n";
		document.getElementById("email").style.backgroundColor = '#FFDFE3';
		   return error;
		 }

		   return error; 
}
 

function fetchinfo (str,div)
 	{
		document.getElementById(div).style.display = 'block';
		$("#"+div).load(str,{async: true});	  
		
}

function closediv(div){

   document.getElementById(div).style.display = 'none';

   }
function validate_product() {
var reason = "";

  	reason += validatechoice();
  	reason += validatesize();
	reason += validateqty();

  
  if (reason != "") {
    alert("Some fields need correction:\n" + reason);
    return false;
  }
else
{  
   document.addtobasket.action=siteurl+'cartcontrol/';
   document.addtobasket.submit();
   }
}
function validatechoice() {
    var error = "";
 
    if (document.addtobasket.ppid.value == "") 
	{	
		document.getElementById("ppid").style.backgroundColor = '#FFDFE3';
        error = "Please select your colour choice.\n";
    } 
    return error;  
}
function validatesize() {
    var error = "";
 
    if (document.addtobasket.typea.value == "") 
	{  
		document.getElementById("typea").style.backgroundColor = '#FFDFE3';
        error = "Please select your size.\n";
    } 
    return error;  
}
function validateqty() {
    var error = "";
 
    if (document.addtobasket.quantity.value == "") 
	{  
		document.getElementById("quantity").style.backgroundColor = '#FFDFE3';
        error = "Please select quantity required.\n";
    } 
    return error;  
}
