$(document).ready(function(){$('.idxsh').click(function(e){e.preventDefault();n=$(this).attr('name');pd=$('#p'+n);pda=$('#p'+n+'a');if(pd.is('.BlockLink')){$('.activeBlockLink').removeClass('activeBlockLink').addClass('BlockLink');$('.showText').hide().removeClass('showText').addClass('noText');pd.removeClass('BlockLink').addClass('activeBlockLink');pda.removeClass('noText').hide().addClass('showText').show('slow')}});$('#contactform').submit(function(){errors=false;name=$('#fname');phone=$('#fphone');email=$('#femail');comment=$('#fcomment');name.removeClass('err');phone.removeClass('err');email.removeClass('err');comment.removeClass('err');if(name.val().length<3){errors=true;name.addClass('err')}if(phone.val().length<6){errors=true;phone.addClass('err')}emailReg=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;if(!emailReg.test(email.val())||email.val()==''){errors=true;email.addClass('err')}if(comment.val().length<10){errors=true;comment.addClass('err')}if(errors==true){return false}else{$(this).submit()}})});