| | 1 | <script src="/js/jquery-1.10.2.js"></script> |
| | 2 | <script src="/js/bootstrap.js"></script> |
| | 3 | <script> |
| | 4 | $('.navbar-lower').affix({offset: {top: 60}}); |
| | 5 | $('[data-toggle="tooltip"]').tooltip(); |
| | 6 | $(function(){ |
| | 7 | var shrinkHeader = 80; |
| | 8 | $(window).scroll(function() { |
| | 9 | var scroll = getCurrentScroll(); |
| | 10 | if ( scroll >= shrinkHeader ) { |
| | 11 | $('.navbar-brand').addClass('navbar-shrink'); |
| | 12 | $('.navbar-inverse').addClass('navbar-colored'); |
| | 13 | $('.navbar-nav').css({"margin":"0 0 0 15px"}); |
| | 14 | $(".sun").show(); |
| | 15 | $('.navbar-lower').addClass('navbarlower-colored'); |
| | 16 | } |
| | 17 | else{ |
| | 18 | $('.navbar-brand').removeClass('navbar-shrink'); |
| | 19 | $('.navbar-inverse').removeClass('navbar-colored'); |
| | 20 | $('.navbar-nav').css({"margin":"25px 0 0 25px"}); |
| | 21 | $(".sun").hide(); |
| | 22 | $('.navbar-lower').removeClass('navbarlower-colored'); |
| | 23 | } |
| | 24 | }); |
| | 25 | function getCurrentScroll() {return window.pageYOffset;} |
| | 26 | }); |
| | 27 | |
| | 28 | $(window).load(function(){ |
| | 29 | $('.topr').prepend('<li><a id="volb" class="vc hello" href="#" data-toggle="tooltip" data-placement="left" title="Toogle music"><i class="glyphicon glyphicon-volume-off"></i></a></li>'); |
| | 30 | $('#volb').tooltip(); |
| | 31 | $( ".ct" ).animate({opacity: 1}, 5000, function() {$(".bird").show();birdSound.play();}); |
| | 32 | var birdSound = document.getElementById('birdsound'); |
| | 33 | var birdTxt=document.getElementById('birdc'); |
| | 34 | birdTxt.onmouseover=function(){ |
| | 35 | birdSound.play(); |
| | 36 | return false; |
| | 37 | }; |
| | 38 | |
| | 39 | function toggleSound() { |
| | 40 | var audioElem = document.getElementById('africasound'); |
| | 41 | if (audioElem.paused) { |
| | 42 | audioElem.play(); |
| | 43 | //$('#africasound').volume=0.3; |
| | 44 | $('#volb').html('<i class="glyphicon glyphicon-volume-up"></i>') |
| | 45 | } else { |
| | 46 | audioElem.pause(); |
| | 47 | $('#volb').html('<i class="glyphicon glyphicon-volume-down"></i>'); |
| | 48 | } |
| | 49 | $("#africasound").bind('ended', function(){ |
| | 50 | $('#volb').html('<i class="glyphicon glyphicon-volume-down"></i>') |
| | 51 | }); |
| | 52 | } |
| | 53 | |
| | 54 | $("#volb").click(function() { |
| | 55 | toggleSound(); |
| | 56 | }); |
| | 57 | |
| | 58 | }); |
| | 59 | |
| | 60 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| | 61 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| | 62 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| | 63 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
| | 64 | ga('create', 'UA-64467652-1', 'auto'); |
| | 65 | ga('send', 'pageview'); |
| | 66 | </script> |