$(document).ready(function(){
    
    
   
     
    if (typeof(pageGallery)==='function'){
        pageGallery();
    }
    
    if (typeof(initialize)==='function'){
        initialize();
    }
    
    function printobj(object){
         var pr='';
         for (var key in object) {
          pr=pr+key+': '+object[key]+'<br>';
         }
         return pr;
   };
    
    if (typeof window.docready=="function"){docready();}  
   
   $('#lazy').lazyslider({btnsHeight:31,btnsWidth:31,slowcontrols:false,fastrightPos:68,fastleftPos:37});
   $('#lazy a').lazypic({imageholder:"img_holder"}); 
 //  $('.zoom_pic a').lazyzoom({D:{width:588,height:594,chW:250,chH:20}});
   
   $('#fade').prepend("<div id='ss_loader'></div>");
   if ($('#fade').length!=0&&$('#fade img').length>0){
       $('#fade img').hide();
       img = new Image();
       img.onload=function(){
            $('#ss_loader').hide();
                 $('#fade img:first').addClass('active');
              $('#fade img').show();
            
       }
       img.src=$('#fade img:first').attr('src');
        if ($('#fade img').length>1) {
              setInterval( "slideSwitch()", 5000 );
            }
         };
       
                
     $('.choose_lang a').hover(function(){
         $(this).children('img').show();
     },function(){
         $(this).children('img').hide();
     });
         
     $('.menu ul li').hover(function(){
         $(this).children('ul').show();
     },function(){
         $(this).children('ul').hide();
     });
     
     $('.reasons ul li p').click(function(){
            if ($(this).siblings("div").is(':visible'))
            {
                
                $(this).children('span').css({'background-position':'0 0'});
                $(this).siblings("div").slideUp('fast');
            }
            else
            {                                                                                                                                 
                $(this).siblings("div").slideDown('fast');
                $(this).children('span').css({'background-position':'0 -13px'});
                
            }
        });
        

     
    if ($('.menu ul li').length>0) $('.menu ul li').ahover({moveSpeed: 100, hoverEffect: function(){
                $(this).css({opacity: 0.99}).animate({opacity: 0.5}, 750).animate({opacity: 0.99}, 750).dequeue();
                $(this).queue(arguments.callee);
          }
    });
    
     
    
    $('#lazy_caption').animate({bottom:'55px'},1000);
    
              
});
