forked from jeuelc/mworld-flat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sub-space-bh-blackhole.html
166 lines (147 loc) · 8.13 KB
/
sub-space-bh-blackhole.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
<!-- i-C-a -->
<div id="blackhole" data-role="page">
<script src="js/hammer.js"></script>
<script src="js/jquery.hammer.js"></script>
<script src="js/slidebarbh.js"></script>
<div class="menuhousing"></div>
<div class="homebtnholder"><div class="homebtnbh"></div></div>
<div class="mpbtnholder"><div class="mpbtnbh"></div></div>
<div class="cpbtnholder"><div class="cpbtnbh"></div></div>
<div class="infobtnholder"><div class="infobtnbh"></div></div>
<div class="credsbtnholder"><div class="credsbtnbh"></div></div>
<div class="menubtnholder"><div class="menubtnbh"></div></div>
<div id="bonus-bh" class="talkbubble" style="background:url(css/images/5-8/Space/Black_Holes/game/bonustalk.png) no-repeat; width:473px;height:296px;position:absolute;left:300px;top:40px;visibility:hidden;"></div><!--/bonus-msm-->
<div class="bptitleholder" style="padding-top:14px;"><h1>From Supergiant to Black Hole...</h1></div>
<div id="spacechar">
<div data-role="content" class="kidzcontent">
<div class="v-spacer"></div>
<div class="sidebarleft-half">
<a id="bhimg1link" style="visibility:hidden;" href="JavaScript:html5Lightbox.showLightbox(0, 'css/images/5-8/Space/Black_Holes/Where_BH_Come/blackholeimage.jpg', 'An illustration of a black hole... gas and dust look like a whirlpool as they are sucked into the black hole!');">click here</a>
<a id="bhimg2link" style="visibility:hidden;" href="JavaScript:html5Lightbox.showLightbox(0, 'css/images/5-8/Space/Black_Holes/Where_BH_Come/blackholeimage2.jpg', 'An illustration of a black hole feeding on gas and dust, and shooting out X-rays');">click here</a>
<div id="zoomwrapper">
<div id="pol1" class="pPiece" style="left:100px;top:270px;">
<img src="css/images/5-8/Space/Black_Holes/Where_BH_Come/blackholeimagepol.jpg" alt="" />
</div>
<div id="pol2"class="pPiece" style="left:75px;top:290px;">
<img src="css/images/5-8/Space/Black_Holes/Where_BH_Come/blackholeimage2pol.jpg" alt="" />
</div>
<div id="pol3" class="pPiece" style="left:100px;top:270px;">
<img src="css/images/5-8/Space/Black_Holes/Where_BH_Come/nscollidepol.jpg" alt="" />
</div>
<div id="pol4" class="pPiece" style="left:100px;top:270px;">
<img src="css/images/5-8/Space/Black_Holes/Where_BH_Come/seebhpol.jpg" alt=""/>
</div>
</div><!--/zoomwrapper-->
</div>
<div class="bpcontentbh">
<p>Sometimes a supergiant star becomes so dense as it collapses that it crushes its core completely. All that remains is a black hole 2026 a very small, ultra dense object from which nothing can escape.</p>
<p>A black hole can also be formed by the collision of two neutron stars. Check out 'Neutron stars collide' to find out more...</p>
</div>
<div class="botlogoholder"><a href="home.html" class="homelinkbh"><img src="css/images/5-8/bottomhomebh.png"></a></div>
</div><!--end of content-->
</div>
<section class="container" style="height:670px;margin-top:-600px;">
<div class="spriteComing" style="z-index:10;"></div>
</section>
<div class="micbtnholder"><div class="micbtnbh"></div></div>
<div class="bbh"><div class="rwbh" id="blackholeaudiobbtn"></div></div>
<div class="plbh"><div class="plpsbh" id="blackholeaudioplbtn"></div></div>
<div class="fbh"><div class="fwbh" id="blackholeaudiofbtn" ></div></div>
<div id="actualaudio-blackhole" style="visibility:hidden;"></div>
<script src="js/spritespin.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="js/scriptblackhole.js"></script>
<script>
sound = new Audio(); // 'sound' is now an audio object
soundpop = new Audio(); // 'sound' is now an audio object
var playing;
(function() {
playing = false;
$('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)");
$('div#pol2 > img').css("-webkit-transform", "rotate(5deg)");
$('div#pol3 > img').css("-webkit-transform", "rotate(-3deg)");
$('div#pol4 > img').css("-webkit-transform", "rotate(-3deg)");
if(sound.canPlayType('audio/mpeg')) {
$('#actualaudio-blackhole').html('<audio controls preload id="blackholeaudio" onpause="pausedaudio()" onplay="pausebg()"><source src="http://back.uvmate.com/sites/default/files/subjectsaudio/FromToBlackhole.mp3" type="audio/mpeg"></audio>');
}
$("#blackhole").swipe( { swipeRight:goBack, allowPageScroll:"auto"} );
})();
(function() {
var url = "http://back.uvmate.com/jeuel_services/educ.json?nid=46";
$.getJSON( url, function( data ) {
var html = data[0].Images;
var re = /<img[^>]+src="http:\/\/([^">]+)/g;
var results = re.exec(html);
var source = results[1];
$('#nstar').attr('href', "JavaScript:html5Lightbox.showLightbox(0, 'http://"+source+"', 'Another illustration of a black hole feeding on gas and dust, and shooting out X-rays');")
});
})();
$('#start-blackhole').on('click', function() {
$('#actualaudio-blackhole').show();
var oldHeight = $('#node-body-holder').height();
var newHeight = oldHeight - $('#actualaudio-blackhole').height();
$('#node-body-holder').height(newHeight);
});
(function() {
var url = "http://back.uvmate.com/jeuel_services/educ.json?nid=47";
$.getJSON( url, function( data ) {
$('#node-pop').html(data[0].Body);
});
})();
$("#bonus-bh").on('tap', function() {
whatamimp3.play();bgsoundbh.pause();
$.mobile.changePage("game-bh2.html", {transition: "flip"});
})
function goBack() {
$.mobile.changePage("sub-space-bh-comefrom.html");
}
$('.homelinkbh').on('tap', function() { mainaudiobg.play(); bgsoundbh.pause(); bgsoundbh.currentTime = 0;});
function pausedaudio() {
bgsoundbh.play();
}
function pausebg() {
bgsoundbh.pause();
}
$("#pol1").on('tap', function() {
$('#bhimg1link')[0].click();
});
$("#pol2").on('tap', function() {
$('#bhimg2link')[0].click();
});
$("#pol3").on('tap', function() {
$.mobile.changePage("sub-space-bh-nscollide.html", {transition:"slide"});
});
$("#pol4").on('tap', function() {
$.mobile.changePage("sub-space-bh-seebh.html", {transition:"slide"});
});
/* ******************** */
$("#blackholeaudioplbtn").on('tap', function() {
//blackholeaudio.play();
//$(".audiopanel").css({"backgroundPosition":"-197px 0px"});
if(!playing) {
blackholeaudio.play();
$('.micbtnbh').css('background-position-x', '-81px');
playing = true;
} else {
blackholeaudio.pause();
$('.micbtnbh').css('background-position-x', '0px');
playing = false;
}
});
$("#blackholeaudiofbtn").on('tap', function() {
var ctime = blackholeaudio.currentTime;
blackholeaudio.currentTime = ctime + 10;
});
$("#blackholeaudiobbtn").on('tap', function() {
var ctime = blackholeaudio.currentTime;
blackholeaudio.currentTime = ctime - 10;
});
$("#blackholeaudiopsbtn").on('tap', function() {
blackholeaudio.pause();
$(".audiopanel").css({"backgroundPosition":"0px 0px"});
});
</script>
<script src="js/fourcardLogic.js"></script>
</div>