
(function($) {

	window.onresize = resize;

	function resize() {
		
		// FOOTER always at the bottom of the page, even when the content is not high enough.
		var h = ($( window ).height() - 100 - 115 );
		if( $("body.toolbar").length > 0 )
			h -= 65;
		h -= 38;	// ???? GEEN IDEE WAAROM;
		$( "#main-wrapper" ).css( {
			"min-height": h + "px"
		} );
	}

	$(document).ready( function(){
		
		// Rewrite email addresses
		$("#block-views-team-user-overview .views-field-entity-id-2 .field-content").each(function() {
			var self = $(this);
			self.html(self.html().replace(/ \[at\] /, "@").replace(/ \[dot\] /g, "."));
		});
		
		$("#qr_textlink").click(function() {
			$("#qr-code").show();
		});
		$("#qr_textlink2").click(function() {
			$("#qr-code2").show();
		});
		
		// frontpage promoted -//
		var delay = 300;
		var container = $("#block-views-front-page-promo-block .view-front-page-promo");
		if( container.length > 0 ){
			container.slideshow( { 
				child_selector: ".views-row",
				autoToNextTime: 23500,
				controls_js: "slideshow_controls_bullets"
			} );
			container.setAutoToNext();
		}
		
	} );
	
	$(window).load(function() { resize(); } );

})(jQuery);;
/*
Author:     Barry Tielkes
Company:    uncinc
Contact:    barry@uncinc.nl
Created:    01 - dec - 2010
*/


/////////////////////////////
/// debug -//////////////////
/////////////////////////////
var TT = " <> ";
function debug( fName, error ){
	(function($) {
		if ( $.browser.msie )
			return;
		if ( global_debug ){
			if ( window.console && window.console.log ) {
				console.log( fName );// +TT+ error );
				/* if ( error != undefined )
					console.log( error ) */
			} else {
				//alert("debug for " +fName+ "\n"+error)
			}
		}
	})(jQuery);
}

function trace_html() {
	(function($) {
		var t = $("body").html().split("><").join(">\n<");
		debug( t );
	})(jQuery);
}
/////////////////////////////
///- debug //////////////////
/////////////////////////////

/////////////////////////////
/// touch screen check -/////
/////////////////////////////
var hasTouchScreenChecked = false;
var _hasTouchScreen = false;
var hasTouchScreen = function() {
	(function($) {
		if( hasTouchScreenChecked )
			return _hasTouchScreen;
		hasTouchScreenChecked = true;
		var dummy = document.createElement("div");
		dummy.setAttribute("ontouchmove", "return;");
		_hasTouchScreen = typeof dummy.ontouchmove == "function" ? true : false;
		return _hasTouchScreen;
	})(jQuery);
}
/////////////////////////////
///- touch screen check /////
/////////////////////////////



// .offset zou dit ook moeten kunnen zegt Martijn. check binnenkort.
/* function getOffsetToRoot( element ) {
	var offsetX = 0;
	var offsetY = 0;
	while( element.parentNode != undefined ){
		if( element.parentNode.offsetLeft == undefined )	// if true is root element (HTMLDocument).
			break;
		element = element.parentNode;
		offsetX += element.offsetLeft;
		offsetY += element.offsetTop;
	}
	return { x: offsetX, y: offsetY };
} */






/////////////////////////////
/// browser specific -///////
/////////////////////////////

function isSafari(){
	if( jQuery.browser.safari )
		return true;
	return false;
}

function isIpadOrIphone(){
	if( navigator.userAgent.match(/iPad/i) != null )
		return true;
	if( navigator.userAgent.match(/iPhone/i) != null )
		return true;
	if( navigator.userAgent.match(/iPod/i) != null )
		return true;
	
	return false;
}

function display_browser_info() {
	//debug("display_browser>>>");
// 	debug("display_browser>>> is ipad: "+ ( navigator.userAgent.match(/iPad/i) != null ) );
	var content = "";
	
	content += "safari: "+ jQuery.browser.safari +"<br>";
	content += "mozilla: "+ jQuery.browser.mozilla +"<br>";
	content += "msie: "+ jQuery.browser.msie +"<br>";
	content += "<br>";
	content += "is Ipad: "+ ( navigator.userAgent.match(/iPad/i) != null ) +"<br>";
	content += "is Iphone: "+ ( navigator.userAgent.match(/iPhone/i) != null ) +"<br>";
	content += "is Ipod: "+ ( navigator.userAgent.match(/iPod/i) != null ) +"<br>";
// 	content += "document.ontouchmove: "+ ( document.ontouchmove ) +"<br>";
// 	content += "Touch: "+ ( typeof Touch ) +"<br>";
	content += "hasTouchScreen: "+ hasTouchScreen() +"<br>";
	content += "<br>";
	content += "version: "+ jQuery.browser.version +"<br>";
	content += "navigator.userAgent: "+ navigator.userAgent +"<br>";
	
	var browser_version_display_container = $("<div class='browser_version'>"+ content +"</div>");
	$('body').append(browser_version_display_container);


}
var body_element;
function get_body_element() {
	(function($) {
		if( body_element == undefined ){
			if( $.browser.safari ){
				body_element = $( "body" );
			} else{
				body_element = $( "html,body" );
			}
		}
	})(jQuery);
	return body_element;
}
/////////////////////////////
///- browser specific ///////
/////////////////////////////

/////////////////////////////
/// img pos && scale -///////
/////////////////////////////

/* function fit_in_parent_cutoff( target_to_fit, target_parent ) {
	setsize_for_cutoff( target_to_fit, target_parent );
	center_pos_in_parent( target_to_fit, target_parent );
}

function setsize_for_cutoff( target_to_scale, target_parent ) {
	var w = target_parent.width();
	var h = target_parent.height();
	
	var imgW = target_to_scale.width();
	var imgH = target_to_scale.height();
	
	target_to_scale.css( {
		position: "absolute",
		left: 0,
		top: 0
	} );
	
	var ratio = w / h;
	var setWidth = false;
	if( imgW / imgH < ratio )
		setWidth = true;
	if( setWidth ){
		target_to_scale.css({
			width: w,
			height: "auto",
			bottom: 0
		});
	}else{
		target_to_scale.css({
			width: "auto",
			height: h,
			right: 0
		});
	}
} */

/* var cssPropertyPresetArray = [ "", "-moz-", "-webkit-", "-o-" ];
function hasCSSProperty( target_to_check, property ) {
	for( var i = 0; i < cssPropertyPresetArray.length; i++ ){
		if( target_to_check.css( cssPropertyPresetArray[i] + property ) )
			return true;
		else if( property == "border-radius" ){
			if( target_to_check.css( cssPropertyPresetArray[i] + property +"-topleft" ) )
				return true;
		}
	}
	return false;
} */

/* function getCSSPropertyValue( target_to_check, property, defaultValue ) {
	for( var i = 0; i < cssPropertyPresetArray.length; i++ ){
		if( target_to_check[0].style[ cssCapitilize( cssPropertyPresetArray[ i ] + property ) ] )
			return target_to_check[0].style[ cssCapitilize( cssPropertyPresetArray[ i ] + property ) ];
// 			return target_to_check.css( cssCapitilize( cssPropertyPresetArray[i] + property ) );
		else if( property == "border-radius" ){
			if( target_to_check[0].style[ cssCapitilize( cssPropertyPresetArray[ i ] + property +"-topleft" ) ] )
				return target_to_check[0].style[ cssCapitilize( cssPropertyPresetArray[ i ] + property +"-topleft" ) ];
// 				return target_to_check.css( cssCapitilize( cssPropertyPresetArray[i] + property +"-topleft" ) );
		}
	}
	return defaultValue;
} */

/* function setCSSPropertyValue( target_to_set, property, value ) {
	for( var i = 0; i < cssPropertyPresetArray.length; i++ ){
		target_to_set[0].style[ cssCapitilize( cssPropertyPresetArray[ i ] + property ) ] = value;
	}
} */

/* 
function center_pos_in_parent( target_to_pos, target_parent ) {
	var w = target_parent.width();
	var h = target_parent.height();
	
	var imgW = target_to_pos.width();
	var imgH = target_to_pos.height();
	
// 	debug( "center_pos_in_parent:  "+ w +TT+ h +TT+ imgW +TT+ imgH );
	
// 	target_to_pos.css( {
// 		position: "absolute",
// 		left: (w-imgW)/2,
// 		top: (h-imgH)/2
// 	} );
	
	target_to_pos.css( {
		"margin-left": (w-imgW)/2,
		"margin-top": (h-imgH)/2
	} );
	
} */

/////////////////////////////
///- img pos && scale ///////
/////////////////////////////



/////////////////////////////
/// string utill -///////////
/////////////////////////////
function capitilize( s ) {
	var firstLetter = s.substring( 0, 1 );
	return firstLetter.toUpperCase() + s.substring( 1, s.length );
}

// removes "-" and sets the first char after them to uppercase;
function cssCapitilize( s ) {
	var a = s.split( "-" );
	for( var i = 1; i < a.length; i++ ){
		a[ i ] = capitilize( a[ i ] );
	}
	return a.join("");
}

String.prototype.substringFrom = function(parameter){return this.substring(Number(this.indexOf(parameter)+parameter.length),this.length);}
String.prototype.substringTill = function(parameter){return this.substring(0,this.indexOf(parameter));}
String.prototype.substringEndFrom = function(parameter){return this.substring(Number(this.lastIndexOf(parameter)+parameter.length),this.length);}
String.prototype.substringEndTill = function(parameter){return this.substring(0,this.lastIndexOf(parameter));}

/////////////////////////////
///- string utill ///////////
/////////////////////////////



/////////////////////////////
/// load utill -/////////////
/////////////////////////////
function loadImg( url, cb ) {
	var img = new Image();
	img.onload = function() {
// 		console.log("loaded " + url);
		cb.call();
	};
	img.src = url;
}
/////////////////////////////
///- load utill /////////////
/////////////////////////////



/////////////////////////////
/// array utill -////////////
/////////////////////////////
function arrayContains ( array, value ) {
	for( var i = 0; i < array.length; i++ ) {
		if( array[ i ] == value ) return i;
	}
	return -1;
}


/* Array.prototype.getInd = function( value, areDisplayObjects ) {
	if( areDisplayObjects == true ){
		for ( i=0; i < this.length; i++ ) {
			if (this[i].equals( value ) ) return i;
		}
	}else{
		for ( i=0; i < this.length; i++ ) {
	 		if (this[i] == value) return i;
		}
	}
	return -1;
}; */

/////////////////////////////
///- array utill ////////////
/////////////////////////////

;
/*
Author:     Barry Tielkes
Company:    uncinc
Contact:    barry@uncinc.nl
Created:    13 - dec - 2010
*/


(function ($) {
	
	var cssPropertyPresetArray = [ "", "-moz-", "-webkit-", "-o-" ];
	$.fn.setCSSPropertyValue = function ( property, value ) {
		for( var i = 0; i < cssPropertyPresetArray.length; i++ ){
			$(this)[0].style[ cssCapitilize( cssPropertyPresetArray[ i ] + property ) ] = value;
		}
		return this;
	}
	
	$.fn.getCSSPropertyValue = function ( property, defaultValue ) {
		for( var i = 0; i < cssPropertyPresetArray.length; i++ ){
			if( $(this)[0].style[ cssCapitilize( cssPropertyPresetArray[ i ] + property ) ] )
				return $(this)[0].style[ cssCapitilize( cssPropertyPresetArray[ i ] + property ) ];
			else if( property == "border-radius" ){
				if( $(this)[0].style[ cssCapitilize( cssPropertyPresetArray[ i ] + property +"-topleft" ) ] )
					return $(this)[0].style[ cssCapitilize( cssPropertyPresetArray[ i ] + property +"-topleft" ) ];
			}
		}
		return defaultValue;
	}
	
	$.fn.hasCSSProperty = function ( property ) {
		for( var i = 0; i < cssPropertyPresetArray.length; i++ ){
			if( $(this).css( cssPropertyPresetArray[i] + property ) )
				return true;
			else if( property == "border-radius" ){
				if( $(this).css( cssPropertyPresetArray[i] + property +"-topleft" ) )
					return true;
			}
		}
		return false;
	}
	
	$.fn.getOffsetToRoot = function () {
		var element = this[0];
		var offsetX = 0;
		var offsetY = 0;
		
		while( element.parentNode != undefined ){
			if( element.parentNode.offsetLeft == undefined )	// if true is root element (HTMLDocument).
				break;
			element = element.parentNode;
			offsetX += element.offsetLeft;
			offsetY += element.offsetTop;
		}
		return { x: offsetX, y: offsetY };
	}
	
	// all img's in the target will be converted to a div with the image as a background-image.
	$.fn.imgs_to_background = function( options ) {
		var defaults = {};
		var options = $.extend( {}, defaults, options );
		var images_container = $(this);
// 		var img_counter = 0
		this.find( "img" ).each(function () {
// 			img_counter++;
// 			var tNumOfSlides = img_counter;
			
			var tSlide = $(this);
			tSlide = tSlide.img_to_div();
			tSlide.addClass( "slide" );
			
			/* if( tNumOfSlides == 1 ){
				loadImg( $(this).attr( "src" ), function () {
					if( tNumOfSlides == 1 )
						main_slideshow.gotoNum( 0 );
					
				});
			} */
			images_container.append( tSlide );
			
		});
	}
	
	$.fn.img_to_div = function() {
		var self = $(this);
		var url = self.attr( "src" );
		
		var classes = self.attr("class");
		if( classes != "" )
			classes = " class=\""+ classes +"\"";
		var ids = self.attr("id");
		if( ids != "" )
			ids = " id=\""+ ids +"\"";
		var div = $("<div"+ classes + ids +"/>");
		div.css( "background-image", "url("+ url +")" );
		
		self.parent().append(div);
		self.remove();
		
		return div;
	}
	
	$.fn.equals = function( compareTo ) {
		if ( !compareTo || !compareTo.length || this.length != compareTo.length ){
			return false;
		}
		for (var i=0; i<this .length; i++) {
			if (this[i]!==compareTo[i]) {
				return false;
			}
		}
		return true;
	} 
	
	
	/////////////////////////////
	/// positioning images -/////
	/////////////////////////////
	
	
	$.fn.center_pos_in_parent = function ( target_to_pos, target_parent ) {
		
		var target_to_pos = $(this);
		var target_parent = target_to_pos.parent();
		
		var w = target_parent.width();
		var h = target_parent.height();
		
		var imgW = target_to_pos.width();
		var imgH = target_to_pos.height();
// 		debug( "center_pos_in_parent:  "+ (w-imgW) +TT+ (h-imgH) +TT+ w +TT+ imgW +TT+ h +TT+ imgH );
		target_to_pos.css( {
			"margin-left": (w-imgW)/2,
			"margin-top": (h-imgH)/2
		} );
		
	}
	
	
	$.fn.fit_in_parent = function( use_cutoff ) {
// 		debug("fit_in_parent");
		if( use_cutoff == undefined )
			use_cutoff = true;
		var target_parent = $(this).parent();
		function setsize( target_to_scale ) {
			var w = target_parent.width();
			var h = target_parent.height();
			
			var imgW = target_to_scale.width();
			var imgH = target_to_scale.height();
			
			var ratio = w / h;
			var setWidth = true;
			if( imgW / imgH < ratio )
				setWidth = false;
			
			if( use_cutoff )
				setWidth = !setWidth;
			
			if( setWidth ){
				target_to_scale.css({
					width: w,
					height: "auto"
				});
			}else{
				target_to_scale.css({
					width: "auto",
					height: h
				});
			}
		}
		
		setsize( $(this) );
		$(this).center_pos_in_parent();
		
	}
	
	/////////////////////////////
	///- positioning images /////
	/////////////////////////////
	
	/////////////////////////////
	/// ani utill -//////////////
	/////////////////////////////
	
	// deze function is een bugfix, omdat het kan voor komen dat er door een andere .animate (op een ander object). Deze kan laten stoppen.
	$.fn.set_ani = function( properties, options ) {
		var completeCB = options.complete;
		
		options.complete = function () {
			clearInterval( double_check_interval );
			completeCB();
		}
		
		var self = $(this);
		var target_properties = properties;
		var curr_saved_properties = {};
		
		function setCurrProps() {
			for( i in properties ) {
				curr_saved_properties[ i ] = self.getCSSPropertyValue( i );
			}
		}
		setCurrProps();
		
		function isAningChk() {
			for( i in properties ) {
				if( curr_saved_properties[ i ] == self.getCSSPropertyValue( i ) ){
// 					debug("<<< isAningChk: "+ i +TT+ self.getCSSPropertyValue( i ) ) ;
					return false;
				}
			}
			return true;
		}
		var double_check_interval = setInterval( function () {
			if( ! isAningChk() )
				startAnimate();
			setCurrProps();
		}, 800 );
		
		function startAnimate() {
// 			debug("startAnimate()");
			self.stop( true, true ).animate( properties, options );
		}
		startAnimate();
	}
	
	
	/////////////////////////////
	///- ani utill //////////////
	/////////////////////////////

})(jQuery);;

/*
Author: 	Barry Tielkes
Company:	uncinc
Contact:	barry@uncinc.nl
Created:	02 - dec - 2010
*/


(function($){
	
	$.fn.extend({
		slideshow: function( options ) {
			var defaults = {
				animation_js: "slideshow_ani_fade_zoom", 
				animation_options: undefined, 
				controls_js: undefined,
				controls_options: undefined,
				autoToNextUserInteractionTime: 6000,
				autoToNextTime: 4000,
				drupal_image_cache: "",
				child_selector: "img"
			};
			  
			var options = $.extend({}, defaults, options);
			var main_slideshow = this;
			
			this.current_slide_num = -1;
			this.current_slide;
			var slides = [];
			this.numOfSlides = 0;
			
			if( this[ options.animation_js ] == undefined ){
				debug("slideshow.js > animation js NOT FOUND:  "+ options.animation_js );
				return;
			}
			this[ options.animation_js ]( options.animation_options );
			
			if( options.controls_js != undefined ){
				if( this[ options.controls_js ] == undefined ){
					debug("slideshow.js > controls js NOT FOUND:  "+ options.controls_js );
					return;
				}
				this[ options.controls_js ]( options.controls_options );
			}
			
			this.hasNext = function() {
				if( this.current_slide_num < this.numOfSlides - 1 )
					return true;
				return false;
			}
			
			this.hasPrev = function() {
				if( this.current_slide_num > 0 )
					return true;
				return false;
			}
			
			this.gotoNext = function() {
				if( this.current_slide_num >= slides.length - 1 )
					return;
				this.gotoNum( this.current_slide_num + 1 );
			}
			
			this.gotoPrev = function() {
				if( this.current_slide_num <= 0 )
					return;
				this.gotoNum( this.current_slide_num - 1 );
			}
			
			this.gotoNum = function( num ) {
				if( this.current_slide_num == num )
					return;
				
				if( this.current_slide != undefined ){
					main_slideshow.aniOut( this.current_slide );
				}
				this.current_slide_num = num;
				this.current_slide = slides[ this.current_slide_num ];
				
				this.current_slide.css({
					display: "block"
				});
				main_slideshow.trigger( "onSlide" );
				
				main_slideshow.aniIn( this.current_slide, check_if_autoToNext_shouldStop );
				
			}
			
			this.find( options.child_selector ).each(function () {
				$(this).css({
					position: "absolute",
					display: "none"
				});
				if( options.drupal_image_cache != "" )
					$(this).attr( "src", Drupal.imagecache.createUrl( options.drupal_image_cache, $(this).attr( "src" ).substringEndFrom("/") ) );
				
				main_slideshow.numOfSlides++;
				slides.push( $(this) );
				if( main_slideshow.numOfSlides == 1 )
					main_slideshow.gotoNum( 0 );
				
			});
			
			/////////////////////////////////////////////////////////////////////////
			/////////////////////////////////////////////////////////////////////////
			// AUTO TO NEXT -////////////////////////////////////////////////////////
			/////////////////////////////////////////////////////////////////////////
			
// 			var autoToNextUserInteractionTime = -1;
// 			var autoToNextTime;
			var autoToNextTimeout = -1;
// 			var autoToNextUserInteractionTime = 6000;
			var autoToNextUserInteractionTimeout = -1;
			this.hasAutoToNext = false;
			var hasAutoToNextUserInteractionTimeout = false;
		
			this.setAutoToNext = function( _start_immediately ) {
				var start_immediately = _start_immediately || false;
				
				startAutoToNext();
				if (start_immediately)
					onAutoToNext();
				
			}
			
			function startAutoToNext() {
				main_slideshow.hasAutoToNext = true;
				hasAutoToNextUserInteractionTimeout = false;
				main_slideshow.clearAutoToNext();
				autoToNextTimeout = setTimeout( onAutoToNext, options.autoToNextTime );
			}
			
			this.clearAutoToNext = function() {
				if ( autoToNextTimeout != -1 )
					clearTimeout( autoToNextTimeout );
				autoToNextTimeout = -1;
			}
			
			this.stopAutoToNext = function() {
				main_slideshow.hasAutoToNext = false;
				main_slideshow.clearAutoToNext();
			}
			
			// when user does a klik on next, prev or something. And autoNext is on. Call this function!
			this.onUserInteraction = function() {
				if ( ! main_slideshow.hasAutoToNext )
					return;
				hasAutoToNextUserInteractionTimeout = true;
				main_slideshow.clearAutoToNext();
				clearAutoToNextUserInteractionTimeout();
				autoToNextUserInteractionTimeout = setTimeout( function(){
					startAutoToNext();
					onAutoToNext();
				}, options.autoToNextUserInteractionTime );
			}
			
			function clearAutoToNextUserInteractionTimeout() {
				if ( autoToNextUserInteractionTimeout != -1 ) {
					clearTimeout( autoToNextUserInteractionTimeout );
					autoToNextUserInteractionTimeout = -1;
				}
			}
			
			function onAutoToNext() {
				
				if ( main_slideshow.hasNext() )
					main_slideshow.gotoNext();
				else	// loop!!
					main_slideshow.gotoNum( 0 );
				
				if ( main_slideshow.hasAutoToNext && ! hasAutoToNextUserInteractionTimeout ) {
					main_slideshow.clearAutoToNext();
					autoToNextTimeout = setTimeout( onAutoToNext, options.autoToNextTime );
				}
				
			}
			
			/////////////////////////////////////////////////////////////////////////
			//- AUTO TO NEXT ////////////////////////////////////////////////////////
			/////////////////////////////////////////////////////////////////////////
			/////////////////////////////////////////////////////////////////////////
			
			
			
			/////////////////////////////////////////////////////////////////////////
			/////////////////////////////////////////////////////////////////////////
			// VIDEO AND AUTO TO NEXT -//////////////////////////////////////////////
			/////////////////////////////////////////////////////////////////////////
			
			function checkIfSlideISReady( slide ) {
				if( currIsVideo( slide ) ){
					var video = main_slideshow.current_slide.find("video"); // html5
					if( video == undefined )
						video = main_slideshow.current_slide.find("object");// flash
					if( video[0] == undefined || video[0].play == undefined )
						return false;
					return true;
				}else{
					return true;
				}
			}
			
			function currIsVideo( slide ) {
				function checkIfIsVideo( item ){
					if( item[0] == undefined )
						return false;
					if( item.find( "video" ).length > 0 )	// HTML5 video
						return true;
					if( item.find( "object" ).length > 0 )	// FLASH video player
						return true;
					return false;
				}
				if( checkIfIsVideo( slide ) )
					return true;
				
				if( checkIfIsVideo( slide.children() ) )
					return true;
				return false;
			}
			
			// used for video that the auto to next stops while the video is playing. After it is done, play video again.
			function check_if_autoToNext_shouldStop() {
				if( currIsVideo( main_slideshow.current_slide ) ){
					main_slideshow.stopAutoToNext();
					function ended(e) {
						main_slideshow.setAutoToNext( true );
					}
					var video = main_slideshow.current_slide.find("video")[0];
					if (video) { // We have HTML5 video element
						video.addEventListener('ended', ended, false);
						video.play();
						return;
					}
					
					video = main_slideshow.current_slide.find("object"); // Look for Flash
					if (video) {
						// set Flash listeners
						video.bind( "PlayerViewEvent:EndOfFile", function() {
							video.unbind( "PlayerViewEvent:EndOfFile" );
							main_slideshow.setAutoToNext( true );
						});
						// check if video can play. (is ready to be set to play.)
						if( video[0].play == undefined ){
							video.bind( "flash_ready", function() {
								video.unbind( "flash_ready" );
								video[0].play();
							});
						}else{
							video[0].play();
						}
					}
				}
			}
			
			/////////////////////////////////////////////////////////////////////////
			//- VIDEO AND AUTO TO NEXT //////////////////////////////////////////////
			/////////////////////////////////////////////////////////////////////////
			/////////////////////////////////////////////////////////////////////////
			
			main_slideshow.trigger( "slideshow_init" );
			
			return this;
		}
	});
})(jQuery);
;

(function($){
	$.fn.extend({
		slideshow_ani_fade_zoom: function( options ) {
			var defaults = {
				max_zoom: 1.6, 
				ani_in_duration: 1000, 
				ani_out_duration: 1000
			}
			var options = $.extend( {}, defaults, options );
			
			var slide_in_use_array = [];
			var main_slideshow = $(this);
			var curr_slide_to_ani;
			this.aniIn = function( slide_to_ani, callback ) {
				curr_slide_to_ani = slide_to_ani
				// all curr active to old.
				// new curr to active.
				slide_to_ani.removeClass( "in_active" ).removeClass( "old" ).addClass( "active" );
				setSlidesProperties();
				slide_to_ani.css( {
					opacity: 0,
					display: "block",
// 					"z-index": 4,
					MozBackgroundSize: "150%",
					WebkitBackgroundSize: "150%"
				} );
				slide_to_ani.stop().animate({
					opacity: 1,
					MozBackgroundSize: "100%",
					WebkitBackgroundSize: "100%"
				}, { 
					duration: options.ani_in_duration, 
					complete: function() {
						if( $(this).equals( curr_slide_to_ani ) ){
							main_slideshow.find(".old").removeClass( "old" ).addClass( "in_active" );
							setSlidesProperties();
						}
						if( callback )
							callback.call();
					}
				} );
// 				debug( slide_to_ani[0] );
			}
			
			function setSlidesProperties() {
				main_slideshow.find(".in_active").css( {
					display: "none",
					"z-index": 1
				} );
				main_slideshow.find(".old").each( function( i, o ){
					$(this).css( {
						display: "block",
						"z-index": $(this).css( "z-index" ) - 1
					} );
				} );
				main_slideshow.find(".active").css( {
					display: "block",
					"z-index": 10
				} );
			}
			
			this.aniOut = function( slide_to_ani ) {
				slide_to_ani.removeClass( "in_active" ).removeClass( "active" ).addClass( "old" );
			}
		}
	});
})(jQuery);
;

/*
Author: 	Barry Tielkes
Company:	uncinc
Contact:	barry@uncinc.nl
Created:	23 - dec - 2011
*/

(function($){
	$.fn.extend({
		slideshow_controls_bullets: function( options ) {
			
			var defaults = {};
			var options = $.extend({}, defaults, options);
			
			var main_slideshow = this;
			
			main_slideshow.bind( "slideshow_init", function(){
				main_slideshow.unbind( "slideshow_init" );
				drawBullets();
				update_bullets();
			} );
			
			var bullets = $("<div class='bullets-wrapper'/>");
			this.append( bullets );
			
			function drawBullets() {
				for( var i = 0; i < main_slideshow.numOfSlides; i++ ){
					var bullet = $("<div class='bullet bullet-"+ i +"' rel='"+ i +"'/>");
					bullets.append( bullet );
					bullet.css( {
						cursor: "pointer"
					} );
					bullet.click( function( e ){
						main_slideshow.onUserInteraction();
						main_slideshow.gotoNum( $(this).attr("rel") );
					} );
				}
			}
			
			function update_bullets() {
				main_slideshow.find( ".bullet" ).each( function () {
					$(this).removeClass( "active" );
				} );
				main_slideshow.find( ".bullet-"+ main_slideshow.current_slide_num ).addClass("active");
			}
			
			main_slideshow.bind( "onSlide", function(){
				update_bullets();
			} );
			
			return this;
		}
	});
})(jQuery);;

(function($){
	Drupal.behaviors.news_images_rollover = {
		attach: function ( context, settings ) {
			$('#block-views-news-promo-block .views-field-field-image, #block-views-news-overview-block-1 .image-field-normal').each(function () {
				$(this).css({
					'background-image': 'url('+ $(this).find('img').attr('src') +')'
				});
			} );
		}
	}
} )(jQuery);;;
/*{"version":"4768810","mac":"1:bac623af93cde8aedde74503f5367ed71d46960dd0f3f7edde4e018f93a59ba6","k":"0.9.8","created":"2011-06-21T09:51:55Z"}*/
;(function(window,document,undefined){
var j=true,o=null,q=false;function r(a){return function(c){this[a]=c}}function s(a){return function(){return this[a]}}var t;function u(a,c){var b=arguments.length>2?Array.prototype.slice.call(arguments,2):[];return function(){b.push.apply(b,arguments);return c.apply(a,b)}}function v(a,c){this.p=a;this.i=c}t=v.prototype;
t.createElement=function(a,c,b){a=this.p.createElement(a);if(c)for(var d in c)if(c.hasOwnProperty(d))if(d=="style"&&this.i.getName()=="MSIE")a.style.cssText=c[d];else a.setAttribute(d,c[d]);b&&a.appendChild(this.p.createTextNode(b));return a};t.insertInto=function(a,c){var b=this.p.getElementsByTagName(a)[0];if(!b)b=document.documentElement;if(b&&b.lastChild){b.insertBefore(c,b.lastChild);return j}return q};t.whenBodyExists=function(a){function c(){document.body?a():setTimeout(c,0)}c()};
t.removeElement=function(a){if(a.parentNode){a.parentNode.removeChild(a);return j}return q};t.createCssLink=function(a){return this.createElement("link",{rel:"stylesheet",href:a})};t.appendClassName=function(a,c){for(var b=a.className.split(/\s+/),d=0,e=b.length;d<e;d++)if(b[d]==c)return;b.push(c);a.className=b.join(" ").replace(/^\s+/,"")};
t.removeClassName=function(a,c){for(var b=a.className.split(/\s+/),d=[],e=0,g=b.length;e<g;e++)b[e]!=c&&d.push(b[e]);a.className=d.join(" ").replace(/^\s+/,"").replace(/\s+$/,"")};t.hasClassName=function(a,c){for(var b=a.className.split(/\s+/),d=0,e=b.length;d<e;d++)if(b[d]==c)return j;return q};function w(a,c,b,d,e,g,k,h){this.O=a;this.Ma=c;this.sa=b;this.ra=d;this.Fa=e;this.Ea=g;this.qa=k;this.Oa=h}t=w.prototype;t.getName=s("O");t.getVersion=s("Ma");t.getEngine=s("sa");t.getEngineVersion=s("ra");
t.getPlatform=s("Fa");t.getPlatformVersion=s("Ea");t.getDocumentMode=s("qa");function x(a,c){this.i=a;this.u=c}var aa=new w("Unknown","Unknown","Unknown","Unknown","Unknown","Unknown",undefined,q);
x.prototype.parse=function(){var a;if(this.i.indexOf("MSIE")!=-1){a=y(this,this.i,/(MSIE [\d\w\.]+)/,1);if(a!=""){var c=a.split(" ");a=c[0];c=c[1];a=new w(a,c,a,c,z(this),A(this),B(this,this.u),C(this,c)>=6)}else a=new w("MSIE","Unknown","MSIE","Unknown",z(this),A(this),B(this,this.u),q)}else{if(this.i.indexOf("Opera")!=-1)a:{c=a="Unknown";var b=y(this,this.i,/(Presto\/[\d\w\.]+)/,1);if(b!=""){c=b.split("/");a=c[0];c=c[1]}else{if(this.i.indexOf("Gecko")!=-1)a="Gecko";b=y(this,this.i,/rv:([^\)]+)/,
1);if(b!="")c=b}if(this.i.indexOf("Version/")!=-1){b=y(this,this.i,/Version\/([\d\.]+)/,1);if(b!=""){a=new w("Opera",b,a,c,z(this),A(this),B(this,this.u),C(this,b)>=10);break a}}b=y(this,this.i,/Opera[\/ ]([\d\.]+)/,1);a=b!=""?new w("Opera",b,a,c,z(this),A(this),B(this,this.u),C(this,b)>=10):new w("Opera","Unknown",a,c,z(this),A(this),B(this,this.u),q)}else{if(this.i.indexOf("AppleWebKit")!=-1){a=z(this);c=A(this);b=y(this,this.i,/AppleWebKit\/([\d\.]+)/,1);if(b=="")b="Unknown";var d="Unknown";
if(this.i.indexOf("Chrome")!=-1)d="Chrome";else if(this.i.indexOf("Safari")!=-1)d="Safari";else if(this.i.indexOf("AdobeAIR")!=-1)d="AdobeAIR";var e="Unknown";if(this.i.indexOf("Version/")!=-1)e=y(this,this.i,/Version\/([\d\.\w]+)/,1);else if(d=="Chrome")e=y(this,this.i,/Chrome\/([\d\.]+)/,1);else if(d=="AdobeAIR")e=y(this,this.i,/AdobeAIR\/([\d\.]+)/,1);var g=q;if(d=="AdobeAIR"){g=y(this,e,/\d+\.(\d+)/,1);g=C(this,e)>2||C(this,e)==2&&parseInt(g,10)>=5}else{g=y(this,b,/\d+\.(\d+)/,1);g=C(this,b)>=
526||C(this,b)>=525&&parseInt(g,10)>=13}a=new w(d,e,"AppleWebKit",b,a,c,B(this,this.u),g)}else{if(this.i.indexOf("Gecko")!=-1){c=a="Unknown";d=q;if(this.i.indexOf("Firefox")!=-1){a="Firefox";b=y(this,this.i,/Firefox\/([\d\w\.]+)/,1);if(b!=""){d=y(this,b,/\d+\.(\d+)/,1);c=b;d=b!=""&&C(this,b)>=3&&parseInt(d,10)>=5}}else if(this.i.indexOf("Mozilla")!=-1)a="Mozilla";b=y(this,this.i,/rv:([^\)]+)/,1);if(b=="")b="Unknown";else if(!d){d=C(this,b);e=parseInt(y(this,b,/\d+\.(\d+)/,1),10);g=parseInt(y(this,
b,/\d+\.\d+\.(\d+)/,1),10);d=d>1||d==1&&e>9||d==1&&e==9&&g>=2||b.match(/1\.9\.1b[123]/)!=o||b.match(/1\.9\.1\.[\d\.]+/)!=o}a=new w(a,c,"Gecko",b,z(this),A(this),B(this,this.u),d)}else a=aa;a=a}a=a}a=a}return a};function z(a){var c=y(a,a.i,/(iPod|iPad|iPhone|Android)/,1);if(c!="")return c;a=y(a,a.i,/(Linux|Mac_PowerPC|Macintosh|Windows)/,1);if(a!=""){if(a=="Mac_PowerPC")a="Macintosh";return a}return"Unknown"}
function A(a){var c=y(a,a.i,/(OS X|Windows NT|Android) ([^;)]+)/,2);if(c)return c;if(c=y(a,a.i,/(iPhone )?OS ([\d_]+)/,2))return c;if(a=y(a,a.i,/Linux ([i\d]+)/,1))return a;return"Unknown"}function C(a,c){var b=y(a,c,/(\d+)/,1);if(b!="")return parseInt(b,10);return-1}function y(a,c,b,d){if((a=c.match(b))&&a[d])return a[d];return""}function B(a,c){if(c.documentMode)return c.documentMode}function ba(a,c,b,d){this.f=a;this.j=c;this.R=b;this.n=d||"wf";this.l=new D("-")}
function E(a){a.f.removeClassName(a.j,a.l.k(a.n,"loading"));a.f.hasClassName(a.j,a.l.k(a.n,"active"))||a.f.appendClassName(a.j,a.l.k(a.n,"inactive"));F(a,"inactive")}function F(a,c,b,d){a.R[c]&&a.R[c](b,d)}function G(a,c,b,d,e){this.f=a;this.w=c;this.z=b;this.s=d;this.L=e;this.U=0;this.ma=this.ca=q}
G.prototype.watch=function(a,c,b,d){for(var e=a.length,g=0;g<e;g++){var k=a[g];c[k]||(c[k]=["n4"]);this.U+=c[k].length}if(d)this.ca=d;for(g=0;g<e;g++){k=a[g];d=c[k];for(var h=b[k],f=0,l=d.length;f<l;f++){var n=d[f],p=this.w,i=k,m=n;p.f.appendClassName(p.j,p.l.k(p.n,i,m,"loading"));F(p,"fontloading",i,m);p=u(this,this.ta);i=u(this,this.ua);new H(p,i,this.f,this.z,this.s,this.L,k,n,h)}}};
G.prototype.ta=function(a,c){var b=this.w;b.f.removeClassName(b.j,b.l.k(b.n,a,c,"loading"));b.f.removeClassName(b.j,b.l.k(b.n,a,c,"inactive"));b.f.appendClassName(b.j,b.l.k(b.n,a,c,"active"));F(b,"fontactive",a,c);this.ma=j;I(this)};G.prototype.ua=function(a,c){var b=this.w;b.f.removeClassName(b.j,b.l.k(b.n,a,c,"loading"));b.f.hasClassName(b.j,b.l.k(b.n,a,c,"active"))||b.f.appendClassName(b.j,b.l.k(b.n,a,c,"inactive"));F(b,"fontinactive",a,c);I(this)};
function I(a){if(--a.U==0&&a.ca)if(a.ma){a=a.w;a.f.removeClassName(a.j,a.l.k(a.n,"loading"));a.f.removeClassName(a.j,a.l.k(a.n,"inactive"));a.f.appendClassName(a.j,a.l.k(a.n,"active"));F(a,"active")}else E(a.w)}
function H(a,c,b,d,e,g,k,h,f){this.oa=a;this.xa=c;this.f=b;this.z=d;this.s=e;this.L=g;this.Ba=new J;this.wa=new ca;this.X=k;this.W=h;this.va=f||"BESs";this.Ca=da(this,"arial,'URW Gothic L',sans-serif");this.Da=da(this,"Georgia,'Century Schoolbook L',serif");this.ia=K(this,"arial,'URW Gothic L',sans-serif");this.ja=K(this,"Georgia,'Century Schoolbook L',serif");this.Ka=g();this.S()}
H.prototype.S=function(){var a=this.z.M(this.ja);if(this.Ca!=this.z.M(this.ia)||this.Da!=a)ea(this,this.oa);else this.L()-this.Ka<5E3?fa(this):ea(this,this.xa)};function fa(a){a.s(function(c,b){return function(){b.call(c)}}(a,a.S),50)}function ea(a,c){a.f.removeElement(a.ia);a.f.removeElement(a.ja);c(a.X,a.W)}function da(a,c){var b=K(a,c,j),d=a.z.M(b);a.f.removeElement(b);return d}
function K(a,c,b){var d=a.wa.expand(a.W);c=a.f.createElement("span",{style:"position:absolute;top:-999px;left:-999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;font-family:"+(b?"":a.Ba.quote(a.X)+",")+c+";"+d},a.va);a.f.insertInto("body",c);return c}function D(a){this.za=a||"-"}D.prototype.k=function(){for(var a=[],c=0;c<arguments.length;c++)a.push(arguments[c].replace(/[\W_]+/g,"").toLowerCase());return a.join(this.za)};
function J(){this.ha="'"}J.prototype.quote=function(a){var c=[];a=a.split(/,\s*/);for(var b=0;b<a.length;b++){var d=a[b].replace(/['"]/g,"");d.indexOf(" ")==-1?c.push(d):c.push(this.ha+d+this.ha)}return c.join(",")};function ca(){this.fa=ga;this.B=ha}var ga=["font-style","font-weight"],ha={"font-style":[["n","normal"],["i","italic"],["o","oblique"]],"font-weight":[["1","100"],["2","200"],["3","300"],["4","400"],["5","500"],["6","600"],["7","700"],["8","800"],["9","900"],["4","normal"],["7","bold"]]};
function ia(a,c,b){this.ya=a;this.Ga=c;this.B=b}ia.prototype.expand=function(a,c){for(var b=0;b<this.B.length;b++)if(c==this.B[b][0]){a[this.ya]=this.Ga+":"+this.B[b][1];break}};ca.prototype.expand=function(a){if(a.length!=2)return o;for(var c=[o,o],b=0,d=this.fa.length;b<d;b++){var e=this.fa[b];(new ia(b,e,this.B[e])).expand(c,a.substr(b,1))}return c[0]&&c[1]?c.join(";")+";":o};function M(a,c){this.p=a;this.i=c}M.prototype=v.prototype;
M.prototype.isHttps=function(){return this.p.location.protocol=="https:"};M.prototype.getHostName=function(){return this.p.location.hostname};M.prototype.loadScript=function(a,c){var b=this.p.getElementsByTagName("head")[0];if(b){var d=this.p.createElement("script");d.src=a;var e=q;d.onload=d.onreadystatechange=function(){if(!e&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){e=j;c&&c();d.onload=d.onreadystatechange=o;d.parentNode.tagName=="HEAD"&&b.removeChild(d)}};b.appendChild(d)}};
M.prototype.createStyle=function(a){var c=this.p.createElement("style");c.setAttribute("type","text/css");if(c.styleSheet)c.styleSheet.cssText=a;else c.appendChild(document.createTextNode(a));return c};function ja(a){for(var c=a.Ia.join(","),b=[],d=0;d<a.V.length;d++){var e=a.V[d];b.push(e.name+":"+e.value+";")}return c+"{"+b.join("")+"}"}function ka(a,c){this.D=a;this.Z=c;this.Y={}}function N(a,c){return c?(a.Y[c.getStylesheetFormatId()]||a.Z).slice(0):a.Z.slice(0)}
function la(a,c,b){for(var d=N(a),e,g=[],k={},h=0;h<d.length;h++){e=d[h];if(e.length>0&&!k[e]){k[e]=j;g.push(e)}}b=b.ga?b.ga(g):g;a.Y[c.getStylesheetFormatId()]=b}ka.prototype.watch=function(a,c,b){var d=[],e={};d.push(this.D);e[this.D]=N(this,c);a.watch(d,e,{},b)};function O(a,c,b){this.Ja=a;this.N=c;this.Ha=b}O.prototype.buildUrl=function(a,c){var b=this.Ja&&a?"https:":"http:",d=typeof this.N=="function"?this.N(b):this.N;return b+"//"+d+this.Ha+c};
function ma(a,c,b){if(a.$){var d=function(){try{c._gat._getTracker("UA-8850781-3")._trackPageview();c.tkKitsTracked||(c.tkKitsTracked=0);c.tkKitsTracked++}catch(e){}};if(c._gat)d();else{a=a.$.buildUrl(b.isHttps(),"/ga.js");b.loadScript(a,d)}}}function na(a,c){var b=new Image(1,1);b.src=c;b.onload=function(){b.onload=o}}function P(a,c,b){this.A=a;this.la=c;this.ba=b}P.prototype.getId=s("A");P.prototype.getStylesheetFormatId=s("la");
P.prototype.isUserAgent=function(a){return this.ba?this.ba(a.getName(),a.getVersion(),a.getEngine(),a.getEngineVersion(),a.getPlatform(),a.getPlatformVersion(),a.getDocumentMode()):q};P.prototype.buildCssUrl=function(a,c,b,d){b="/"+b+"-"+this.la+".css";if(d)b+="?"+d;return c.buildUrl(a,b)};function Q(){this.t=[]}Q.prototype.addBrowser=function(a){this.getBrowserById(a.getId())||this.t.push(a)};Q.prototype.getBrowserById=function(a){for(var c=0;c<this.t.length;c++){var b=this.t[c];if(a===b.getId())return b}return o};
Q.prototype.findBrowser=function(a){for(var c=0;c<this.t.length;c++){var b=this.t[c];if(b.isUserAgent(a))return b}return o};Q.prototype.addBrowsersToBrowserSet=function(a){for(var c=0;c<this.t.length;c++)a.addBrowser(this.t[c])};function oa(a){this.A=a;this.I=new Q;this.m=[];this.J=[];this.K=this.T=this.v=o}t=oa.prototype;t.getId=s("A");t.setSecurityToken=r("ka");t.setNestedUrl=r("da");t.setFontFilterSet=r("K");t.setKitOptions=r("G");t.addBrowser=function(a){this.I.addBrowser(a)};
t.addFontFamily=function(a){this.m.push(a)};t.addCssRule=function(a){this.J.push(a)};t.supportsBrowser=function(a){return!!this.I.getBrowserById(a.getId())};t.addBrowsersToBrowserSet=function(a){this.I.addBrowsersToBrowserSet(a)};t.init=function(a){for(var c=[],b=0;b<this.J.length;b++)c.push(ja(this.J[b]));a.insertInto("head",a.createStyle(c.join("")))};
t.load=function(a,c,b,d){if(this.K)for(var e=pa(this.K,b.getStylesheetFormatId()),g=0;g<this.m.length;g++)la(this.m[g],b,e);if(this.v&&this.T){this.v.pa(new qa(b.getStylesheetFormatId()));g=new ra(a,this.C,this.m);e=sa(this.T,b.getStylesheetFormatId(),g);for(g=0;g<e.length;g++)this.v.pa(e[g]);this.v.Na(this.ka);g=this.v.buildUrl(a.isHttps(),this.da)}else g=b.buildCssUrl(a.isHttps(),this.da,this.A,this.ka);a.insertInto("head",a.createCssLink(g));c&&a.whenBodyExists(function(k,h,f,l){return function(){for(var n=
0;n<k.m.length;n++)k.m[n].watch(h,f,l&&n==k.m.length-1)}}(this,c,b,d))};t.collectFontFamilies=function(a,c,b){for(var d=0;d<this.m.length;d++){var e=this.m[d],g=a,k=b;c.push(e.D);k[e.D]=N(e,g)}};t.performOptionalActions=function(a,c,b){this.G&&b.whenBodyExists(function(d,e,g,k){return function(){ma(d.G,e,k);var h=d.G;h.ea&&na(h,h.ea.buildUrl(k.isHttps()));var f=d.G;h=d.A;if(f.Q){f=f.Q.k(h,g,k);f.setAttribute("id","typekit-badge-"+h);k.insertInto("body",f)}}}(this,a,c,b))};
function R(a,c,b,d,e){this.Aa=a;this.f=c;this.i=b;this.j=d;this.s=e;this.o=[]}R.prototype.H=function(a){this.o.push(a)};R.prototype.load=function(a,c){var b=a,d=c||{};if(typeof b=="string")b=[b];else if(b&&b.length)b=b;else{d=b||{};b=[]}if(b.length)for(var e=this,g=b.length,k=0;k<b.length;k++)this.na(b[k],function(){--g==0&&e.P(d)});else this.P(d)};R.prototype.na=function(a,c){this.f.loadScript(this.Aa.buildUrl(this.f.isHttps(),"/"+a+".js"),c)};
R.prototype.P=function(a){if(a.userAgent)this.i=(new x(a.userAgent,document)).parse();a=new ba(this.f,this.j,a);for(var c=new Q,b=0;b<this.o.length;b++)this.o[b].addBrowsersToBrowserSet(c);c=c.findBrowser(this.i);for(b=0;b<this.o.length;b++)this.o[b].init(this.f);if(c){a.f.appendClassName(a.j,a.l.k(a.n,"loading"));F(a,"loading");ta(this,c,a)}else E(a);this.o=[]};
function ta(a,c,b){b=new G(a.f,b,{M:function(g){return g.offsetWidth}},a.s,function(){return+new Date});for(var d=0;d<a.o.length;d++){var e=a.o[d];if(e.supportsBrowser(c)){e.load(a.f,b,c,d==a.o.length-1);e.performOptionalActions(window,a.i,a.f)}}}function S(a,c,b){this.aa=a;this.f=c;this.s=b;this.o=[]}S.prototype.H=function(a){this.o.push(a)};
S.prototype.load=function(){var a=this.aa.__webfonttypekitmodule__;if(a)for(var c=0;c<this.o.length;c++){var b=this.o[c],d=a[b.getId()];if(d){var e=this.f,g=this.s;d(function(k,h,f){var l=new Q;b.addBrowsersToBrowserSet(l);h=[];var n={};if(l=l.findBrowser(k)){b.init(e);b.load(e,o,l,g);b.collectFontFamilies(l,h,n);b.performOptionalActions(window,k,e,g)}f(!!l,h,n)})}}};function T(a,c){this.O=a;this.ga=c}T.prototype.getName=s("O");
function U(a,c){for(var b=0;b<a.F.length;b++){var d=a.F[b];if(c===d.getName())return d}return o}function pa(a,c){var b=a.q[c];return b?U(a,b):o}function sa(a,c,b){var d=[];a=a.r[c]||[];for(c=0;c<a.length;c++){var e;a:switch(a[c]){case "observeddomain":e=new ua(b.f);break a;case "fontmask":e=new va(b.C,b.m);break a;default:e=o}e&&d.push(e)}return d}function ra(a,c,b){this.f=a;this.C=c;this.m=b}function qa(a){this.La=a}qa.prototype.toString=s("La");function ua(a){this.f=a}
ua.prototype.toString=function(){var a;a=this.f.getHostName?this.f.getHostName():document.location.hostname;return encodeURIComponent(a)};function va(a,c){this.C=a;this.m=c}va.prototype.toString=function(){for(var a=[],c=0;c<this.m.length;c++){var b=this.m[c],d=N(b);b=N(b,this.C);for(var e=0;e<d.length;e++){var g;a:{for(g=0;g<b.length;g++)if(d[e]===b[g]){g=j;break a}g=q}a.push(g?1:0)}}a=a.join("");a=a.replace(/^0+/,"");c=[];for(d=a.length;d>0;d-=4){b=a.slice(d-4<0?0:d-4,d);c.unshift(parseInt(b,2).toString(16))}return c.join("")};
var V=new Q;V.addBrowser(new P("ie9plus-winvista","h",function(a,c,b,d,e,g,k){c=(c=q)||(e=="Windows"&&g=="6.0"?j:q);if(!c)return q;var h;if(a=="MSIE")h=k>=9;return h}));V.addBrowser(new P("ie9plus-win7plus","g",function(a,c,b,d,e,g,k){var h=q;h=h||function(l,n,p,i,m,L){l=/^([0-9]+).([0-9]+)/.exec(L);if(m=="Windows"&&l){m=parseInt(l[1],10);l=parseInt(l[2],10);return m>6||m==6&&l>=1}else return q}(a,c,b,d,e,g,k);if(!h)return q;var f;if(a=="MSIE")f=k>=9;return f}));
V.addBrowser(new P("safari-android-ipad-iphone","a",function(a,c,b,d,e,g,k){var h=q;h=(h=(h=h||function(f,l,n,p,i,m){f=/([0-9]+).([0-9]+)/.exec(m);if(i=="Android"&&f){i=parseInt(f[1]);f=parseInt(f[2]);return i>2||i==2&&f>=2}else return q}(a,c,b,d,e,g,k))||function(f,l,n,p,i,m){if(i=="iPad")if(l=/^([0-9]+)_([0-9]+)/.exec(m)){f=parseInt(l[1],10);l=parseInt(l[2],10);return f>4||f==4&&l>=2}else return q;else return q}(a,c,b,d,e,g,k))||function(f,l,n,p,i,m){if(i=="iPhone"||i=="iPod")if(l=/^([0-9]+)_([0-9]+)/.exec(m)){f=
parseInt(l[1],10);l=parseInt(l[2],10);return f>4||f==4&&l>=2}else return q;else return q}(a,c,b,d,e,g,k);if(!h)return q;return function(f,l,n,p,i){if(f=="Safari"&&n=="AppleWebKit"||f=="Unknown"&&n=="AppleWebKit"&&(i=="iPhone"||i=="iPad"))if(f=/([0-9]+.[0-9]+)/.exec(p))return parseFloat(f[1])>=525.13;return q}(a,c,b,d,e,g,k)}));
V.addBrowser(new P("ff36plus-linux-osx-win2003-win7plus-winvista-winxp","e",function(a,c,b,d,e,g,k){var h=q;h=(h=(h=(h=(h=(h=h||(e=="Windows"&&g=="5.1"?j:q))||(e=="Windows"&&g=="5.2"?j:q))||(e=="Windows"&&g=="6.0"?j:q))||function(f,l,n,p,i,m){f=/^([0-9]+).([0-9]+)/.exec(m);if(i=="Windows"&&f){i=parseInt(f[1],10);f=parseInt(f[2],10);return i>6||i==6&&f>=1}else return q}(a,c,b,d,e,g,k))||function(f,l,n,p,i,m){f=/^([0-9]+)(_|.)([0-9]+)/.exec(m);if(i=="Macintosh"&&f){i=parseInt(f[1],10);m=parseInt(f[3],
10);return i>10||i==10&&m>=4}else return i=="Macintosh"&&m=="Unknown"?j:q}(a,c,b,d,e,g,k))||(e=="Ubuntu"||e=="Linux"?j:q);if(!h)return q;return function(f,l,n,p){if(n=="Gecko")if(l=/([0-9]+.[0-9]+)(.([0-9]+)|)/.exec(p)){f=parseFloat(l[1]);l=parseInt(l[3],10);return f>1.9||f>=1.9&&l>1}return q}(a,c,b,d,e,g,k)}));
V.addBrowser(new P("chrome6plus-linux-osx","d",function(a,c,b,d,e,g,k){var h=q;h=(h=h||function(f,l,n,p,i,m){f=/^([0-9]+)(_|.)([0-9]+)/.exec(m);if(i=="Macintosh"&&f){i=parseInt(f[1],10);m=parseInt(f[3],10);return i>10||i==10&&m>=4}else return i=="Macintosh"&&m=="Unknown"?j:q}(a,c,b,d,e,g,k))||(e=="Ubuntu"||e=="Linux"?j:q);if(!h)return q;return function(f,l){if(f=="Chrome"){var n=/([0-9]+.[0-9]+).([0-9]+).([0-9]+)/.exec(l);if(n)if(parseFloat(n[1])>=6)return j}}(a,c,b,d,e,g,k)}));
V.addBrowser(new P("ie6to8-win2003-win7plus-winvista-winxp","c",function(a,c,b,d,e,g,k){var h=q;h=(h=(h=(h=h||(e=="Windows"&&g=="5.1"?j:q))||(e=="Windows"&&g=="5.2"?j:q))||(e=="Windows"&&g=="6.0"?j:q))||function(f,l,n,p,i,m){f=/^([0-9]+).([0-9]+)/.exec(m);if(i=="Windows"&&f){i=parseInt(f[1],10);f=parseInt(f[2],10);return i>6||i==6&&f>=1}else return q}(a,c,b,d,e,g,k);if(!h)return q;return function(f,l,n,p,i,m,L){if(f=="MSIE"){if(f=/([0-9]+.[0-9]+)/.exec(l))return parseFloat(f[1])>=6&&(L===undefined||
L<9);return q}}(a,c,b,d,e,g,k)}));
V.addBrowser(new P("safari-osx-win2003-win7plus-winvista-winxp","b",function(a,c,b,d,e,g,k){var h=q;h=(h=(h=(h=(h=h||(e=="Windows"&&g=="5.1"?j:q))||(e=="Windows"&&g=="5.2"?j:q))||(e=="Windows"&&g=="6.0"?j:q))||function(f,l,n,p,i,m){f=/^([0-9]+).([0-9]+)/.exec(m);if(i=="Windows"&&f){i=parseInt(f[1],10);f=parseInt(f[2],10);return i>6||i==6&&f>=1}else return q}(a,c,b,d,e,g,k))||function(f,l,n,p,i,m){f=/^([0-9]+)(_|.)([0-9]+)/.exec(m);if(i=="Macintosh"&&f){i=parseInt(f[1],10);m=parseInt(f[3],10);return i>
10||i==10&&m>=4}else return i=="Macintosh"&&m=="Unknown"?j:q}(a,c,b,d,e,g,k);if(!h)return q;return function(f,l,n,p,i){if(f=="Safari"&&n=="AppleWebKit"||f=="Unknown"&&n=="AppleWebKit"&&(i=="iPhone"||i=="iPad"))if(f=/([0-9]+.[0-9]+)/.exec(p))return parseFloat(f[1])>=525.13;return q}(a,c,b,d,e,g,k)}));
V.addBrowser(new P("air-linux-osx-win","b",function(a,c,b,d,e,g,k){var h=q;h=(h=(h=h||(e=="Windows"&&g=="Unknown"?j:q))||function(f,l,n,p,i,m){f=/^([0-9]+)(_|.)([0-9]+)/.exec(m);if(i=="Macintosh"&&f){i=parseInt(f[1],10);m=parseInt(f[3],10);return i>10||i==10&&m>=4}else return i=="Macintosh"&&m=="Unknown"?j:q}(a,c,b,d,e,g,k))||(e=="Ubuntu"||e=="Linux"?j:q);if(!h)return q;return function(f,l){if(f=="AdobeAIR"){var n=/([0-9]+.[0-9]+)/.exec(l);if(n)return parseFloat(n[1])>=2.5}return q}(a,c,b,d,e,g,k)}));
V.addBrowser(new P("chrome6plus-win2003-win7plus-winvista-winxp","e",function(a,c,b,d,e,g,k){var h=q;h=(h=(h=(h=h||(e=="Windows"&&g=="5.1"?j:q))||(e=="Windows"&&g=="5.2"?j:q))||(e=="Windows"&&g=="6.0"?j:q))||function(f,l,n,p,i,m){f=/^([0-9]+).([0-9]+)/.exec(m);if(i=="Windows"&&f){i=parseInt(f[1],10);f=parseInt(f[2],10);return i>6||i==6&&f>=1}else return q}(a,c,b,d,e,g,k);if(!h)return q;return function(f,l){if(f=="Chrome"){var n=/([0-9]+.[0-9]+).([0-9]+).([0-9]+)/.exec(l);if(n)if(parseFloat(n[1])>=
6)return j}}(a,c,b,d,e,g,k)}));
V.addBrowser(new P("opera-linux-osx-win2003-win7plus-winvista-winxp","b",function(a,c,b,d,e,g,k){var h=q;h=(h=(h=(h=(h=(h=h||(e=="Windows"&&g=="5.1"?j:q))||(e=="Windows"&&g=="5.2"?j:q))||(e=="Windows"&&g=="6.0"?j:q))||function(f,l,n,p,i,m){f=/^([0-9]+).([0-9]+)/.exec(m);if(i=="Windows"&&f){i=parseInt(f[1],10);f=parseInt(f[2],10);return i>6||i==6&&f>=1}else return q}(a,c,b,d,e,g,k))||function(f,l,n,p,i,m){f=/^([0-9]+)(_|.)([0-9]+)/.exec(m);if(i=="Macintosh"&&f){i=parseInt(f[1],10);m=parseInt(f[3],
10);return i>10||i==10&&m>=4}else return i=="Macintosh"&&m=="Unknown"?j:q}(a,c,b,d,e,g,k))||(e=="Ubuntu"||e=="Linux"?j:q);if(!h)return q;a=a=="Opera"?parseFloat(c)>=10.54:q;return a}));
V.addBrowser(new P("chrome4to5-linux-osx-win2003-win7plus-winvista-winxp","b",function(a,c,b,d,e,g,k){var h=q;h=(h=(h=(h=(h=(h=h||(e=="Windows"&&g=="5.1"?j:q))||(e=="Windows"&&g=="5.2"?j:q))||(e=="Windows"&&g=="6.0"?j:q))||function(f,l,n,p,i,m){f=/^([0-9]+).([0-9]+)/.exec(m);if(i=="Windows"&&f){i=parseInt(f[1],10);f=parseInt(f[2],10);return i>6||i==6&&f>=1}else return q}(a,c,b,d,e,g,k))||function(f,l,n,p,i,m){f=/^([0-9]+)(_|.)([0-9]+)/.exec(m);if(i=="Macintosh"&&f){i=parseInt(f[1],10);m=parseInt(f[3],
10);return i>10||i==10&&m>=4}else return i=="Macintosh"&&m=="Unknown"?j:q}(a,c,b,d,e,g,k))||(e=="Ubuntu"||e=="Linux"?j:q);if(!h)return q;return function(f,l){if(f=="Chrome"){var n=/([0-9]+.[0-9]+).([0-9]+).([0-9]+)/.exec(l);if(n){var p=parseFloat(n[1]),i=parseInt(n[2],10);n=parseInt(n[3],10);if(p>=6)return q;else if(p>4)return j;else if(p==4&&i>249)return j;else if(p==4&&i==249&&n>=4)return j}}return q}(a,c,b,d,e,g,k)}));
V.addBrowser(new P("ff35-linux-osx-win2003-win7plus-winvista-winxp","b",function(a,c,b,d,e,g,k){var h=q;h=(h=(h=(h=(h=(h=h||(e=="Windows"&&g=="5.1"?j:q))||(e=="Windows"&&g=="5.2"?j:q))||(e=="Windows"&&g=="6.0"?j:q))||function(f,l,n,p,i,m){f=/^([0-9]+).([0-9]+)/.exec(m);if(i=="Windows"&&f){i=parseInt(f[1],10);f=parseInt(f[2],10);return i>6||i==6&&f>=1}else return q}(a,c,b,d,e,g,k))||function(f,l,n,p,i,m){f=/^([0-9]+)(_|.)([0-9]+)/.exec(m);if(i=="Macintosh"&&f){i=parseInt(f[1],10);m=parseInt(f[3],10);
return i>10||i==10&&m>=4}else return i=="Macintosh"&&m=="Unknown"?j:q}(a,c,b,d,e,g,k))||(e=="Ubuntu"||e=="Linux"?j:q);if(!h)return q;return function(f,l,n,p){if(n=="Gecko"){f=/1.9.1b[1-3]{1}/;return/1.9.1/.test(p)&&!f.test(p)}return q}(a,c,b,d,e,g,k)}));var W=new function(){this.F=[];this.q={}},wa=new T("AllFonts",function(a){return a});U(W,wa.getName())||W.F.push(wa);
var xa=new T("IEVisibleFonts",function(a){function c(k,h){for(var f=0;f<k.length;f++)if(h[k[f]])return h[k[f]];return[]}for(var b,d,e={},g=0;g<a.length;g++){b=a[g];d=b.charAt(1);(e[d]||(e[d]=[])).push(b)}a=c([4,3,2,1,5,6,7,8,9],e);e=c([7,8,9,6,5,4,3,2,1],e);if(a.length&&e.length&&a[0].charAt(1)==e[0].charAt(1))return a;return a.concat(e)});U(W,xa.getName())||W.F.push(xa);W.q.a="AllFonts";W.q.b="AllFonts";W.q.c="IEVisibleFonts";W.q.d="AllFonts";W.q.e="AllFonts";W.q.g="AllFonts";W.q.h="AllFonts";
var X=new function(){this.r={}};X.r.a=[];X.r.b=[];X.r.c=["observeddomain","fontmask"];X.r.d=[];X.r.e=[];X.r.g=["observeddomain"];X.r.h=["observeddomain"];if(!window.Typekit){var ya=new O(q,"use.typekit.com","/"),za=(new x(navigator.userAgent,document)).parse(),Aa=new M(document,za),Ba=function(a,c){setTimeout(a,c)},Y=new R(ya,Aa,za,document.documentElement,Ba),Z=new S(window,Aa,Ba);window.Typekit=Y;window.Typekit.load=Y.load;window.Typekit.addKit=Y.H}var Ca,Da,$;Ca=new O(q,"use.typekit.com","/k");
Da=new function(a,c,b){this.Q=a;this.$=c;this.ea=b}(o,o,o);$=new oa("cia4xro");$.setSecurityToken("3bb2a6e53c9684ffdc9a9bf41c5b2a62d168af50fd203c06863559823bee310246776622809269d927dcfca963dda3e19b63d5fa97ddea727d24866c62d45b4a33a6531742c50dda0b8cf3056f1546d78989bc975bae4220b68171091d116c8263415667f983db34c9990648222d4bdb1d6acb484652d949b647adbf5f3c");$.setNestedUrl(Ca);$.setKitOptions(Da);$.addFontFamily(new ka('"museo-slab-1","museo-slab-2"',["n3","n5","n7","n8","n9"]));
$.addCssRule(new function(a,c){this.Ia=a;this.V=c}([".tk-museo-slab"],[{value:'"museo-slab-1","museo-slab-2",serif',name:"font-family"}]));$.addBrowser(V.getBrowserById("air-linux-osx-win"));$.addBrowser(V.getBrowserById("chrome4to5-linux-osx-win2003-win7plus-winvista-winxp"));$.addBrowser(V.getBrowserById("chrome6plus-linux-osx"));$.addBrowser(V.getBrowserById("chrome6plus-win2003-win7plus-winvista-winxp"));$.addBrowser(V.getBrowserById("ff35-linux-osx-win2003-win7plus-winvista-winxp"));$.addBrowser(V.getBrowserById("ff36plus-linux-osx-win2003-win7plus-winvista-winxp"));
$.addBrowser(V.getBrowserById("ie6to8-win2003-win7plus-winvista-winxp"));$.addBrowser(V.getBrowserById("ie9plus-win7plus"));$.addBrowser(V.getBrowserById("ie9plus-winvista"));$.addBrowser(V.getBrowserById("opera-linux-osx-win2003-win7plus-winvista-winxp"));$.addBrowser(V.getBrowserById("safari-android-ipad-iphone"));$.addBrowser(V.getBrowserById("safari-osx-win2003-win7plus-winvista-winxp"));$.setFontFilterSet(W);if(Z&&Z.aa.__webfonttypekitmodule__){Z.H($);Z.load()}else window.Typekit.addKit($);
})(this,document);;

