Facebook type upload with jquery and smarty framework

Hi,
Friend now I will discuss about facebook type file upload functionality with jquery and smarty template engine framework.
Like when the user mouse over the image edit link will show and onout will off.

Template file Code

  1. <script type=“text/javascript” src=“{$SITE_ADMIN_SITE_URL}js/jquery-ui.min.js”></script>  
  2.   
  3. <link type=“text/css” media=“screen” rel=“stylesheet” type=“text/css” href=“{$SITE_ADMIN_SITE_URL}css/jquery-ui-1.7.3.custom.css”/>  
  4.    
  5.   
  6. <div id=“mapdiv” style={if $action eq ‘map’}“display:block;”{else}“display:none;”{/if}>  
  7. <table width=“100%” cellpadding=“0″ cellspacing=“0″>  
  8. <tr><td colspan=“3″>&nbsp;</td></tr>  
  9. <tr><td colspan=“3″><h4 class=“green-text roundeddiv shadowImgae” style=“padding-left:22px;”>Map Management:</h4></td></tr>  
  10. <tr>  
  11. <td width=“10%”>&nbsp;</td><td colspan=“2″>  
  12. <div id=“mapdivdisplay” class=“roundedImage shadowImgae”>  
  13. <div id=“mapdivchange” style=“display:none;” class=“changeimg”><a id=“mapdivlink” href=“javascript:void(0);”>&nbsp;&nbsp;Click for change</a></div>  
  14. <a href=“{$UPLOAD_PATH}map/{$mapname}” rel=“facebox”><div style=“margin:5px;”><img src=“{$UPLOAD_PATH}map/{$mapname}” height=“100px” id=“mapdiciamge”/></div></a></div>  
  15.   
  16. <div id=“mapdivupload” title=“Map upload” style=“display:none;”>  
  17.  <form action=“{$SITE_ADMIN_SITE_URL}index.php?action=map&mode=add” method=“post” enctype=“multipart/form-data”>  
  18. <table><tr><td>  
  19. <label for=“file”>Filename:</label><td>  
  20. <td>  
  21. <input type=“file” name=“file” id=“file” /></td>  
  22. </tr><tr><td colspan=“2″>&nbsp;</td><td align=“right”>  
  23. <input type=“submit” name=“submit” value=“Submit” /><input type=“reset” value=“reset”/> </td>  
  24. </tr>  
  25. </table></form>  
  26. </div>  
  27. </td></tr></table>  
  28. </div>  

Javascript code
  1. $(‘#mapdivdisplay’).mouseover(function() {  
  2.   $(‘#mapdivchange’).show();  
  3. });  
  4. $(“#mapdivdisplay”).mouseout(  
  5.   function () {  
  6.     $(‘#mapdivchange’).hide();  
  7.   }  
  8. );  
  9.   
  10. $(“#mapdivlink”).click(function() {  
  11.   $( “#mapdivupload” ).dialog();  
  12.   $( “#mapdivupload” ).dialog( “option”“width”, 360 );