forked from jeuelc/mworld-flat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sub-naturalworld-volcanoes-huffandpuff.html
203 lines (178 loc) · 8.94 KB
/
sub-naturalworld-volcanoes-huffandpuff.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!-- i-C-a -->
<div data-role="page" id="huff">
<script src="js/hammer.js"></script>
<script src="js/jquery.hammer.js"></script>
<script src="js/slidebarnat.js"></script>
<div class="menuhousing"></div>
<div class="homebtnholder"><div class="homebtnnat"></div></div>
<div class="mpbtnholder"><div class="mpbtnnat"></div></div>
<div class="cpbtnholder"><div class="cpbtnnat"></div></div>
<div class="infobtnholder"><div class="infobtnnat"></div></div>
<div class="credsbtnholder"><div class="credsbtnnat"></div></div>
<div class="menubtnholder"><div class="menubtnnat"></div></div>
<div class="bptitleholder-huff" style="padding-top:14px;"><h1>Huff and puff vs. flow</h1></div>
<div id="spacechar">
<div data-role="content" class="kidzcontent">
<div class="v-spacer"></div>
<div class="sidebarleft-half">
<a id="bromo" style="visibility:hidden;" href="JavaScript:html5Lightbox.showLightbox(0, 'css/images/9-12/The_Natural_World/Volcanoes/Rumbling_From_The_Deep/Huff_and_Puff_Vs_Flow/Mt_Bromo.jpg', 'Explosive eruption of Mt Bromo volcano, 2011, which sits within the larger Tengger Volcanic Complex, Indonesia. See how the eruption cloud spreads and covers the land with ash!');">click here</a>
<div id="zoomwrapper">
<div id="pol1" class="pPiece" style="left:100px;top:270px;">
<img src="css/images/9-12/The_Natural_World/Volcanoes/Rumbling_From_The_Deep/Huff_and_Puff_Vs_Flow/Lava_Flow.png" alt="" />
</div>
<div id="pol2"class="pPiece" style="left:75px;top:290px;">
<img src="css/images/9-12/The_Natural_World/Volcanoes/Rumbling_From_The_Deep/Huff_and_Puff_Vs_Flow/Pyroclastic_Flows.png" alt="" />
</div>
<div id="pol3"class="pPiece" style="left:80px;top:270px;">
<img src="css/images/9-12/The_Natural_World/Volcanoes/Rumbling_From_The_Deep/Huff_and_Puff_Vs_Flow/Mt_Tungurahua_Volcano.png" alt="" />
</div>
<div id="pol4"class="pPiece" style="left:80px;top:270px;">
<img src="css/images/9-12/The_Natural_World/Volcanoes/Rumbling_From_The_Deep/Huff_and_Puff_Vs_Flow/Mt_Bromo.png" alt="" />
</div>
</div><!--/zoomwrapper-->
</div>
<div class="bpcontent-huff">
<p>Some volcanic eruptions are very explosive, producing huge eruption clouds or 'columns' that can soar high into the sky. These eruptions can also form deadly and destructive pyroclastic flows that can bury houses, fields, parts of rivers anything in their path!</p>
<p>Other eruptions are less explosive and produce lava flows that ooze and glide over the landscape. These eruptions might look kind of harmless but they're not a good spot to toast marshmallows because lava temperatures can reach up to 1250°C so you might just toast off your hand and arm too!</p>
</div>
<div class="botlogoholder"><a href="home.html" class="homelinkbh"><img src="css/images/9-12/The_Natural_World/bottomhomenat.png"></a></div>
</div> <!-- end content -->
</div><!--/spacechar-->
<!-- <div class="audiopanel"> -->
<!-- images are in slidebarnat.js
note: change the ids to be able play the narration
-->
<div class="micbtnholder"><div class="micbtnnat" id="playstophuff"></div></div>
<div class="bnat"><div class="rwnat" id="huffaudiobbtn"></div></div>
<div class="plnat"><div class="plpsnat" id="huffaudioplbtn"></div></div>
<div class="fnat"><div class="fwnat" id="huffaudiofbtn"></div></div>
<div id="actualaudio-huff" style="visibility:hidden;"></div>
<!-- </div> -->
<div id="watchLavaFlowholder" style="width:1024px;height:748px;position:absolute;left:0px;top:0px;visibility:hidden;background:#000000;z-index:-1;">
<video id="watchLavaFlow" width="1024" height="748" preload>
<source src="css/images/9-12/The_Natural_World/Volcanoes/Rumbling_From_The_Deep/Huff_and_Puff_Vs_Flow/Lava_Flow.mov" type="video/mp4">
</video>
</div>
<div id="watchMtTungurahuaholder" style="width:1024px;height:748px;position:absolute;left:0px;top:0px;visibility:hidden;background:#000000;z-index:-1;">
<video id="watchMtTungurahua" width="1024" height="748" preload>
<source src="css/images/9-12/The_Natural_World/Volcanoes/Rumbling_From_The_Deep/Huff_and_Puff_Vs_Flow/Mt_Tungurahua_Volcano.mov" type="video/mp4">
</video>
</div>
<script>
// sound setup is in home.html and index.js
sound = new Audio(); // 'sound' is now an audio object
var playing;
var paused;
(function() {
$('div#pol1').css("z-index", 3);
$('div#pol2').css("z-index", 2);
$('div#pol3').css("z-index", 1);
$('div#pol1 > img').css("-webkit-transform", "rotate(0deg)");
$('#watchLavaFlowholder').css({"visibility":"hidden", "z-index":-10});
$('div#pol2 > img').css("-webkit-transform", "rotate(5deg)");
$('div#pol3 > img').css("-webkit-transform", "rotate(-3deg)");
$('#watchMtTungurahuaholder').css({"visibility":"hidden", "z-index":-10});
$('div#pol4 > img').css("-webkit-transform", "rotate(-3deg)");
playing = false;
paused = true;
if(sound.canPlayType('audio/mpeg')) {
$('#actualaudio-huff').html('<audio id="huffaudio" controls preload onpause="playvol()" onplay="pausevol()"><source src="narrations/volcanoes_huffandpuff.mp3" type="audio/mpeg"></audio>');
}
watchLavaFlow.addEventListener('ended', function() {
$("#watchLavaFlowholder").css({"visibility":"hidden", "z-index":-1});
$("#watchLavaFlow").css({"z-index":-1});
bgsoundvol.play();
});
$("#watchLavaFlow").on('tap', function() {
$("#watchLavaFlowholder").css({"visibility":"hidden", "z-index":-1});
$("#watchLavaFlow").css({"z-index":-1});
bgsoundvol.play();
watchLavaFlow.pause();
watchLavaFlow.currentTime = 0;
});
watchMtTungurahua.addEventListener('ended', function() {
$("#watchMtTungurahuaholder").css({"visibility":"hidden", "z-index":-1});
$("#watchMtTungurahua").css({"z-index":-1});
bgsoundvol.play();
});
$("#watchMtTungurahua").on('tap', function() {
$("#watchMtTungurahuaholder").css({"visibility":"hidden", "z-index":-1});
$("#watchMtTungurahua").css({"z-index":-1});
bgsoundvol.play();
watchMtTungurahua.pause();
watchMtTungurahua.currentTime = 0;
});
$("#huff").swipe( { swipeRight:goBack, allowPageScroll:"auto"} );
})();
$('.homelinkbh').on('tap', function() { mainaudiobg.play(); bgsoundvol.pause(); bgsoundvol.currentTime = 0;});
function goBack() {
$.mobile.changePage("sub-naturalworld-volcanoes-rumbling.html", {transition: "slide", reverse: true });
// prev page plays the same bgmusic so comment this out
//bgsoundvol.pause();
//bgsoundvol.currentTime = 0;
//bgsoundvol.play();
}
$("#pol1").on('tap', function() {
$("#watchLavaFlowholder").css({"visibility":"visible", "z-index":10});
$("#watchLavaFlow").css({"z-index":9});
bgsoundvol.pause();
watchLavaFlow.play();
});
$("#pol2").on('tap', function() {
$.mobile.changePage("sub-naturalworld-volcanoes-pyroclasticflows.html", { transition: "slide" });
});
$("#pol3").on('tap', function() {
$("#watchMtTungurahuaholder").css({"visibility":"visible", "z-index":10});
$("#watchMtTungurahua").css({"z-index":9});
bgsoundvol.pause();
watchMtTungurahua.play();
});
$("#pol4").on('tap', function() {
$('#bromo')[0].click();
});
function pausedaudio() {
bgsoundvol.play();
}
function pausebg() {
bgsoundvol.pause();
}
/* ******************** */
/* this is the microphone button */
$("#playstophuff").on('tap', function() {
if(!playing) {
huffaudio.play();
$('.micbtnnat').css('background-position-x', '-81px');
playing = true;
paused = false;
} else {
huffaudio.pause(); huffaudio.currentTime = 0;
$('.micbtnnat').css('background-position-x', '0px');
playing = false;
paused = true;
}
});
$("#huffaudioplbtn").on('tap', function() {
if(!paused) {
huffaudio.pause();
paused = true;
} else {
huffaudio.play();
paused = false;
}
//$(".audiopanel").css({"backgroundPosition":"-197px 0px"});
});
$("#huffaudiofbtn").on('tap', function() {
var ctime = huffaudio.currentTime;
huffaudio.currentTime = ctime + 10;
});
$("#huffaudiobbtn").on('tap', function() {
var ctime = huffaudio.currentTime;
huffaudio.currentTime = ctime - 10;
});
$("#huffaudiopsbtn").on('tap', function() {
huffaudio.pause();
//$(".audiopanel").css({"backgroundPosition":"0px 0px"});
});
</script>
<script src="js/fourcardLogic.js"></script> <!-- for card dragging effects -->
</div> <!--//home-->