/* hide show */
<!--
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->

/* lightbox */
$(function() { $('#illu_box a').lightBox(); $('#skate_box a').lightBox(); $('#sappi_box a').lightBox(); 
$('#takecare_box a').lightBox(); $('#timeout_box a').lightBox();  });

$(document).ready(function(){  
$("#green").animate({width:'80px'},{queue:false, duration:0,});
$("#yellow").animate({width:'22px'},{queue:false, duration:0,});
$("#red").animate({width:'60px'},{queue:false, duration:0,});
$("#blue").animate({width:'50px'},{queue:false, duration:0,});
$("#purple").animate({width:'40px'},{queue:false, duration:0,});
$("#brown").animate({width:'500px'},{queue:false, duration:0,});


/* First accordion */
$("#green").mousedown(function(){	
$("#green").animate({width:'500px'},{queue:false, duration:500,});
$("#yellow").animate({left:'500px',width:'22px'},{queue:false, duration:500,});
$("#red").animate({left:'522px',width:'60px'},{queue:false, duration:500,});
$("#blue").animate({left:'582px',width:'50px'},{queue:false, duration:500,});
$("#purple").animate({left:'632px',width:'40px'},{queue:false, duration:500,});
$("#brown").animate({left:'672px',width:'23px'},{queue:false, duration:500,});
});  

$("#yellow").mousedown(function(){
$("#green").animate({width:'80px'},{queue:false, duration:500,});
$(this).animate({left:'80px',width:'500px'},{queue:false, duration:500,});
$("#red").animate({left:'522px',width:'60px'},{queue:false, duration:500,});
$("#blue").animate({left:'582px',width:'50px'},{queue:false, duration:500,});
$("#purple").animate({left:'632px',width:'40px'},{queue:false, duration:500,});
$("#brown").animate({left:'672px',width:'23px'},{queue:false, duration:500,});
});  

$("#red").mousedown(function(){
$("#green").animate({width:'80px'},{queue:false, duration:500,});
$(this).animate({left:'102px',width:'500px'},{queue:false, duration:500,});
$("#yellow").animate({left:'80px',width:'22px'},{queue:false, duration:500,});
$("#blue").animate({left:'582px',width:'50px'},{queue:false, duration:500,});
$("#purple").animate({left:'632px',width:'40px'},{queue:false, duration:500,});
$("#brown").animate({left:'672px',width:'23px'},{queue:false, duration:500,});
});  

$("#blue").mousedown(function(){
$("#green").animate({width:'80px'},{queue:false, duration:500,});
$(this).animate({left:'162px',width:'500px'},{queue:false, duration:500,});
$("#yellow").animate({left:'80px',width:'22px'},{queue:false, duration:500,});
$("#red").animate({left:'102px',width:'60px'},{queue:false, duration:500,});
$("#purple").animate({left:'632px',width:'40px'},{queue:false, duration:500,});
$("#brown").animate({left:'672px',width:'23px'},{queue:false, duration:500,});
});  

$("#purple").mousedown(function(){
$("#green").animate({width:'80px'},{queue:false, duration:500,});
$(this).animate({left:'212px',width:'500px'},{queue:false, duration:500,});
$("#yellow").animate({left:'80px',width:'22px'},{queue:false, duration:500,});
$("#red").animate({left:'102px',width:'60px'},{queue:false, duration:500,});
$("#blue").animate({left:'162px',width:'50px'},{queue:false, duration:500,});
$("#brown").animate({left:'672px',width:'23px'},{queue:false, duration:500,});
});  

$("#brown").mousedown(function(){
$("#green").animate({width:'80px'},{queue:false, duration:500,});
$(this).animate({left:'252px',width:'500px'},{queue:false, duration:500,});
$("#yellow").animate({left:'80px',width:'22px'},{queue:false, duration:500,});
$("#red").animate({left:'102px',width:'60px'},{queue:false, duration:500,});
$("#blue").animate({left:'162px',width:'50px'},{queue:false, duration:500,});
$("#purple").animate({left:'212px',width:'40px'},{queue:false, duration:500,});
});  

}); 


/* form */

$(document).ready(function() {

$(function() {  
$('.error').hide();  
$(".button").click(function() {  
// validate and process form here  
$('.error').hide();  
var name = $("input#name").val();  
if (name == "") {  
$("label#name_error").show();  
$("input#name").focus();  
return false;  
}  
var email = $("input#email").val();  
if (email == "") {  
$("label#email_error").show();  
$("input#email").focus();  
return false;  
}  
var phone = $("textarea#phone").val();  
if (phone == "") {  
$("label#phone_error").show();  
$("input#phone").focus(); 
return false;  
}  

var math = $("input#math").val();  
if (math == "7") {  
$("label#math_error").hide();  
}
else {
$("label#math_error").show();  
$("input#math").focus(); 
return false;  
}  
  
var dataString = 'name='+ name + '&email=' + email + '&phone=' + phone;  
//alert (dataString);return false;  
$.ajax({  
type: "POST",  
url: "bin/process.php",  
data: dataString,  
success: function() {  
$('#formposition').html("<div id='message'></div>");  
$('#message').html("<h2>Thanks!</h2>")  
.append("<p>I got it!</p>")  
.hide()  
.fadeIn(1500, function() {  
$('#message').append("");  
});  
}  
});  
return false; 
});  
});  
});  




