
// 'stacks' is the Stacks global object.
// All of the other Stacks related Javascript will 
// be attatched to it.
var stacks = {};


// this call to jQuery gives us access to the globaal
// jQuery object. 
// 'noConflict' removes the '$' variable.
// 'true' removes the 'jQuery' variable.
// removing these globals reduces conflicts with other 
// jQuery versions that might be running on this page.
stacks.jQuery = jQuery.noConflict(true);

// Javascript for stacks_in_149_page7
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_149_page7 = {};

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_149_page7 = (function(stack) {

jQuery(document).ready(function($){
	$('#nav ul li').hover(
		function(){
			$('ul:first',this).show();
		},
		function(){
			$('ul:first',this).hide();
		}
	);
});
	return stack;
})(stacks.stacks_in_149_page7);


// Javascript for stacks_in_159_page7
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_159_page7 = {};

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_159_page7 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

//-- Exposé Stack v1.0.3 by Joe Workman --//
/* jQuery Tools Overlay 1.2.5 - The missing UI library for the Web */
(function(a){function t(d,b){var c=this,j=d.add(c),o=a(window),k,f,m,g=a.tools.expose&&(b.mask||b.expose),n=Math.random().toString().slice(10);if(g){if(typeof g=="string")g={color:g};g.closeOnClick=g.closeOnEsc=false}var p=b.target||d.attr("rel");f=p?a(p):d;if(!f.length)throw"Could not find Overlay: "+p;d&&d.index(f)==-1&&d.click(function(e){c.load(e);return e.preventDefault()});a.extend(c,{load:function(e){if(c.isOpened())return c;var h=q[b.effect];if(!h)throw'Overlay: cannot find effect : "'+b.effect+
'"';b.oneInstance&&a.each(s,function(){this.close(e)});e=e||a.Event();e.type="onBeforeLoad";j.trigger(e);if(e.isDefaultPrevented())return c;m=true;g&&a(f).expose(g);var i=b.top,r=b.left,u=f.outerWidth({margin:true}),v=f.outerHeight({margin:true});if(typeof i=="string")i=i=="center"?Math.max((o.height()-v)/2,0):parseInt(i,10)/100*o.height();if(r=="center")r=Math.max((o.width()-u)/2,0);h[0].call(c,{top:i,left:r},function(){if(m){e.type="onLoad";j.trigger(e)}});g&&b.closeOnClick&&a.mask.getMask().one("click",
c.close);b.closeOnClick&&a(document).bind("click."+n,function(l){a(l.target).parents(f).length||c.close(l)});b.closeOnEsc&&a(document).bind("keydown."+n,function(l){l.keyCode==27&&c.close(l)});return c},close:function(e){if(!c.isOpened())return c;e=e||a.Event();e.type="onBeforeClose";j.trigger(e);if(!e.isDefaultPrevented()){m=false;q[b.effect][1].call(c,function(){e.type="onClose";j.trigger(e)});a(document).unbind("click."+n).unbind("keydown."+n);g&&a.mask.close();return c}},getOverlay:function(){return f},
getTrigger:function(){return d},getClosers:function(){return k},isOpened:function(){return m},getConf:function(){return b}});a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(e,h){a.isFunction(b[h])&&a(c).bind(h,b[h]);c[h]=function(i){i&&a(c).bind(h,i);return c}});k=f.find(b.close||".close");if(!k.length&&!b.close){k=a('<a class="close"></a>');f.prepend(k)}k.click(function(e){c.close(e)});b.load&&c.load()}a.tools=a.tools||{version:"1.2.5"};a.tools.overlay={addEffect:function(d,
b,c){q[d]=[b,c]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var s=[],q={};a.tools.overlay.addEffect("default",function(d,b){var c=this.getConf(),j=a(window);if(!c.fixed){d.top+=j.scrollTop();d.left+=j.scrollLeft()}d.position=c.fixed?"fixed":"absolute";this.getOverlay().css(d).fadeIn(c.speed,b)},function(d){this.getOverlay().fadeOut(this.getConf().closeSpeed,
d)});a.fn.overlay=function(d){var b=this.data("overlay");if(b)return b;if(a.isFunction(d))d={onBeforeLoad:d};d=a.extend(true,{},a.tools.overlay.conf,d);this.each(function(){b=new t(a(this),d);s.push(b);a(this).data("overlay",b)});return d.api?b:this}})(jQuery);
(function(b){function k(){if(b.browser.msie){var a=b(document).height(),d=b(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-d<20?d:a]}return[b(document).width(),b(document).height()]}function h(a){if(a)return a.call(b.mask)}b.tools=b.tools||{version:"1.2.5"};var l;l=b.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,
onClose:null}};var c,i,e,g,j;b.mask={load:function(a,d){if(e)return this;if(typeof a=="string")a={color:a};a=a||g;g=a=b.extend(b.extend({},l.conf),a);c=b("#"+a.maskId);if(!c.length){c=b("<div/>").attr("id",a.maskId);b("body").append(c)}var m=k();c.css({position:"absolute",top:0,left:0,width:m[0],height:m[1],display:"none",opacity:a.startOpacity,zIndex:a.zIndex});a.color&&c.css("backgroundColor",a.color);if(h(a.onBeforeLoad)===false)return this;a.closeOnEsc&&b(document).bind("keydown.mask",function(f){f.keyCode==
27&&b.mask.close(f)});a.closeOnClick&&c.bind("click.mask",function(f){b.mask.close(f)});b(window).bind("resize.mask",function(){b.mask.fit()});if(d&&d.length){j=d.eq(0).css("zIndex");b.each(d,function(){var f=b(this);/relative|absolute|fixed/i.test(f.css("position"))||f.css("position","relative")});i=d.css({zIndex:Math.max(a.zIndex+1,j=="auto"?0:j)})}c.css({display:"block"}).fadeTo(a.loadSpeed,a.opacity,function(){b.mask.fit();h(a.onLoad);e="full"});e=true;return this},close:function(){if(e){if(h(g.onBeforeClose)===
false)return this;c.fadeOut(g.closeSpeed,function(){h(g.onClose);i&&i.css({zIndex:j});e=false});b(document).unbind("keydown.mask");c.unbind("click.mask");b(window).unbind("resize.mask")}return this},fit:function(){if(e){var a=k();c.css({width:a[0],height:a[1]})}},getMask:function(){return c},isLoaded:function(a){return a?e=="full":e},getConf:function(){return g},getExposed:function(){return i}};b.fn.mask=function(a){b.mask.load(a);return this};b.fn.expose=function(a){b.mask.load(a,this);return this}})(jQuery);

jQuery.fn.exists = function(){return jQuery(this).length>0;}

$(document).ready(function() {
	var bg_color = $('#stacks_in_159_page7').css('background-color');
	if (bg_color) { 
		$('#stacks_in_159_page7').css({'background-color': 'transparent'});	
		$('#expose_stacks_in_159_page7').css({'background-color': bg_color });	
	}

	var bg_border_style = $('#stacks_in_159_page7').css('border-bottom-style');
	if (bg_border_style) { 
		var bg_border_color  = $('#stacks_in_159_page7').css('border-bottom-color');
		var bg_border_top 	 = $('#stacks_in_159_page7').css('border-top-width');
		var bg_border_right  = $('#stacks_in_159_page7').css('border-right-width');
		var bg_border_bottom = $('#stacks_in_159_page7').css('border-bottom-width');
		var bg_border_left 	 = $('#stacks_in_159_page7').css('border-left-width');
		$('#stacks_in_159_page7').css({'border-width':0});	
		$('#expose_stacks_in_159_page7').css({	'border-style':bg_border_style,
							 		'border-color':bg_border_color,
									'border-top-width':bg_border_top,
									'border-right-width':bg_border_right,
									'border-bottom-width':bg_border_bottom,	
									'border-left-width':bg_border_left
		});	
	}
	var custom_bg_src = $("#custom_bg_stacks_in_159_page7 img").attr("src");
	if (custom_bg_src) { 
	    $("#expose_stacks_in_159_page7").css({'background-image':'url(' + custom_bg_src + ')'});
	    var repeat_x = true;
	    var repeat_y = true;
	    
	    if (repeat_x && repeat_y) {
		    var bg_repeat = 'repeat';
	    }
	    else if (repeat_y) {
		    var bg_repeat = 'repeat-y';
	    }
	    else {
		    var bg_repeat = 'repeat-x';
	    }
	    $("#expose_stacks_in_159_page7").css({'background-repeat':bg_repeat});
	}

	// Need to append this to body to fix issues with some themes hiding it behind overlay
	$('#expose_stacks_in_159_page7').appendTo('body');

    // Build the Expose Lightbox
    $(".expose_stacks_in_159_page7").overlay({	
    		mask: {color:'#3F3F3F', opacity:0.9},
			target:'#expose_stacks_in_159_page7',
			closeOnClick: true,
			closeOnEsc: true,
			effect:	'default',
			load: false,
			fixed: true,
			oneInstance: false,
			left: 'center',
			top: '20%',
			onLoad: function() {
				if ( $('#expose_stacks_in_159_page7 iframe.vimeo_player').exists()) {
				    var player = $f($('#expose_stacks_in_159_page7 .vimeo_player')[0])
				    player.api('play');
  				}
				if ( $('#expose_stacks_in_159_page7 div.youtube_player').exists()) {
				    $('#expose_stacks_in_159_page7 div.youtube_player').tubeplayer("play");
  				}
				if ( $('#expose_stacks_in_159_page7 video.html5video').exists()) {
				    $('#expose_stacks_in_159_page7 video.html5video').get(0).play();
  				}
				if ( $('#expose_stacks_in_159_page7 audio.html5audio').exists()) {
				    $('#expose_stacks_in_159_page7 audio.html5audio').get(0).play();
  				}
				if ( $('#expose_stacks_in_159_page7 .html5audio object').exists()) {
				    $('#expose_stacks_in_159_page7 .html5audio').flowplayer(0).play();
  				}
				if ( $('#expose_stacks_in_159_page7 .html5video object').exists()) {
				    $('#expose_stacks_in_159_page7 .html5video').flowplayer(0).play();
  				}
			},
			onClose: function() {
				if ( $('#expose_stacks_in_159_page7 iframe.vimeo_player').exists()) {
				    var player = $f($('#expose_stacks_in_159_page7 .vimeo_player')[0])
				    player.api('pause');
  				}
				if ( $('#expose_stacks_in_159_page7 div.youtube_player').exists()) {
				    $('#expose_stacks_in_159_page7 div.youtube_player').tubeplayer("pause");
  				}
				if ( $('#expose_stacks_in_159_page7 video.html5video').exists()) {
				    $('#expose_stacks_in_159_page7 video.html5video').get(0).pause();
  				}
				if ( $('#expose_stacks_in_159_page7 audio.html5audio').exists()) {
				    $('#expose_stacks_in_159_page7 audio.html5audio').get(0).pause();
  				}
				if ( $('#expose_stacks_in_159_page7 .html5audio object').exists()) {
				    $('#expose_stacks_in_159_page7 .html5audio').flowplayer(0).pause();
  				}
				if ( $('#expose_stacks_in_159_page7 .html5video object').exists()) {
				    $('#expose_stacks_in_159_page7 .html5video').flowplayer(0).pause();
  				}
			}
    });    
});
//-- End Exposé Stack --//

	return stack;
})(stacks.stacks_in_159_page7);


// Javascript for stacks_in_162_page7
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_162_page7 = {};

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_162_page7 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
$(document).ready(function() {

if (navigator.userAgent.match(/MSIE/i) != null) {


jQuery.url = function()
{
	var segments = {};
	
	var parsed = {};
	
	/**
    * Options object. Only the URI and strictMode values can be changed via the setters below.
    */
  	var options = {
	
		url : window.location, // default URI is the page in which the script is running
		
		strictMode: false, // 'loose' parsing by default
	
		key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], // keys available to query 
		
		q: {
			name: "queryKey",
			parser: /(?:^|&)([^&=]*)=?([^&]*)/g
		},
		
		parser: {
			strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,  //less intuitive, more accurate to the specs
			loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ // more intuitive, fails on relative paths and deviates from specs
		}
		
	};
	
    /**
     * Deals with the parsing of the URI according to the regex above.
 	 * Written by Steven Levithan - see credits at top.
     */		
	var parseUri = function()
	{
		str = decodeURI( options.url );
		
		var m = options.parser[ options.strictMode ? "strict" : "loose" ].exec( str );
		var uri = {};
		var i = 14;

		while ( i-- ) {
			uri[ options.key[i] ] = m[i] || "";
		}

		uri[ options.q.name ] = {};
		uri[ options.key[12] ].replace( options.q.parser, function ( $0, $1, $2 ) {
			if ($1) {
				uri[options.q.name][$1] = $2;
			}
		});

		return uri;
	};

    /**
     * Returns the value of the passed in key from the parsed URI.
  	 * 
	 * @param string key The key whose value is required
     */		
	var key = function( key )
	{
		if ( ! parsed.length )
		{
			setUp(); // if the URI has not been parsed yet then do this first...	
		} 
		if ( key == "base" )
		{
			if ( parsed.port !== null && parsed.port !== "" )
			{
				return parsed.protocol+"://"+parsed.host+":"+parsed.port+"/";	
			}
			else
			{
				return parsed.protocol+"://"+parsed.host+"/";
			}
		}
	
		return ( parsed[key] === "" ) ? null : parsed[key];
	};
	
	/**
     * Returns the value of the required query string parameter.
  	 * 
	 * @param string item The parameter whose value is required
     */		
	var param = function( item )
	{
		if ( ! parsed.length )
		{
			setUp(); // if the URI has not been parsed yet then do this first...	
		}
		return ( parsed.queryKey[item] === null ) ? null : parsed.queryKey[item];
	};

    /**
     * 'Constructor' (not really!) function.
     *  Called whenever the URI changes to kick off re-parsing of the URI and splitting it up into segments. 
     */	
	var setUp = function()
	{
		parsed = parseUri();
		
		getSegments();	
	};
	
    /**
     * Splits up the body of the URI into segments (i.e. sections delimited by '/')
     */
	var getSegments = function()
	{
		var p = parsed.path;
		segments = []; // clear out segments array
		segments = parsed.path.length == 1 ? {} : ( p.charAt( p.length - 1 ) == "/" ? p.substring( 1, p.length - 1 ) : path = p.substring( 1 ) ).split("/");
	};
	
	return {
		
	    /**
	     * Sets the parsing mode - either strict or loose. Set to loose by default.
	     *
	     * @param string mode The mode to set the parser to. Anything apart from a value of 'strict' will set it to loose!
	     */
		setMode : function( mode )
		{
			strictMode = mode == "strict" ? true : false;
			return this;
		},
		
		/**
	     * Sets URI to parse if you don't want to to parse the current page's URI.
		 * Calling the function with no value for newUri resets it to the current page's URI.
	     *
	     * @param string newUri The URI to parse.
	     */		
		setUrl : function( newUri )
		{
			options.url = newUri === undefined ? window.location : newUri;
			setUp();
			return this;
		},		
		
		/**
	     * Returns the value of the specified URI segment. Segments are numbered from 1 to the number of segments.
		 * For example the URI http://test.com/about/company/ segment(1) would return 'about'.
		 *
		 * If no integer is passed into the function it returns the number of segments in the URI.
	     *
	     * @param int pos The position of the segment to return. Can be empty.
	     */	
		segment : function( pos )
		{
			if ( ! parsed.length )
			{
				setUp(); // if the URI has not been parsed yet then do this first...	
			} 
			if ( pos === undefined )
			{
				return segments.length;
			}
			return ( segments[pos] === "" || segments[pos] === undefined ) ? null : segments[pos];
		},
		
		attr : key, // provides public access to private 'key' function - see above
		
		param : param // provides public access to private 'param' function - see above
		
	};
	
}();


var yourfolder = jQuery.url.attr("directory");
if(yourfolder == "/"){yourfolder = ""};

var irbgimage = $("#stacks_in_162_page7 .stacks_in_162_page7imageroundr img").attr("src");
var irimagewidth = $("#stacks_in_162_page7 .stacks_in_162_page7imageroundr img").attr("width");
var irimageheight = $("#stacks_in_162_page7 .stacks_in_162_page7imageroundr img").attr("height");



var itsIEnine = navigator.userAgent.match(/MSIE 9/i) != null;


if(itsIEnine){
	$("#stacks_in_162_page7 .stacks_in_162_page7imageroundr").css({
	"width": irimagewidth + "px",
	"height": irimageheight + "px",
	"margin": "0 auto 0 auto",
	"background":"url("+irbgimage+")",
    "-webkit-border-radius" : "10px 10px 10px 10px",
    "-moz-border-radius" : "10px 10px 10px 10px",
    "border-radius" : "10px 10px 10px 10px"
    });
}
else{ 
$("#stacks_in_162_page7 .stacks_in_162_page7imageroundr img").css("visibility","hidden");

    $("#stacks_in_162_page7 .stacks_in_162_page7imageroundr").css({
    "width": irimagewidth + "px",
	"height": irimageheight + "px", 
    "margin": "0 auto 0 auto",
    "background":"url("+irbgimage+")",
    "-webkit-border-radius" : "10px 10px 10px 10px",
    "-moz-border-radius" : "10px 10px 10px 10px",
    "border-radius" : "10px 10px 10px 10px",
    "behavior":"url(" + yourfolder + "index_files/IRPIE.htc)", 
        "box-shadow" : "0px 5px 0px #000000 display:none;",
		        "-pie-box-shadow" : "0px 5px 0px #000000 display:none;"

	});
}

} // end if i.e. from the top if statment

});

	return stack;
})(stacks.stacks_in_162_page7);


// Javascript for stacks_in_167_page7
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_167_page7 = {};

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_167_page7 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

//-- HTML5 Video Stack v2.1.0 by Joe Workman --//
// This is a customized build of html5media - http://github.com/etianen/html5media/
(function(){function n(a){if(!a||typeof a!="object")return a;var b=new a.constructor,e;for(e in a)a.hasOwnProperty(e)&&(b[e]=n(a[e]));return b}function k(a,b){if(a){var e,d=0,c=a.length;if(c===void 0)for(e in a){if(b.call(a[e],e,a[e])===!1)break}else for(e=a[0];d<c&&b.call(e,d,e)!==!1;e=a[++d]);return a}}function l(a,b,e){if(typeof b!="object")return a;a&&b&&k(b,function(d,b){if(!e||typeof b!="function")a[d]=b});return a}function f(a){var b=a.indexOf(".");if(b!=-1){var e=a.slice(0,b)||"*",d=a.slice(b+
1,a.length),c=[];k(document.getElementsByTagName(e),function(){this.className&&this.className.indexOf(d)!=-1&&c.push(this)});return c}}function r(a){a=a||window.event;a.preventDefault?(a.stopPropagation(),a.preventDefault()):(a.returnValue=!1,a.cancelBubble=!0);return!1}function m(a,b,e){a[b]=a[b]||[];a[b].push(e)}function s(){return"_"+(""+Math.random()).slice(2,10)}function o(a,h,e){var d=this,j=null,f=!1,o,u,i=[],w={},p={},t,x,v,y,q,z;l(d,{id:function(){return t},isLoaded:function(){return j!==
null&&j.fp_play!==void 0&&!f},getParent:function(){return a},hide:function(b){if(b)a.style.height="0px";if(d.isLoaded())j.style.height="0px";return d},show:function(){a.style.height=z+"px";if(d.isLoaded())j.style.height=q+"px";return d},isHidden:function(){return d.isLoaded()&&parseInt(j.style.height,10)===0},load:function(b){if(!d.isLoaded()&&d._fireEvent("onBeforeLoad")!==!1){var u=0;k(c,function(){this.unload(function(){if(++u==c.length){if((o=a.innerHTML)&&!flashembed.isSupported(h.version))a.innerHTML=
"";if(b)b.cached=!0,m(p,"onLoad",b);flashembed(a,h,{config:e})}})})}return d},unload:function(b){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent))return b&&b(!1),d;if(o.replace(/\s/g,"")!==""){if(d._fireEvent("onBeforeUnload")===!1)return b&&b(!1),d;f=!0;try{j&&(j.fp_close(),d._fireEvent("onUnload"))}catch(e){}setTimeout(function(){j=null;a.innerHTML=o;f=!1;b&&b(!0)},50)}else b&&b(!1);return d},getClip:function(a){a===void 0&&(a=y);return i[a]},getCommonClip:function(){return u},getPlaylist:function(){return i},
getPlugin:function(a){var e=w[a];if(!e&&d.isLoaded()){var c=d._api().fp_getPlugin(a);c&&(e=new b(a,c,d),w[a]=e)}return e},getScreen:function(){return d.getPlugin("screen")},getControls:function(){return d.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return d.getPlugin("logo")._fireEvent("onUpdate")}catch(a){}},getPlay:function(){return d.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(a){return a?n(e):e},getFlashParams:function(){return h},loadPlugin:function(a,
e,c,h){typeof c=="function"&&(h=c,c={});var u=h?s():"_";d._api().fp_loadPlugin(a,e,c,u);e={};e[u]=h;h=new b(a,null,d,e);return w[a]=h},getState:function(){return d.isLoaded()?j.fp_getState():-1},play:function(a,b){var e=function(){a!==void 0?d._api().fp_play(a,b):d._api().fp_play()};d.isLoaded()?e():f?setTimeout(function(){d.play(a,b)},50):d.load(function(){e()});return d},getVersion:function(){if(d.isLoaded()){var a=j.fp_getVersion();a.push("flowplayer.js 3.2.6");return a}return"flowplayer.js 3.2.6"},
_api:function(){if(!d.isLoaded())throw"Flowplayer "+d.id()+" not loaded when calling an API method";return j},setClip:function(a){d.setPlaylist([a]);return d},getIndex:function(){return v},_swfHeight:function(){return j.clientHeight}});k("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut".split(","),function(){var a="on"+this;if(a.indexOf("*")!=-1){var a=a.slice(0,a.length-1),b="onBefore"+a.slice(2);d[b]=function(a){m(p,
b,a);return d}}d[a]=function(b){m(p,a,b);return d}});k("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled".split(","),function(){var a=this;d[a]=function(b,e){if(!d.isLoaded())return d;var c=null,c=b!==void 0&&e!==void 0?j["fp_"+a](b,e):b===void 0?j["fp_"+a]():j["fp_"+a](b);return c==="undefined"||
c===void 0?d:c}});d._fireEvent=function(a){typeof a=="string"&&(a=[a]);var b=a[0],c=a[1],h=a[2],t=a[3],f=0;e.debug&&console.log("$f.fireEvent",[].slice.call(a));!d.isLoaded()&&b=="onLoad"&&c=="player"&&(j=j||document.getElementById(x),q=d._swfHeight(),k(i,function(){this._fireEvent("onLoad")}),k(w,function(a,b){b._fireEvent("onUpdate")}),u._fireEvent("onLoad"));if(!(b=="onLoad"&&c!="player")){if(b=="onError"&&(typeof c=="string"||typeof c=="number"&&typeof h=="number"))c=h,h=t;if(b=="onContextMenu")k(e.contextMenu[c],
function(a,b){b.call(d)});else if(b=="onPluginEvent"||b=="onBeforePluginEvent"){if(t=w[c.name||c])return t._fireEvent("onUpdate",c),t._fireEvent(h,a.slice(3))}else{if(b=="onPlaylistReplace"){i=[];var l=0;k(c,function(){i.push(new g(this,l++,d))})}if(b=="onClipAdd"){if(c.isInStream)return;c=new g(c,h,d);i.splice(h,0,c);for(f=h+1;f<i.length;f++)i[f].index++}var v=!0;if(typeof c=="number"&&c<i.length&&(y=c,(a=i[c])&&(v=a._fireEvent(b,h,t)),!a||v!==!1))v=u._fireEvent(b,h,t,a);k(p[b],function(){v=this.call(d,
c,h);this.cached&&p[b].splice(f,1);if(v===!1)return!1;f++});return v}}};if(typeof a=="string"){var A=document.getElementById(a);if(!A)throw"Flowplayer cannot access element: "+a;a=A}(function(){function j(a){var b=d.hasiPadSupport&&d.hasiPadSupport();if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(i[0].url)&&!b)return!0;!d.isLoaded()&&d._fireEvent("onBeforeClick")!==!1&&d.load();return r(a)}$f(a)?($f(a).getParent().innerHTML="",v=$f(a).getIndex(),c[v]=d):(c.push(d),v=c.length-1);
z=parseInt(a.style.height,10)||a.clientHeight;t=a.id||"fp"+s();x=h.id||t+"_api";h.id=x;e.playerId=t;typeof e=="string"&&(e={clip:{url:e}});if(typeof e.clip=="string")e.clip={url:e.clip};e.clip=e.clip||{};if(a.getAttribute("href",2)&&!e.clip.url)e.clip.url=a.getAttribute("href",2);u=new g(e.clip,-1,d);e.playlist=e.playlist||[e.clip];var f=0;k(e.playlist,function(){var a=this;typeof a=="object"&&a.length&&(a={url:""+a});k(e.clip,function(b,c){c!==void 0&&a[b]===void 0&&typeof c!="function"&&(a[b]=c)});
e.playlist[f]=a;a=new g(a,f,d);i.push(a);f++});k(e,function(a,b){if(typeof b=="function"){if(u[a])u[a](b);else m(p,a,b);delete e[a]}});k(e.plugins,function(a,c){c&&(w[a]=new b(a,c,d))});if(!e.plugins||e.plugins.controls===void 0)w.controls=new b("controls",null,d);w.canvas=new b("canvas",null,d);o=a.innerHTML;setTimeout(function(){o.replace(/\s/g,"")!==""?a.addEventListener?a.addEventListener("click",j,!1):a.attachEvent&&a.attachEvent("onclick",j):(a.addEventListener&&a.addEventListener("click",r,
!1),d.load())},0)})()}function q(a){this.length=a.length;this.each=function(b){k(a,b)};this.size=function(){return a.length}}var g=function(a,b,c){var d=this,j={},f={};d.index=b;typeof a=="string"&&(a={url:a});l(this,a,!0);k("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop".split(","),function(){var a="on"+this;if(a.indexOf("*")!=-1){var a=a.slice(0,a.length-1),i="onBefore"+a.slice(2);d[i]=function(a){m(f,i,a);return d}}d[a]=function(b){m(f,a,b);
return d};b==-1&&(d[i]&&(c[i]=d[i]),d[a]&&(c[a]=d[a]))});l(this,{onCuepoint:function(a,i){if(arguments.length==1)return j.embedded=[null,a],d;typeof a=="number"&&(a=[a]);var f=s();j[f]=[a,i];c.isLoaded()&&c._api().fp_addCuepoints(a,b,f);return d},update:function(a){l(d,a);c.isLoaded()&&c._api().fp_updateClip(a,b);var i=c.getConfig();l(b==-1?i.clip:i.playlist[b],a,!0)},_fireEvent:function(a,i,g,p){if(a=="onLoad")return k(j,function(a,d){d[0]&&c._api().fp_addCuepoints(d[0],b,a)}),!1;p=p||d;if(a=="onCuepoint"){var t=
j[i];if(t)return t[1].call(c,p,g)}if(i&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(a)!=-1&&(l(p,i),i.metaData))p.duration?p.fullDuration=i.metaData.duration:p.duration=i.metaData.duration;var x=!0;k(f[a],function(){x=this.call(c,p,i,g)});return x}});if(a.onCuepoint){var g=a.onCuepoint;d.onCuepoint.apply(d,typeof g=="function"?[g]:g);delete a.onCuepoint}k(a,function(b,c){typeof c=="function"&&(m(f,b,c),delete a[b])});if(b==-1)c.onCuepoint=this.onCuepoint},b=function(a,b,c,d){var j=
this,f={},g=!1;d&&l(f,d);k(b,function(a,c){typeof c=="function"&&(f[a]=c,delete b[a])});l(this,{animate:function(d,i,g){if(!d)return j;typeof i=="function"&&(g=i,i=500);if(typeof d=="string"){var k=d,d={};d[k]=i;i=500}if(g){var t=s();f[t]=g}i===void 0&&(i=500);b=c._api().fp_animate(a,d,i,t);return j},css:function(d,f){if(f!==void 0){var g={};g[d]=f;d=g}b=c._api().fp_css(a,d);l(j,b);return j},show:function(){this.display="block";c._api().fp_showPlugin(a);return j},hide:function(){this.display="none";
c._api().fp_hidePlugin(a);return j},toggle:function(){this.display=c._api().fp_togglePlugin(a);return j},fadeTo:function(b,d,h){typeof d=="function"&&(h=d,d=500);if(h){var g=s();f[g]=h}this.display=c._api().fp_fadeTo(a,b,d,g);this.opacity=b;return j},fadeIn:function(a,b){return j.fadeTo(1,a,b)},fadeOut:function(a,b){return j.fadeTo(0,a,b)},getName:function(){return a},getPlayer:function(){return c},_fireEvent:function(b,d){if(b=="onUpdate"){var h=c._api().fp_getPlugin(a);if(!h)return;l(j,h);delete j.methods;
g||(k(h.methods,function(){var b=""+this;j[b]=function(){var d=[].slice.call(arguments),d=c._api().fp_invoke(a,b,d);return d==="undefined"||d===void 0?j:d}}),g=!0)}return(h=f[b])?(h=h.apply(j,d),b.slice(0,1)=="_"&&delete f[b],h):j}})},c=[];window.flowplayer=window.$f=function(){var a=null,b=arguments[0];if(!arguments.length)return k(c,function(){if(this.isLoaded())return a=this,!1}),a||c[0];if(arguments.length==1)if(typeof b=="number")return c[b];else{if(b=="*")return new q(c);k(c,function(){if(this.id()==
b.id||this.id()==b||this.getParent()==b)return a=this,!1});return a}if(arguments.length>1){var e=arguments[1],d=arguments.length==3?arguments[2]:{};typeof e=="string"&&(e={src:e});e=l({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:!1},e);if(typeof b=="string")if(b.indexOf(".")!=-1){var g=[];k(f(b),function(){g.push(new o(this,n(e),n(d)))});return new q(g)}else{var m=document.getElementById(b);return new o(m!==null?m:b,e,d)}else if(b)return new o(b,
e,d)}return null};l(window.$f,{fireEvent:function(){var a=[].slice.call(arguments),b=$f(a[0]);return b?b._fireEvent(a.slice(1)):null},addPlugin:function(a,b){o.prototype[a]=b;return $f},each:k,extend:l});if(typeof jQuery=="function")jQuery.fn.flowplayer=function(a,b){if(!arguments.length||typeof arguments[0]=="number"){var c=[];this.each(function(){var a=$f(this);a&&c.push(a)});return arguments.length?c[arguments[0]]:new q(c)}return this.each(function(){$f(this,n(a),b?n(b):{})})}})();
(function(){function n(){if(g.done)return!1;var b=document;if(b&&b.getElementsByTagName&&b.getElementById&&b.body){clearInterval(g.timer);g.timer=null;for(b=0;b<g.ready.length;b++)g.ready[b].call();g.ready=null;g.done=!0}}function k(b,c){if(c)for(key in c)c.hasOwnProperty(key)&&(b[key]=c[key]);return b}function l(b){switch(f(b)){case "string":return b=b.replace(RegExp('(["\\\\])',"g"),"\\$1"),b=b.replace(/^\s?(\d+)%/,"$1pct"),'"'+b+'"';case "array":return"["+r(b,function(a){return l(a)}).join(",")+
"]";case "function":return'"function()"';case "object":var c=[],a;for(a in b)b.hasOwnProperty(a)&&c.push('"'+a+'":'+l(b[a]));return"{"+c.join(",")+"}"}return String(b).replace(/\s/g," ").replace(/\'/g,'"')}function f(b){if(b===null||b===void 0)return!1;var c=typeof b;return c=="object"&&b.push?"array":c}function r(b,c){var a=[],f;for(f in b)b.hasOwnProperty(f)&&(a[f]=c(b[f]));return a}function m(b,c){var a=k({},b),f=document.all,e='<object width="'+a.width+'" height="'+a.height+'"';if(f&&!a.id)a.id=
"_"+(""+Math.random()).substring(9);a.id&&(e+=' id="'+a.id+'"');a.cachebusting&&(a.src+=(a.src.indexOf("?")!=-1?"&":"?")+Math.random());e+=a.w3c||!f?' data="'+a.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';e+=">";if(a.w3c||f)e+='<param name="movie" value="'+a.src+'" />';a.width=a.height=a.id=a.w3c=a.src=null;for(var d in a)a[d]!==null&&(e+='<param name="'+d+'" value="'+a[d]+'" />');a="";if(c){for(var g in c)c[g]!==null&&(a+=g+"="+(typeof c[g]==
"object"?l(c[g]):c[g])+"&");a=a.substring(0,a.length-1);e+='<param name="flashvars" value=\''+a+"' />"}e+="</object>";return e}function s(b,c,a){var f=flashembed.getVersion();k(this,{getContainer:function(){return b},getConf:function(){return c},getVersion:function(){return f},getFlashvars:function(){return a},getApi:function(){return b.firstChild},getHTML:function(){return m(c,a)}});var e=c.version,d=c.expressInstall,g=!e||flashembed.isSupported(e);if(g)c.onFail=c.version=c.expressInstall=null,b.innerHTML=
m(c,a);else if(e&&d&&flashembed.isSupported([6,65]))k(c,{src:d}),a={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title},b.innerHTML=m(c,a);else if(b.innerHTML.replace(/\s/g,"")===""&&(b.innerHTML="<h2>Flash version "+e+" or greater is required</h2><h3>"+(f[0]>0?"Your version is "+f:"You have no flash plugin installed")+"</h3>"+(b.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>"),
b.tagName=="A"))b.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"};if(!g&&c.onFail&&(e=c.onFail.call(this),typeof e=="string"))b.innerHTML=e;document.all&&(window[c.id]=document.getElementById(c.id))}var o=typeof jQuery=="function",q={width:"100%",height:"100%",allowfullscreen:!0,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:!1,cachebusting:!1};if(o)jQuery.tools=jQuery.tools||{},jQuery.tools.flashembed={version:"1.0.4",conf:q};
var g=o?jQuery:function(b){if(g.done)return b();g.timer?g.ready.push(b):(g.ready=[b],g.timer=setInterval(n,13))};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});window.flashembed=function(b,c,a){if(typeof b=="string"){var f=document.getElementById(b);if(f)b=f;else{g(function(){flashembed(b,c,a)});return}}if(b)return typeof c=="string"&&(c={src:c}),f=k({},q),k(f,c),new s(b,f,a)};k(window.flashembed,{getVersion:function(){var b=
[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var c=navigator.plugins["Shockwave Flash"].description;typeof c!="undefined"&&(c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),b=parseInt(c.replace(/^(.*)\..*$/,"$1"),10),c=/r/.test(c)?parseInt(c.replace(/^.*r(.*)$/,"$1"),10):0,b=[b,c])}else if(window.ActiveXObject){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(a){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),b=[6,0],c.AllowScriptAccess="always"}catch(f){if(b[0]==
6)return b}try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}typeof c=="object"&&(c=c.GetVariable("$version"),typeof c!="undefined"&&(c=c.replace(/^\S+\s+(.*)$/,"$1").split(","),b=[parseInt(c[0],10),parseInt(c[2],10)]))}return b},isSupported:function(b){var c=flashembed.getVersion();return c[0]>b[0]||c[0]==b[0]&&c[1]>=b[1]},domReady:g,asString:l,getHTML:m});if(o)jQuery.fn.flashembed=function(b,c){var a=null;this.each(function(){a=flashembed(this,b,c)});return b.api===!1?this:a}})();(function(){function n(){if(!o&&(o=!0,q)){for(var f=0;f<q.length;f++)q[f].call(window,[]);q=[]}}function k(f){var b=window.onload;window.onload=typeof window.onload!="function"?f:function(){b&&b();f()}}function l(){if(!s){s=!0;document.addEventListener&&!m.opera&&document.addEventListener("DOMContentLoaded",n,!1);m.msie&&window==top&&function(){if(!o){try{document.documentElement.doScroll("left")}catch(b){setTimeout(arguments.callee,0);return}n()}}();m.opera&&document.addEventListener("DOMContentLoaded",
function(){if(!o){for(var b=0;b<document.styleSheets.length;b++)if(document.styleSheets[b].disabled){setTimeout(arguments.callee,0);return}n()}},!1);if(m.safari){var f;(function(){if(!o)if(document.readyState!="loaded"&&document.readyState!="complete")setTimeout(arguments.callee,0);else{if(f===void 0){for(var b=document.getElementsByTagName("link"),c=0;c<b.length;c++)b[c].getAttribute("rel")=="stylesheet"&&f++;b=document.getElementsByTagName("style");f+=b.length}document.styleSheets.length!=f?setTimeout(arguments.callee,
0):n()}})()}k(n)}}var f=window.DomReady={},r=navigator.userAgent.toLowerCase(),m={version:(r.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(r),opera:/opera/.test(r),msie:/msie/.test(r)&&!/opera/.test(r),mozilla:/mozilla/.test(r)&&!/(compatible|webkit)/.test(r)},s=!1,o=!1,q=[];f.ready=function(f){l();o?f.call(window,[]):q.push(function(){return f.call(window,[])})};l()})();(function(n,k){function l(a,b){for(var c=[],d=0;d<a.length;d++)c.push(a[d]);for(d=0;d<c.length;d++)b(c[d])}function f(){l([g,b],function(a){l(k.getElementsByTagName(a),function(b){function c(a){return b.canPlayType(a)||e&&a.search("mp4")>-1}var d=!0,e=navigator.userAgent.toLowerCase().search("android")>-1;b.canPlayType&&(b.src?c(r(a,b.src))&&(d=!1):l(b.getElementsByTagName("source"),function(b){c(r(a,b.src,b.type))&&(d=!1)}));d?f.createFallback(a,b):e&&b.addEventListener("click",function(){b.play()},
!1)})})}function r(a,b,c){return c||i[a][b.split(".").slice(-1)[0]]||C[a]}function m(a,b){var c=a.getAttribute(b);return c==!0||typeof c=="string"}function s(a){return a.substr(0,1)=="/"?w+a:a.substr(0,1)=="."||!a.match(/^\s*\w+:\/\//)?p+a:a}function o(a,b,c){var d=a.getAttribute(b);if(d)return d+"px";if(a.currentStyle)a=a.currentStyle[b];else if(n.getComputedStyle)a=k.defaultView.getComputedStyle(a,null).getPropertyValue(b);else return c;return a=="auto"?c:a}function q(a){return a.match(/\s*([\w-]+\/[\w-]+)(;|\s|$)/)[1]}
var g="video",b="audio";k.createElement(g).canPlayType||l(["video","audio","source"],function(a){k.createElement(a)});f.flowplayerSwf="index_files/html5media/flowplayer.swf";f.flowplayerAudioSwf="index_files/html5media/flowplayer.audio.swf";f.flowplayerControlsSwf="index_files/html5media/flowplayer.controls.swf";var c=f.THEORA_FORMAT='video/ogg; codecs="theora, vorbis"',a=f.H264_FORMAT='video/mp4; codecs="avc1.42E01E, mp4a.40.2"',h=f.VORBIS_FORMAT='audio/ogg; codecs="vorbis"',e=f.WEBM_FORMAT="video/webm;",
d=f.M4A_FORMAT="audio/x-m4a;",j=f.MP3_FORMAT="audio/mpeg;",B=f.WAV_FORMAT='audio/wav; codecs="1"',C=f.assumedFormats={video:a,audio:j},u=f.fallbackFormats=[f.H264_FORMAT,f.M4A_FORMAT,f.MP3_FORMAT],i=f.fileExtensions={video:{ogg:c,ogv:c,avi:a,mp4:a,mkv:a,h264:a,264:a,avc:a,m4v:a,"3gp":a,"3gpp":a,"3g2":a,mpg:a,mpeg:a,webm:e},audio:{ogg:h,oga:h,aac:d,m4a:d,mp3:j,wav:B}},w=n.location.protocol+"//"+n.location.host,p=String(n.location);l(k.getElementsByTagName("base"),function(a){if(a.href)p=a.href});p=
p.split("/").slice(0,-1).join("/")+"/";f.configureFlowplayer=function(a,b,c){return c};f.createFallback=function(a,b){var c=m(b,"controls"),d=b.getAttribute("poster")||"",e=b.getAttribute("src")||"",i;e?i=r(a,e):l(b.getElementsByTagName("source"),function(b){var c=b.getAttribute("src");c&&!e&&l(u,function(d){i=r(a,c,b.getAttribute("type"));q(i)==q(d)&&(e=c)})});var h=k.createElement("span");h.id=b.id;h.className=b.className;h.title=b.title;h.style.display="block";h.style.width=o(b,"width","300px");
h.style.height=a=="audio"?"26px":o(b,"height","200px");b.parentNode.replaceChild(h,b);var n=(b.getAttribute("preload")||"").toLowerCase(),p=[];d&&p.push({url:s(d)});e&&p.push({url:s(e),autoPlay:m(b,"autoplay"),autoBuffering:m(b,"autobuffer")||m(b,"preload")&&(n==""||n=="auto"),onBeforeFinish:function(){return!m(b,"loop")}});d={controls:c&&{url:s(f.flowplayerControlsSwf),fullscreen:!1,autoHide:a==g&&"always"||"never"}||null};if(q(i)==q(j)&&(d.audio={url:s(f.flowplayerAudioSwf)},!c))d.controls={url:s(f.flowplayerControlsSwf),
display:"none"},h.style.height=0;c={play:null,playlist:p,clip:{scaling:"fit",fadeInSpeed:0,fadeOutSpeed:0},plugins:d};f.configureFlowplayer(a,b,c);flowplayer(h,{src:s(f.flowplayerSwf),wmode:"opaque"},c)};n.jQuery?jQuery(f):n.DomReady&&DomReady.ready(f);n.html5media=f})(this,document);

$(document).ready(function() {	
	var poster_src = $("#poster_stacks_in_167_page7 img").attr("src");
	if (poster_src) { 
	    $("#html5video_stacks_in_167_page7").attr('poster', poster_src);	
	}
	$('#html5video_stacks_in_167_page7 source').each(function() {
		if( $(this).attr('src').length == 0 ) { 
			$(this).remove(); 
		}
	});
});
//-- End HTML5 Video Stack --//

	return stack;
})(stacks.stacks_in_167_page7);


// Javascript for stacks_in_534_page7
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_534_page7 = {};

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_534_page7 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

//-- Exposé Stack v1.0.3 by Joe Workman --//
/* jQuery Tools Overlay 1.2.5 - The missing UI library for the Web */
(function(a){function t(d,b){var c=this,j=d.add(c),o=a(window),k,f,m,g=a.tools.expose&&(b.mask||b.expose),n=Math.random().toString().slice(10);if(g){if(typeof g=="string")g={color:g};g.closeOnClick=g.closeOnEsc=false}var p=b.target||d.attr("rel");f=p?a(p):d;if(!f.length)throw"Could not find Overlay: "+p;d&&d.index(f)==-1&&d.click(function(e){c.load(e);return e.preventDefault()});a.extend(c,{load:function(e){if(c.isOpened())return c;var h=q[b.effect];if(!h)throw'Overlay: cannot find effect : "'+b.effect+
'"';b.oneInstance&&a.each(s,function(){this.close(e)});e=e||a.Event();e.type="onBeforeLoad";j.trigger(e);if(e.isDefaultPrevented())return c;m=true;g&&a(f).expose(g);var i=b.top,r=b.left,u=f.outerWidth({margin:true}),v=f.outerHeight({margin:true});if(typeof i=="string")i=i=="center"?Math.max((o.height()-v)/2,0):parseInt(i,10)/100*o.height();if(r=="center")r=Math.max((o.width()-u)/2,0);h[0].call(c,{top:i,left:r},function(){if(m){e.type="onLoad";j.trigger(e)}});g&&b.closeOnClick&&a.mask.getMask().one("click",
c.close);b.closeOnClick&&a(document).bind("click."+n,function(l){a(l.target).parents(f).length||c.close(l)});b.closeOnEsc&&a(document).bind("keydown."+n,function(l){l.keyCode==27&&c.close(l)});return c},close:function(e){if(!c.isOpened())return c;e=e||a.Event();e.type="onBeforeClose";j.trigger(e);if(!e.isDefaultPrevented()){m=false;q[b.effect][1].call(c,function(){e.type="onClose";j.trigger(e)});a(document).unbind("click."+n).unbind("keydown."+n);g&&a.mask.close();return c}},getOverlay:function(){return f},
getTrigger:function(){return d},getClosers:function(){return k},isOpened:function(){return m},getConf:function(){return b}});a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(e,h){a.isFunction(b[h])&&a(c).bind(h,b[h]);c[h]=function(i){i&&a(c).bind(h,i);return c}});k=f.find(b.close||".close");if(!k.length&&!b.close){k=a('<a class="close"></a>');f.prepend(k)}k.click(function(e){c.close(e)});b.load&&c.load()}a.tools=a.tools||{version:"1.2.5"};a.tools.overlay={addEffect:function(d,
b,c){q[d]=[b,c]},conf:{close:null,closeOnClick:true,closeOnEsc:true,closeSpeed:"fast",effect:"default",fixed:!a.browser.msie||a.browser.version>6,left:"center",load:false,mask:null,oneInstance:true,speed:"normal",target:null,top:"10%"}};var s=[],q={};a.tools.overlay.addEffect("default",function(d,b){var c=this.getConf(),j=a(window);if(!c.fixed){d.top+=j.scrollTop();d.left+=j.scrollLeft()}d.position=c.fixed?"fixed":"absolute";this.getOverlay().css(d).fadeIn(c.speed,b)},function(d){this.getOverlay().fadeOut(this.getConf().closeSpeed,
d)});a.fn.overlay=function(d){var b=this.data("overlay");if(b)return b;if(a.isFunction(d))d={onBeforeLoad:d};d=a.extend(true,{},a.tools.overlay.conf,d);this.each(function(){b=new t(a(this),d);s.push(b);a(this).data("overlay",b)});return d.api?b:this}})(jQuery);
(function(b){function k(){if(b.browser.msie){var a=b(document).height(),d=b(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-d<20?d:a]}return[b(document).width(),b(document).height()]}function h(a){if(a)return a.call(b.mask)}b.tools=b.tools||{version:"1.2.5"};var l;l=b.tools.expose={conf:{maskId:"exposeMask",loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,startOpacity:0,color:"#fff",onLoad:null,
onClose:null}};var c,i,e,g,j;b.mask={load:function(a,d){if(e)return this;if(typeof a=="string")a={color:a};a=a||g;g=a=b.extend(b.extend({},l.conf),a);c=b("#"+a.maskId);if(!c.length){c=b("<div/>").attr("id",a.maskId);b("body").append(c)}var m=k();c.css({position:"absolute",top:0,left:0,width:m[0],height:m[1],display:"none",opacity:a.startOpacity,zIndex:a.zIndex});a.color&&c.css("backgroundColor",a.color);if(h(a.onBeforeLoad)===false)return this;a.closeOnEsc&&b(document).bind("keydown.mask",function(f){f.keyCode==
27&&b.mask.close(f)});a.closeOnClick&&c.bind("click.mask",function(f){b.mask.close(f)});b(window).bind("resize.mask",function(){b.mask.fit()});if(d&&d.length){j=d.eq(0).css("zIndex");b.each(d,function(){var f=b(this);/relative|absolute|fixed/i.test(f.css("position"))||f.css("position","relative")});i=d.css({zIndex:Math.max(a.zIndex+1,j=="auto"?0:j)})}c.css({display:"block"}).fadeTo(a.loadSpeed,a.opacity,function(){b.mask.fit();h(a.onLoad);e="full"});e=true;return this},close:function(){if(e){if(h(g.onBeforeClose)===
false)return this;c.fadeOut(g.closeSpeed,function(){h(g.onClose);i&&i.css({zIndex:j});e=false});b(document).unbind("keydown.mask");c.unbind("click.mask");b(window).unbind("resize.mask")}return this},fit:function(){if(e){var a=k();c.css({width:a[0],height:a[1]})}},getMask:function(){return c},isLoaded:function(a){return a?e=="full":e},getConf:function(){return g},getExposed:function(){return i}};b.fn.mask=function(a){b.mask.load(a);return this};b.fn.expose=function(a){b.mask.load(a,this);return this}})(jQuery);

jQuery.fn.exists = function(){return jQuery(this).length>0;}

$(document).ready(function() {
	var bg_color = $('#stacks_in_534_page7').css('background-color');
	if (bg_color) { 
		$('#stacks_in_534_page7').css({'background-color': 'transparent'});	
		$('#expose_stacks_in_534_page7').css({'background-color': bg_color });	
	}

	var bg_border_style = $('#stacks_in_534_page7').css('border-bottom-style');
	if (bg_border_style) { 
		var bg_border_color  = $('#stacks_in_534_page7').css('border-bottom-color');
		var bg_border_top 	 = $('#stacks_in_534_page7').css('border-top-width');
		var bg_border_right  = $('#stacks_in_534_page7').css('border-right-width');
		var bg_border_bottom = $('#stacks_in_534_page7').css('border-bottom-width');
		var bg_border_left 	 = $('#stacks_in_534_page7').css('border-left-width');
		$('#stacks_in_534_page7').css({'border-width':0});	
		$('#expose_stacks_in_534_page7').css({	'border-style':bg_border_style,
							 		'border-color':bg_border_color,
									'border-top-width':bg_border_top,
									'border-right-width':bg_border_right,
									'border-bottom-width':bg_border_bottom,	
									'border-left-width':bg_border_left
		});	
	}
	var custom_bg_src = $("#custom_bg_stacks_in_534_page7 img").attr("src");
	if (custom_bg_src) { 
	    $("#expose_stacks_in_534_page7").css({'background-image':'url(' + custom_bg_src + ')'});
	    var repeat_x = true;
	    var repeat_y = true;
	    
	    if (repeat_x && repeat_y) {
		    var bg_repeat = 'repeat';
	    }
	    else if (repeat_y) {
		    var bg_repeat = 'repeat-y';
	    }
	    else {
		    var bg_repeat = 'repeat-x';
	    }
	    $("#expose_stacks_in_534_page7").css({'background-repeat':bg_repeat});
	}

	// Need to append this to body to fix issues with some themes hiding it behind overlay
	$('#expose_stacks_in_534_page7').appendTo('body');

    // Build the Expose Lightbox
    $(".expose_stacks_in_534_page7").overlay({	
    		mask: {color:'#3F3F3F', opacity:0.9},
			target:'#expose_stacks_in_534_page7',
			closeOnClick: true,
			closeOnEsc: true,
			effect:	'default',
			load: false,
			fixed: true,
			oneInstance: false,
			left: 'center',
			top: '20%',
			onLoad: function() {
				if ( $('#expose_stacks_in_534_page7 iframe.vimeo_player').exists()) {
				    var player = $f($('#expose_stacks_in_534_page7 .vimeo_player')[0])
				    player.api('play');
  				}
				if ( $('#expose_stacks_in_534_page7 div.youtube_player').exists()) {
				    $('#expose_stacks_in_534_page7 div.youtube_player').tubeplayer("play");
  				}
				if ( $('#expose_stacks_in_534_page7 video.html5video').exists()) {
				    $('#expose_stacks_in_534_page7 video.html5video').get(0).play();
  				}
				if ( $('#expose_stacks_in_534_page7 audio.html5audio').exists()) {
				    $('#expose_stacks_in_534_page7 audio.html5audio').get(0).play();
  				}
				if ( $('#expose_stacks_in_534_page7 .html5audio object').exists()) {
				    $('#expose_stacks_in_534_page7 .html5audio').flowplayer(0).play();
  				}
				if ( $('#expose_stacks_in_534_page7 .html5video object').exists()) {
				    $('#expose_stacks_in_534_page7 .html5video').flowplayer(0).play();
  				}
			},
			onClose: function() {
				if ( $('#expose_stacks_in_534_page7 iframe.vimeo_player').exists()) {
				    var player = $f($('#expose_stacks_in_534_page7 .vimeo_player')[0])
				    player.api('pause');
  				}
				if ( $('#expose_stacks_in_534_page7 div.youtube_player').exists()) {
				    $('#expose_stacks_in_534_page7 div.youtube_player').tubeplayer("pause");
  				}
				if ( $('#expose_stacks_in_534_page7 video.html5video').exists()) {
				    $('#expose_stacks_in_534_page7 video.html5video').get(0).pause();
  				}
				if ( $('#expose_stacks_in_534_page7 audio.html5audio').exists()) {
				    $('#expose_stacks_in_534_page7 audio.html5audio').get(0).pause();
  				}
				if ( $('#expose_stacks_in_534_page7 .html5audio object').exists()) {
				    $('#expose_stacks_in_534_page7 .html5audio').flowplayer(0).pause();
  				}
				if ( $('#expose_stacks_in_534_page7 .html5video object').exists()) {
				    $('#expose_stacks_in_534_page7 .html5video').flowplayer(0).pause();
  				}
			}
    });    
});
//-- End Exposé Stack --//

	return stack;
})(stacks.stacks_in_534_page7);


// Javascript for stacks_in_537_page7
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_537_page7 = {};

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_537_page7 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
$(document).ready(function() {

if (navigator.userAgent.match(/MSIE/i) != null) {


jQuery.url = function()
{
	var segments = {};
	
	var parsed = {};
	
	/**
    * Options object. Only the URI and strictMode values can be changed via the setters below.
    */
  	var options = {
	
		url : window.location, // default URI is the page in which the script is running
		
		strictMode: false, // 'loose' parsing by default
	
		key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"], // keys available to query 
		
		q: {
			name: "queryKey",
			parser: /(?:^|&)([^&=]*)=?([^&]*)/g
		},
		
		parser: {
			strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,  //less intuitive, more accurate to the specs
			loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ // more intuitive, fails on relative paths and deviates from specs
		}
		
	};
	
    /**
     * Deals with the parsing of the URI according to the regex above.
 	 * Written by Steven Levithan - see credits at top.
     */		
	var parseUri = function()
	{
		str = decodeURI( options.url );
		
		var m = options.parser[ options.strictMode ? "strict" : "loose" ].exec( str );
		var uri = {};
		var i = 14;

		while ( i-- ) {
			uri[ options.key[i] ] = m[i] || "";
		}

		uri[ options.q.name ] = {};
		uri[ options.key[12] ].replace( options.q.parser, function ( $0, $1, $2 ) {
			if ($1) {
				uri[options.q.name][$1] = $2;
			}
		});

		return uri;
	};

    /**
     * Returns the value of the passed in key from the parsed URI.
  	 * 
	 * @param string key The key whose value is required
     */		
	var key = function( key )
	{
		if ( ! parsed.length )
		{
			setUp(); // if the URI has not been parsed yet then do this first...	
		} 
		if ( key == "base" )
		{
			if ( parsed.port !== null && parsed.port !== "" )
			{
				return parsed.protocol+"://"+parsed.host+":"+parsed.port+"/";	
			}
			else
			{
				return parsed.protocol+"://"+parsed.host+"/";
			}
		}
	
		return ( parsed[key] === "" ) ? null : parsed[key];
	};
	
	/**
     * Returns the value of the required query string parameter.
  	 * 
	 * @param string item The parameter whose value is required
     */		
	var param = function( item )
	{
		if ( ! parsed.length )
		{
			setUp(); // if the URI has not been parsed yet then do this first...	
		}
		return ( parsed.queryKey[item] === null ) ? null : parsed.queryKey[item];
	};

    /**
     * 'Constructor' (not really!) function.
     *  Called whenever the URI changes to kick off re-parsing of the URI and splitting it up into segments. 
     */	
	var setUp = function()
	{
		parsed = parseUri();
		
		getSegments();	
	};
	
    /**
     * Splits up the body of the URI into segments (i.e. sections delimited by '/')
     */
	var getSegments = function()
	{
		var p = parsed.path;
		segments = []; // clear out segments array
		segments = parsed.path.length == 1 ? {} : ( p.charAt( p.length - 1 ) == "/" ? p.substring( 1, p.length - 1 ) : path = p.substring( 1 ) ).split("/");
	};
	
	return {
		
	    /**
	     * Sets the parsing mode - either strict or loose. Set to loose by default.
	     *
	     * @param string mode The mode to set the parser to. Anything apart from a value of 'strict' will set it to loose!
	     */
		setMode : function( mode )
		{
			strictMode = mode == "strict" ? true : false;
			return this;
		},
		
		/**
	     * Sets URI to parse if you don't want to to parse the current page's URI.
		 * Calling the function with no value for newUri resets it to the current page's URI.
	     *
	     * @param string newUri The URI to parse.
	     */		
		setUrl : function( newUri )
		{
			options.url = newUri === undefined ? window.location : newUri;
			setUp();
			return this;
		},		
		
		/**
	     * Returns the value of the specified URI segment. Segments are numbered from 1 to the number of segments.
		 * For example the URI http://test.com/about/company/ segment(1) would return 'about'.
		 *
		 * If no integer is passed into the function it returns the number of segments in the URI.
	     *
	     * @param int pos The position of the segment to return. Can be empty.
	     */	
		segment : function( pos )
		{
			if ( ! parsed.length )
			{
				setUp(); // if the URI has not been parsed yet then do this first...	
			} 
			if ( pos === undefined )
			{
				return segments.length;
			}
			return ( segments[pos] === "" || segments[pos] === undefined ) ? null : segments[pos];
		},
		
		attr : key, // provides public access to private 'key' function - see above
		
		param : param // provides public access to private 'param' function - see above
		
	};
	
}();


var yourfolder = jQuery.url.attr("directory");
if(yourfolder == "/"){yourfolder = ""};

var irbgimage = $("#stacks_in_537_page7 .stacks_in_537_page7imageroundr img").attr("src");
var irimagewidth = $("#stacks_in_537_page7 .stacks_in_537_page7imageroundr img").attr("width");
var irimageheight = $("#stacks_in_537_page7 .stacks_in_537_page7imageroundr img").attr("height");



var itsIEnine = navigator.userAgent.match(/MSIE 9/i) != null;


if(itsIEnine){
	$("#stacks_in_537_page7 .stacks_in_537_page7imageroundr").css({
	"width": irimagewidth + "px",
	"height": irimageheight + "px",
	"margin": "0 auto 0 auto",
	"background":"url("+irbgimage+")",
    "-webkit-border-radius" : "10px 10px 10px 10px",
    "-moz-border-radius" : "10px 10px 10px 10px",
    "border-radius" : "10px 10px 10px 10px"
    });
}
else{ 
$("#stacks_in_537_page7 .stacks_in_537_page7imageroundr img").css("visibility","hidden");

    $("#stacks_in_537_page7 .stacks_in_537_page7imageroundr").css({
    "width": irimagewidth + "px",
	"height": irimageheight + "px", 
    "margin": "0 auto 0 auto",
    "background":"url("+irbgimage+")",
    "-webkit-border-radius" : "10px 10px 10px 10px",
    "-moz-border-radius" : "10px 10px 10px 10px",
    "border-radius" : "10px 10px 10px 10px",
    "behavior":"url(" + yourfolder + "index_files/IRPIE.htc)", 
        "box-shadow" : "0px 5px 0px #000000 display:none;",
		        "-pie-box-shadow" : "0px 5px 0px #000000 display:none;"

	});
}

} // end if i.e. from the top if statment

});

	return stack;
})(stacks.stacks_in_537_page7);


// Javascript for stacks_in_542_page7
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_542_page7 = {};

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_542_page7 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

//-- HTML5 Video Stack v2.1.0 by Joe Workman --//
// This is a customized build of html5media - http://github.com/etianen/html5media/
(function(){function n(a){if(!a||typeof a!="object")return a;var b=new a.constructor,e;for(e in a)a.hasOwnProperty(e)&&(b[e]=n(a[e]));return b}function k(a,b){if(a){var e,d=0,c=a.length;if(c===void 0)for(e in a){if(b.call(a[e],e,a[e])===!1)break}else for(e=a[0];d<c&&b.call(e,d,e)!==!1;e=a[++d]);return a}}function l(a,b,e){if(typeof b!="object")return a;a&&b&&k(b,function(d,b){if(!e||typeof b!="function")a[d]=b});return a}function f(a){var b=a.indexOf(".");if(b!=-1){var e=a.slice(0,b)||"*",d=a.slice(b+
1,a.length),c=[];k(document.getElementsByTagName(e),function(){this.className&&this.className.indexOf(d)!=-1&&c.push(this)});return c}}function r(a){a=a||window.event;a.preventDefault?(a.stopPropagation(),a.preventDefault()):(a.returnValue=!1,a.cancelBubble=!0);return!1}function m(a,b,e){a[b]=a[b]||[];a[b].push(e)}function s(){return"_"+(""+Math.random()).slice(2,10)}function o(a,h,e){var d=this,j=null,f=!1,o,u,i=[],w={},p={},t,x,v,y,q,z;l(d,{id:function(){return t},isLoaded:function(){return j!==
null&&j.fp_play!==void 0&&!f},getParent:function(){return a},hide:function(b){if(b)a.style.height="0px";if(d.isLoaded())j.style.height="0px";return d},show:function(){a.style.height=z+"px";if(d.isLoaded())j.style.height=q+"px";return d},isHidden:function(){return d.isLoaded()&&parseInt(j.style.height,10)===0},load:function(b){if(!d.isLoaded()&&d._fireEvent("onBeforeLoad")!==!1){var u=0;k(c,function(){this.unload(function(){if(++u==c.length){if((o=a.innerHTML)&&!flashembed.isSupported(h.version))a.innerHTML=
"";if(b)b.cached=!0,m(p,"onLoad",b);flashembed(a,h,{config:e})}})})}return d},unload:function(b){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent))return b&&b(!1),d;if(o.replace(/\s/g,"")!==""){if(d._fireEvent("onBeforeUnload")===!1)return b&&b(!1),d;f=!0;try{j&&(j.fp_close(),d._fireEvent("onUnload"))}catch(e){}setTimeout(function(){j=null;a.innerHTML=o;f=!1;b&&b(!0)},50)}else b&&b(!1);return d},getClip:function(a){a===void 0&&(a=y);return i[a]},getCommonClip:function(){return u},getPlaylist:function(){return i},
getPlugin:function(a){var e=w[a];if(!e&&d.isLoaded()){var c=d._api().fp_getPlugin(a);c&&(e=new b(a,c,d),w[a]=e)}return e},getScreen:function(){return d.getPlugin("screen")},getControls:function(){return d.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return d.getPlugin("logo")._fireEvent("onUpdate")}catch(a){}},getPlay:function(){return d.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(a){return a?n(e):e},getFlashParams:function(){return h},loadPlugin:function(a,
e,c,h){typeof c=="function"&&(h=c,c={});var u=h?s():"_";d._api().fp_loadPlugin(a,e,c,u);e={};e[u]=h;h=new b(a,null,d,e);return w[a]=h},getState:function(){return d.isLoaded()?j.fp_getState():-1},play:function(a,b){var e=function(){a!==void 0?d._api().fp_play(a,b):d._api().fp_play()};d.isLoaded()?e():f?setTimeout(function(){d.play(a,b)},50):d.load(function(){e()});return d},getVersion:function(){if(d.isLoaded()){var a=j.fp_getVersion();a.push("flowplayer.js 3.2.6");return a}return"flowplayer.js 3.2.6"},
_api:function(){if(!d.isLoaded())throw"Flowplayer "+d.id()+" not loaded when calling an API method";return j},setClip:function(a){d.setPlaylist([a]);return d},getIndex:function(){return v},_swfHeight:function(){return j.clientHeight}});k("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut".split(","),function(){var a="on"+this;if(a.indexOf("*")!=-1){var a=a.slice(0,a.length-1),b="onBefore"+a.slice(2);d[b]=function(a){m(p,
b,a);return d}}d[a]=function(b){m(p,a,b);return d}});k("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled".split(","),function(){var a=this;d[a]=function(b,e){if(!d.isLoaded())return d;var c=null,c=b!==void 0&&e!==void 0?j["fp_"+a](b,e):b===void 0?j["fp_"+a]():j["fp_"+a](b);return c==="undefined"||
c===void 0?d:c}});d._fireEvent=function(a){typeof a=="string"&&(a=[a]);var b=a[0],c=a[1],h=a[2],t=a[3],f=0;e.debug&&console.log("$f.fireEvent",[].slice.call(a));!d.isLoaded()&&b=="onLoad"&&c=="player"&&(j=j||document.getElementById(x),q=d._swfHeight(),k(i,function(){this._fireEvent("onLoad")}),k(w,function(a,b){b._fireEvent("onUpdate")}),u._fireEvent("onLoad"));if(!(b=="onLoad"&&c!="player")){if(b=="onError"&&(typeof c=="string"||typeof c=="number"&&typeof h=="number"))c=h,h=t;if(b=="onContextMenu")k(e.contextMenu[c],
function(a,b){b.call(d)});else if(b=="onPluginEvent"||b=="onBeforePluginEvent"){if(t=w[c.name||c])return t._fireEvent("onUpdate",c),t._fireEvent(h,a.slice(3))}else{if(b=="onPlaylistReplace"){i=[];var l=0;k(c,function(){i.push(new g(this,l++,d))})}if(b=="onClipAdd"){if(c.isInStream)return;c=new g(c,h,d);i.splice(h,0,c);for(f=h+1;f<i.length;f++)i[f].index++}var v=!0;if(typeof c=="number"&&c<i.length&&(y=c,(a=i[c])&&(v=a._fireEvent(b,h,t)),!a||v!==!1))v=u._fireEvent(b,h,t,a);k(p[b],function(){v=this.call(d,
c,h);this.cached&&p[b].splice(f,1);if(v===!1)return!1;f++});return v}}};if(typeof a=="string"){var A=document.getElementById(a);if(!A)throw"Flowplayer cannot access element: "+a;a=A}(function(){function j(a){var b=d.hasiPadSupport&&d.hasiPadSupport();if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(i[0].url)&&!b)return!0;!d.isLoaded()&&d._fireEvent("onBeforeClick")!==!1&&d.load();return r(a)}$f(a)?($f(a).getParent().innerHTML="",v=$f(a).getIndex(),c[v]=d):(c.push(d),v=c.length-1);
z=parseInt(a.style.height,10)||a.clientHeight;t=a.id||"fp"+s();x=h.id||t+"_api";h.id=x;e.playerId=t;typeof e=="string"&&(e={clip:{url:e}});if(typeof e.clip=="string")e.clip={url:e.clip};e.clip=e.clip||{};if(a.getAttribute("href",2)&&!e.clip.url)e.clip.url=a.getAttribute("href",2);u=new g(e.clip,-1,d);e.playlist=e.playlist||[e.clip];var f=0;k(e.playlist,function(){var a=this;typeof a=="object"&&a.length&&(a={url:""+a});k(e.clip,function(b,c){c!==void 0&&a[b]===void 0&&typeof c!="function"&&(a[b]=c)});
e.playlist[f]=a;a=new g(a,f,d);i.push(a);f++});k(e,function(a,b){if(typeof b=="function"){if(u[a])u[a](b);else m(p,a,b);delete e[a]}});k(e.plugins,function(a,c){c&&(w[a]=new b(a,c,d))});if(!e.plugins||e.plugins.controls===void 0)w.controls=new b("controls",null,d);w.canvas=new b("canvas",null,d);o=a.innerHTML;setTimeout(function(){o.replace(/\s/g,"")!==""?a.addEventListener?a.addEventListener("click",j,!1):a.attachEvent&&a.attachEvent("onclick",j):(a.addEventListener&&a.addEventListener("click",r,
!1),d.load())},0)})()}function q(a){this.length=a.length;this.each=function(b){k(a,b)};this.size=function(){return a.length}}var g=function(a,b,c){var d=this,j={},f={};d.index=b;typeof a=="string"&&(a={url:a});l(this,a,!0);k("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop".split(","),function(){var a="on"+this;if(a.indexOf("*")!=-1){var a=a.slice(0,a.length-1),i="onBefore"+a.slice(2);d[i]=function(a){m(f,i,a);return d}}d[a]=function(b){m(f,a,b);
return d};b==-1&&(d[i]&&(c[i]=d[i]),d[a]&&(c[a]=d[a]))});l(this,{onCuepoint:function(a,i){if(arguments.length==1)return j.embedded=[null,a],d;typeof a=="number"&&(a=[a]);var f=s();j[f]=[a,i];c.isLoaded()&&c._api().fp_addCuepoints(a,b,f);return d},update:function(a){l(d,a);c.isLoaded()&&c._api().fp_updateClip(a,b);var i=c.getConfig();l(b==-1?i.clip:i.playlist[b],a,!0)},_fireEvent:function(a,i,g,p){if(a=="onLoad")return k(j,function(a,d){d[0]&&c._api().fp_addCuepoints(d[0],b,a)}),!1;p=p||d;if(a=="onCuepoint"){var t=
j[i];if(t)return t[1].call(c,p,g)}if(i&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(a)!=-1&&(l(p,i),i.metaData))p.duration?p.fullDuration=i.metaData.duration:p.duration=i.metaData.duration;var x=!0;k(f[a],function(){x=this.call(c,p,i,g)});return x}});if(a.onCuepoint){var g=a.onCuepoint;d.onCuepoint.apply(d,typeof g=="function"?[g]:g);delete a.onCuepoint}k(a,function(b,c){typeof c=="function"&&(m(f,b,c),delete a[b])});if(b==-1)c.onCuepoint=this.onCuepoint},b=function(a,b,c,d){var j=
this,f={},g=!1;d&&l(f,d);k(b,function(a,c){typeof c=="function"&&(f[a]=c,delete b[a])});l(this,{animate:function(d,i,g){if(!d)return j;typeof i=="function"&&(g=i,i=500);if(typeof d=="string"){var k=d,d={};d[k]=i;i=500}if(g){var t=s();f[t]=g}i===void 0&&(i=500);b=c._api().fp_animate(a,d,i,t);return j},css:function(d,f){if(f!==void 0){var g={};g[d]=f;d=g}b=c._api().fp_css(a,d);l(j,b);return j},show:function(){this.display="block";c._api().fp_showPlugin(a);return j},hide:function(){this.display="none";
c._api().fp_hidePlugin(a);return j},toggle:function(){this.display=c._api().fp_togglePlugin(a);return j},fadeTo:function(b,d,h){typeof d=="function"&&(h=d,d=500);if(h){var g=s();f[g]=h}this.display=c._api().fp_fadeTo(a,b,d,g);this.opacity=b;return j},fadeIn:function(a,b){return j.fadeTo(1,a,b)},fadeOut:function(a,b){return j.fadeTo(0,a,b)},getName:function(){return a},getPlayer:function(){return c},_fireEvent:function(b,d){if(b=="onUpdate"){var h=c._api().fp_getPlugin(a);if(!h)return;l(j,h);delete j.methods;
g||(k(h.methods,function(){var b=""+this;j[b]=function(){var d=[].slice.call(arguments),d=c._api().fp_invoke(a,b,d);return d==="undefined"||d===void 0?j:d}}),g=!0)}return(h=f[b])?(h=h.apply(j,d),b.slice(0,1)=="_"&&delete f[b],h):j}})},c=[];window.flowplayer=window.$f=function(){var a=null,b=arguments[0];if(!arguments.length)return k(c,function(){if(this.isLoaded())return a=this,!1}),a||c[0];if(arguments.length==1)if(typeof b=="number")return c[b];else{if(b=="*")return new q(c);k(c,function(){if(this.id()==
b.id||this.id()==b||this.getParent()==b)return a=this,!1});return a}if(arguments.length>1){var e=arguments[1],d=arguments.length==3?arguments[2]:{};typeof e=="string"&&(e={src:e});e=l({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:!1},e);if(typeof b=="string")if(b.indexOf(".")!=-1){var g=[];k(f(b),function(){g.push(new o(this,n(e),n(d)))});return new q(g)}else{var m=document.getElementById(b);return new o(m!==null?m:b,e,d)}else if(b)return new o(b,
e,d)}return null};l(window.$f,{fireEvent:function(){var a=[].slice.call(arguments),b=$f(a[0]);return b?b._fireEvent(a.slice(1)):null},addPlugin:function(a,b){o.prototype[a]=b;return $f},each:k,extend:l});if(typeof jQuery=="function")jQuery.fn.flowplayer=function(a,b){if(!arguments.length||typeof arguments[0]=="number"){var c=[];this.each(function(){var a=$f(this);a&&c.push(a)});return arguments.length?c[arguments[0]]:new q(c)}return this.each(function(){$f(this,n(a),b?n(b):{})})}})();
(function(){function n(){if(g.done)return!1;var b=document;if(b&&b.getElementsByTagName&&b.getElementById&&b.body){clearInterval(g.timer);g.timer=null;for(b=0;b<g.ready.length;b++)g.ready[b].call();g.ready=null;g.done=!0}}function k(b,c){if(c)for(key in c)c.hasOwnProperty(key)&&(b[key]=c[key]);return b}function l(b){switch(f(b)){case "string":return b=b.replace(RegExp('(["\\\\])',"g"),"\\$1"),b=b.replace(/^\s?(\d+)%/,"$1pct"),'"'+b+'"';case "array":return"["+r(b,function(a){return l(a)}).join(",")+
"]";case "function":return'"function()"';case "object":var c=[],a;for(a in b)b.hasOwnProperty(a)&&c.push('"'+a+'":'+l(b[a]));return"{"+c.join(",")+"}"}return String(b).replace(/\s/g," ").replace(/\'/g,'"')}function f(b){if(b===null||b===void 0)return!1;var c=typeof b;return c=="object"&&b.push?"array":c}function r(b,c){var a=[],f;for(f in b)b.hasOwnProperty(f)&&(a[f]=c(b[f]));return a}function m(b,c){var a=k({},b),f=document.all,e='<object width="'+a.width+'" height="'+a.height+'"';if(f&&!a.id)a.id=
"_"+(""+Math.random()).substring(9);a.id&&(e+=' id="'+a.id+'"');a.cachebusting&&(a.src+=(a.src.indexOf("?")!=-1?"&":"?")+Math.random());e+=a.w3c||!f?' data="'+a.src+'" type="application/x-shockwave-flash"':' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';e+=">";if(a.w3c||f)e+='<param name="movie" value="'+a.src+'" />';a.width=a.height=a.id=a.w3c=a.src=null;for(var d in a)a[d]!==null&&(e+='<param name="'+d+'" value="'+a[d]+'" />');a="";if(c){for(var g in c)c[g]!==null&&(a+=g+"="+(typeof c[g]==
"object"?l(c[g]):c[g])+"&");a=a.substring(0,a.length-1);e+='<param name="flashvars" value=\''+a+"' />"}e+="</object>";return e}function s(b,c,a){var f=flashembed.getVersion();k(this,{getContainer:function(){return b},getConf:function(){return c},getVersion:function(){return f},getFlashvars:function(){return a},getApi:function(){return b.firstChild},getHTML:function(){return m(c,a)}});var e=c.version,d=c.expressInstall,g=!e||flashembed.isSupported(e);if(g)c.onFail=c.version=c.expressInstall=null,b.innerHTML=
m(c,a);else if(e&&d&&flashembed.isSupported([6,65]))k(c,{src:d}),a={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title},b.innerHTML=m(c,a);else if(b.innerHTML.replace(/\s/g,"")===""&&(b.innerHTML="<h2>Flash version "+e+" or greater is required</h2><h3>"+(f[0]>0?"Your version is "+f:"You have no flash plugin installed")+"</h3>"+(b.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>"),
b.tagName=="A"))b.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"};if(!g&&c.onFail&&(e=c.onFail.call(this),typeof e=="string"))b.innerHTML=e;document.all&&(window[c.id]=document.getElementById(c.id))}var o=typeof jQuery=="function",q={width:"100%",height:"100%",allowfullscreen:!0,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:!1,cachebusting:!1};if(o)jQuery.tools=jQuery.tools||{},jQuery.tools.flashembed={version:"1.0.4",conf:q};
var g=o?jQuery:function(b){if(g.done)return b();g.timer?g.ready.push(b):(g.ready=[b],g.timer=setInterval(n,13))};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});window.flashembed=function(b,c,a){if(typeof b=="string"){var f=document.getElementById(b);if(f)b=f;else{g(function(){flashembed(b,c,a)});return}}if(b)return typeof c=="string"&&(c={src:c}),f=k({},q),k(f,c),new s(b,f,a)};k(window.flashembed,{getVersion:function(){var b=
[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var c=navigator.plugins["Shockwave Flash"].description;typeof c!="undefined"&&(c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),b=parseInt(c.replace(/^(.*)\..*$/,"$1"),10),c=/r/.test(c)?parseInt(c.replace(/^.*r(.*)$/,"$1"),10):0,b=[b,c])}else if(window.ActiveXObject){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(a){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),b=[6,0],c.AllowScriptAccess="always"}catch(f){if(b[0]==
6)return b}try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}typeof c=="object"&&(c=c.GetVariable("$version"),typeof c!="undefined"&&(c=c.replace(/^\S+\s+(.*)$/,"$1").split(","),b=[parseInt(c[0],10),parseInt(c[2],10)]))}return b},isSupported:function(b){var c=flashembed.getVersion();return c[0]>b[0]||c[0]==b[0]&&c[1]>=b[1]},domReady:g,asString:l,getHTML:m});if(o)jQuery.fn.flashembed=function(b,c){var a=null;this.each(function(){a=flashembed(this,b,c)});return b.api===!1?this:a}})();(function(){function n(){if(!o&&(o=!0,q)){for(var f=0;f<q.length;f++)q[f].call(window,[]);q=[]}}function k(f){var b=window.onload;window.onload=typeof window.onload!="function"?f:function(){b&&b();f()}}function l(){if(!s){s=!0;document.addEventListener&&!m.opera&&document.addEventListener("DOMContentLoaded",n,!1);m.msie&&window==top&&function(){if(!o){try{document.documentElement.doScroll("left")}catch(b){setTimeout(arguments.callee,0);return}n()}}();m.opera&&document.addEventListener("DOMContentLoaded",
function(){if(!o){for(var b=0;b<document.styleSheets.length;b++)if(document.styleSheets[b].disabled){setTimeout(arguments.callee,0);return}n()}},!1);if(m.safari){var f;(function(){if(!o)if(document.readyState!="loaded"&&document.readyState!="complete")setTimeout(arguments.callee,0);else{if(f===void 0){for(var b=document.getElementsByTagName("link"),c=0;c<b.length;c++)b[c].getAttribute("rel")=="stylesheet"&&f++;b=document.getElementsByTagName("style");f+=b.length}document.styleSheets.length!=f?setTimeout(arguments.callee,
0):n()}})()}k(n)}}var f=window.DomReady={},r=navigator.userAgent.toLowerCase(),m={version:(r.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(r),opera:/opera/.test(r),msie:/msie/.test(r)&&!/opera/.test(r),mozilla:/mozilla/.test(r)&&!/(compatible|webkit)/.test(r)},s=!1,o=!1,q=[];f.ready=function(f){l();o?f.call(window,[]):q.push(function(){return f.call(window,[])})};l()})();(function(n,k){function l(a,b){for(var c=[],d=0;d<a.length;d++)c.push(a[d]);for(d=0;d<c.length;d++)b(c[d])}function f(){l([g,b],function(a){l(k.getElementsByTagName(a),function(b){function c(a){return b.canPlayType(a)||e&&a.search("mp4")>-1}var d=!0,e=navigator.userAgent.toLowerCase().search("android")>-1;b.canPlayType&&(b.src?c(r(a,b.src))&&(d=!1):l(b.getElementsByTagName("source"),function(b){c(r(a,b.src,b.type))&&(d=!1)}));d?f.createFallback(a,b):e&&b.addEventListener("click",function(){b.play()},
!1)})})}function r(a,b,c){return c||i[a][b.split(".").slice(-1)[0]]||C[a]}function m(a,b){var c=a.getAttribute(b);return c==!0||typeof c=="string"}function s(a){return a.substr(0,1)=="/"?w+a:a.substr(0,1)=="."||!a.match(/^\s*\w+:\/\//)?p+a:a}function o(a,b,c){var d=a.getAttribute(b);if(d)return d+"px";if(a.currentStyle)a=a.currentStyle[b];else if(n.getComputedStyle)a=k.defaultView.getComputedStyle(a,null).getPropertyValue(b);else return c;return a=="auto"?c:a}function q(a){return a.match(/\s*([\w-]+\/[\w-]+)(;|\s|$)/)[1]}
var g="video",b="audio";k.createElement(g).canPlayType||l(["video","audio","source"],function(a){k.createElement(a)});f.flowplayerSwf="index_files/html5media/flowplayer.swf";f.flowplayerAudioSwf="index_files/html5media/flowplayer.audio.swf";f.flowplayerControlsSwf="index_files/html5media/flowplayer.controls.swf";var c=f.THEORA_FORMAT='video/ogg; codecs="theora, vorbis"',a=f.H264_FORMAT='video/mp4; codecs="avc1.42E01E, mp4a.40.2"',h=f.VORBIS_FORMAT='audio/ogg; codecs="vorbis"',e=f.WEBM_FORMAT="video/webm;",
d=f.M4A_FORMAT="audio/x-m4a;",j=f.MP3_FORMAT="audio/mpeg;",B=f.WAV_FORMAT='audio/wav; codecs="1"',C=f.assumedFormats={video:a,audio:j},u=f.fallbackFormats=[f.H264_FORMAT,f.M4A_FORMAT,f.MP3_FORMAT],i=f.fileExtensions={video:{ogg:c,ogv:c,avi:a,mp4:a,mkv:a,h264:a,264:a,avc:a,m4v:a,"3gp":a,"3gpp":a,"3g2":a,mpg:a,mpeg:a,webm:e},audio:{ogg:h,oga:h,aac:d,m4a:d,mp3:j,wav:B}},w=n.location.protocol+"//"+n.location.host,p=String(n.location);l(k.getElementsByTagName("base"),function(a){if(a.href)p=a.href});p=
p.split("/").slice(0,-1).join("/")+"/";f.configureFlowplayer=function(a,b,c){return c};f.createFallback=function(a,b){var c=m(b,"controls"),d=b.getAttribute("poster")||"",e=b.getAttribute("src")||"",i;e?i=r(a,e):l(b.getElementsByTagName("source"),function(b){var c=b.getAttribute("src");c&&!e&&l(u,function(d){i=r(a,c,b.getAttribute("type"));q(i)==q(d)&&(e=c)})});var h=k.createElement("span");h.id=b.id;h.className=b.className;h.title=b.title;h.style.display="block";h.style.width=o(b,"width","300px");
h.style.height=a=="audio"?"26px":o(b,"height","200px");b.parentNode.replaceChild(h,b);var n=(b.getAttribute("preload")||"").toLowerCase(),p=[];d&&p.push({url:s(d)});e&&p.push({url:s(e),autoPlay:m(b,"autoplay"),autoBuffering:m(b,"autobuffer")||m(b,"preload")&&(n==""||n=="auto"),onBeforeFinish:function(){return!m(b,"loop")}});d={controls:c&&{url:s(f.flowplayerControlsSwf),fullscreen:!1,autoHide:a==g&&"always"||"never"}||null};if(q(i)==q(j)&&(d.audio={url:s(f.flowplayerAudioSwf)},!c))d.controls={url:s(f.flowplayerControlsSwf),
display:"none"},h.style.height=0;c={play:null,playlist:p,clip:{scaling:"fit",fadeInSpeed:0,fadeOutSpeed:0},plugins:d};f.configureFlowplayer(a,b,c);flowplayer(h,{src:s(f.flowplayerSwf),wmode:"opaque"},c)};n.jQuery?jQuery(f):n.DomReady&&DomReady.ready(f);n.html5media=f})(this,document);

$(document).ready(function() {	
	var poster_src = $("#poster_stacks_in_542_page7 img").attr("src");
	if (poster_src) { 
	    $("#html5video_stacks_in_542_page7").attr('poster', poster_src);	
	}
	$('#html5video_stacks_in_542_page7 source').each(function() {
		if( $(this).attr('src').length == 0 ) { 
			$(this).remove(); 
		}
	});
});
//-- End HTML5 Video Stack --//

	return stack;
})(stacks.stacks_in_542_page7);


// Javascript for stacks_in_2_page7
// ---------------------------------------------------------------------

// Each stack has its own object with its own namespace.  The name of
// that object is the same as the stack's id.
stacks.stacks_in_2_page7 = {};

// A closure is defined and assigned to the stack's object.  The object
// is also passed in as 'stack' which gives you a shorthand for referring
// to this object from elsewhere.
stacks.stacks_in_2_page7 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
/*
 *
 * RapidWeaver Newsticker Styled stack by Tsooj Media
 * Version 1.3.1
 *
 * Visit http://www.tsooj.net for more information on how to use this stacks product for RapidWeaver.
 *
 */
 
/*
News ticker plugin (BBC news style)
Bryan Gullan,2007-2011
version 2.3.6
updated 2011-03-16
Documentation at http://www.makemineatriple.com/news-ticker-documentation/
Demo at http://www.makemineatriple.com/jquery/?newsTicker
Use and distrubute freely with this header intact.
*/

(function($) {
	
	var name='newsTicker';
	var debugMode = false; // enabling this turns on console logging for interactions
	
	function runTicker(settings) {
		
		tickerData = $(settings.newsList).data('newsTicker');
		
		if(tickerData.currentItem > tickerData.newsItemCounter){
			// if we've looped to beyond the last item in the list, start over
			tickerData.currentItem = 0;
		}
		else if (tickerData.currentItem < 0) {
			// if we've looped back before the first item, move to the last one
			tickerData.currentItem = tickerData.newsItemCounter;
		}
		
		if(tickerData.currentPosition == 0) {
			if(tickerData.newsLinks[tickerData.currentItem].length > 0) {
				$(tickerData.newsList).empty().append('<li><a '+ tickerData.newsAttributes[tickerData.currentItem] +'></a></li>');
			}
			else {
				$(tickerData.newsList).empty().append('<li></li>');
			}
		}
		
		//only start the ticker itself if it's defined as animating: otherwise it's paused or under manual advance
		if (tickerData.animating) {
			
			if( tickerData.currentPosition % 2 == 0) {
					var placeHolder = tickerData.placeHolder1;
			}
			else {
				var placeHolder = tickerData.placeHolder2;
			}
			
			if( tickerData.currentPosition < tickerData.newsItems[tickerData.currentItem].length) {
				// we haven't completed ticking out the current item
				
				var tickerText = tickerData.newsItems[tickerData.currentItem].substring(0,tickerData.currentPosition);
				if(tickerData.newsLinks[tickerData.currentItem].length > 0) {
					$(tickerData.newsList + ' li a').text(tickerText + placeHolder);
				}
				else {
					$(tickerData.newsList + ' li').text(tickerText + placeHolder);
				}
				tickerData.currentPosition ++;
				setTimeout(function(){runTicker(settings); settings = null;},tickerData.tickerRate);
			}
			
			else {
				// we're on the last letter of the current item
				
				if(tickerData.newsLinks[tickerData.currentItem].length > 0) {
					$(tickerData.newsList + ' li a').text(tickerData.newsItems[tickerData.currentItem]);
				}
				else {
					$(tickerData.newsList + ' li').text(tickerData.newsItems[tickerData.currentItem]);
				}
				
				setTimeout(function(){
					if (tickerData.animating) {
						tickerData.currentPosition = 0;
						tickerData.currentItem ++;
						runTicker(settings); settings = null;
					}
				},tickerData.loopDelay);
				
			}
		}
		
		else {// settings.animating == false 
			
			// display the full text of the current item
			var tickerText = tickerData.newsItems[tickerData.currentItem];
			
			if(tickerData.newsLinks[tickerData.currentItem].length > 0) {
				$(tickerData.newsList + ' li a').text(tickerText);
			}
			else {
				$(tickerData.newsList + ' li').text(tickerText);
			}
					
		}
		
	}

	
	// Core plugin setup and config
	jQuery.fn[name] = function(options) {
 
	  // Add or overwrite options onto defaults
	  var settings = jQuery.extend({}, jQuery.fn.newsTicker.defaults, options);
	 
    var newsItems = new Array();
		var newsLinks = new Array();
		var newsAttributes = new Array();
		var newsItemCounter = 0;
		
		// Hide the static list items
		$(settings.newsList + ' li').hide();
		
		// Store the items and links in arrays for output
		$(settings.newsList + ' li').each(function(){
			if($(this).children('a').length) {
				newsItems[newsItemCounter] = $(this).children('a').text();
				newsLinks[newsItemCounter] = $(this).children('a').attr('href');
				
				var linkAttributes = new Object();
			  	var attrs = $(this).children('a')[0].attributes;
					for (var i=0;i<attrs.length;i++) {
					linkAttributes[attrs[i].nodeName] = attrs[i].nodeValue;
				}
				if (debugMode){ 
					console.log(linkAttributes);
				}
				
		    var linkAttributesProcessed = '';
 				for (var prop in linkAttributes) {
 					// print out the attributes as a string ready for output within the anchor tag
    			linkAttributesProcessed = linkAttributesProcessed + prop + '="' + linkAttributes[prop] + '" ';
 				}
 				if (debugMode){ 
					console.log(linkAttributesProcessed);
				}
 				
				newsAttributes[newsItemCounter] = linkAttributesProcessed;
				
			}
			else {
				newsItems[newsItemCounter] = $(this).text();
				newsLinks[newsItemCounter] = '';
				newsAttributes[newsItemCounter] = '';
			}
			newsItemCounter ++;
		});
        
        var tickerElement = $(settings.newsList); // for quick reference below
        
        tickerElement.data(name, {
        	newsList: settings.newsList,
					tickerRate: settings.tickerRate,
					startDelay: settings.startDelay,
					loopDelay: settings.loopDelay,
					placeHolder1: settings.placeHolder1,
					placeHolder2: settings.placeHolder2,
					controls: settings.controls,
					ownControls: settings.ownControls,
					stopOnHover: settings.stopOnHover,
					resumeOffHover: settings.resumeOffHover,
          newsItems: newsItems,
					newsLinks: newsLinks,
					newsAttributes: newsAttributes,
					newsItemCounter: newsItemCounter - 1, // -1 because we've incremented even after the last item (above)
					currentItem: 0,
					currentPosition: 0,
					firstRun:1
        })
        .bind({
			stop: function(event) {
				// show remainder of the current item immediately
		    	tickerData = tickerElement.data(name);
		    	if (tickerData.animating) { // only stop if not already stopped
            		tickerData.animating = false;
            		if (debugMode){ 
            			console.log('stop'+tickerData.currentItem + ' ' + tickerData.animating);
            		}
               	}
		  	},
		  	play: function(event) {
		  		// show 1st item with startdelay
		    	tickerData = tickerElement.data(name);
		    	if (!tickerData.animating) { // if already animating, don't start animating again
	            	tickerData.animating = true;
	            	if (debugMode){ 
            			console.log('play'+tickerData.currentItem + ' ' + tickerData.animating);
            		}
	            	setTimeout(function(){runTicker(tickerData); tickerData = null;},tickerData.startDelay);
	            }
		  	},
		  	resume: function(event) {
		  		// start from next item, with no delay
		    	tickerData = tickerElement.data(name);
		    	if (!tickerData.animating) { // if already animating, don't start animating again
	            	tickerData.animating = true;
	            	// set the character position as 0 to ensure on resume we start at the right point
					tickerData.currentPosition = 0;
	            	tickerData.currentItem ++;
	            	if (debugMode){ 
            			console.log('resume'+tickerData.currentItem + ' ' + tickerData.animating);
            		}
		            runTicker(tickerData); // no delay when resuming.
		        }
		  	},
		  	next: function(event) {
		  		// show whole of next item
		  		tickerData = tickerElement.data(name);
		  		// stop (which sets as non-animating), and call runticker
		  		$(tickerData.newsList).trigger("stop");
		  		// set the character position as 0 to ensure on resume we start at the right point
				tickerData.currentPosition = 0;
	            tickerData.currentItem ++;
	            if (debugMode){ 
            			console.log('next'+tickerData.currentItem + ' ' + tickerData.animating);
            		}
		  		runTicker(tickerData);
		  	},
		  	previous: function(event) {
				// show whole of previous item
				tickerData = tickerElement.data(name);
		  		// stop (which sets as non-animating), and call runticker
		  		$(tickerData.newsList).trigger("stop");
		  		// set the character position as 0 to ensure on resume we start at the right point
				tickerData.currentPosition = 0;
	            tickerData.currentItem --;
	            if (debugMode){ 
            			console.log('previous'+tickerData.currentItem + ' ' + tickerData.animating);
            		}
		  		runTicker(tickerData);
			}
		}); 	
		if (settings.stopOnHover) {
	    	tickerElement.bind({			    	
			  	mouseover: function(event) {
			  		tickerData = tickerElement.data(name);
			    	if (tickerData.animating) { // stop if not already stopped
				  		$(tickerData.newsList).trigger("stop");
				  		if (tickerData.controls) { // ensure that the ticker can be resumed if controls are enabled
				  			$('.stop').hide();
			        		$('.resume').show();
				  		}
			  		}
			  	}
			});
			if (settings.resumeOffHover) { // only allowed if stopOnHover enabled
		    	tickerElement.bind({			    	
				  	mouseout: function(event) {
				  		tickerData = tickerElement.data(name);
				    	if (!tickerData.animating) { // if already animating, don't start animating again
			            	$(tickerData.newsList).trigger("resume");
			            	if (debugMode){ 
		            			console.log('resumeoffhover'+tickerData.currentItem + ' ' + tickerData.animating);
		            		}
				        }
				  	}
				});
    		}
    	}
    	
    	tickerData = tickerElement.data(name);
    	
    	// set up control buttons if the option is on
		if (tickerData.controls || tickerData.ownControls) {
			if (!tickerData.ownControls) {
				$('<ul class="ticker-controls"><li class="play"><a href="#play">Play</a></li><li class="resume"><a href="#resume">Resume</a></li><li class="stop"><a href="#stop">Stop</a></li><li class="previous"><a href="#previous">Previous</a></li><li class="next"><a href="#next">Next</a></li></ul>').insertAfter($(tickerData.newsList));
			}
			$('.play').hide();
		    $('.resume').hide();
			
		    $('.play').click(function(event){
		        $(tickerData.newsList).trigger("play");
		        $('.play').hide();
		        $('.resume').hide();
		        $('.stop').show();
		        event.preventDefault();
		    });
		    $('.resume').click(function(event){
		        $(tickerData.newsList).trigger("resume");
		        $('.play').hide();
		        $('.resume').hide();
		        $('.stop').show();
		        event.preventDefault();
		    });
			$('.stop').click(function(event){
		        $(tickerData.newsList).trigger("stop");
		        $('.stop').hide();
		        $('.resume').show();
		        event.preventDefault();
		    });
		    $('.previous').click(function(event){
		        $(tickerData.newsList).trigger("previous");
		        $('.stop').hide();
			    $('.resume').show();
		        event.preventDefault();
		    });
		    $('.next').click(function(event){
		        $(tickerData.newsList).trigger("next");
		        $('.stop').hide();
			    $('.resume').show();
		        event.preventDefault();
		    });

	    };
    	
    	// tell it to play
    	$(tickerData.newsList).trigger("play");
	};

	// News ticker defaults 
	jQuery.fn[name].defaults = {
		newsList: ".atm-Newsticker ul",
		tickerRate: 80,
		startDelay: 100,
		loopDelay: 3000,
		placeHolder1: "",
		placeHolder2: "",
		controls: false,
		ownControls: false,
		stopOnHover: false,
		resumeOffHover: true
	}

})(jQuery);


$(document).ready(function() {
	$('.atm-Newsticker a[rel=external]').attr('target', '_blank');
	$().newsTicker();
});

	return stack;
})(stacks.stacks_in_2_page7);



