How To Call A Jquery Function From The Widget

hi i m using an image slider but i want that the width of the slider should be that of the body i used jquery function to get width but unable to call it from widget kindly help if any one have idea… here is my view code


	function main()


		return ($(window).width());




<div id="imageslider">



        $this->widget('ext.slider.slider', array(


            'width'=>'$(main())',     // here i want to call the jquery function but it is unable to call it






            'alts'=>array('First description','Second description','Third description','Four description'),