$(function() {
$(document).pngFix(); 



$(".inputwrapper label").inFieldLabels({fadeOpacity:0.2,fadeDuration:200});
$(".input label").inFieldLabels({fadeOpacity:0.2,fadeDuration:200});
$(".textarea label").inFieldLabels({fadeOpacity:0.2,fadeDuration:200});
//setequalheights


var n = [$("#centercol").height(), $("#leftcol").height(), $("#rightcol").height()];
var currentTallest = 0;


$.each(n, function(index, value) { 
  if (currentTallest < value) { currentTallest = value }
});



$("#leftcol").height(currentTallest);	
$("#rightcol").height(currentTallest);
$("#centercol").height(currentTallest);

$("#outer").height($('window').height());
$("#container").css('min-height',0);
$("#container").height(currentTallest + 75);



//When mouse rolls over
    $(".nav").mouseover(function(){
        $(this).css({'background-position': 'center 0'});
        
    });

    //When mouse is removed
   $(".nav").mouseout(function(){
        $(this).css({'background-position': 'center -30px'});
        
    });


$('#navigation li a').append('<span class="hover"></span>');
$('#navigation .hover').css("filter","alpha(opacity=00)"); // for IE
$('#navigation li a').hover(function() {
	       
// Stuff that happens when you hover on + the stop()
$('.hover', this).stop().animate({
 	'opacity': 1
 	}, 700,'easeOutSine')
	
},function() {
	
 	// Stuff that happens when you unhover + the stop()
 	$('.hover', this).stop().animate({
  		'opacity': 0
 }, 700, 'easeOutQuad')
	
})

var containerpad = $('#footer').height() + 40;
$('#container').css('padding-bottom',containerpad);

	 
	 if (navigator.platform.indexOf("iPad") != -1)
	{
		$('#promo h3').css({'font-family': 'Palatino','font-size': '80px'});
	}	
	



$.preloadCssImages();





if ($.browser.msie && $.browser.version < 9) {

// $('body').css('background-image', 'url("/css/images/bodyback.png")');

  //$("h1").textShadow({x:1,y:1,radius:2,color:'#646464'});
  // $("#header span").textShadow({x:1,y:1,radius:1,color:'#4f5055'});

	$("leftnav ul li a").textShadow({x:0,y:0,radius:2,color:'#151515'});
	$("leftnav h2").textShadow({x:0,y:0,radius:2,color:'#bababa'});

}

if (!$.browser.msie || ($.browser.msie && $.browser.version > 8)) {

$(".featuresinner img").live(
	"mouseover",function()
	{
		$(this).fadeTo(200,1);
	}
);
$(".featuresinner img").live(
	"mouseout",function()
	{
		 $(this).fadeTo(200,.6);
	}
);	

$(".hoverfade img").live(
	"mouseover",function()
	{
		$(this).fadeTo(200,.8);
	}
);
$(".hoverfade img").live(
	"mouseout",function()
	{
		 $(this).fadeTo(200,1);
	}
);	


}

$(".mylink img").hover(
  function () {
    this.src = this.src.replace("_off","_over");
  }, 
  function () {
   this.src = this.src.replace("_over","_off");
  }
);

$(".bghover").hover(
  function () {
    $(this).css("background-image","url(/images/css/navback3_over.png)");

  }, 
  function () {
    $(this).css("background-image","url(/images/css/navback3_off.png)");
  }
);


	
		




$(document).pngFix(); 
});

$(window).bind("load", function() {
	

});
