In front of the Shiva temple in Ernakulam lies the backwaters of Cochin. The deity faces westwards and enjoys the view of the sea. At the time of constructing this temple, the main language that was in use was Tamil; therefore the people addressed the deity as Erayanar which also means Lord Shiva.
There are two legendary stories connected to this temple. The first is thus: A sage was observing strict penance on the Himalayas. He had a disciple called Devalan. Because of his bad behaviour, he was cursed to become a serpent. To be freed from the curse, he had to fetch a Shiva Linga kept by another serpent in the Behula forest. He drew up a plan and got the Linga. When he was returning from there, he stopped on the way to have a bath. After bath and offering prayers, he couldn t remove the Shiva Linga, it was firmly fixed to the ground. The Shiva temple which is there now is believed to have cropped up at that time. The place was called Hrishingakulam (Hrishinga was the changed name of Devalan). It has now been shortened to Ernakulam.
The second is: Arjuna was performing penance to impress Shiva. To test him, Shiva disguised himself as a Kiratha a demon and just before Shiva appeared before Arjuna, he saw a boar running towards him. Arjuna, an ace hunter shot the boar. A dispute arose between Kiratha and Arjuna as to who shot the boar. After a long battle Kiratha emerged as the winner and then Arjuna realised that it is actually Shiva in disguise. Shiva and Parvathy together appeared and gifted Arjuna the Pashupathastram. The idol of Shiva is said to have emerged on its own.
The Shiva temple celebrates Mahashivarathri with great pomp and show. Remember that while entering the temple, men are supposed to take off their shirts.