// NPD Custom JavaScript // Start Document Ready Calls var $j = jQuery.noConflict(); $j(document).ready(function() { }); jQuery(document).ready(function($){ /*******************************/ /* function isIE( version, comparison ){ var $div = $('
').appendTo($('body')); $div.html(''); var ieTest = $div.find('a').length; $div.remove(); return ieTest; } if(isIE(8) == 1){ jQuery('ul.navpopup').each(function() { var currentElement = $(this); //var value = currentElement.val(); var postsArr = new Array(), //$postsList = $('ul.navpopup'); $postsList = currentElement; //Create array of all posts in lists $postsList.find('li').each(function(){ postsArr.push($(this).html()); }) //Split the array at this point. The original array is altered. var firstList = postsArr.splice(0, Math.round(postsArr.length / 2)), secondList = postsArr, ListHTML = ''; function createHTML(list){ ListHTML = ''; for (var i = 0; i < list.length; i++) { ListHTML += '
  • ' + list[i] + '
  • ' }; } //Generate HTML for first list createHTML(firstList); $postsList.html(ListHTML); //Generate HTML for second list createHTML(secondList); //Create new list after original one $postsList.after('').next().html(ListHTML); }); } */ /*******************************/ /********************************************/ // Home Page Rotating Banners /********************************************/ /* $('#menu>ul>li:nth-last-child(1)').css("background", "none"); */ if($('#leftNavColumn').length) { $('#leftNavColumn').replaceWith( $('#sideNav>ul')); } if($('#metatags').length) { $('#metatags').remove(); } if($("#leftNavColumnTitle").length) { $('#leftNavColumnTitle').replaceWith( $('#leftNavTitle')); var element = document.getElementById("leftNavTitle"); if (element != null && element.value == '') { element.style.display = 'block'; } } if($('#wptheme-mainContent').length) { $('#wptheme-mainContent').css('margin-left', '14px'); } var strcontent = ""; if($('#strcontent').length != 0) { strcontent = $('#strcontent').text(); } var wcmlibname = ""; if($('#WCMLibraryName').length != 0) { wcmlibname = $('#WCMLibraryName').text(); } if($('#headerimg').length) { /*if($.browser.msie && $.browser.version=="6.0") { $('#headerimg').css('background', 'url("/wps/wcm/connect/npd/0ae8a46b-14f2-4bff-86a1-d246d27c6d79/bg-maincontent-top_no_halo.png?MOD=AJPERES&CACHEID=0ae8a46b-14f2-4bff-86a1-d246d27c6d79") no-repeat scroll 0 0 transparent'); $('#headerimg').css('margin-left','15px'); $('#headerimg').css('display','inline'); }*/ } var counter = 1; $("#wptheme-mainContent>table>tbody>tr").each(function(i, tr) { if($('#wptheme-mainContent>table>tbody>tr:nth-child('+counter+')').length && $('#wptheme-mainContent>table>tbody>tr:nth-child('+counter+')').text().indexOf('bgmaincontentfill') > -1) { if($.browser.msie && $.browser.version=="6.0") { $('#wptheme-mainContent>table>tbody>tr:nth-child('+counter+')').css('background', 'url("/wps/wcm/connect/npd/9d3623c8-1f57-4ace-a341-d04475b24619/bg-maincontent-fill_no_halo.png?MOD=AJPERES&CACHEID=9d3623c8-1f57-4ace-a341-d04475b24619") repeat-y scroll 11pt 0 transparent'); } else { $('#wptheme-mainContent>table>tbody>tr:nth-child('+counter+')').css('background', 'url("/wps/wcm/connect/npd/e133e573-4ddc-421d-8b8e-2097b7f4b3c3/bg-maincontent-fill.png?MOD=AJPERES&CACHEID=e133e573-4ddc-421d-8b8e-2097b7f4b3c3") repeat-y scroll 0 0 transparent'); } } counter=counter+1; }); /*Start - NPDCOMTheme8 - PaintWhiteBackground scripting*/ $(".wpthemeMainContent>#layoutContainers>.wpthemeInner>table>tbody>tr").each(function(i, tr) { if($('.wpthemeMainContent>#layoutContainers>.wpthemeInner>table>tbody>tr:nth-child('+counter+')').length && $('.wpthemeMainContent>#layoutContainers>.wpthemeInner>table>tbody>tr:nth-child('+counter+')').text().indexOf('bgmaincontentfill') > -1) { if($.browser.msie && $.browser.version=="6.0") { $('.wpthemeMainContent>#layoutContainers>.wpthemeInner>table>tbody>tr:nth-child('+counter+')').css('background', 'url("/wps/wcm/connect/npd/9d3623c8-1f57-4ace-a341-d04475b24619/bg-maincontent-fill_no_halo.png?MOD=AJPERES&CACHEID=9d3623c8-1f57-4ace-a341-d04475b24619") repeat-y scroll 11pt 0 transparent'); } else { $('.wpthemeMainContent>#layoutContainers>.wpthemeInner>table>tbody>tr:nth-child('+counter+')').css('background', 'url("/wps/wcm/connect/npd/e133e573-4ddc-421d-8b8e-2097b7f4b3c3/bg-maincontent-fill.png?MOD=AJPERES&CACHEID=e133e573-4ddc-421d-8b8e-2097b7f4b3c3") repeat-y scroll 0 0 transparent'); } } counter=counter+1; }); /*End - NPDCOMTheme8 - PaintWhiteBackground scripting*/ /* $('#contentPage>.leftColumn>ul>li').each(function(id, pele) { if($(pele).children().length == 0) { //$(pele).remove(); } }); $('#contentPage>.leftColumn>ul>li>ul').each(function(id, pele) { var test = $(pele).children('li'); $(test).each(function(){ if($(test).children().length == 0) { //$(test).css('display', 'none'); } }); }); if($('#wptheme-mainContent>table>tbody>tr:nth-child()').length && $('#wptheme-mainContent>table>tbody>tr:nth-child()').text().indexOf('bgmaincontentfill') > -1) { $('#wptheme-mainContent>table>tbody>tr:nth-child()').css('background', 'url("/wps/wcm/connect/npd/e133e573-4ddc-421d-8b8e-2097b7f4b3c3/bg-maincontent-fill.png?MOD=AJPERES&CACHEID=e133e573-4ddc-421d-8b8e-2097b7f4b3c3") repeat-y scroll 0 0 transparent'); } if($('#leftContent').parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().length) { $('#leftContent').parent().parent().parent().parent().parent().parent().parent().parent().parent().parent().css('background', 'url("/wps/wcm/connect/npd/e133e573-4ddc-421d-8b8e-2097b7f4b3c3/bg-maincontent-fill.png?MOD=AJPERES&CACHEID=e133e573-4ddc-421d-8b8e-2097b7f4b3c3") repeat-y scroll 0 0 transparent'); } */ //Large Home Page Banner /*$('#Sideshow').before('
    ').cycle({ fx: 'fade', speed: 1000, timeout: 8000, pager: '#pagernav' }); //Home Page Featured Reports $('#featuredPosition').before('
    ').cycle({ fx: 'scrollUp', speed: 500, timeout: 0, pager: '#featuredNav' }); //Right Column Rotating Module $('#rotatingModule').before('
    ').cycle({ fx: 'fade', speed: 500, timeout: 0, pager: '#moduleNav' }); //Right Column Arrows $('#arrowsModule').cycle({ fx: 'fade', startingSlide: Math.floor(Math.random()*($('#arrowsModule .module').size())), speed: 'fast', timeout: 0, next: '#next2', prev: '#prev2' }); */ /********************************************/ // IE6 PNG Fix /********************************************/ /* $(function() { $('.bannerLeft').png(); $('.wpsPortletBody').png(); $('#bgmaincontentfill').png(); $('#mainContent').png(); $('#mainContent #content').png(); $('#mainContent #footer').png(); $('#bannerHub .bannerRight').png(); $('.bannerContent .bannerRight').png(); }); //Run when images are being loaded $('img').load(function() { $(this).png(); }); */ /********************************************/ // Mega Menu Dropdown /********************************************/ /*if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) { jQuery(".megamenu").megamenu({ 'activate_action':'click' }) } else { jQuery(".megamenu").megamenu(); } */ /********************************************/ // Accordion /********************************************/ //Set the class 'ON' and "OPEN" the first Accordion Trigger $('.accordionButton').first().addClass('on'); $('.accordionContent').first().css("display","block"); $('.accordionButton').click(function() { //Remove the 'ON' once the Trigger is clicked $('.accordionButton').removeClass('on'); //NO MATTER WHAT WE CLOSE ALL OPEN SLIDES $('.accordionContent').slideUp('normal'); //IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT if($(this).next().is(':hidden') == true) { //ADD THE ON CLASS TO THE BUTTON $(this).addClass('on'); //OPEN THE SLIDE $(this).next().slideDown('normal'); } }); /********************************************/ // Equal Heights Colums /********************************************/ equalHeight($(".equalFooter")); //********************************************/ // AJAX - Loading External Pages (Industries Hub Page) /********************************************/ // load Default (USA) Industries when the page loads if($("#selectedcountry").text().split(' ').join('') == "UnitedStates") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"usa.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Autralia") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"autralia.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Austria") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"austria.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Belgium") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"belgium.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Brazil") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"brazil.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Canada") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"canada.html"); } else if($("#selectedcountry").text().split(' ').join('') == "China") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"china.html"); } else if($("#selectedcountry").text().split(' ').join('') == "France") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"france.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Germany") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"germany.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Italy") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"italy.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Japan") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"japan.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Mexico") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"mexico.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Netherlands") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"netherlands.html"); } else if($("#selectedcountry").text().split(' ').join('') == "NewZealand") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"newzealand.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Poland") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"poland.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Portugal") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"portugal.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Russia") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"russia.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Spain") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"spain.html"); } else if($("#selectedcountry").text().split(' ').join('') == "Sweden") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"sweden.html"); } else if($("#selectedcountry").text().split(' ').join('') == "UnitedKingdom") { $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"uk.html"); } $("#usa").click(function(){ // load USA Industries on click $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"usa.html"); }); $("#australia").click(function(){ // load australia Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"australia.html"); }); $("#austria").click(function(){ // load austria Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"austria.html"); }); $("#belgium").click(function(){ // load belgium Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"belgium.html"); }); $("#brazil").click(function(){ // load brazil Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"brazil.html"); }); $("#canada").click(function(){ // load canada Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"canada.html"); }); $("#china").click(function(){ // load china Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"china.html"); }); $("#france").click(function(){ // load france Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"france.html"); }); $("#germany").click(function(){ // load germany Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"germany.html"); }); $("#italy").click(function(){ // load italy Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"italy.html"); }); $("#japan").click(function(){ // load japan Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"japan.html"); }); $("#mexico").click(function(){ // load mexico Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"mexico.html"); }); $("#netherlands").click(function(){ // load netherlands Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"netherlands.html"); }); $("#newzealand").click(function(){ // load new zealand Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"newzealand.html"); }); $("#poland").click(function(){ // load poland Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"poland.html"); }); $("#portugal").click(function(){ // load portugal Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"portugal.html"); }); $("#russia").click(function(){ // load russia Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"russia.html"); }); $("#spain").click(function(){ // load spain Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"spain.html"); }); $("#sweden").click(function(){ // load sweden Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"sweden.html"); }); $("#uk").click(function(){ // load united kingdom Industries form onclick $("#industryWrap").load(strcontent + "/" + wcmlibname + "/npd?srv=cmpnt&source=library&cmpntname="+wcmlibname+"/"+"uk.html"); }); //********************************************/ // COUNTRY SELECTION - Industry Hub Page /********************************************/ $(".dropdown img.flag").addClass("flagvisibility"); $(".dropdown dt a").click(function() { $(".dropdown dd ul").toggle(); }); $(".dropdown dd ul li a").click(function() { var text = $(this).html(); $(".dropdown dt a span").html(text); $(".dropdown dd ul").hide(); $("#result").html("Selected value is: " + getSelectedValue("sample")); }); function getSelectedValue(id) { return $("#" + id).find("dt a span.value").html(); } $(document).bind('click', function(e) { var $clicked = $(e.target); if (! $clicked.parents().hasClass("dropdown")) $(".dropdown dd ul").hide(); }); $("#flagSwitcher").click(function() { $(".dropdown img.flag").toggleClass("flagvisibility"); }); /********************************************/ // Font Replacement /********************************************/ /*Cufon.replace('.cufon', { fontFamily: 'Helvetica Neue' });*/ }); // End Document Ready Calls ///////////////////////////////////////////// //Force FIX for IE7/IE8 Animated PNGs ///////////////////////////////////////////// /* jQuery( document ).ready(function( $ ) { $('.featured').png({ shimImage: '/wps/wcm/connect/ad5593004589d749a67cbfea9abab3fc/blank.gif?MOD=AJPERES', force: true, children: true }); }); */ /********************************************/ // Tabs /********************************************/ /*jQuery( document ).ready(function( $ ) { // setup ul.tabs to work as tabs for each div directly under div.panes $("ul.tabs").tabs("div.panes > div"); }); */ ///////////////////////////////////////////// //Press Releases JavaScript ///////////////////////////////////////////// function displaySelectedIndustry(category) { if (category == "CAT-All"){ $(".PR-Industry").show(); } else { $(".PR-Industry").hide(); var preFix =".-" + category; var postFix = "." + category + "-"; $(preFix).show(); $(postFix).show(); } } ///////////////////////////////////////////// //Equal Heights with JavaScript ///////////////////////////////////////////// function equalHeight(group) { tallest = 0; group.each(function() { thisHeight = jQuery(this).height(); if(thisHeight > tallest) { tallest = thisHeight; } }); group.height(tallest); } ///////////////////////////////////////////// //Mega Menu ///////////////////////////////////////////// /* jQuery MegaMenu Plugin Author: GeekTantra Author URI: http://www.geektantra.com */ var isIE6 = navigator.userAgent.toLowerCase().indexOf('msie 6') != -1; jQuery.fn.megamenu = function(options) { options = jQuery.extend({ activate_action: "mouseenter", deactivate_action: "mouseleave", show_method: "slideDown", hide_method: "slideUp", justify: "left", enable_js_shadow: true, //shadow_size: 0, mm_timeout: 250 }, options); var $megamenu_object = this; if( options.activate_action == "click" ) options.mm_timeout = 0; $megamenu_object.children("li").each(function(){ jQuery(this).addClass("mm-item"); jQuery(".mm-item").css({ 'float': options.justify }); jQuery(this).find("div:first").addClass("mm-item-content"); jQuery(this).find("a:first").addClass("mm-item-link"); var $mm_item_content = jQuery(this).find(".mm-item-content"); var $mm_item_link = jQuery(this).find(".mm-item-link"); $mm_item_content.hide(); jQuery(document).bind("click", function(){ jQuery(".mm-item-content").hide(); jQuery(".mm-item-link").removeClass("mm-item-link-hover"); jQuery(".mm-item-link").removeClass("mm-item-link-nochild-hover"); }); jQuery(this).bind("click", function(e){ e.stopPropagation(); }); //iPad Fix jQuery(this).find("a.mm-item-link").bind("click", function(e){ if (jQuery(this).parent().find("div.mm-item-content").is(":visible")) { //Follow the link } else { e.preventDefault(); } }); $mm_item_content.wrapInner('
    '); if(options.enable_js_shadow == true) { $mm_item_content.append('
     
    '); } var $mm_timer = 0; // Activation Method Starts jQuery(this).bind(options.activate_action, function(e){ e.stopPropagation(); var mm_item_link_obj = jQuery(this).find("a.mm-item-link"); var mm_item_content_obj = jQuery(this).find("div.mm-item-content"); clearTimeout($mm_timer); $mm_timer = setTimeout(function(){ //Emulate HoverIntent if(mm_item_content_obj.attr('id') == "nochild-dropdown") { mm_item_link_obj.addClass("mm-item-link-nochild-hover"); } else { mm_item_link_obj.addClass("mm-item-link-hover"); } mm_item_content_obj.css({ 'top': ($mm_item_link.offset().top + $mm_item_link.outerHeight()) - 1 +"px", 'left': ($mm_item_link.offset().left) - 0 + 'px' }) if(options.justify == "left"){ var mm_object_right_end = $megamenu_object.offset().left + $megamenu_object.outerWidth(); // Coordinates of the right end of the megamenu object var mm_content_right_end = $mm_item_link.offset().left + $mm_item_content.outerWidth() - 2 ; // Coordinates of the right end of the megamenu content if( mm_content_right_end >= mm_object_right_end ) { // Menu content exceeding the outer box mm_item_content_obj.css({ 'left': ($mm_item_link.offset().left - (mm_content_right_end - mm_object_right_end)) - 65 + 'px' }); // Limit megamenu inside the outer box } } else if( options.justify == "right" ) { var mm_object_left_end = $megamenu_object.offset().left; // Coordinates of the left end of the megamenu object var mm_content_left_end = $mm_item_link.offset().left - mm_item_content_obj.outerWidth() + $mm_item_link.outerWidth() + 5; // Coordinates of the left end of the megamenu content if( mm_content_left_end <= mm_object_left_end ) { // Menu content exceeding the outer box mm_item_content_obj.css({ 'left': mm_object_left_end + 0 + 'px' }); // Limit megamenu inside the outer box } else { mm_item_content_obj.css({ 'left': mm_content_left_end + 'px' }); // Limit megamenu inside the outer box } } if(options.enable_js_shadow == true) { mm_item_content_obj.find(".mm-js-shadow").height( mm_item_content_obj.height() ); mm_item_content_obj.find(".mm-js-shadow").width( mm_item_content_obj.width() ); /*mm_item_content_obj.find(".mm-js-shadow").css({ 'top': (options.shadow_size) + (isIE6 ? 2 : 0) + "px", 'left': (options.shadow_size) + (isIE6 ? 2 : 0) + "px" //'opacity': 0.2 });*/ } switch(options.show_method) { case "simple": mm_item_content_obj.show(); break; case "slideDown": mm_item_content_obj.height("auto"); mm_item_content_obj.slideDown('fast'); break; case "fadeIn": mm_item_content_obj.fadeTo('fast', 1); break; default: mm_item_content_obj.each( options.show_method ); break; } }, options.mm_timeout); }); // Activation Method Ends // Deactivation Method Starts jQuery(this).bind(options.deactivate_action, function(e){ e.stopPropagation(); clearTimeout($mm_timer); var mm_item_link_obj = jQuery(this).find("a.mm-item-link"); var mm_item_content_obj = jQuery(this).find("div.mm-item-content"); // mm_item_content_obj.stop(); switch(options.hide_method) { case "simple": mm_item_content_obj.hide(); mm_item_link_obj.removeClass("mm-item-link-hover"); break; case "slideUp": mm_item_content_obj.slideUp( 'fast', function() { if(mm_item_content_obj.attr('id') == "nochild-dropdown") { mm_item_link_obj.removeClass("mm-item-link-nochild-hover"); } else { mm_item_link_obj.removeClass("mm-item-link-hover"); } }); break; case "fadeOut": mm_item_content_obj.fadeOut( 'fast', function() { mm_item_link_obj.removeClass("mm-item-link-hover"); }); break; default: mm_item_content_obj.each( options.hide_method ); mm_item_link_obj.removeClass("mm-item-link-hover"); break; } }); // Deactivation Method Ends }); this.find("li:last").after('
  • '); this.show(); }; /***********************************************/ /** * hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+ * * * @param f onMouseOver function || An object with configuration options * @param g onMouseOut function || Nothing (use configuration options object) * @author Brian Cherne */ (function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))