-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
4134 lines (3505 loc) · 174 KB
/
index.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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<title>ASWSUV</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; user-scalable = no" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=yes">
<script src="jquery-1.8.3.js"></script>
<script><!-- kill JQM transitions -->
$(document).bind("mobileinit", function(){
$.mobile.defaultPageTransition="none"
});
</script>
<script><!-- start highlight for listview filter-->
$( document ).on( "mobileinit", function(){
$.mobile.listview.prototype.options.filterCallback = function( text, searchValue, item ) {
var myregexp = new RegExp(searchValue, "ig");
var matches = text.match(myregexp);
while(matches) {
$(item).find('p').removeHighlight();
$(item).find('p').highlight(searchValue);
return false;
}
return true;
};
});
</script>
<script src="jquery.mobile-1.2.0.min.js"></script>
<script src="jquery.highlight-4.js"></script>
<script src="jquery.nivo.slider.pack.js"></script>
<!-- phonegap -->
<script src="cordova.js"></script>
<link rel="stylesheet" href="jquery.mobile-1.2.0.min.css" />
<link rel="stylesheet" href="styles.css" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script><!-- hide splashscreen on deviceready before timeout -->
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log("We got device ready");
navigator.splashscreen.hide();
}
</script>
<script><!-- start google maps api script-->
var markers = [];
function initialize() {
//Setting Map
var mapOptions = {
zoom: 18,
center: new google.maps.LatLng(45.73068,-122.63687),
zoomControl: true,
panControl: false,
rotateControl: false,
streetViewControl: false,
mapTypeControl: false,
mapTypeId: 'satellite'
}
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
map.setTilt(45);
// Info Window content
var publicSafetyContent = '<h3>Public Safety</h3>'+
'<p style="font-size:12px;">The WSUV Public Safety & Police Services office is located in the '+
'Admin building, room 160. The entrance to the office is located in '+
'the courtyard between the VCLS and '+
'VDEN. To contact the campus police, call <a href="tel:3605469001">360-546-9001</a>'+
'or email <a href="mailto:[email protected]">[email protected]</a>.<br />'+
'The campus police offer many services including escorts, help when you get locked out '+
'of your car, jump starts, police and crime prevention services and much more.</p>';
var parkingServicesContent = '<h3>Parking Services</h3>'+
'<p style="font-size:12px;">The Parking Services office is located in the Physical Plant building. '+
'Parking regulations at WSUV are strictly enforced Monday through '+
'Friday from 7 a.m. to 7 p.m, year round, so '+
'students should visit their website for more information regarding '+
'enforcement hours, parking locations, permits, and citations. '+
'If you have any questions that aren\'t addressed on their web page, '+
'contact their office by email at <a href="mailto:[email protected]">[email protected]</a> or '+
'call the office at <a href="tel:3605469009">360-546-9009</a> between 8am and 5pm Mon-Fri.</p>';
var writingCenterContent = '<h3>Writing Center</h3>'+
'<p style="font-size:12px;"><b>Hours:</b> Mon-Thurs 9:00am-5:pm and Fri 10:00am-2:00pm<br />'+
'The Writing Center is located in VLIB 203, directly to the right at the top of the stairs. '+
'If you need help with an assignment or would simply like help polishing your writing skills, '+
'the faculty in the Writing Center is happy to help. '+
'If you have any questions be sure to stop by or call <a href="tel:3605469651">360-546-9651</a>. '+
'You can also email <a href="mailto:[email protected]">'+
'[email protected]</a> to ask questions or submit papers for review. For more information, '+
'visit the Writing Center web page.</p>'
var MathLabContent = '<h3>Math Lab (QSC)</h3>'+
'<p style="font-size:12px;"><b>Hours:</b> Mon-Thurs 9:00am-5:00pm and Fri 9:00am to 3:00pm<br />'+
'The Math Lab, a.k.a. the Quantitative Skills Center (QSC), provides '+
'free drop-in math tutoring and help on math assignments. They also provide tutoring for '+
'math related subjects in Chemistry, Physics and Statistics. To learn more about the Math Lab, '+
'stop by or call <a href="tel:3605469344">360-546-9344</a>. You can also email '+
'<a href="mailto:[email protected]">[email protected]</a> or visit '+
'the QSC web page.</p>'
// Setting Info Windows
var infowindow = new google.maps.InfoWindow({
content: publicSafetyContent,
maxWidth: 250
});
var infowindow2 = new google.maps.InfoWindow({
content: parkingServicesContent,
maxWidth: 250
});
var infowindow3 = new google.maps.InfoWindow({
content: writingCenterContent,
maxWidth: 250
});
var infowindow4 = new google.maps.InfoWindow({
content: MathLabContent,
maxWidth: 250
});
// Marker Categories
var markerBuildings = {
category: 'buildings',
}
var markerParking = {
category: 'parking',
}
var markerRecreation = {
category: 'recreation',
}
var markerAcademic = {
category: 'academic',
}
var markerPOIs = {
category: 'pois',
}
// Icons
var iconVCCW = new google.maps.MarkerImage('images/buildingVCCW.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVDEN = new google.maps.MarkerImage('images/buildingVDEN.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVCLS = new google.maps.MarkerImage('images/buildingVCLS.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVECS = new google.maps.MarkerImage('images/buildingVECS.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVSCI = new google.maps.MarkerImage('images/buildingVSCI.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVFO = new google.maps.MarkerImage('images/buildingVFO.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVFSC = new google.maps.MarkerImage('images/buildingVFSC.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVLIB = new google.maps.MarkerImage('images/buildingVLIB.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVMCB = new google.maps.MarkerImage('images/buildingVMCB.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVMMC = new google.maps.MarkerImage('images/buildingVMMC.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVPP = new google.maps.MarkerImage('images/buildingVPP.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVSSC = new google.maps.MarkerImage('images/buildingVSSC.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVUB = new google.maps.MarkerImage('images/buildingVUB.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconAmphitheater = new google.maps.MarkerImage('images/amphitheater.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconEmergency = new google.maps.MarkerImage('images/emergency.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconRecreation = new google.maps.MarkerImage('images/recreation.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconOSI = new google.maps.MarkerImage('images/osiIcon.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconFitness = new google.maps.MarkerImage('images/fitness.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconEmergency = new google.maps.MarkerImage('images/emergency.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconLab = new google.maps.MarkerImage('images/lab.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconMathLab = new google.maps.MarkerImage('images/mathlab.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconWriting = new google.maps.MarkerImage('images/writing.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconAdmission = new google.maps.MarkerImage('images/admission.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconFinancial = new google.maps.MarkerImage('images/financial.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconVisitor = new google.maps.MarkerImage('images/visitor.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconCafeteria = new google.maps.MarkerImage('images/cafeteria.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconParkingServices = new google.maps.MarkerImage('images/parkingservices.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconSafety = new google.maps.MarkerImage('images/safety.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconBookstore = new google.maps.MarkerImage('images/bookstore.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconFountain = new google.maps.MarkerImage('images/fountain.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconRocks = new google.maps.MarkerImage('images/rocks.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconSculpture = new google.maps.MarkerImage('images/sculpture.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
var iconUser = new google.maps.MarkerImage('images/user.png',
new google.maps.Size(32, 37),
new google.maps.Point(0,0),
new google.maps.Point(16,32));
//Coordinates
//User Location
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
var pos = new google.maps.LatLng(position.coords.latitude,
position.coords.longitude);
var usermarker = new google.maps.Marker({
position: pos,
map: map,
icon: iconUser
});
});
};
//Buildings
var vmcb = new google.maps.Marker({
position: new google.maps.LatLng(45.730513,-122.638106),
map: map,
url: '#mcb',
icon: iconVMCB,
data: markerBuildings
});
markers.push(vmcb);
var vden = new google.maps.Marker({
position: new google.maps.LatLng(45.730899,-122.637742),
map: map,
url: '#den',
icon: iconVDEN,
data: markerBuildings
});
markers.push(vden);
var vcls = new google.maps.Marker({
position: new google.maps.LatLng(45.731423,-122.637294),
map: map,
url: '#cls',
icon: iconVCLS,
data: markerBuildings
});
markers.push(vcls);
var vmmc = new google.maps.Marker({
position: new google.maps.LatLng(45.730382,-122.636669),
map: map,
url: '#mmc',
icon: iconVMMC,
data: markerBuildings
});
markers.push(vmmc);
var vlib = new google.maps.Marker({
position: new google.maps.LatLng(45.730992,-122.636245),
map: map,
url: '#lib',
icon: iconVLIB,
data: markerBuildings
});
markers.push(vlib);
var vub = new google.maps.Marker({
position: new google.maps.LatLng(45.729912,-122.636028),
map: map,
url: '#ub',
icon: iconVUB,
data: markerBuildings
});
markers.push(vub);
var vfsc = new google.maps.Marker({
position: new google.maps.LatLng(45.732063,-122.636297),
map: map,
url: '#fsc',
icon: iconVFSC,
data: markerBuildings
});
markers.push(vfsc);
var vssc = new google.maps.Marker({
position: new google.maps.LatLng(45.732393,-122.637296),
map: map,
url: '#ssc',
icon: iconVSSC,
data: markerBuildings
});
markers.push(vssc);
var vsci = new google.maps.Marker({
position: new google.maps.LatLng(45.732857,-122.636057),
map: map,
url: '#sci',
icon: iconVSCI,
data: markerBuildings
});
markers.push(vsci);
var vpp = new google.maps.Marker({
position: new google.maps.LatLng(45.732288,-122.634662),
map: map,
url: '#pp',
icon: iconVPP,
data: markerBuildings
});
markers.push(vpp);
var vfo = new google.maps.Marker({
position: new google.maps.LatLng(45.732033,-122.634072),
map: map,
url: '#fo',
icon: iconVFO,
data: markerBuildings
});
markers.push(vfo);
var vecs = new google.maps.Marker({
position: new google.maps.LatLng(45.732629,-122.634625),
map: map,
url: '#ecs',
icon: iconVECS,
data: markerBuildings
});
markers.push(vecs);
var vccw = new google.maps.Marker({
position: new google.maps.LatLng(45.733344,-122.635322),
map: map,
url: '#ccw',
icon: iconVCCW,
data: markerBuildings
});
markers.push(vccw);
//Recreation
var SportsFields = new google.maps.Marker({
position: new google.maps.LatLng(45.727367,-122.639962),
map: map,
icon: iconRecreation,
url: '#sportsfields',
visible: false,
data: markerRecreation
});
markers.push(SportsFields);
var BasketballCourt = new google.maps.Marker({
position: new google.maps.LatLng(45.729401,-122.639249),
map: map,
icon: iconRecreation,
url: '#sportsfields',
visible: false,
data: markerRecreation
});
markers.push(BasketballCourt);
var DiskGolfField = new google.maps.Marker({
position: new google.maps.LatLng(45.728581,-122.633514),
map: map,
icon: iconRecreation,
url: '#sportsfields',
visible: false,
data: markerRecreation
});
markers.push(DiskGolfField);
var FitnessCenter = new google.maps.Marker({
position: new google.maps.LatLng(45.730797,-122.635995),
map: map,
url: '#directory',
icon: iconFitness,
visible: false,
data: markerRecreation
});
markers.push(FitnessCenter);
var OSI = new google.maps.Marker({
position: new google.maps.LatLng(45.732391,-122.636327),
map: map,
url: '#directory',
icon: iconOSI,
visible: false,
data: markerRecreation
});
markers.push(OSI);
//Academic
var MathLab = new google.maps.Marker({
position: new google.maps.LatLng(45.73018,-122.635915),
map: map,
icon: iconMathLab,
visible: false,
data: markerAcademic
});
markers.push(MathLab);
var ComputerLab2 = new google.maps.Marker({
position: new google.maps.LatLng(45.730663,-122.636572),
map: map,
url: '#directory',
icon: iconLab,
visible: false,
data: markerAcademic
});
markers.push(ComputerLab2);
var ComputerLab3 = new google.maps.Marker({
position: new google.maps.LatLng(45.731122,-122.636179),
map: map,
icon: iconLab,
visible: false,
data: markerAcademic
});
markers.push(ComputerLab3);
var ComputerLab4 = new google.maps.Marker({
position: new google.maps.LatLng(45.731479,-122.637131),
map: map,
icon: iconLab,
visible: false,
data: markerAcademic
});
markers.push(ComputerLab4);
var WritingCenter = new google.maps.Marker({
position: new google.maps.LatLng(45.730914,-122.636229),
map: map,
icon: iconWriting,
visible: false,
data: markerAcademic
});
markers.push(WritingCenter);
var Admissions = new google.maps.Marker({
position: new google.maps.LatLng(45.732418,-122.637554),
map: map,
icon: iconAdmission,
visible: false,
data: markerAcademic
});
markers.push(Admissions);
var FinancialAid = new google.maps.Marker({
position: new google.maps.LatLng(45.732423,-122.636965),
map: map,
icon: iconFinancial,
visible: false,
data: markerAcademic
});
markers.push(FinancialAid);
//Points of Interest
var VisitorCenter = new google.maps.Marker({
position: new google.maps.LatLng(45.732453,-122.637377),
map: map,
icon: iconVisitor,
visible: false,
data: markerPOIs
});
markers.push(VisitorCenter);
var Bookstore = new google.maps.Marker({
position: new google.maps.LatLng(45.732447,-122.636706),
map: map,
icon: iconBookstore,
visible: false,
data: markerPOIs
});
markers.push(Bookstore);
var Cafeteria = new google.maps.Marker({
position: new google.maps.LatLng(45.731017,-122.637556),
map: map,
icon: iconCafeteria,
visible: false,
data: markerPOIs
});
markers.push(Cafeteria);
var ParkingServices = new google.maps.Marker({
position: new google.maps.LatLng(45.732258,-122.635006),
map: map,
icon: iconParkingServices,
visible: false,
data: markerPOIs
});
markers.push(ParkingServices);
var PublicSafety = new google.maps.Marker({
position: new google.maps.LatLng(45.731105,-122.637656),
map: map,
icon: iconSafety,
visible: false,
data: markerPOIs
});
markers.push(PublicSafety);
var Amphitheater = new google.maps.Marker({
position: new google.maps.LatLng(45.731917,-122.639388),
map: map,
visible: false,
icon: iconAmphitheater,
data: markerPOIs
});
markers.push(Amphitheater);
var Fountain = new google.maps.Marker({
position: new google.maps.LatLng(45.730978,-122.636851),
map: map,
url: '#attractions',
visible: false,
icon: iconFountain,
data: markerPOIs
});
markers.push(Fountain);
var Rocks = new google.maps.Marker({
position: new google.maps.LatLng(45.731201,-122.635577),
map: map,
url: '#attractions',
visible: false,
icon: iconRocks,
data: markerPOIs
});
markers.push(Rocks);
var Sculpture = new google.maps.Marker({
position: new google.maps.LatLng(45.73118,-122.634904),
map: map,
url: '#attractions',
visible: false,
icon: iconSculpture,
data: markerPOIs
});
markers.push(Sculpture);
//Links
google.maps.event.addListener(vmmc, 'click', function() {
window.location.href = vmmc.url;
});
google.maps.event.addListener(vub, 'click', function() {
window.location.href = vub.url;
});
google.maps.event.addListener(vden, 'click', function() {
window.location.href = vden.url;
});
google.maps.event.addListener(vccw, 'click', function() {
window.location.href = vccw.url;
});
google.maps.event.addListener(vcls, 'click', function() {
window.location.href = vcls.url;
});
google.maps.event.addListener(vecs, 'click', function() {
window.location.href = vecs.url;
});
google.maps.event.addListener(vsci, 'click', function() {
window.location.href = vsci.url;
});
google.maps.event.addListener(vfo, 'click', function() {
window.location.href = vfo.url;
});
google.maps.event.addListener(vfsc, 'click', function() {
window.location.href = vfsc.url;
});
google.maps.event.addListener(vlib, 'click', function() {
window.location.href = vlib.url;
});
google.maps.event.addListener(vmcb, 'click', function() {
window.location.href = vmcb.url;
});
google.maps.event.addListener(vpp, 'click', function() {
window.location.href = vpp.url;
});
google.maps.event.addListener(vssc, 'click', function() {
window.location.href = vssc.url;
});
google.maps.event.addListener(Fountain, 'click', function() {
window.location.href = Fountain.url;
});
google.maps.event.addListener(Rocks, 'click', function() {
window.location.href = Rocks.url;
});
google.maps.event.addListener(Sculpture, 'click', function() {
window.location.href = Sculpture.url;
});
google.maps.event.addListener(SportsFields, 'click', function() {
window.location.href = SportsFields.url;
});
google.maps.event.addListener(BasketballCourt, 'click', function() {
window.location.href = BasketballCourt.url;
});
google.maps.event.addListener(DiskGolfField, 'click', function() {
window.location.href = DiskGolfField.url;
});
google.maps.event.addListener(OSI, 'click', function() {
window.location.href = OSI.url;
$('#directory').on('pageinit', function() {
$('#tabsList a:last').click();
});
});
google.maps.event.addListener(FitnessCenter, 'click', function() {
window.location.href = FitnessCenter.url;
$('#directory').on('pageinit', function() {
$('#tabsList a:last').click();
});
});
google.maps.event.addListener(ComputerLab2, 'click', function() {
window.location.href = ComputerLab2.url;
$('#directory').on('pageinit', function() {
$('#tabsList a:last').click();
});
});
google.maps.event.addListener(ComputerLab3, 'click', function() {
window.location.href = ComputerLab2.url;
$('#directory').on('pageinit', function() {
$('#tabsList a:last').click();
});
});
google.maps.event.addListener(ComputerLab4, 'click', function() {
window.location.href = ComputerLab2.url;
$('#directory').on('pageinit', function() {
$('#tabsList a:last').click();
});
});
// Calling Info Windows
google.maps.event.addListener(PublicSafety, 'click', function(){
infowindow.open(map,PublicSafety);
});
google.maps.event.addListener(ParkingServices, 'click', function(){
infowindow2.open(map,ParkingServices);
});
google.maps.event.addListener(WritingCenter, 'click', function(){
infowindow3.open(map,WritingCenter);
});
google.maps.event.addListener(MathLab, 'click', function(){
infowindow4.open(map,MathLab);
});
google.maps.event.trigger(map,'resize')
}
function toggleMarkers(attr,val) {
if (markers){
for (i in markers) {
if(markers[i].data[attr] == val){
var visibility = (markers[i].getVisible() == true) ? false : true;
markers[i].setVisible(visibility);
}
}
}
}
</script> <!--end script for google maps api-->
<script><!-- script to make map reload each time user visits map page -->
$('#map').live("pageshow", function(event) {
initialize();
});
</script>
<script><!-- start directory scripts -->
$(document).on('pagecreate', function(event) {
$('#tabsList a').on('click', function() {
$('#tabsList a').removeClass('ui-btn-active');
$('#tabs').children().hide();
$('#' + $(this).attr('name')).show().trigger('updatelayout');
$(this).addClass('ui-btn-active');
});
$('#tabsList a:first').click();
}); //end tabbed content script
//start zebra rows
$('#departmentOffices, #studentAffairs').live('pageshow', function(){
$('.collapsibleDirectory div p:nth-child(odd)').addClass('alternate');
});//end zebra rows
</script><!-- end directory scripts -->
<script><!-- plugin for image gallery -->
$(document).on('pageinit', function(){
$('.slider').nivoSlider({
manualAdvance: true,
directionNavHide: false,
effect: 'fade',
animSpeed: 350,
controlNav: false
});
}); // end ready
</script>
<script><!-- home page -->
$(document).delegate('#welcome', 'pageinit', function(){
var date = new Date();
var day = date.getDate();
var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
var month = monthNames[date.getMonth()];
var numberOfEvents = $('.' + month + day).length;
$('#eventsCounter').text(numberOfEvents);
});
</script>
<script><!-- backpack note -->
//local storage for notes
$(document).delegate('#backpack', 'pageinit', function() {
$('#addNoteButton, #cancel').click(function() {
$('#save').attr('id', 'submit'); //change submit button for new notes
$('#noteForm, #displayBox,').fadeToggle(300);
$('#noteTitle').focus();
}); // end click
getAllNotes(); //load the items
$("#submit").live('click', function() {
var newDate = new Date();
var itemId = newDate.getTime(); //create new key for this localStorage entry
var values = new Array();
var title = $("#noteTitle").val();
var content = $("#noteContent").val();
values.push(title);
values.push(content); //store items in the new array
if (title != "" && content != "") { //if form not empty
localStorage.setItem(itemId, values.join(';')); //join items in array and save via localStorage
$('#noteForm, #displayBox').fadeToggle(300);
} else {
alert("All fields are required.");
}
getAllNotes(); //refresh
});
$(".delete").live('click', function() {
var answer = confirm("Are you sure you want to delete this note?");
if (answer) {
var itemKey = $(this).attr("name"); //get item key
localStorage.removeItem(itemKey); //and delete it from localStorage
getAllNotes(); //refresh the list of items
}
});
$('.edit').live('click', function() {
var itemKey = $(this).attr('name');
var values = localStorage.getItem(itemKey);
values = values.split(';'); //split items to use as form values
var title = values[0];
var content = values[1];
$('#submit').attr('id','save'); //change submit button to save button
$('#noteForm, #displayBox').fadeToggle(300);
$('#noteTitle').val(title);
$('#noteContent').val(content);
$('#save').live('click', function() { //new save button function: edits values and saves over old values
values[0] = $('#noteTitle').val(); //replaces values in array
values[1] = $('#noteContent').val();
if ($('#noteTitle').val() != "" && $('#noteContent').val() != "") {
localStorage.setItem(itemKey, values.join(';')); //overwrite data with same key
$('#noteForm, #displayBox').fadeToggle(300);
location.reload(); //reload the page to refresh notes
}
else {
alert("All fields are required.");
}
});
getAllNotes(); //refresh
});
});// end local storage for notes
function getAllNotes() { //function to get/refresh notes
var timeLog = ""; //the variable that will hold our html
var i = 0;
var logLength = localStorage.length-1; //how many items are in the database starting with zero
//now we are going to loop through each item in the database
for (i = 0; i <= logLength; i++) {
//lets setup some variables for the key and values
var itemKey = localStorage.key(i);
var values = localStorage.getItem(itemKey);
values = values.split(";"); //create an array of the values
var title = values[0];
var content = values[1];
//now that we have the item, lets add it as a list item
timeLog += '<div data-role="collapsible"><h3>'+title+'</h3><div class="noteContent">'+content+'</div><button class="edit" data-inline="true" name="'+itemKey+'">Edit</button><button class="delete" data-inline="true" name="'+itemKey+'">Delete</button></div>';
}
//if there were no items in the database
if (timeLog == "")
timeLog = '<p class="empty">You don\'t currently have any saved notes.</p>';
$('#notes').html(timeLog); //update the ul with the list items
$('#backpack').trigger('create');
}
//end local storage
</script>
<script><!-- expand textarea as user types, move opened collapsible to top, -->
function autoGrowField(f, max) {
/* Default max height */
var max = (typeof max == 'undefined')?1000:max;
/* Don't let it grow over the max height */
if (f.scrollHeight > max) {
/* Add the scrollbar back and bail */
if (f.style.overflowY != 'scroll') { f.style.overflowY = 'scroll' }
return;
}
/* Make sure element does not have scroll bar to prevent jumpy-ness */
if (f.style.overflowY != 'hidden') { f.style.overflowY = 'hidden' }
/* Now adjust the height */
var scrollH = f.scrollHeight;
if( scrollH > f.style.height.replace(/[^0-9]/g,'') ){
f.style.height = scrollH+'px';
}
}
// move collapsible to top of page when opened
var lastExpanded;
$('div.ui-collapsible').live('expand', function() {
var $expandable = $(this);
// wait until the lastExpanded is collapsed
var intervalId = setInterval(function() {
if (lastExpanded && lastExpanded.has( ".ui-collapsible-heading-collapsed" )) {
var expandableTop = $expandable.offset().top,
$window = $(window),
targetPos = expandableTop - $window.scrollTop() + $expandable.height();
if (targetPos > $window.height() || expandableTop < $window.scrollTop()) {
$.mobile.silentScroll(expandableTop);
}
clearInterval(intervalId);
lastExpanded = $expandable;
} else {
lastExpanded = $expandable;
}
}, 200);
});
</script>
</head>
<body>
<!-- start home page -->
<div data-role="page" id="welcome">
<div class="homepage">
<div>
<img id="aswsuvLong2" src="images/aswsuvLong2.png" />
<img id="aswsuvstripe" src="images/aswsuvstripe.png" />
</div>
<ul class="eventsAndNav">
<li><span id="eventsCounter"></span><a id="eventsSprite" href="#events" ></a>
</li>
<li><a id="mapIcon" href="#map" ></a></li>
<li><a id="directoryIcon" href="#directory" ></a></li>
<li><a id="backpackIcon" href="#backpack" ></a></li>
<li><a id="aboutIcon" href="#about" ></a></li>
<li><a id="connectIcon" href="https://www.facebook.com/ASWSUV"></a></li>
</ul>
<div class="copyright">
<span>Copyright (C) 2012 | ASWSUV and its Respective Contributors</span>
</div>
</div>
</div><!-- end welcome page -->
<!-- start map page -->
<div data-role="page" id="map">
<div id="mapHeader" data-role="header">
<a href="#map" class="ui-btn-active ui-state-persist">Map View</a>
Map
<a href="#buildingList">List View</a>
<ul id="mapButtons">