$(document).ready(function() {


	$(".cow-Content-Section").hide();
	$(".cow-Content-Section:first").show();
	$("#cow-Nav CowN-0").addClass(".cow-Current");
	
	$("#cow-Nav li a").click(function() {
		ms_nav(this.parentNode);
		return false;
	});
	
	
	$("#CowC-0 img").click(function() {
		var path = this.src;
		var largePath = path.replace('.jpg','-large.jpg');
		//$("#ms-image-zoom").html("<img src='"+largePath+"'/>").show();
		var left = (screen.width/2)-(1000/2);
		var top = (screen.height/2)-(577/2);
		var imageWindow = window.open('', 'imageWindow', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=1000,height=577,left = '+left+',top = '+top+'');
		
		imageWindow.document.write('<html><head><title>Harmony Hills Red Angus</title></head><body style="margin: 0;"><img src="'+largePath+'" onclick="window.close();" /></body></html>');
		
	});
	
	
	
});


function ms_nav (liElement) {

	$("#cow-Nav li").removeClass("cow-Current");
	$(".cow-Content-Section").hide();
	$(liElement).addClass("cow-Current");
	var navId = liElement.id;
	var contentId = navId.replace('N','C');
	$(document.getElementById(contentId)).show();
}
