//<![CDATA[
	$().ready(function() {
		function initialize() {
			// Initial page actions
			$(".noscript").hide();
			$(".contact").show();
			$(".jsLinks").show();
			$(".conMail").show();
			$(".noScript").hide();
		}	
		
		initialize();
				
		//CONTACT FORM SHOW START
		$("#contact").live('click', function (){
			$("#contactForm").show();
			$('html,body').animate({scrollTop: $('#header').offset().top},'fast');
			$.ajax({
				type: "GET",
				url: "./include/contactForm.php",
				data: "ln=" + $("#ln").val(),
				dataType: "html",
				success: function(result){
					//alert(result);
					$("#page").hide();
					$("#contactForm").html(result);
				}
			});
		});
		
		//CONTACT SEND
		$("#sendMessage").live('click', function (){
			$.post("./include/contactSend.php", $("#contact_form").serialize(),function(result){  
				//and after the ajax request ends we check the text returned  
				if(result == 'sent'){ 
					$("#contactForm").hide();
					$("#page").show();
					alert("Message sent!");
				}else{ 
					$("#contactForm").hide();
					$("#page").show();
					alert(result);
				}  
            });  
		});
		
		//CONTACT CANCEL
		$("#cancelMessage").live('click', function (){
			$("#contactForm").empty();
			$("#contactForm").hide();
			$("#page").show();
		});
		
		function toTop(){
			if ($.browser.opera) {
				var target = 'html';
				} else {
				var target = 'html,body';
			}
			$(target).animate({scrollTop: '0px'}, 'fast');
		}
		
	});
//]]>
