﻿/**
 * jQuery lightBox plugin
 * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
 * and adapted to me for use like a plugin from jQuery.
 * @name jquery-lightbox-0.5.js
 * @author Leandro Vieira Pinho - http://leandrovieira.com
 * @version 0.5
 * @date April 11, 2008
 * @category jQuery plugin
 * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
 * @license CC Attribution-No Derivative Works 2.5 Brazil - http://creativecommons.org/licenses/by-nd/2.5/br/deed.en_US
 * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
 */

// Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
(function($) {
	/**
	 * $ is an alias to jQuery object
	 *
	 */
	$.fn.lightBox = function(settings) {
		// Settings to configure the jQuery lightBox plugin how you like
		settings = jQuery.extend({
			// Configuration related to overlay
			overlayBgColor: 		'#000',		// (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
			overlayOpacity:			0.8,		// (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
			// Configuration related to navigation
			fixedNavigation:		false,		// (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
			// Configuration related to images
			imageLoading:			'/contento/images/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
			imageBtnPrev: '/contento/images/lightbox-btn-prev.gif', 		// (string) Path and the name of the prev button image
			imageBtnNext: '/contento/images/lightbox-btn-next.gif', 		// (string) Path and the name of the next button image
			imageBtnClose: '/contento/images/lightbox-btn-close.gif', 	// (string) Path and the name of the close btn
			imageBlank: '/contento/images/lightbox-blank.gif', 		// (string) Path and the name of a blank image (one pixel)
			// Configuration related to container image box
			containerBorderSize:	10,			// (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value
			containerResizeSpeed:	400,		// (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
			// Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
			txtImage:				'Image',	// (string) Specify text "Image"
			txtOf:					'of',		// (string) Specify text "of"
			// Configuration related to keyboard navigation
			keyToClose:				'c',		// (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.
			keyToPrev:				'p',		// (string) (p = previous) Letter to show the previous image
			keyToNext:				'n',		// (string) (n = next) Letter to show the next image.
			// Don�t alter these variables in any way
			imageArray:				[],
			activeImage:			0
		},settings);
		// Caching the jQuery object with all elements matched
		var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
		/**
		 * Initializing the plugin calling the start function
		 *
		 * @return boolean false
		 */
		function _initialize() {
			_start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked
			return false; // Avoid the browser following the link
		}
		/**
		 * Start the jQuery lightBox plugin
		 *
		 * @param object objClicked The object (link) whick the user have clicked
		 * @param object jQueryMatchedObj The jQuery object with all elements matched
		 */
		function _start(objClicked,jQueryMatchedObj) {
			// Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
			$('embed, object, select').css({ 'visibility' : 'hidden' });
			// Call the function to create the markup structure; style some elements; assign events in some elements.
			_set_interface();
			// Unset total images in imageArray
			settings.imageArray.length = 0;
			// Unset image active information
			settings.activeImage = 0;
			// We have an image set? Or just an image? Let�s see it.
			if ( jQueryMatchedObj.length == 1 ) {
				settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));
			} else {
				// Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references		
				for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
					settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));
				}
			}
			while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
				settings.activeImage++;
			}
			// Call the function that prepares image exibition
			_set_image_to_view();
		}
		/**
		 * Create the jQuery lightBox plugin interface
		 *
		 * The HTML markup will be like that:
			<div id="jquery-overlay"></div>
			<div id="jquery-lightbox">
				<div id="lightbox-container-image-box">
					<div id="lightbox-container-image">
						<img src="../fotos/XX.jpg" id="lightbox-image">
						<div id="lightbox-nav">
							<a href="#" id="lightbox-nav-btnPrev"></a>
							<a href="#" id="lightbox-nav-btnNext"></a>
						</div>
						<div id="lightbox-loading">
							<a href="#" id="lightbox-loading-link">
								<img src="../images/lightbox-ico-loading.gif">
							</a>
						</div>
					</div>
				</div>
				<div id="lightbox-container-image-data-box">
					<div id="lightbox-container-image-data">
						<div id="lightbox-image-details">
							<span id="lightbox-image-details-caption"></span>
							<span id="lightbox-image-details-currentNumber"></span>
						</div>
						<div id="lightbox-secNav">
							<a href="#" id="lightbox-secNav-btnClose">
								<img src="../images/lightbox-btn-close.gif">
							</a>
						</div>
					</div>
				</div>
			</div>
		 *
		 */
		function _set_interface() {
			// Apply the HTML markup into body tag
			$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');	
			// Get page sizes
			var arrPageSizes = ___getPageSize();
			// Style overlay and show it
			$('#jquery-overlay').css({
				backgroundColor:	settings.overlayBgColor,
				opacity:			settings.overlayOpacity,
				width:				arrPageSizes[0],
				height:				arrPageSizes[1]
			}).fadeIn();
			// Get page scroll
			var arrPageScroll = ___getPageScroll();
			// Calculate top and left offset for the jquery-lightbox div object and show it
			$('#jquery-lightbox').css({
				top:	arrPageScroll[1] + (arrPageSizes[3] / 10),
				left:	arrPageScroll[0]
			}).show();
			// Assigning click events in elements to close overlay
			$('#jquery-overlay,#jquery-lightbox').click(function() {
				_finish();									
			});
			// Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects
			$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
				_finish();
				return false;
			});
			// If window was resized, calculate the new overlay dimensions
			$(window).resize(function() {
				// Get page sizes
				var arrPageSizes = ___getPageSize();
				// Style overlay and show it
				$('#jquery-overlay').css({
					width:		arrPageSizes[0],
					height:		arrPageSizes[1]
				});
				// Get page scroll
				var arrPageScroll = ___getPageScroll();
				// Calculate top and left offset for the jquery-lightbox div object and show it
				$('#jquery-lightbox').css({
					top:	arrPageScroll[1] + (arrPageSizes[3] / 10),
					left:	arrPageScroll[0]
				});
			});
		}
		/**
		 * Prepares image exibition; doing a image�s preloader to calculate it�s size
		 *
		 */
		function _set_image_to_view() { // show the loading
			// Show the loading
			$('#lightbox-loading').show();
			if ( settings.fixedNavigation ) {
				$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
			} else {
				// Hide some elements
				$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
			}
			// Image preload process
			var objImagePreloader = new Image();
			objImagePreloader.onload = function() {
				$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);
				// Perfomance an effect in the image container resizing it
				_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
				//	clear onLoad, IE behaves irratically with animated gifs otherwise
				objImagePreloader.onload=function(){};
			};
			objImagePreloader.src = settings.imageArray[settings.activeImage][0];
		};
		/**
		 * Perfomance an effect in the image container resizing it
		 *
		 * @param integer intImageWidth The image�s width that will be showed
		 * @param integer intImageHeight The image�s height that will be showed
		 */
		function _resize_container_image_box(intImageWidth,intImageHeight) {
			// Get current width and height
			var intCurrentWidth = $('#lightbox-container-image-box').width();
			var intCurrentHeight = $('#lightbox-container-image-box').height();
			// Get the width and height of the selected image plus the padding
			var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image�s width and the left and right padding value
			var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image�s height and the left and right padding value
			// Diferences
			var intDiffW = intCurrentWidth - intWidth;
			var intDiffH = intCurrentHeight - intHeight;
			// Perfomance the effect
			$('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
			if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) {
				if ( $.browser.msie ) {
					___pause(250);
				} else {
					___pause(100);	
				}
			} 
			$('#lightbox-container-image-data-box').css({ width: intImageWidth });
			$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
		};
		/**
		 * Show the prepared image
		 *
		 */
		function _show_image() {
			$('#lightbox-loading').hide();
			$('#lightbox-image').fadeIn(function() {
				_show_image_data();
				_set_navigation();
			});
			_preload_neighbor_images();
		};
		/**
		 * Show the image information
		 *
		 */
		function _show_image_data() {
			$('#lightbox-container-image-data-box').slideDown('fast');
			$('#lightbox-image-details-caption').hide();
			if ( settings.imageArray[settings.activeImage][1] ) {
				$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
			}
			// If we have a image set, display 'Image X of X'
			if ( settings.imageArray.length > 1 ) {
				$('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show();
			}		
		}
		/**
		 * Display the button navigations
		 *
		 */
		function _set_navigation() {
			$('#lightbox-nav').show();

			// Instead to define this configuration in CSS file, we define here. And it�s need to IE. Just.
			$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
			
			// Show the prev button, if not the first image in set
			if ( settings.activeImage != 0 ) {
				if ( settings.fixedNavigation ) {
					$('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
						.unbind()
						.bind('click',function() {
							settings.activeImage = settings.activeImage - 1;
							_set_image_to_view();
							return false;
						});
				} else {
					// Show the images button for Next buttons
					$('#lightbox-nav-btnPrev').unbind().hover(function() {
						$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
					},function() {
						$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
					}).show().bind('click',function() {
						settings.activeImage = settings.activeImage - 1;
						_set_image_to_view();
						return false;
					});
				}
			}
			
			// Show the next button, if not the last image in set
			if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
				if ( settings.fixedNavigation ) {
					$('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
						.unbind()
						.bind('click',function() {
							settings.activeImage = settings.activeImage + 1;
							_set_image_to_view();
							return false;
						});
				} else {
					// Show the images button for Next buttons
					$('#lightbox-nav-btnNext').unbind().hover(function() {
						$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
					},function() {
						$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
					}).show().bind('click',function() {
						settings.activeImage = settings.activeImage + 1;
						_set_image_to_view();
						return false;
					});
				}
			}
			// Enable keyboard navigation
			_enable_keyboard_navigation();
		}
		/**
		 * Enable a support to keyboard navigation
		 *
		 */
		function _enable_keyboard_navigation() {
			$(document).keydown(function(objEvent) {
				_keyboard_action(objEvent);
			});
		}
		/**
		 * Disable the support to keyboard navigation
		 *
		 */
		function _disable_keyboard_navigation() {
			$(document).unbind();
		}
		/**
		 * Perform the keyboard actions
		 *
		 */
		function _keyboard_action(objEvent) {
			// To ie
			if ( objEvent == null ) {
				keycode = event.keyCode;
				escapeKey = 27;
			// To Mozilla
			} else {
				keycode = objEvent.keyCode;
				escapeKey = objEvent.DOM_VK_ESCAPE;
			}
			// Get the key in lower case form
			key = String.fromCharCode(keycode).toLowerCase();
			// Verify the keys to close the ligthBox
			if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) {
				_finish();
			}
			// Verify the key to show the previous image
			if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
				// If we�re not showing the first image, call the previous
				if ( settings.activeImage != 0 ) {
					settings.activeImage = settings.activeImage - 1;
					_set_image_to_view();
					_disable_keyboard_navigation();
				}
			}
			// Verify the key to show the next image
			if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
				// If we�re not showing the last image, call the next
				if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
					settings.activeImage = settings.activeImage + 1;
					_set_image_to_view();
					_disable_keyboard_navigation();
				}
			}
		}
		/**
		 * Preload prev and next images being showed
		 *
		 */
		function _preload_neighbor_images() {
			if ( (settings.imageArray.length -1) > settings.activeImage ) {
				objNext = new Image();
				objNext.src = settings.imageArray[settings.activeImage + 1][0];
			}
			if ( settings.activeImage > 0 ) {
				objPrev = new Image();
				objPrev.src = settings.imageArray[settings.activeImage -1][0];
			}
		}
		/**
		 * Remove jQuery lightBox plugin HTML markup
		 *
		 */
		function _finish() {
			$('#jquery-lightbox').remove();
			$('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); });
			// Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
			$('embed, object, select').css({ 'visibility' : 'visible' });
		}
		/**
		 / THIRD FUNCTION
		 * getPageSize() by quirksmode.com
		 *
		 * @return Array Return an array with page width, height and window width, height
		 */
		function ___getPageSize() {
			var xScroll, yScroll;
			if (window.innerHeight && window.scrollMaxY) {	
				xScroll = window.innerWidth + window.scrollMaxX;
				yScroll = window.innerHeight + window.scrollMaxY;
			} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
				xScroll = document.body.scrollWidth;
				yScroll = document.body.scrollHeight;
			} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
				xScroll = document.body.offsetWidth;
				yScroll = document.body.offsetHeight;
			}
			var windowWidth, windowHeight;
			if (self.innerHeight) {	// all except Explorer
				if(document.documentElement.clientWidth){
					windowWidth = document.documentElement.clientWidth; 
				} else {
					windowWidth = self.innerWidth;
				}
				windowHeight = self.innerHeight;
			} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
				windowWidth = document.documentElement.clientWidth;
				windowHeight = document.documentElement.clientHeight;
			} else if (document.body) { // other Explorers
				windowWidth = document.body.clientWidth;
				windowHeight = document.body.clientHeight;
			}	
			// for small pages with total height less then height of the viewport
			if(yScroll < windowHeight){
				pageHeight = windowHeight;
			} else { 
				pageHeight = yScroll;
			}
			// for small pages with total width less then width of the viewport
			if(xScroll < windowWidth){	
				pageWidth = xScroll;		
			} else {
				pageWidth = windowWidth;
			}
			arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
			return arrayPageSize;
		};
		/**
		 / THIRD FUNCTION
		 * getPageScroll() by quirksmode.com
		 *
		 * @return Array Return an array with x,y page scroll values.
		 */
		function ___getPageScroll() {
			var xScroll, yScroll;
			if (self.pageYOffset) {
				yScroll = self.pageYOffset;
				xScroll = self.pageXOffset;
			} else if (document.documentElement && document.documentElement.scrollTop) {	 // Explorer 6 Strict
				yScroll = document.documentElement.scrollTop;
				xScroll = document.documentElement.scrollLeft;
			} else if (document.body) {// all other Explorers
				yScroll = document.body.scrollTop;
				xScroll = document.body.scrollLeft;	
			}
			arrayPageScroll = new Array(xScroll,yScroll);
			return arrayPageScroll;
		};
		 /**
		  * Stop the code execution from a escified time in milisecond
		  *
		  */
		 function ___pause(ms) {
			var date = new Date(); 
			curDate = null;
			do { var curDate = new Date(); }
			while ( curDate - date < ms);
		 };
		// Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
		return this.unbind('click').click(_initialize);
	};
})(jQuery); // Call and execute the function immediately passing the jQuery object
(function(a){a.extend({tabs:{remoteCount:0}});a.fn.tabs=function(d,e){if(typeof d=="object"){e=d}e=a.extend({initial:(d&&typeof d=="number"&&d>0)?--d:0,disabled:null,bookmarkable:a.ajaxHistory?true:false,remote:false,spinner:"Loading&#8230;",hashPrefix:"remote-tab-",fxFade:null,fxSlide:null,fxShow:null,fxHide:null,fxSpeed:"normal",fxShowSpeed:null,fxHideSpeed:null,fxAutoHeight:false,onClick:null,onHide:null,onShow:null,onRemoteLoad:null,navClass:"tabs-nav",selectedClass:"tabs-selected",disabledClass:"tabs-disabled",containerClass:"tabs-container",hideClass:"tabs-hide",loadingClass:"tabs-loading",tabStruct:"div"},e||{});a.browser.msie6=a.browser.msie&&(a.browser.version&&a.browser.version<7||/6.0/.test(navigator.userAgent));function f(){scrollTo(0,0)}return this.each(function(){var m=this;var t=a("ul."+e.navClass,m);t=t.size()&&t||a(">ul:eq(0)",m);var z=a("a",t);if(e.remote){z.each(function(){if(!/#/.test(this.href)){this.remote="remote";var k=e.hashPrefix+(++a.tabs.remoteCount),i="#"+k,B=this.href;this.href=i;a('<div id="'+k+'" class="'+e.containerClass+'"></div>').appendTo(m);a(this).bind("loadRemoteTab",function(E,D){if(!a(i).html()){var C=a(this).addClass(e.loadingClass),F=a("span",this)[0],G=F.innerHTML;if(e.spinner){F.innerHTML="<em>"+e.spinner+"</em>"}setTimeout(function(){a(i).load(B,function(){if(e.spinner){F.innerHTML=G}C.removeClass(e.loadingClass);jQuery.isFunction(D)&&D();jQuery.isFunction(e.onRemoteLoad)&&e.onRemoteLoad.call(this)})},0)}else{jQuery.isFunction(D)&&D()}})}})}var n=a("> div."+e.containerClass,m);n=n.size()&&n||a(">"+e.tabStruct,m);t.is("."+e.navClass)||t.addClass(e.navClass);n.each(function(){var i=a(this);i.is("."+e.containerClass)||i.addClass(e.containerClass)});var o=a("li",t).index(a("li."+e.selectedClass,t)[0]);if(o>=0){e.initial=o}if(location.hash){z.each(function(k){if(this.hash==location.hash){e.initial=k;if((a.browser.msie||a.browser.opera)&&!this.remote){var B=a(location.hash);var C=B.attr("id");B.attr("id","");setTimeout(function(){B.attr("id",C)},500)}f();return false}})}if(a.browser.msie){f()}n.filter(":eq("+e.initial+")").show().end().not(":eq("+e.initial+")").addClass(e.hideClass);a("li",t).removeClass(e.selectedClass).slice(e.initial,e.initial+1).addClass(e.selectedClass);z.slice(e.initial,e.initial+1).trigger("loadRemoteTab").end();if(e.fxAutoHeight){var g=function(k){var i=a.map(n.get(),function(B){var C,D=a(B);if(k){if(a.browser.msie6){B.style.removeExpression("behaviour");B.style.height="";B.minHeight=null}C=D.css({"min-height":""}).height()}else{C=D.height()}return C}).sort(function(B,C){return C-B});if(a.browser.msie6){n.each(function(){this.minHeight=i[0]+"px";this.style.setExpression("behaviour",'this.style.height = this.minHeight ? this.minHeight : "1px"')})}else{n.css({"min-height":i[0]+"px"})}};g();var l=m.offsetWidth;var j=m.offsetHeight;var A=a("#tabs-watch-font-size").get(0)||a('<span id="tabs-watch-font-size">M</span>').css({display:"block",position:"absolute",visibility:"hidden"}).appendTo(document.body).get(0);var h=A.offsetHeight;setInterval(function(){var B=m.offsetWidth;var k=m.offsetHeight;var i=A.offsetHeight;if(k>j||B!=l||i!=h){g((B>l||i<h));l=B;j=k;h=i}},50)}var x={},p={},y=e.fxShowSpeed||e.fxSpeed,q=e.fxHideSpeed||e.fxSpeed;if(e.fxSlide||e.fxFade){if(e.fxSlide){x.height="show";p.height="hide"}if(e.fxFade){x.opacity="show";p.opacity="hide"}}else{if(e.fxShow){x=e.fxShow}else{x["min-width"]=0;y=1}if(e.fxHide){p=e.fxHide}else{p["min-width"]=0;q=1}}var u=e.onClick,v=e.onHide,w=e.onShow;z.bind("triggerTab",function(){var k=a(this).parents("li:eq(0)");if(m.locked||k.is("."+e.selectedClass)||k.is("."+e.disabledClass)){return false}var i=this.hash;if(a.browser.msie){a(this).trigger("click");if(e.bookmarkable){a.ajaxHistory.update(i);location.hash=i.replace("#","")}}else{if(a.browser.safari){var B=a('<form action="'+i+'"><div><input type="submit" value="h" /></div></form>').get(0);B.submit();a(this).trigger("click");if(e.bookmarkable){a.ajaxHistory.update(i)}}else{if(e.bookmarkable){location.hash=i.replace("#","")}else{a(this).trigger("click")}}}});z.bind("disableTab",function(){var i=a(this).parents("li:eq(0)");if(a.browser.safari){i.animate({opacity:0},1,function(){i.css({opacity:""})})}i.addClass(e.disabledClass)});if(e.disabled&&e.disabled.length){for(var r=0,s=e.disabled.length;r<s;r++){z.slice(--e.disabled[r],e.disabled[r]+1).trigger("disableTab").end()}}z.bind("enableTab",function(){var i=a(this).parents("li:eq(0)");i.removeClass(e.disabledClass);if(a.browser.safari){i.animate({opacity:1},1,function(){i.css({opacity:""})})}});z.bind("click",function(k){var J=k.clientX;var i=this,B=a(this).parents("li:eq(0)"),H=n.filter(this.hash),G=n.filter(":visible");if(m.locked||B.is("."+e.selectedClass)||B.is("."+e.disabledClass)||typeof u=="function"&&u.call(this,H[0],G[0])===false){this.blur();return false}m.locked=true;if(H.size()){if(a.browser.msie&&e.bookmarkable){var I=this.hash.replace("#","");H.attr("id","");setTimeout(function(){H.attr("id",I)},0)}var C={display:"",overflow:"",height:""};if(!a.browser.msie){C.opacity=""}function F(){if(e.bookmarkable&&J){a.ajaxHistory.update(i.hash)}G.animate(p,q,function(){a(i).parents("li:eq(0)").addClass(e.selectedClass).siblings().removeClass(e.selectedClass);G.addClass(e.hideClass).css(C);if(typeof v=="function"){v.call(i,H[0],G[0])}if(!(e.fxSlide||e.fxFade||e.fxShow)){H.css("display","block")}H.animate(x,y,function(){H.removeClass(e.hideClass).css(C);if(a.browser.msie){G[0].style.filter="";H[0].style.filter=""}if(typeof w=="function"){w.call(i,H[0],G[0])}m.locked=null})})}if(!i.remote){F()}else{a(i).trigger("loadRemoteTab",[F])}}else{alert("There is no such container.")}var D=window.pageXOffset||document.documentElement&&document.documentElement.scrollLeft||document.body.scrollLeft||0;var E=window.pageYOffset||document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop||0;setTimeout(function(){window.scrollTo(D,E)},0);this.blur();return e.bookmarkable&&!!J});if(e.bookmarkable){a.ajaxHistory.initialize(function(){z.slice(e.initial,e.initial+1).trigger("click").end()})}})};var c=["triggerTab","disableTab","enableTab"];for(var b=0;b<c.length;b++){a.fn[c[b]]=(function(d){return function(e){return this.each(function(){var g=a("ul.tabs-nav",this);g=g.size()&&g||a(">ul:eq(0)",this);var f;if(!e||typeof e=="number"){var h=(e&&e>0&&e-1||0);f=a("li a",g).slice(h,h+1)}else{if(typeof e=="string"){f=a('li a[@href$="#'+e+'"]',g)}}f.trigger(d)})}})(c[b])}a.fn.activeTab=function(){var d=[];this.each(function(){var f=a("ul.tabs-nav",this);f=f.size()&&f||a(">ul:eq(0)",this);var e=a("li",f);d.push(e.index(e.filter(".tabs-selected")[0])+1)});return d[0]}})(jQuery);
/*
 * jQuery UI 1.8.5
 *
 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
(function(a,b){function d(c){return !a(c).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(!a.ui.version){a.extend(a.ui,{version:"1.8.5",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({_focus:a.fn.focus,focus:function(c,e){return typeof c==="number"?this.each(function(){var f=this;setTimeout(function(){a(f).focus();e&&e.call(f)},c)}):this._focus.apply(this,arguments)},scrollParent:function(){var c;c=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?a(document):c},zIndex:function(c){if(c!==b){return this.css("zIndex",c)}if(this.length){c=a(this[0]);for(var e;c.length&&c[0]!==document;){e=c.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){e=parseInt(c.css("zIndex"));if(!isNaN(e)&&e!=0){return e}}c=c.parent()}}return 0},disableSelection:function(){return this.bind("mousedown.ui-disableSelection selectstart.ui-disableSelection",function(c){c.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(c,f){function g(e,h,i,n){a.each(j,function(){h-=parseFloat(a.curCSS(e,"padding"+this,true))||0;if(i){h-=parseFloat(a.curCSS(e,"border"+this+"Width",true))||0}if(n){h-=parseFloat(a.curCSS(e,"margin"+this,true))||0}});return h}var j=f==="Width"?["Left","Right"]:["Top","Bottom"],k=f.toLowerCase(),l={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+f]=function(e){if(e===b){return l["inner"+f].call(this)}return this.each(function(){a.style(this,k,g(this,e)+"px")})};a.fn["outer"+f]=function(e,h){if(typeof e!=="number"){return l["outer"+f].call(this,e)}return this.each(function(){a.style(this,k,g(this,e,true,h)+"px")})}});a.extend(a.expr[":"],{data:function(c,e,f){return !!a.data(c,f[3])},focusable:function(c){var e=c.nodeName.toLowerCase(),f=a.attr(c,"tabindex");if("area"===e){e=c.parentNode;f=e.name;if(!c.href||!f||e.nodeName.toLowerCase()!=="map"){return false}c=a("img[usemap=#"+f+"]")[0];return !!c&&d(c)}return(/input|select|textarea|button|object/.test(e)?!c.disabled:"a"==e?c.href||!isNaN(f):!isNaN(f))&&d(c)},tabbable:function(c){var e=a.attr(c,"tabindex");return(isNaN(e)||e>=0)&&a(c).is(":focusable")}});a(function(){var c=document.createElement("div"),e=document.body;a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=e.appendChild(c).offsetHeight===100;e.removeChild(c).style.display="none"});a.extend(a.ui,{plugin:{add:function(c,f,g){c=a.ui[c].prototype;for(var h in g){c.plugins[h]=c.plugins[h]||[];c.plugins[h].push([f,g[h]])}},call:function(c,f,g){if((f=c.plugins[f])&&c.element[0].parentNode){for(var h=0;h<f.length;h++){c.options[f[h][0]]&&f[h][1].apply(c.element,g)}}}},contains:function(c,e){return document.compareDocumentPosition?c.compareDocumentPosition(e)&16:c!==e&&c.contains(e)},hasScroll:function(c,e){if(a(c).css("overflow")==="hidden"){return false}e=e&&e==="left"?"scrollLeft":"scrollTop";var f=false;if(c[e]>0){return true}c[e]=1;f=c[e]>0;c[e]=0;return f},isOverAxis:function(c,e,f){return c>e&&c<e+f},isOver:function(c,f,g,j,k,l){return a.ui.isOverAxis(c,g,k)&&a.ui.isOverAxis(f,j,l)}})}})(jQuery);
/*
 * jQuery UI Widget 1.8.5
 *
 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
(function(a,c){if(a.cleanData){var d=a.cleanData;a.cleanData=function(b){for(var f=0,g;(g=b[f])!=null;f++){a(g).triggerHandler("remove")}d(b)}}else{var e=a.fn.remove;a.fn.remove=function(b,f){return this.each(function(){if(!f){if(!b||a.filter(b,[this]).length){a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")})}}return e.call(a(this),b,f)})}}a.widget=function(b,g,h){var i=b.split(".")[0],j;b=b.split(".")[1];j=i+"-"+b;if(!h){h=g;g=a.Widget}a.expr[":"][j]=function(f){return !!a.data(f,b)};a[i]=a[i]||{};a[i][b]=function(k,f){arguments.length&&this._createWidget(k,f)};g=new g;g.options=a.extend(true,{},g.options);a[i][b].prototype=a.extend(true,g,{namespace:i,widgetName:b,widgetEventPrefix:a[i][b].prototype.widgetEventPrefix||b,widgetBaseClass:j},h);a.widget.bridge(b,a[i][b])};a.widget.bridge=function(b,f){a.fn[b]=function(g){var i=typeof g==="string",j=Array.prototype.slice.call(arguments,1),k=this;g=!i&&j.length?a.extend.apply(null,[true,g].concat(j)):g;if(i&&g.substring(0,1)==="_"){return k}i?this.each(function(){var h=a.data(this,b);if(!h){throw"cannot call methods on "+b+" prior to initialization; attempted to call method '"+g+"'"}if(!a.isFunction(h[g])){throw"no such method '"+g+"' for "+b+" widget instance"}var l=h[g].apply(h,j);if(l!==h&&l!==c){k=l;return false}}):this.each(function(){var h=a.data(this,b);h?h.option(g||{})._init():a.data(this,b,new f(g,this))});return k}};a.Widget=function(b,f){arguments.length&&this._createWidget(b,f)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,f){a.data(f,this.widgetName,this);this.element=a(f);this.options=a.extend(true,{},this.options,a.metadata&&a.metadata.get(f)[this.widgetName],b);var g=this;this.element.bind("remove."+this.widgetName,function(){g.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,f){var g=b,h=this;if(arguments.length===0){return a.extend({},h.options)}if(typeof b==="string"){if(f===c){return this.options[b]}g={};g[b]=f}a.each(g,function(i,j){h._setOption(i,j)});return h},_setOption:function(b,f){this.options[b]=f;if(b==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,g,h){var i=this.options[b];g=a.Event(g);g.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();h=h||{};if(g.originalEvent){b=a.event.props.length;for(var j;b;){j=a.event.props[--b];g[j]=g.originalEvent[j]}}this.element.trigger(g,h);return !(a.isFunction(i)&&i.call(this.element[0],g,h)===false||g.isDefaultPrevented())}}})(jQuery);(function(a,b){function c(){return ++e}function f(){return ++g}var e=0,g=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(d,h){if(d=="selected"){this.options.collapsible&&h==this.options.selected||this.select(h)}else{this.options[d]=h;this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+c()},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[d].concat(a.makeArray(arguments)))},_ui:function(d,h){return{tab:d,panel:h,index:this.anchors.index(d)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=a(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(d){function p(j,h){j.css("display","");!a.support.opacity&&h.opacity&&j[0].style.removeAttribute("filter")}var i=this,l=this.options,q=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=a(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);this.anchors.each(function(j,h){var k=a(h).attr("href"),m=k.split("#")[0],n;if(m&&(m===location.toString().split("#")[0]||(n=a("base")[0])&&m===n.href)){k=h.hash;h.href=k}if(q.test(k)){i.panels=i.panels.add(i._sanitizeSelector(k))}else{if(k&&k!=="#"){a.data(h,"href.tabs",k);a.data(h,"load.tabs",k.replace(/#.*$/,""));k=i._tabId(h);h.href="#"+k;h=a("#"+k);if(!h.length){h=a(l.panelTemplate).attr("id",k).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(i.panels[j-1]||i.list);h.data("destroy.tabs",true)}i.panels=i.panels.add(h)}else{l.disabled.push(j)}}});if(d){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(l.selected===b){location.hash&&this.anchors.each(function(j,h){if(h.hash==location.hash){l.selected=j;return false}});if(typeof l.selected!=="number"&&l.cookie){l.selected=parseInt(i._cookie(),10)}if(typeof l.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){l.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}l.selected=l.selected||(this.lis.length?0:-1)}else{if(l.selected===null){l.selected=-1}}l.selected=l.selected>=0&&this.anchors[l.selected]||l.selected<0?l.selected:0;l.disabled=a.unique(l.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(h){return i.lis.index(h)}))).sort();a.inArray(l.selected,l.disabled)!=-1&&l.disabled.splice(a.inArray(l.selected,l.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(l.selected>=0&&this.anchors.length){this.panels.eq(l.selected).removeClass("ui-tabs-hide");this.lis.eq(l.selected).addClass("ui-tabs-selected ui-state-active");i.element.queue("tabs",function(){i._trigger("show",null,i._ui(i.anchors[l.selected],i.panels[l.selected]))});this.load(l.selected)}a(window).bind("unload",function(){i.lis.add(i.anchors).unbind(".tabs");i.lis=i.anchors=i.panels=null})}else{l.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[l.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");l.cookie&&this._cookie(l.selected,l.cookie);d=0;for(var u;u=this.lis[d];d++){a(u)[a.inArray(d,l.disabled)!=-1&&!a(u).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}l.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(l.event!=="mouseover"){var v=function(j,h){h.is(":not(.ui-state-disabled)")&&h.addClass("ui-state-"+j)},x=function(j,h){h.removeClass("ui-state-"+j)};this.lis.bind("mouseover.tabs",function(){v("hover",a(this))});this.lis.bind("mouseout.tabs",function(){x("hover",a(this))});this.anchors.bind("focus.tabs",function(){v("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){x("focus",a(this).closest("li"))})}var w,y;if(l.fx){if(a.isArray(l.fx)){w=l.fx[0];y=l.fx[1]}else{w=y=l.fx}}var z=y?function(j,h){a(j).closest("li").addClass("ui-tabs-selected ui-state-active");h.hide().removeClass("ui-tabs-hide").animate(y,y.duration||"normal",function(){p(h,y);i._trigger("show",null,i._ui(j,h[0]))})}:function(j,h){a(j).closest("li").addClass("ui-tabs-selected ui-state-active");h.removeClass("ui-tabs-hide");i._trigger("show",null,i._ui(j,h[0]))},A=w?function(j,h){h.animate(w,w.duration||"normal",function(){i.lis.removeClass("ui-tabs-selected ui-state-active");h.addClass("ui-tabs-hide");p(h,w);i.element.dequeue("tabs")})}:function(j,h){i.lis.removeClass("ui-tabs-selected ui-state-active");h.addClass("ui-tabs-hide");i.element.dequeue("tabs")};this.anchors.bind(l.event+".tabs",function(){var j=this,h=a(j).closest("li"),k=i.panels.filter(":not(.ui-tabs-hide)"),m=a(i._sanitizeSelector(j.hash));if(h.hasClass("ui-tabs-selected")&&!l.collapsible||h.hasClass("ui-state-disabled")||h.hasClass("ui-state-processing")||i.panels.filter(":animated").length||i._trigger("select",null,i._ui(this,m[0]))===false){this.blur();return false}l.selected=i.anchors.index(this);i.abort();if(l.collapsible){if(h.hasClass("ui-tabs-selected")){l.selected=-1;l.cookie&&i._cookie(l.selected,l.cookie);i.element.queue("tabs",function(){A(j,k)}).dequeue("tabs");this.blur();return false}else{if(!k.length){l.cookie&&i._cookie(l.selected,l.cookie);i.element.queue("tabs",function(){z(j,m)});i.load(i.anchors.index(this));this.blur();return false}}}l.cookie&&i._cookie(l.selected,l.cookie);if(m.length){k.length&&i.element.queue("tabs",function(){A(j,k)});i.element.queue("tabs",function(){z(j,m)});i.load(i.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}a.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(d){if(typeof d=="string"){d=this.anchors.index(this.anchors.filter("[href$="+d+"]"))}return d},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var i=a.data(this,"href.tabs");if(i){this.href=i}var h=a(this).unbind(".tabs");a.each(["href","load","cache"],function(j,k){h.removeData(k+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});d.cookie&&this._cookie(null,d.cookie);return this},add:function(d,l,i){if(i===b){i=this.anchors.length}var k=this,m=this.options;l=a(m.tabTemplate.replace(/#\{href\}/g,d).replace(/#\{label\}/g,l));d=!d.indexOf("#")?d.replace("#",""):this._tabId(a("a",l)[0]);l.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var n=a("#"+d);n.length||(n=a(m.panelTemplate).attr("id",d).data("destroy.tabs",true));n.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(i>=this.lis.length){l.appendTo(this.list);n.appendTo(this.list[0].parentNode)}else{l.insertBefore(this.lis[i]);n.insertBefore(this.panels[i])}m.disabled=a.map(m.disabled,function(h){return h>=i?++h:h});this._tabify();if(this.anchors.length==1){m.selected=0;l.addClass("ui-tabs-selected ui-state-active");n.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){k._trigger("show",null,k._ui(k.anchors[0],k.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[i],this.panels[i]));return this},remove:function(d){d=this._getIndex(d);var j=this.options,h=this.lis.eq(d).remove(),i=this.panels.eq(d).remove();if(h.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(d+(d+1<this.anchors.length?1:-1))}j.disabled=a.map(a.grep(j.disabled,function(k){return k!=d}),function(k){return k>=d?--k:k});this._tabify();this._trigger("remove",null,this._ui(h.find("a")[0],i[0]));return this},enable:function(d){d=this._getIndex(d);var h=this.options;if(a.inArray(d,h.disabled)!=-1){this.lis.eq(d).removeClass("ui-state-disabled");h.disabled=a.grep(h.disabled,function(i){return i!=d});this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]));return this}},disable:function(d){d=this._getIndex(d);var h=this.options;if(d!=h.selected){this.lis.eq(d).addClass("ui-state-disabled");h.disabled.push(d);h.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))}return this},select:function(d){d=this._getIndex(d);if(d==-1){if(this.options.collapsible&&this.options.selected!=-1){d=this.options.selected}else{return this}}this.anchors.eq(d).trigger(this.options.event+".tabs");return this},load:function(d){d=this._getIndex(d);var l=this,i=this.options,k=this.anchors.eq(d)[0],m=a.data(k,"load.tabs");this.abort();if(!m||this.element.queue("tabs").length!==0&&a.data(k,"cache.tabs")){this.element.dequeue("tabs")}else{this.lis.eq(d).addClass("ui-state-processing");if(i.spinner){var n=a("span",k);n.data("label.tabs",n.html()).html(i.spinner)}this.xhr=a.ajax(a.extend({},i.ajaxOptions,{url:m,success:function(h,o){a(l._sanitizeSelector(k.hash)).html(h);l._cleanup();i.cache&&a.data(k,"cache.tabs",true);l._trigger("load",null,l._ui(l.anchors[d],l.panels[d]));try{i.ajaxOptions.success(h,o)}catch(j){}},error:function(h,o){l._cleanup();l._trigger("load",null,l._ui(l.anchors[d],l.panels[d]));try{i.ajaxOptions.error(h,o,d,k)}catch(j){}}}));l.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(d,h){this.anchors.eq(d).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.8.5"});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,k){var i=this,j=this.options,l=i._rotate||(i._rotate=function(h){clearTimeout(i.rotation);i.rotation=setTimeout(function(){var m=j.selected;i.select(++m<i.anchors.length?m:0)},d);h&&h.stopPropagation()});k=i._unrotate||(i._unrotate=!k?function(h){h.clientX&&i.rotate(null)}:function(){t=j.selected;l()});if(d){this.element.bind("tabsshow",l);this.anchors.bind(j.event+".tabs",k);l()}else{clearTimeout(i.rotation);this.element.unbind("tabsshow",l);this.anchors.unbind(j.event+".tabs",k);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
(function(a){var n="2.65";if(a.support==undefined){a.support={opacity:!(a.browser.msie)}}function j(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}}a.fn.cycle=function(s,q){var r={s:this.selector,c:this.context};if(this.length==0&&s!="stop"){if(!a.isReady&&r.s){j("DOM not ready, queuing slideshow");a(function(){a(r.s,r.c).cycle(s,q)});return this}j("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.each(function(){s=i(this,s,q);if(s===false){return}if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var o=a(this);var t=s.slideExpr?a(s.slideExpr,this):o.children();var u=t.get();if(u.length<2){j("terminating; too few slides: "+u.length);return}var v=c(o,t,u,s,r);if(v===false){return}if(v.timeout||v.continuous){this.cycleTimeout=setTimeout(function(){h(u,v,0,!v.rev)},v.continuous?10:v.timeout+(v.delay||0))}})};function i(q,s,o){if(q.cycleStop==undefined){q.cycleStop=0}if(s===undefined||s===null){s={}}if(s.constructor==String){switch(s){case"stop":q.cycleStop++;if(q.cycleTimeout){clearTimeout(q.cycleTimeout)}q.cycleTimeout=0;a(q).removeData("cycle.opts");return false;case"pause":q.cyclePause=1;return false;case"resume":q.cyclePause=0;if(o===true){s=a(q).data("cycle.opts");if(!s){j("options not found, can not resume");return false}if(q.cycleTimeout){clearTimeout(q.cycleTimeout);q.cycleTimeout=0}h(s.elements,s,1,1)}return false;default:s={fx:s}}}else{if(s.constructor==Number){var r=s;s=a(q).data("cycle.opts");if(!s){j("options not found, can not advance slide");return false}if(r<0||r>=s.elements.length){j("invalid slide index: "+r);return false}s.nextSlide=r;if(q.cycleTimeout){clearTimeout(q.cycleTimeout);q.cycleTimeout=0}if(typeof o=="string"){s.oneTimeFx=o}h(s.elements,s,1,r>=s.currSlide);return false}}return s}function k(o,q){if(!a.support.opacity&&q.cleartype&&o.style.filter){try{o.style.removeAttribute("filter")}catch(r){}}}function c(q,s,x,F,E){var G=a.extend({},a.fn.cycle.defaults,F||{},a.metadata?q.metadata():a.meta?q.data():{});if(G.autostop){G.countdown=G.autostopCount||x.length}var t=q[0];q.data("cycle.opts",G);G.$cont=q;G.stopCount=t.cycleStop;G.elements=x;G.before=G.before?[G.before]:[];G.after=G.after?[G.after]:[];G.after.unshift(function(){G.busy=0});if(!a.support.opacity&&G.cleartype){G.after.push(function(){k(this,G)})}if(G.continuous){G.after.push(function(){h(x,G,0,!G.rev)})}l(G);if(!a.support.opacity&&G.cleartype&&!G.cleartypeNoBg){e(s)}if(q.css("position")=="static"){q.css("position","relative")}if(G.width){q.width(G.width)}if(G.height&&G.height!="auto"){q.height(G.height)}if(G.startingSlide){G.startingSlide=parseInt(G.startingSlide)}if(G.random){G.randomMap=[];for(var A=0;A<x.length;A++){G.randomMap.push(A)}G.randomMap.sort(function(o,w){return Math.random()-0.5});G.randomIndex=0;G.startingSlide=G.randomMap[0]}else{if(G.startingSlide>=x.length){G.startingSlide=0}}G.currSlide=G.startingSlide=G.startingSlide||0;var y=G.startingSlide;s.css({position:"absolute",top:0,left:0}).hide().each(function(o){var w=y?o>=y?x.length-(o-y):y-o:x.length-o;a(this).css("z-index",w)});a(x[y]).css("opacity",1).show();k(x[y],G);if(G.fit&&G.width){s.width(G.width)}if(G.fit&&G.height&&G.height!="auto"){s.height(G.height)}var I=G.containerResize&&!q.innerHeight();if(I){var D=0,C=0;for(var A=0;A<x.length;A++){var r=a(x[A]),u=r[0],J=r.outerWidth(),z=r.outerHeight();if(!J){J=u.offsetWidth}if(!z){z=u.offsetHeight}D=J>D?J:D;C=z>C?z:C}if(D>0&&C>0){q.css({width:D+"px",height:C+"px"})}}if(G.pause){q.hover(function(){this.cyclePause++},function(){this.cyclePause--})}if(m(G)===false){return false}if(!G.multiFx){var B=a.fn.cycle.transitions[G.fx];if(a.isFunction(B)){B(q,s,G)}else{if(G.fx!="custom"&&!G.multiFx){j("unknown transition: "+G.fx,"; slideshow terminating");return false}}}var H=false;F.requeueAttempts=F.requeueAttempts||0;s.each(function(){var o=a(this);this.cycleH=(G.fit&&G.height)?G.height:o.height();this.cycleW=(G.fit&&G.width)?G.width:o.width();if(o.is("img")){var w=(a.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var K=(a.browser.opera&&this.cycleW==42&&this.cycleH==19&&!this.complete);var L=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(w||K||L){if(E.s&&G.requeueOnImageNotLoaded&&++F.requeueAttempts<100){j(F.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){a(E.s,E.c).cycle(F)},G.requeueTimeout);H=true;return false}else{j("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(H){return false}G.cssBefore=G.cssBefore||{};G.animIn=G.animIn||{};G.animOut=G.animOut||{};s.not(":eq("+y+")").css(G.cssBefore);if(G.cssFirst){a(s[y]).css(G.cssFirst)}if(G.timeout){G.timeout=parseInt(G.timeout);if(G.speed.constructor==String){G.speed=a.fx.speeds[G.speed]||parseInt(G.speed)}if(!G.sync){G.speed=G.speed/2}while((G.timeout-G.speed)<250){G.timeout+=G.speed}}if(G.easing){G.easeIn=G.easeOut=G.easing}if(!G.speedIn){G.speedIn=G.speed}if(!G.speedOut){G.speedOut=G.speed}G.slideCount=x.length;G.currSlide=G.lastSlide=y;if(G.random){G.nextSlide=G.currSlide;if(++G.randomIndex==x.length){G.randomIndex=0}G.nextSlide=G.randomMap[G.randomIndex]}else{G.nextSlide=G.startingSlide>=(x.length-1)?0:G.startingSlide+1}var v=s[y];if(G.before.length){G.before[0].apply(v,[v,v,G,true])}if(G.after.length>1){G.after[1].apply(v,[v,v,G,true])}if(G.next){a(G.next).click(function(){return b(G,G.rev?-1:1)})}if(G.prev){a(G.prev).click(function(){return b(G,G.rev?1:-1)})}if(G.pager){d(x,G)}f(G,x);return G}function l(o){o.original={before:[],after:[]};o.original.cssBefore=a.extend({},o.cssBefore);o.original.cssAfter=a.extend({},o.cssAfter);o.original.animIn=a.extend({},o.animIn);o.original.animOut=a.extend({},o.animOut);a.each(o.before,function(){o.original.before.push(this)});a.each(o.after,function(){o.original.after.push(this)})}function m(r){var v=a.fn.cycle.transitions;if(r.fx.indexOf(",")>0){r.multiFx=true;r.fxs=r.fx.replace(/\s*/g,"").split(",");for(var q=0;q<r.fxs.length;q++){var o=r.fxs[q];var u=v[o];if(!u||!v.hasOwnProperty(o)||!a.isFunction(u)){j("discarding unknown transition: ",o);r.fxs.splice(q,1);q--}}if(!r.fxs.length){j("No valid transitions named; slideshow terminating.");return false}}else{if(r.fx=="all"){r.multiFx=true;r.fxs=[];for(p in v){var u=v[p];if(v.hasOwnProperty(p)&&a.isFunction(u)){r.fxs.push(p)}}}}if(r.multiFx&&r.randomizeEffects){var s=Math.floor(Math.random()*20)+30;for(var q=0;q<s;q++){var t=Math.floor(Math.random()*r.fxs.length);r.fxs.push(r.fxs.splice(t,1)[0])}j("randomized fx sequence: ",r.fxs)}return true}function f(q,o){q.addSlide=function(t,u){var r=a(t),v=r[0];if(!q.autostopCount){q.countdown++}o[u?"unshift":"push"](v);if(q.els){q.els[u?"unshift":"push"](v)}q.slideCount=o.length;r.css("position","absolute");r[u?"prependTo":"appendTo"](q.$cont);if(u){q.currSlide++;q.nextSlide++}if(!a.support.opacity&&q.cleartype&&!q.cleartypeNoBg){e(r)}if(q.fit&&q.width){r.width(q.width)}if(q.fit&&q.height&&q.height!="auto"){$slides.height(q.height)}v.cycleH=(q.fit&&q.height)?q.height:r.height();v.cycleW=(q.fit&&q.width)?q.width:r.width();r.css(q.cssBefore);if(q.pager){a.fn.cycle.createPagerAnchor(o.length-1,v,a(q.pager),o,q)}if(a.isFunction(q.onAddSlide)){q.onAddSlide(r)}else{r.hide()}}}a.fn.cycle.resetState=function(r,o){o=o||r.fx;r.before=[];r.after=[];r.cssBefore=a.extend({},r.original.cssBefore);r.cssAfter=a.extend({},r.original.cssAfter);r.animIn=a.extend({},r.original.animIn);r.animOut=a.extend({},r.original.animOut);r.fxFn=null;a.each(r.original.before,function(){r.before.push(this)});a.each(r.original.after,function(){r.after.push(this)});var q=a.fn.cycle.transitions[o];if(a.isFunction(q)){q(r.$cont,a(r.elements),r)}};function h(r,x,u,s){if(u&&x.busy&&x.manualTrump){a(r).stop(true,true);x.busy=false}if(x.busy){return}var y=x.$cont[0],q=r[x.currSlide],w=r[x.nextSlide];if(y.cycleStop!=x.stopCount||y.cycleTimeout===0&&!u){return}if(!u&&!y.cyclePause&&((x.autostop&&(--x.countdown<=0))||(x.nowrap&&!x.random&&x.nextSlide<x.currSlide))){if(x.end){x.end(x)}return}if(u||!y.cyclePause){var t=x.fx;q.cycleH=q.cycleH||a(q).height();q.cycleW=q.cycleW||a(q).width();w.cycleH=w.cycleH||a(w).height();w.cycleW=w.cycleW||a(w).width();if(x.multiFx){if(x.lastFx==undefined||++x.lastFx>=x.fxs.length){x.lastFx=0}t=x.fxs[x.lastFx];x.currFx=t}if(x.oneTimeFx){t=x.oneTimeFx;x.oneTimeFx=null}a.fn.cycle.resetState(x,t);if(x.before.length){a.each(x.before,function(A,B){if(y.cycleStop!=x.stopCount){return}B.apply(w,[q,w,x,s])})}var o=function(){a.each(x.after,function(A,B){if(y.cycleStop!=x.stopCount){return}B.apply(w,[q,w,x,s])})};if(x.nextSlide!=x.currSlide){x.busy=1;if(x.fxFn){x.fxFn(q,w,x,o,s)}else{if(a.isFunction(a.fn.cycle[x.fx])){a.fn.cycle[x.fx](q,w,x,o)}else{a.fn.cycle.custom(q,w,x,o,u&&x.fastOnEvent)}}}x.lastSlide=x.currSlide;if(x.random){x.currSlide=x.nextSlide;if(++x.randomIndex==r.length){x.randomIndex=0}x.nextSlide=x.randomMap[x.randomIndex]}else{var z=(x.nextSlide+1)==r.length;x.nextSlide=z?0:x.nextSlide+1;x.currSlide=z?r.length-1:x.nextSlide-1}if(x.pager){a.fn.cycle.updateActivePagerLink(x.pager,x.currSlide)}}var v=0;if(x.timeout&&!x.continuous){v=g(q,w,x,s)}else{if(x.continuous&&y.cyclePause){v=10}}if(v>0){y.cycleTimeout=setTimeout(function(){h(r,x,0,!x.rev)},v)}}a.fn.cycle.updateActivePagerLink=function(q,o){a(q).find("a").removeClass("activeSlide").filter("a:eq("+o+")").addClass("activeSlide")};function g(o,r,s,q){if(s.timeoutFn){var u=s.timeoutFn(o,r,s,q);if(u!==false){return u}}return s.timeout}a.fn.cycle.next=function(o){b(o,o.rev?-1:1)};a.fn.cycle.prev=function(o){b(o,o.rev?1:-1)};function b(q,t){var o=q.elements;var r=q.$cont[0],s=r.cycleTimeout;if(s){clearTimeout(s);r.cycleTimeout=0}if(q.random&&t<0){q.randomIndex--;if(--q.randomIndex==-2){q.randomIndex=o.length-2}else{if(q.randomIndex==-1){q.randomIndex=o.length-1}}q.nextSlide=q.randomMap[q.randomIndex]}else{if(q.random){if(++q.randomIndex==o.length){q.randomIndex=0}q.nextSlide=q.randomMap[q.randomIndex]}else{q.nextSlide=q.currSlide+t;if(q.nextSlide<0){if(q.nowrap){return false}q.nextSlide=o.length-1}else{if(q.nextSlide>=o.length){if(q.nowrap){return false}q.nextSlide=0}}}}if(a.isFunction(q.prevNextClick)){q.prevNextClick(t>0,q.nextSlide,o[q.nextSlide])}h(o,q,1,t>=0);return false}function d(q,r){var o=a(r.pager);a.each(q,function(s,t){a.fn.cycle.createPagerAnchor(s,t,o,q,r)});a.fn.cycle.updateActivePagerLink(r.pager,r.startingSlide)}a.fn.cycle.createPagerAnchor=function(v,t,q,u,w){var r=(a.isFunction(w.pagerAnchorBuilder))?w.pagerAnchorBuilder(v,t):'<a href="#">'+(v+1)+"</a>";if(!r){return}var o=a(r);if(o.parents("body").length==0){var s=[];if(q.length>1){q.each(function(){var x=o.clone(true);a(this).append(x);s.push(x)});o=a(s)}else{o.appendTo(q)}}o.bind(w.pagerEvent,function(){w.nextSlide=v;var x=w.$cont[0],y=x.cycleTimeout;if(y){clearTimeout(y);x.cycleTimeout=0}if(a.isFunction(w.pagerClick)){w.pagerClick(w.nextSlide,u[w.nextSlide])}h(u,w,1,w.currSlide<v);return false});if(w.pauseOnPagerHover){o.hover(function(){w.$cont[0].cyclePause++},function(){w.$cont[0].cyclePause--})}};a.fn.cycle.hopsFromLast=function(t,q){var r,s=t.lastSlide,o=t.currSlide;if(q){r=o>s?o-s:t.slideCount-s}else{r=o<s?s-o:s+t.slideCount-o}return r};function e(o){function r(t){t=parseInt(t).toString(16);return t.length<2?"0"+t:t}function q(s){for(;s&&s.nodeName.toLowerCase()!="html";s=s.parentNode){var u=a.css(s,"background-color");if(u.indexOf("rgb")>=0){var t=u.match(/\d+/g);return"#"+r(t[0])+r(t[1])+r(t[2])}if(u&&u!="transparent"){return u}}return"#ffffff"}o.each(function(){a(this).css("background-color",q(this))})}a.fn.cycle.commonReset=function(o,r,s,u,q,t){a(s.elements).not(o).hide();s.cssBefore.opacity=1;s.cssBefore.display="block";if(u!==false&&r.cycleW>0){s.cssBefore.width=r.cycleW}if(q!==false&&r.cycleH>0){s.cssBefore.height=r.cycleH}s.cssAfter=s.cssAfter||{};s.cssAfter.display="none";a(o).css("zIndex",s.slideCount+(t===true?1:0));a(r).css("zIndex",s.slideCount+(t===true?0:1))};a.fn.cycle.custom=function(s,w,x,r,A){var o=a(s),q=a(w);var y=x.speedIn,z=x.speedOut,t=x.easeIn,u=x.easeOut;q.css(x.cssBefore);if(A){if(typeof A=="number"){y=z=A}else{y=z=1}t=u=null}var v=function(){q.animate(x.animIn,y,t,r)};o.animate(x.animOut,z,u,function(){if(x.cssAfter){o.css(x.cssAfter)}if(!x.sync){v()}});if(x.sync){v()}};a.fn.cycle.transitions={fade:function(o,q,r){q.not(":eq("+r.currSlide+")").css("opacity",0);r.before.push(function(s,t,u){a.fn.cycle.commonReset(s,t,u);u.cssBefore.opacity=0});r.animIn={opacity:1};r.animOut={opacity:0};r.cssBefore={top:0,left:0}}};a.fn.cycle.ver=function(){return n};a.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!a.support.opacity,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250}})(jQuery);(function(a){a.fn.cycle.transitions.scrollUp=function(b,c,e){b.css("overflow","hidden");e.before.push(a.fn.cycle.commonReset);var d=b.height();e.cssBefore={top:d,left:0};e.cssFirst={top:0};e.animIn={top:0};e.animOut={top:-d}};a.fn.cycle.transitions.scrollDown=function(b,c,e){b.css("overflow","hidden");e.before.push(a.fn.cycle.commonReset);var d=b.height();e.cssFirst={top:0};e.cssBefore={top:-d,left:0};e.animIn={top:0};e.animOut={top:d}};a.fn.cycle.transitions.scrollLeft=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst={left:0};d.cssBefore={left:e,top:0};d.animIn={left:0};d.animOut={left:0-e}};a.fn.cycle.transitions.scrollRight=function(b,c,d){b.css("overflow","hidden");d.before.push(a.fn.cycle.commonReset);var e=b.width();d.cssFirst={left:0};d.cssBefore={left:-e,top:0};d.animIn={left:0};d.animOut={left:e}};a.fn.cycle.transitions.scrollHorz=function(b,c,d){b.css("overflow","hidden").width();d.before.push(function(e,g,h,f){a.fn.cycle.commonReset(e,g,h);h.cssBefore.left=f?(g.cycleW-1):(1-g.cycleW);h.animOut.left=f?-e.cycleW:e.cycleW});d.cssFirst={left:0};d.cssBefore={top:0};d.animIn={left:0};d.animOut={top:0}};a.fn.cycle.transitions.scrollVert=function(b,c,d){b.css("overflow","hidden");d.before.push(function(e,g,h,f){a.fn.cycle.commonReset(e,g,h);h.cssBefore.top=f?(1-g.cycleH):(g.cycleH-1);h.animOut.top=f?e.cycleH:-e.cycleH});d.cssFirst={top:0};d.cssBefore={left:0};d.animIn={top:0};d.animOut={left:0}};a.fn.cycle.transitions.slideX=function(b,c,d){d.before.push(function(e,f,g){a(g.elements).not(e).hide();a.fn.cycle.commonReset(e,f,g,false,true);g.animIn.width=f.cycleW});d.cssBefore={left:0,top:0,width:0};d.animIn={width:"show"};d.animOut={width:0}};a.fn.cycle.transitions.slideY=function(b,c,d){d.before.push(function(e,f,g){a(g.elements).not(e).hide();a.fn.cycle.commonReset(e,f,g,true,false);g.animIn.height=f.cycleH});d.cssBefore={left:0,top:0,height:0};d.animIn={height:"show"};d.animOut={height:0}};a.fn.cycle.transitions.shuffle=function(b,c,e){var f=b.css("overflow","visible").width();c.css({left:0,top:0});e.before.push(function(g,h,i){a.fn.cycle.commonReset(g,h,i,true,true,true)});e.speed=e.speed/2;e.random=0;e.shuffle=e.shuffle||{left:-f,top:15};e.els=[];for(var d=0;d<c.length;d++){e.els.push(c[d])}for(var d=0;d<e.currSlide;d++){e.els.push(e.els.shift())}e.fxFn=function(j,l,m,h,k){var g=k?a(j):a(l);a(l).css(m.cssBefore);var i=m.slideCount;g.animate(m.shuffle,m.speedIn,m.easeIn,function(){var n=a.fn.cycle.hopsFromLast(m,k);for(var q=0;q<n;q++){k?m.els.push(m.els.shift()):m.els.unshift(m.els.pop())}if(k){for(var o=0,r=m.els.length;o<r;o++){a(m.els[o]).css("z-index",r-o+i)}}else{var s=a(j).css("z-index");g.css("z-index",parseInt(s)+1+i)}g.animate({left:0,top:0},m.speedOut,m.easeOut,function(){a(k?this:j).hide();if(h){h()}})})};e.cssBefore={display:"block",opacity:1,top:0,left:0}};a.fn.cycle.transitions.turnUp=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,true,false);g.cssBefore.top=f.cycleH;g.animIn.height=f.cycleH});d.cssFirst={top:0};d.cssBefore={left:0,height:0};d.animIn={top:0};d.animOut={height:0}};a.fn.cycle.transitions.turnDown=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,true,false);g.animIn.height=f.cycleH;g.animOut.top=e.cycleH});d.cssFirst={top:0};d.cssBefore={left:0,top:0,height:0};d.animOut={height:0}};a.fn.cycle.transitions.turnLeft=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,true);g.cssBefore.left=f.cycleW;g.animIn.width=f.cycleW});d.cssBefore={top:0,width:0};d.animIn={left:0};d.animOut={width:0}};a.fn.cycle.transitions.turnRight=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,true);g.animIn.width=f.cycleW;g.animOut.left=e.cycleW});d.cssBefore={top:0,left:0,width:0};d.animIn={left:0};d.animOut={width:0}};a.fn.cycle.transitions.zoom=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,false,true);g.cssBefore.top=f.cycleH/2;g.cssBefore.left=f.cycleW/2;g.animIn={top:0,left:0,width:f.cycleW,height:f.cycleH};g.animOut={width:0,height:0,top:e.cycleH/2,left:e.cycleW/2}});d.cssFirst={top:0,left:0};d.cssBefore={width:0,height:0}};a.fn.cycle.transitions.fadeZoom=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,false);g.cssBefore.left=f.cycleW/2;g.cssBefore.top=f.cycleH/2;g.animIn={top:0,left:0,width:f.cycleW,height:f.cycleH}});d.cssBefore={width:0,height:0};d.animOut={opacity:0}};a.fn.cycle.transitions.blindX=function(b,c,d){var e=b.css("overflow","hidden").width();d.before.push(function(f,g,h){a.fn.cycle.commonReset(f,g,h);h.animIn.width=g.cycleW;h.animOut.left=f.cycleW});d.cssBefore={left:e,top:0};d.animIn={left:0};d.animOut={left:e}};a.fn.cycle.transitions.blindY=function(b,c,e){var d=b.css("overflow","hidden").height();e.before.push(function(f,g,h){a.fn.cycle.commonReset(f,g,h);h.animIn.height=g.cycleH;h.animOut.top=f.cycleH});e.cssBefore={top:d,left:0};e.animIn={top:0};e.animOut={top:d}};a.fn.cycle.transitions.blindZ=function(b,c,e){var d=b.css("overflow","hidden").height();var f=b.width();e.before.push(function(g,h,i){a.fn.cycle.commonReset(g,h,i);i.animIn.height=h.cycleH;i.animOut.top=g.cycleH});e.cssBefore={top:d,left:f};e.animIn={top:0,left:0};e.animOut={top:d,left:f}};a.fn.cycle.transitions.growX=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,true);g.cssBefore.left=this.cycleW/2;g.animIn={left:0,width:this.cycleW};g.animOut={left:0}});d.cssBefore={width:0,top:0}};a.fn.cycle.transitions.growY=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,true,false);g.cssBefore.top=this.cycleH/2;g.animIn={top:0,height:this.cycleH};g.animOut={top:0}});d.cssBefore={height:0,left:0}};a.fn.cycle.transitions.curtainX=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,false,true,true);g.cssBefore.left=f.cycleW/2;g.animIn={left:0,width:this.cycleW};g.animOut={left:e.cycleW/2,width:0}});d.cssBefore={top:0,width:0}};a.fn.cycle.transitions.curtainY=function(b,c,d){d.before.push(function(e,f,g){a.fn.cycle.commonReset(e,f,g,true,false,true);g.cssBefore.top=f.cycleH/2;g.animIn={top:0,height:f.cycleH};g.animOut={top:e.cycleH/2,height:0}});d.cssBefore={left:0,height:0}};a.fn.cycle.transitions.cover=function(b,c,g){var e=g.direction||"left";var i=b.css("overflow","hidden").width();var f=b.height();g.before.push(function(d,h,j){a.fn.cycle.commonReset(d,h,j);if(e=="right"){j.cssBefore.left=-i}else{if(e=="up"){j.cssBefore.top=f}else{if(e=="down"){j.cssBefore.top=-f}else{j.cssBefore.left=i}}}});g.animIn={left:0,top:0};g.animOut={opacity:1};g.cssBefore={top:0,left:0}};a.fn.cycle.transitions.uncover=function(b,c,g){var e=g.direction||"left";var i=b.css("overflow","hidden").width();var f=b.height();g.before.push(function(d,h,j){a.fn.cycle.commonReset(d,h,j,true,true,true);if(e=="right"){j.animOut.left=i}else{if(e=="up"){j.animOut.top=-f}else{if(e=="down"){j.animOut.top=f}else{j.animOut.left=-i}}}});g.animIn={left:0,top:0};g.animOut={opacity:1};g.cssBefore={top:0,left:0}};a.fn.cycle.transitions.toss=function(b,c,e){var f=b.css("overflow","visible").width();var d=b.height();e.before.push(function(g,h,i){a.fn.cycle.commonReset(g,h,i,true,true,true);if(!i.animOut.left&&!i.animOut.top){i.animOut={left:f*2,top:-d/2,opacity:0}}else{i.animOut.opacity=0}});e.cssBefore={left:0,top:0};e.animIn={left:0}};a.fn.cycle.transitions.wipe=function(c,e,m){var q=c.css("overflow","hidden").width();var j=c.height();m.cssBefore=m.cssBefore||{};var g;if(m.clip){if(/l2r/.test(m.clip)){g="rect(0px 0px "+j+"px 0px)"}else{if(/r2l/.test(m.clip)){g="rect(0px "+q+"px "+j+"px "+q+"px)"}else{if(/t2b/.test(m.clip)){g="rect(0px "+q+"px 0px 0px)"}else{if(/b2t/.test(m.clip)){g="rect("+j+"px "+q+"px "+j+"px 0px)"}else{if(/zoom/.test(m.clip)){var o=parseInt(j/2);var k=parseInt(q/2);g="rect("+o+"px "+k+"px "+o+"px "+k+"px)"}}}}}}m.cssBefore.clip=m.cssBefore.clip||g||"rect(0px 0px 0px 0px)";var i=m.cssBefore.clip.match(/(\d+)/g);var o=parseInt(i[0]),n=parseInt(i[1]),f=parseInt(i[2]),k=parseInt(i[3]);m.before.push(function(l,s,t){if(l==s){return}var b=a(l),d=a(s);a.fn.cycle.commonReset(l,s,t,true,true,false);t.cssAfter.display="block";var u=1,h=parseInt((t.speedIn/13))-1;(function r(){var y=o?o-parseInt(u*(o/h)):0;var w=k?k-parseInt(u*(k/h)):0;var v=f<j?f+parseInt(u*((j-f)/h||1)):j;var x=n<q?n+parseInt(u*((q-n)/h||1)):q;d.css({clip:"rect("+y+"px "+x+"px "+v+"px "+w+"px)"});(u++<=h)?setTimeout(r,13):b.css("display","none")})()});m.cssBefore={display:"block",opacity:1,top:0,left:0};m.animIn={left:0};m.animOut={left:0}}})(jQuery);
(function(a){a.fn.extend({multicol:function(b){this.each(function(){var i=parseInt(a(this).css("line-height"),10);var m=(b.colNum?b.colNum:2);var u=(b.colMargin?b.colMargin:10);var n=parseInt(a(this).width(),10);var q=(a(this).width()-u*(m-1))/m-0.1;a(this).find("> *:last").css({marginBottom:0}).end().find("img").each(function(){var c=this.height%i;if(c!=0){c=(c<i/2?-c:i-c)}a(this).css({marginBottom:c})}).end().css({width:q}).end();var t=parseInt(a(this).height(),10);var s=(parseInt(t,10)/parseInt(i,10))%parseInt(m,10);if(s!=0){t=t+i*(m-s)}a(this).css({height:t+"px",overflow:"hidden"}).wrapInner("<div class='multicolInner'></div>").end();var r=a(this).html();a(this).css({height:t/m+"px",width:n}).html("").end();for(var p=0;p<m;p++){var o=a(r).css({"float":p!=(m-1)?"left":"right",width:q,marginTop:-(a(this).height()*p)+"px",marginRight:p!=(m-1)?u+"px":0+"px",overflow:"hidden"});a(o).appendTo(this)}});a(this).find("*").css("zoom","1");return this}})})(jQuery);
(function(a){var T,F,L,U,K,D,e,I,J,N=0,O={},M=[],g=0,h={},f=[],c=null,B=new Image(),C=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,R=/[^\.]\.(swf)\s*$/i,H,G=1,Q,z,d=false,P=20,A=a.extend(a("<div/>")[0],{prop:0}),S=0,E=!a.support.opacity&&!window.XMLHttpRequest,i=function(){F.hide();B.onerror=B.onload=null;if(c){c.abort()}T.empty()},l=function(){a.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{scrolling:"no",padding:20,transitionIn:"none",transitionOut:"none"})},o=function(){return[a(window).width(),a(window).height(),a(document).scrollLeft(),a(document).scrollTop()]},q=function(){var ac=o(),aa={},X=h.margin,Z=h.autoScale,W=(P+X)*2,ab=(P+X)*2,V=(h.padding*2),Y;if(h.width.toString().indexOf("%")>-1){aa.width=((ac[0]*parseFloat(h.width))/100)-(P*2);Z=false}else{aa.width=h.width+V}if(h.height.toString().indexOf("%")>-1){aa.height=((ac[1]*parseFloat(h.height))/100)-(P*2);Z=false}else{aa.height=h.height+V}if(Z&&(aa.width>(ac[0]-W)||aa.height>(ac[1]-ab))){if(O.type=="image"||O.type=="swf"){W+=V;ab+=V;Y=Math.min(Math.min(ac[0]-W,h.width)/h.width,Math.min(ac[1]-ab,h.height)/h.height);aa.width=Math.round(Y*(aa.width-V))+V;aa.height=Math.round(Y*(aa.height-V))+V}else{aa.width=Math.min(aa.width,(ac[0]-W));aa.height=Math.min(aa.height,(ac[1]-ab))}}aa.top=ac[3]+((ac[1]-(aa.height+(P*2)))*0.5);aa.left=ac[2]+((ac[0]-(aa.width+(P*2)))*0.5);if(h.autoScale===false){aa.top=Math.max(ac[3]+X,aa.top);aa.left=Math.max(ac[2]+X,aa.left)}return aa},m=function(V){if(V&&V.length){switch(h.titlePosition){case"inside":return V;case"over":return'<span id="fancybox-title-over">'+V+"</span>";default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+V+'</span><span id="fancybox-title-right"></span></span>'}}return false},v=function(){var V=h.title,X=z.width-(h.padding*2),W="fancybox-title-"+h.titlePosition;a("#fancybox-title").remove();S=0;if(h.titleShow===false){return}V=a.isFunction(h.titleFormat)?h.titleFormat(V,f,g,h):m(V);if(!V||V===""){return}a('<div id="fancybox-title" class="'+W+'" />').css({width:X,paddingLeft:h.padding,paddingRight:h.padding}).html(V).appendTo("body");switch(h.titlePosition){case"inside":S=a("#fancybox-title").outerHeight(true)-h.padding;z.height+=S;break;case"over":a("#fancybox-title").css("bottom",h.padding);break;default:a("#fancybox-title").css("bottom",a("#fancybox-title").outerHeight(true)*-1);break}a("#fancybox-title").appendTo(K).hide()},w=function(){a(document).unbind("keydown.fb").bind("keydown.fb",function(V){if(V.keyCode==27&&h.enableEscapeButton){V.preventDefault();a.fancybox.close()}else{if(V.keyCode==37){V.preventDefault();a.fancybox.prev()}else{if(V.keyCode==39){V.preventDefault();a.fancybox.next()}}}});if(a.fn.mousewheel){U.unbind("mousewheel.fb");if(f.length>1){U.bind("mousewheel.fb",function(W,V){W.preventDefault();if(d||V===0){return}if(V>0){a.fancybox.prev()}else{a.fancybox.next()}})}}if(!h.showNavArrows){return}if((h.cyclic&&f.length>1)||g!==0){I.show()}if((h.cyclic&&f.length>1)||g!=(f.length-1)){J.show()}},s=function(){var V,W;if((f.length-1)>g){V=f[g+1].href;if(typeof V!=="undefined"&&V.match(C)){W=new Image();W.src=V}}if(g>0){V=f[g-1].href;if(typeof V!=="undefined"&&V.match(C)){W=new Image();W.src=V}}},b=function(){D.css("overflow",(h.scrolling=="auto"?(h.type=="image"||h.type=="iframe"||h.type=="swf"?"hidden":"auto"):(h.scrolling=="yes"?"auto":"visible")));if(!a.support.opacity){D.get(0).style.removeAttribute("filter");U.get(0).style.removeAttribute("filter")}a("#fancybox-title").show();if(h.hideOnContentClick){D.one("click",a.fancybox.close)}if(h.hideOnOverlayClick){L.one("click",a.fancybox.close)}if(h.showCloseButton){e.show()}w();a(window).bind("resize.fb",a.fancybox.center);if(h.centerOnScroll){a(window).bind("scroll.fb",a.fancybox.center)}else{a(window).unbind("scroll.fb")}if(a.isFunction(h.onComplete)){h.onComplete(f,g,h)}d=false;s()},k=function(X){var Z=Math.round(Q.width+(z.width-Q.width)*X),V=Math.round(Q.height+(z.height-Q.height)*X),Y=Math.round(Q.top+(z.top-Q.top)*X),W=Math.round(Q.left+(z.left-Q.left)*X);U.css({width:Z+"px",height:V+"px",top:Y+"px",left:W+"px"});Z=Math.max(Z-h.padding*2,0);V=Math.max(V-(h.padding*2+(S*X)),0);D.css({width:Z+"px",height:V+"px"});if(typeof z.opacity!=="undefined"){U.css("opacity",(X<0.5?0.5:X))}},n=function(V){var W=V.offset();W.top+=parseFloat(V.css("paddingTop"))||0;W.left+=parseFloat(V.css("paddingLeft"))||0;W.top+=parseFloat(V.css("border-top-width"))||0;W.left+=parseFloat(V.css("border-left-width"))||0;W.width=V.width();W.height=V.height();return W},p=function(){var W=O.orig?a(O.orig):false,V={},X,Y;if(W&&W.length){X=n(W);V={width:(X.width+(h.padding*2)),height:(X.height+(h.padding*2)),top:(X.top-h.padding-P),left:(X.left-h.padding-P)}}else{Y=o();V={width:1,height:1,top:Y[3]+Y[1]*0.5,left:Y[2]+Y[0]*0.5}}return V},x=function(){F.hide();if(U.is(":visible")&&a.isFunction(h.onCleanup)){if(h.onCleanup(f,g,h)===false){a.event.trigger("fancybox-cancel");d=false;return}}f=M;g=N;h=O;D.get(0).scrollTop=0;D.get(0).scrollLeft=0;if(h.overlayShow){if(E){a("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"})}L.css({"background-color":h.overlayColor,opacity:h.overlayOpacity}).unbind().show()}z=q();v();if(U.is(":visible")){a(e.add(I).add(J)).hide();var W=U.position(),V;Q={top:W.top,left:W.left,width:U.width(),height:U.height()};V=(Q.width==z.width&&Q.height==z.height);D.fadeOut(h.changeFade,function(){var X=function(){D.html(T.contents()).fadeIn(h.changeFade,b)};a.event.trigger("fancybox-change");D.empty().css("overflow","hidden");if(V){D.css({top:h.padding,left:h.padding,width:Math.max(z.width-(h.padding*2),1),height:Math.max(z.height-(h.padding*2)-S,1)});X()}else{D.css({top:h.padding,left:h.padding,width:Math.max(Q.width-(h.padding*2),1),height:Math.max(Q.height-(h.padding*2),1)});A.prop=0;a(A).animate({prop:1},{duration:h.changeSpeed,easing:h.easingChange,step:k,complete:X})}});return}U.css("opacity",1);if(h.transitionIn=="elastic"){Q=p();D.css({top:h.padding,left:h.padding,width:Math.max(Q.width-(h.padding*2),1),height:Math.max(Q.height-(h.padding*2),1)}).html(T.contents());U.css(Q).show();if(h.opacity){z.opacity=0}A.prop=0;a(A).animate({prop:1},{duration:h.speedIn,easing:h.easingIn,step:k,complete:b})}else{D.css({top:h.padding,left:h.padding,width:Math.max(z.width-(h.padding*2),1),height:Math.max(z.height-(h.padding*2)-S,1)}).html(T.contents());U.css(z).fadeIn(h.transitionIn=="none"?0:h.speedIn,b)}},u=function(){T.width(O.width);T.height(O.height);if(O.width=="auto"){O.width=T.width()}if(O.height=="auto"){O.height=T.height()}x()},t=function(){d=true;O.width=B.width;O.height=B.height;a("<img />").attr({id:"fancybox-img",src:B.src,alt:O.title}).appendTo(T);x()},y=function(){i();var Y=M[N],X,ac,ab,aa,W,Z,V;O=a.extend({},a.fn.fancybox.defaults,(typeof a(Y).data("fancybox")=="undefined"?O:a(Y).data("fancybox")));ab=Y.title||a(Y).title||O.title||"";if(Y.nodeName&&!O.orig){O.orig=a(Y).children("img:first").length?a(Y).children("img:first"):a(Y)}if(ab===""&&O.orig){ab=O.orig.attr("alt")}if(Y.nodeName&&(/^(?:javascript|#)/i).test(Y.href)){X=O.href||null}else{X=O.href||Y.href||null}if(O.type){ac=O.type;if(!X){X=O.content}}else{if(O.content){ac="html"}else{if(X){if(X.match(C)){ac="image"}else{if(X.match(R)){ac="swf"}else{if(a(Y).hasClass("iframe")){ac="iframe"}else{if(X.match(/#/)){Y=X.substr(X.indexOf("#"));ac=a(Y).length>0?"inline":"ajax"}else{ac="ajax"}}}}}else{ac="inline"}}}O.type=ac;O.href=X;O.title=ab;if(O.autoDimensions&&O.type!=="iframe"&&O.type!=="swf"){O.width="auto";O.height="auto"}if(O.modal){O.overlayShow=true;O.hideOnOverlayClick=false;O.hideOnContentClick=false;O.enableEscapeButton=false;O.showCloseButton=false}if(a.isFunction(O.onStart)){if(O.onStart(M,N,O)===false){d=false;return}}T.css("padding",(P+O.padding+O.margin));a(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){a(this).replaceWith(D.children())});switch(ac){case"html":T.html(O.content);u();break;case"inline":a('<div class="fancybox-inline-tmp" />').hide().insertBefore(a(Y)).bind("fancybox-cleanup",function(){a(this).replaceWith(D.children())}).bind("fancybox-cancel",function(){a(this).replaceWith(T.children())});a(Y).appendTo(T);u();break;case"image":d=false;a.fancybox.showActivity();B=new Image();B.onerror=function(){l()};B.onload=function(){B.onerror=null;B.onload=null;t()};B.src=X;break;case"swf":aa='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+O.width+'" height="'+O.height+'"><param name="movie" value="'+X+'"></param>';W="";a.each(O.swf,function(ad,ae){aa+='<param name="'+ad+'" value="'+ae+'"></param>';W+=" "+ad+'="'+ae+'"'});aa+='<embed src="'+X+'" type="application/x-shockwave-flash" width="'+O.width+'" height="'+O.height+'"'+W+"></embed></object>";T.html(aa);u();break;case"ajax":Z=X.split("#",2);V=O.ajax.data||{};if(Z.length>1){X=Z[0];if(typeof V=="string"){V+="&selector="+Z[1]}else{V.selector=Z[1]}}d=false;a.fancybox.showActivity();c=a.ajax(a.extend(O.ajax,{url:X,data:V,error:l,success:function(ad,ae,af){if(c.status==200){T.html(ad);u()}}}));break;case"iframe":a('<iframe id="fancybox-frame" name="fancybox-frame'+new Date().getTime()+'" frameborder="0" hspace="0" scrolling="'+O.scrolling+'" src="'+O.href+'"></iframe>').appendTo(T);x();break}},j=function(){if(!F.is(":visible")){clearInterval(H);return}a("div",F).css("top",(G*-40)+"px");G=(G+1)%12},r=function(){if(a("#fancybox-wrap").length){return}a("body").append(T=a('<div id="fancybox-tmp"></div>'),F=a('<div id="fancybox-loading"><div></div></div>'),L=a('<div id="fancybox-overlay"></div>'),U=a('<div id="fancybox-wrap"></div>'));if(!a.support.opacity){U.addClass("fancybox-ie");F.addClass("fancybox-ie")}K=a('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>').appendTo(U);K.append(D=a('<div id="fancybox-inner"></div>'),e=a('<a id="fancybox-close"></a>'),I=a('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),J=a('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));e.click(a.fancybox.close);F.click(a.fancybox.cancel);I.click(function(V){V.preventDefault();a.fancybox.prev()});J.click(function(V){V.preventDefault();a.fancybox.next()});if(E){L.get(0).style.setExpression("height","document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");F.get(0).style.setExpression("top","(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");K.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>')}};a.fn.fancybox=function(V){a(this).data("fancybox",a.extend({},V,(a.metadata?a(this).metadata():{}))).unbind("click.fb").bind("click.fb",function(W){W.preventDefault();if(d){return}d=true;a(this).blur();M=[];N=0;var X=a(this).attr("rel")||"";if(!X||X==""||X==="nofollow"){M.push(this)}else{M=a("a[rel="+X+"], area[rel="+X+"]");N=M.index(this)}y();return false});return this};a.fancybox=function(X){if(d){return}d=true;var Y=typeof arguments[1]!=="undefined"?arguments[1]:{};M=[];N=Y.index||0;if(a.isArray(X)){for(var V=0,W=X.length;V<W;V++){if(typeof X[V]=="object"){a(X[V]).data("fancybox",a.extend({},Y,X[V]))}else{X[V]=a({}).data("fancybox",a.extend({content:X[V]},Y))}}M=jQuery.merge(M,X)}else{if(typeof X=="object"){a(X).data("fancybox",a.extend({},Y,X))}else{X=a({}).data("fancybox",a.extend({content:X},Y))}M.push(X)}if(N>M.length||N<0){N=0}y()};a.fancybox.showActivity=function(){clearInterval(H);F.show();H=setInterval(j,66)};a.fancybox.hideActivity=function(){F.hide()};a.fancybox.next=function(){return a.fancybox.pos(g+1)};a.fancybox.prev=function(){return a.fancybox.pos(g-1)};a.fancybox.pos=function(V){if(d){return}V=parseInt(V,10);if(V>-1&&f.length>V){N=V;y()}if(h.cyclic&&f.length>1&&V<0){N=f.length-1;y()}if(h.cyclic&&f.length>1&&V>=f.length){N=0;y()}return};a.fancybox.cancel=function(){if(d){return}d=true;a.event.trigger("fancybox-cancel");i();if(O&&a.isFunction(O.onCancel)){O.onCancel(M,N,O)}d=false};a.fancybox.close=function(){if(d||U.is(":hidden")){return}d=true;if(h&&a.isFunction(h.onCleanup)){if(h.onCleanup(f,g,h)===false){d=false;return}}i();a(e.add(I).add(J)).hide();a("#fancybox-title").remove();U.add(D).add(L).unbind();a(window).unbind("resize.fb scroll.fb");a(document).unbind("keydown.fb");function V(){L.fadeOut("fast");U.hide();a.event.trigger("fancybox-cleanup");D.empty();if(a.isFunction(h.onClosed)){h.onClosed(f,g,h)}f=O=[];g=N=0;h=O={};d=false}D.css("overflow","hidden");if(h.transitionOut=="elastic"){Q=p();var W=U.position();z={top:W.top,left:W.left,width:U.width(),height:U.height()};if(h.opacity){z.opacity=1}A.prop=1;a(A).animate({prop:0},{duration:h.speedOut,easing:h.easingOut,step:k,complete:V})}else{U.fadeOut(h.transitionOut=="none"?0:h.speedOut,V)}};a.fancybox.resize=function(){var V,W;if(d||U.is(":hidden")){return}d=true;V=D.wrapInner("<div style='overflow:auto'></div>").children();W=V.height();U.css({height:W+(h.padding*2)+S});D.css({height:W});V.replaceWith(V.children());a.fancybox.center()};a.fancybox.center=function(){d=true;var X=o(),V=h.margin,W={};W.top=X[3]+((X[1]-((U.height()-S)+(P*2)))*0.5);W.left=X[2]+((X[0]-(U.width()+(P*2)))*0.5);W.top=Math.max(X[3]+V,W.top);W.left=Math.max(X[2]+V,W.left);U.css(W);d=false};a.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.3,overlayColor:"#666",titleShow:true,titlePosition:"outside",titleFormat:null,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};a(document).ready(function(){r()})})(jQuery);
(function(){function u(a){console.log("$f.fireEvent",[].slice.call(a))}function y(c){if(!c||typeof c!="object"){return c}var a=new c.constructor();for(var b in c){if(c.hasOwnProperty(b)){a[b]=y(c[b])}}return a}function A(f,c){if(!f){return}var a,b=0,d=f.length;if(d===undefined){for(a in f){if(c.call(f[a],a,f[a])===false){break}}}else{for(var e=f[0];b<d&&c.call(e,b,e)!==false;e=f[++b]){}}return f}function q(a){return document.getElementById(a)}function w(c,b,a){if(typeof b!="object"){return c}if(c&&b){A(b,function(d,e){if(!a||typeof e!="function"){c[d]=e}})}return c}function B(e){var c=e.indexOf(".");if(c!=-1){var b=e.slice(0,c)||"*";var a=e.slice(c+1,e.length);var d=[];A(document.getElementsByTagName(b),function(){if(this.className&&this.className.indexOf(a)!=-1){d.push(this)}});return d}}function t(a){a=a||window.event;if(a.preventDefault){a.stopPropagation();a.preventDefault()}else{a.returnValue=false;a.cancelBubble=true}return false}function x(c,a,b){c[a]=c[a]||[];c[a].push(b)}function s(){return"_"+(""+Math.random()).slice(2,10)}var v=function(f,d,e){var c=this,b={},g={};c.index=d;if(typeof f=="string"){f={url:f}}w(this,f,true);A(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var h="on"+this;if(h.indexOf("*")!=-1){h=h.slice(0,h.length-1);var i="onBefore"+h.slice(2);c[i]=function(j){x(g,i,j);return c}}c[h]=function(j){x(g,h,j);return c};if(d==-1){if(c[i]){e[i]=c[i]}if(c[h]){e[h]=c[h]}}});w(this,{onCuepoint:function(j,i){if(arguments.length==1){b.embedded=[null,j];return c}if(typeof j=="number"){j=[j]}var h=s();b[h]=[j,i];if(e.isLoaded()){e._api().fp_addCuepoints(j,d,h)}return c},update:function(i){w(c,i);if(e.isLoaded()){e._api().fp_updateClip(i,d)}var h=e.getConfig();var j=(d==-1)?h.clip:h.playlist[d];w(j,i,true)},_fireEvent:function(i,l,j,h){if(i=="onLoad"){A(b,function(n,D){if(D[0]){e._api().fp_addCuepoints(D[0],d,n)}});return false}h=h||c;if(i=="onCuepoint"){var m=b[l];if(m){return m[1].call(e,h,j)}}if(l&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(i)!=-1){w(h,l);if(l.metaData){if(!h.duration){h.duration=l.metaData.duration}else{h.fullDuration=l.metaData.duration}}}var k=true;A(g[i],function(){k=this.call(e,h,l,j)});return k}});if(f.onCuepoint){var a=f.onCuepoint;c.onCuepoint.apply(c,typeof a=="function"?[a]:a);delete f.onCuepoint}A(f,function(h,i){if(typeof i=="function"){x(g,h,i);delete f[h]}});if(d==-1){e.onCuepoint=this.onCuepoint}};var z=function(b,d,c,f){var a=this,e={},g=false;if(f){w(e,f)}A(d,function(h,i){if(typeof i=="function"){e[h]=i;delete d[h]}});w(this,{animate:function(k,l,j){if(!k){return a}if(typeof l=="function"){j=l;l=500}if(typeof k=="string"){var i=k;k={};k[i]=l;l=500}if(j){var h=s();e[h]=j}if(l===undefined){l=500}d=c._api().fp_animate(b,k,l,h);return a},css:function(i,j){if(j!==undefined){var h={};h[i]=j;i=h}d=c._api().fp_css(b,i);w(a,d);return a},show:function(){this.display="block";c._api().fp_showPlugin(b);return a},hide:function(){this.display="none";c._api().fp_hidePlugin(b);return a},toggle:function(){this.display=c._api().fp_togglePlugin(b);return a},fadeTo:function(k,j,i){if(typeof j=="function"){i=j;j=500}if(i){var h=s();e[h]=i}this.display=c._api().fp_fadeTo(b,k,j,h);this.opacity=k;return a},fadeIn:function(i,h){return a.fadeTo(1,i,h)},fadeOut:function(i,h){return a.fadeTo(0,i,h)},getName:function(){return b},getPlayer:function(){return c},_fireEvent:function(j,i,k){if(j=="onUpdate"){var m=c._api().fp_getPlugin(b);if(!m){return}w(a,m);delete a.methods;if(!g){A(m.methods,function(){var n=""+this;a[n]=function(){var E=[].slice.call(arguments);var F=c._api().fp_invoke(b,n,E);return F==="undefined"||F===undefined?a:F}});g=true}}var h=e[j];if(h){var l=h.apply(a,i);if(j.slice(0,1)=="_"){delete e[j]}return l}return a}})};function p(j,g,m){var I=this,H=null,d=false,n,l,f=[],K={},J={},e,k,i,c,h,a;w(I,{id:function(){return e},isLoaded:function(){return(H!==null&&H.fp_play!==undefined&&!d)},getParent:function(){return j},hide:function(C){if(C){j.style.height="0px"}if(I.isLoaded()){H.style.height="0px"}return I},show:function(){j.style.height=a+"px";if(I.isLoaded()){H.style.height=h+"px"}return I},isHidden:function(){return I.isLoaded()&&parseInt(H.style.height,10)===0},load:function(E){if(!I.isLoaded()&&I._fireEvent("onBeforeLoad")!==false){var C=function(){n=j.innerHTML;if(n&&!flashembed.isSupported(g.version)){j.innerHTML=""}if(E){E.cached=true;x(J,"onLoad",E)}flashembed(j,g,{config:m})};var D=0;A(o,function(){this.unload(function(F){if(++D==o.length){C()}})})}return I},unload:function(E){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){if(E){E(false)}return I}if(n.replace(/\s/g,"")!==""){if(I._fireEvent("onBeforeUnload")===false){if(E){E(false)}return I}d=true;try{if(H){H.fp_close();I._fireEvent("onUnload")}}catch(C){}var D=function(){H=null;j.innerHTML=n;d=false;if(E){E(true)}};setTimeout(D,50)}else{if(E){E(false)}}return I},getClip:function(C){if(C===undefined){C=c}return f[C]},getCommonClip:function(){return l},getPlaylist:function(){return f},getPlugin:function(C){var E=K[C];if(!E&&I.isLoaded()){var D=I._api().fp_getPlugin(C);if(D){E=new z(C,D,I);K[C]=E}}return E},getScreen:function(){return I.getPlugin("screen")},getControls:function(){return I.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return I.getPlugin("logo")._fireEvent("onUpdate")}catch(C){}},getPlay:function(){return I.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(C){return C?y(m):m},getFlashParams:function(){return g},loadPlugin:function(F,E,O,G){if(typeof O=="function"){G=O;O={}}var D=G?s():"_";I._api().fp_loadPlugin(F,E,O,D);var C={};C[D]=G;var P=new z(F,null,I,C);K[F]=P;return P},getState:function(){return I.isLoaded()?H.fp_getState():-1},play:function(D,C){var E=function(){if(D!==undefined){I._api().fp_play(D,C)}else{I._api().fp_play()}};if(I.isLoaded()){E()}else{if(d){setTimeout(function(){I.play(D,C)},50)}else{I.load(function(){E()})}}return I},getVersion:function(){var D="flowplayer.js 3.2.6";if(I.isLoaded()){var C=H.fp_getVersion();C.push(D);return C}return D},_api:function(){if(!I.isLoaded()){throw"Flowplayer "+I.id()+" not loaded when calling an API method"}return H},setClip:function(C){I.setPlaylist([C]);return I},getIndex:function(){return i},_swfHeight:function(){return H.clientHeight}});A(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var C="on"+this;if(C.indexOf("*")!=-1){C=C.slice(0,C.length-1);var D="onBefore"+C.slice(2);I[D]=function(E){x(J,D,E);return I}}I[C]=function(E){x(J,C,E);return I}});A(("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 C=this;I[C]=function(E,D){if(!I.isLoaded()){return I}var F=null;if(E!==undefined&&D!==undefined){F=H["fp_"+C](E,D)}else{F=(E===undefined)?H["fp_"+C]():H["fp_"+C](E)}return F==="undefined"||F===undefined?I:F}});I._fireEvent=function(W){if(typeof W=="string"){W=[W]}var X=W[0],U=W[1],S=W[2],G=W[3],F=0;if(m.debug){u(W)}if(!I.isLoaded()&&X=="onLoad"&&U=="player"){H=H||q(k);h=I._swfHeight();A(f,function(){this._fireEvent("onLoad")});A(K,function(M,N){N._fireEvent("onUpdate")});l._fireEvent("onLoad")}if(X=="onLoad"&&U!="player"){return}if(X=="onError"){if(typeof U=="string"||(typeof U=="number"&&typeof S=="number")){U=S;S=G}}if(X=="onContextMenu"){A(m.contextMenu[U],function(M,N){N.call(I)});return}if(X=="onPluginEvent"||X=="onBeforePluginEvent"){var C=U.name||U;var D=K[C];if(D){D._fireEvent("onUpdate",U);return D._fireEvent(S,W.slice(3))}return}if(X=="onPlaylistReplace"){f=[];var T=0;A(U,function(){f.push(new v(this,T++,I))})}if(X=="onClipAdd"){if(U.isInStream){return}U=new v(U,S,I);f.splice(S,0,U);for(F=S+1;F<f.length;F++){f[F].index++}}var V=true;if(typeof U=="number"&&U<f.length){c=U;var E=f[U];if(E){V=E._fireEvent(X,S,G)}if(!E||V!==false){V=l._fireEvent(X,S,G,E)}}A(J[X],function(){V=this.call(I,U,S);if(this.cached){J[X].splice(F,1)}if(V===false){return false}F++});return V};function b(){if($f(j)){$f(j).getParent().innerHTML="";i=$f(j).getIndex();o[i]=I}else{o.push(I);i=o.length-1}a=parseInt(j.style.height,10)||j.clientHeight;e=j.id||"fp"+s();k=g.id||e+"_api";g.id=k;m.playerId=e;if(typeof m=="string"){m={clip:{url:m}}}if(typeof m.clip=="string"){m.clip={url:m.clip}}m.clip=m.clip||{};if(j.getAttribute("href",2)&&!m.clip.url){m.clip.url=j.getAttribute("href",2)}l=new v(m.clip,-1,I);m.playlist=m.playlist||[m.clip];var D=0;A(m.playlist,function(){var F=this;if(typeof F=="object"&&F.length){F={url:""+F}}A(m.clip,function(G,N){if(N!==undefined&&F[G]===undefined&&typeof N!="function"){F[G]=N}});m.playlist[D]=F;F=new v(F,D,I);f.push(F);D++});A(m,function(F,G){if(typeof G=="function"){if(l[F]){l[F](G)}else{x(J,F,G)}delete m[F]}});A(m.plugins,function(F,G){if(G){K[F]=new z(F,G,I)}});if(!m.plugins||m.plugins.controls===undefined){K.controls=new z("controls",null,I)}K.canvas=new z("canvas",null,I);n=j.innerHTML;function E(G){var F=I.hasiPadSupport&&I.hasiPadSupport();if(/iPad|iPhone|iPod/i.test(navigator.userAgent)&&!/.flv$/i.test(f[0].url)&&!F){return true}if(!I.isLoaded()&&I._fireEvent("onBeforeClick")!==false){I.load()}return t(G)}function C(){if(n.replace(/\s/g,"")!==""){if(j.addEventListener){j.addEventListener("click",E,false)}else{if(j.attachEvent){j.attachEvent("onclick",E)}}}else{if(j.addEventListener){j.addEventListener("click",t,false)}I.load()}}setTimeout(C,0)}if(typeof j=="string"){var L=q(j);if(!L){throw"Flowplayer cannot access element: "+j}j=L;b()}else{b()}}var o=[];function r(a){this.length=a.length;this.each=function(b){A(a,b)};this.size=function(){return a.length}}window.flowplayer=window.$f=function(){var b=null;var a=arguments[0];if(!arguments.length){A(o,function(){if(this.isLoaded()){b=this;return false}});return b||o[0]}if(arguments.length==1){if(typeof a=="number"){return o[a]}else{if(a=="*"){return new r(o)}A(o,function(){if(this.id()==a.id||this.id()==a||this.getParent()==a){b=this;return false}});return b}}if(arguments.length>1){var f=arguments[1],c=(arguments.length==3)?arguments[2]:{};if(typeof f=="string"){f={src:f}}f=w({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:false},f);if(typeof a=="string"){if(a.indexOf(".")!=-1){var e=[];A(B(a),function(){e.push(new p(this,y(f),y(c)))});return new r(e)}else{var d=q(a);return new p(d!==null?d:a,f,c)}}else{if(a){return new p(a,f,c)}}}return null};w(window.$f,{fireEvent:function(){var a=[].slice.call(arguments);var b=$f(a[0]);return b?b._fireEvent(a.slice(1)):null},addPlugin:function(a,b){p.prototype[a]=b;return $f},each:A,extend:w});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(c,b){if(!arguments.length||typeof arguments[0]=="number"){var a=[];this.each(function(){var d=$f(this);if(d){a.push(d)}});return arguments.length?a[arguments[0]]:new r(a)}return this.each(function(){$f(this,y(c),b?y(b):{})})}}})();(function(){var o=typeof jQuery=="function";var s={width:"100%",height:"100%",allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(o){jQuery.tools=jQuery.tools||{};jQuery.tools.flashembed={version:"1.0.4",conf:s}}function t(){if(m.done){return false}var b=document;if(b&&b.getElementsByTagName&&b.getElementById&&b.body){clearInterval(m.timer);m.timer=null;for(var a=0;a<m.ready.length;a++){m.ready[a].call()}m.ready=null;m.done=true}}var m=o?jQuery:function(a){if(m.done){return a()}if(m.timer){m.ready.push(a)}else{m.ready=[a];m.timer=setInterval(t,13)}};function p(b,a){if(a){for(key in a){if(a.hasOwnProperty(key)){b[key]=a[key]}}}return b}function q(a){switch(r(a)){case"string":a=a.replace(new RegExp('(["\\\\])',"g"),"\\$1");a=a.replace(/^\s?(\d+)%/,"$1pct");return'"'+a+'"';case"array":return"["+l(a,function(d){return q(d)}).join(",")+"]";case"function":return'"function()"';case"object":var b=[];for(var c in a){if(a.hasOwnProperty(c)){b.push('"'+c+'":'+q(a[c]))}}return"{"+b.join(",")+"}"}return String(a).replace(/\s/g," ").replace(/\'/g,'"')}function r(b){if(b===null||b===undefined){return false}var a=typeof b;return(a=="object"&&b.push)?"array":a}if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function l(a,d){var c=[];for(var b in a){if(a.hasOwnProperty(b)){c[b]=d(a[b])}}return c}function k(f,h){var e=p({},f);var g=document.all;var c='<object width="'+e.width+'" height="'+e.height+'"';if(g&&!e.id){e.id="_"+(""+Math.random()).substring(9)}if(e.id){c+=' id="'+e.id+'"'}if(e.cachebusting){e.src+=((e.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(e.w3c||!g){c+=' data="'+e.src+'" type="application/x-shockwave-flash"'}else{c+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}c+=">";if(e.w3c||g){c+='<param name="movie" value="'+e.src+'" />'}e.width=e.height=e.id=e.w3c=e.src=null;for(var a in e){if(e[a]!==null){c+='<param name="'+a+'" value="'+e[a]+'" />'}}var d="";if(h){for(var b in h){if(h[b]!==null){d+=b+"="+(typeof h[b]=="object"?q(h[b]):h[b])+"&"}}d=d.substring(0,d.length-1);c+='<param name="flashvars" value=\''+d+"' />"}c+="</object>";return c}function n(c,f,b){var a=flashembed.getVersion();p(this,{getContainer:function(){return c},getConf:function(){return f},getVersion:function(){return a},getFlashvars:function(){return b},getApi:function(){return c.firstChild},getHTML:function(){return k(f,b)}});var g=f.version;var h=f.expressInstall;var e=!g||flashembed.isSupported(g);if(e){f.onFail=f.version=f.expressInstall=null;c.innerHTML=k(f,b)}else{if(g&&h&&flashembed.isSupported([6,65])){p(f,{src:h});b={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title};c.innerHTML=k(f,b)}else{if(c.innerHTML.replace(/\s/g,"")!==""){}else{c.innerHTML="<h2>Flash version "+g+" or greater is required</h2><h3>"+(a[0]>0?"Your version is "+a:"You have no flash plugin installed")+"</h3>"+(c.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>");if(c.tagName=="A"){c.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"}}}}}if(!e&&f.onFail){var d=f.onFail.call(this);if(typeof d=="string"){c.innerHTML=d}}if(document.all){window[f.id]=document.getElementById(f.id)}}window.flashembed=function(b,c,a){if(typeof b=="string"){var d=document.getElementById(b);if(d){b=d}else{m(function(){flashembed(b,c,a)});return}}if(!b){return}if(typeof c=="string"){c={src:c}}var e=p({},s);p(e,c);return new n(b,e,a)};p(window.flashembed,{getVersion:function(){var c=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var b=navigator.plugins["Shockwave Flash"].description;if(typeof b!="undefined"){b=b.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var d=parseInt(b.replace(/^(.*)\..*$/,"$1"),10);var h=/r/.test(b)?parseInt(b.replace(/^.*r(.*)$/,"$1"),10):0;c=[d,h]}}else{if(window.ActiveXObject){try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(g){try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");c=[6,0];f.AllowScriptAccess="always"}catch(a){if(c[0]==6){return c}}try{f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(typeof f=="object"){b=f.GetVariable("$version");if(typeof b!="undefined"){b=b.replace(/^\S+\s+(.*)$/,"$1").split(",");c=[parseInt(b[0],10),parseInt(b[2],10)]}}}}return c},isSupported:function(a){var c=flashembed.getVersion();var b=(c[0]>a[0])||(c[0]==a[0]&&c[1]>=a[1]);return b},domReady:m,asString:q,getHTML:k});if(o){jQuery.fn.flashembed=function(b,a){var c=null;this.each(function(){c=flashembed(this,b,a)});return b.api===false?this:c}}})();
var contento={};contento.adminhover={init:function(){jQuery(".homebutton").hover(function(){var a=jQuery(this).find(".adminover");a.show()},function(){var a=jQuery(this).find(".adminover");aktiv=window.setTimeout(function(){$(a).fadeOut()},3000)})}};contento.treemenu={init:function(){$(".contento-side li.active .sub-menu").show();$(".contento-side li.active").parentsUntil(".contento-side").show()}};contento.rootmenu={init:function(){jQuery(".root").hover(function(){jQuery(".level2").hide();var d=$(this).position();var a=(d.left+12)+"px";var b=(d.top+30)+"px";var c=jQuery(this).next(".level2");c.show();c.css({top:b,left:a})},function(){var a=jQuery(this).next(".level2");aktiv=window.setTimeout(function(){$(a).fadeOut()},1500)});$("div.level2").mouseover(function(){window.clearTimeout(aktiv);$(this).show()}).mouseleave(function(){jQuery(this).fadeOut()})}};contento.fusslogos={init:function(){jQuery(".logo").hover(function(){this.src=this.src.replace("BW","Color")},function(){this.src=this.src.replace("Color","BW")})}};contento.imagechange={init:function(){function a(){setTimeout(function(){$("#am"+id).removeAttr("style").fadeOut()},1000)}jQuery(".imgchange").hover(function(){var b=$(this).attr("id");var d=$(this).attr("src");var c=$(this).attr("rel");$(this).attr("src",c).stop(true,true).hide().fadeIn(300);$(this).attr("rel",d);$("#am"+b).show(100);var e={percent:100}},function(){var b=$(this).attr("id");var d=$(this).attr("src");var c=$(this).attr("rel");$(this).attr("src",c).stop(true,true).hide().fadeIn(300);$(this).attr("rel",d);$("#am"+b).hide(100)})}};contento.fontchange={init:function(){jQuery(".root, .art-blockcontent-body .Head").each(function(b){node=$(this).text();var a=10;var c="";if(node.length>25){a=8;c="0px;position:relative"}if(node.length>29){a=7;c="-5px;position:relative"}if($(this).hasClass("root")){}else{$(this).css("font-size",a+"px")}});Cufon.replace(".root, .art-blockcontent-body .Head")}};var hexDigits=new Array("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f");function rgb2hex(b){b=b.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+))?\)$/);function a(c){return("0"+parseInt(c).toString(16)).slice(-2)}return"_"+a(b[1])+a(b[2])+a(b[3])}function hex(a){return isNaN(a)?"00":hexDigits[(a-a%16)/16]+hexDigits[a%16]}contento.players={init:function(){jQuery('a[href$="flv"], a[href$="f4v"]').each(function(a){var c=this;var b=$(c).attr("href");$(c).attr("href","#flowplayer");$(c).attr("title",b);jQuery(c).fancybox({scrolling:"no",titleShow:false,autoDimensions:true,onStart:function(){setflowplayer(b);jQuery("#flowplayer").show().height(360)},onClosed:function(){jQuery("#flowplayer").hide()}})});jQuery('a[name$="flv"]').each(function(a){var b=$(this).attr("name");$(this).attr("title",b);jQuery(this).fancybox({scrolling:"no",titleShow:false,autoDimensions:true,onStart:function(){setflowplayer(b);jQuery("#flowplayer").show().height(360)},onClosed:function(){jQuery("#flowplayer").hide()}})});jQuery('a[name$="mp3"]').each(function(a){var b=$(this).attr("name");$(this).attr("title",b);jQuery(this).fancybox({scrolling:"no",titleShow:false,autoDimensions:true,onStart:function(){setflowplayer(b);jQuery("#flowplayer").show().height(30)},onClosed:function(){jQuery("#flowplayer").hide()}})});jQuery(".youtube").click(function(){$.fancybox({padding:0,autoScale:false,transitionIn:"none",transitionOut:"none",title:this.title,width:680,height:495,href:this.href.replace(new RegExp("watch\\?v=","i"),"v/"),type:"swf",swf:{wmode:"transparent",allowfullscreen:"true"}});return false})}};contento.TopBanner={init:function(){jQuery(".slideright").click(function(){jQuery(".TopBannerDetail").hide();var b=this.id;var d=b.replace("t","d");var a=b.replace("t","i");var c=$("#"+a).html();$(".art-header-jpeg").css({"background-image":'url("'+c+'")'},$(".art-header-jpeg").fadeIn(2000));jQuery("#"+d).fadeIn(500)})}};jQuery(document).ready(function(){contento.players.init();$(".tabs").tabs();jQuery("#menu_languages").change(function(){var a="";jQuery("#menu_languages option:selected").each(function(){a+=jQuery(this).val()});window.location=a});jQuery("#menu_culturelink option").each(function(){if(Sys.CultureInfo.CurrentCulture.name==jQuery(this).attr("id")){jQuery(this).attr("selected","selected")}});jQuery(".SubHead:contains('label')").text(" ");jQuery(".GreenTable tr:last td:first").addClass("bottomleft");jQuery(".GreenTable td:last").addClass("bottomright");$(".fancyframe").fancybox({width:"80%",height:"80%",autoScale:true,autoDimensions:true,transitionIn:"none",transitionOut:"none",type:"iframe"});jQuery(".lightbox").lightBox({fixedNavigation:true});jQuery(".fancybox").fancybox({scrolling:"no",titleShow:false,autoDimensions:true,hideOnContentClick:false});jQuery(".cycle").cycle({fx:"fade",timeout:6000,speed:2500,next:"#next2",prev:"#prev2"});$("#dnn_txtsearch").keypress(function(){});jQuery("#dnn_txtsearch").keyup(function(a){if(a.keyCode=="13"){window.location="/tabid/41/default.aspx?search="+jQuery("#dnn_txtsearch").val();return false}})});function dolangChange(b){var c="";var a=jQuery("#activetab").text();var d="/DesktopModules/ContentoCultureLink/ChangeCulture.aspx?PortalId=0&OriginTabId="+a+"&TabId="+a+"&TargetCulture=";d+=b;window.location=d}function pm(a){jQuery(".plistimg").attr("src","/Portals/_default/Containers/greenDemo/images/minus.png");if(jQuery("."+a).is(":visible")){jQuery("#i"+a).attr("src","/Portals/_default/Containers/greenDemo/images/plus.png")}}function setover(a){var b=a.src.replace("gray","white");a.src=b}function setout(a){var b=a.src.replace("white","gray");a.src=b}function setmp3player(a){flowplayer("flowplayer","http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf",{clip:{url:a,coverImage:{url:"http://releases.flowplayer.org/data/national.jpg",scaling:"orig"}}})}function openfancyFLV(a){jQuery.fancybox({width:640,height:360,autoScale:true,onStart:function(){this.height=360;this.width=640;flowplayer("fancybox-inner","/contento/portals/_default/flowplayer/flowplayer-3.2.7.swf",{clip:{url:a,autoPlay:true,autoBuffering:true}})}})}function cyclenext(){try{jQuery("#cycleStart").cycle("next")}catch(a){}}function setflowplayer(a){flowplayer("flowplayer","/contento/portals/_default/flowplayer/flowplayer-3.2.7.swf",{clip:{url:a,autoPlay:true,autoBuffering:true},plugins:{controls:{borderRadius:"0px",timeColor:"#ffffff",bufferGradient:"none",slowForward:true,backgroundColor:"rgba(0,0,0,0)",volumeSliderGradient:"none",slowBackward:false,timeBorderRadius:20,time:true,progressGradient:"none",height:26,volumeColor:"rgba(155,205,3,1)",tooltips:{marginBottom:5,scrubber:true,volume:true,buttons:false},fastBackward:false,opacity:1,timeFontSize:12,bufferColor:"#a3a3a3",border:"0px",volumeSliderColor:"#ffffff",buttonColor:"#ffffff",mute:true,autoHide:{enabled:true,hideDelay:500,mouseOutDelay:500,hideStyle:"fade",hideDuration:400,fullscreenOnly:true},backgroundGradient:"none",width:"100pct",display:"block",sliderBorder:"1pxsolidrgba(128,128,128,0.7)",buttonOverColor:"#ffffff",fullscreen:true,timeBgColor:"rgb(0,0,0,0)",scrubberBarHeightRatio:0.2,bottom:0,stop:false,sliderColor:"#000000",zIndex:1,scrubberHeightRatio:0.6,tooltipTextColor:"#ffffff",sliderGradient:"none",timeBgHeightRatio:0.8,volumeSliderHeightRatio:0.6,name:"controls",timeSeparator:"",volumeBarHeightRatio:0.2,left:"50pct",tooltipColor:"rgba(0,0,0,0)",playlist:false,durationColor:"rgba(155,205,3,1)",play:true,fastForward:true,timeBorder:"0pxsolidrgba(0,0,0,0.3)",progressColor:"rgba(155,205,3,1)",scrubber:true,volume:true,builtIn:false,volumeBorder:"1pxsolidrgba(128,128,128,0.7)"}},onLoad:function(){}})}if(window.addEvent){window.addEvent("domready",function(){})}var artEventHelper={bind:function(c,a,b){if(c.addEventListener){c.addEventListener(a,b,false)}else{if(c.attachEvent){c.attachEvent("on"+a,b)}else{c["on"+a]=b}}}};var artUserAgent=navigator.userAgent.toLowerCase();var artBrowser={version:(artUserAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(artUserAgent)&&!/chrome/.test(artUserAgent),chrome:/chrome/.test(artUserAgent),opera:/opera/.test(artUserAgent),msie:/msie/.test(artUserAgent)&&!/opera/.test(artUserAgent),mozilla:/mozilla/.test(artUserAgent)&&!/(compatible|webkit)/.test(artUserAgent)};artCssHelper=function(){var b=function(e){return(artUserAgent.indexOf(e)!=-1)};var a=document.getElementsByTagName("html")[0];var d=[(!(/opera|webtv/i.test(artUserAgent))&&/msie (\d)/.test(artUserAgent))?("ie ie"+RegExp.$1):b("firefox/2")?"gecko firefox2":b("firefox/3")?"gecko firefox3":b("gecko/")?"gecko":b("chrome/")?"chrome":b("opera/9")?"opera opera9":/opera (\d)/.test(artUserAgent)?"opera opera"+RegExp.$1:b("konqueror")?"konqueror":b("applewebkit/")?"webkit safari":b("mozilla/")?"gecko":"",(b("x11")||b("linux"))?" linux":b("mac")?" mac":b("win")?" win":""].join(" ");if(!a.className){a.className=d}else{var c=a.className;c+=(" "+d);a.className=c}}();(function(){var a=document.uniqueID&&document.compatMode&&!window.XMLHttpRequest&&document.execCommand;try{if(!!a){a("BackgroundImageCache",false,true)}}catch(b){}})();var artLoadEvent=(function(){var b=[];var a=false;var d=function(){if(a){return}a=true;for(var e=0;e<b.length;e++){b[e]()}};if(document.addEventListener&&!artBrowser.opera){document.addEventListener("DOMContentLoaded",d,false)}if(artBrowser.msie&&window==top){(function(){try{document.documentElement.doScroll("left")}catch(f){setTimeout(arguments.callee,10);return}d()})()}if(artBrowser.opera){document.addEventListener("DOMContentLoaded",function(){for(var e=0;e<document.styleSheets.length;e++){if(document.styleSheets[e].disabled){setTimeout(arguments.callee,10);return}}d()},false)}if(artBrowser.safari||artBrowser.chrome){var c;(function(){if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,10);return}if("undefined"==typeof c){c=document.getElementsByTagName("style").length;var f=document.getElementsByTagName("link");for(var e=0;e<f.length;e++){c+=(f[e].getAttribute("rel")=="stylesheet")?1:0}if(document.styleSheets.length!=c){setTimeout(arguments.callee,0);return}}d()})()}if(!(artBrowser.msie&&window!=top)){artEventHelper.bind(window,"load",d)}return({add:function(e){b.push(e)}})})();function artGetElementsByClassName(a,e,h){var b=null;var c=[];var g=String.fromCharCode(92);var f=new RegExp("(?:^|"+g+"s+)"+a+"(?:$|"+g+"s+)");if(!e){e=document}if(!h){h="*"}b=e.getElementsByTagName(h);if(b){for(var d=0;d<b.length;++d){if(b[d].className.search(f)!=-1){c[c.length]=b[d]}}}return c}var _artStyleUrlCached=null;function artGetStyleUrl(){if(null==_artStyleUrlCached){var d;_artStyleUrlCached="";d=document.getElementsByTagName("link");for(var a=0;a<d.length;a++){var b=d[a];if(b.href&&/style\.ie6\.css(\?.*)?$/.test(b.href)){return _artStyleUrlCached=b.href.replace(/style\.ie6\.css(\?.*)?$/,"")}}d=document.getElementsByTagName("style");for(var a=0;a<d.length;a++){var c=new RegExp('import\\s+"([^"]+\\/)style\\.ie6\\.css"').exec(d[a].innerHTML);if(null!=c&&c.length>0){return _artStyleUrlCached=c[1]}}}return _artStyleUrlCached}function artFixPNG(a){if(artBrowser.msie&&artBrowser.version<7){var b;if(a.tagName=="IMG"){if(/\.png$/.test(a.src)){b=a.src;a.src=artGetStyleUrl()+"images/spacer.gif"}}else{b=a.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);if(b){b=b[1];a.runtimeStyle.backgroundImage="none"}}if(b){a.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b+"')"}}}function artHasClass(b,a){return(b&&b.className&&(" "+b.className+" ").indexOf(" "+a+" ")!=-1)}function artGTranslateFix(){var u=artGetElementsByClassName("art-menu",document,"ul");for(var h=0;h<u.length;h++){var s=u[h];var c=s.childNodes;var r=[];for(var n=0;n<c.length;n++){var f=c[n];if(String(f.tagName).toLowerCase()=="li"){r.push(f)}}for(var n=0;n<r.length;n++){var m=r[n];var b=null;var g=null;for(var v=0;v<m.childNodes.length;v++){var q=m.childNodes[v];if(!(q&&q.tagName)){continue}if(String(q.tagName).toLowerCase()=="a"){b=q}if(String(q.tagName).toLowerCase()=="span"){g=q}}if(g&&b){var w=null;for(var o=0;o<g.childNodes.length;o++){var d=g.childNodes[o];if(!(d&&d.tagName)){continue}if(String(d.tagName).toLowerCase()=="a"&&d.firstChild){d=d.firstChild}if(d&&d.className&&d.className=="t"){w=d;if(w.firstChild&&w.firstChild.tagName&&String(w.firstChild.tagName).toLowerCase()=="a"){while(w.firstChild.firstChild){w.appendChild(w.firstChild.firstChild)}w.removeChild(w.firstChild)}b.appendChild(w);break}}g.parentNode.removeChild(g)}}}}artLoadEvent.add(artGTranslateFix);function artAddMenuSeparators(){var k=artGetElementsByClassName("art-menu",document,"ul");for(var c=0;c<k.length;c++){var h=k[c];var a=h.childNodes;var g=[];for(var e=0;e<a.length;e++){var b=a[e];if(String(b.tagName).toLowerCase()=="li"){g.push(b)}}for(var e=0;e<g.length-1;e++){var d=g[e];var l=document.createElement("span");l.className="art-menu-separator";var f=document.createElement("li");f.appendChild(l);d.parentNode.insertBefore(f,d.nextSibling)}}}artLoadEvent.add(artAddMenuSeparators);function artMenuIE6Setup(){var f=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("msie 7")==-1;if(!f){return}var c,e,g,h,d,a;var b=artGetElementsByClassName("art-menu",document,"ul");for(e=0;e<b.length;e++){c=b[e].getElementsByTagName("li");for(g=0;g<c.length;g++){h=c[g];d=h.getElementsByTagName("ul");if(d&&d.length){h.UL=d[0];a=h.getElementsByTagName("a");if(a&&a.length){h.A=a[0]}h.onmouseenter=function(){this.className+=" art-menuhover";this.UL.className+=" art-menuhoverUL";if(this.A){this.A.className+=" art-menuhoverA"}};h.onmouseleave=function(){this.className=this.className.replace(/art-menuhover/,"");this.UL.className=this.UL.className.replace(/art-menuhoverUL/,"");if(this.A){this.A.className=this.A.className.replace(/art-menuhoverA/,"")}}}}}}artLoadEvent.add(artMenuIE6Setup);function artLayoutIESetup(){var e=navigator.userAgent.toLowerCase().indexOf("msie")!=-1;if(!e){return}var t=artGetElementsByClassName("art-content-layout",document,"div");if(!t||!t.length){return}for(var d=0;d<t.length;d++){var g=t[d];var k=g.childNodes;var u=null;for(var n=0;n<k.length;n++){var h=k[n];if((String(h.tagName).toLowerCase()=="div")&&artHasClass(h,"art-content-layout-row")){u=h;break}}if(!u){continue}var a=[];var w=u.childNodes;for(var m=0;m<w.length;m++){var v=w[m];if((String(v.tagName).toLowerCase()=="div")&&artHasClass(v,"art-layout-cell")){a.push(v)}}if(!a||!a.length){continue}var z=document.createElement("table");z.className=g.className;var x=z.insertRow(-1);z.className=g.className;for(var f=0;f<a.length;f++){var b=x.insertCell(-1);var y=a[f];b.className=y.className;while(y.firstChild){b.appendChild(y.firstChild)}}g.parentNode.insertBefore(z,g);g.parentNode.removeChild(g)}}function artAddVMenuSeparators(){var b=function(q,j){var i="art-v"+(q?"sub":"")+"menu-separator";var k=document.createElement("li");k.className=(j?(i+" "+i+" art-vmenu-separator-first"):i);var p=document.createElement("span");p.className=i+"-span";k.appendChild(p);return k};var l=artGetElementsByClassName("art-vmenublock",document,"div");for(var g=0;g<l.length;g++){var n=l[g].getElementsByTagName("ul");for(var d=0;d<n.length;d++){var m=n[d];var a=m.childNodes;var h=[];for(var o=0;o<a.length;o++){var c=a[o];if(String(c.tagName).toLowerCase()=="li"){h.push(c)}}for(var f=0;f<h.length;f++){var e=h[f];if((e.parentNode.getElementsByTagName("li")[0]==e)&&(e.parentNode!=n[0])){e.parentNode.insertBefore(b(e.parentNode.parentNode.parentNode!=n[0],true),e)}if(f<h.length-1){e.parentNode.insertBefore(b(e.parentNode!=n[0],false),e.nextSibling)}}}}}artLoadEvent.add(artAddVMenuSeparators);function artSetVMenusActLinks(){var b=artGetElementsByClassName("art-vmenu",document,"ul");for(var a=0;a<b.length;a++){artSetVMenuActLink(b[a])}}artLoadEvent.add(artSetVMenusActLinks);function artSetVMenuActLink(e){if(!e){return}e=(typeof e=="object"?e:document.getElementById(e));var a=e.getElementsByTagName("a");var b=null;for(var d=0;d<a.length;d++){if(artIsIncluded(a[d].href,window.location.href)){b=a[d];break}}if(b==null){return}var c=b;while(c.className.indexOf("art-vmenu")==-1){if(c.tagName.toLowerCase()=="li"||c.tagName.toLowerCase()=="ul"||c.tagName.toLowerCase()=="a"){c.className=c.className.length>0?c.className+" active":"active"}if(c.tagName.toLowerCase()=="a"){var g=c;do{g=g.nextSibling}while(g&&g.nodeType!=1);if(g&&g.tagName.toLowerCase()=="ul"){g.className=g.className.length>0?g.className+" active":"active"}}if(c.tagName.toLowerCase()=="ul"&&c.className.indexOf("art-vmenu")==-1){var f=c;do{f=f.previousSibling}while(f&&f.nodeType!=1);if(f&&f.tagName.toLowerCase()=="a"){f.className=f.className.length>0?f.className+" active":"active"}}c=c.parentNode}}function artIsIncluded(a,b){if(a==null||b==null){return a==b}if(a.indexOf("?")==-1||a.split("?")[1]==""){return a.split("?")[0]==b.split("?")[0]}if(b.indexOf("?")==-1||b.split("?")[1]==""){return a.replace("?","")==b.replace("?","")}if(a.split("?")[0]!=b.split("?")[0]){return false}var g=a.split("?")[1];g=g.split("&");var c,e,f,d;e=new Array();for(c in g){if(typeof(g[c])=="function"){continue}d=g[c].split("=");if(d[0]!="FormFilter"){e[d[0]]=d[1]}}g=b.split("?")[1];g=g.split("&");f=new Array();for(c in g){if(typeof(g[c])=="function"){continue}d=g[c].split("=");if(d[0]!="FormFilter"){f[d[0]]=d[1]}}for(c in e){if(e[c]!=f[c]){return false}}return true}function artButtonsSetupJsHover(c){var h=["input","a","button"];for(var e=0;e<h.length;e++){var b=artGetElementsByClassName(c,document,h[e]);for(var d=0;d<b.length;d++){var a=b[d];if(!a.tagName||!a.parentNode){return}if(!artHasClass(a.parentNode,"art-button-wrapper")){if(!artHasClass(a,"art-button")){a.className+=" art-button"}var k=document.createElement("span");k.className="art-button-wrapper";if(artHasClass(a,"active")){k.className+=" active"}var f=document.createElement("span");f.className="l";f.innerHTML=" ";k.appendChild(f);var g=document.createElement("span");g.className="r";g.innerHTML=" ";k.appendChild(g);a.parentNode.insertBefore(k,a);k.appendChild(a)}artEventHelper.bind(a,"mouseover",function(i){i=i||window.event;k=(i.target||i.srcElement).parentNode;k.className+=" hover"});artEventHelper.bind(a,"mouseout",function(i){i=i||window.event;a=i.target||i.srcElement;k=a.parentNode;k.className=k.className.replace(/hover/,"");if(!artHasClass(a,"active")){k.className=k.className.replace(/active/,"")}});artEventHelper.bind(a,"mousedown",function(i){i=i||window.event;a=i.target||i.srcElement;k=a.parentNode;if(!artHasClass(a,"active")){k.className+=" active"}});artEventHelper.bind(a,"mouseup",function(i){i=i||window.event;a=i.target||i.srcElement;k=a.parentNode;if(!artHasClass(a,"active")){k.className=k.className.replace(/active/,"")}})}}}artLoadEvent.add(function(){artButtonsSetupJsHover("art-button")});artLoadEvent.add(artFixEventsModule);function artFixEventsModule(){var a=artGetElementsByClassName("DNN_EventsContent",document,"div");for(var b=0;b<a.length;b++){var c=a[b].getElementsByTagName("input");for(var d=0;d<c.length;d++){if(c[d].type=="text"&&c[d].style.width=="95%"){c[d].style.width="auto"}}}return true}artLoadEvent.add(CollapseSidebars);function CollapseSidebars(){var a=artGetElementsByClassName("DNNEmptyPane",document,"div");for(var b=0;b<a.length;b++){if(a[b].parentNode.className.indexOf("art-XXXsidebar")!=-1){a[b].parentNode.style.width=0}}};

