// tnav hover
$(document).ready(function () {   
    $('#newdesign_tnav li').hover(  
        function () {  
           $('ul', this).show();  
       },   
       function () {  
            $('ul', this).hide();           
        }  
    );   
 });  
// sign up drop down
$(document).ready(function(){
	$('#sign-upDiv').hide().load('/global/topnav/signup.html', function(){	
		$('#signupbtn').click(function() {
 			$('#sign-upDiv').slideToggle("slow");
        });
        $('#hide-btn').click(function() {
 			$('#sign-upDiv').slideUp("slow");
	    });
	});
     
});

//png fix for ie6
 var blank = new Image();
 blank.src = '/images/blank.gif';
 
 $(document).ready(function() {
   var badBrowser = (/MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
   if (badBrowser) {
     // get all pngs on page
     $('img[src$=.png]').each(function() {
       if (!this.complete) {
         this.onload = function() { fixPng(this) };
       } else {
         fixPng(this);
       }
     });
   }
 });
 
 function fixPng(png) {
   // get src
   var src = png.src;
   // set width and height
   if (!png.style.width) { png.style.width = $(png).width(); }
   if (!png.style.height) { png.style.height = $(png).height(); }
   // replace by blank image
   png.onload = function() { };
   png.src = blank.src;
   // set filter (display original image)
   png.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
 }
//hover fix for ie6
$(document).ready(function () {   
      $('li#tnsnow').hover(function() {
        $(this).addClass('hover-snow');
      }, function() {
        $(this).removeClass('hover-snow');
      });
    $('li#tnrun').hover(function() {
        $(this).addClass('hover-run');
      }, function() {
        $(this).removeClass('hover-run');
      });
      $('li#tnshoes').hover(function() {
        $(this).addClass('hover-shoes');
      }, function() {
        $(this).removeClass('hover-shoes');
      });
    $('li#tntri').hover(function() {
        $(this).addClass('hover-tri');
      }, function() {
        $(this).removeClass('hover-tri');
      });
    $('li#tnbike').hover(function() {
        $(this).addClass('hover-bike');
      }, function() {
        $(this).removeClass('hover-bike');
      });
   $('li#tnhike').hover(function() {
        $(this).addClass('hover-camp');
      }, function() {
        $(this).removeClass('hover-camp');
      });
   $('li#tnswim').hover(function() {
        $(this).addClass('hover-swim');
      }, function() {
        $(this).removeClass('hover-swim');
      });
  $('li#tnkids').hover(function() {
        $(this).addClass('hover-kids');
      }, function() {
        $(this).removeClass('hover-kids');
      });
  $('li#tnteam').hover(function() {
        $(this).addClass('hover-team');
      }, function() {
        $(this).removeClass('hover-team');
      });
  $('li#tnsale').hover(function() {
        $(this).addClass('hover-sale');
      }, function() {
        $(this).removeClass('hover-sale');
      });
  $('li#tnbuzz').hover(function() {
        $(this).addClass('hover-buzz');
      }, function() {
        $(this).removeClass('hover-buzz');
      });        
});

// preload jquery plugin
$(document).ready(function(){
  $.preloadCssImages();
}); 


