
blacklizard
By: a guest on
Jun 19th, 2012 | syntax:
JavaScript | size: 1.93 KB | hits: 18 | expires: Never
$(document).ready(function() {
// Call stylesheet init so that all stylesheet changing functions
// will work.
$.stylesheetInit();
// This code loops through the stylesheets when you click the link with
// an ID of "toggler" below.
$('#toggler').bind('click',function(e){
$.stylesheetToggle();
return false;
});
// When one of the styleswitch links is clicked then switch the stylesheet to
// the one matching the value of that links rel attribute.
$('.styleswitch').bind('click',function(e){
$.stylesheetSwitch(this.getAttribute('rel'));
return false;
});
$('ul.submenu').parent().append('<a class="submenuCollapse">↓</a>');
$('.submenuCollapse').click(function() {
$(this).parent().find('.submenu').slideToggle();
});
switchHighlight:function(slider, maxslider) {
$("#mmuSideSlideContents li").each(function() {
if ($(this).hasClass('mmuSlideCurrent')) {
$(this).removeClass('mmuSlideCurrent');
}
});
var countNum = parseInt(slider);
if (countNum == (parseInt(maxslider) - 1)) {
countNum = 0;
} else {
countNum += 1;
}
$("#mmuSideSlideContents .mmuSlideControl:eq(" + parseInt(countNum) + ")").addClass('mmuSlideCurrent');
}
$('#mmuSlideBind').flexslider({
animation: "slide",
slideDirection: "horizontal",
slideshowSpeed: 8000,
animationDuration: 1000,
directionNav: false,
controlNav: false,
slideshow: true,
animationLoop: true,
randomize: false,
before: function(slider) {
switchHighlight(slider.currentSlide, slider.count);
//$("#mmuSideSlideContents .mmuSlideControl:eq(" + slider.currentSlide + ")").removeClass('mmuSlideCurrent');
//$("#mmuSideSlideContents .mmuSlideControl:eq(" + slider.currentSlide + 1 + ")").addClass('mmuSlideCurrent');
}
});
$('.bannerLink').parent().prepend('<div class="slideImageOverlay"></div>');
});