/**
 * Template Scripts
 *
 */


//*****************	//
// SLIDESHOW SCRIPT //
//*****************	//
		
		$(document).ready(function() {
				$("img.rollover").hover(
					function()
					{
						this.src = this.src.replace("_off","_on");
					},
						function()
					{
						this.src = this.src.replace("_on","_off");
					}
					);
				
					$('.slideshow img:first').fadeIn(1000, function() {
						$('.slideshow').cycle();
					});
		

		});
		


//*****************	//
// Text SlideShow Function   //
//*****************	//

var customer = new Array()
customer[0]= "<center><h3>Customer Testimonials</h3>I'm stoked... I never thought it would be so easy to buy a board online!<br/><b>Scott D - NSW</b></center>"
customer[1]= "<center><h3>Customer Testimonials</h3>The easiest way to sell your board online. Hands Down.<br/><b>Jim H - VIC</b></center>"
customer[2]= "<center><h3>Customer Testimonials</h3>My custom board is awesome! The shaper called me within hours of my order being placed. I'll definitely be using boardbound again.<br/><b>Josh R - NSW</b></center>"
customer[3]= "<center><h3>Customer Testimonials</h3>I love how boardbound works, your buyers can contact you directly, cutting out the third party!<br/><b>Mattthew M - WA</b></center>"
/**quotations[4]= "<center><h3>Customer Testimonials</h3>I head about boardbound.com.au <br/><br/><b>Thomas Alva Edison</b></center>"
quotations[5]= "<center><h3>Customer Testimonials</h3>I head about boardbound.com.au <br/><br/><b>Thomas Alva Edison<b></b></center>"**/
function displayCustomers()
{
a=Math.floor(Math.random()*customer.length)
document.getElementById('customer').innerHTML=customer[a]
setTimeout("displayCustomers()",5000)
}


var shaper = new Array()
shaper[0]= "<center><h3>Shaper Testimonials</h3>Any board, any time, with boardbound!<br/><b>boardbound.com.au</b></center>"
/*shaper[1]= "<center><h3>Shaper Testimonials</h3>I'm stoked... I never thought it would be so easy to buy a board online!<br/><b>Scott Duncan</b></center>"
shaper[2]= "<center><h3>Shaper Testimonials</h3>I'm stoked... I never thought it would be so easy to buy a board online!<br/><b>Scott Duncan</b></center>"
shaper[3]= "<center><h3>Shaper Testimonials</h3>I'm stoked... I never thought it would be so easy to buy a board online!<br/><b>Scott Duncan</b></center>"
shaper[4]= "<center><h3>Shaper Testimonials</h3>I'm stoked... I never thought it would be so easy to buy a board online!<br/><b>B</b></center>"*/
function displayShapers()
{
a=Math.floor(Math.random()*shaper.length)
document.getElementById('shaper').innerHTML=shaper[a]
setTimeout("displayShapers()",3500)
}

//*************************//
// END SlideShow Function //
//***********************//


var timeout    = 500;
var closetimer = 0;
var ddmenuitem = 0;

function jsddm_open()
{  jsddm_canceltimer();
   jsddm_close();
   ddmenuitem = $(this).find('ul').css('visibility', 'visible');}

function jsddm_close()
{  if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}

function jsddm_timer()
{  closetimer = window.setTimeout(jsddm_close, timeout);}

function jsddm_canceltimer()
{  if(closetimer)
   {  window.clearTimeout(closetimer);
      closetimer = null;}}

$(document).ready(function()
{  $('#jsddm > li').bind('mouseover', jsddm_open)
   $('#jsddm > li').bind('mouseout',  jsddm_timer)});

document.onclick = jsddm_close;




// Form Validation
<!--
		function checkform(frm) {
			if (frm.realname.value == '') {
					alert("Please enter a value in the field 'Your name'.");
					frm.realname.focus();
					return(false);
			}
			if (frm.email.value == '') {
					alert("Please enter a value in the field 'Your Email'.");
					frm.email.focus();
					return(false);
			}
			validemail=0;
			var checkStr = frm.email.value;
			for (i = 0; i < checkStr.length; i++){
				if(checkStr.charAt(i)=="@")
					validemail |= 1;
				if(checkStr.charAt(i)==".")
					validemail |= 2;
			}
			if(validemail != 3){
				alert("Please enter a valid email address.");
				frm.email.focus();
				return (false);
			}
			if (frm.message.value == '') {
					alert("Please enter a value in the field 'Message'.");
					frm.message.focus();
					return (false);
			}
		}
		//-->
		

		