| 5 | <script> |
| 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 | } |
| 18 | else{ |
| 19 | $('.navbar-brand').removeClass('navbar-shrink'); |
| 20 | $('.navbar-inverse').removeClass('navbar-colored'); |
| 21 | $('.navbar-nav').css({"margin":"25px 0 0 25px"}); |
| 22 | $(".sun").hide(); |
| 23 | $('.navbar-lower').removeClass('navbarlower-colored'); |
| 24 | |
| 25 | } |
| 26 | }); |
| 27 | function getCurrentScroll() { |
| 28 | return window.pageYOffset; |
| 29 | } |
| 30 | }); |
| 31 | |
| 32 | |
| 33 | |
| 34 | $('.navbar-lower').affix({ |
| 35 | offset: {top: 60} |
| 36 | }); |
| 37 | |
| 38 | $(document).ready(function() { |
| 39 | $("div.bhoechie-tab-menu>div.list-group>a").click(function(e) { |
| 40 | e.preventDefault(); |
| 41 | $(this).siblings('a.active').removeClass("active"); |
| 42 | $(this).addClass("active"); |
| 43 | var index = $(this).index(); |
| 44 | $("div.bhoechie-tab>div.bhoechie-tab-content").removeClass("active"); |
| 45 | $("div.bhoechie-tab>div.bhoechie-tab-content").eq(index).addClass("active"); |
| 46 | }); |
| 47 | }); |
| 48 | </script> |