function clearsearchform(field)
{
	if(field.value == 'Enter Keyword(s)')
	{
		field.value = '';
	}
}
function resetsearchform(field)
{
	if(field.value == '')
	{
		field.value='Enter Keyword(s)';
	}
}
function clearemailform(field)
{
	if(field.value == 'Enter Email')
	{
		field.value = '';
	}
}
function resetemailform(field)
{
	if(field.value == '')
	{
		field.value='Enter Email';
	}
}
// $.validator.setDefaults({
//  submitHandler: function() { 
//      //do nothing 
//  }
// });
$.metadata.setType("attr", "validate");


//Ajax

function ajaxcall() {
	if(document.getElementById("vid_links") != null) {
		var anchorTags = document.getElementById("vid_links").getElementsByTagName("a");
		
		$( "#vid_links a" ).each(
			function( intIndex ){
				$( this ).bind (
					"click",
					function(){
						var filename = this.id;
						$("#vid_cont").load("/vid.php?name="+ filename);
						return false;
					}
				);	 
			}
		);
	}
}



$(document).ready(function(){
    if($("#shareform"))
    {
        $("#shareform").validate();
    }
    if($("#updateform"))
    {
        $("#updateform").validate();
    }
    if($("#informedform"))
    {
        $("#informedform").validate();
    }
    if($("#feedbackform"))
    {
        $("#feedbackform").validate();
    }
	
	ajaxcall();

});