Your symptoms indicate a failed power supply. Please give us the last three figures of your serial number to make sure of which machine you have and to get you to the correct guide.
Use a multimeter and test the output of your power supply.
LED #1 Indicates that the trickle voltage from the PSU has been detected by the logic board. This LED will remain ON whenever the iMac is connected to working AC power. The LED will remain on even when the computer has been shut down or put to sleep. The LED will turn off only if the AC power source is disconnected or the PSU is faulty. LED #2 Indicates that the main logic board has detected proper power from the PSU when the computer is turned on. This LED will be ON when the computer is turned on and the PSU is working OK. LED #3 Indicates that the computer and the LCD are communicating. This LED will be ON when the computer is turned on and video signal is being generated. Front LED Indicates that the computer has power but no video signal (e.g., the computer is starting up or the display has entered Sleep mode, turning off the video signal). This LED will pulse when the entire system enters Energy Saver mode