function print_recipe(frameName){
	window.frames[frameName].print();
}



makeTabs = function(containerId) {
/*  	$('#tabID UL LI TABLE TR:eq(0) TD').css({height:'36px'});
	$('#tabID UL LI TABLE TR:eq(1) TD').css({height:'36px'});
	$('#tabID UL LI TABLE TR:eq(2) TD').css({height:'30px'});*/
	
	var container = $(containerId);
	var current = 0;
	var effectDuration = 400;

	$('UL LI:gt(0)',container).hide();

	tabControl = "<ol class='tabcontrol'>";
	isFirst=1;
	$('h2',container).each(function(){
		if(isFirst)
		{
			li = '<li class="selected">';
			isFirst = 0;
		}
		else
		{
			li = '<li>';
		}
		tabControl += li+ "<a href='#'>"+$(this).html()+"</a></li>";
	});
	tabControl += "</ol>";
	
	$("h1").after(tabControl);
	$('h2',container).remove();

	if($('.our_company').length > 0 )
	{
		/*$('UL',container).css({height:"600px",width:"800px"});*/
		$('UL',container).css({minHeight:"300px",width:"800px"});
		$('OL.tabcontrol',container).css({width:"800px"});
		$('UL LI',container).css({width:"800px"});
	}
	else{
		//$('UL',container).css({height:"460px",width:"400px"});
		$('UL',container).css({width:"400px"});
    $('TABLE:eq(0) TR:odd').css({backgroundColor:'#f5f5f5'});
		$('TABLE:eq(0) TR TD P').css({padding:'0',margin:'0',fontSize:'11px',lineHeight:'12px'});
	}
	
	$('OL.tabcontrol li',container).each(function() 
	{      
			$(this)
			.click(function(event) 
			{
				event.preventDefault();
				var newIndex = $('li',container).index(this);

				if(newIndex == current) return;
				
				$('OL LI:eq('+current+')').removeClass('selected');
				$('OL LI:eq('+newIndex+')').addClass('selected');
				
				$('UL LI:eq('+current+')', container).animate({ height: 'hide', opacity: 'hide'}, effectDuration, 
					function(){
						$('UL LI:eq('+newIndex+')',container).animate({ height:'show',opacity:'show'}, effectDuration);					
					});
				current = newIndex;
			})
	});
}; // end make tabs

	

$(document).ready(function(){  

	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	
  // ** Main Tabs Mouseovers **/
	var navDuration = 150; //time in miliseconds
	var navJumpHeight = "3px";

  $('#mainmenu li').hover(function() {
			$(this).animate({ top : "-="+navJumpHeight }, navDuration);            
	}, function() {
			$(this).animate({ top : navJumpHeight }, navDuration);
	});


  // ** makeTabs Make <UL><LI> into tabs. Tab Text is <UL><LI><H2>  **/
	if($('#tabID').length > 0 )
	{
    new makeTabs('#tabID');
	}


  // ** Pretify where_to_buy table **/
	if($('.where_to_buy').length > 0 )
	{
		 $('TABLE').css({margin:'20px',width:'670px',border:'1px solid #999999',padding:'2px'});
		 $('TABLE TD').css({padding:'5px'});
		 $('TABLE:first TR:odd').css({width:'700px',backgroundColor:'#f5f5f5'});
     $('TABLE:gt(0)').css({width:'484px'});
 		 $('TABLE:gt(0) TR:odd').css({backgroundColor:'#f5f5f5'});
  }


  // ** on our_range make toottip bubbles. Use <a title attribute> **/
	if($('.our_range').length > 0 )
	{
		$('.w100 TABLE A').tooltip({
			track: true, 
			delay: 0, 
			showURL: false, 
			opacity: 1, 
			fixPNG: true, 
			showBody: " : ", 
			extraClass: "pretty", 
			top: -15, 
			left: 5 
		});
	}


  // ** if div id mymap change the div inner content to  iframe **/
	if($('#mymap').length > 0 )
	{
		$('#mymap').html( '<iframe name="myiframe" width="535" height="300" src="pop-up-map.php" frameBorder="0" scrolling="no">' );
	}
	

  // ** if div id movie change the div inner content to object **/
	if($('#movie').length > 0 )
	{
    	$('#movie').html('<object width="340" height="275"><param name="movie" value="http://www.youtube.com/v/dCO6dFkX4VI&hl=en&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/dCO6dFkX4VI&hl=en&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="340" height="275"></embed></object>' );
	}



  // ** Pretify newsletter page **/
	if($('.newsletter').length > 0 )
	{
    	$('#f').css({width:'275px',marginTop:'0',marginLeft:'0',paddingLeft:'0',position:'relative',left:'360px',top:'-170px',marginBottom:'-200px'});
			$('#f input').css({marginTop:'-32px'});

			if(version >= 5.5 && version < 7 ) 
		  {
				$('#f').css({left:'250px'});
		  }
			$("#submitbutton").val("SIGN UP!");
			$("#submitbutton").css({marginTop:'0',marginLeft:'175px',backgroundColor:'#01257B'});
  		$('#req_email').css({width:'238px',marginLeft:'60px',paddingTop:'2px'});
			$('#req_name').css({width:'238px',marginLeft:'60px',paddingTop:'2px'});
			$('.w60').css({paddingTop:'10px'});
  		$('.w60:gt(0)').css({padding:'0px',height:'40px'});
	}



  // ** Png fix for IE 6 */
	if (version >= 5.5 && version < 7 ) 
	{
		for(var i=0; i<document.images.length; i++)
		{
			var img = document.images[i];
			var imgName = img.src.toUpperCase();
			if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
			{
				var imgID = (img.id) ? "id='" + img.id + "' " : ""
				var imgClass = (img.className) ? "class='" + img.className + "' " : ""
				var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
				var imgStyle = "display:inline-block;" + img.style.cssText 
				if (img.align == "left") imgStyle = "float:left;" + imgStyle
				if (img.align == "right") imgStyle = "float:right;" + imgStyle
				if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
				
				var strNewHTML = "<span " + imgID + imgClass + imgTitle
				+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
				+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
				
				img.outerHTML = strNewHTML;
				i--;
			}
		}
	}
});