/*to clear a form*/
$.fn.clearForm = function() {
  return this.each(function() {
 var type = this.type, tag = this.tagName.toLowerCase();
 if (tag == 'form')
   return $(':input',this).clearForm();
 if (type == 'text' || type == 'password' || tag == 'textarea')
   this.value = '';
 else if (type == 'checkbox' || type == 'radio')
   this.checked = false;
 else if (tag == 'select')
   this.selectedIndex = -1;
  });
};

function faceURL(_url){
	jQuery.facebox({ ajax: _url });
    return false;
}

function closeFB(){
	jQuery(document).trigger('close.facebox');
}

function jump_to(divID){
	var target = $("#"+divID);
	target = target.length && target
	
	var targetOffset = target.offset().top;
	$("html,body").animate({scrollTop: targetOffset}, 1000);

}
