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 = $('