arnaucube
arnaucube/ivardiawebPublic Self-hosted repository
ivardiaweb/index.js
index.jsRaw
 1//http://placehold.it/1920x1080
 2
 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}
15
16function OnLoadIndex(){
17  OnLoadDefault();
18  var numImg=0;
19  setInterval(function(){
20    document.getElementById("backgroundImage").src="imatges/background/background"+numImg+".jpg";
21    numImg++;
22    if(numImg>9)
23    {
24      numImg=0;
25    }
26  }, 5000);
27}
28function OnLoadNosaltres(){
29  OnLoadDefault();
30  setTimeout(function(){
31    document.getElementsByClassName("own-menuButtons")[0].childNodes[3].className="own-currentPageMenu";
32  }, 500);
33}
34
35function OnClickCampanyesDeSuport(){
36  if(document.getElementById("desplegable").className=="own-desplegable")
37  {
38    document.getElementById("desplegable").className="own-desplegableAmagat";
39  }else{
40    document.getElementById("desplegable").className="own-desplegable";
41  }
42}