/**
 * Created by IntelliJ IDEA.
 * User: Kasutaja
 * Date: 6.07.2010
 * Time: 16:22:59
 * To change this template use File | Settings | File Templates.
 */
$(document).ready(function(){
           $('.menu_block').each(function(){
               if ($.browser.webkit) {
                   $(this).css('left',$(this).offset().left);
                   $(this).css('top',$(this).offset().top);
                }
                else{
                   $(this).css('top',$(this).offset().top);
                   $(this).css('left',$(this).offset().left);
               }
           });

           $('.menu_block').each(function(){
               $(this).css('position','absolute');
           });

           if ($('.menu_block').first().offset().left < $('#logo').offset().left+50) {
                $('.menu_block').each(function(){
                   $(this).css('left',$(this).offset().left+150);
               });
           }            
           var position=$('#heading').offset();
           $('#heading_side').css('left',0);
           $('#heading_side').css('top',position.top);
           $('#heading_side').width(position.left);
           $('#heading_side').height($('#heading').height()+60);
           $(window).resize(function() {
               position=$('#heading').offset();
               $('#heading_side').css('left',0);
               $('#heading_side').css('top',position.top);
               $('#heading_side').width(position.left);
           });

           $('.large').hover(function(){
               $(this).children('ul').children('li:last').children('ul').children('.blue').css('display','none');
               $(this).css({
                   'border-left':'1px #eeece8 solid',
                   'border-right':'1px #eeece8 solid',
                   'border-bottom':'1px #eeece8 solid',
                   'padding-left':'16px',
                   'padding-right':'16px',
                   'height':'auto',
                   'overflow':'visible'
               })
           },function(){
               $(this).children('ul').children('li:last').children('ul').children('.blue').css('display','block');
               $(this).css({
                   'border':'none',
                   'padding-left':'17px',
                   'padding-right':'17px',
                   'height':'140px',
                   'overflow':'hidden'
               })
           })
           $(document).pngFix();
            
       });


