var searchFocus = function (elem, val) { if (document.getElementById(elem).value == val || document.getElementById(elem).value.length == 0) document.getElementById(elem).value = ""; }; var searchBlur = function (elem, val) { if (document.getElementById(elem).value.length == 0) document.getElementById(elem).value = val; }; var searchSubmit = function(val, default_val, form) { if (val.length !== 0 && val !== default_val) { document.forms[form].submit(); return true; } else return false; }; function ClearText(Elem,DefaultText) { if(Elem) { if(typeof(Elem.value) != 'undefined') { if (Elem.value == DefaultText) { Elem.value = ''; } } else if(typeof(Elem.innerHTML) != 'undefined') { if (Elem.value == DefaultText) { Elem.innerHTML = ''; } } } } function DefaultText(Elem,DefaultText) { if(Elem) { if(typeof(Elem.value) != 'undefined') { if (Elem.value == '') { Elem.value = DefaultText; } } else if(typeof(Elem.innerHTML) != 'undefined') { if (Elem.innerHTML == '') { Elem.innerHTML = DefaultText; } } } } // Code for the jQuery slideshow initialization var theInt = null; var $navthumb, $highlightthumb; var curclicked = 0; theInterval = function(cur){ clearInterval(theInt); if( typeof cur != 'undefined' ) curclicked = cur; $highlightthumb.removeClass("active-thumb"); $highlightthumb.eq(curclicked).addClass("active-thumb"); jQuery(".stripNav ul li a").eq(curclicked).trigger('click'); theInt = setInterval(function(){ $highlightthumb.removeClass("active-thumb"); $highlightthumb.eq(curclicked).addClass("active-thumb"); jQuery(".stripNav ul li a").eq(curclicked).trigger('click'); curclicked++; if( $highlightthumb.length == curclicked ) curclicked = 0; }, 4000); }; $(function(){ jQuery("#main-photo-slider").codaSlider(); $navthumb = jQuery(".nav-thumb"); $highlightthumb = jQuery("#SlideShowNav li a"); $navthumb .click(function() { var $this = jQuery(this); theInterval($this.parent().attr('href').slice(1) - 1); return false; }); // display all hidden slides jQuery("#SON #Slideshow .panel").addClass( 'Show' ); // display all hidden How To slides (if they exist) jQuery("#SON #Top10 .glidecontent").addClass( 'Show' ); theInterval(); }); //Navigation $(".ULLevel2").css('display', 'none'); $(".ULLevel3").css('display', 'none'); $(".LILevel1").hover( function() { $(".ULLevel2").not($(this).children(":nth-child(2)")).stop(true, true).slideUp(); $(this).children(":nth-child(2)").stop(true,true).slideDown(); } , function() { $(".ULLevel3").children(":nth-child(2)").stop(true, true).slideUp('fast'); $(this).children(":nth-child(2)").stop(true,true).delay(800).slideUp(); } ); $(".LILevel2").hover( function() { $(".ULLevel3").not($(this).children(":nth-child(2)")).stop(true, true).slideUp('fast'); $(this).children(":nth-child(2)").stop(true,true).slideDown('fast'); } , function() { $(this).children(":nth-child(2)").stop(true,true).delay(800).slideUp('fast'); } ); // Fix z-index issues in ie7 if($.browser.msie) { userAgent = $.browser.version; version = userAgent.substring(0,userAgent.indexOf('.')); if(version==6 || version==7) { $(function() { var zIndexNumber = 10000; $('*').each(function() { $(this).css('zIndex', zIndexNumber); zIndexNumber -= 1; $("#SON #TwitterFeed").css('zIndex', 10000); }); }); } }