Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 KB | None | 0 0
  1. <?php global $shortname; ?>
  2.  
  3. <script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.lavalamp.1.3.3-min.js" type="text/javascript" charset="utf-8"></script>
  4. <script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.cycle.all.min.js" type="text/javascript" charset="utf-8"></script>
  5. <script src="<?php bloginfo('stylesheet_directory'); ?>/js/superfish.js" type="text/javascript" charset="utf-8"></script>
  6. <script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.easing.1.3.js" type="text/javascript" charset="utf-8"></script>
  7.  
  8. <script type="text/javascript">
  9. //<![CDATA[
  10.  
  11. jQuery(function(){
  12.  
  13. jQuery.noConflict();
  14.  
  15. jQuery('ul.sf-menu').superfish({
  16. delay: 200, // one second delay on mouseout
  17. animation: {'marginLeft':'0px',opacity:'show',height:'show'}, // fade-in and slide-down animation
  18. speed: 'fast', // faster animation speed
  19. autoArrows: true, // disable generation of arrow mark-up
  20. onBeforeShow: function(){ this.css('marginLeft','20px'); },
  21. dropShadows: false // disable drop shadows
  22. });
  23.  
  24. jQuery('ul.sf-menu ul > li').addClass('noLava');
  25.  
  26. jQuery('ul.sf-menu > li > a.sf-with-ul').parent('li').addClass('sf-ul');
  27.  
  28. <?php if (get_option($shortname.'_disable_toptier') == 'on') echo('jQuery("ul.sf-menu > li > ul").prev("a").attr("href","#");'); ?>
  29.  
  30. if (!(jQuery("#footer_widgets .block_b").length == 0)) {
  31. jQuery("#footer_widgets .block_b").each(function (index, domEle) {
  32. // domEle == this
  33. if ((index+1)%3 == 0) jQuery(domEle).after("<div class='clear'></div>");
  34. });
  35. };
  36.  
  37. /* search form */
  38.  
  39. jQuery('#search').toggle(
  40. function () {jQuery('#searchbox').animate({opacity:'toggle', marginLeft:'-210px'},500);},
  41. function () {jQuery('#searchbox').animate({opacity:'toggle', marginLeft:'-200px'}, 500);}
  42. );
  43.  
  44. var $searchinput = jQuery("#header #searchbox input");
  45. var $searchvalue = $searchinput.val();
  46.  
  47. $searchinput.focus(function(){
  48. if (jQuery(this).val() == $searchvalue) jQuery(this).val("");
  49. }).blur(function(){
  50. if (jQuery(this).val() == "") jQuery(this).val($searchvalue);
  51. });
  52.  
  53.  
  54. jQuery('ul.sf-menu li ul').append('<li class="bottom_bg noLava"></li>');
  55. jQuery('ul.sf-menu').lavaLamp();
  56.  
  57.  
  58. <?php if (is_front_page() && get_option($shortname.'_featured')=='on') { ?>
  59.  
  60. /* featured slider */
  61.  
  62. jQuery('#spotlight').cycle({
  63. timeout: 0,
  64. speed: 1000,
  65. fx: '<?php echo(get_option($shortname.'_slider_effect')); ?>'
  66. });
  67.  
  68. var $featured_item = jQuery('div.featitem');
  69. var $slider_control = jQuery('div#f_menu');
  70. var ordernum;
  71. var pause_scroll = false;
  72. var $featured_area = jQuery('div#featured_content');
  73.  
  74. function gonext(this_element){
  75. $slider_control
  76. .children("div.featitem.active")
  77. .removeClass('active');
  78. this_element.addClass('active');
  79. ordernum = this_element.find("span.order").html();
  80. jQuery('#spotlight').cycle(ordernum - 1);
  81. }
  82.  
  83. $featured_item.click(function() {
  84. clearInterval(interval);
  85. gonext(jQuery(this));
  86. return false;
  87. });
  88.  
  89. jQuery('a#previous, a#next').click(function() {
  90. clearInterval(interval);
  91. if (jQuery(this).attr("id") === 'next') {
  92. auto_number = $slider_control.children("div.featitem.active").prevAll().length+1;
  93. if (auto_number === $featured_item.length) auto_number = 0;
  94. } else {
  95. auto_number = $slider_control.children("div.featitem.active").prevAll().length-1;
  96. if (auto_number === -1) auto_number = $featured_item.length-1;
  97. };
  98. gonext($featured_item.eq(auto_number));
  99. return false;
  100. });
  101.  
  102. <?php if (get_option($shortname.'_pause_hover') == 'on') { ?>
  103. $featured_area.mouseover(function(){
  104. pause_scroll = true;
  105. }).mouseout(function(){
  106. pause_scroll = false;
  107. });
  108. <?php }; ?>
  109.  
  110. var auto_number;
  111. var interval;
  112.  
  113. $featured_item.bind('autonext', function autonext(){
  114. if (!(pause_scroll)) gonext(jQuery(this));
  115. return false;
  116. });
  117.  
  118. <?php if (get_option($shortname.'_slider_auto') == 'on') { ?>
  119. interval = setInterval(function () {
  120. auto_number = $slider_control.find("div.featitem.active span.order").html();
  121. if (auto_number == $featured_item.length) auto_number = 0;
  122. $featured_item.eq(auto_number).trigger('autonext');
  123. }, <?php echo(get_option($shortname.'_slider_autospeed')); ?>);
  124. <?php }; ?>
  125.  
  126. <?php }; ?>
  127. });
  128. //]]>
  129. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement