multiple objects with animations parented to the same object.

I am trying to write a piece of code that will play one animation if a certain weapon is equipped and another if the other weapon is equipped. I have been trying to use tags for this and my code is as follows:

function Update ()
{
	if (Input.GetButtonDown("Fire1"))
	{
		if (GameObject.tag == "Sword")
		{
			// Attack animation.
			animation.Play("SwordAttack");
		}
		else if (GameObject.tag == "Mace")
		{
			animation.Play("MaceAttack");
		} 
	}

I keep getting the Error : An instance of type "UnityEngine.GameObject is required to access non static member “tag”.

Any help would be appreciated.

You want ‘gameObject’ with a lower case ‘g’. ‘GameObject’ with an upper case ‘G’ is the class. ‘gameObject’ is the particular instance of the class for this object.

I thought that I had tried that but apparently not. My script still isn’t behaving as I want it to but the error is gone.
Thanks for the help.