 
 
 $(document).ready(function() {
 
        $("div#products div.outerProductCurrent a.passive").hide();
        $("div#products div.outerProductCurrent a.active").show();
    $("div#products div").hover(
      function () {
	 // 	
	  	//alert(typoof jQuery.browser.version);
	  	if (jQuery.browser.version != "6.0") {
			
			$("div#products div a.active").css("display", "none");
			$("div#products div a.passive").css("display", "block");
			$("div#products div.outerProductCurrent a.passive").hide();
			$("div#products div.outerProductCurrent a.active").show();
			
			$(this).find("a.active").css("display", "block");
			$(this).find("a.passive").css("display", "none");
		}
      }, 
      function () {
         
      }
    );


 });
function complete(pnum, pname){
//	obj.setAttribute("class", " ");
	
	
          //  datOld = $(this).attr('src');
          //  datNew = datOld.split('-active.png');
          //  datNew = datNew[0]+'.png';
           //  $(this).attr('src', datNew);
		   
    $("div#products div").eq(pnum).addClass("outerProductCurrent");
	//alert($("div#products div a.active").attr("href"));
    $("div#products div a.active").css("display", "none");
    $("div#products div a.passive").css("display", "block");
	$("div#products div a.active").eq(pnum).css("display", "block");
	$("div#products div a.passive").eq(pnum).css("display", "none");
	
	/*if($("div#products div a.active").eq(pnum).css("display")=="none"){
		$("div#products div a.passive").eq(pnum).css("display", "none");
		
	}else{
        $("div#products div a.active").eq(pnum).css("display", "none");
        $("div#products div a.passive").eq(pnum).css("display", "block");
	}*/
	/*if(){
		$("div#products div a").eq(pnum).addClass("active")
	}else{
		
	}*/

	//$("div#products div a img").eq(pnum).attr("src", imgSrc.replace(/\.png/g, "-active.png"))
  
    //alert( $("div#products div a img").eq(pnum).attr("src"));

	$("span#productCrumb").html(' >'+pname);
	$("span#productCrumb").fadeIn();
	

	//alert(obj);
$("div#products a").click(
      function () {
         $(this).blur();
      }
    );

}

function updatePeak(pnum){
	
	pnum = fPeakProd;
	console.log(pnum);
	
	
	
jQuery.ajax({
	   type:'POST',
	   dataType:'html',
	   success:function(data, textStatus){
	   	       jQuery('#product_peak').html(data);
			   },
	   complete:function(XMLHttpRequest, textStatus){
	   	       $('div#product_peak').fadeIn('slow'); 
			  },
	   url:'/product_peak/'+pnum}
	   ); 
}
 function checkBrowserName(name){  
    var agent = navigator.userAgent.toLowerCase();  
    if (agent.indexOf(name.toLowerCase())>-1) {  
      return true;  
    }  
    return false;  
 }  
     if (checkBrowserName('msie 6')) {
       // DD_belatedPNG.fix('img', 'div');
    }

