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 //$('.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*/
38function OnLoadIndex(){
39 actualWindow="index";
40 OnLoadDefault();
41 var numImg=3;
42 var visibleImg=1;
43 setInterval(function(){
44
45 console.log(numImg);
46 console.log("visibleImg: " + visibleImg);
47
48
49 document.getElementById("backgroundImage"+visibleImg).className+=" own-opacity0";
50 document.getElementById("backgroundImage"+visibleImg).src="imatges/background/background"+numImg+".jpg";
51 if(visibleImg==0){
52 visibleImg=1;
53 }else{
54 visibleImg=0;
55 }
56
57 document.getElementById("backgroundImage"+visibleImg).className="own-indexBackgroundImage";
58
59 numImg++;
60 if(numImg>9)
61 {
62 numImg=0;
63 }
64 }, 4000);
65}
66function OnLoadNosaltres(){
67 OnLoadDefault();
68 setTimeout(function(){
69 document.getElementsByClassName("own-menuButtons")[0].childNodes[3].className="own-currentPageMenu";
70 }, 500);
71}
72
73function OnClickCampanyesDeSuport(){
74 if(document.getElementById("desplegable").className=="own-desplegable")
75 {
76 document.getElementById("desplegable").className="own-desplegableAmagat";
77 }else{
78 document.getElementById("desplegable").className="own-desplegable";
79 }
80}
81
82
83
84function ShowMenuButtons(){
85 if(document.getElementById("menuButtons").className.indexOf("own-displayShowBlock") > -1)
86 {
87 document.getElementById("menuButtons").className="own-menuButtons";
88 }else{
89 document.getElementById("menuButtons").className+=" own-displayShowBlock";
90 }
91}
92function ShowMenuButtonsIndex(){
93 if(document.getElementById("menuButtons").className.indexOf("own-displayShowBlock") > -1)
94 {
95 document.getElementById("menuButtons").className="own-menuButtons own-whiteText";
96 }else{
97 document.getElementById("menuButtons").className+=" own-displayShowBlock";
98 }
99}