// JavaScript Document
function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',o='opera',h=document.getElementsByTagName('html')[0],b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);

//liability, medical, personal, workplace
function mailpage(){
mail_str = "mailto:?subject=LEWM";
mail_str += "&body=I saw this and thought you might be interested " + location.href;

location.href = mail_str;
}

function addIEFavorite(n)
{
bookmarkurl = window.location;
bookmarktitle="Lowe Eklund Wakefield & Mulvihill Co., LPA";
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
else if ( window.sidebar ) {
window.sidebar.addPanel(bookmarktitle, bookmarkurl,"");
}
}


$(document).ready(function(){
					   
	var skinPath = "/Portals/11/Skins/LEWM_Skins/";
	var imagePath = "/Portals/11/images/";
	$(".DynamicForms_QuestionTableCell br").remove();	
	
	//contact
	$('#HouseMenuNavItemHome').css('list-style-type','none');
	$('#search input').attr('value','Search our site');
	$('#search input').focus(function(){
		$(this).attr('value', '');
	});
	$('#cta').hover(
		function(){
			$(this).attr('src',skinPath+'images/cta-o.gif');	
		},
		function(){
			$(this).attr('src',skinPath+'images/cta.gif');	
		}
	);
	//top thing home page	
	$('#blogImg img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-home-feat-blog-o.gif');	
		},
		function(){
			$(this).attr('src',skinPath+'images/n-home-feat-blog.gif');	
		}
	);
	$('#liability img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-prac-prod-o.gif');
			$('#illustration').attr('src',skinPath+'images/liabilityHome.jpg');
		},
		function(){
			$(this).attr('src',skinPath+'images/n-prac-prod.gif');
			$('#illustration').attr('src',skinPath+'images/i-home.jpg');
		}
	);
	$('#medical img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-prac-medi-o.gif');
			$('#illustration').attr('src',skinPath+'images/malpracticeHome.jpg');
		},
		function(){
			$(this).attr('src',skinPath+'images/n-prac-medi.gif');
			$('#illustration').attr('src',skinPath+'images/i-home.jpg');
		}
	);
	
	$('#personal img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-prac-pers-o.gif');
			$('#illustration').attr('src',skinPath+'images/injuryHome.jpg');
		},
		function(){
			$(this).attr('src',skinPath+'images/n-prac-pers.gif');
			$('#illustration').attr('src',skinPath+'images/i-home.jpg');
		}
	);
	$('#workplace img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-prac-work-o.gif');
			$('#illustration').attr('src',skinPath+'images/workplaceHome.jpg');
		},
		function(){
			$(this).attr('src',skinPath+'images/n-prac-work.gif');
			$('#illustration').attr('src',skinPath+'images/i-home.jpg');
		}
	);
	
	//home side bar
	$('#firm img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-home-feat-firm-o.gif');
		},
		function(){
			$(this).attr('src',imagePath+'n-home-feat-firm.gif');
		}
	);
	$('#news img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-home-feat-find-o.gif');
		},
		function(){
			$(this).attr('src',imagePath+'n-home-feat-find.gif');
		}
	);
	$('#case img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-home-feat-case-o.gif');
		},
		function(){
			$(this).attr('src',imagePath+'n-home-feat-case.gif');
		}
	);
	
	//bottom nav thing
	$('#firm img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-home-feat-firm-o.gif');
		},
		function(){
			$(this).attr('src',skinPath+'images/n-home-feat-firm.gif');
		}
	);
	$('#navFirm img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-feat-firm-o.gif');
		},
		function(){
			$(this).attr('src',skinPath+'images/n-feat-firm.gif');
		}
	);
	$('#navCase img').hover(
		function(){
			$(this).attr('src',skinPath+'images/n-feat-case-o.gif');
		},
		function(){
			$(this).attr('src',skinPath+'images/n-feat-case.gif');
		}
	);
	
});
