// JavaScript Document

$(function() {

					$.metadata.setType("attr", "validate");

					$("#contact")
							.validate(
									{

										submitHandler : function(form) {
											$("#messageline").html("");
											$
													.post(
															'/post.php',
															{
																action : 'captchaAction',
																security_code : $(
																		"#security_code")
																		.val()
															},
															function(data) {
																if (data != "") {
																	$(
																			"#securitycode_error")
																			.html(
																					'<span class="bodytext_red">Please enter a valid security code</span>');
																} else {
																	$(
																			"#securitycode_error")
																			.html(
																					"");
																	form
																			.submit();
																}
															});
										}
									});

					//Hide links of small events
					$('.noDisplayBlue').hover(function() {
						$(this).css({
							'color' : '#00B3F0',
							'text-decoration' : 'none'
						});
					});

					$('.noDisplay').hover(function() {
						$(this).css('text-decoration', 'none');
					});

					$("#security_code").live('change', function() {
						$("#securitycode_error").html("");
					});

					$('#security_code').trigger('change');

					if ($('.page_content li').size() > 5) {
						$('#paging_container')
								.pajinate(
										{
											items_per_page : 5,
											nav_label_first : '<<',
						nav_label_last : '>>',
											nav_label_prev : '<',
						nav_label_next : '>'

										});
					}

				});
