arnaucube
arnaucube/ivardiawebPublic Self-hosted repository
ivardiaweb/index.js
index.jsRaw
  1//http://placehold.it/1920x1080
  2var actualWindow="";
  3function 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              //document.getElementById("menu").className="own-menuFixed";
 21              document.getElementById("menu").className="own-menuFixed";
 22          } else {
 23              document.getElementById("menu").className="own-menu";
 24          }
 25      });
 26    }
 27}
 28/*
 29- La señora haciendo el saludo de la victoria (_013)
 30- Paisaje Sol (_008)
 31- Paisaje Sol niñxs (004)
 32- Señora en balcón (la que se vea bien, he visto que no está bien pillado el frame)) (_036)
 33- Barricadas (020, 026, 028, 001)
 34- Paisajes (057, 059, 058, 045)
 35- Gente (014, 074, 068, 071, 012)
 36*/
 37function OnLoadIndex(){
 38  actualWindow="index";
 39  OnLoadDefault();
 40  var numImg=3;
 41  var visibleImg=1;
 42  setInterval(function(){
 43
 44    console.log(numImg);
 45    console.log("visibleImg: " + visibleImg);
 46
 47
 48    document.getElementById("backgroundImage"+visibleImg).className+=" own-opacity0";
 49    document.getElementById("backgroundImage"+visibleImg).src="imatges/background/background"+numImg+".jpg";
 50    if(visibleImg==0){
 51      visibleImg=1;
 52    }else{
 53      visibleImg=0;
 54    }
 55
 56    document.getElementById("backgroundImage"+visibleImg).className="own-indexBackgroundImage";
 57
 58    numImg++;
 59    if(numImg>9)
 60    {
 61      numImg=0;
 62    }
 63  }, 4000);
 64}
 65function OnLoadNosaltres(){
 66  OnLoadDefault();
 67  setTimeout(function(){
 68    document.getElementsByClassName("own-menuButtons")[0].childNodes[3].className="own-currentPageMenu";
 69  }, 500);
 70}
 71function OnLoadContacte(){
 72  OnLoadDefault();
 73  setTimeout(function(){
 74    document.getElementsByClassName("own-menuButtons")[0].childNodes[5].className="own-currentPageMenu";
 75  }, 500);
 76}
 77
 78function OnClickCampanyesDeSuport(){
 79
 80  if(document.getElementById("desplegable").className=="own-desplegable")
 81  {
 82    document.getElementById("desplegable").className="own-desplegableAmagat";
 83  }else{
 84    var auxhtml="";
 85    auxhtml+="<h3>El nostre projecte, un viatge a Bakur</h3>";
 86    auxhtml+="El 19 d’octubre de 2015 vam decidir viatjar al Kurdistan amb unes motxilles plenes de càmeres, micros, llibretes, pors i esperances. Feia mesos que gestàvem la idea. D’ençà que havíem descobert el moviment kurd seguíem amb interès i admiració tant la seva resistència com la seva proposta política: un sistema basat en el municipalisme, l’ecologia social i l’alliberament de la dona, tot això alimentat per un poble lluitador, crític i solidari.";
 87    document.getElementById("desplegable").innerHTML=auxhtml;
 88    document.getElementById("desplegable").className="own-desplegable";
 89  }
 90
 91}
 92
 93
 94
 95function ShowMenuButtons(){
 96  if(document.getElementById("menuButtons").className.indexOf("own-displayShowBlock") > -1)
 97  {
 98    document.getElementById("menuButtons").className="own-menuButtons";
 99  }else{
100    document.getElementById("menuButtons").className+=" own-displayShowBlock";
101  }
102}
103function ShowMenuButtonsIndex(){
104  if(document.getElementById("menuButtons").className.indexOf("own-displayShowBlock") > -1)
105  {
106    document.getElementById("menuButtons").className="own-menuButtons own-whiteText";
107  }else{
108    document.getElementById("menuButtons").className+=" own-displayShowBlock";
109  }
110}
111
112
113function NoFunction(){
114  
115}