ivardiaweb/es/index.js
es/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 document.getElementById("logoIvardia").className+=" own-overImage-logo-small";
23 document.getElementById("menuButtons").className+=" own-menuButtons-small";
24 } else {
25 document.getElementById("menu").className="own-menu";
26 document.getElementById("logoIvardia").className="own-overImage-logo";
27 document.getElementById("menuButtons").className="own-menuButtons";
28 }
29 });
30 }
31}
32/*
33- La señora haciendo el saludo de la victoria (_013)
34- Paisaje Sol (_008)
35- Paisaje Sol niñxs (004)
36- Señora en balcón (la que se vea bien, he visto que no está bien pillado el frame)) (_036)
37- Barricadas (020, 026, 028, 001)
38- Paisajes (057, 059, 058, 045)
39- Gente (014, 074, 068, 071, 012)
40*/
41function OnLoadIndex(){
42 actualWindow="index";
43 OnLoadDefault();
44 var numImg=1;
45 var visibleImg=0;
46 setInterval(function(){
47
48 console.log(numImg);
49 console.log("visibleImg: " + visibleImg);
50
51
52 document.getElementById("backgroundImage"+visibleImg).className="own-indexBackgroundImage";
53 if(visibleImg==0){
54 visibleImg=1;
55 }else{
56 visibleImg=0;
57 }
58
59 document.getElementById("backgroundImage"+visibleImg).className+=" own-opacity0";
60 document.getElementById("backgroundImage"+visibleImg).src="imatges/background/background"+numImg+".jpg";
61
62 numImg++;
63 if(numImg>9)
64 {
65 numImg=0;
66 }
67 }, 10000);
68}
69function OnLoadNosaltres(){
70 OnLoadDefault();
71 setTimeout(function(){
72 document.getElementsByClassName("own-menuButtons")[0].childNodes[3].className="own-currentPageMenu";
73 }, 500);
74}
75function OnLoadContacte(){
76 OnLoadDefault();
77 setTimeout(function(){
78 document.getElementsByClassName("own-menuButtons")[0].childNodes[5].className="own-currentPageMenu";
79 }, 8000);
80}
81
82function OnClickCampanyesDeSuport(){
83
84 if(document.getElementById("desplegable").className=="own-desplegable")
85 {
86 document.getElementById("desplegable").className="own-desplegableAmagat";
87 }else{
88 var auxhtml="";
89 auxhtml+="<h3>El nostre projecte, un viatge a Bakur</h3>";
90 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.";
91 document.getElementById("desplegable").innerHTML=auxhtml;
92 document.getElementById("desplegable").className="own-desplegable";
93 }
94
95}
96
97
98
99function ShowMenuButtons(){
100 if(document.getElementById("menuButtons").className.indexOf("own-displayShowBlock") > -1)
101 {
102 document.getElementById("menuButtons").className="own-menuButtons";
103 }else{
104 document.getElementById("menuButtons").className+=" own-displayShowBlock";
105 }
106}
107function ShowMenuButtonsIndex(){
108 if(document.getElementById("menuButtons").className.indexOf("own-displayShowBlock") > -1)
109 {
110 document.getElementById("menuButtons").className="own-menuButtons own-whiteText";
111 }else{
112 document.getElementById("menuButtons").className+=" own-displayShowBlock";
113 }
114}
115
116
117function NoFunction(){
118
119}