<!--
$(document).ready(function(){
	
	// mailto replacer <span class="mailto">ashin at webfirm dot com.au</span>
	$("span.mailto").each(function(){
	  exp = $(this).text().search(/\((.*?)\)/) != -1 ? new RegExp(/(.*?) \((.*?)\)/) : new RegExp(/.*/);
	  match = exp.exec($(this).text());
	  addr = match[1] ? match[1].replace(/ at /,"@").replace(/ dot /g,".") : match[0].replace(/ at /,"@").replace(/ dot /g,".");
	  link = match[2] ? match[2] : addr;
	  subject = $(this).attr('title') ? "?subject="+$(this).attr('title').replace(/ /g,"%20") : "";
     $(this).after('<a href="mailto:'+addr+subject+'">'+ link + '</a>');
	  $(this).remove();
	});
	
	// external
	$('A[rel="external"]').click( function() {
		window.open( $(this).attr('href') );
		return false;
	});
	
	//banner fade
	$('#slideshow').cycle({ 
		fx:    'fade', 
		speed:  2500 
	});
	
	//styling
	$('ul.listing').find('li:eq(0)').addClass("odd");

	$('ul.downloads, ul#news-listing, ul.links').find('li:odd').addClass("odd");
	
	$("ul#news-listing li").click(function(){
  	 window.location=$(this).find("a").attr("href"); return false;
  });
  
  $("ul#news-listing li").hover(function(){
    $(this).css('cursor', 'pointer');
    return false;
  });
  
  
  $("ul.links li").hover(function(){
    $(this).css("cursor", "pointer");
    $(this).toggleClass("active");
    return false;
  },function(){
    $(this).toggleClass("active");
  });
  
  //slimbox
  $("#news-images li a, ul.gallery li a").slimbox();
  
	// validate signup form on keyup and submit
	$("#absentee-form").validate({
		rules: {
			_5_Student_Name: "required",
			_10_Date_Absent: "required",
			_15_Absence: "required"
		},
		messages: {
			_5_Student_Name: "Please enter the students name",
			_10_Date_Absent: "Please enter the dates absent",
			_15_Absence: "Please select a reason for absence"
		}
	});
  
	// validate signup form on keyup and submit
	$("#enquiry-form").validate({
		rules: {
			_10_Name: "required",
			_15_Email_From: {
				required: true,
				email: true
			},
      _20_Phone: "required",
      _25_Enquiry: "required"
		},
		messages: {
			_10_Name: "Please enter your name",
			_15_Email_From: {
				required: "Please enter your email address",
				email: "Please make sure your email address is in the format of an email address"
			},
      _20_Phone: "Please enter a contact number",
      _25_Enquiry: "Please enter your enquiry"
		}
	});
});
-->