 Cufon.replace('.ms-title, .ms-title-2, .ms-title-3, #tabs .title, .red-link, .bnr_subblock2 h3, .bnr_subblock2 p, h1, .bnr_subblock1 h4, .bnr_subblock1 p', { hover:true, fontFamily: 'Myriad Pro' });

 function showInfoBox(){
  $('.find-magazine-blk').css('display','block');
  $('.find-yellow').addClass('find-yellow-h');
}
$(document).ready(function(){
	$('.rightTopNav li').first().addClass('bg-none');
	$('.hb-nav li').last().addClass('bg-none');
	$('.rightTopNav li').last().addClass('pr0');
	$('.hb-list li').last().addClass('pr0 floatRight');
	$('.footer-right-list li').last().addClass('bg-none');
	$('.footer-right-list li').last().addClass('pr0');
	$('.footer-right-list li').first().addClass('pl0');
	$('.topNav li a').wrap("<span></span>");
	$('.request-quote-cont').hover(function(){
    	$('.request-quote-blk').show();
		},function(){
			$('.request-quote-blk').hide();
		}
	);
	




/*	var $newUL=$('.find-magazine').children('.find-magazine-blk').children('.fm-cont').children('.list-blk').children('.fm-list-3');
	lich = $newUL.children('li').length / 14 -1;
	listItems=$($newUL).last().children('li');
	i=0;
	if (listItems.length > 13){
		$newUL = $('<ul class="fm-list-3 fml-4"></ul>');
        listItems.slice(13).appendTo($newUL);	
		//console.log($($newUL).last());
		$newUL.appendTo($('.list-blk'));
	}					
					
	while( i<lich ){
		i= i+1;
		listItems=$($newUL).last().children('li');
        $newUL = $('<ul class="fm-list-3 fml-4"></ul>');
		if (listItems.length > 14){
        	listItems.slice(14).appendTo($newUL);
			//console.log($($newUL).last());
			$newUL.appendTo($('.list-blk'));
		}
   }*/
						

	//----------------------TABS-------------------------------

	$('.tabsNav li').first().addClass('first-tab');
	$('.tabsNav li').last().addClass('last-tab');

        // magazine dropdown
       // start delayed popup behavior
   $('.find-magazine .find-yellow').hoverIntent(
   function(){
     opentimer = window.setTimeout('showInfoBox()', 500);

   },
   function(){

   });

   $('.find-magazine').parent().hover(
   function(){

   },
   function(){
     $('.find-magazine-blk').hide();
     $('.find-yellow').removeClass('find-yellow-h');
   });
   // end delayed popup behavior
	
});


	 function formrule(field)
{
        if (field.defaultValue == field.value) field.value = "";
}
function formrule2(field) {
  if (field.value == "") {
    field.value = field.defaultValue;
  }
}
