You must be curious now to know about the origin of the shrine at Guruvayur. The "Narada Purana" in the chapter Gurupavanapura Mahatmya alludes to this story: King Janamejaya, in order to avenge the death of his father Pareekshit, brought about by the Naga chief Takshaka, performed the "Sarpayajna" (snake sacrifice) in which thousands of innocent reptiles perished. As a result of their curse that befell him, he was afflicted with leprosy, which left him in utter despair. Sensing this, sage Dattatreya appeared before him with a remedy - Propitiation of Lord Krishna at Guruvayur.
COURTESY:GURUVAYUR DEVASWOM BOARD.The sage recounted, how the holy idol was blessed because Narayana Himself was the first to worship it. At the beginning of the Padma Kalpa, he gave the deity to Brahma (the Lord of Creation) who could execute his task of Creation only by its grace.
At the beginning of the Varaha Kalpa, the childless couple, Sutepa & Prisna prayed in earnest to Brahma for the gift of a son. Brahma gave them this deity assuring them of their wish if they worshipped the deity with sincere devotion. This they did with excellence, so much so that the Lord Mahavishnu himself appeared before them. As a boon, they prayed Him three times, for a son. He pacified them that he himself would be born to them as their son in three successive births. Moreover, they would also have the good fortune of worshipping the divine image in all the three janmas (births) and so.. as the Lord wished, in the 1st janma, to Sutepa and Prisna was born as their son, Prisigarbha. In their 2nd janma, as Kasyapa & Adita, the couple worshipped the same image and got their son Vamana. In their 3rd and most auspicious janma as Vasudeva and Devaki, Sri Krishna was born to them.
After slaying Kamsa , Krishna moved to Dwaraka where he built a temple, installed that image the supreme himself and worshipped it after the death of his parents. When the time come of his 'Swargarohana'( ascent to Vaikundha), Lord Krishna entrusted his devoted disciple Uddhava, to take good care of the idol. When the latter intimated him, his fears regarding the fate that would befall mankind in Kaliyuga during His absence. Krishna pacified Udhava that he would manifest Himself in and infuse His glory into the idol; He would also shield His devotees from the ill-effects of Kaliyuga and bless the mankind. He appraised Udhava that a subsequence of Dwaraka was impending and that he should install the image in an equally holy spot in consultation with Brihaspati (Guru), the preceptor of the Gods . Accordingly Guru along with Vayu (the God of Winds) set forth to Dwaraka where they in tensed the image being tossed about in the sea by the surging waves. The God of winds (Vayu) carried the image of his lead and both set part in search of a sacred place for its installation. In their quest, they came upon a lake of lotuses., none other than the Rudratheertha where Lord Siva & Parvathi were waiting to receive them. Siva told them that that spot was etched out for Narayana long ago; hence he and Parvathi would move to Mammiyur, the opposite bank. It is for this reason that a visit to Guruvayur is considered incomplete without visiting mammiyoor temple. Guru and Vayu installed the image in the temple built by Viswakarma, the architect of the God. As Guru and Vayu together founded the temple, the place came to be known as Guruvayurpura in accordance with Shiva's wish. The name was later shortened to Guruvayur.
Moved by this story, Janamejaya proceeded to Guruvayur temple where he observed austere devotion for four months. In the night he would go to Mammiyur and bow before Shiva. One night while asleep he felt the lord's healing touch over his body and his pain was no more! He returned to his kingdom elated singing praises for the Lord. Yes, you too could prouder up on the story and arrive at your conclusions.