//form validation function validateName(fld) { var error = ""; if (fld.value === '' || fld.value === 'Nickname' || fld.value === 'Enter Your Name..' || fld.value === 'Your Name..') { error = "You didn't enter Your First Name.\n"; } else if ((fld.value.length < 2) || (fld.value.length > 50)) { error = "First Name is the wrong length.\n"; } return error; } function validateEmail(fld) { var error=""; var illegalChars = /^[^@]+@[^@.]+\.[^@]*\w\w$/; if (fld.value === "") { error = "You didn't enter an email address.\n"; } else if ( fld.value.match(illegalChars) === null) { error = "The email address contains illegal characters.\n"; } return error; } function validateMessage(fld) { var error = ""; if (fld.value === '') { error = "You didn't enter Your message.\n"; } else if (fld.value.length < 3) { error = "The message is to short.\n"; } return error; } jQuery(document).ready(function($) { jQuery(".panel .right-top-panel a.icon-text").click(function(){ var parseid = $(this).attr('id'); if(parseid == "sidebar-icon-popular"){ jQuery(this).parent().parent().parent().children().eq(0).html("Popular Articles"); jQuery(this).addClass("active"); jQuery("#sidebar-icon-comments").removeClass("active"); jQuery("#sidebar-panel-comments").hide(); jQuery("#sidebar-panel-popular").fadeIn('fast'); }else if(parseid == "sidebar-icon-comments"){ jQuery(this).parent().parent().parent().children().eq(0).html("Recent Comments"); jQuery(this).addClass("active"); jQuery("#sidebar-icon-popular").removeClass("active"); jQuery("#sidebar-panel-popular").hide(); jQuery("#sidebar-panel-comments").fadeIn('fast'); } }); }); var second_slider_autostart = 1; var second_slider_interval = 3;