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