﻿/*
	HealthPartners 2010
	journeywell global js
*/

$(document).ready(function() {

		// ie-roundies
	if ($.browser.msie && $.browser.version <= 8 ) {
		DD_roundies.addRule('.bordered', '8px');
		DD_roundies.addRule('.light-bordered', '8px');
		DD_roundies.addRule('.container-header', '8px 8px 0 0');
		DD_roundies.addRule('.aside-header', '8px 8px 0 0');
		DD_roundies.addRule('.aside-body', '0 0 8px 8px');
		DD_roundies.addRule('#footer-navigation', '8px');
		DD_roundies.addRule('#logon-container', '8px');
		DD_roundies.addRule('#more-resources', '8px');
		DD_roundies.addRule('.promo', '8px');
		DD_roundies.addRule('#enrollment-tools', '8px');
		DD_roundies.addRule('ul#navigation', '0 0 8px 8px');
		DD_roundies.addRule('ul#navigation a#home', '0 0 0 8px');
		DD_roundies.addRule('ul#navigation a#news-events', '0 0 8px 0');
	}
		// ie-roundies
	if ($.browser.msie && $.browser.version >= 7 && $.browser.version <= 8 ) {
		DD_roundies.addRule('.container-body', '0 0 8px 8px');
	}	

		// Move the h1 title down when an #banner is present on the page
	if ($("#banner").length > 0 && $("#banner.transactions").length == 0) {
		$("h1").addClass("banner-title");
	}
	
		// Move the h1 title down when an #banner.transactions is present on the page
	if ($("#banner").length > 0 && $("#banner.transactions").length > 0) {
		$("h1").addClass("transactions-banner-title");
	}
	
		// Promo hover
	$(".promo.hover").hover(function() {
		$(this).stop().animate({backgroundColor: "#f2f2f2"}, 200);
	}, function() {
		$(this).stop().animate({backgroundColor: "#fff"}, 200);
	});
	
		// Container Hover
	$(".container.hover").hover(function() {
    	$(this).stop().animate({backgroundColor: "#f2f2f2"}, 200);
	}, function() {
		$(this).stop().animate({backgroundColor: "#fff"}, 200);
	});
	
		// Primary Button Color Hover
	$(".button").hover(function() {
		$(this).stop().animate({backgroundColor: "#044758"}, 100);
	}, function() {
		$(this).stop().animate({backgroundColor: "#006078"}, 100);
	});

		// Secondary Button Color Hover
	$(".button.secondary").hover(function() {
    	$(this).stop().animate({backgroundColor: "#90b57e"}, 100);
	}, function() {
		$(this).stop().animate({backgroundColor: "#b7dba5"}, 100);
	});

		// Clear Button Color Hover
	$(".button.clear").hover(function() {
    	$(this).stop().animate({backgroundColor: "#b3b3b3"}, 100);
	}, function() {
		$(this).stop().animate({backgroundColor: "#999"}, 100);
	});
	
		// Table Data Hover
	$("table.data.hover tbody tr").hover(function() {
    	$(this).stop().animate({backgroundColor: "#eee"}, 200);
	}, function() {
		$(this).stop().animate({backgroundColor: "#fff"}, 300);
	});
	
		// Gecko 1.9.0 or less font-face override
	$.each($.browser, function(i, val) {
   		if(i=="mozilla" && $.browser.version.substr(0,5)<="1.9.0") {
	  		$("#home-banner h2").css({'font-size' : '19px'});
	  	}
 	});

});