function initContact(){
 $(document).pngFix();
  var lH = $('#doc .leftcx .colpadding .container').height() + 85;
  var rH = $('#doc .rightcx .colpadding .container').height() + 85;
  if(lH > rH){
  	$('#doc .leftcx .colpadding .container').height(lH);
	$('#doc .rightcx .colpadding .container').height(lH + 46);
  }
  if(rH > lH){
  	$('#doc .leftcx .colpadding .container').height(rH);
	$('#doc .rightcx .colpadding .container').height(rH + 46);
  }  
  $('#doc #footer-pros, #doc #footer').css({'bottom': '-55px'});
  if($.browser.msie){
   if($.browser.version == '6.0'){
     $('#doc #footer-pros, #doc #footer').css({'bottom': '196px'});
	 $('#doc #man').css({'bottom': '256px'});
	 $('#contact-form .btn-item').css({'paddingLeft': '148px'});
   }
   else{
	   $('#doc #man').css({'bottom': '0px'});
   }
  }	
  
	$("#contactform").validate({
		rules: {
			name: {
				required:true
			},
			email: {
				required:true,
				email: true
			},
			tel: {
				required: true,
				number: true
			},
			date: {
				required: true,
				date: true
			},
			location:{
				required: true
			},
			typeofevent: {
				required: true
			},
			numberpeople: {
				required: true,
				number: true
			},
			details: {
				required: true,
				minlength: 6
			}
		},	
		messages: {
			name: {
				required:''
			},
			email: {
				required:'',
				email: ''
			},
			tel: {
				required: '',
				number: ''
			},
			date: {
				required: '',
				date: ''
			},
			location:{
				required: ''
			},
			typeofevent: {
				required: ''
			},
			numberpeople: {
				required: '',
				number: ''
			},
			details: {
				required: '',
				minlength: 6
			}			
		},
		submitHandler: function() {
			$('#contact-form .btn-item .field').addClass("ajax-loadding");
			$('#contactform').ajaxSubmit({
				dataType: 'json',
				type: 'post',
				success : function(result){
					$('#contact-form .btn-item .field').removeClass("ajax-loadding");
					$("#back-info").html("<p>Thanks "+result.name+", for contacting us, we will contact you within 5 working days.</p>" +
							             "<p align=\"center\">" +
              							 "<button class=\"x-btn\" type=\"button\" id=\"back-btn\">Back</button>"+
            							 "</p>");
					$("#contact-panel").hide();
					$("#back-info").show();
					$("#back-btn").click(function(){
					    $("#back-info").hide();
						$("#contact-panel").show();												  
					});
				}
			});
		},
		errorPlacement: function(error, element) {
			$(element).addClass('error');
		}
	});  
}
function initHome(){
 $(document).pngFix();
  if($.browser.msie){
   if($.browser.version == '6.0'){
     $('#doc #footer-pros, #doc #footer').css({'bottom': '196px'});
   }
  }	
  $('#video').facebox({
	loadingImage: 'images/facebox/loading.gif',
	closeImage   : 'images/facebox/closelabel.gif'
  });
}
function initSubPage(){
 $(document).pngFix();
  var lH = 60;
  $('#doc .leftcx .colpadding .container').height(lH);
  $('#doc .rightcx .colpadding .container').height(lH + 46);
  if($.browser.msie){
   if($.browser.version == '6.0'){
     $('#doc #footer-pros, #doc #footer').css({'bottom': '196px'});
	 $('#doc #content-box').css({'height': '1%'});
   }
   else{
	   $('#doc #footer-pros, #doc #footer').css({'bottom': '-50px'});
   }
  }
}