function initNav(parent,node){ var nav=jQuery(parent); var duration=260; var height=nav.find(node).height(); nav.find(node).css({ display:"none", height:0 }); if(!$.browser.msie){ nav.find(node).css({"opacity":0}); } nav.mouseenter(function(){ nav.addClass("hover"); var drop=nav.find(node); if($.browser.msie){ jQuery(drop).css({display:"block"}).fadeIn(duration); } else{ jQuery(drop).css({display:"block"}).animate({"height":height,"opacity":1},duration,function(){ nav.css({"overflow":"visible"}) }) } }).mouseleave(function(){ var _this=nav; if($.browser.msie){ _this.find(node).fadeOut(duration); } else{ _this.find(node).animate({"opacity":0},duration,function(){ _this.find(node).css({ display:"none", height:0 }); }) } }); } function mCustomScrollbars(id){ /* malihu custom scrollbar function parameters: 1) scroll type (values: "vertical" or "horizontal") 2) scroll easing amount (0 for no easing) 3) scroll easing type 4) extra bottom scrolling space for vertical scroll type only (minimum value: 1) 5) scrollbar height/width adjustment (values: "auto" or "fixed") 6) mouse-wheel support (values: "yes" or "no") 7) scrolling via buttons support (values: "yes" or "no") 8) buttons scrolling speed (values: 1-20, 1 being the slowest) */ $("#"+id).mCustomScrollbar("vertical",0,"easeOutCirc",1.05,"auto","yes","no",0); } function saveOrder(item) { var group = item.toolManDragGroup var list = group.element.parentNode var id = list.getAttribute("id") if (id == null) return group.register('dragend', function() { ToolMan.cookies().set("list-" + id, junkdrawer.serializeList(list), 365) }) } function eraseOrder(item){ var group = item.toolManDragGroup var list = group.element.parentNode var id = list.getAttribute("id") if (id == null) return ToolMan.cookies().eraseCookie("list-" + id) } /* function to fix the -10000 pixel limit of jquery.animate */ $.fx.prototype.cur = function(){ if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) { return this.elem[ this.prop ]; } var r = parseFloat( jQuery.css( this.elem, this.prop ) ); return typeof r == 'undefined' ? 0 : r; } var zoom =function(){ oriH = $('.slideshow img').height(); oriW = $('.slideshow img').width(); percent = 20; zoomH = oriH*(percent/100); zoomW = oriW*(percent/100); oriH += zoomH; oriW += zoomW; $('.slideshow img').animate({"height":oriH+"px","marginTop":"-"+(zoomH/2)+"px","width":oriW+"px","marginLeft":"-"+(zoomW/2)+"px"},9000); }; $(document).ready(function(){ var slideObj = ""; slideObj = ".slideshow"; initNav('#header_menu ul li.menu4','ul.submenu-fatboys'); if(slideObj != ''){ oriH = $('.slideshow img').height(); oriW = $('.slideshow img').width(); percent = 20; zoomH = oriH*(percent/100); zoomW = oriW*(percent/100); oriH += zoomH; oriW += zoomW; $(slideObj).cycle({ fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc... speed:3800 }); } });// JavaScript Document