// JavaScript Document  
var today = new Date();
var month = today.getMonth();
var day = today.getDate();
var year = today.getFullYear();

$(document).ready(function(){	

	$('#showCommentForm').click(function(e){
							    e.preventDefault();
							   if($('#LeaveFeedback').css("display") != "block"){
								   $('#showCommentForm').hide();
								   $('#LeaveFeedback').slideDown();
							   }
							   
						   });


				
				
				
				

$(function() {
 
 $('.show').click(function(e) {
	 e.preventDefault();
	 $(this).parent().css('display', 'none');
  $(this).parent().next('.full').toggle('slow'); 
  return false;
 });
});


 $(function() {
 
 $('.hide').click(function(e) {
	 e.preventDefault();
	
  $(this).parent().css('display', 'none'); 
   $(this).parent().prev('.summary').css('display', 'block'); 
  return false;
 });
});

 










	
  var so = new SWFObject('jwplayer.swf','mpl','200','201','9');
  so.addParam('allowfullscreen','true');
  so.addParam('allowscriptaccess','always');
  so.addParam('wmode','opaque');
  so.addVariable('file','jwplaylist.xml');
  so.addVariable('backcolor','9F682F');
  so.addVariable('frontcolor','DCC5AB');
  so.addVariable('lightcolor','FFFFFF');
  so.addVariable('playlist','bottom');
  so.write('mediaspace');
	// Open Strict In New Window 	
$(function() {
	$('a[rel*=external]').click( function() {
		window.open(this.href);
		return false;
	});
});
	
		
// Form Validator With Ajax Submit	   
jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
    phone_number = phone_number.replace(/\s+/g, ""); 
	return this.optional(element) || phone_number.length > 9 &&
		phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
}, "Please specify a valid phone number");   				   
	$("#commentForm").validate({
							   rules: {
    field: {
      required: true, phoneUS: true
    }
 	},
	   submitHandler: function(form) {
		$(form).ajaxSubmit();
		$('#contactarea').hide('fast');
		$('#successmessage').delay(700).show('fast');
	   }
	})
	
	
	
	

	
	
	
	
	
	
});




  
