function DynamicHomelink() { $('#dynamic_homelink').dynamicHomelink({ menu_selector: '.diapo-menu', menu_elements_selector: 'ul > li', images_selector: '.header', box_selector: '.desc_group .desc', on_menu_over : function(e){ var options = e.data.options; $(e.currentTarget).find('li').not('.o').find('a').fadeIn(500); }, on_menu_out : function(e){ var options = e.data.options; //$(e.currentTarget).find('li').not('.o').find('a').fadeOut(500); }, on_menu_elements_over:function(e){ }, on_menu_elements_out:function(e){ }, on_menu_click: function(e){ var options = e.data.options; options.stopAutoSwap(options); var menu = e.currentTarget; var target = e.target; if(typeof menu != 'undefined') { if(options.selected_id==this.index) { window.location = $(this).find('a').attr('rel'); } else { //if(typeof target != 'undefined') target.blur(); options.select(this.index, options); options.clickMe(options); } } return false; }, on_menu_select: function(menu_element, options){ menu_element.addClass('o'); menu_element.find('a').fadeIn(500); if(typeof menu != 'undefined') { options.select(this.index, options); clickMe(options); } }, on_menu_not_select: function(menu_elements, options){ menu_elements.removeClass('o'); menu_elements.not('.o').find('a').hide(0); }, on_menu_mouseenter_mouseleave: function(e){ //$(this).toggleClass("over"); }, display_time:4000, repeat:1, work_on_mouse_over:false }); $('.home-menu li a').each(function(){ var _w = $(this).width(); var _patch_bg = $('
').appendTo('#home-menu-bg-patch') .css({ width:_w+'px', float:'left', marginLeft:'1px', opacity:.2 }); var _a = this; if(_a.rel.indexOf('::')!=-1) { var chunks = _a.rel.split('::'); var img = $('').appendTo($(_a).find('b').empty()); this._normal = chunks[0]; this._hover = chunks[1]; $(this).hover( function(){ $(this).find('img').attr('src',this._hover);}, function(){ $(this).find('img').attr('src',this._normal);} ).find('img').addClass('png_fix').css('border','none'); } }).hover( function(){ $(this).css({ color:'#FFFFFF', backgroundColor:'#660000' }).stop().animate({ height:'78px', paddingTop:'17px', marginTop:0, opacity:0.8 },600/*, 'easeOutElastic'*/); }, function(){ $(this).css({ color:'#333', backgroundColor:'#fff' }).stop().animate({ height:'30px', paddingTop:'0', marginTop:'65px', opacity:1 },600); } ); } ExecutionQueue.push('DynamicHomelink()');