var blank = new Image();
blank.src = '/images/none.gif';
function fixPng(png) {
    var src = png.src;
    if (!png.style.width) { png.style.width = $(png).width(); }
    if (!png.style.height) { png.style.height = $(png).height(); }
    png.src = blank.src;
    png.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')";
}
$(document).ready(function() {
	var badBrowser = (/MSIE ((5\.5)|6)/.test(navigator.userAgent) && navigator.platform == "Win32");
	if (badBrowser) {
		$('img[src$=.png]').each(function() { fixPng(this); });
		jQuery(this).find("input[src$=.png]").each(function() { jQuery(this).get(0).runtimeStyle.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader' + '(src=\'' + blank.src + '\', sizingMethod=\'scale\');'; jQuery(this).attr('src', settings.blankgif) });
		//$('body').append('<style>fieldset div.fquote-box {float: left; background: url(/images/fquote-box-bg.png) bottom left repeat-y; width: 630px; margin: -4px 0px -4px 18px; padding: 0px 0px 0px 0px;} #fquoteend {padding: 0px 0px 0px 0px; position: relative;}#NewPetDiv table tr td.c2 table {float: right; padding: 0px 0px 0px 0px; margin: 0px 11px 0px 0px;}</style>');
		$('.petquotebox').css("z-index", "-1");
		//} else if ($.browser.msie) {
		/*if (/MSIE ((5\.5)|6|7)/.test(navigator.userAgent) && navigator.platform == "Win32") {
		$('body').append('<style>#BPF {margin-left: 25px;} #totalpremiums p{margin-top: -5px; margin-left: -100px;}</style>');
		}else{
		$('body').append('<style>#BPF {margin-left: 25px;} #totalpremiums p{margin-top: -20px; margin-left: -100px;}</style>');
		}*/
	}
	/*if (($.browser.msie && $.browser.version.indexOf('9.') == 0)) {
	$('body').append('<style>#NewPetDiv table tr td.c2 {padding: 5px 0px 0px 0px; margin: 0px 0px 0px 35px;} #NewPetDiv table tr td.c2 table {float: right; padding: 0px 0px 0px 0px; margin: 0px 21px 0px 0px;} #NewPetDiv table tr td.c2 table tr td {padding: 0px 3px 0px 0px; margin: 0px 0px 0px 0px;}</style>');
	}*/
	if ($.browser.msie && document.location.href.indexOf("blog") > 0) {
		$('body').append('<style>.top-bar{position: absolute; top: 0px; left: 0px; width: 100%; display: block;} .wrapper{position: relative; top: 20px;}</style>');
	}
	if ($.browser.webkit) {
		$('body').append('<style>.rightwidgets{padding:0px 0px 0px 0px;} .header span {margin-left:930px;}</style>');
		//$('body').append('<style>#BPF {padding-left: 35px;} #BPF tr td.c2 table {margin-left: 5px;} #BPF tr td{padding: 13px 0px 0px 0px;} #BPF tr td.c2{padding: 18px 0px 0px 20px;} .fquote-box #Phone1, .fquote-box #OtherPhone1 {margin:0 0 0 92px;} #NewPetDiv {width: 485px;} #validationMsg.error {padding-top: 0px; margin-top: 0px;}</style>');
	}
	
	if ($.browser.mozilla) {
		$('body').append('<style>.stp2{position: relative; top: -20px;}</style>');
	}

	if ($.browser.mozilla && navigator.appVersion.indexOf("Mac") > -1) {
	$('body').append('<style>.btntxt.stp2{margin-top: 0px;}</style>');
	}
});
