Hello All,
I would like to modify this script from Online click event to onload event.

This is the script for curtain animation. I would like to open curtain when page loads and close by clicking the button.

when page loads, this event should happen.. any idea?


Code:
<script type="text/javascript">
		$(document).ready(function() {

			$curtainopen = false;

			$(".rope").click(function(){
				$(this).blur();
				if ($curtainopen == false){
					$(this).stop().animate({top: '0px' }, {queue:false, duration:350, easing:'easeOutBounce'});
					$(".leftcurtain").stop().animate({width:'60px'}, 2000 );
					$(".rightcurtain").stop().animate({width:'60px'},2000 );
					$curtainopen = true;
				}else{
					$(this).stop().animate({top: '-40px' }, {queue:false, duration:350, easing:'easeOutBounce'});
					$(".leftcurtain").stop().animate({width:'50%'}, 2000 );
					$(".rightcurtain").stop().animate({width:'51%'}, 2000 );
					$curtainopen = false;
				}
				return false;
			});

		});
	</script>
please help me..


Thanks
Goodboy