You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
2.8 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. //http://placehold.it/1920x1080
  2. var actualWindow="";
  3. function OnLoadDefault(){
  4. /*$(document).ready(function(e) {
  5. $('#HTMLmenu').load('HTMLmenu.html',function(){
  6. //
  7. });
  8. });
  9. $(document).ready(function(e) {
  10. $('#HTMLfooter').load('HTMLfooter.html',function(){
  11. //
  12. });
  13. });*/
  14. console.log(actualWindow);
  15. if(actualWindow!="index")
  16. {
  17. $(window).bind('scroll', function () {
  18. console.log($(window).scrollTop());
  19. if ($(window).scrollTop() > 25) {
  20. //$('.menu').addClass('own-menuFixed');
  21. document.getElementById("menu").className="own-menuFixed";
  22. } else {
  23. //$('.menu').removeClass('own-menuFixed');
  24. document.getElementById("menu").className="own-menu";
  25. }
  26. });
  27. }
  28. }
  29. /*
  30. - La señora haciendo el saludo de la victoria (_013)
  31. - Paisaje Sol (_008)
  32. - Paisaje Sol niñxs (004)
  33. - Señora en balcón (la que se vea bien, he visto que no está bien pillado el frame)) (_036)
  34. - Barricadas (020, 026, 028, 001)
  35. - Paisajes (057, 059, 058, 045)
  36. - Gente (014, 074, 068, 071, 012)
  37. */
  38. function OnLoadIndex(){
  39. actualWindow="index";
  40. OnLoadDefault();
  41. var numImg=3;
  42. var visibleImg=1;
  43. setInterval(function(){
  44. console.log(numImg);
  45. console.log("visibleImg: " + visibleImg);
  46. document.getElementById("backgroundImage"+visibleImg).className+=" own-opacity0";
  47. document.getElementById("backgroundImage"+visibleImg).src="imatges/background/background"+numImg+".jpg";
  48. if(visibleImg==0){
  49. visibleImg=1;
  50. }else{
  51. visibleImg=0;
  52. }
  53. document.getElementById("backgroundImage"+visibleImg).className="own-indexBackgroundImage";
  54. numImg++;
  55. if(numImg>9)
  56. {
  57. numImg=0;
  58. }
  59. }, 4000);
  60. }
  61. function OnLoadNosaltres(){
  62. OnLoadDefault();
  63. setTimeout(function(){
  64. document.getElementsByClassName("own-menuButtons")[0].childNodes[3].className="own-currentPageMenu";
  65. }, 500);
  66. }
  67. function OnClickCampanyesDeSuport(){
  68. if(document.getElementById("desplegable").className=="own-desplegable")
  69. {
  70. document.getElementById("desplegable").className="own-desplegableAmagat";
  71. }else{
  72. document.getElementById("desplegable").className="own-desplegable";
  73. }
  74. }
  75. function ShowMenuButtons(){
  76. if(document.getElementById("menuButtons").className.indexOf("own-displayShowBlock") > -1)
  77. {
  78. document.getElementById("menuButtons").className="own-menuButtons";
  79. }else{
  80. document.getElementById("menuButtons").className+=" own-displayShowBlock";
  81. }
  82. }
  83. function ShowMenuButtonsIndex(){
  84. if(document.getElementById("menuButtons").className.indexOf("own-displayShowBlock") > -1)
  85. {
  86. document.getElementById("menuButtons").className="own-menuButtons own-whiteText";
  87. }else{
  88. document.getElementById("menuButtons").className+=" own-displayShowBlock";
  89. }
  90. }