jQuery(function (){P7_initPM(1,0,1,-20,10)})

// Custom fonts
Cufon.replace('.calls_us p');
//Cufon.replace('#menu > ul > li > a', {hover:'true'});
Cufon.replace('#nav_787249>li>a', {hover:'true'});
Cufon.replace('.box1 h1, .box2 h1',{hover:'true'})
//p7 auto trigger class

//jQuery (function (){
//jQuery ("#p7PMnav li:has('ul')").find('a:first').addClass("p7PMtrg"); 
//jQuery ("#p7PMnav li:has('ul')").find('li:first').addClass("first"); 
//jQuery("#p7PMnav ul li a").each(function() {  var html = jQuery(this).text(); jQuery(this).html("<span>" + html + "</span>"); } );
//});

//jQuery (function (){		  
//jQuery("#p7PMnav li a").each(function() {  								  
//		var html = jQuery(this).text(); 
//	    var mainID = jQuery(this).parent().parent();
//		if (mainID.attr("id")== "p7PMnav") {
//		jQuery(this).html("<span><span>" + html + "</span></span>");
//		}
//	} );
// });
jQuery(document).ready(function(){
	
  // jQuery("#ShippingOptions").html($("#ShippingOptions option").sort(function (a, b) {
   
  // return a.value == b.value ? 0 : a.value < b.value ? -1 : 1
   
   //}))
    
  function sortDropDownListByText(selectId) {
    foption = $('#'+ selectId + ' option:first');
    soptions = $('#'+ selectId + ' option:not(:first)').sort(function(a, b) {
       return a.value == b.value ? 0 : a.value < b.value ? -1 : 1
    });
    $('#' + selectId).html(soptions).prepend(foption);              

};

sortDropDownListByText('ShippingOptions');
   
   var i = jQuery("#ShippingOptions option:last").text();
   i = i.replace("$0.00","");
   jQuery("#ShippingOptions option:last").text(i);
   
   var breadcrumb = jQuery(".first_bread").text();
   var x = breadcrumb.length;
   if(x > 60){
       jQuery(".youarehere").css("font-size","12px");	   
   }
   jQuery(".youarehere").removeClass("hide");


   jQuery(".awardplaq").each(function(){
   var m = jQuery(this).children("#checkIfDate").text();
      var s = jQuery(this).find("img").attr("src");
   jQuery(this).children("a").attr("href",s);
   if(m == 'year'){
	 jQuery(this).addClass("imgbornone"); 
	 var a =  jQuery(this).children("a").html();
	 jQuery(a).insertAfter(jQuery(this).children("#checkIfDate"));
	 jQuery(this).children("a").remove();
	}

	})
   
   
})

