jQuery(document).ready(function(){
            var flashvars = {};
            var params = {};
                params.menu = "false";
                params.quality = "high";
                params.scale = "default";
                params.wmode ="transparent";
                params.allowScriptAccess = "Always";
                params.base = "swf/";
            var attributes = {};
                attributes.id = "timer-swf";
                attributes.styleclass = "noOutline";
            
        
            swfobject.addLoadEvent(function(){swfobject.embedSWF("/swf/head.swf", "flashcontent1", "568", "453", "9.0.0", "express_install.swf", flashvars, params, attributes)});
       
      
            jQuery('.order-button').click(function(){
              set_ordered();
              return false;
            }) 
            
            var all_menu = jQuery('.main-menu').children('li');
            var start_menu = 1;
            jQuery('.main-menu').children('li').each(function(){
              if(start_menu==all_menu.length){
                jQuery(this).css('background','none');
              }
              start_menu++;
            })   
            
            
            jQuery('.list-of-menu').children('li').each(function(){
              var width_of_price = parseFloat(jQuery(this).children('.price').outerWidth());
            
              var width_of_parent = parseFloat(jQuery(this).outerWidth());
              var width_of_name  = parseFloat(jQuery(this).children('.end-of-name').position().left);
              var height_of_name  = parseFloat(jQuery(this).children('.end-of-name').position().top);
              
              
              var new_top = parseFloat(height_of_name+15);        
              var new_left = parseFloat(width_of_name+5);   
              var new_width = parseFloat(width_of_parent-width_of_name-width_of_price-15);
              
            
              
              
              jQuery(this).children('.border').css({
                top:new_top+"px",
                left:new_left+"px",
                width:new_width+"px"
              })
              
            }) 
            
          })
          
          
          function set_ordered(){
		document.res_add.submit()
             var parent_block = jQuery('.order-block')[0];
             var img = document.createElement('img');
                 img.src = '/images/ordered.png';
                 img.className = "ordered";
                 img.onclick = function(){
                  this.parentNode.parentNode.removeChild(this.parentNode);
                 } 
                 
                 parent_block.appendChild(img);
             
          }
    
