// ==UserScript==
// @name           Pardus tooltip enhancement
// @namespace      http://gdorn.nudio.net/greasemonkey
// @description    Adds tooltips to images in Pardus
// @include        *pardus.at*
// ==/UserScript==

var ifns = new Array(62); //stores the filenames
var itts = new Array(62); //stores the tooltip text

//buildings
ifns[0] = "fuel_collector.png";
itts[0] = "Fuel Collector. U: Energy, Chems. P: Hydrogen.";
ifns[1] = "gas_collector.png";
itts[1] = "Gas Collector. U: Food, Energy, Water. P: Neb Gas.";
ifns[2] = "space_farm.png";
itts[2] = "Space Farm. U: Energy, Embryos. P: Food, Water, Biowaste.";
ifns[3] = "energy_well.png";
itts[3] = "Energy Well. U: Food, Water. P: Energy.";
ifns[4] = "chemical_laboratory.png";
itts[4] = "Chemical Laboratory. U: Food, Water, Energy. P: Chems.";
ifns[5] = "asteroid_mine.png";
itts[5] = "Asteroid Mine. U: Food, Water, Energy. P: Ore*, Gems.";
ifns[6] = "radiation_collector.png";
itts[6] = "Radiation Collector. U: Food, Water, Energy.  P: Rad. Cells.";
ifns[7] = "medical_laboratory.png";
itts[7] = "Medical Laboratory. U: Neb. Gas*, Food, Water, Energy.  P: Meds.";
ifns[8] = "brewery.png";
itts[8] = "Brewery. U: Food, Water, Energy, Chems.  P: Liquor.";
ifns[9] = "plastics_facility.png";
itts[9] = "Plastics Facility. U: Food, Water, Energy, Chems, Neb Gas.  P: H.Plastics*.";
ifns[10] = "smelting_facility.png";
itts[10] = "Smelting Facility. U: Food, Water, Energy, Ore.  P: Metal*.";
ifns[11] = "optics_research_center.png";
itts[11] = "Optics Research Center.  U: Food, Water, Energy, Gems.  P: Optics*.";
ifns[12] = "slave_camp.png";
itts[12] = "Slave Camp. U: Food, Water, Energy, Liquor, Meds.  P: Slaves.";
ifns[13] = "electronics_facility.png";
itts[13] = "Electronics Facility. U: Food, Water, Energy, H.Plastics, Metal.  P: Electronics*.";
ifns[14] = "recyclotron.png";
itts[14] = "Recyclotron.  U: Biowaste*, Energy, Chems.  P: Food*, Water*.";
ifns[15] = "clod_generator.png";
itts[15] = "Clod Generator. U: Biowaste**, Energy, Chems.  P: Nute Clods*.";
ifns[16] = "nebula_plant.png";
itts[16] = "Nebula Plant. U: Food, Water, Exotic Matter.  P: Energy***, Neb Gas.";
ifns[17] = "drug_station.png";
itts[17] = "Drug Station. U: Food, Water, Energy, Slaves, Exotic Matter.  P: Drugs.";
ifns[18] = "dark_dome.png";
itts[18] = "Dark Dome. U: Slaves, Energy.  P: Dark Corner Items*, Biowaste.";
ifns[19] = "handweapons_factory.png";
itts[19] = "Handweapons Factory. U: Food, Water, Energy, H.Plastics, Optics, Electronics.  P: Handweapons.";
ifns[20] = "battleweapons_factory.png";
itts[20] = "Battleweapons Factory. U: Food, Water, Energy, Metal, Optics, Electronics.  P: Battleweapon Parts.";
ifns[21] = "robot_factory.png";
itts[21] = "Robot Factory.  U: Food, Water, Energy, Metal, Optics, Electronics.  P: Robots.";
ifns[22] = "droid_assembly_complex.png";
itts[22] = "Droid Assembly Complex.  U: Food, Water, Energy, Rad. Cells, Robots.  P: Droid Modules.";
ifns[23] = "leech_nursery.png";
itts[23] = "Leech Nursery. U: Food, Water**, Energy*, Rad. Cells*, Nute Clods****.  P: Leech Babies, Biowaste.";
ifns[24] = "military_outpost.png";
itts[24] = "Military Outpost. U: Energy*, Hydrogen*.";
ifns[25] = "trade_outpost.png";
itts[25] = "Trade Outpost";
ifns[26] = "smelting_facility_federation.png";
itts[26] = "FED Smelting Facility. U: Food, Water, Energy, Ore.  P: Metal*.";
//commodities

ifns[27] = "energy.png";
itts[27] = "Energy. B:150, S:120, BMB:400, BMS:5";
ifns[28] = "water.png";
itts[28] = "Water. B:200, S:160, BMB:450, BMS:10";
ifns[29] = "animal_embryos.png";
itts[29] = "Animal Embryos. B:75, S:60, BMB:400, BMS:5";
ifns[30] = "ore.png";
itts[30] = "Ore. B:150, S:120, BMB:400, BMS:5";
ifns[31] = "metal.png";
itts[31] = "Metal. B:600, S:480, BMB:1200, BMS:25";
ifns[32] = "electronics.png";
itts[32] = "Electronics. B:1250, S:1000, BMB:2500, BMS:50";
ifns[33] = "robots.png";
itts[33] = "Robots. B:4000, S:3200, BMB:25000, BMS:160";
ifns[34] = "heavy-plastics.png";
itts[34] = "Heavy Plastics. B:750, S:600, BMB:1500, BMS:30";
ifns[35] = "hand-weapons.png";
itts[35] = "Hand Weapons. B:6000, S:4800, BMB:50000, BMS:240";
ifns[36] = "food.png";
itts[36] = "Food. B:250, S:200, BMB:500, BMS:10";
ifns[37] = "battleweapon_parts.png";
itts[37] = "Battleweapon Parts. B:6000, S:4800, BMB:50000, BMS:240";
ifns[38] = "droid_modules.png";
itts[38] = "Droid Modules. B:15000, S:12000, BMB:1500000, BMS:600";
ifns[39] = "nutrient_clods.png";
itts[39] = "Nutrient Clods. B:750, S:600, BMB:5000, BMS:30";
ifns[40] = "cybernetic_x993_parts.png";
itts[40] = "Cybernetic X-993 Parts. B:-, S:-, BMB:60000, BMS:1000";
ifns[41] = "x993_repairdrone.png";
itts[41] = "X-993 Repair-Drone. B:-, S:-, BMB:-, BMS:-";
ifns[42] = "neural_stimulator.png";
itts[42] = "Neural Stimulator. B:-, S:-, BMB:-, BMS:-";
ifns[43] = "radioactive_cells.png";
itts[43] = "Radioactive Cells. B:375, S:300, BMB:1500, BMS: 15";
ifns[44] = "medicines.png";
itts[44] = "Medicines. B:1000, S:800, BMB:2000, BMS:40";
ifns[45] = "nebula-gas.png";
itts[45] = "Nebula Gas. B:150, S:120, BMB:400, BMS:5";
ifns[46] = "chemical-supplies.png";
itts[46] = "Chemical Supplies. B:250, S:200, BMB:500, BMS:10";
ifns[47] = "gem-stones.png";
itts[47] = "Gem Stones. B:250, S:200, BMB:500, BMS:10";
ifns[48] = "optical_components.png";
itts[48] = "Optical Components. B:300, S:240, BMB:600, BMS:10";
ifns[49] = "liquor.png";
itts[49] = "Liquor. B:1000, S:800, BMB:2000, BMS:40";
ifns[50] = "hydrogen-fuel.png";
itts[50] = "Hydrogen Fuel. B:100, S:80, BMB:200, BMS:5";
ifns[51] = "exotic_matter.png";
itts[51] = "Exotic Matter. B:500, S:400, BMB:1000, BMS:20";
ifns[52] = "biowaste.png";
itts[52] = "Bio-waste. B:30, S:24, BMB:1000, BMS:100";
ifns[53] = "slaves.png";
itts[53] = "Slaves. B:3125, S:2500, BMB:5000, BMS:2500/300(class D)";
ifns[54] = "drugs.png";
itts[54] = "Drugs.  B:-, S:-, BMB:30000, BMS:15000";
ifns[55] = "leech_baby.png";
itts[55] = "Leech Baby.  B:-, S:-, BMB:6000000, BMS:10000";

//planets &c.
ifns[56] = "starbase_stage3.png";
itts[56] = "Starbase (NPC). U: Food, Water. P: Energy, Embryos, (Field)";
ifns[57] = "planet_m.png";
itts[57] = "Class M Planet. U: Energy*. P: Food, Water.";
ifns[58] = "planet_d.png";
itts[58] = "Class D Planet. U: Water, Gems. P: Slaves.";
ifns[59] = "planet_i.png";
itts[59] = "Class I Planet. U: Energy*. P: Water*, Embryos.";
ifns[60] = "planet_g.png";
itts[60] = "Class G Planet. U: Food, Energy. P: Neb. Gas*, Chems, Embryos.";
ifns[61] = "planet_r.png";
itts[61] = "Class R Planet. U: Food, Water, Energy. P: Ore, Metal, Embryos, Rad. Cells.";

//standard ships
ifns[62] = "sabre.png";
itts[62] = "Sabre (STD 1)";
ifns[63] = "rustclaw.png";
itts[63] = "Rustclaw (STD 2)";
ifns[64] = "interceptor.png";
itts[64] = "Interceptor (STD 3)";
ifns[65] = "harrier.png";
itts[65] = "Harrier (STD 4)";
ifns[66] = "mercury.png";
itts[66] = "Mercury (STD 5)";
ifns[67] = "hercules.png";
itts[67] = "Hercules (STD 6)";
ifns[68] = "hawk.png";
itts[68] = "Hawk (STD 7)";
ifns[69] = "gargantua.png";
itts[69] = "Gargantua (STD 8)";
ifns[70] = "behemoth.png";
itts[70] = "Behemoth (STD 9)";
ifns[71] = "liberator.png";
itts[71] = "Liberator (STD 10)";

//fed ships
ifns[72] = "wasp.png";
itts[72] = "Wasp (Fed 1)";
ifns[73] = "adder.png";
itts[73] = "Adder (Fed 2)";
ifns[74] = "thunderbird.png";
itts[74] = "Thunderbird (Fed 3)";
ifns[75] = "viper_defence_craft.png";
itts[75] = "Viper DC (Fed 4)";
ifns[76] = "babel_transporter.png";
itts[76] = "Babel Transport (Fed 5)";
ifns[77] = "piranha.png";
itts[77] = "Piranha (Fed 6)";
ifns[78] = "nighthawk.png";
itts[78] = "Nighthawk (Fed 7)";
ifns[79] = "mantis.png";
itts[79] = "Mantis (Fed 8)";
ifns[80] = "extender.png";
itts[80] = "Extender (Fed 9)";
ifns[81] = "gauntlet.png";
itts[81] = "Gauntlet (Fed 10)";
ifns[82] = "doomstar.png";
itts[82] = "Doomstar (Fed 11)";

//empire ships
ifns[83] = "ficon.png";
itts[83] = "Ficon (Emp 1)";
ifns[84] = "tyrant.png";
itts[84] = "Tyrant (Emp 2)";
ifns[85] = "spectre.png";
itts[85] = "Spectre (Emp 3)";
ifns[86] = "shadow_stealth_craft.png";
itts[86] = "Shadow Stealth Craft (Emp 4)";
ifns[87] = "venom.png";
itts[87] = "Venom (Emp 5)";
ifns[88] = "constrictor.png";
itts[88] = "Constrictor (Emp 6)";
ifns[89] = "phantom_advanced_stealth_craft.png";
itts[89] = "Phantom Adv. Stealth Craft (Emp 7)";
ifns[90] = "dominator.png";
itts[90] = "Dominator (Emp 8)";
ifns[91] = "boa_ultimate_carrier.png";
itts[91] = "Boa Carrier (Emp 9)";
ifns[92] = "mooncrusher.png";
itts[92] = "Mooncrusher (Emp 10)";

//monsters
ifns[100] = "pirate_unexperienced.png";
itts[100] = "Inexperienced Pirate";
ifns[92] = "";
itts[92] = "";
ifns[92] = "";
itts[92] = "";
ifns[92] = "";
itts[92] = "";
ifns[92] = "";
itts[92] = "";

//player starbases
ifns[200] = "starbase_stage1.png";
itts[200] = "PC Starbase, Stage 1";
ifns[201] = "starbase_stage2.png";
itts[201] = "PC Starbase, Stage 2";
ifns[202] = "starbase_stage3.png";
itts[202] = "PC Starbase, Stage 3";
ifns[203] = "starbase_stage4.png";
itts[203] = "PC Starbase, Stage 4";



var imgs = document.getElementsByTagName("img");

for (var i = 0; i < imgs.length; i++)
{
	var currimg = imgs[i];
	var replacetitle = "";
	for (var j = 0; j<ifns.length; j++)
	{
		if (currimg.src.indexOf(ifns[j]) != -1)
		{
			//found the one we want
			replacetitle = itts[j];
			break;
		}
	}
	if (replacetitle != "")
	{
		currimg.title = replacetitle;
	}
}
