/* Nuclear Media Inc. */
function selectAndDrop(buttonId,buttonClass,selectedClass,dropId,dropClass,dropSpeed) {
   if($(buttonId).hasClass(selectedClass)==false) {
	   $(dropClass).hide();	
	   $(buttonClass).removeClass(selectedClass);
   }
   $(buttonId).toggleClass(selectedClass);   
   $(dropId).slideToggle(dropSpeed);
};

function scrollTo(e,d){
	$('html, body').animate({
		scrollTop: $(e).offset().top
	}, d);
}

$.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;
  });
};

$.fn.flash = function(c, d) { this.effect("highlight",{color:c},d); };



