function initialize_gmap() {
  var latlng = new google.maps.LatLng(51.1222290, 17.04418530);
  var opts = {
    zoom: 15,
    center: latlng,
    disableDefaultUI: true,
    zoomControl: true,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  
  if ($('#gmap-canvas').length == 1) {
    var map = new google.maps.Map(document.getElementById("gmap-canvas"), opts);
    var marker = new google.maps.Marker({ position: latlng, map: map, title:"Traxis Sp. z o.o." });
  }
  
  if ($('#gmap-canvas-big').length == 1) {
    var map2 = new google.maps.Map(document.getElementById("gmap-canvas-big"), opts);
    var marker = new google.maps.Marker({ position: latlng, map: map2, title:"Traxis Sp. z o.o." });
  }
}

$(document).ready(function(){
  initialize_gmap();
  
  $('.itraxis-header ul li a:not(.active)').each(function(){
    var pointer = $('<i />');
    pointer.css('left', ($(this).innerWidth()-32)/2);
    pointer.hide();
    
    $(this).hover(function(){
      $(this).append(pointer);
      pointer.animate({opacity:'show', bottom:'-13px'}, 'fast');
    }, function(){
      pointer.animate({opacity:'hide', bottom:'-26px'}, 'fast', function(){
        $(this).remove();
      });
    });
  });
  
  $('.itraxis-dealer a').each(function(){
    $(this).hover(function(){
      $('img', $(this)).animate({width:424,height:263,top:'0px',left:'0px'}, 'fast');
    }, function(){
      $('img', $(this)).animate({width:339,height:210,top:'26px',left:'42px'}, 'fast');
    });
  });
  
  $('.itraxis-dealer-2').hover(function(){
    $(this).animate({opacity:1.0}, 'fast');
  }, function(){
    $(this).animate({opacity:0.5}, 'fast');
  });
  
  
});

