Don't like ads? PRO users don't see any ads ;-)
Guest

blacklizard

By: a guest on Jun 19th, 2012  |  syntax: JavaScript  |  size: 1.93 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $(document).ready(function() {
  2.  
  3.  
  4.                 // Call stylesheet init so that all stylesheet changing functions
  5.                 // will work.
  6.                 $.stylesheetInit();
  7.                
  8.                 // This code loops through the stylesheets when you click the link with
  9.                 // an ID of "toggler" below.
  10.                 $('#toggler').bind('click',function(e){
  11.                                 $.stylesheetToggle();
  12.                         return false;
  13.                 });
  14.                
  15.                 // When one of the styleswitch links is clicked then switch the stylesheet to
  16.                 // the one matching the value of that links rel attribute.
  17.                 $('.styleswitch').bind('click',function(e){
  18.                                 $.stylesheetSwitch(this.getAttribute('rel'));
  19.                         return false;
  20.                  });
  21.                  
  22.                  
  23.                 $('ul.submenu').parent().append('<a class="submenuCollapse">&darr;</a>');
  24.                 $('.submenuCollapse').click(function() {
  25.                         $(this).parent().find('.submenu').slideToggle();
  26.                 });
  27.  
  28.                 switchHighlight:function(slider, maxslider) {
  29.                         $("#mmuSideSlideContents li").each(function() {
  30.                                 if ($(this).hasClass('mmuSlideCurrent')) {
  31.                                         $(this).removeClass('mmuSlideCurrent');
  32.                                 }
  33.                         });
  34.                         var countNum = parseInt(slider);
  35.                         if (countNum == (parseInt(maxslider) - 1)) {
  36.                                 countNum = 0;
  37.                         } else {
  38.                                 countNum += 1;
  39.                         }
  40.                        
  41.                         $("#mmuSideSlideContents .mmuSlideControl:eq(" + parseInt(countNum) + ")").addClass('mmuSlideCurrent');
  42.                 }
  43.                
  44.                 $('#mmuSlideBind').flexslider({
  45.                         animation: "slide",
  46.                         slideDirection: "horizontal",
  47.                         slideshowSpeed: 8000,
  48.                         animationDuration: 1000,
  49.                         directionNav: false,
  50.                         controlNav: false,
  51.                         slideshow: true,
  52.                         animationLoop: true,
  53.                         randomize: false,
  54.                         before: function(slider) {
  55.                                 switchHighlight(slider.currentSlide, slider.count);
  56.                                 //$("#mmuSideSlideContents .mmuSlideControl:eq(" + slider.currentSlide + ")").removeClass('mmuSlideCurrent');
  57.                                 //$("#mmuSideSlideContents .mmuSlideControl:eq(" + slider.currentSlide + 1 + ")").addClass('mmuSlideCurrent');
  58.                         }
  59.                 });
  60.                
  61.                 $('.bannerLink').parent().prepend('<div class="slideImageOverlay"></div>');
  62. });