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