Advertisement
Guest User

Untitled

a guest
Feb 28th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.98 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  5. <meta name="generator" content="Wordpress <?php bloginfo('version'); ?>" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  7. <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
  8. <link rel="pingback" href="<?php bloginfo('pingback url'); ?>" />
  9. <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
  10. <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" />
  11. <link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico" />
  12. <?php wp_head(); ?>
  13. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  14. <script>
  15. $(window).load(function(event) {
  16. $('#Nav a').click(function() {
  17. $('#Nav li').removeClass();
  18. $(this).parent().addClass("current");
  19. });
  20. </script>
  21. <script type="text/javascript">
  22. var _gaq = _gaq || [];
  23. _gaq.push(['_setAccount', 'UA-32783537-1']);
  24. _gaq.push(['_trackPageview']);
  25.  
  26. (function() {
  27. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  28. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  29. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  30. })();
  31. </script>
  32. <script>
  33. $(document).ready(function() {
  34. function filterPath(string) {
  35. return string
  36. .replace(/^\//,'')
  37. .replace(/(index|default).[a-zA-Z]{3,4}$/,'')
  38. .replace(/\/$/,'');
  39. }
  40. var locationPath = filterPath(location.pathname);
  41. var scrollElem = scrollableElement('html', 'body');
  42.  
  43. $('a[href*=#]').each(function() {
  44. var thisPath = filterPath(this.pathname) || locationPath;
  45. if ( locationPath == thisPath
  46. && (location.hostname == this.hostname || !this.hostname)
  47. && this.hash.replace(/#/,'') ) {
  48. var $target = $(this.hash), target = this.hash;
  49. if (target) {
  50. var targetOffset = $target.offset().top;
  51. $(this).click(function(event) {
  52. event.preventDefault();
  53. $(scrollElem).animate({scrollTop: targetOffset}, 400, function() {
  54. location.hash = target;
  55. });
  56. });
  57. }
  58. }
  59. });
  60.  
  61. // use the first element that is "scrollable"
  62. function scrollableElement(els) {
  63. for (var i = 0, argLength = arguments.length; i <argLength; i++) {
  64. var el = arguments[i],
  65. $scrollElement = $(el);
  66. if ($scrollElement.scrollTop()> 0) {
  67. return el;
  68. } else {
  69. $scrollElement.scrollTop(1);
  70. var isScrollable = $scrollElement.scrollTop()> 0;
  71. $scrollElement.scrollTop(0);
  72. if (isScrollable) {
  73. return el;
  74. }
  75. }
  76. }
  77. return [];
  78. }
  79.  
  80. });
  81. </script>
  82. <script>
  83. $(function() {
  84. $.fn.scrollBottom = function() {
  85. return $(document).height() - this.scrollTop() - this.height();
  86. };
  87.  
  88. var $el = $('#nav>div');
  89. var $window = $(window);
  90. var top = $el.parent().position().top;
  91.  
  92. $window.bind("scroll resize", function() {
  93. var gap = $window.height() - $el.height() - 10;
  94. var visibleFoot = 340 - $window.scrollBottom();
  95. var scrollTop = $window.scrollTop()
  96.  
  97. if (scrollTop < top + 10) {
  98. $el.css({
  99. top: (top - scrollTop) + "px",
  100. bottom: "auto"
  101. });
  102. } else if (visibleFoot > gap) {
  103. $el.css({
  104. top: "auto",
  105. bottom: visibleFoot + "px"
  106. });
  107. } else {
  108. $el.css({
  109. top: 0,
  110. bottom: "auto"
  111. });
  112. }
  113. }).scroll();
  114. });
  115. </script>
  116. </head>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement