if($.browser.mozilla||$.browser.opera ){document.removeEventListener("DOMContentLoaded",$.ready,false);document.addEventListener("DOMContentLoaded",function(){$.ready()},false)}
jQuery.event.remove( window, "load", jQuery.ready );
jQuery.event.add( window, "load", function(){ jQuery.ready(); } );
jQuery.extend({
	includeStates:{},
	include:function(url,callback,dependency){
		if ( typeof callback!='function'&&!dependency){
			dependency = callback;
			callback = null;
		}
		url = url.replace('\n', '');
		jQuery.includeStates[url] = false;
		var script = document.createElement('script');
		script.type = 'text/javascript';
		script.onload = function () {
			jQuery.includeStates[url] = true;
			if ( callback )
				callback.call(script);
		};
		script.onreadystatechange = function () {
			if ( this.readyState != "complete" && this.readyState != "loaded" ) return;
			jQuery.includeStates[url] = true;
			if ( callback )
				callback.call(script);
		};
		script.src = url;
		if ( dependency ) {
			if ( dependency.constructor != Array )
				dependency = [dependency];
			setTimeout(function(){
				var valid = true;
				$.each(dependency, function(k, v){
					if (! v() ) {
						valid = false;
						return false;
					}
				})
				if ( valid )
					document.getElementsByTagName('head')[0].appendChild(script);
				else
					setTimeout(arguments.callee, 10);
			}, 10);
		}
		else
			document.getElementsByTagName('head')[0].appendChild(script);
		return function(){
			return jQuery.includeStates[url];
		}
	},
	readyOld: jQuery.ready,
	ready: function () {
		if (jQuery.isReady) return;
		imReady = true;
		$.each(jQuery.includeStates, function(url, state) {
			if (! state)
				return imReady = false;
		});
		if (imReady) {
			jQuery.readyOld.apply(jQuery, arguments);
		} else {
			setTimeout(arguments.callee, 10);
		}
	}
});
///// include js files ////////////

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});

/*
 *
 * TERMS OF USE - EASING EQUATIONS
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2001 Robert Penner
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
 */
//** Smooth Navigational Menu- By Dynamic Drive DHTML code library: http://www.dynamicdrive.com
//** Script Download/ instructions page: http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/
//** Menu created: Nov 12, 2008

//** Dec 12th, 08" (v1.01): Fixed Shadow issue when multiple LIs within the same UL (level) contain sub menus: http://www.dynamicdrive.com/forums/showthread.php?t=39177&highlight=smooth

//** Feb 11th, 09" (v1.02): The currently active main menu item (LI A) now gets a CSS class of ".selected", including sub menu items.

//** May 1st, 09" (v1.3):
//** 1) Now supports vertical (side bar) menu mode- set "orientation" to 'v'
//** 2) In IE6, shadows are now always disabled

//** July 27th, 09" (v1.31): Fixed bug so shadows can be disabled if desired.
//** Feb 2nd, 10" (v1.4): Adds ability to specify delay before sub menus appear and disappear, respectively. See showhidedelay variable below

var ddsmoothmenu={

//Specify full URL to down and right arrow images (23 is padding-right added to top level LIs with drop downs):
arrowimages: {down:['downarrowclass', 'images/down.gif', ], right:['rightarrowclass', 'images/right.gif']},
transition: {overtime:300, outtime:300}, //duration of slide in/ out animation, in milliseconds
shadow: {enable:true, offsetx:5, offsety:5}, //enable shadow?
showhidedelay: {showdelay: 100, hidedelay: 200}, //set delay in milliseconds before sub menus appear and disappear, respectively

///////Stop configuring beyond here///////////////////////////

detectwebkit: navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1, //detect WebKit browsers (Safari, Chrome etc)
detectie6: document.all && !window.XMLHttpRequest,

getajaxmenu:function($, setting){ //function to fetch external page containing the panel DIVs
	var $menucontainer=$('#'+setting.contentsource[0]) //reference empty div on page that will hold menu
	$menucontainer.html("Loading Menu...")
	$.ajax({
		url: setting.contentsource[1], //path to external menu file
		async: true,
		error:function(ajaxrequest){
			$menucontainer.html('Error fetching content. Server Response: '+ajaxrequest.responseText)
		},
		success:function(content){
			$menucontainer.html(content)
			ddsmoothmenu.buildmenu($, setting)
		}
	})
},


buildmenu:function($, setting){
	var smoothmenu=ddsmoothmenu
	var $mainmenu=$("#"+setting.mainmenuid+">ul") //reference main menu UL
	$mainmenu.parent().get(0).className=setting.classname || "ddsmoothmenu"
	var $headers=$mainmenu.find("ul").parent()
	$headers.hover(
		function(e){
			$(this).children('a:eq(0)').addClass('selected')
		},
		function(e){
			$(this).children('a:eq(0)').removeClass('selected')
		}
	)
	$headers.each(function(i){ //loop through each LI header
		var $curobj=$(this).css({zIndex: 100-i}) //reference current LI header
		var $subul=$(this).find('ul:eq(0)').css({display:'block'})
		$subul.data('timers', {})
		this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
		this.istopheader=$curobj.parents("ul").length==1? true : false //is top level header?
		$subul.css({top:this.istopheader && setting.orientation!='v'? this._dimensions.h+"px" : 0})
		$curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: smoothmenu.arrowimages.down[2]} : {}).append( //add arrow images
			'<span class="' + (this.istopheader && setting.orientation!='v'? smoothmenu.arrowimages.down[0] : smoothmenu.arrowimages.right[0])
			+ '" ></span>'
		)
		if (smoothmenu.shadow.enable){
			this._shadowoffset={x:(this.istopheader?$subul.offset().left+smoothmenu.shadow.offsetx : this._dimensions.w), y:(this.istopheader? $subul.offset().top+smoothmenu.shadow.offsety : $curobj.position().top)} //store this shadow's offsets
			if (this.istopheader)
				$parentshadow=$(document.body)
			else{
				var $parentLi=$curobj.parents("li:eq(0)")
				$parentshadow=$parentLi.get(0).$shadow
			}
			this.$shadow=$('<div class="ddshadow'+(this.istopheader? ' toplevelshadow' : '')+'"></div>').prependTo($parentshadow).css({left:this._shadowoffset.x+'px', top:this._shadowoffset.y+'px'})  //insert shadow DIV and set it to parent node for the next shadow div
		}
		$curobj.hover(
			function(e){
				var $targetul=$subul //reference UL to reveal
				var header=$curobj.get(0) //reference header LI as DOM object
				clearTimeout($targetul.data('timers').hidetimer)
				$targetul.data('timers').showtimer=setTimeout(function(){
					header._offsets={left:$curobj.offset().left, top:$curobj.offset().top}
					var menuleft=header.istopheader && setting.orientation!='v'? 0 : header._dimensions.w
					menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())? (header.istopheader && setting.orientation!='v'? -header._dimensions.subulw+header._dimensions.w : -header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent
					if ($targetul.queue().length<=1){ //if 1 or less queued animations
						$targetul.css({left:menuleft+"px", width:header._dimensions.subulw+'px'}).animate({height:'show',opacity:'show'}, ddsmoothmenu.transition.overtime)
						if (smoothmenu.shadow.enable){
							var shadowleft=header.istopheader? $targetul.offset().left+ddsmoothmenu.shadow.offsetx : menuleft
							var shadowtop=header.istopheader?$targetul.offset().top+smoothmenu.shadow.offsety : header._shadowoffset.y
							if (!header.istopheader && ddsmoothmenu.detectwebkit){ //in WebKit browsers, restore shadow's opacity to full
								header.$shadow.css({opacity:1})
							}
							header.$shadow.css({overflow:'', width:header._dimensions.subulw+'px', left:shadowleft+'px', top:shadowtop+'px'}).animate({height:header._dimensions.subulh+'px'}, ddsmoothmenu.transition.overtime)
						}
					}
				}, ddsmoothmenu.showhidedelay.showdelay)
			},
			function(e){
				var $targetul=$subul
				var header=$curobj.get(0)
				clearTimeout($targetul.data('timers').showtimer)
				$targetul.data('timers').hidetimer=setTimeout(function(){
					$targetul.animate({height:'hide', opacity:'hide'}, ddsmoothmenu.transition.outtime)
					if (smoothmenu.shadow.enable){
						if (ddsmoothmenu.detectwebkit){ //in WebKit browsers, set first child shadow's opacity to 0, as "overflow:hidden" doesn't work in them
							header.$shadow.children('div:eq(0)').css({opacity:0})
						}
						header.$shadow.css({overflow:'hidden'}).animate({height:0}, ddsmoothmenu.transition.outtime)
					}
				}, ddsmoothmenu.showhidedelay.hidedelay)
			}
		) //end hover
	}) //end $headers.each()
	$mainmenu.find("ul").css({display:'none', visibility:'visible'})
},

init:function(setting){
	if (typeof setting.customtheme=="object" && setting.customtheme.length==2){ //override default menu colors (default/hover) with custom set?
		var mainmenuid='#'+setting.mainmenuid
		var mainselector=(setting.orientation=="v")? mainmenuid : mainmenuid+', '+mainmenuid
		document.write('<style type="text/css">\n'
			+mainselector+' ul li a {background:'+setting.customtheme[0]+';}\n'
			+mainmenuid+' ul li a:hover {background:'+setting.customtheme[1]+';}\n'
		+'</style>')
	}
	this.shadow.enable=(document.all && !window.XMLHttpRequest)? false : this.shadow.enable //in IE6, always disable shadow
	jQuery(document).ready(function($){ //ajax menu?
		if (typeof setting.contentsource=="object"){ //if external ajax menu
			ddsmoothmenu.getajaxmenu($, setting)
		}
		else{ //else if markup menu
			ddsmoothmenu.buildmenu($, setting)
		}
	})
}

} //end ddsmoothmenu variable

$.include('/stellent/groups/application_code/documents/web_asset/jquery.flexiblecolumns.min.js');
$.include('/stellent/groups/agriliance/documents/web_asset/jquery.cycle.all.min.js');
$.include('/stellent/groups/application_code/documents/web_asset/jquery.tinycarousel.js');
$.include('/stellent/groups/application_code/documents/ag2ag_hcsp/jquery.tipsy.js');
$.include('/stellent/groups/application_code/documents/web_asset/jquery.watermarkinput.js');
$.include('/stellent/groups/application_code/documents/web_asset/jquery.localscroll-min.js');
$.include('/stellent/groups/application_code/documents/web_asset/jquery.scrollto-min.js');
$.include('/stellent/groups/application_code/documents/web_asset/jquery.jigowatt.js');
/*$.include('/stellent/groups/application_code/documents/web_asset/jquery.uniform.min.js');*/


// Slider
/*
	Elegant Accordion v1.0
	
	Originally by Mary Lou: http://tympanus.net/codrops/2010/04/26/elegant-accordion-with-jquery-and-css3/
	Plugin by Dean Sofer: http://www.deansofer.com/
*/

(function($) {
	
	var __eAccordionRunTimes = 0; 
	
	$.eAccordion = function(el, options) {
		
		// To avoid scope issues, use 'base' instead of 'this'
		// to reference this class from internal events and functions.
		var base = this;
	  
		// Keeps track of the index of the current instance
		__eAccordionRunTimes++;
		base.runTimes = __eAccordionRunTimes;
			
		// Gives Access to jQuery element
		base.$el = $(el);
		
		// Set up a few defaults
		base.currentPage = 1;
		base.timer = null;
		base.playing = false;
	
		// Add a reverse reference to the DOM object
		base.$el.data("ElegantAccordion", base);
		  
		base.init = function() {
					
			base.options = $.extend({},$.eAccordion.defaults, options);
				
			// Cache existing DOM elements for later 
			base.$items   = base.$el.children('li');
			base.$single  = base.$items.last();
			
			// Fix jittering during animation
			base.$single.css('margin-right', '-20px');
			
			// Set the dimensions
			if (base.options.height) {
				base.$items.css('height', base.options.height);
			}
	
			// Get the details
			base.pages = base.$items.length;
			var expandedWidth;
			if (base.options.expandedWidth.indexOf("%") > -1) { // If a percent is given
				expandedWidth = base.$el.width() * (parseInt(base.options.expandedWidth) / 100);
			} else { // Otherwise use pixels
				expandedWidth = parseInt(base.options.expandedWidth);
			}
			base.contractedWidth = (base.$el.width() - expandedWidth) / (base.pages - 1);
			
			
			// If autoPlay functionality is included, then initialize the settings
			if (base.options.autoPlay) {
				base.playing = !base.options.startStopped; // Sets the playing variable to false if startStopped is true
				base.startStop(base.playing);
			};
			
			// If pauseOnHover then add hover effects
			if (base.options.pauseOnHover) {
				base.$el.hover(function() {
					base.clearTimer();
				}, function() {
					base.startStop(base.playing);
				});
			}
			
			// Add formatting
			base.$items.prepend('<div class="bgGradient"/>').hover(function () {
				base.startStop(false);
				base.gotoPage(base.$items.index(this) + 1);
			},function(){
				if (!base.clickStopped) base.startStop(true);
			}).click(function () {
				base.startStop(false);
				// Prevents the hover-out from re-enabling
				base.clickStopped = true;
			}).children('div').width(expandedWidth);
			
			// If a hash can not be used to trigger the plugin, then go to page 1
			if ((base.options.hashTags == true && !base.gotoHash()) || base.options.hashTags == false) {
				base.gotoPage(1, false);
			};
		}
			
		base.gotoPage = function(page, animate) {
			if (typeof(page) == "undefined" || page == null) {
				page = 1;
			};
			
			// Stop the slider when we reach the last page, if the option stopAtEnd is set to true
			if(base.options.stopAtEnd){
				if(page == base.pages) base.startStop(false);
			}
			
			
			// Just check for bounds
			if (page > base.pages) page = 1;
			if (page < 1) page = 1;
			
			// Store the page to be shown
			var $page = base.$items.eq(page - 1);
			
			if (animate !== false) {
				$page.stop().animate(
					{'width':base.options.expandedWidth},
					base.options.animationTime,
					base.options.easing
				).siblings().stop().animate({
					'width':base.contractedWidth},
					base.options.animationTime,
					base.options.easing
				);
				$page.children('h2').stop(true,true).fadeOut();
				$page.children('div:not(.bgGradient)').stop(true,true).fadeIn();
				$page.children('.bgGradient').stop(true,true).animate(
					{bottom:0},
					base.options.animationTime
				);
				$page.siblings().children('h2').stop(true,true).fadeIn();
				$page.siblings().children('div:not(.bgGradient)').stop(true,true).fadeOut();
				$page.siblings().children('.bgGradient').stop(true,true).animate(
					{bottom:'-340px'},
					base.options.animationTime
				);
			} else {
				$page.width(base.options.expandedWidth).siblings().width(base.contractedWidth);
				$page.children('h2').hide();
				$page.children('div:not(.bgGradient)').show();
				$page.children('.bgGradient').css('bottom','0');
				$page.siblings().children('h2').show();
				$page.siblings().children('div:not(.bgGradient)').hide();
				$page.siblings().children('.bgGradient').css('bottom','-340px');
			}
			
			// Update local variable
			base.currentPage = page;
		};
			
		base.goForward = function() {
			base.gotoPage(base.currentPage + 1);
		};

		base.goBack = function() {
			base.gotoPage(base.currentPage - 1);
		};
		
		// This method tries to find a hash that matches panel-X
		// If found, it tries to find a matching item
		// If that is found as well, then that item starts visible
		base.gotoHash = function(){
			var hash = window.location.hash.match(/^#?panel(\d+)-(\d+)$/);
			if (hash) {
				var panel = parseInt(hash[1]);
				if (panel == base.runTimes) {
					var slide = parseInt(hash[2]);
					var $item = base.$items.filter(':eq(' + slide + ')');
					if ($item.length != 0) {
						base.gotoPage(slide, false);
						return true;
					}
				}
			}
			return false; // A item wasn't found;
		};
		
		// Handles stopping and playing the slideshow
		// Pass startStop(false) to stop and startStop(true) to play
		base.startStop = function(playing) {
			if (playing !== true) playing = false; // Default if not supplied is false
			
			// Update variable
			base.playing = playing;
			
			if (playing){
				base.clearTimer(); // Just in case this was triggered twice in a row
				base.timer = window.setInterval(function() {
					base.goForward();
				}, base.options.delay);
			} else {
				base.clearTimer();
			};
		};
		
		base.clearTimer = function(){
			// Clear the timer only if it is set
			if(base.timer) window.clearInterval(base.timer);
		};
		
		// Taken from AJAXY jquery.history Plugin
		base.setHash = function (hash) {
			// Write hash
			if ( typeof window.location.hash !== 'undefined' ) {
				if ( window.location.hash !== hash ) {
					window.location.hash = hash;
				};
			} else if ( location.hash !== hash ) {
				location.hash = hash;
			};
			
			// Done
			return hash;
		};
		// <-- End AJAXY code

		// Trigger the initialization
		base.init();
	};

	$.eAccordion.defaults = {
		easing: 'linear',                // Anything other than "linear" or "swing" requires the easing plugin
		autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not
		startStopped: false,            // If autoPlay is on, this can force it to start stopped
		stopAtEnd: false,				// If autoplay is on, it will stop when it reaches the last slide
		delay: 5000,                    // How long between slide transitions in AutoPlay mode
		animationTime: 600,             // How long the slide transition takes
		hashTags: true,                 // Should links change the hashtag in the URL?
		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
		height: null,					// Override the default CSS height
		expandedWidth: '60%'				// Width of the expanded slide
	};
	
	$.fn.eAccordion = function(options) {
	  
		if (typeof(options) == "object"){
			return this.each(function(i){			
				(new $.eAccordion(this, options));
			});	
		
		} else if (typeof(options) == "number") {

			return this.each(function(i) {
				var eSlide = $(this).data('ElegantAccordion');
				if (eSlide) {
					eSlide.gotoPage(options);
				}
			});
			
		}
		
  };
	
})(jQuery);

jQuery(document).ready(function(){
	
	// DropDown Menu Plugin
	ddsmoothmenu.init({
		mainmenuid: "menu", //menu DIV id
		orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
		classname: 'ddsmoothmenu', //class added to menu's outer DIV
		contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
	})
	

	
	// Fluid Menu
	jQuery('.ddsmoothmenu li').click(function(){
		var url = jQuery(this).find('a').attr('href');
		document.location.href = url;
	});
	jQuery('.ddsmoothmenu li').hover(function(){
		jQuery(this).find('.menuslide').slideDown();
	},
	function(){
		jQuery(this).find('.menuslide').slideUp();
	});
	
	// *************************************** Images ******************************************************//
	//Horizontal Sliding
	jQuery('.gallery_item').hover(function(){
		jQuery(".cover", this).stop().animate({left:'214px'},{queue:false,duration:250});
	}, function() {
		jQuery(".cover", this).stop().animate({left:'0px'},{queue:false,duration:900});
	});

	// find the div.fade elements and hook the hover event
	jQuery('.portfolio_thumb a').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = jQuery('> .hover_img, > .hover_vid', this);
		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(300, 1);
		} else {
			fade.fadeIn(300);
		}
	}, function () {
		var fade = jQuery('> .hover_img, > .hover_vid', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(300, 0);
		} else {
			fade.fadeOut(300);
		}
	});
 
	// get rid of the text
	jQuery('.portfolio_thumb a > .hover_img, .portfolio_thumb a > .hover_img').empty();

	// Partners Page

	//move the image in pixel
	var move = -15;
	//zoom percentage, 1.2 =120%
	var zoom = 1.2;
	//On mouse over those thumbnail
	jQuery('.partner_item').hover(function() {
		
		//Set the width and height according to the zoom percentage
		width = jQuery('.partner_item').width() * zoom;
		height = jQuery('.partner_item').height() * zoom;
		
		//Move and zoom the image
		jQuery(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});
		
		//Display the caption
		jQuery(this).find('div.caption').css({"visibility":"visible",opacity:0.8});
	},
	function() {
		//Reset the image
		jQuery(this).find('img').stop(false,true).animate({'width':jQuery('.partner_item').width(), 'height':jQuery('.partner_item').height(), 'top':'0', 'left':'0'}, {duration:100});	

		//Hide the caption
		jQuery(this).find('div.caption').css({"visibility":"hidden",opacity:0});
	});
	
		// *************************************** Shortcodes ******************************************************//
		
// jQuery Toggle

	jQuery(".toggle_container").hide(); //Hide (Collapse) the toggle containers on load

	//Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
	jQuery("b.trigger").click(function(){
		jQuery(this).toggleClass("active").next().slideToggle("slow");
		return false; //Prevent the browser jump to the link anchor
	});
    
// jQuery Accordion

	//Set default open/close settings
	jQuery('.acc_container').hide(); //Hide/close all containers
	jQuery('.acc_trigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container
	
	//On Click
	jQuery('.acc_trigger').click(function(){
		if( jQuery(this).next().is(':hidden') ) { //If immediate next container is closed...
			jQuery('.acc_trigger').removeClass('active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
			jQuery(this).toggleClass('active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
		}
		return false; //Prevent the browser jump to the link anchor
	});

	// jQuery Tabs

	//When page loads...
	jQuery(".tab_content").hide(); //Hide all content
	jQuery("ul.tabs li:first").addClass("active").show(); //Activate first tab
	jQuery(".tab_content:first").show(); //Show first tab content

	//On Click Event
	jQuery("ul.tabs li").click(function() {

		jQuery("ul.tabs li").removeClass("active"); //Remove any "active" class
		jQuery(this).addClass("active"); //Add "active" class to selected tab
		jQuery(".tab_content").hide(); //Hide all tab content

		var activeTab = jQuery(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		jQuery(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});
	
	
	// jQuery autoAlign
	// jQuery("#fsb").autoColumn(25, ".footer-container");
	// jQuery("#fsb").autoHeight(".footer-container");
	
	jQuery(".columns").autoColumn(50, ".column");
	jQuery(".columns").autoHeight(".column");
	
	jQuery(".columns2").autoColumn(50, ".column");
	jQuery(".columns2").autoHeight(".column");
	
	jQuery(".columns3").autoColumn(33, ".column");
	jQuery(".columns3").autoHeight(".column");
	
	jQuery(".columns4").autoColumn(33, ".column");
	jQuery(".columns4").autoHeight(".column");
	
	jQuery(".columns5").autoColumn(33, ".column");
	jQuery(".columns5").autoHeight(".column");
	
	jQuery(".columns6").autoColumn(33, ".column");
	jQuery(".columns6").autoHeight(".column");
	
	jQuery(".columns7").autoColumn(33, ".column");
	jQuery(".columns7").autoHeight(".column");
	
	jQuery(".columns8").autoColumn(33, ".column");
	jQuery(".columns8").autoHeight(".column");
	
	jQuery(".columns9").autoColumn(33, ".column");
	jQuery(".columns9").autoHeight(".column");
	
	jQuery(".columns10").autoColumn(33, ".column");
	jQuery(".columns10").autoHeight(".column");
	
	jQuery(".columns11").autoColumn(33, ".column");
	jQuery(".columns11").autoHeight(".column");
	
	jQuery(".columns12").autoColumn(33, ".column");
	jQuery(".columns12").autoHeight(".column");
	
	jQuery(".columns13").autoColumn(33, ".column");
	jQuery(".columns13").autoHeight(".column");
	
	jQuery(".columns14").autoColumn(33, ".column");
	jQuery(".columns14").autoHeight(".column");
	
	jQuery(".columns15").autoColumn(33, ".column");
	jQuery(".columns15").autoHeight(".column");
	
	jQuery(".columns16").autoColumn(33, ".column");
	jQuery(".columns16").autoHeight(".column");
	
	// jQuery tipsy
	jQuery('.social a').tipsy(
	{
		gravity: 's', // nw | n | ne | w | e | sw | s | se
		fade: true
	}); 
	
	// go to top scroll effect
	if (jQuery(".gototop").length) {
		jQuery.localScroll();
	}
	
	// tabbed widget
	if (jQuery(".widget_tabbed").length) {
		jQuery(".widget_tabbed").tabs({ fx: { height: 'toggle', opacity: 'toggle' } });
	}
	
	// jQuery Cycle
	if (jQuery(".widget_recent_projects").length) {
		jQuery('.widget_recent_projects ul').cycle({
			fx: 'scrollLeft',
			timeout: 5000,
			delay: -1000
		});
	}
	
	// jQuery data-rel to rel
	if (jQuery("a[data-rel]").length) {
		jQuery('a[data-rel]').each(function() {jQuery(this).attr('rel', jQuery(this).data('rel'));});
	}
	
	
	// PrettyPhoto
	
	function pp_lightbox() {
		
		jQuery("a[rel^='prettyPhoto']").prettyPhoto({
			animation_speed: 'normal', /* fast/slow/normal */
			opacity: 0.70, /* Value between 0 and 1 */
			show_title: true, /* true/false */
			allow_resize: true, /* true/false */
			counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
			theme: 'pp_default', /* light_rounded / dark_rounded / light_square / dark_square / facebook */
			overlay_gallery: true, /* display or hide the thumbnails on a lightbox when it opened */
			deeplinking: false,
			social_tools: false /* html or false to disable */
		});
	
	}
	
	if(jQuery().prettyPhoto) {
		pp_lightbox(); 
	}
	
	// jQuery Roundabout Plugin
	if (jQuery(".portfolio_rotator").length) {
		jQuery('.portfolio_rotator ul').roundabout({
			bearing: 0.0,			// The starting direction in which the Roundabout should point.
			tilt: 0.0,				// The starting angle at which the Roundabout&#8217;s plane should be tipped.
			minZ: 10,				// The lowest z-index value that a moveable item can be assigned. (Will be the z-index of the item farthest from the focusBearing.)
			maxZ: 100,				// The greatest z-index value that a moveable item can be assigned. (Will be the z-index of the item in focus.)
			minOpacity: 0.3,		// The lowest opacity value that a moveable item can be assigned. (Will be the opacity of the item farthest from the focus bearing.)
			maxOpacity: 1.0,		// The greatest opacity value that a moveable item can be assigned. (Will be the opacity of the item in focus.)
			minScale: 0.6,			// The lowest percentage of font-size that a moveable item can be assigned. (Will be the scale of the item farthest from the focus bearing.)
			maxScale: 1.0,			// The greatest percentage of font-size that a moveable item can be assigned. (Will be the scale of the item in focus.)
			duration: 600,			// The length of time (in milliseconds) that all animations take to complete by default.
			btnNext: null,			// A jQuery selector of elements that will have a click event assigned to them. On click, the Roundabout will move to the next child (counterclockwise).
			btnPrev: null,			// A jQuery selector of elements that will have a click event assigned to them. On click, the Roundabout will move to the previous child (clockwise).
			easing: 'swing',		// The easing method to be used for animations by default. jQuery comes with &#8220;linear&#8221; and &#8220;swing,&#8221; although any of the jQuery Easing plugin&#8217;s values can be used if the easing plugin is included.
			clickToFocus: true,	// When an item is not in focus, should it be brought into focus via an animation? If true, will disable any click events on elements within the moving element that was clicked. Once the element is in focus, click events will no longer be blocked.
			focusBearing: 0.0,		// The bearing at which a moving item&#8217;s position must match on the Roundabout to be considered &#8220;in focus.&#8221;
			shape: 'waterWheel',	// For use with the Roundabout Shapes plugin. Sets the shape of the path over which moveable items will travel.
			debug: false,			// Changes the HTML within moving elements into a list of information about that element. Helpful for advanced configurations.
			childSelector: 'li',	// Changes the set of elements Roundabout will look for within the holding element for moving.
			startingChild: 0,		// Starts a given child at the focus of the Roundabout. This is a zero-based number positioned in order of appearance in the HTML file.
			reflect: false			// Setting to true causes the elements to be placed around the Roundabout in reverse order. Also flips the direction of &#8220;next&#8221; and &#8221;previous&#8221; buttons. 
		});
	}
	
	// jQuery text slide up / slide down effect
		jQuery.fn.showFeatureText = function() {
		  return this.each(function(){    
			var box = jQuery(this);
			var text = jQuery('h4',this);    
		
			text.css({ position: 'absolute', bottom: '0px' }).hide();
		
			box.hover(function(){
			  text.slideDown("fast");
			},function(){
			  text.slideUp("fast");
			});
		
		  });
		}
	if (jQuery("#slider-code").length) {
		jQuery('#slider-code .overview li').showFeatureText();
	}
	
	
	// jQuery Accordion
	if (jQuery("#accordion").length) {
		jQuery('#accordion').eAccordion ({
			easing: 'swing',                // Anything other than "linear" or "swing" requires the easing plugin
			autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not
			startStopped: false,            // If autoPlay is on, this can force it to start stopped
			stopAtEnd: false,				// If autoplay is on, it will stop when it reaches the last slide
			delay: 10000,                    // How long between slide transitions in AutoPlay mode
			animationTime: 600,             // How long the slide transition takes
			hashTags: true,                 // Should links change the hashtag in the URL?
			pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
			width: null,					// Override the default CSS width
			height: null,					// Override the default CSS height
			expandedWidth: '522px'			// Width of the expanded slide
		});
	}

	
	// jQuery Serie3 Slider
	if (jQuery("#s3slider").length) {
		jQuery('#s3slider').s3Slider({
			timeOut: 3000
		});
	}


	
});

		// *************************************** Functions ******************************************************//

function slide(navigation_id, pad_out, pad_in, time, multiplier)
{
	// creates the target paths
	var list_elements = navigation_id + " li";
	var link_elements = list_elements + " a";
	
	// initiates the timer used for the sliding animation
	var timer = 0;
	
	// creates the slide animation for all list elements 
	jQuery(list_elements).each(function(i)
	{
		// margin left = - ([width of element] + [total vertical padding of element])
		jQuery(this).css("margin-left","-15px");
		// updates timer
		timer = (timer*multiplier + time);
		jQuery(this).animate({ marginLeft: "0" }, timer);
		jQuery(this).animate({ marginLeft: "15px" }, timer);
		jQuery(this).animate({ marginLeft: "0" }, timer);
	});

	// creates the hover-slide effect for all link elements 		
	jQuery(link_elements).each(function(i)
	{
		jQuery(this).hover(
		function()
		{
			jQuery(this).animate({ paddingLeft: pad_out }, 150);
		},		
		function()
		{
			jQuery(this).animate({ paddingLeft: pad_in }, 150);
		});
	});
}

// Script for mouseover menu
$(document).ready(function() {
	

	function megaHoverOver(){
		$(this).find(".sub").stop().fadeTo('fast', 1).show();
			
		}
	
	function megaHoverOut(){ 
	  $(this).find(".sub").stop().fadeTo('fast', 0, function() {
		  $(this).hide(); 
	  });
	}


	var config = {    
		 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)    
		 interval: 100, // number = milliseconds for onMouseOver polling interval    
		 over: megaHoverOver, // function = onMouseOver callback (REQUIRED)    
		 timeout: 200, // number = milliseconds delay before onMouseOut    
		 out: megaHoverOut // function = onMouseOut callback (REQUIRED)    
	};

	$("ul#mainNavigation li .sub").css({'opacity':'0'});
	$("ul#mainNavigation li").hoverIntent(config);
});

/*Begin function for beef tip generation /replacement */
function replaceBeefTip(){
	var randomnumber=Math.floor(Math.random()*12); 
	var aryRotatMsg = new Array();
		aryRotatMsg[0]="A cow must nurse a newborn calf and prepare her body for rebreeding within 80 to 85 days to calve at the same time next year. Inadequate herd nutrition during this period results in a lower breed-back percentage in the desired time period.";
		aryRotatMsg[1]="Cow size determines nutrition requirements. As a rule, for each 100-pound increase in weight, the net energy for maintenance requirement increases by 0.57 Mcal, and the crude protein requirement by 0.1%.";
		aryRotatMsg[2]="Body condition scores (BCS) are used to suggest the relative condition of the beef cow, with 1 representing very thin and 9 representing extreme fatness. A cow with a BCS of 5 is in average condition - a target many beef producers strive for.";
		aryRotatMsg[3]="Heat stress can take a serious toll. Early signs include restlessness, crowding the water tank, open mouth and labored breathing. Be prepared. Spray water on the animals most affected. Place animals under shade with fans or use cold-water enemas (via garden hose) to reduce body temperatures rapidly.";
		aryRotatMsg[4]="Feeder cattle starter diets should be 13% to 15% protein to account for protein needs at low intakes and to help develop antibodies for proper immune response. Energy levels should be 45 to 48 Mcal Neg if corn is the primary energy source. With non-starch energy sources, levels can be up to 52 to 54 Mcal.";
		aryRotatMsg[5]="A feeder cattle receiving program typically consists of long-stem hay the first 12 to 24 hours, followed by an introduction of the total mixed ration. Proper additives are used to control coccidiosis and BRD. ";
		aryRotatMsg[6]="Pens for sick cattle should be dry and clean with plenty of access to clean water and bunks. Be prepared to offer the selected food soon after arrival.";
		aryRotatMsg[7]="Bulls that will be together in the cow herd should be grouped together so they develop a social structure. This will help prevent fighting when they are turned in with the cows.";
		aryRotatMsg[8]="Growing calves consume 5 to 15 gallons of water a day. A good guideline is to allow 1 foot of water/tank space per 20 head. To minimize muddy conditions, extend a concrete apron 6 feet beyond the tank.";
		aryRotatMsg[9]="When starting calves in the lot, provide good-quality grass hay for 5 to 7 days. Introduce your starter ration or complete pelleted feed on top of the grass hay. After they become accustomed to it - within 7 to 10 days - make ration adjustments as needed.";
		aryRotatMsg[10]="Excessively muddy lot conditions can reduce feed efficiency up to 30%. Slope pens away from the bunk and provide a 15- to 20-foot concrete apron by the bunk.";
		aryRotatMsg[11]="Feed bunk systems pay off. Hay fed on the ground is likely to be used as bedding and can result in up to 45% wastage." ;
		newTip = aryRotatMsg[randomnumber];
		document.getElementById("replaceableTips").innerHTML = newTip;
}

/*Begin Code for  Site Map generation */
function SiteMapPlain(strTextColor, strHoverColor, strFocusColor, strClassName, strShowHome, strShowFocus)
{
	this.m_TextColor  = '';
	this.m_HoverColor = '';
	this.m_FocusColor = '';
	this.m_ClassName  = 'SiteMapPlain';
	
	this.m_ShowHome   = false;
	this.m_ShowFocus  = false;	
	
	this.m_NavPath    = g_navNode_Path;
		
	SiteMapPlain.prototype.Display = SiteMapPlain_Display;
	SiteMapPlain.prototype.DisplayNode = SiteMapPlain_DisplayNode;
	
	if (strTextColor != '')
		this.m_TextColor = strTextColor;
		
	if (strHoverColor != '')
		this.m_HoverColor = strHoverColor;

	if (strFocusColor != '')
		this.m_FocusColor = strFocusColor;

	if (strClassName != '')
		this.m_ClassName = strClassName;

	if (strShowHome == 'true')
		this.m_ShowHome = true;
		
	if (strShowFocus == 'true')
		this.m_ShowFocus = true;
}

function SiteMapPlain_Display (node)
{
	document.write ('<div class="' + this.m_ClassName + '"');
	
	if (this.m_TextColor != '')
		document.write (' style="color: ' + this.m_TextColor + ';"');
		
	document.write ('>');

	this.DisplayNode(node);
	
	document.write ('</div>');
}

function SiteMapPlain_DisplayNode(node)	
{
	var nodeColor = this.m_TextColor;
	var nodeClass = this.m_ClassName;
	var nodeLevel = node.m_level;
	
	if (nodeLevel > 6)
		nodeLevel = 6;

	if (node.m_level > 0 || this.m_ShowHome)
	{
		var ds = new Array();
		var di = 0;

		if (this.m_ShowFocus && this.m_NavPath.length > 0 && node.m_level < this.m_NavPath.length)
		{
			if (this.m_NavPath[node.m_level] == node.m_id)
			{
				if (node.m_level > 0 || (node.m_level == 0 && this.m_NavPath.length == 1))
				{
					bSelected = true;
					nodeColor = this.m_FocusColor;
					nodeClass += '-focus';
				}
			}
		}
	
		if (node.m_level > 0)
			nodeClass += '-' + nodeLevel;

		ds[di++] = '<div';
		ds[di++] = ' class="' + nodeClass + '"';
		ds[di++] = '>';
				
		ds[di++] = '<a href="' + node.m_href + '"';
		
		ds[di++] = ' class="' + nodeClass + '"';
		
		if (nodeColor != '')
		{
			ds[di++] = ' style="color: ' + nodeColor + ';"';
			
			if (this.m_HoverColor != '')
			{
				ds[di++] = ' onmouseover="this.style.color=\'' + this.m_HoverColor + '\'"';
				ds[di++] = ' onmouseout="this.style.color=\'' + nodeColor + '\'"';
			}
		}
		ds[di++] = '>'
		ds[di++] = node.m_label;
		ds[di++] = '</a></div>';
		
		document.write(ds.join(''));
	}
	
	// expand sub-levels (if any)
	for (var i = 0; i < node.m_subNodes.length; i++)
	{
		this.DisplayNode(node.m_subNodes[i]);
	}
}



