// JavaScript Document

(function($) {
		  
// png fix
	$(document).ready(function(){ 
		$(document).pngFix(); 
	}); 
// end png fix

// clickdown
	$(document).ready(function($) {
		$('a.clickdown').each(function() {
			var $this = $(this);
			var index = $this.attr('id').match(/(\d+)$/, '');
			var number = parseInt(index[1]);
			$this.click(function() {
				$('#slickbox' + number).slideToggle(400);
				$this.toggleClass('opened').blur();
				return false;
			});
		});
	});
// end clickdown

// form
	$(function() {
		$('#contact_us_form').validate({
			submitHandler: function(form){
				$('#ajax_loader').show();
				$(form).ajaxSubmit(function(response){
					$('#ajax_loader').hide();
					$('#email_sent').show();
				});
			},
			rules: {
				first_name: 'required',
				number: 'required',
				date: 'required',
				location: 'required'
			}
		});
	});
// end form

})(jQuery);


