/* This gets IE to properly display the hover styles, 
// since IE ignores pseudo-classes such as :hover, :active, and :focus
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
*/

$(document).ready(function() {
        $('#nav li').hover(function(){
               $(this).addClass('sfhover');
        }, function() {
               $(this).removeClass('sfhover');
        });
		$('#nav a','#subNav a').click(function(e){
			var t=$('img', this);
		    var src1= t.attr('src'); // initial src
		    var newSrce = src1.substring(src1.lastIndexOf('/images'), src1.lastIndexOf('.')); // let's get file name without extension
		   	if(/_land/.test(src1))
			{
				var newSrce = src1.replace('_land','');
			} else {
		    $('img', this).attr('src', newSrce+ '_land.' + /[^.]+$/.exec(src1)); //last part is for extension  
			}
		});
		
});
