  $(document).ready(function(){
  hints = new Array();
  
  hints['h1'] = "<div style='width:450px;'><p><strong>Sitting</strong></p><strong>Number of seats: </strong> about 50 <br/><br/> The seats on the train recalls plane with the difference that the train is definitely more space. The train has a restaurant. </p>Photos</p><img width='440' src='images/car_siedzacy.jpg' alt='Siedzący'></p></div>";
  
  hints['h2'] = "<strong>E-mail:</strong><br />W to pole należy wpisać email, w to pole należy wpisać email, w to pole należy wpisać email.";

  hints['h3'] = "<div style='width:450px;'><p><strong>Plackarta</strong></p><p><strong>Number of seats:</strong> 54<br /><br />An open carriage – without locked compartments. The journey in the carriage is the most comfortable on lower places vertical to the direction of the drive. We advise tall persons against side seats. Lower seats are at the same time a cage with enough room for two rucksacks and there it is impossible to reach their inside with the passengers sleeping on them.  Air-conditioning is usually provided by company trains but in no other type train. We recommend taking a small lamp for reading, as the light is turned off by the ticket inspector around 8 p.m. A bedlinen set is included in the price of the ticket.</p><p>A carriage plan and photographs</p><img width='440' src='images/car_plackarta.jpg' alt='Plackarta'></div>";
  
  hints['h4'] = "<div style='width:450px;'><p><strong>Kupe</strong></p><p><strong>Number of seats:</strong> 36<br /><br />A carriage with locked 4-person compartments. Beds in compartments are longer and wider than in a plackarta carriage, therefore even tall people will have no problems with falling asleep. The compartments in company trains are air-conditioned; however, the carriages in other class trains are not equipped with air-conditioning and each bed has its small lamp. A bedlinen set is included in the price of the ticket. Moreover, in some trains even five meals a day are included in price.</p><p>A carriage plan and photographs</p><img width='440' src='images/car_kupe.jpg' alt='Kupe'></div>";
  
  hints['h5'] = "<div style='width:450px;'><p><strong>SW-Lux</strong></p><p><strong>Number of seats:</strong> 16<br /><br />A carriage with locked 2-person compartments offering a high standard of travel. Comfortable wide sofas allow comfortable journey. Beds may be pushed together. Compartments are air-conditioned and a bedlinen set is included in price and changed throughout the journey. Moreover, in some trains even five meals a day are included in price.</p><p>A carriage plan and photographs</p><img width='440' src='images/car_cb.jpg' alt='Lux'></div>";
  
    hints['h6'] = "<div style='width:450px;'><p><strong>VIP</strong></p><p><strong>Number of seats:</strong> 8<br /><br />The highest class 2- or 3 –person compartments with a private bathroom, television and other facilities, such as air-conditioning or fresh flowers. In VIP class carriages there is a small separate restaurant and pub only for the guests of these carriages. Moreover, in some trains even five meals a day are included in price.</p><p>A carriage plan and photographs</p><img width='440' src='images/car_vip.jpg' alt='VIP'></p></div>";
  
  hints['h7'] = "<div style='width:300px;'><p><strong>Time zone in Russia</strong></p><div class='b_fr4'><div class='b_pad1'><table width='100%' border='0' cellspacing='0' cellpadding='4'><tr class='b_bg4'><td><strong>Time zome</strong></td><td><strong>Hours</strong></td></tr><tr><td>Kalingrad</td><td>- 1</td></tr><tr><td>Mocow</td><td>0</td></tr><tr><td>Yekaterynburg</td><td>+ 2</td></tr><tr><td>Omsk</td><td>+ 3</td></tr><tr><td>Krasnoyarsk</td><td>+ 4</td></tr><tr><td>Irkutsk</td><td>+ 5</td></tr><tr><td>Yakuck</td><td>+ 6</td></tr><tr><td>Vladivostok</td><td>+ 7</td></tr><tr><td>Magadan</td><td>+ 8</td></tr></table></div></div></div>";
  
  hints['h8'] = "<div style='width:300px;'><p><strong>Passenger (pasażerskij)</strong></p> The cheapest and the slowest, it stops often.</p></div>";
  
  hints['h9'] = "<div style='width:300px;'><p><strong>Fast (skoryj)</strong></p> Fast, not much more expensive but more comfortable than the passenger one.</p></div>";
  
  hints['h10'] = "<div style='width:300px;'><p><strong>Branded (firmiennyj)</strong></p> The fastest, with usually new or renovated carriages, offers the highest standard of journey.</div>";
  
  hints['h11'] = "<p>W przypadku biletów papierowych zastrzegamy sobie prawo doliczenia kosztu przesyłki biletów z Rosji lub Ukrainy. Nie jest to regułą gdyż bardzo często przychodzą do nas przesyłki, do których dokładamy Państwa bilety.</p>";
  
  hints['h12'] = "<div style='width:300px;'><p><strong>High-speed</strong></p> The fastest trains in Russia – speed between 140km/h to 200 km/h. It has 2 class 1st and 2nd. Seats are similar to airplane business class and economy class. In the trains You have WiFi and restaurant car.</div>";
  
       	$(".hintField").bind('click',function(e){
    var args = new Array();
    args = $(this).attr('name').split(":");
    $("#hintBox").html(hints[args[0]]).css("position", "absolute");
    if( args[1] == "l" ) var xPos = 2;
    else if( args[1] == "r" ) var xPos = $("#hintBox").width() + 15;
    else var xPos = $("#hintBox").width() * 0.5;
    $("#hintBox").css("display", "block").css("left", e.pageX  - xPos ).css("top", e.pageY-5);
      
      $("#hintBox").mouseleave(function(){
      $(this).fadeOut(250);
      });
    });
  }); 
