script.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. (function($) { $(document).ready(function() {
  2. //console.log($('div#menu-trigger-level1'));
  3. /* accordéon pour des views pane */
  4. $('div.accordion-h2.accordion-h2-views div.view-header').click(function() {
  5. $(this).siblings('div.view-content').toggle('fast', function() {
  6. $(this).parent().parent().parent().toggleClass('accordion-h2-opened');
  7. });
  8. });
  9. /* accordéon pour des panels pane */
  10. $('div.accordion-h2.accordion-h2-panel > h2.pane-title').click(function() {
  11. $(this).siblings('div.pane-content').toggle('fast', function() {
  12. $(this).parent().toggleClass('accordion-h2-opened');
  13. });
  14. });
  15. /* accordéon auto-exclusifs pour des panels pane */
  16. $('div.accordion-h2-ex.accordion-h2-panel > h2.pane-title').click(function() {
  17. $(this).parent().siblings('div.accordion-h2-ex').children('div.pane-content').hide();
  18. $(this).parent().siblings('div.accordion-h2-ex').removeClass('accordion-h2-opened');
  19. $(this).siblings('div.pane-content').toggle('fast', function() {
  20. $(this).parent().toggleClass('accordion-h2-opened');
  21. });
  22. });
  23. /* accordéon pour des panels pane */
  24. $('div.accordion-trigger').click(function() {
  25. $(this).toggleClass('accordion-h2-opened');
  26. $(this).parent().parent().siblings('div.accordion-content').toggle('fast', function() {
  27. });
  28. $(this).siblings('div.accordion-content').toggle('fast', function() {
  29. });
  30. });
  31. $('div#menu-trigger-level1').click(function() {
  32. $('#block-menu_block-3').slideDown('slow', function() {
  33. // Animation complete.
  34. });
  35. $('div#menu-trigger-level1').hide();
  36. $('div#menu-trigger-level1-off').show();
  37. });
  38. $('div#menu-trigger-level1-off').click(function() {
  39. $('#block-menu_block-3').slideUp('slow', function() {
  40. // Animation complete.
  41. });
  42. $('div#menu-trigger-level1-off').hide();
  43. $('div#menu-trigger-level1').show();
  44. });
  45. $('.flexslider').flexslider({
  46. /*selector: 'ul > li',*/
  47. animation: "fade",
  48. animationLoop: true,
  49. itemWidth: "100%",
  50. /*itemMargin: 0,
  51. minItems: 1,*/
  52. controlNav: false, //Boolean: Create navigation for paging control of each clide? Note: Leave true for manualControls usage
  53. directionNav: false, //Boolean: Create navigation for previous/next navigation? (true/false)
  54. prevText: "Précédent", //String: Set the text for the "previous" directionNav item
  55. nextText: "Suivant",
  56. /*maxItems: 10,*/
  57. /*start: function(slider){
  58. $('body').removeClass('loading');
  59. }*/
  60. });
  61. /* AMSTERDAM */
  62. $("#point-nid-870").popover({
  63. title: false,
  64. trigger: "hover",
  65. content: "<ul>" +
  66. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  67. "</ul>"
  68. });
  69. /* BARCELONE */
  70. $("#point-nid-871").popover({
  71. title: false,
  72. trigger: "hover",
  73. content: "<ul>" +
  74. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  75. "</ul>"
  76. });
  77. /* BERLIN */
  78. $("#point-nid-872").popover({
  79. title: false,
  80. trigger: "hover",
  81. content: "<ul>" +
  82. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  83. "</ul>"
  84. });
  85. /* BIRMINGHAM */
  86. $("#point-nid-873").popover({
  87. title: false,
  88. trigger: "hover",
  89. content: "<ul>" +
  90. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  91. "</ul>"
  92. });
  93. /* BORDEAUX */
  94. $("#point-nid-869").popover({
  95. title: false,
  96. trigger: "hover",
  97. content: "<ul><li class='popsu1'><a href='/popsu1/bordeaux/presentation'>POPSU France 1</a></li>" +
  98. "<li class='popsu2'><a href='/popsu2/bordeaux/presentation-0'>POPSU France 2</a></li>" +
  99. "<li class='metropoples'><a href='/popsu-metropoles/bordeaux/presentation'>POPSU Métropoles</a></li>" +
  100. "</ul>"
  101. });
  102. /* BRUXELLES */
  103. $("#point-nid-874").popover({
  104. title: false,
  105. trigger: "hover",
  106. content: "<ul>" +
  107. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  108. "</ul>"
  109. });
  110. /* Copenhague */
  111. $("#point-nid-875").popover({
  112. title: false,
  113. trigger: "hover",
  114. content: "<ul>" +
  115. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  116. "</ul>"
  117. });
  118. /* dordrecht */
  119. $("#point-nid-961").popover({
  120. title: false,
  121. trigger: "hover",
  122. content: "<ul>" +
  123. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  124. "</ul>"
  125. });
  126. /* dunkerque */
  127. $("#point-nid-962").popover({
  128. title: false,
  129. trigger: "hover",
  130. content: "<ul>" +
  131. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  132. "</ul>"
  133. });
  134. /* GRENOBLE */
  135. $("#point-nid-876").popover({
  136. title: false,
  137. trigger: "hover",
  138. content: "<ul>" +
  139. "<li class='popsu2'><a href='/popsu2/grenoble/presentation-0'>POPSU France 2</a></li>" +
  140. "<li class='metropoles'><a href='/popsu-metropoles/grenoble/presentation'>POPSU Métropoles</a></li>" +
  141. "</ul>"
  142. });
  143. /* Hambourg */
  144. $("#point-nid-963").popover({
  145. title: false,
  146. trigger: "hover",
  147. content: "<ul>" +
  148. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  149. "</ul>"
  150. });
  151. /* LAUSANNE */
  152. $("#point-nid-877").popover({
  153. title: false,
  154. trigger: "hover",
  155. content: "<ul>" +
  156. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  157. "</ul>"
  158. });
  159. /* LILLE */
  160. $("#point-nid-878").popover({
  161. title: false,
  162. trigger: "hover",
  163. content: "<ul>" +
  164. "<li class='popsu1'><a href='/popsu1/lille/presentation'>POPSU France 1</a></li>" +
  165. "<li class='popsu2'><a href='/popsu2/lille/presentation-0'>POPSU France 2</a></li>" +
  166. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  167. "<li class='metropoles'><a href='/popsu-metropoles/lille/presentation'>POPSU Métropoles</a></li>" +
  168. "</ul>"
  169. });
  170. /* LONDRES */
  171. $("#point-nid-879").popover({
  172. title: false,
  173. trigger: "hover",
  174. content: "<ul>" +
  175. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  176. "</ul>"
  177. });
  178. /* LYON */
  179. $("#point-nid-880").popover({
  180. title: false,
  181. trigger: "hover",
  182. content: "<ul>" +
  183. "<li class='popsu1'><a href='/popsu1/lyon/presentation'>POPSU France 1</a></li>" +
  184. "<li class='popsu2'><a href='/popsu2/lyon/presentation-0'>POPSU France 2</a></li>" +
  185. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  186. "<li class='metropoles'><a href='/popsu-metropoles/lyon/presentation'>POPSU Métropoles</a></li>" +
  187. "</ul>"
  188. });
  189. /* MALAGA */
  190. $("#point-nid-881").popover({
  191. title: false,
  192. trigger: "hover",
  193. content: "<ul>" +
  194. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  195. "</ul>"
  196. });
  197. /* MARSEILLE */
  198. $("#point-nid-882").popover({
  199. title: false,
  200. trigger: "hover",
  201. content: "<ul>" +
  202. "<li class='popsu1'><a href='/popsu1/marseille/presentation'>POPSU France 1</a></li>" +
  203. "<li class='popsu2'><a href='/popsu2/marseille/presentation-0'>POPSU France 2</a></li>" +
  204. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  205. "<li class='metropoles'><a href='/popsu-metropoles/marseille/presentation'>POPSU Métropoles</a></li>" +
  206. "</ul>"
  207. });
  208. /* mayence */
  209. $("#point-nid-964").popover({
  210. title: false,
  211. trigger: "hover",
  212. content: "<ul>" +
  213. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  214. "</ul>"
  215. });
  216. /* Montpellier */
  217. $("#point-nid-883").popover({
  218. title: false,
  219. trigger: "hover",
  220. content: "<ul>" +
  221. "<li class='popsu1'><a href='/popsu1/montpellier/presentation'>POPSU France 1</a></li>" +
  222. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  223. "<li class='metropoles'><a href='/popsu-metropoles/montpellier/presentation'>POPSU Métropoles</a></li>" +
  224. "</ul>"
  225. });
  226. /* Montréal */
  227. $("#point-nid-884").popover({
  228. title: false,
  229. trigger: "hover",
  230. content: "<ul>" +
  231. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  232. "</ul>"
  233. });
  234. /* Nantes */
  235. $("#point-nid-868").popover({
  236. title: false,
  237. trigger: "hover",
  238. content: "<ul>" +
  239. "<li class='popsu1'><a href='/popsu1/nantes/presentation'>POPSU France 1</a></li>" +
  240. "<li class='popsu2'><a href='/popsu2/nantes/presentation-0'>POPSU France 2</a></li>" +
  241. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  242. "<li class='metropoles'><a href='/popsu-metropoles/nantes/presentation'>POPSU Métropoles</a></li>" +
  243. "</ul>"
  244. });
  245. /* Nimes */
  246. $("#point-nid-965").popover({
  247. title: false,
  248. trigger: "hover",
  249. content: "<ul>" +
  250. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  251. "</ul>"
  252. });
  253. /* Orléans */
  254. $("#point-nid-1120").popover({
  255. title: false,
  256. trigger: "hover",
  257. content: "<ul>" +
  258. "<li class='metropoles'><a href='/popsu-metropoles/orleans-metropole'>POPSU Métropoles</a></li>" +
  259. "</ul>"
  260. });
  261. /* Paris */
  262. $("#point-nid-885").popover({
  263. title: false,
  264. trigger: "hover",
  265. content: "<ul>" +
  266. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  267. "</ul>"
  268. });
  269. /* Rennes */
  270. $("#point-nid-886").popover({
  271. title: false,
  272. trigger: "hover",
  273. content: "<ul>" +
  274. "<li class='popsu2'><a href='/popsu2/rennes/presentation-0'>POPSU France 2</a></li>" +
  275. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  276. "<li class='metropoles'><a href='/popsu-metropoles/rennes/presentation'>POPSU Métropoles</a></li>" +
  277. "</ul>"
  278. });
  279. /* Rotterdam */
  280. $("#point-nid-887").popover({
  281. title: false,
  282. trigger: "hover",
  283. content: "<ul>" +
  284. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  285. "</ul>"
  286. });
  287. /* Strasbourg */
  288. $("#point-nid-888").popover({
  289. title: false,
  290. trigger: "hover",
  291. content: "<ul>" +
  292. "<li class='popsu2'><a href='/popsu2/strasbourg/presentation-0'>POPSU France 2</a></li>" +
  293. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  294. "<li class='metropoles'><a href='/popsu-metropoles/strasbourg/presentation'>POPSU Métropoles</a></li>" +
  295. "</ul>"
  296. });
  297. /* Stuttgart */
  298. $("#point-nid-1031").popover({
  299. title: false,
  300. trigger: "hover",
  301. content: "<ul>" +
  302. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  303. "</ul>"
  304. });
  305. /* Rome */
  306. $("#point-nid-1030").popover({
  307. title: false,
  308. trigger: "hover",
  309. content: "<ul>" +
  310. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  311. "</ul>"
  312. });
  313. /* Toulon */
  314. $("#point-nid-889").popover({
  315. title: false,
  316. trigger: "hover",
  317. content: "<ul>" +
  318. "<li class='popsu2'><a href='/popsu2/toulon/presentation-0'>POPSU France 2</a></li>" +
  319. "</ul>"
  320. });
  321. /* Toulouse */
  322. $("#point-nid-890").popover({
  323. title: false,
  324. trigger: "hover",
  325. content: "<ul>" +
  326. "<li class='popsu1'><a href='/popsu1/toulouse/presentation'>POPSU France 1</a></li>" +
  327. "<li class='popsu2'><a href='/popsu2/toulouse/presentation-0'>POPSU France 2</a></li>" +
  328. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  329. "<li class='metropoles'><a href='/popsu-metropoles/toulouse/presentation'>POPSU Métropoles</a></li>" +
  330. "</ul>"
  331. });
  332. /* Turin */
  333. $("#point-nid-891").popover({
  334. title: false,
  335. trigger: "hover",
  336. content: "<ul>" +
  337. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  338. "</ul>"
  339. });
  340. /* Vienne */
  341. $("#point-nid-892").popover({
  342. title: false,
  343. trigger: "hover",
  344. content: "<ul>" +
  345. "<li class='popsueurope'><a href='/popsu-europe/accueil'>POPSU Europe</a></li>" +
  346. "</ul>"
  347. });
  348. /* Brest */
  349. $("#point-nid-1093").popover({
  350. title: false,
  351. trigger: "hover",
  352. content: "<ul>" +
  353. "<li class='metropoles'><a href='/popsu-metropoles/brest/presentation'>POPSU Métropoles</a></li>" +
  354. "</ul>"
  355. });
  356. /* Rouen */
  357. $("#point-nid-1099").popover({
  358. title: false,
  359. trigger: "hover",
  360. content: "<ul>" +
  361. "<li class='metropoles'><a href='/popsu-metropoles/rouen/presentation'>POPSU Métropoles</a></li>" +
  362. "</ul>"
  363. });
  364. /* Clermont-ferrand */
  365. $("#point-nid-1094").popover({
  366. title: false,
  367. trigger: "hover",
  368. content: "<ul>" +
  369. "<li class='metropoles'><a href='/popsu-metropoles/clermont-ferrand/presentation'>POPSU Métropoles</a></li>" +
  370. "</ul>"
  371. });
  372. /* Dijon */
  373. $("#point-nid-1095").popover({
  374. title: false,
  375. trigger: "hover",
  376. content: "<ul>" +
  377. "<li class='metropoles'><a href='/popsu-metropoles/dijon/presentation'>POPSU Métropoles</a></li>" +
  378. "</ul>"
  379. });
  380. /* Nice */
  381. $("#point-nid-1098").popover({
  382. title: false,
  383. trigger: "hover",
  384. content: "<ul>" +
  385. "<li class='metropoles'><a href='/popsu-metropoles/nice/presentation'>POPSU Métropoles</a></li>" +
  386. "</ul>"
  387. });
  388. /* Metz */
  389. $("#point-nid-1097").popover({
  390. title: false,
  391. trigger: "hover",
  392. content: "<ul>" +
  393. "<li class='metropoles'><a href='/popsu-metropoles/metz/presentation'>POPSU Métropoles</a></li>" +
  394. "</ul>"
  395. });
  396. /* Nancy */
  397. $("#point-nid-1102").popover({
  398. title: false,
  399. trigger: "hover",
  400. content: "<ul>" +
  401. "<li class='metropoles'><a href='/popsu-metropoles/nancy/presentation'>POPSU Métropoles</a></li>" +
  402. "</ul>"
  403. });
  404. // /* Vitré */
  405. $("#point-nid-1148").popover({
  406. title: false,
  407. trigger: "hover",
  408. content: "<ul>" +
  409. "<li class='territoires'><a href='/popsu-territoires/vitre/vitre'>POPSU Térritoires</a></li>" +
  410. "</ul>"
  411. });
  412. // /* Chateau-Thierry */
  413. $("#point-nid-1144").popover({
  414. title: false,
  415. trigger: "hover",
  416. content: "<ul>" +
  417. "<li class='territoires'><a href='/popsu-territoires/chateau-thierry/chateau-thierry'>POPSU Térritoires</a></li>" +
  418. "</ul>"
  419. });
  420. // /* Rive-de-Gier */
  421. $("#point-nid-1147").popover({
  422. title: false,
  423. trigger: "hover",
  424. content: "<ul>" +
  425. "<li class='territoires'><a href='/popsu-territoires/rive-de-gier/rive-de-gier'>POPSU Térritoires</a></li>" +
  426. "</ul>"
  427. });
  428. // /* Briançon */
  429. $("#point-nid-1143").popover({
  430. title: false,
  431. trigger: "hover",
  432. content: "<ul>" +
  433. "<li class='territoires'><a href='/popsu-territoires/briancon/briancon'>POPSU Térritoires</a></li>" +
  434. "</ul>"
  435. });
  436. // /* Marseillan */
  437. $("#point-nid-1146").popover({
  438. title: false,
  439. trigger: "hover",
  440. content: "<ul>" +
  441. "<li class='territoires'><a href='/popsu-territoires/marseillan/marseillan'>POPSU Térritoires</a></li>" +
  442. "</ul>"
  443. });
  444. // /* Isle-sur-la-Sorgue */
  445. $("#point-nid-1145").popover({
  446. title: false,
  447. trigger: "hover",
  448. content: "<ul>" +
  449. "<li class='territoires'><a href='/popsu-territoires/isle-sur-la-sorgue/isle-sur-la-sorgue'>POPSU Térritoires</a></li>" +
  450. "</ul>"
  451. });
  452. $.each($(".captioned img"), function(legend, item) {
  453. title = $(item).attr('title')
  454. if (title && title != "") {
  455. $(item).after('<p class="flex-caption"><span class="ville-title">' + title + '</span></p>');
  456. }
  457. });
  458. }); })(jQuery);