NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name TM_Transfer_Topics // @version 0.14 // @description Adds a menu to the forum with links to the transfer and open topics for each country // @author Andrizz aka Banana aka Jimmy il Fenomeno (team ID = 3257254) // @downloadURL https://openuserjs.org/install/andrizz/TM_Transfer_Topics.user.js // @include https://trophymanager.com/forum/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js // @license MIT // ==/UserScript== /////////////////////////////////////////////////////////////////////// // SCRIPT SETTINGS: // SET FLAGS STYLE: "round" or "square" var flagStyle = "square"; // SET BOX POSITION: "left" or "right" var pos = "left"; // SET THE SPEED OF THE FADING EFFECT: milliseconds , "slow" or "fast" var mainMenuSpeed = 1300; var subMenuSpeed = "slow"; /////////////////////////////////////////////////////////////////////// // LINKS TO TRANSFER AND OPEN TOPICS: var Africa = [ /* DZ */ ["Algeria","dz","2080","263205"], /* AO */ ["Angola","ao","8052","37716"], /* BW */ ["Botswana","bw","370820","105901"], /* CM */ ["Cameroon","cm","370857","370858"], /* TD */ ["Chad","td","23570","51318"], /* EG */ ["Egypt","eg","2925","2956"], /* GH */ ["Ghana","gh","14751","190105"], /* CI */ ["Ivory Coast","ci","258538","345238"], /* LY */ ["Libya","ly","370872","370874"], /* MA */ ["Morocco","ma","356803","3731"], /* NG */ ["Nigeria","ng","1817","1818"], /* SO */ ["Palestine","so","6148","6151"], /* SN */ ["Senegal","sn","35803","182606"], /* ZA */ ["South Africa","za","8568","9534"], /* TN */ ["Tunisia","tn","370880","370879"], ]; var Asia = [ /* AF */ ["Afghanistan","af","247251","370081"], /* BH */ ["Bahrain","bh","148674","331884"], /* BF */ ["Bangladesh","bd","211552","19668"], /* BR */ ["Brunei","bn","314428","314429"], /* CN */ ["China","cn","313981",""], /* HK */ ["Hong Kong","hk","1720","1721"], /* IN */ ["India","in","12357","20087"], /* ID */ ["Indonesia","id","2322","31015"], /* IR */ ["Iran","ir","370617","370615"], /* IQ */ ["Iraq","iq","304217","340164"], /* JP */ ["Japan","jp","13461","13464"], /* JO */ ["Jordan","jo","37916","37918"], /* KW */ ["Kuwait","kw","295597","295596"], /* LB */ ["Lebanon","lb","180082","324221"], /* MY */ ["Malaysia","my","370626","370625"], /* NP */ ["Nepal","np","370634","370633"], /* OM */ ["Oman","om","281416","255078"], /* PK */ ["Pakistan","pk","99504","100330"], /* PH */ ["Philippines","ph","327452","304000"], /* QA */ ["Qatar","qa","144540","144541"], /* SA */ ["Saudi Arabia","sa","6280","335779"], /* SG */ ["Singapore","sg","2896","2906"], /* KR */ ["South Korea","kr","221608","241894"], /* SY */ ["Syria","sy","323992","323992"], /* TW */ ["Taiwan","tw","241713","241716"], /* TH */ ["Thailand","th","4420","118113"], /* AE */ ["United Arab Emirates","ae","277240","277239"], /* VN */ ["Vietnam","vn","4097","4101"], ]; var Europe = [ /* "country name", "abbreviation", "transfer topic id", "open topic id" */ /* AL */ ["Albania","al","261450","32464"], /* AD */ ["Andorra","ad","5969","5960"], /* AM */ ["Armenia","am","14133","192430"], /* AT */ ["Austria","at","8748","35843"], /* AZ */ ["Azerbaijan","az","192445","192442"], /* BY */ ["Belarus","by","14165","232297"], /* BE */ ["Belgium","be","2718","24523"], /* BA */ ["Bosnia-Herzegovina","ba","2102","19352"], /* BG */ ["Bulgaria","bg","2250","71945"], /* HR */ ["Croatia","hr","327305","327314"], /* CY */ ["Cyprus","cy","8309","39077"], /* CZ */ ["Czech Republic","cz","340572","5482"], /* DK */ ["Denmark","dk","368147","1934"], /* EN */ ["England","en","2121","328058"], /* EE */ ["Estonia","ee","6895","11566"], /* FO */ ["Faroe Islands","fo","14168","20830"], /* FI */ ["Finland","fi","3993","15148"], /* FR */ ["France","fr","398090","398089"], /* GE */ ["Georgia","ge","1315","1321"], /* DE */ ["Germany","de","1572","1573"], /* GR */ ["Greece","gr","401890","386895"], /* NL */ ["Holland","nl","358673","185987"], /* HU */ ["Hungary","hu","1828","1830"], /* IS */ ["Iceland","is","66267","66274"], /* IE */ ["Ireland","ie","1924","1925"], /* IL */ ["Israel","il","258092","4128"], /* IT */ ["Italy","it","258737","342146"], /* KZ */ ["Kazakhstan","kz","33868","19171"], /* LV */ ["Latvia","lv","14306","122680"], /* LT */ ["Lithuania","lt","2020","9598"], /* LU */ ["Luxembourg","lu","1294","1295"], /* MK */ ["Macedonia","mk","368842","1743"], /* MT */ ["Malta","mt","371159","371160"], /* MD */ ["Moldova","md","1450","1567"], /* ME */ ["Montenegro","me","184810","131517"], /* RT */ ["Northern Ireland","rt","5516","5542"], /* NO */ ["Norway","no","2957","2967"], /* PL */ ["Poland","pl","8029","8031"], /* PT */ ["Portugal","pt","42188","8597"], /* RO */ ["Romania","ro","258366","1484"], /* RU */ ["Russia","ru","1719","1717"], /* SM */ ["San Marino","sm","16938","16940"], /* CT */ ["Scotland","ct","2283","11696"], /* CS */ ["Serbia","cs","260351","260369"], /* SK */ ["Slovakia","sk","2092","2156"], /* SI */ ["Slovenia","si","5182","5190"], /* ES */ ["Spain","es","197416","250879"], /* SE */ ["Sweden","se","2023","2025"], /* HE */ ["Switzerland","he","218482","218487"], /* TR */ ["Turkey","tr","378211","378212"], /* UA */ ["Ukraine","ua","267945","312631"], /* WA */ ["Wales","wa","2343","2349"], ]; var NorthAmerica = [ /* BZ */ ["Belize","bz","8658","8666"], /* CA */ ["Canada","ca","2116","9337"], /* CR */ ["Costa Rica","cr","6020","6019"], /* CU */ ["Cuba","cu","6043","6047"], /* DO */ ["Dominican Republic","do","6049","6048"], /* SV */ ["El Salvador","sv","6054","6052"], /* GT */ ["Guatemala","gt","6061","6057"], /* HN */ ["Honduras","hn","7024","7023"], /* JM */ ["Jamaica","jm","308298","35833"], /* MX */ ["Mexico","mx","370980","370983"], /* PA */ ["Panama","pa","7035","7034"], /* PR */ ["Porto Rico","pr","7038","7037"], /* TT */ ["Trinidad & Tobago","tt","9933","9935"], /* US */ ["USA","us","316532","1777"], /* VC */ ["West Indies","vc","371011","371013"], ]; var Oceania = [ /* AU */ ["Australia","au","4426","9877"], /* FJ */ ["Fiji","fj","65565","66223"], /* NZ */ ["New Zeland","nz","241227","7497"], /* OC */ ["Oceania","oc","395457","396601"], ]; var SouthAmerica = [ /* AR */ ["Argentine","ar","370421","5066"], /* BO */ ["Bolivia","bo","347660","347659"], /* BR */ ["Brazil","br","401403","401402"], /* CL */ ["Chile","cl","5988","5987"], /* CO */ ["Colombia","co","6002","6000"], /* EC */ ["Ecuador","ec","6007","6006"], /* PY */ ["Paraguay","py","3062","3064"], /* PE */ ["Peru","pe","4632","4630"], /* UY */ ["Uruguay","uy","6974","188518"], /* VE */ ["Venezuela","ve","340632","340633"], ]; // END LINKS var forum = "https://trophymanager.com/forum/"; if (flagStyle == "round") { var flag = "https://static.trophymanager.com/pics/nt_logos/25px/"; // ROUND FLAGS } else { flag = "https://trophymanager.com/pics/flags/gradient/"; // SQUARE FLAGS } // MAIN DIV var Div = document.createElement("div"); Div.id = "tbuddy"; Div.style="opacity:.9;-moz-opacity:.9;position:fixed;z-index:1000;top:8px;"+ pos +":5px;height:auto;width:140px;text-align:left;border:2px #275502 outset;display:inline;background-color:#333333;padding-top:3px;padding-bottom:3px;"; var Int = document.createElement("span"); Int.style="position:relative;"; Int.innerHTML = "<a href='https://trophymanager.com/forum/int/transfer/' target='_self' style='margin-left:-5px;' title='Go to...'><img src='https://static.trophymanager.com/pics/cf_mini_arrow_right.png'/> International</a><img src='https://trophymanager.com/pics/flags/gradient/int.png' style='float:right;margin-right:5px;margin-top:3px;'/>"; Div.appendChild(Int); // SEPARATOR var Hr = document.createElement("hr"); Hr.style="background-color:#ccff00;color:#ccff00;height:2px;line-height:0;margin-left:5px;margin-right:5px;margin-top:7px;text-align:center;"; Div.appendChild(Hr); // TRANSFER TOPICS DIV var Transfer = document.createElement("span"); Transfer.style = "position:relative;" Transfer.innerHTML = "<a id='linkTran' style='margin-left:-5px;' title='Show/Hide'><img src='https://static.trophymanager.com/pics/cf_mini_arrow_right.png'/> Transfer Topics</a><img src='https://trophymanager.com/pics/auction_hammer_small.png' style='float:right;margin-right:5px;margin-top:3px;'/></br>"; var TrUL = document.createElement("ul"); TrUL.id = "divTran"; TrUL.style = "display:none;list-style-type:disc;margin-top:4px;margin-bottom:4px;padding-left:12px;"; // AFRICA var AfIL = document.createElement("li"); AfIL.innerHTML = "<a id='linkAF' style='font-size: 10px; color: gold;' title=''><img src='https://upload.wikimedia.org/wikipedia/en/7/72/Confederation_of_African_Football_logo.svg' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> AFRICA </a></br>"; var AfDIV = document.createElement("div"); AfDIV.id = "divAF"; AfDIV.style = "display:none;position:relative; top:0px;left:0px"; for (var i=0; i<Africa.length; i++) { var link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + Africa[i][1] + "/general/" + Africa[i][2] + "/last/#last"; var img = document.createElement("img"); img.src = flag + "/" + Africa[i][1] + ".png"; img.title = Africa[i][0]; link.appendChild(img); AfDIV.appendChild(link); } AfIL.appendChild(AfDIV); TrUL.appendChild(AfIL); // ASIA var AsIL = document.createElement("li"); AsIL.innerHTML = "<a id='linkAS' style='font-size: 10px; color: gold;' title=''><img src='https://www.therecycler.com/wp-content/uploads/2012/05/Asian-Football-Confederation-Icon-150x150.png' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> ASIA </a></br>"; var AsDIV = document.createElement("div"); AsDIV.id = "divAS"; AsDIV.style = "display:none;position:relative; top:0px;left:0px"; for (i=0; i<Asia.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + Asia[i][1] + "/general/" + Asia[i][2] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + Asia[i][1] + ".png"; img.title = Asia[i][0]; link.appendChild(img); AsDIV.appendChild(link); } AsIL.appendChild(AsDIV); TrUL.appendChild(AsIL); // EUROPE var EuIL = document.createElement("li"); EuIL.innerHTML = "<a id='linkEU' style='font-size: 10px; color: gold;' title=''><img src='https://upload.wikimedia.org/wikipedia/en/a/ab/UEFA_logo_2012.png' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> EUROPE </a></br>"; var EuDIV = document.createElement("div"); EuDIV.id = "divEU"; EuDIV.style="display:none;position:relative; top:0px;left:0px"; for (i=0; i<Europe.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + Europe[i][1] + "/general/" + Europe[i][2] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + Europe[i][1] + ".png"; img.title = Europe[i][0]; link.appendChild(img); EuDIV.appendChild(link); } EuIL.appendChild(EuDIV); TrUL.appendChild(EuIL); // NORTH AMERICA var NaIL = document.createElement("li"); NaIL.innerHTML = "<a id='linkNA' style='font-size: 10px; color: gold;' title=''><img src='https://res.cloudinary.com/concacaf-production/image/upload/c_fit,dpr_1.0,f_auto,g_center,h_38,q_auto/v1/concacaf-prod/Con_Sec_Full_Pos_Lrg' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> NORTH AMERICA </a></br>"; var NaDIV = document.createElement("div"); NaDIV.id = "divNA"; NaDIV.style = "display:none;position:relative; top:0px;left:0px"; for (i=0; i<NorthAmerica.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + NorthAmerica[i][1] + "/general/" + NorthAmerica[i][2] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + NorthAmerica[i][1] + ".png"; img.title = NorthAmerica[i][0]; link.appendChild(img); NaDIV.appendChild(link); } NaIL.appendChild(NaDIV); TrUL.appendChild(NaIL); // OCEANIA var OcIL = document.createElement("li"); OcIL.innerHTML = "<a id='linkOC' style='font-size: 10px; color: gold;' title=''><img src='https://upload.wikimedia.org/wikipedia/commons/9/93/Oceania_Football_Confederation_logo.svg' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> OCEANIA </a></br>"; var OcDIV = document.createElement("div"); OcDIV.id = "divOC"; OcDIV.style = "display:none;position:relative; top:0px;left:0px"; for (i=0; i<Oceania.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + Oceania[i][1] + "/general/" + Oceania[i][2] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + Oceania[i][1] + ".png"; img.title = Oceania[i][0]; link.appendChild(img); OcDIV.appendChild(link); } OcIL.appendChild(OcDIV); TrUL.appendChild(OcIL); // SOUTH AMERICA var SaIL = document.createElement("li"); SaIL.innerHTML = "<a id='linkSA' style='font-size: 10px; color: gold;' title=''><img src='https://upload.wikimedia.org/wikipedia/en/d/db/CONMEBOL_logo_%281989%E2%80%932017%29.svg' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> SOUTH AMERICA </a></br>"; var SaDIV = document.createElement("div"); SaDIV.id = "divSA"; SaDIV.style = "display:none;position:relative; top:0px;left:0px"; for (i=0; i<SouthAmerica.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + SouthAmerica[i][1] + "/general/" + SouthAmerica[i][2] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + SouthAmerica[i][1] + ".png"; img.title = SouthAmerica[i][0]; link.appendChild(img); SaDIV.appendChild(link); } SaIL.appendChild(SaDIV); TrUL.appendChild(SaIL); /////////////////////////// Transfer.appendChild(TrUL); Div.appendChild(Transfer); // END OF TRANSFER TOPICS DIV // SEPARATOR Hr = document.createElement("hr"); Hr.style="background-color:#ccff00;color:#ccff00;height:2px;line-height:0;margin-left:5px;margin-right:5px;margin-top:7px;text-align:center;"; Div.appendChild(Hr); // OPEN TOPICS DIV var Open = document.createElement("span"); Open.style = "position:relative;"; Open.innerHTML = "<a id='linkOpen' style='margin-left:-5px;' title='Show/Hide'><img src='https://static.trophymanager.com/pics/cf_mini_arrow_right.png'/> Open Topics</a><img src='https://trophymanager.com/pics/icons/button_yellow.gif' style='float:right;margin-right:6px;margin-top:6px;'/></br>"; var OpUL = document.createElement("ul"); OpUL.id = "divOpen"; OpUL.style = "display:none;list-style-type:disc;margin-top:4px;margin-bottom:4px;padding-left:12px;"; // AFRICA var AfILop = document.createElement("li"); AfILop.innerHTML = "<a id='OlinkAF' style='font-size: 10px; color: gold;' title=''><img src='https://upload.wikimedia.org/wikipedia/en/7/72/Confederation_of_African_Football_logo.svg' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> AFRICA </a></br>"; var AfDIVop = document.createElement("div"); AfDIVop.id = "OdivAF"; AfDIVop.style = "display:none;position:relative; top:0px;left:0px"; for (i=0; i<Africa.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + Africa[i][1] + "/general/" + Africa[i][3] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + Africa[i][1] + ".png"; img.title = Africa[i][0]; link.appendChild(img); AfDIVop.appendChild(link); } AfILop.appendChild(AfDIVop); OpUL.appendChild(AfILop); // ASIA var AsILop = document.createElement("li"); AsILop.innerHTML = "<a id='OlinkAS' style='font-size: 10px; color: gold;' title=''><img src='https://www.therecycler.com/wp-content/uploads/2012/05/Asian-Football-Confederation-Icon-150x150.png' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> ASIA </a></br>"; var AsDIVop = document.createElement("div"); AsDIVop.id = "OdivAS"; AsDIVop.style = "display:none;position:relative; top:0px;left:0px"; for (i=0; i<Asia.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + Asia[i][1] + "/general/" + Asia[i][3] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + Asia[i][1] + ".png"; img.title = Asia[i][0]; link.appendChild(img); AsDIVop.appendChild(link); } AsILop.appendChild(AsDIVop); OpUL.appendChild(AsILop); // EUROPE var EuILop = document.createElement("li"); EuILop.innerHTML = "<a id='OlinkEU' style='font-size: 10px; color: gold;' title=''><img src='https://upload.wikimedia.org/wikipedia/en/a/ab/UEFA_logo_2012.png' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> EUROPE </a></br>"; var EuDIVop = document.createElement("div"); EuDIVop.id = "OdivEU"; EuDIVop.style="display:none;position:relative; top:0px;left:0px"; for (i=0; i<Europe.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + Europe[i][1] + "/general/" + Europe[i][3] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + Europe[i][1] + ".png"; img.title = Europe[i][0]; link.appendChild(img); EuDIVop.appendChild(link); } EuILop.appendChild(EuDIVop); OpUL.appendChild(EuILop); // NORTH AMERICA var NaILop = document.createElement("li"); NaILop.innerHTML = "<a id='OlinkNA' style='font-size: 10px; color: gold;' title=''><img src='https://res.cloudinary.com/concacaf-production/image/upload/c_fit,dpr_1.0,f_auto,g_center,h_38,q_auto/v1/concacaf-prod/Con_Sec_Full_Pos_Lrg' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> NORTH AMERICA </a></br>"; var NaDIVop = document.createElement("div"); NaDIVop.id = "OdivNA"; NaDIVop.style = "display:none;position:relative; top:0px;left:0px"; for (i=0; i<NorthAmerica.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + NorthAmerica[i][1] + "/general/" + NorthAmerica[i][3] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + NorthAmerica[i][1] + ".png"; img.title = NorthAmerica[i][0]; link.appendChild(img); NaDIVop.appendChild(link); } NaILop.appendChild(NaDIVop); OpUL.appendChild(NaILop); // OCEANIA var OcILop = document.createElement("li"); OcILop.innerHTML = "<a id='OlinkOC' style='font-size: 10px; color: gold;' title=''><img src='https://upload.wikimedia.org/wikipedia/commons/9/93/Oceania_Football_Confederation_logo.svg' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> OCEANIA </a></br>"; var OcDIVop = document.createElement("div"); OcDIVop.id = "OdivOC"; OcDIVop.style = "display:none;position:relative; top:0px;left:0px"; for (i=0; i<Oceania.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + Oceania[i][1] + "/general/" + Oceania[i][3] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + Oceania[i][1] + ".png"; img.title = Oceania[i][0]; link.appendChild(img); OcDIVop.appendChild(link); } OcILop.appendChild(OcDIVop); OpUL.appendChild(OcILop); // SOUTH AMERICA var SaILop = document.createElement("li"); SaILop.innerHTML = "<a id='OlinkSA' style='font-size: 10px; color: gold;' title=''><img src='https://upload.wikimedia.org/wikipedia/en/d/db/CONMEBOL_logo_%281989%E2%80%932017%29.svg' style='width:23px;vertical-align:middle;margin-bottom:3px;'/> SOUTH AMERICA </a></br>"; var SaDIVop = document.createElement("div"); SaDIVop.id = "OdivSA"; SaDIVop.style = "display:none;position:relative; top:0px;left:0px"; for (i=0; i<SouthAmerica.length; i++) { link = document.createElement("a"); link.style = "padding-right: 5px;"; link.href = forum + SouthAmerica[i][1] + "/general/" + SouthAmerica[i][3] + "/last/#last"; img = document.createElement("img"); img.src = flag + "/" + SouthAmerica[i][1] + ".png"; img.title = SouthAmerica[i][0]; link.appendChild(img); SaDIVop.appendChild(link); } SaILop.appendChild(SaDIVop); OpUL.appendChild(SaILop); /////////////////////////// Open.appendChild(OpUL); Div.appendChild(Open); // END OF OPEN TOPICS DIV document.body.appendChild(Div); // END OF MAIN DIV var $ = window.jQuery; $(document).ready(function () { $("#linkEU").click(function(){ $("#divEU").fadeToggle(subMenuSpeed); }); $("#linkNA").click(function(){ $("#divNA").fadeToggle(subMenuSpeed); }); $("#linkAS").click(function(){ $("#divAS").fadeToggle(subMenuSpeed); }); $("#linkOC").click(function(){ $("#divOC").fadeToggle(subMenuSpeed); }); $("#linkSA").click(function(){ $("#divSA").fadeToggle(subMenuSpeed); }); $("#linkAF").click(function(){ $("#divAF").fadeToggle(subMenuSpeed); }); $("#OlinkEU").click(function(){ $("#OdivEU").fadeToggle(subMenuSpeed); }); $("#OlinkNA").click(function(){ $("#OdivNA").fadeToggle(subMenuSpeed); }); $("#OlinkAS").click(function(){ $("#OdivAS").fadeToggle(subMenuSpeed); }); $("#OlinkOC").click(function(){ $("#OdivOC").fadeToggle(subMenuSpeed); }); $("#OlinkSA").click(function(){ $("#OdivSA").fadeToggle(subMenuSpeed); }); $("#OlinkAF").click(function(){ $("#OdivAF").fadeToggle(subMenuSpeed); }); $("#linkTran").click(function(){ $("#divTran").fadeToggle(mainMenuSpeed); }); $("#linkOpen").click(function(){ $("#divOpen").fadeToggle(mainMenuSpeed); }); });