Signin  Pricing  Examples  Support

Libraries > haus.generated.js

haus.generated.js - Search Live Website Code
It's like doing CTRL+F on millions of websites' source code



NerdyData is a search engine for source code. Search the source code of 200 million websites.


JAVASCRIPT FILE http://i3.haus.de/sites/all/themes/haus/js/min/haus.generated.js

Function Explorer



















































Libraries on i3.haus.de


ie-png.js

haus.generated.js

webtrekk.js



Explore More


lightbox.js

scriptaculous.js

script.js

sha1.js

haus.generated.js
				
// built by Ant using YUI Compressor

/* ************************
* _shared/scripts/tft/tft.haus.js
*/

// haus.properties: tft/tft.js,tft/core/console.js,tft/core/ads.js,tft/core/ads/adsc.js,tft/core/ads/google_adsense_content.js,tft/core/statistics.js,tft/core/statistics/ivwagof.js,tft/core/statistics/webtrekk.js			 

/* ************************
* tft/tft.js
*/

// $Id: tft.js 22551 2010-07-28 13:02:21Z bkonetzny $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, TFT  */

/**
* TFT Namespace - the global TFT namespace
* @namespace TFT
*/
var TFT = {};

/**
* TFT Core - handles core related functions
*/
TFT.Core = {
	/**
	* @static
	* @constructor (note: a constructor for JsDoc purposes)
	*/
	Modules: {
		oModules: {},
		/**
		* Registers a module
		* @param {String} sVersionString A svn:keywords (Id) property like '$Id: tft.js 22551 2010-07-28 13:02:21Z bkonetzny $'
		* @example
		* TFT.Core.Modules.addModule('tft.js 22551 2010-07-28 13:02:21Z bkonetzny $');
		*/
		addModule: function(sVersionString){
			var aVersionData = sVersionString.split(' '),
				sModule;
			
			if(aVersionData.length === 7){
				aVersionData.shift();
			}
			
			sModule = aVersionData[0].split(',');
			
			this.oModules[sModule[0]] = {iVersion: aVersionData[1], sTimestamp: aVersionData[2] + ' ' + aVersionData[3], sAuthor: aVersionData[4]};
		},
		/**
		* Returns true if module is loaded
		* @param {String} sModule Name of script file as provided by TFT.Core.Modules.addModule().
		* @return {Boolean}
		* @example
		* if(TFT.Core.Modules.isLoaded('tft.js')){
		* 	// tft.js is loaded
		* }
		* else{
		* 	// tft.js is not loaded
		* }
		*/
		isLoaded: function(sModule){
			if(typeof this.oModules[sModule] === 'undefined'){
				return false;
			}
			return true;
		}
	}
};

TFT.Core.Modules.addModule('tft.js 22551 2010-07-28 13:02:21Z bkonetzny $');

/**
* TFT Util - handles utility functions
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Util = {
	/**
	* @constructor (note: a constructor for JsDoc purposes)
	*/
	Date: {},
	/**
	* @constructor (note: a constructor for JsDoc purposes)
	*/
	Form: {},
	/**
	* @constructor (note: a constructor for JsDoc purposes)
	*/
	String: {}
};

/**
* TFT Ext - handles project-related functions
*/
TFT.Ext = {};

/* ************************
* tft/core/console.js
*/

// $Id: console.js 22359 2010-07-22 06:56:50Z bkonetzny $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, TFT */
TFT.Core.Modules.addModule('console.js 22359 2010-07-22 06:56:50Z bkonetzny $');

/**
* Base TFT Core Console object
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Core.Console = {
	bActive: false,
	bLoggerReady: false,
	sLogHandler: '',
	sKeyHandler: '',
	aKeyFilters: [],
	aSeverity: [],
	aMessageBuffer: [],
	/**
	* Logs a message to console.
	* Determines if message should be logged based on given filters.
	* Logging / buffering is handled by writeLog().
	* @param {String} sKey
	* @param {String} [sMessage]
	* @param {String} [sSeverity='info'] One of the following: 'debug', 'info', 'warn' or 'error'.
	* @returns {Boolean}
	* @example
	* TFT.Core.Console.log('TFT.My.Custom.Object', 'argument1: value1 | argument2: value2');
	*/
	log: function(sKey, sMessage, sSeverity){
		sMessage = sMessage || '';
		sSeverity = sSeverity || 'info';
		
		var bLog = true,
			aMatches;

		if (!this.bActive) {
			return false;
		}
		else {
			if(this.aSeverity.join(' ').indexOf(sSeverity) === -1){
				bLog = false;
			}
			
			if(bLog && this.aKeyFilters.length) {
				if(this.sKeyHandler === 'include'){
					aMatches = $.grep(this.aKeyFilters, function(sItem, iIndex){
						var sItemFilter;
						
						if (sItem.indexOf('*') !== -1) {
							sItemFilter = sItem.substr(0,sItem.length-2);
							
							return (sItemFilter === sKey.substr(0,sItemFilter.length));
						}
						else {
							return (sItem === sKey);
						}
					});
					
					if(!aMatches.length){
						bLog = false;
					}
				}
				else if(this.sKeyHandler === 'exclude'){
					aMatches = $.grep(this.aKeyFilters, function(sItem, iIndex){
						var sItemFilter;
						
						if (sItem.indexOf('*') !== -1) {
							sItemFilter = sItem.substr(0,sItem.length-2);
							
							return (sItemFilter === sKey.substr(0,sItemFilter.length));
						}
						else {
							return (sItem === sKey);
						}
					});
					
					if(aMatches.length){
						bLog = false;
					}
				}
			}

			if(bLog) {
				this.writeLog(sKey, sMessage, sSeverity);
			}
			
			return true;
		}
	},
	/**
	* Prepares / buffers the message.
	* If console output is paused or logger is not ready, messages are buffered.
	* Output to console is handled by writeLogHandler().
	* @private
	* @param {String} sKey
	* @param {String} sMessage
	* @param {String} sSeverity
	*/
	writeLog: function(sKey, sMessage, sSeverity){
		if (this.bLoggerReady) {
			if(this.aMessageBuffer.length){
				for(var iIndex = 0; iIndex < this.aMessageBuffer.length; iIndex++){
					this.writeLogHandler(this.aMessageBuffer[iIndex].sKey, this.aMessageBuffer[iIndex].sMessage, this.aMessageBuffer[iIndex].sSeverity);
				}
				
				this.aMessageBuffer = [];
			}
			
			this.writeLogHandler(sKey, sMessage, sSeverity);
		}
		else {
			this.aMessageBuffer.push({sKey: sKey, sMessage: sMessage, sSeverity: sSeverity});
		}
	},
	/**
	* Writes a message to console
	* @private
	* @param {String} sKey
	* @param {String} sMessage
	* @param {String} sSeverity
	*/
	writeLogHandler: function(sKey, sMessage, sSeverity){
		if (this.sLogHandler === 'console.debug') {
			if(sSeverity === 'info'){
				console.info('[' + sKey + '] ' + sMessage);
			}
			else if(sSeverity === 'warn'){
				console.warn('[' + sKey + '] ' + sMessage);
			}
			else if(sSeverity === 'error'){
				console.error('[' + sKey + '] ' + sMessage);
			}
			else{
				console.debug('[' + sKey + '] ' + sMessage);
			}
		}
		else if (this.sLogHandler === 'div#tft_core_console') {
			$('div#tft_core_console textarea').val('[' + sSeverity + '][' + sKey + '] ' + sMessage + '\n' + $('div#tft_core_console textarea').val());
		}
		else if (this.sLogHandler === 'alert') {
			alert('[' + sSeverity + '][' + sKey + '] ' + sMessage);
		}
	},
	/**
	* Initializes the Console
	* @param {Boolean} bActive Enables/Disables console output
	* @param {String} [sLogHandler=''] Name of the LogHandler. Possible values are 'console.debug', 'div#tft_core_console' or 'alert'. If empty will detect if native console is available, otherwise chooses the TFT HTML console. 
	* @param {Array} [aKeyFilters=[]]
	* @param {String} [sKeyHandler='include']
	* @param {String} [aSeverity=['info', 'warn', 'error']] Can contain the following values: 'debug', 'info', 'warn' and 'error'.
	* @example
	* // log all
	* TFT.Core.Console.init(true, '', [], 'include');
	* @example
	* // log only where key contains 'TFT.Core.Statistics'
	* TFT.Core.Console.init(true, 'alert', ['TFT.Core.Statistics.*'], 'include');
	* @example
	* // log all except where key contains 'TFT.Core.Statistics'
	* TFT.Core.Console.init(true, 'alert', ['TFT.Core.Statistics.*'], 'exclude');
	* @example
	* // log all except where key contains 'TFT.Core.Statistics', with severity 'debug' enabled
	* TFT.Core.Console.init(true, 'alert', ['TFT.Core.Statistics.*'], 'exclude', ['debug', 'info', 'warn', 'error']);
	*/
	init: function(bActive, sLogHandler, aKeyFilters, sKeyHandler, aSeverity){
		sLogHandler = sLogHandler || '';
		aKeyFilters = aKeyFilters || [];
		sKeyHandler = sKeyHandler || 'include';
		aSeverity = aSeverity || ['info', 'warn', 'error'];
		
		if (bActive) {
			if (sLogHandler !== '') {
				this.sLogHandler = sLogHandler;
			}
			else {
				// detect firebug console
				if (typeof console !== 'undefined' && typeof console.debug !== 'undefined') {
					this.sLogHandler = 'console.debug';
				}
				else {
					this.sLogHandler = 'div#tft_core_console';
				}
			}
			
			this.aKeyFilters = aKeyFilters;
			this.sKeyHandler = sKeyHandler;
			this.aSeverity = aSeverity;
			
			if(this.sLogHandler === 'div#tft_core_console'){
				this.createConsoleElement();
			}
			else{
				this.bLoggerReady = true;
			}
			
			this.bActive = true;
			
			this.log('TFT.Core.Console.init', 'Initialised');
		}
		else {
			this.bActive = false;
		}
		
		$(document).ready(function(){
			TFT.Core.Console.log('TFT.Core.Console.documentReady');
		});
	},
	/**
	* Pause/resumes console output.
	* @param {Boolean} [bReady=true]
	* @example
	* // pause logger
	* TFT.Core.Console.toggleLogger(false);
	* @example
	* // resume logger
	* TFT.Core.Console.toggleLogger(true);
	*/
	toggleLogger: function(bReady){
		bReady = bReady || true;
		
		if(!bReady) {
			this.log('TFT.Core.Console.toggleLogger', 'bLoggerReady: ' + bReady);
		}
		
		TFT.Core.Console.bLoggerReady = bReady;
		
		if(bReady) {
			this.log('TFT.Core.Console.toggleLogger', 'bLoggerReady: ' + bReady);
		}
	},
	/**
	* Creates a HTML console on when document is ready. The log() calls are buffered until this console is ready.
	* @private
	*/
	createConsoleElement: function(){
		$(document).ready(function(){
			TFT.Core.Console.log('TFT.Core.Console.createConsoleElement', '#tft_core_console');
		
			var sConsole = '';
			
			sConsole += '<div id="tft_core_console" style="z-index: 999; border: 1px solid #000; width: 510px; position: fixed; right: 0px; bottom: 0px; background-color: #ccc; padding: 5px; font-family: Arial; font-size: 10px; color: #000;">';
			sConsole += '<label for="tft_core_console_log" style="float: left; display: block; font-family: Arial; font-size: 12px; font-weight: bold; color: #000;">TFT.Core.Console:</label>';
			sConsole += '<a href="#" style="float: right; font-family: Arial; font-size: 10px; padding-left: 10px; font-weight: normal; color: #000;" onclick="$(\'#tft_core_console\').hide(); return false;">[ close ]</a>';
			sConsole += '<a href="#" style="float: right; font-family: Arial; font-size: 10px; padding-left: 10px; font-weight: normal; color: #000;" onclick="$(\'#tft_core_console div\').toggle(); if($(this).html() == \'[ hide ]\') { $(this).html(\'[ show ]\'); } else { $(this).html(\'[ hide ]\'); } return false;">[ hide ]</a>';
			sConsole += '<a href="#" style="float: right; font-family: Arial; font-size: 10px; padding-left: 10px; font-weight: normal; color: #000;" onclick="$(\'#tft_core_console textarea\').val(\'\'); return false;">[ clear ]</a>';
			sConsole += '<a href="#" style="float: right; font-family: Arial; font-size: 10px; padding-left: 10px; font-weight: normal; color: #000;" onclick=" if($(this).html() == \'[ pause ]\') { TFT.Core.Console.toggleLogger(false); $(this).html(\'[ resume ]\'); } else { TFT.Core.Console.toggleLogger(true); $(this).html(\'[ pause ]\'); } return false;">[ pause ]</a>';
			sConsole += '<div>';
			sConsole += '<textarea id="tft_core_console_log" style="clear: both; display: block; width: 500px; height: 100px; font-size: 11px; color: #000;"></textarea>';
			sConsole += 'Mode: '+TFT.Core.Console.sKeyHandler+' | Filter: '+TFT.Core.Console.aKeyFilters;
			sConsole += '</div>';
			sConsole += '</div>';
			
			$('body').append(sConsole);
			TFT.Core.Console.bLoggerReady = true;
		});
	}
};

/* ************************
* tft/core/ads.js
*/

// $Id: ads.js 23908 2010-08-30 12:34:31Z bkonetzny $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, TFT */
TFT.Core.Modules.addModule('ads.js 23908 2010-08-30 12:34:31Z bkonetzny $');

/**
* Base TFT Core Ads object
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Core.Ads = {
	Handler: {},
	bInitialised: false,
	aActiveHandler: [],
	oProperties: {},
	bDomReady: false,
	oAreas: {},
	sAdClass: '',
	/**
	* Initializes the Ads
	* @param {Array} aActiveHandler
	* @param {String} [sAdClass='tft_ads'] The class of the elements the ad calls ({@link TFT.Core.Ads.displayArea}) are wrapped in.
	* @example
	* // Initialize handler 'Adsc', wrapper class is 'tft_ads'
	* TFT.Core.Ads.init(['Adsc'], 'tft_ads');
	*/
	init: function(aActiveHandler, sAdClass){
		sAdClass = sAdClass || 'tft_ads';
		
		TFT.Core.Console.log('TFT.Core.Ads.init','aActiveHandler: ' + aActiveHandler + ' | sAdClass: ' + sAdClass);
			
		var myself = this;
		
		this.bInitialised = true;
		this.aActiveHandler = aActiveHandler;
		this.sAdClass = sAdClass;
		
		$.each(this.aActiveHandler, function(iIndex, sValue) {
			if (typeof myself.Handler[sValue] !== 'undefined'){
				if (typeof myself.Handler[sValue].init !== 'undefined') {
					myself.Handler[sValue].init();
				}
			}
			else{
				TFT.Core.Console.log('TFT.Core.Ads.init','Handler "' + sValue + '" could not be initialized. Please make sure this handler is loaded.', 'error');
			}
		});

		$(document).ready(function(){
			$('body').append('<div class="advertisement" style="float: left; width: 1px; height: 1px; overflow: hidden;"></div>');
			TFT.Core.Ads.bDomReady = true;
		});
	},
	/**
	* Sets the ads properties
	* @param {String} sKey
	* @param {Object} oProperties
	*/
	setProperties: function(sKey, oProperties){
		if(this.bInitialised) {
			TFT.Core.Console.log('TFT.Core.Ads.setProperties','sKey: ' + sKey);
			
			var myself = this;
			
			this.oProperties[sKey] = oProperties;
			
			$.each(this.aActiveHandler, function(iIndex, sValue) {
				if (sValue === sKey && typeof myself.Handler[sKey].set !== 'undefined') {
					myself.Handler[sValue].set(myself.oProperties[sKey]);
				}
			});
		}
	},
	/**
	* Initializes an ad-area
	* @param {String} sArea
	* @param {String} sHandler
	* @param {Object} [oProperties]
	*/
	initArea: function(sArea, sHandler, oProperties){
		oProperties = oProperties || {};
		
		if(this.bInitialised) {
			TFT.Core.Console.log('TFT.Core.Ads.initArea', 'sArea: ' + sArea);
			
			var myself = this;
			
			this.oAreas[sArea] = {
				sHandler: sHandler,
				oProperties: oProperties,
				bDisplayed: false
			};
			
			$.each(this.aActiveHandler, function(iIndex, sValue) {
				if (sValue === myself.oAreas[sArea].sHandler && typeof myself.Handler[myself.oAreas[sArea].sHandler].initArea !== 'undefined') {
					myself.Handler[myself.oAreas[sArea].sHandler].initArea(sArea, oProperties, myself.oProperties[myself.oAreas[sArea].sHandler]);
				}
			});
		}
	},
	/**
	* Displays an ad-area.<br/>
	* The wrapping element is required to have 2 classes:
	* <ol>
	* 	<li>the class which is given as sAdClass to {@link TFT.Core.Ads.init}</li>
	* 	<li>a constructed class following the pattern "sAdClass + '_area_' + sAreaName"</li>
	* </ul>
	* @param {String} sArea
	* @example
	* &lt;!-- wrapper class is 'tft_ads', area name is 'banner' --&gt;
	* &lt;div class="<span style="color: green;">tft_ads</span> <span style="color: green;">tft_ads</span><span style="color: blue;">_area_</span><span style="color: red;">banner</span>"&gt;
	* 	&lt;script type="text/javascript"&gt;
	* 		&lt;!--
	* 		try {
	* 			TFT.Core.Ads.displayArea('<span style="color: red;">banner</span>');
	* 		} catch(oError) {
	* 			TFT.Core.Console.log('JsTryCatch', 'message: ' + oError.message, 'error');
	* 		}
	* 		//--&gt;
	* 	&lt;/script&gt;
	* &lt;/div&gt;
	*/
	displayArea: function(sArea){
		TFT.Core.Console.log('TFT.Core.Ads.displayArea','sArea: ' + sArea);
		
		var myself = this;
		
		$.each(this.aActiveHandler, function(iIndex, sValue) {
			if (typeof myself.oAreas[sArea] !== 'undefined' && !myself.oAreas[sArea].bDisplayed && sValue === myself.oAreas[sArea].sHandler && typeof myself.Handler[myself.oAreas[sArea].sHandler].displayArea !== 'undefined') {
				myself.Handler[myself.oAreas[sArea].sHandler].displayArea(sArea, myself.oAreas[sArea].oProperties, myself.oProperties[myself.oAreas[sArea].sHandler]);
				myself.oAreas[sArea].bDisplayed = true;
			}
		});
	},
	/**
	* Refresh ad-areas
	* @param {Array} [aAreas=All areas]
	* @example
	* // Refresh all areas
	* TFT.Core.Ads.refreshAreas();
	* @example
	* // Refresh area 'banner' and 'sky'
	* TFT.Core.Ads.refreshAreas(['banner','sky']);
	*/
	refreshAreas: function(aAreas){
		aAreas = aAreas || '';

		TFT.Core.Console.log('TFT.Core.Ads.refreshAreas','aAreas: ' + aAreas);

		var myself = this;

		if (aAreas === '') {
			aAreas = [];
			
			$.each(this.oAreas, function(iIndex, sValue) {
				aAreas.push(iIndex);
			});
		}

		$.each(aAreas, function() {
			TFT.Core.Console.log('TFT.Core.Ads.refreshAreas','sArea: ' + this);

			var oElement = $('.' + myself.sAdClass + '_area_' + this),
				sElementId,
				sHtmlCode;

			if (oElement.length !== 0) {
				sElementId = oElement.attr('id');
				sHtmlCode = oElement.html();

				if (typeof sElementId === 'undefined' || sElementId === '') {
					sElementId = myself.sAdClass + '_' + Math.random().toString().substr(2);
					oElement.attr('id', sElementId);
				}

				if (sHtmlCode !== '') {
					document.getElementById(sElementId).innerHTML = sHtmlCode;
				}
			}
		});
	},
	/**
	* Shows all ad-areas
	*/
	showAreas: function(){
		TFT.Core.Console.log('TFT.Core.Ads.showAreas','sAdClass: ' + this.sAdClass);
		
		if (this.sAdClass !== '') {
			$('.' + this.sAdClass).fadeTo('fast', 1.0, function(){
				$(this).css('display', 'block');
			});
		}
	},
	/**
	* Hides all ad-areas
	*/
	hideAreas: function(){
		TFT.Core.Console.log('TFT.Core.Ads.hideAreas','sAdClass: ' + this.sAdClass);
		
		if (this.sAdClass !== '') {
			$('.' + this.sAdClass).fadeTo('fast', 0.1, function(){
				$(this).css('display', 'none');
			});
		}
	},
	/**
	* Detects if the user has an AdBlocker
	* @return {Boolean}
	*/
	hasAdBlocker: function(){
		TFT.Core.Console.log('TFT.Core.Ads.hasAdBlocker');
		
		if (TFT.Core.Ads.bDomReady) {
			var sCheckString = $('div.advertisement').css('-moz-binding');
			
			if (sCheckString !== 'none') {
				return true;
			}
		}
			
		return false;
	}
};

/* ************************
* tft/core/ads/adsc.js
*/

// $Id: adsc.js 14369 2009-12-10 14:50:50Z bkonetzny $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, TFT */
TFT.Core.Modules.addModule('adsc.js 14369 2009-12-10 14:50:50Z bkonetzny $');

/**
* Base Adsc Ads Handler object
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Core.Ads.Handler.Adsc = {
	/**
	* Sets the ads properties
	* @private
	* @param {Object} oHandlerProperties
	* @see TFT.Core.Ads.setProperties
	*/
	set: function(oHandlerProperties){
		TFT.Core.Console.log('TFT.Core.Ads.Handler.Adsc.set');
		
		$.each(oHandlerProperties.oSettings, function(sKey, sValue){
			window['adsc_' + sKey] = sValue;
		});
		
		document.write('<script type="text/javascript" src="' + oHandlerProperties.sUrl + '"></script>');
	},
	/**
	* Initializes an ad-area
	* @private
	* @param {String} sArea
	* @param {Object} oAreaProperties
	* @param {String} [oAreaProperties.sType='ads_gettag'] Type of area. Possible Values: 'ads_gettag' or 'adsdf'.
	* @param {Object} [oAreaProperties.oSettings] If oAreaProperties.sType is 'ads_gettag', variables will be set in the following way: window['adsc_' + sArea + sKey] = sValue;
	* @param {Object} oHandlerProperties
	* @see TFT.Core.Ads.initArea
	*/
	initArea: function(sArea, oAreaProperties, oHandlerProperties){
		oAreaProperties.sType = oAreaProperties.sType || 'ads_gettag';
		
		TFT.Core.Console.log('TFT.Core.Ads.Handler.Adsc.initArea', 'sArea: ' + sArea + ' | sType: ' + oAreaProperties.sType);
		
		if (oAreaProperties.sType === 'ads_gettag') {
			if(typeof oAreaProperties.oSettings === 'object'){
				$.each(oAreaProperties.oSettings, function(sKey, sValue){
					window['adsc_' + sArea + sKey] = sValue;
				});
			}
			else{
				TFT.Core.Console.log('TFT.Core.Ads.Handler.Adsc.initArea', 'sArea: ' + sArea + ' | No oAreaProperties.oSettings defined', 'warn');
			}
		}
	},
	/**
	* Displays an ad-area
	* @private
	* @param {String} sArea
	* @param {Object} oAreaProperties
	* @param {String} [oAreaProperties.sType='ads_gettag'] Type of area. Possible Values: 'ads_gettag' or 'adsdf'.
	* @param {Object} oHandlerProperties
	* @see TFT.Core.Ads.displayArea
	*/
	displayArea: function(sArea, oAreaProperties, oHandlerProperties){
		oAreaProperties.sType = oAreaProperties.sType || 'ads_gettag';
		
		TFT.Core.Console.log('TFT.Core.Ads.Handler.Adsc.displayArea', 'sArea: ' + sArea + ' | sType: ' + oAreaProperties.sType);
		
		if (oAreaProperties.sType === 'ads_gettag') {
			if (typeof window.ads_gettag !== 'undefined') {
				document.write(window.ads_gettag(oAreaProperties.sAdsTag, oAreaProperties.oSettings.width, oAreaProperties.oSettings.height, 100));
			}
			else{
				TFT.Core.Console.log('TFT.Core.Ads.Handler.Adsc.displayArea', 'Required function window.ads_gettag() is undefined. Check if TFT.Core.Ads.Handler.Adsc.set() has loaded the external script (' + oHandlerProperties.sUrl + ') properly.', 'error');
			}
		}
		else if (oAreaProperties.sType === 'adsdf') {
			document.write('<div id="adsdf_' + oAreaProperties.oSettings.width + '_' + oAreaProperties.oSettings.height + '_' + oAreaProperties.oSettings.percent + '_' + oAreaProperties.oSettings.layout + '" style="width: ' + oAreaProperties.oSettings.width + 'px; height: 1px; display: none; margin-top: 12px;"></div>');
		}
	},
	/**
	* Default template function to render google results
	* @private
	* @param {Object} oResult
	* @example
	* // should be set by the ad server:
	* function google_ad_request_done(google_ads){
	* 	TFT.Core.Ads.Handler.Adsc.defaultGoogleTemplate(google_ads);
	* }
	*/
	defaultGoogleTemplate: function(aResults){
		TFT.Core.Console.log('TFT.Core.Ads.Handler.Adsc.defaultGoogleTemplate','aResults.length: ' + aResults.length);
		
		if(aResults.length === 0){
			return;
		}
		
		window.google_info = window.google_info || {};
		window.google_info.feedback_url = window.google_info.feedback_url || 'http://services.google.com/feedback/online_hws_feedback';
		
		// counter by Adsc adserver
		window.dc_skip = window.dc_skip || 0;
		window.dc_skip = window.dc_skip + aResults.length; 
		
		var sHtml = '<div class="Adsc"><div><a href="' + window.google_info.feedback_url +'" target="_blank">Google-Anzeigen</a></div><ul>';
	
		$.each(aResults, function(iIndex, oResult) {
			oResult.url = oResult.url || '';
			oResult.line1 = oResult.line1 || '';
			oResult.line2 = oResult.line2 || '';
			oResult.line3 = oResult.line3 || '';
			oResult.url = oResult.url || '';
			oResult.visible_url = oResult.visible_url || '';
			
			sHtml += '<li><strong><a href="' + oResult.url + '" target="_blank">' + oResult.line1 + '</a></strong>';
			sHtml += '<span>' + oResult.line2 + ' ' + oResult.line3 + '</span>';
			sHtml += '<a href="' + oResult.url + '" target="_blank">' + oResult.visible_url + '</a>';
			sHtml += '</li>';
		});
		
		sHtml += '</ul></div>';
		
		document.write(sHtml);
	}
};

/* ************************
* tft/core/ads/google_adsense_content.js
*/

// $Id: google_adsense_content.js 23334 2010-08-16 14:53:40Z bkonetzny $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, TFT */
TFT.Core.Modules.addModule('google_adsense_content.js 23334 2010-08-16 14:53:40Z bkonetzny $');

/**
* Google AdSense for Content
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Core.Ads.Handler.GoogleAdsenseContent = {
	oGoogle: {
		skip: 0,
		adnum: 0
	},
	sActiveArea: '',
	/**
	* Sets the ads properties
	* @private
	* @param {Object} oHandlerProperties
	* @param {Object} oHandlerProperties.oSettings
	* @param {String} oHandlerProperties.oSettings.ad_client Identifies the partner making the request
	* @param {String} [oHandlerProperties.oSettings.ad_channel] Identifies the reporting channel that an ad request should be associated with
	* @param {String} [oHandlerProperties.oSettings.ad_type='text'] Possible values are 'text, image, flash, html'. You can provide a list of entrys here.
	* @param {String} [oHandlerProperties.oSettings.image_size='468x60'] Possible values are '728x90, 468x60, 336x280, 300x250, 250x250, 200x200, 160x600, 120x600'.
	* @param {String} [oHandlerProperties.oSettings.adtest='off']
	* @param {String} [oHandlerProperties.oSettings.feedback='on']
	* @param {String} [oHandlerProperties.oSettings.ad_output='js']
	* @param {String} [oHandlerProperties.oSettings.encoding='utf8']
	* @param {String} [oHandlerProperties.oSettings.language='de']
	* @param {String} [oHandlerProperties.oSettings.max_num_ads=3]
	* @see TFT.Core.Ads.setProperties
	*/
	set: function(oHandlerProperties){
		oHandlerProperties.oSettings.ad_channel = oHandlerProperties.oSettings.ad_channel || '';
		oHandlerProperties.oSettings.ad_type = oHandlerProperties.oSettings.ad_type || 'text';
		oHandlerProperties.oSettings.image_size = oHandlerProperties.oSettings.image_size || '468x60';
		oHandlerProperties.oSettings.adtest = oHandlerProperties.oSettings.adtest || 'off';
		oHandlerProperties.oSettings.feedback = oHandlerProperties.oSettings.feedback || 'on';
		oHandlerProperties.oSettings.ad_output = oHandlerProperties.oSettings.ad_output || 'js';
		oHandlerProperties.oSettings.encoding = oHandlerProperties.oSettings.encoding || 'utf8';
		oHandlerProperties.oSettings.language = oHandlerProperties.oSettings.language || 'de';
		oHandlerProperties.oSettings.max_num_ads = oHandlerProperties.oSettings.max_num_ads || 3;
		
		TFT.Core.Console.log('TFT.Core.Ads.Handler.GoogleAdsenseContent.set', 'ad_client: ' + oHandlerProperties.oSettings.ad_client);
	},
	/**
	* Displays an ad-area
	* @private
	* @param {String} sArea
	* @param {Object} oAreaProperties
	* @param {String} [oAreaProperties.ad_section='']
	* @param {Object} oHandlerProperties
	* @see TFT.Core.Ads.displayArea
	*/
	displayArea: function(sArea, oAreaProperties, oHandlerProperties){
		oAreaProperties.ad_section = oAreaProperties.ad_section || '';
		
		TFT.Core.Console.log('TFT.Core.Ads.Handler.GoogleAdsenseContent.displayArea','sArea: ' + sArea);
		
		var myself = this;
		
		$.each(myself.oGoogle, function(sKey, sValue){
			window['google_'+sKey] = sValue;
		});
		
		$.each(oHandlerProperties.oSettings, function(sKey, sValue){
			window['google_'+sKey] = sValue;
		});
		
		$.each(oAreaProperties, function(sKey, sValue){
			window['google_'+sKey] = sValue;
		});
		
		myself.sActiveArea = sArea;
		
		window.google_ad_request_done = function(aResults){
			if(aResults.length && aResults[0].bidtype === 'CPC'){
				myself.oGoogle.adnum = myself.oGoogle.adnum + aResults.length;
				myself.oGoogle.skip = myself.oGoogle.adnum;
				
				// counter by Adsc adserver
				window.dc_skip = window.dc_skip || 0;
				window.dc_skip = window.dc_skip + aResults.length; 
			}
			
			myself.requestCallback(aResults, oHandlerProperties);
		};
		
		document.write('<div id="GoogleAdsenseContentArea_' + sArea + '"></div>');		
		document.write('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
	},
	/**
	* Callback to render search results
	* @private
	* @param {Array} aResults
	* @param {Object} oHandlerProperties
	*/
	requestCallback: function(aResults, oHandlerProperties){
		var myself = TFT.Core.Ads.Handler.GoogleAdsenseContent,
			sArea = myself.sActiveArea,
			sAreaSelector = '#GoogleAdsenseContentArea_' + sArea;
		
		TFT.Core.Console.log('TFT.Core.Ads.Handler.GoogleAdsenseContent.requestCallback', 'aResults.length: ' + aResults.length);
		
		$.each(aResults, function(){
			var sTemplateFunction = myself.defaultTemplate;
				
			if (typeof TFT.Core.Ads.oAreas[sArea].oProperties.sTemplateFunction !== 'undefined'){
				sTemplateFunction = TFT.Core.Ads.oAreas[sArea].oProperties.sTemplateFunction;
				TFT.Core.Console.log('TFT.Core.Ads.Handler.GoogleAdsenseContent.requestCallback', 'Using sTemplateFunction of area.', 'debug');
			}
			else if (typeof TFT.Core.Ads.oProperties.GoogleAdsenseContent.sTemplateFunction !== 'undefined'){
				sTemplateFunction = TFT.Core.Ads.oProperties.GoogleAdsenseContent.sTemplateFunction;
				TFT.Core.Console.log('TFT.Core.Ads.Handler.GoogleAdsenseContent.requestCallback', 'Using sTemplateFunction of handler.', 'debug');
			}
			
			if (typeof sTemplateFunction === 'function') {
				sTemplateFunction(sArea, this, sAreaSelector);
			}
			else{
				TFT.Core.Console.log('TFT.Core.Ads.Handler.GoogleAdsenseContent.requestCallback', 'sTemplateFunction not found, so Ads won\'t be rendered.', 'error');
			}
		});
	},
	/**
	* Default template function to render the results
	* @private
	* @param {String} sArea
	* @param {Object} oResult
	* @param {String} sSelector
	*/
	defaultTemplate: function(sArea, oResult, sSelector){
		TFT.Core.Console.log('TFT.Core.Ads.Handler.GoogleAdsenseContent.defaultTemplate','sArea: ' + sArea);
		
		oResult.url = oResult.url || '';
		oResult.line1 = oResult.line1 || '';
		oResult.line2 = oResult.line2 || '';
		oResult.line3 = oResult.line3 || '';
		oResult.url = oResult.url || '';
		oResult.visible_url = oResult.visible_url || '';
		
		if($(sSelector).html() === ''){
			window.google_info = window.google_info || {};
			window.google_info.feedback_url = window.google_info.feedback_url || 'http://services.google.com/feedback/online_hws_feedback';
			$(sSelector).append('<div class="GoogleAdsenseContent"><div><a href="' + window.google_info.feedback_url + '" target="_blank">Google-Anzeigen</a></div><ul></ul></div>');
		}
		
		var sHtml = '<li><strong><a href="' + oResult.url + '" target="_blank">' + oResult.line1 + '</a></strong>';
		sHtml += '<span>' + oResult.line2 + ' ' + oResult.line3 + '</span>';
		sHtml += '<a href="' + oResult.url + '" target="_blank">' + oResult.visible_url + '</a>';
		sHtml += '</li>';
		
		$(sSelector + ' ul').append(sHtml);
	}
};

/* ************************
* tft/core/statistics.js
*/

// $Id: statistics.js 22366 2010-07-22 07:22:09Z bkonetzny $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, TFT */
TFT.Core.Modules.addModule('statistics.js 22366 2010-07-22 07:22:09Z bkonetzny $');

/**
* Base statistics object
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Core.Statistics = {
	Handler: {},
	bInitialised: false,
	aActiveHandler: [],
	oProperties: {},
	oPropertiesDefaults: {},
	oPropertiesProvided: {},
	/**
	* Initialize statistic handlers
	* Only initialized handlers can be used later
	* @param {Array} aActiveHandler
	* @example
	* // init 2 handlers: IvwAgof and Omniture
	* TFT.Core.Statistics.init(['IvwAgof', 'Omniture']);
	*/
	init: function(aActiveHandler){
		TFT.Core.Console.log('TFT.Core.Statistics.init', 'aActiveHandler: ' + aActiveHandler);
		
		var myself = this;
		$.each(aActiveHandler, function(iIndex, sValue) {
			if (typeof myself.Handler[sValue] !== 'undefined'){
				if (typeof myself.Handler[sValue].count !== 'undefined') {
					if (typeof myself.Handler[sValue].init !== 'undefined') {
						myself.Handler[sValue].init();
					}
					
					myself.Handler[sValue].iCount = 0;
					myself.aActiveHandler.push(sValue);
				}
				else{
					TFT.Core.Console.log('TFT.Core.Statistics.init', 'Function count() not implemented by handler "' + sValue + '". Handler will be disabled.', 'error');
				}
			}
			else{
				TFT.Core.Console.log('TFT.Core.Statistics.init', 'Handler "' + sValue + '" could not be initialized. Please make sure this handler is loaded. Handler will be disabled.', 'error');
			}
		});
		
		this.bInitialised = true;
	},
	/**
	* Count a statistics event
	* @param {Array} [aHandlers=All active handlers]
	* @example
	* // count an IvwAgof and Omniture event
	* TFT.Core.Statistics.count(['IvwAgof', 'Omniture']);
	* @example
	* // count an event for all active handlers
	* TFT.Core.Statistics.count();
	*/
	count: function(aHandlers){
		if (this.bInitialised) {
			aHandlers = aHandlers || this.aActiveHandler;
			
			var myself = this;
			
			TFT.Core.Console.log('TFT.Core.Statistics.count', 'aHandlers: ' + aHandlers);
			
			this.prepareProperties(aHandlers);
			
			$.each(aHandlers, function(iIndex, sValue) {
				myself.Handler[sValue].count(myself.oProperties[sValue]);
				myself.Handler[sValue].iCount++;
			});
			this.reset(aHandlers);
		}
	},
	/**
	* Set the statistics handler properties
	* @param {String} sHandler
	* @param {Object} oProperties
	* @example
	* // set properties for IvwAgof
	* TFT.Core.Statistics.set('IvwAgof', {ivw: 'http://ivwhost.example.com/cgi-bin/ivw/CP', agof: '10000'});
	*/
	set: function(sHandler, oProperties){
		if (this.bInitialised) {
			TFT.Core.Console.log('TFT.Core.Statistics.set', 'sHandler: ' + sHandler);
			
			this.reset([sHandler]);
			this.oPropertiesProvided[sHandler] = oProperties;
		}
	},
	/**
	* Get the statistics handler properties
	* @param {String} sHandler
	* @param {String} [sProperty=''] 
	* @param {String} [sType='object'] Possible values are 'object, array'.
	* @param {Boolean} [bUseHandler=false] Use data from handler, instead of data from statistics framework 
	* @example
	* // get properties for IvwAgof as object
	* TFT.Core.Statistics.get('IvwAgof');
	* @example
	* // get properties for IvwAgof as array
	* TFT.Core.Statistics.get('IvwAgof', '', 'array');
	* @example
	* // get single property for IvwAgof
	* TFT.Core.Statistics.get('IvwAgof', 'agof');
	*/
	get: function(sHandler, sProperty, sType, bUseHandler){
		if (this.bInitialised) {
			sProperty = sProperty || '';
			sType = sType || 'object';
			bUseHandler = bUseHandler || false;
			
			TFT.Core.Console.log('TFT.Core.Statistics.get', 'sHandler: ' + sHandler + ' | sProperty: ' + sProperty + ' | sType: ' + sType + ' | bUseHandler: ' + bUseHandler);
			
			var oProperties = {},
				oReturn;
			
			if(!bUseHandler){
				$.extend(oProperties, this.oPropertiesDefaults[sHandler]);
				$.extend(oProperties, this.oPropertiesProvided[sHandler]);
				
				if(sProperty === ''){
					if(sType === 'array'){
						oReturn = [];
						$.each(oProperties, function(sKey, sValue){
							oReturn.push([sKey, sValue]);
						});
					}
					else{
						oReturn = oProperties;
					}
				}
				else{
					oReturn = '';
					
					if(typeof oProperties[sProperty] !== 'undefined'){
						oReturn = oProperties[sProperty];
					}
				}
			}
			else{
				if (typeof this.Handler[sHandler].get !== 'undefined') {
					oProperties = this.Handler[sHandler].get(sProperty);
					
					if(sType === 'array'){
						oReturn = [];
						$.each(oProperties, function(sKey, sValue){
							oReturn.push([sKey, sValue]);
						});
					}
					else{
						oReturn = oProperties;
					}
				}
				else{
					TFT.Core.Console.log('TFT.Core.Statistics.get', 'Function get() not implemented by handler "' + sHandler + '".', 'error');
				}
			}
			
			return oReturn;
		}
	},
	/**
	* Set the default statistics properties
	* @param {String} sHandler
	* @param {Object} oProperties
	* @example
	* // set default properties for IvwAgof
	* TFT.Core.Statistics.setDefaults('IvwAgof', {ivw: 'http://ivwhost.example.com', agof: '10000'});
	*/
	setDefaults: function(sHandler, oProperties){
		if (this.bInitialised) {
			TFT.Core.Console.log('TFT.Core.Statistics.setDefaults','sHandler: ' + sHandler);
			
			this.oPropertiesDefaults[sHandler] = oProperties;
		}
	},
	/**
	* Get the default statistics properties
	* @param {String} sHandler
	* @return {Object}
	* @example
	* // get default properties for IvwAgof
	* oDefaultProperties = TFT.Core.Statistics.getDefaults('IvwAgof');
	*/
	getDefaults: function(sHandler){
		if (this.bInitialised) {
			TFT.Core.Console.log('TFT.Core.Statistics.getDefaults','sHandler: ' + sHandler);
			
			return this.oPropertiesDefaults[sHandler];
		}
		else{
			return {};
		}
	},
	/**
	* Resets statistics properties
	* @private
	* @param {Array} [aHandlers=All active handlers]
	*/
	reset: function(aHandlers){
		if (this.bInitialised) {
			aHandlers = aHandlers || this.aActiveHandler;
		
			TFT.Core.Console.log('TFT.Core.Statistics.reset', 'aHandlers: ' + aHandlers);
			
			var myself = this;
			
			$.each(aHandlers, function(iIndex, sValue){
				if (typeof myself.Handler[sValue].reset !== 'undefined') {
					myself.Handler[sValue].reset(myself.oProperties[sValue]);
				}
			
				myself.oPropertiesProvided[sValue] = {};
				myself.oProperties[sValue] = {};
			});
		}
	},
	/**
	* Prepares the statistics properties for count
	* @private
	* @param {Array} [aHandlers=All active handlers]
	*/
	prepareProperties: function(aHandlers){
		if (this.bInitialised) {
			aHandlers = aHandlers || this.aActiveHandler;
		
			var myself = this;
			
			$.each(this.oPropertiesDefaults, function(sKey, sValue){
				if (typeof myself.oProperties[sKey] === 'undefined') {
					myself.oProperties[sKey] = {};
				}
				$.extend(myself.oProperties[sKey], sValue);
			});
			
			$.each(this.oPropertiesProvided, function(sKey, sValue){
				if (typeof myself.oProperties[sKey] === 'undefined') {
					myself.oProperties[sKey] = {};
				}
				$.extend(myself.oProperties[sKey], sValue);
			});
			
			$.each(aHandlers, function(iIndex, sValue){
				if (typeof myself.Handler[sValue].set !== 'undefined') {
					myself.oProperties[sValue] = myself.oProperties[sValue] || {};
					myself.Handler[sValue].set(myself.oProperties[sValue]);
				}
			});
		}
	}
};


/* ************************
* tft/core/statistics/webtrekk.js			 
*/

// $Id: webtrekk.js 22376 2010-07-22 07:24:24Z bkonetzny $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, TFT */
TFT.Core.Modules.addModule('webtrekk.js 22376 2010-07-22 07:24:24Z bkonetzny $');

/**
* Base Webtrekk Statistics Handler object
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Core.Statistics.Handler.Webtrekk = {
	/**
	* Initializes the statistics handler
	* @private
	* @see TFT.Core.Statistics.init
	*/
	init: function(){
		TFT.Core.Console.log('TFT.Core.Statistics.Handler.Webtrekk.init');
		
		window.webtrekk = window.webtrekk || {};
	},
	/**
	* Counts an statistics event
	* @private
	* @param {Object} oProperties
	* @param {String} oProperties.trackDomain The tracking domain.
	* @param {String} oProperties.trackId The tracking ID or list of tracking IDs, e.g. '1234567890,1234567891'.
	* @param {String} oProperties.domain The domain to track, e.g. 'REGEXP:\\.example\\.com$'.
	* @param {String} oProperties.contentId The ID of the tracked content, e.g. 'example.de_DE.lifestyle.music.productname'.
	* @param {Array} [oProperties.contentGroup=[null,null,null,null,null,null,null,'de_DE']] Categories for given tracking, 7th item describes the content language.
	* @param {String} [oProperties.linkTrack='standard'] Tracks links with proper name-attribute.
	* @param {String} [oProperties.internalSearch] Searchterm of the internal search.
	* @param {Boolean} [oProperties.heatmap=0] Records heatmap for all clicks, for elements inside the reference point (set by oProperties.heatmapRefpoint).
	* @param {String} [oProperties.heatmapRefpoint='wt_refpoint'] Element ID of the wrapper element, whose clicks should be recorded to the heatmap.
	* @param {String} [oProperties.mediaCode='wt_mc'] URL parameter, which marks the request as a campaign request.
	* @param {Array} [oProperties.customParameter]
	* @param {String} [oProperties.customParameter[1]] Template type.
	* @param {String} [oProperties.customParameter[2]] Content type, e.g. 'ec;ec_text;ec_images;ec_videos;ugc;ugc_text;ugc_images;ugc_vieos'.
	* @param {String} [oProperties.customParameter[3]] Author ID.
	* @param {String} [oProperties.customParameter[4]] User status, one of the following: 'guest,user_loggedout,user_loggedin,user_loggedout_premium,user_loggedin_premium'.
	* @param {String} [oProperties.customParameter[5]] Tags, e.g. 'sport;olympic games'.
	* @param {String} [oProperties.customParameter[6]] IVW/AGOF, format 'ALIAS;CODE;TYPE', e.g. 'example;10000;CP'.
	* @param {String} [oProperties.customParameter[7]] Number of internal search results.
	* @param {String} [oProperties.customParameter[8]] Advertising category, e.g. 'Lifestyle;Music'.
	* @param {String} [oProperties.customParameter[9]] Advertising special, e.g. 'custom_campaign_name'.
	* @see TFT.Core.Statistics.count
	*/
	count: function(oProperties){	
		TFT.Core.Console.log('TFT.Core.Statistics.Handler.Webtrekk.count');
		
		if (this.checkWebtrekkExistence()) {
			window.wt_sendinfo();
		}
	},
	/**
	* Set a statistics property
	* @private
	* @param {Object} oProperties
	* @see TFT.Core.Statistics.set
	*/
	set: function(oProperties){
		oProperties.contentGroup = oProperties.contentGroup || [null,null,null,null,null,null,null,'de_DE'];
		oProperties.linkTrack = oProperties.linkTrack || 'standard';
		oProperties.heatmap = oProperties.heatmap || 0;
		oProperties.heatmapRefpoint = oProperties.heatmapRefpoint || 'wt_refpoint';
		oProperties.mediaCode = oProperties.mediaCode || 'wt_mc';
		
		TFT.Core.Console.log('TFT.Core.Statistics.Handler.Webtrekk.set');

		if (this.checkWebtrekkExistence()) {
			$.each(oProperties, function(sKey, sValue){
				window.webtrekk[sKey] = sValue;
			});
		}
	},
	/**
	* Get a statistics property
	* @private
	* @param {String} sProperty
	* @see TFT.Core.Statistics.get
	*/
	get: function(sProperty){
		TFT.Core.Console.log('TFT.Core.Statistics.Handler.Webtrekk.get');
		
		var oReturn = {};

		if (this.checkWebtrekkExistence()) {
			if(sProperty === ''){
				$.each(window.webtrekk, function(sKey, sValue){
					if(typeof sValue !== 'function' && typeof sValue !== 'object'){
						oReturn[sKey] = sValue;
					}
				});
			}
			else{
				oReturn = '';
				
				if(typeof window.webtrekk[sProperty] !== 'undefined'){
					oReturn = window.webtrekk[sProperty];
				}
			}
		}
		
		return oReturn;
	},
	/**
	* Checks for existence of webtrekk tracking code
	* @private
	* @return {Boolean}
	*/
	checkWebtrekkExistence: function(){
		if (typeof window.wt_sendinfo !== 'undefined') {
			return true;
		}
		else{
			TFT.Core.Console.log('TFT.Core.Statistics.Handler.Webtrekk.checkWebtrekkExistence','"window.wt_sendinfo" is undefined. Please make sure Webtrekk is included.','error');
			return false;
		}
	}
};

/* ************************
* _shared/scripts/tft/ext/haus/haus.js
*/

// $Id: haus.js 66429 2015-01-28 17:12:44Z kheigl $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, $f, TFT */
//TFT.Core.Modules.addModule('$Id: haus.js 66429 2015-01-28 17:12:44Z kheigl $');

/**
* Base Playboy Popup Object
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Ext.Haus = {
		
		
	initImageGallery: function(){
		var currenturl = document.URL;

		$("#tab-1 .fotos-gallery .view").cycle({
			fx			:	"fade",
			prev 		:	".items-navig .btn-prev",
			next 		: ".items-navig .btn-next",
			timeout	: 0,
			before	:	function() {
				var creditText = $(this).find('img').attr("data-credit"),
					creditString = "";
				if (creditText !== "") {
					creditString = '<div class="credit">&copy;&nbsp;'+creditText+'</div>';
				}
				$(this).children("a span.zoom").show();
				$("#tab-1 .gallery_credit").html(creditString).hide().fadeIn("slow");
				$("#tab-1 .gallery_description").html($(this).find('img').attr("data-title")).hide().fadeIn("slow");
			},
			after 	: function(){
				$("#tab-1 .fotos-gallery .view").height($("#tab-1 .fotos-gallery .view img:visible").height());
				$("#tab-1 .fotos-gallery .view-list img").css("opacity", "1");
				
				try {
					
					var active_id=parseInt($("#tab-1 .fotos-gallery .view img:visible").attr("class").replace(/foto-/g, ""),10);
				
					// set opacity 1 to other elements
					$("#tab-1 .fotos-gallery .view-list img.foto-"+active_id).css("opacity", "0.5");
					
					if(active_id>1 && active_id<($("#tab-1 #aSlidernav li").size()+2)) {
					
						if(active_id>$("#tab-1 #aSlidernav li").size()+2) {
							active_id=$("#aSlidernav li").size()+2;
						}
						else { 
							active_id-=2;
						}
						
						$("#tab-1 #view-list-holder #aSlidernav").animate({ 
							marginLeft: "-"+active_id*83+"px"
						}, 500);
					}
					else { 
						$("#tab-1 #view-list-holder #aSlidernav").animate({ 
							marginLeft: "0px"
						}, 500);
					}
					
				} catch (e) {
				}
	
			},
			pager:  "#tab-1 #aSlidernav", 
			pagerAnchorBuilder: function(idx, slide) { 
	        // return selector string for existing anchor 
	        return "ul.#aSlidernav li:eq(" + (idx) + ") a"; 
			},
			prevNextClick: function() {
				iom.c(iam_data,1);
				TFT.Core.Statistics.count(['Webtrekk']);
				var str = $("#tab-1 .fotos-gallery .gallery_caption").text();
				if (str.length > 60){galleryhead = str.substr(0, 60)+'...';} else {galleryhead = str;}
				var fullpage="/VIRTUAL/klein/"+galleryhead;
				var fulltitle="VIRTUAL-klein-"+galleryhead;
				ga('send', 'pageview', {'page': fullpage, 'title': fulltitle});

			},
			pagerClick: function() {
				var str = $("#tab-1 .fotos-gallery .gallery_caption").text();
				if (str.length > 60){galleryhead = str.substr(0, 60)+'...';} else {galleryhead = str;}
				var fullpage="/VIRTUAL/klein/"+galleryhead;
				var fulltitle="VIRTUAL-klein-"+galleryhead;
				ga('send', 'pageview', {'page': fullpage, 'title': fulltitle});

				iom.c(iam_data,1);
				TFT.Core.Statistics.count(['Webtrekk']);
			}
		});
	}
};


/* ************************
* _shared/scripts/tft/ext/haus/top_nodes.js
*/

// $Id: playboy.top_nodes.js 9393 2009-09-25 13:13:22Z bkonetzny $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, TFT, Drupal */
TFT.Core.Modules.addModule('$Id: haus.top_nodes.js 9393 2009-09-25 13:13:22Z bkonetzny $');

/**
* Base Haus TopNodes Object
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Ext.Haus.TopNodes = {
	/**
	* Updates the nodes view-count
	* @param {Integer} iNodeID
	*/
	count: function(iNodeID){
		TFT.Core.Console.log('TFT.Ext.Haus.TopNodes.count', 'iNodeID: ' + iNodeID + ' | bActive: ' + Drupal.settings.top_nodes.bActive);
		
		if(Drupal.settings.top_nodes.bActive == 1 || Drupal.settings.top_nodes.bActive === 1){
		
			var iRandomToken = new Date().getTime(),
				iRandom = Math.floor(Math.random() * 100),
				bCount = iRandom <= Drupal.settings.top_nodes.iThrottleValue;
			
			TFT.Core.Console.log('TFT.Ext.Haus.TopNodes.count', 'iThrottleValue: ' + Drupal.settings.top_nodes.iThrottleValue + ' | iRandom: ' + iRandom + ' | bCount: ' + bCount);
			
			if(bCount){
				$.get(Drupal.settings.top_nodes.sUrl + '/' + iNodeID + '?' + iRandomToken);
			}
		}
	}
};

/* ************************
* _shared/scripts/tft/ext/haus/hausideen.js
*/

// $Id: hausideen.js 66429 2015-01-28 17:12:44Z kheigl $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, $f, TFT */
TFT.Core.Modules.addModule('$Id: hausideen.js 66429 2015-01-28 17:12:44Z kheigl $');

/**
* Base Playboy Popup Object
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Ext.Haus.Hausideen = {
	
	initImageGallery: function(){
		var currenturl = document.URL;

		$("#tab-1 .fotos-gallery .view").cycle({
			fx			:	"fade",
			prev 		:	".items-navig .btn-prev",
			next 		: ".items-navig .btn-next",
			timeout	: 0,
			before	:	function() {
				var creditText = $(this).find('img').attr("data-credit"),
					creditString = "";
				if (creditText !== "") {
					creditString = '<div class="credit">&copy;&nbsp;'+creditText+'</div>';
				}
				$(this).children("a span.zoom").show();
				$("#tab-1 .gallery_caption").html($(this).attr("title")+creditString).hide().fadeIn("slow");				
			},
			after 	: function(){
				$("#tab-1 .fotos-gallery .view").height($("#tab-1 .fotos-gallery .view img:visible").height());
				$("#tab-1 .fotos-gallery .view-list img").css("opacity", "1");
				
				try {
					
					var active_id=parseInt($("#tab-1 .fotos-gallery .view img:visible").attr("class").replace(/foto-/g, ""),10);
				
					// set opacity 1 to other elements
					$("#tab-1 .fotos-gallery .view-list img.foto-"+active_id).css("opacity", "0.5");
					
					if(active_id>1 && active_id<($("#tab-1 #aSlidernav li").size()+2)) {
					
						if(active_id>$("#tab-1 #aSlidernav li").size()+2) {
							active_id=$("#aSlidernav li").size()+2;
						}
						else { 
							active_id-=2;
						}
						
						$("#tab-1 #view-list-holder #aSlidernav").animate({ 
							marginLeft: "-"+active_id*83+"px"
						}, 500);
					}
					else { 
						$("#tab-1 #view-list-holder #aSlidernav").animate({ 
							marginLeft: "0px"
						}, 500);
					}
					
				} catch (e) {
				}
	
			},
			pager:  "#tab-1 #aSlidernav", 
			pagerAnchorBuilder: function(idx, slide) { 
	        // return selector string for existing anchor 
	        return "ul.#aSlidernav li:eq(" + (idx) + ") a"; 
			},
			prevNextClick: function() {
				var str = $("#tab-1 .fotos-gallery .gallery_caption").text();
				if (str.length > 60){galleryhead = str.substr(0, 60)+'...';} else {galleryhead = str;}
				var fullpage="/VIRTUAL/klein/"+galleryhead;
				var fulltitle="VIRTUAL-klein-"+galleryhead;
				ga('send', 'pageview', {'page': fullpage, 'title': fulltitle});
				iom.c(iam_data,1);
				TFT.Core.Statistics.count(['Webtrekk']);
			},
			pagerClick: function() {
				var str = $("#tab-1 .fotos-gallery .gallery_caption").text();
				if (str.length > 60){galleryhead = str.substr(0, 60)+'...';} else {galleryhead = str;}
				var fullpage="/VIRTUAL/klein/"+galleryhead;
				var fulltitle="VIRTUAL-klein-"+galleryhead;
				ga('send', 'pageview', {'page': fullpage, 'title': fulltitle});
				iom.c(iam_data,1);
				TFT.Core.Statistics.count(['Webtrekk']);
			}
		});
	},
	initImageGallery2: function(){
		var currenturl = document.URL;
		$("#tab-3 .fotos-gallery .view").cycle({
			fx			:	"fade",
			prev 		:	".items-navig .btn-prev",
			next 		: 	".items-navig .btn-next",
			timeout		: 	0, 
			before		:	function() {
				var creditText = $(this).children('a img').attr("data-credit"),
					creditString = "";
				
				if (creditText !== "") {
					creditString = '<div class="credit">&copy;&nbsp;'+creditText+'</div>';
				}
				
				$(this).children("a span.zoom").show();
				$("#tab-3 .gallery_caption").html($(this).attr("title")+creditString).hide().fadeIn("slow");	
			},
			after 		: function(){

				$("#tab-3 .fotos-gallery .view").height("296px");
				$("#tab-3 .fotos-gallery .view").height($("#tab-3 .fotos-gallery .view img:visible").height());				
				$("#tab-3 .fotos-gallery .view-list img").css("opacity", "1");
				
				try {													
					var active_id=parseInt($("#tab-3 .fotos-gallery .view img:visible").attr("class").replace(/foto-/g, ""), 10);

					// set opacity 1 to other elements
					$("#tab-3 .fotos-gallery .view-list img.foto-"+active_id).css("opacity", "0.5");
					
					if(active_id>1 && active_id<($("#bSlidernav li").size()+2)) {
					
						if(active_id>$("#bSlidernav li").size()+2) {
							active_id=$("#bSlidernav li").size()+2;
						}
						else {
							active_id-=2;
						}
						$("#view-list-holder #bSlidernav").animate({ 
							marginLeft: "-"+active_id*83+"px"
						}, 500);
					}
					else { 
						$("#view-list-holder #bSlidernav").animate({ 
							marginLeft: "0px"
						}, 500);
					}
					
				} catch (e) {
				}
			},
			pager:  "#bSlidernav", 
			pagerAnchorBuilder: function(idx, slide) { 
		        // return selector string for existing anchor 
		        return "ul.#bSlidernav li:eq(" + (idx) + ") a"; 
		    },
		    pagerClick: function() {
		    	TFT.Core.Statistics.count(['Webtrekk']);
				var str = $("#tab-3 .fotos-gallery .gallery_caption").text();
				if (str.length > 60){galleryhead = str.substr(0, 60)+'...';} else {galleryhead = str;}
				var fullpage="/VIRTUAL/klein/"+galleryhead;
				var fulltitle="VIRTUAL-klein-"+galleryhead;
				ga('send', 'pageview', {'page': fullpage, 'title': fulltitle});
				iom.c(iam_data,1);
		    }
		});		
	},
	
	initVideoGallery: function(){
		var currenturl = document.URL;
		$("#tab-4 .fotos-gallery .view-list img").css("opacity", "0.5");
		$("#tab-4 .fotos-gallery .view-list img:first").css("opacity", "1");
		
		
		
		$("#tab-4 .fotos-gallery #cSlidernav a").bind('click', function(oEvent) {
			
			oEvent.preventDefault();
			
			$("#tab-4 .gallery_caption").html($("img", this).attr("title")).hide().fadeIn("slow");
			
			$("#tab-4 .fotos-gallery .view-list img").css("opacity", "0.5");
			$("img", this).css("opacity", "1");
			
			TFT.Core.Statistics.count(['Webtrekk']);
			var str = $("#node-page .content-box strong").text();
			if (str.length > 60){galleryhead = str.substr(0, 60)+'...';} else {galleryhead = str;}
			var fullpage="/VIRTUAL/Video/"+galleryhead;
			var videotitle="VIRTUAL-Video-"+galleryhead;
			ga('send', 'pageview', {'page': fullpage, 'title': videotitle});
			iom.c(iam_data,1);
			$f('player').setClip($("img", this).attr("playerurl"));
			$f('player').play();
			 
		});

	},
	
	
	/**
	* Hides / Shows given elements
	* @alias TFT.Ext.Haus.Hausideen.toggleElements
	* @param {String} sElementSelectorShow
	* @param {String} sElementSelectorHide
	*/
	toggleElements: function(sElementSelectorShow, sElementSelectorHide){
		$(sElementSelectorHide).hide();
		$(sElementSelectorShow).show();
	}
};


/* ************************
* _shared/scripts/tft/ext/haus/user.js
*/

// $Id: user.js 23804 2010-08-26 12:46:56Z blachmuth $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, TFT */
TFT.Core.Modules.addModule('$Id: user.js 23804 2010-08-26 12:46:56Z blachmuth $');

/**
* Base User object
* @constructor (note: a constructor for JsDoc purposes)
*/
TFT.Ext.Haus.User = {
	
	/**
	* Validate the user register form
	* @alias TFT.Ext.Haus.User.validateRegister
	* @param
	*/
	validateRegister: function(){		
		$("#user-register").validate({
			errorLabelContainer: "#messageBox",
			wrapper: "li",
			rules: {
			  name: {required:true, minlength:4, maxlength:16},
			  profile_firstname: {required:true, minlength:3},
			  profile_surname: {required:true, minlength:3},
			  mail: {required:true, email:true},
			  my_pass: {required:true, minlength:6},
			  my_pass_confirm: {required:true, minlength:6, equalTo:"#edit-my-pass-confirm"},
			  terms_of_use: "required",
			  captcha_response: "required"
			},
			messages: {
				name: {
				  required: "Bitte geben Sie einen Benutzernamen ein.",
				  minlength: "Ihr Benutzername muss mindestens 4 Zeichen lang sein.",
				  maxlength: "Ihr Benutzername darf h&ouml;chstens 16 Zeichen lang sein."
				},
				profile_firstname: {
					required: "Bitte geben Sie Ihren Vornamen ein.",
					minlength: "Ihr Vorname muss mindestens 3 Zeichen lang sein."
				},
				profile_surname: {
					required: "Bitte geben Sie Ihren Namen ein.",
					minlength: "Ihr Name muss mindestens 3 Zeichen lang sein."
				},
				mail: {
				  required: "Bitte geben Sie Ihre E-Mail-Adresse ein.",
				  email: "Bitte geben Sie eine g&uuml;ltige E-Mail-Adresse ein."
					},
				my_pass: {
			    required: "Bitte geben Sie ein Kennwort ein.",
			    minlength: "Ihr Kennwort muss mindestens 6 Zeichen lang sein."
			  },
			  my_pass_confirm: {
		      required: "Bitte wiederholen Sie Ihr Kennwort.",
		      minlength: "Ihr Kennwort muss mindestens 6 Zeichen lang sein.",
		      equalTo: "Ihr Kennwort stimmt nicht &uuml;berein."
		    },
		    terms_of_use: "Bitte akzeptieren Sie unsere Informationen zum Datenschutz.",
		    captcha_response: "Bitte &uuml;bertragen Sie den Sicherheits Code."
			}				
		});
	},
	
	/**
	* Validate the user profile form
	* @alias TFT.Ext.Haus.User.validateProfile
	* @param {String} formID
	* @param {String} part of form
	*/
	validateProfile: function(formID, formPart){
		TFT.Core.Console.log('TFT.Ext.Haus.User.validateProfile','formID: '+formID,'formPart: '+formPart);
		var sFirstname = $('#'+formID+' #edit-profile-firstname').val(),
			sSurname = $('#'+formID+' #edit-profile-surname').val(),
			sMail = $('#'+formID+' #edit-mail').val(),
			errorMsg0,
			errorMsg1,
			errorMsg2,
			error = false;
	
		if(formPart === "name") {		
			if(sFirstname === "") {
				errorMsg0 = "Bitte geben Sie Ihren Vornamen an.";
				error = true;
			}
			else if(sFirstname.length < 3) {
				errorMsg0 = "Ihr Vorname muss mindestens 3 Zeichen lang sein.";
				error = true;
			}
			
			if(sSurname === "") {
				errorMsg1 = "Bitte geben Sie Ihren Namen an.";
				error = true;
			}
			else if(sSurname.length < 3) {
				errorMsg1 = "Ihr Name muss mindestens 3 Zeichen lang sein.";
				error = true;
			}
		
		}
		
		if(formPart === "mail") {
			if(sMail === "") {
				errorMsg2 = "Bitte geben Sie Ihre E-Mail-Adresse an.";
				error = true;
			}
		}

		if (error) {
			$('#'+formID+' div.errorMessage').show();
			$('#'+formID+' div.errorMessage ul').show();
			if (errorMsg0) {
				$('#'+formID+' div.errorMessage ul li').html(errorMsg0);
				$('#edit-profile-firstname').focus();
			}
			else if (errorMsg1) {
				$('#'+formID+' div.errorMessage ul li').html(errorMsg1);
				$('#edit-profile-surname').focus();
			}
			else if (errorMsg2) {
				$('#'+formID+' div.errorMessage ul li').html(errorMsg2);
				$('#edit-mail').focus();
			}
		}
		else {
			TFT.Ext.Haus.User.submitProfile(formID);
		}
	},
	
	/**
	* Validate the user password
	* @alias TFT.Ext.Haus.User.validatePass
	* @param {String} formID
	* @param {Integer} uid
	*/
	validatePass: function(formID, uid){
		TFT.Core.Console.log('TFT.Ext.Haus.User.validatePass','formID: '+formID,'uid: '+uid);
		var sPass0 = $('#'+formID+' #edit-pass-change-pass').val(),
			sPass1 = $('#'+formID+' #edit-pass-pass1').val(),
			sPass2 = $('#'+formID+' #edit-pass-pass2').val(),
			errorMsg0,
			errorMsg1,
			errorMsg2;

		if(sPass0 === "") {
			errorMsg0 = "Bitte geben Sie Ihr aktuelles Kennwort an.";
		}
		else if(sPass0.length < 6) {
			errorMsg0 = "Ihr aktuelles Kennwort muss mindestens 6 Zeichen enthalten.";
		}

		if(sPass1 === "") {
			errorMsg1 = "Bitte geben Sie Ihr neues Kennwort an.";
		}
		else if(sPass1.length < 6) {
			errorMsg1 = "Ihr neues Kennwort muss mindestens 6 Zeichen enthalten.";
		}

		if(sPass1 === "") {
			errorMsg2 = "Bitte wiederholen Sie Ihr neues Kennwort.";
		}
		else if(sPass1 !== sPass2) {
			errorMsg2 = "Ihre Kennw&ouml;rter stimmen nicht &uuml;berein.";
		}

		if (errorMsg0 || errorMsg1 || errorMsg2) {
			$('#'+formID+' div.errorMessage').show();
			$('#'+formID+' div.errorMessage ul').show();
			if (errorMsg0) {
				$('#'+formID+' div.errorMessage ul li').html(errorMsg0);
				$('#edit-pass-change-pass').focus();
			}
			else if (errorMsg1) {
				$('#'+formID+' div.errorMessage ul li').html(errorMsg1);
				$('#edit-pass-pass1').focus();
			}
			else if (errorMsg2) {
				$('#'+formID+' div.errorMessage ul li').html(errorMsg2);
				$('#edit-pass-pass2').focus();
			}
		}
		else {
			$.post('/haus/ajax/account/pass/change/', {
				uid: uid,
				sPass: sPass0
				}, function(oReturn){
					TFT.Core.Console.log('TFT.Ext.Haus.User.validatePass','oReturn.status: '+oReturn.status+' | oReturn.message: '+oReturn.message);

					if (oReturn.status) {
						$('#'+formID).submit();
					}
					else {
						$('#'+formID+' div.errorMessage').show();
						$('#'+formID+' div.errorMessage ul').show();
						$('#'+formID+' div.errorMessage ul li').html(oReturn.message);
						
						$('#'+formID+' #edit-pass-pass1').val('');
						$('#'+formID+' #edit-pass-pass2').val('');
					}
			}, "json");
		}
	},
	
	/**
	* Validate the user delete form
	* @alias TFT.Ext.Haus.User.validateDelete
	* @param {String} formID
	* @param {Integer} uid
	*/
	validateDelete: function(formID,uid){
		TFT.Core.Console.log('TFT.Ext.Haus.User.validateDelete','formID: '+formID);

		var sPass = $('#'+formID+' #edit-pass-delete-account').val(),
			errorMsg = "";

		if(sPass === "") {
			errorMsg = "Bitte geben Sie Ihr Kennwort an.";
		}
		else if(sPass.length < 6) {
			errorMsg = "Ihr Kennwort muss mindestens 6 Zeichen enthalten.";
		}

		if(errorMsg) {
			$('#'+formID+' div.errorMessage').show();
			$('#'+formID+' div.errorMessage ul').show();
			$('#'+formID+' div.errorMessage ul li').html(errorMsg);
			$('#edit-pass-delete-account').focus();
		}
		else {
			$('#'+formID+' div.errorMessage').hide();
			$('#'+formID+' div.errorMessage ul').hide();
			$('#'+formID+' div.errorMessage ul').html();
			TFT.Ext.Haus.User.submitDelete(formID, uid, sPass);
		}
	},
	
	
	/**
	* Submit the user delete form
	* @alias TFT.Ext.Haus.User.submitDelete
	* @param {String} formID
	* @param {Integer} uid
	* @param {String} sPass
	*/
	submitDelete: function (formID, uid, sPass) {
		TFT.Core.Console.log('TFT.Ext.Haus.User.submitDelete','formID: '+formID+' | uid: '+uid+' | sPass: '+sPass);

		$.post('/haus/ajax/account/delete/',
			{uid: uid, sPass: sPass},
			function(oReturn){
				TFT.Core.Console.log('TFT.Ext.Haus.User.submitDelete','oReturn.status: '+oReturn.status+' | oReturn.message: '+oReturn.message);

				if (oReturn.status) {
					document.location.href = '/';
				}
				else {
					$('#'+formID+' div.errorMessage').show();
					$('#'+formID+' div.errorMessage ul').show();
					$('#'+formID+' div.errorMessage ul li').html(oReturn.message);
				}
			},
			"json"
		);
	},
	
	
	/**
	* Submit the user profile
	* @alias TFT.Ext.Haus.User.submitProfile
	* @param {String} formID
	*/
	submitProfile: function(formID){
		$('#'+formID).submit();
	}
};


/* ************************
* _shared/scripts/global.js
*/

var fotocredits = '';

/* ************************
* _shared/scripts/stats.js
*/

// $Id: stats.js 8515 2009-09-08 12:28:20Z bkonetzny $
// JSLint settings:
/*jslint browser: true, cap: false, eqeqeq: true, evil: true, laxbreak: true, onevar: true */
/*global $, TFT, Drupal */

var iRandomToken = new Date().getTime(),
	sReferer = 'noref',
	refreshIvwPixel;

if(window.document.referrer){
	sReferer = window.document.referrer;
	sReferer = sReferer.replace(/\"/g, "");
	sReferer = sReferer.replace(/\'/g, "");
	sReferer = sReferer.replace(/</g, "");
	sReferer = sReferer.replace(/>/g, "");
}

sReferer = sReferer.replace(/\//g, '%2F');

refreshIvwPixel = function(){
	var sSrc = $('#ivwpx1').attr('src');
	sSrc += '&ra=' + Math.random();
	
	$('#ivwpx1').attr('src', sSrc);
};

/* ************************
* _shared/scripts/ads.js
*/

var adsc_ressort = '';
var adsc_rubrik = '';
var adsc_agof = '';

var adsc_string1 = 'str1';
var adsc_string2 = 'str2';
var adsc_string3 = 'str3';

var adsc_jssadwidth = 728;
var adsc_jssadheight = 90;
var adsc_jssadpercent = 100;

var adsc_jscadwidth = 300;
var adsc_jscadheight = 250;
var adsc_jscadpercent = 100;

var adsc_jsskyscraperwidth = 1;
var adsc_jsskyscraperheight = 1;
var adsc_jsskyscraperpercent = 100;

var adsc_sb = 100;
var adsc_sk = 100;
var adsc_mr = 100;

/* ************************
* haus/js/jquery-ui-1.7.3.custom.min.js
*/

/*
 * jQuery UI 1.7.3
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 */
jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.3",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,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}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(j,k){return this.each(function(){if(!k){if(!j||c.filter(j,[this]).length){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")})}}return i.call(c(this),j,k)})},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*
 * jQuery UI Tabs 1.7.3
 *
 * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Tabs
 *
 * Depends:
 *	ui.core.js
 */
(function(c){var b=0,a=0;c.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(d,e){if(d=="selected"){if(this.options.collapsible&&e==this.options.selected){return}this.select(e)}else{this.options[d]=e;if(d=="deselectable"){this.options.collapsible=e}this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+(++b)},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+(++a));return c.cookie.apply(null,[d].concat(c.makeArray(arguments)))},_ui:function(e,d){return{tab:e,panel:d,index:this.anchors.index(e)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=c(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(q){this.list=this.element.children("ul:first");this.lis=c("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return c("a",this)[0]});this.panels=c([]);var r=this,f=this.options;var e=/^#.+/;this.anchors.each(function(u,o){var s=c(o).attr("href");var v=s.split("#")[0],w;if(v&&(v===location.toString().split("#")[0]||(w=c("base")[0])&&v===w.href)){s=o.hash;o.href=s}if(e.test(s)){r.panels=r.panels.add(r._sanitizeSelector(s))}else{if(s!="#"){c.data(o,"href.tabs",s);c.data(o,"load.tabs",s.replace(/#.*$/,""));var y=r._tabId(o);o.href="#"+y;var x=c("#"+y);if(!x.length){x=c(f.panelTemplate).attr("id",y).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(r.panels[u-1]||r.list);x.data("destroy.tabs",true)}r.panels=r.panels.add(x)}else{f.disabled.push(u)}}});if(q){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(f.selected===undefined){if(location.hash){this.anchors.each(function(s,o){if(o.hash==location.hash){f.selected=s;return false}})}if(typeof f.selected!="number"&&f.cookie){f.selected=parseInt(r._cookie(),10)}if(typeof f.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){f.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}f.selected=f.selected||0}else{if(f.selected===null){f.selected=-1}}f.selected=((f.selected>=0&&this.anchors[f.selected])||f.selected<0)?f.selected:0;f.disabled=c.unique(f.disabled.concat(c.map(this.lis.filter(".ui-state-disabled"),function(s,o){return r.lis.index(s)}))).sort();if(c.inArray(f.selected,f.disabled)!=-1){f.disabled.splice(c.inArray(f.selected,f.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(f.selected>=0&&this.anchors.length){this.panels.eq(f.selected).removeClass("ui-tabs-hide");this.lis.eq(f.selected).addClass("ui-tabs-selected ui-state-active");r.element.queue("tabs",function(){r._trigger("show",null,r._ui(r.anchors[f.selected],r.panels[f.selected]))});this.load(f.selected)}c(window).bind("unload",function(){r.lis.add(r.anchors).unbind(".tabs");r.lis=r.anchors=r.panels=null})}else{f.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[f.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(f.cookie){this._cookie(f.selected,f.cookie)}for(var j=0,p;(p=this.lis[j]);j++){c(p)[c.inArray(j,f.disabled)!=-1&&!c(p).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(f.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(f.event!="mouseover"){var h=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var l=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){h("hover",c(this))});this.lis.bind("mouseout.tabs",function(){l("hover",c(this))});this.anchors.bind("focus.tabs",function(){h("focus",c(this).closest("li"))});this.anchors.bind("blur.tabs",function(){l("focus",c(this).closest("li"))})}var d,k;if(f.fx){if(c.isArray(f.fx)){d=f.fx[0];k=f.fx[1]}else{d=k=f.fx}}function g(i,o){i.css({display:""});if(c.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var m=k?function(i,o){c(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(k,k.duration||"normal",function(){g(o,k);r._trigger("show",null,r._ui(i,o[0]))})}:function(i,o){c(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");r._trigger("show",null,r._ui(i,o[0]))};var n=d?function(o,i){i.animate(d,d.duration||"normal",function(){r.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");g(i,d);r.element.dequeue("tabs")})}:function(o,i,s){r.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");r.element.dequeue("tabs")};this.anchors.bind(f.event+".tabs",function(){var o=this,u=c(this).closest("li"),i=r.panels.filter(":not(.ui-tabs-hide)"),s=c(r._sanitizeSelector(this.hash));if((u.hasClass("ui-tabs-selected")&&!f.collapsible)||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||r._trigger("select",null,r._ui(this,s[0]))===false){this.blur();return false}f.selected=r.anchors.index(this);r.abort();if(f.collapsible){if(u.hasClass("ui-tabs-selected")){f.selected=-1;if(f.cookie){r._cookie(f.selected,f.cookie)}r.element.queue("tabs",function(){n(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(f.cookie){r._cookie(f.selected,f.cookie)}r.element.queue("tabs",function(){m(o,s)});r.load(r.anchors.index(this));this.blur();return false}}}if(f.cookie){r._cookie(f.selected,f.cookie)}if(s.length){if(i.length){r.element.queue("tabs",function(){n(o,i)})}r.element.queue("tabs",function(){m(o,s)});r.load(r.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(c.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},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 e=c.data(this,"href.tabs");if(e){this.href=e}var f=c(this).unbind(".tabs");c.each(["href","load","cache"],function(g,h){f.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(c.data(this,"destroy.tabs")){c(this).remove()}else{c(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"].join(" "))}});if(d.cookie){this._cookie(null,d.cookie)}},add:function(g,f,e){if(e===undefined){e=this.anchors.length}var d=this,i=this.options,k=c(i.tabTemplate.replace(/#\{href\}/g,g).replace(/#\{label\}/g,f)),j=!g.indexOf("#")?g.replace("#",""):this._tabId(c("a",k)[0]);k.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var h=c("#"+j);if(!h.length){h=c(i.panelTemplate).attr("id",j).data("destroy.tabs",true)}h.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(e>=this.lis.length){k.appendTo(this.list);h.appendTo(this.list[0].parentNode)}else{k.insertBefore(this.lis[e]);h.insertBefore(this.panels[e])}i.disabled=c.map(i.disabled,function(m,l){return m>=e?++m:m});this._tabify();if(this.anchors.length==1){k.addClass("ui-tabs-selected ui-state-active");h.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[0],d.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[e],this.panels[e]))},remove:function(d){var f=this.options,g=this.lis.eq(d).remove(),e=this.panels.eq(d).remove();if(g.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(d+(d+1<this.anchors.length?1:-1))}f.disabled=c.map(c.grep(f.disabled,function(j,h){return j!=d}),function(j,h){return j>=d?--j:j});this._tabify();this._trigger("remove",null,this._ui(g.find("a")[0],e[0]))},enable:function(d){var e=this.options;if(c.inArray(d,e.disabled)==-1){return}this.lis.eq(d).removeClass("ui-state-disabled");e.disabled=c.grep(e.disabled,function(g,f){return g!=d});this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]))},disable:function(e){var d=this,f=this.options;if(e!=f.selected){this.lis.eq(e).addClass("ui-state-disabled");f.disabled.push(e);f.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[e],this.panels[e]))}},select:function(d){if(typeof d=="string"){d=this.anchors.index(this.anchors.filter("[href$="+d+"]"))}else{if(d===null){d=-1}}if(d==-1&&this.options.collapsible){d=this.options.selected}this.anchors.eq(d).trigger(this.options.event+".tabs")},load:function(g){var e=this,i=this.options,d=this.anchors.eq(g)[0],f=c.data(d,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&c.data(d,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(g).addClass("ui-state-processing");if(i.spinner){var h=c("span",d);h.data("label.tabs",h.html()).html(i.spinner)}this.xhr=c.ajax(c.extend({},i.ajaxOptions,{url:f,success:function(k,j){c(e._sanitizeSelector(d.hash)).html(k);e._cleanup();if(i.cache){c.data(d,"cache.tabs",true)}e._trigger("load",null,e._ui(e.anchors[g],e.panels[g]));try{i.ajaxOptions.success(k,j)}catch(l){}e.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(e,d){this.anchors.eq(e).removeData("cache.tabs").data("load.tabs",d)},length:function(){return this.anchors.length}});c.extend(c.ui.tabs,{version:"1.7.3",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});c.extend(c.ui.tabs.prototype,{rotation:null,rotate:function(f,h){var d=this,i=this.options;var e=d._rotate||(d._rotate=function(j){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var k=i.selected;d.select(++k<d.anchors.length?k:0)},f);if(j){j.stopPropagation()}});var g=d._unrotate||(d._unrotate=!h?function(j){if(j.clientX){d.rotate(null)}}:function(j){t=i.selected;e()});if(f){this.element.bind("tabsshow",e);this.anchors.bind(i.event+".tabs",g);e()}else{clearTimeout(d.rotation);this.element.unbind("tabsshow",e);this.anchors.unbind(i.event+".tabs",g);delete this._rotate;delete this._unrotate}}})})(jQuery);;

/* ************************
* haus/js/jquery.main.js
*/

jQuery.fn.gallSlideBig = function(_options) {
  // defaults options
  var _options = jQuery.extend({
    duration : 700,
    autoSlide : 5000
  }, _options);

  return this.each(function() {
    var _hold = $(this);
    var _speed = _options.duration;
    var _timer = _options.autoSlide;
    var _wrap = _hold.find('ul');
    var _el = _hold.find('ul > li');
    var _count = _el.index(_el.filter(':last'));
    var _wSmall = 144;
    var _hSmall = 156;
    var _wBig = 468;
    var _hBig = 296;
    var _mass = [ 0, 0, 162, 324 ];
    var _active = 0;
    _el.each(function() {
      var _this = $(this);
      var _act = _el.index($(this));
      if (_act != 0) {
        _this.css({
          width : _wSmall,
          height : _hSmall,
          overflow : 'hidden',
          position : 'absolute',
          left : _mass[_act],
          top : 316,
          padding : 0
        });
        _this.find('img').css({
          'float' : 'none',
          width : _wSmall,
          height : 91
        });
        _this.find('div.text-box').css({
          'float' : 'none',
          width : _wSmall
        });
        _this.find('div.text-box > p').css({
          width : 400
        }).hide();
      }
      else {
        _this.css({
          width : _wBig,
          height : _hBig,
          position : 'absolute',
          overflow : 'hidden',
          left : 0,
          top : 0,
          padding : 0
        });
        _this.find('img').css({
          'float' : 'none',
          width : _wBig,
          height : _hBig
        });
        _this.find('div.text-box').css({
          'float' : 'none',
          width : 400
        }).addClass('img-text');
        _this.find('div.text-box > p').css({
          width : 400
        });
      }
    });
    function slideEl() {
      _el.each(function() {
        var _this = $(this);
        var _act = _el.index($(this));
        if (_act != _active) {
          _this.animate({
            width : _wSmall,
            height : _hSmall,
            left : _mass[_act],
            top : 316
          }, _speed);
          _this.find('img').animate({
            width : _wSmall,
            height : 91
          }, _speed);
          _this.find('div.text-box').animate({
            width : _wSmall
          }, _speed).removeClass('img-text');
          _this.find('div.text-box > p').hide();
        }
        else {
          _this.animate({
            width : _wBig,
            height : _hBig,
            left : 0,
            top : 0
          }, _speed);
          _this.find('img').animate({
            width : _wBig,
            height : _hBig
          }, _speed);
          _this.find('div.text-box').animate({
            width : 400
          }, _speed * 1.1).addClass('img-text');
          _this.find('div.text-box > p').show();
        }
      });
    }
    _time = setInterval(function() {
      _active++;
      if (_active > 3)
        _active = 0;
      _mass.unshift(_mass.pop());
      slideEl();
    }, _timer);
  });
};

function addLinks() {
  $(".add-links-box a").bigTarget({
    hoverClass : 'add-links-box-over', // CSS class applied to the click zone
                                        // onHover
    clickZone : 'div.add-links-box' // jQuery parent selector
  });
}

function addLinksQuartett() {
  $(".add-links-box a").bigTarget({
    hoverClass : 'add-links-box-over', // CSS class applied to the click zone
                                        // onHover
    clickZone : 'li.add-links-box' // jQuery parent selector
  });
}

function initSteps() {
  $("input").placeholder();
  $('#mini-panel-mp_im_parkett_teaserliste .panel-pane .product-post:last')
      .css("marginBottom", "0px");
  $('#edit-pass-wrapper .password-description').css({
    visibility : "hidden",
    height : "0px",
    margin : "0px",
    padding : "0px"
  });
  $('div.tabs-wrap > div.tab-holder').each(
      function() {
        var hold = $(this);
        var weiter = hold.find('input.weiter');
        var zurukg = hold.find('input.zurukg');
        var de = $('div.tab-heading > ul.tabs > li');
        var de2 = $('div.tabs-wrap > ul.tabs > li > a');
        var act = 0;
        _last2 = act;
        var ter = de.index(de.filter('.active:eq(0)'));

        de.click(function() {
          act = de.index($(this));
          ter = de.index(de.filter('.active:eq(0)'));
          if (_last2 != act) {
            var _errorClass = 'error';
            var _regEmail = /^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,4}$/;
            var _form = $(de.eq(ter).find('> a').attr('href')).find(
                'form.validate-form');
            function checkFields() {

              var _flag = false;
              _form.find('.' + _errorClass).removeClass(_errorClass);

              // fields validation
              _form.find('input.required-email').each(function() {
                if (!_regEmail.test($(this).val()))
                  addError($(this));
              });
              _form.find('input.required, textarea.required').each(
                  function() {
                    if (!$(this).val().length
                        || $(this).val() == $(this).attr('title'))
                      addError($(this));
                  });
              _form.find('div.checkbox-required').each(function() {
                var wrap = $(this).find('input:checkbox');
                var _flag2 = true;
                wrap.each(function() {
                  if ($(this).is(':checked'))
                    _flag2 = false;
                });
                if (_flag2)
                  addError($(this));
              });

              // error class adding
              function addError(_obj) {
                _obj.parent().addClass(_errorClass);
                _flag = true;
              }
              return _flag;
            }

            if (!checkFields()) {
              _last2 = act;
              de2.eq(act).trigger('click');
              de.removeClass('active').eq(act).addClass('active');
            }
          }
          return false;
        });
        weiter.click(function() {
          var _active = de.index(de.filter('.active:eq(0)'));
          var _errorClass = 'error';
          var _regEmail = /^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,4}$/;
          var _form = hold.find('form.validate-form');
          function checkFields() {

            var _flag = false;
            _form.find('.' + _errorClass).removeClass(_errorClass);

            // fields validation
            _form.find('input.required-email').each(function() {
              if (!_regEmail.test($(this).val()))
                addError($(this));
            });
            _form.find('input.required, textarea.required').each(
                function() {
                  if (!$(this).val().length
                      || $(this).val() == $(this).attr('title'))
                    addError($(this));
                });
            _form.find('div.checkbox-required').each(function() {
              var wrap = $(this).find('input:checkbox');
              var _flag2 = true;
              wrap.each(function() {
                if ($(this).is(':checked'))
                  _flag2 = false;
              });
              if (_flag2)
                addError($(this));
            });

            // error class adding
            function addError(_obj) {
              _obj.parent().addClass(_errorClass);
              _flag = true;
            }
            return _flag;
          }

          if (!checkFields())
            de.eq(_active + 1).find('>a').trigger('click');
          return false;
        });
        zurukg.click(function() {
          var _active = de.index(de.filter('.active:eq(0)'));
          var _errorClass = 'error';
          var _regEmail = /^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,4}$/;
          var _form = hold.find('form.validate-form');
          function checkFields() {

            var _flag = false;
            _form.find('.' + _errorClass).removeClass(_errorClass);

            // fields validation
            _form.find('input.required-email').each(function() {
              if (!_regEmail.test($(this).val()))
                addError($(this));
            });
            _form.find('input.required, textarea.required').each(
                function() {
                  if (!$(this).val().length
                      || $(this).val() == $(this).attr('title'))
                    addError($(this));
                });
            _form.find('div.scrollable').each(function() {
              var wrap = $(this).find('input:checkbox');
              var _flag2 = true;
              wrap.each(function() {
                if ($(this).is(':checked'))
                  _flag2 = false;
              });
              if (_flag2)
                addError($(this));
            });

            // error class adding
            function addError(_obj) {
              _obj.parent().addClass(_errorClass);
              _flag = true;
            }
            return _flag;
          }
          if (!checkFields())
            de.eq(_active - 1).find('>a').trigger('click');
          return false;
        });
      });
}
function clearInputs() {
  $('input:text, input:password, textarea').each(function() {
    var _el = $(this);
    var _val = _el.val();
    _el.bind('focus', function() {
      if (this.value == _val)
        this.value = '';
    }).bind('blur', function() {
      if (this.value == '')
        this.value = _val;
    });
  });
}

function initSelectConteiner() {
  $('div.select-conteiner > div.row > div.ov-holder > div.cols').each(
      function() {
        var hold = $(this);
        var link = hold.find('a.open-drop');
        var box = hold.find('> div.block-holder');
        var h = box.outerHeight(true);

        box.css({
          height : 0
        });
        link.addClass('close');
        link.click(function() {
          if (link.hasClass('close')) {
            hold.addClass('opened');
            link.removeClass('close');
            box.animate({
              height : h
            }, {
              queue : false,
              duration : 300
            });

          }
          else {
            hold.removeClass('opened');
            link.addClass('close');
            box.animate({
              height : 0
            }, {
              queue : false,
              duration : 300
            });

          }
          return false;
        });
      });
}

function removeEmptyBoxes(oElement) {
  if (parseFloat(oElement.css('height')) < 10) {
    oElement.hide();
  }
}

function enlargeLeftCol(leftcol, rightcol) {
  var hLeft = parseFloat(leftcol.css('height'));
  var hRight = parseFloat(rightcol.css('height'));

  if (hLeft < hRight) {
    leftcol.css('height', hRight + 'px');
    leftcol.css('background-color', '#fff');
  }
}

$(document).ready(
    function() {
      // competition form to collect the radio buttons that clicked
      showValues = function() {
        var fields = $("#webform-client-form-13461").find(":radio")
            .serializeArray();
        $("#edit-submitted-losungssatz").empty();
        var sentence = "";
        i = 0;
        jQuery.each(fields, function(i, field) {
          if (i === 5 || i === 7 || i === 10) {
            sentence = sentence + " " + field.value;
          }
          else {
            sentence = sentence + field.value;
          }
        });
        $("#edit-submitted-losungssatz").val(sentence);
      };
      $("#webform-client-form-13461 :radio").click(showValues);

      showValues14039 = function() {
          var fields = $("#webform-client-form-14039").find(":radio")
              .serializeArray();
          $("#edit-submitted-losungssatz").empty();
          var sentence = "";
          i = 0;
          jQuery.each(fields, function(i, field) {
              sentence = sentence + field.value;
          });
          $("#edit-submitted-losungswort").val(sentence);
        };
        $("#webform-client-form-14039 :radio").click(showValues14039);

      
      // VSA_initScrollbars();
      /* clearInputs(); */

      $('div.big-gallery').gallSlideBig({
        duration : 1000,
        autoSlide : 6000
      });
      if ($('a').hasClass('lightbox'))
        $('a.lightbox').lightBox();
      removeEmptyBoxes($('#node-page .section-adsense'));
      // removeEmptyBoxes($('#node-page .section-plista'));
      addLinks();
      if ($('#homepage .big-gallery').length > 0) {
        addLinksQuartett();
      }
      $('#edit-pathauto-perform-alias').attr('checked', 'checked');
      initSteps();
      initSelectConteiner();
    });

/* ************************
* haus/js/main.js
*/

function initPopups()
{
	initPopup({
		openEvent:'click'
	});
	initPopup({
		popupHolderClass:'popup-hover'
	});
}
if (window.addEventListener)
	window.addEventListener("load", initPopups, false);
else if (window.attachEvent)
	window.attachEvent("onload", initPopups);
	
function initPopup(_popup) {
	if (!_popup.popupHolderTag) _popup.popupHolderTag = 'div';
	if (!_popup.popupTag) _popup.popupTag = 'div';
	if (!_popup.popupHolderClass) _popup.popupHolderClass = 'popup-holder';
	if (!_popup.popupClass) _popup.popupClass = 'popup';
	if (!_popup.linkOpenClass) _popup.linkOpenClass = 'open';
	if (!_popup.linkCloseClass) _popup.linkCloseClass = 'close';
	if (!_popup.openClass) _popup.openClass = 'active';
	if (!_popup.openEvent) _popup.openEvent = 'hover';
	
	var timer = [];	
	var _popupHolderTag = document.getElementsByTagName(_popup.popupHolderTag);
	if (_popupHolderTag) {
		for (var i=0; i<_popupHolderTag.length; i++) {
			if (_popupHolderTag[i].className.indexOf(_popup.popupHolderClass) != -1) {
				var _popupLink = _popupHolderTag[i].getElementsByTagName('a');
				for (var j=0; j<_popupLink.length; j++) {
					_popupLink[j].parent = _popupHolderTag[i];
					if (_popupLink[j].className.indexOf(_popup.linkOpenClass) != -1) {
						if (_popup.openEvent == 'click') {
							_popupLink[j].onclick = function(){
								if (this.parent.className.indexOf(_popup.openClass) != -1) {
									this.parent.className = this.parent.className.replace(_popup.openClass,'');
								} else {
									this.parent.className += ' '+_popup.openClass;
								}
								return false;
							}
						} else {
							var _popupTag = _popupHolderTag[i].getElementsByTagName(_popup.popupTag);
							for (var k=0; k<_popupTag.length; k++) {
								if (_popupTag[k].className.indexOf(_popup.popupClass) != -1) {
									_popupTag[k].parent = _popupHolderTag[i];
									_popupTag[k].onmouseover = function(){
										if (timer[j]) clearTimeout(timer[j]);
										if (this.parent.className.indexOf(_popup.openClass) == -1) {
											this.parent.className += ' '+_popup.openClass;
										}
									}
									_popupTag[k].onmouseout = function(){
										var _this = this;
										timer[j] = setTimeout(function(){
											_this.parent.className = _this.parent.className.replace(_popup.openClass,'');
										},2);
									}	
								}
							}
							_popupLink[j].onmouseover = function(){
								if (timer[j]) clearTimeout(timer[j]);
								if (this.parent.className.indexOf(_popup.openClass) == -1) {
									this.parent.className += ' '+_popup.openClass;
								}
							}
							_popupLink[j].onmouseout = function(){
								var _this = this;
								timer[j] = setTimeout(function(){
									_this.parent.className = _this.parent.className.replace(_popup.openClass,'');
								},2);
							}
						}
					} else if (_popupLink[j].className.indexOf(_popup.linkCloseClass) != -1) {
						_popupLink[j].onclick = function(){
							if (this.parent.className.indexOf(_popup.openClass) != -1) {
								this.parent.className = this.parent.className.replace(_popup.openClass,'');
							} else {
								this.parent.className += ' '+_popup.openClass;
							}
							return false;
						}
					}
				}
			}		
		}
	}
}
function initPage()
{
	initNav({
		menuId: "nav",
		cleverMode: true,
		hoverClass: "hover",
		flexibility: true,
		sideClasses: true,
		menuPaddings: 20,
		minWidth: 160
	});
}
function initNav(o)
{
	if (!o.menuId) o.menuId = "nav";
	if (!o.cleverMode) o.cleverMode = false;
	if (!o.flexibility) o.flexibility = false;
	if (!o.dropExistenceClass) o.dropExistenceClass = false;
	if (!o.hoverClass) o.hoverClass = "hover";
	if (!o.menuHardCodeClass) o.menuHardCodeClass = "menu-hard-code";
	if (!o.sideClasses) o.sideClasses = false;
	if (!o.center) o.center = false;
	if (!o.menuPaddings) o.menuPaddings = 0;
	if (!o.minWidth) o.minWidth = 0;
	if (!o.coeff) o.coeff = 1.7;
	var n = document.getElementById(o.menuId);
	if(n)
	{
		n.className = n.className.replace(o.menuHardCodeClass, "");
		var lfl = [];
		var li = n.getElementsByTagName("li");
		for (var i=0; i<li.length; i++)
		{
			li[i].className += (" " + o.hoverClass);
			var d = li[i].getElementsByTagName("div").item(0);
			if(d)
			{
				if(o.flexibility)
				{
					var a = d.getElementsByTagName("a");
					for (var j=0; j<a.length; j++)
					{
						var w = a[j].parentNode.parentNode.offsetWidth;
						if(w > 0)
						{
							if(typeof(o.minWidth) == "number" && w < o.minWidth)
								w = o.minWidth;
							else if(typeof(o.minWidth) == "string" && li[i].parentNode == n && w < li[i].offsetWidth)
								w = li[i].offsetWidth - 3;
							a[j].style.width = w - o.menuPaddings + "px";
						}
					}
					d.style.width = li[i].getElementsByTagName("div").item(1).clientWidth + "px";
				}
				var t = document.documentElement.clientWidth/o.coeff;
				if(li[i].parentNode != n && (!o.cleverMode || fPX(li[i]) < t))
				{
					d.style.right = "auto";
					d.style.left = li[i].parentNode.offsetWidth + "px";
					d.parentNode.className += " left-side";
				}	
				else if(li[i].parentNode != n && (o.cleverMode || fPX(li[i]) >= t))
				{
					d.style.left = "auto";
					d.style.right = li[i].parentNode.offsetWidth + "px";
					d.parentNode.className += " right-side";
				}
				else if(li[i].parentNode == n && o.cleverMode && fPX(li[i]) >= t)
				{
					li[i].className += " right-side";
				}
				if(li[i].parentNode == n && o.center)
					d.style.left = -li[i].getElementsByTagName("div").item(1).clientWidth/2 + li[i].clientWidth/2 + "px";
			}
			if(o.dropExistenceClass && li[i].getElementsByTagName("ul").length > 0)
			{
				li[i].className += (" " + o.dropExistenceClass);
				li[i].getElementsByTagName("a").item(0).className += (" " + o.dropExistenceClass + "-link");
				li[i].innerHTML += "<em class='pointer'></em>";
			}
			if(li[i].parentNode == n) lfl.push(li[i]);
		}
		if(o.sideClasses)
		{
			lfl[0].className += " first-child";
			lfl[0].getElementsByTagName("a").item(0).className += " first-child-link";
			lfl[lfl.length-1].className += " last-child";
			lfl[lfl.length-1].getElementsByTagName("a").item(0).className += " last-child-link";
		}
		for (var i=0; i<li.length; i++)
		{
			li[i].className = li[i].className.replace(o.hoverClass, "");
			li[i].onmouseover = function()
			{
				this.className += (" " + o.hoverClass);
			}
			li[i].onmouseout = function()
			{
				this.className = this.className.replace(o.hoverClass, "");
			}
		}
	}
	function fPX(a)
	{
		var b = 0;
		while (a.offsetParent) {b += a.offsetLeft; a = a.offsetParent;}
		return b;
	}
}
if (window.addEventListener)
	window.addEventListener("load", initPage, false);
else if (window.attachEvent)
	window.attachEvent("onload", initPage);



/* ************************
* haus/js/jquery.cycle.all.min.js
*/

/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://jquery.malsup.com/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version: 2.88 (08-JUN-2010)
 * Dual licensed under the MIT and GPL licenses.
 * http://jquery.malsup.com/license.html
 * Requires: jQuery v1.2.6 or later
 */
(function($){var ver="2.88";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function debug(s){if($.fn.cycle.debug){log(s);}}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length===0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){var opts=handleArguments(this,options,arg2);if(opts===false){return;}opts.updateActivePagerLink=opts.updateActivePagerLink||$.fn.cycle.updateActivePagerLink;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=opts.slideExpr?$(opts.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts2=buildOptions($cont,$slides,els,opts,o);if(opts2===false){return;}var startTime=opts2.continuous?10:getTimeout(els[opts2.currSlide],els[opts2.nextSlide],opts2,!opts2.rev);if(startTime){startTime+=(opts2.delay||0);if(startTime<10){startTime=10;}debug("first timeout: "+startTime);this.cycleTimeout=setTimeout(function(){go(els,opts2,0,(!opts2.rev&&!opts.backwards));},startTime);}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"destroy":case"stop":var opts=$(cont).data("cycle.opts");if(!opts){return false;}cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");if(options=="destroy"){destroy(opts);}return false;case"toggle":cont.cyclePause=(cont.cyclePause===1)?0:1;checkInstantResume(cont.cyclePause,arg2,cont);return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;checkInstantResume(false,arg2,cont);return false;case"prev":case"next":var opts=$(cont).data("cycle.opts");if(!opts){log('options not found, "prev/next" ignored');return false;}$.fn.cycle[options](opts);return false;default:options={fx:options};}return options;}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;function checkInstantResume(isPaused,arg2,cont){if(!isPaused&&arg2===true){var options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,(!opts.rev&&!opts.backwards));}}}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function destroy(opts){if(opts.next){$(opts.next).unbind(opts.prevNextEvent);}if(opts.prev){$(opts.prev).unbind(opts.prevNextEvent);}if(opts.pager||opts.pagerAnchorBuilder){$.each(opts.pagerAnchors||[],function(){this.unbind().remove();});}opts.pagerAnchors=null;if(opts.destroy){opts.destroy(opts);}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,(!opts.rev&&!opts.backwards));});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}else{if(opts.backwards){opts.startingSlide=els.length-1;}}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=1;opts.startingSlide=opts.randomMap[1];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z;if(opts.backwards){z=first?i<=first?els.length+(i-first):first-i:els.length-i;}else{z=first?i>=first?els.length-(i-first):first-i:els.length-i;}$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var j=0;j<els.length;j++){var $e=$(els[j]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth||e.width||$e.attr("width");}if(!h){h=e.offsetHeight||e.height||$e.attr("height");}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:($el.height()||this.offsetHeight||this.height||$el.attr("height")||0);this.cycleW=(opts.fit&&opts.width)?opts.width:($el.width()||this.offsetWidth||this.width||$el.attr("width")||0);if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingFF=($.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var loadingOp=($.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingFF||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}var buffer=opts.fx=="shuffle"?500:250;while((opts.timeout-opts.speed)<buffer){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.backwards){opts.nextSlide=opts.startingSlide==0?(els.length-1):opts.startingSlide-1;}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager||opts.pagerAnchorBuilder){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var i,tx,txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}debug("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager||opts.pagerAnchorBuilder){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){debug("manualTrump in go(), stopping active transition");$(els).stop(true,true);opts.busy=false;}if(opts.busy){debug("transition active, ignoring new tx request");return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&!opts.bounce&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}var changed=false;if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){changed=true;var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};debug("tx firing; currSlide: "+opts.currSlide+"; nextSlide: "+opts.nextSlide);opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}else{$.fn.cycle.custom(curr,next,opts,after,fwd,manual&&opts.fastOnEvent);}}}if(changed||opts.nextSlide==opts.currSlide){opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];if(opts.nextSlide==opts.currSlide){opts.nextSlide=(opts.currSlide==opts.slideCount-1)?0:opts.currSlide+1;}}else{if(opts.backwards){var roll=(opts.nextSlide-1)<0;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=1;opts.currSlide=0;}else{opts.nextSlide=roll?(els.length-1):opts.nextSlide-1;opts.currSlide=roll?0:opts.nextSlide+1;}}else{var roll=(opts.nextSlide+1)==els.length;if(roll&&opts.bounce){opts.backwards=!opts.backwards;opts.nextSlide=els.length-2;opts.currSlide=els.length-1;}else{opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}}}}if(changed&&opts.pager){opts.updateActivePagerLink(opts.pager,opts.currSlide,opts.activePagerClass);}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(els[opts.currSlide],els[opts.nextSlide],opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,(!opts.rev&&!opts.backwards));},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide,clsName){$(pager).each(function(){$(this).children().removeClass(clsName).eq(currSlide).addClass(clsName);});};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn.call(curr,curr,next,opts,fwd);while((t-opts.speed)<250){t+=opts.speed;}debug("calculated timeout: "+t+"; speed: "+opts.speed);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}var cb=opts.onPrevNextEvent||opts.prevNextClick;if($.isFunction(cb)){cb(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});opts.updateActivePagerLink(opts.pager,opts.startingSlide,opts.activePagerClass);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a;if($.isFunction(opts.pagerAnchorBuilder)){a=opts.pagerAnchorBuilder(i,el);debug("pagerAnchorBuilder("+i+", el) returned: "+a);}else{a='<a href="#">'+(i+1)+"</a>";}if(!a){return;}var $a=$(a);if($a.parents("body").length===0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone[0]);});$a=$(arr);}else{$a.appendTo($p);}}opts.pagerAnchors=opts.pagerAnchors||[];opts.pagerAnchors.push($a);$a.bind(opts.pagerEvent,function(e){e.preventDefault();opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}var cb=opts.onPagerEvent||opts.pagerClick;if($.isFunction(cb)){cb(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);});if(!/^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble){$a.bind("click.cycle",function(){return false;});}if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){debug("applying clearType background-color hack");function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,fwd,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,onPrevNextEvent:null,prevNextEvent:"click.cycle",pager:null,onPagerEvent:null,pagerEvent:"click.cycle",allowPagerClickBubble:false,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:!$.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250,activePagerClass:"activeSlide",updateActivePagerLink:null,backwards:false};})(jQuery);
/*
 * jQuery Cycle Plugin Transition Definitions
 * This script is a plugin for the jQuery Cycle Plugin
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2010 M. Alsup
 * Version:	 2.72
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
(function($){$.fn.cycle.transitions.none=function($cont,$slides,opts){opts.fxFn=function(curr,next,opts,after){$(next).show();$(curr).hide();after();};};$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var i,w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});if(!opts.speedAdjusted){opts.speed=opts.speed/2;opts.speedAdjusted=true;}opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var top=parseInt(h/2);var left=parseInt(w/2);clip="rect("+top+"px "+left+"px "+top+"px "+left+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);

/* ************************
* haus/js/jquery.placeholder-1.0.1.js
*/

/**
 * jQuery.placeholder - Placeholder plugin for input fields
 * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
 * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
 * Date: 2008/10/14
 *
 * @author Blair Mitchelmore
 * @version 1.0.1
 *
 **/
new function($) {
    $.fn.placeholder = function(settings) {
        settings = settings || {};
        var key = settings.dataKey || "placeholderValue";
        var attr = settings.attr || "placeholder";
        var className = settings.className || "placeholder";
        var values = settings.values || [];
        var block = settings.blockSubmit || false;
        var blank = settings.blankSubmit || false;
        var submit = settings.onSubmit || false;
        var value = settings.value || "";
        var position = settings.cursor_position || 0;

        
        return this.filter(":input").each(function(index) { 
            $.data(this, key, values[index] || $(this).attr(attr)); 
        }).each(function() {
            if ($.trim($(this).val()) === "")
                $(this).addClass(className).val($.data(this, key));
        }).focus(function() {
            if ($.trim($(this).val()) === $.data(this, key)) 
                $(this).removeClass(className).val(value)
                if ($.fn.setCursorPosition) {
                  $(this).setCursorPosition(position);
                }
        }).blur(function() {
            if ($.trim($(this).val()) === value)
                $(this).addClass(className).val($.data(this, key));
        }).each(function(index, elem) {
            if (block)
                new function(e) {
                    $(e.form).submit(function() {
                        return $.trim($(e).val()) != $.data(e, key)
                    });
                }(elem);
            else if (blank)
                new function(e) {
                    $(e.form).submit(function() {
                        if ($.trim($(e).val()) == $.data(e, key)) 
                            $(e).removeClass(className).val("");
                        return true;
                    });
                }(elem);
            else if (submit)
                new function(e) { $(e.form).submit(submit); }(elem);
        });
    };
}(jQuery);

/* ************************
* haus/js/jquery.validate.js
*/

/*
 * jQuery validation plug-in pre-1.5.2
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2008 Jörn Zaefferer
 *
 * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */

(function($) {

$.extend($.fn, {
	// http://docs.jquery.com/Plugins/Validation/validate
	validate: function( options ) {
		
		// if nothing is selected, return nothing; can't chain anyway
		if (!this.length) {
			options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );
			return;
		}
		
		// check if a validator for this form was already created
		var validator = $.data(this[0], 'validator');
		if ( validator ) {
			return validator;
		}
		
		validator = new $.validator( options, this[0] );
		$.data(this[0], 'validator', validator); 
		
		if ( validator.settings.onsubmit ) {
		
			// allow suppresing validation by adding a cancel class to the submit button
			this.find("input, button").filter(".cancel").click(function() {
				validator.cancelSubmit = true;
			});
		
			// validate the form on submit
			this.submit( function( event ) {
				if ( validator.settings.debug )
					// prevent form submit to be able to see console output
					event.preventDefault();
					
				function handle() {
					if ( validator.settings.submitHandler ) {
						validator.settings.submitHandler.call( validator, validator.currentForm );
						return false;
					}
					return true;
				}
					
				// prevent submit for invalid forms or custom submit handlers
				if ( validator.cancelSubmit ) {
					validator.cancelSubmit = false;
					return handle();
				}
				if ( validator.form() ) {
					if ( validator.pendingRequest ) {
						validator.formSubmitted = true;
						return false;
					}
					return handle();
				} else {
					validator.focusInvalid();
					return false;
				}
			});
		}
		
		return validator;
	},
	// http://docs.jquery.com/Plugins/Validation/valid
	valid: function() {
        if ( $(this[0]).is('form')) {
            return this.validate().form();
        } else {
            var valid = false;
            var validator = $(this[0].form).validate();
            this.each(function() {
				valid |= validator.element(this);
            });
            return valid;
        }
    },
	// attributes: space seperated list of attributes to retrieve and remove
	removeAttrs: function(attributes) {
		var result = {},
			$element = this;
		$.each(attributes.split(/\s/), function(index, value) {
			result[value] = $element.attr(value);
			$element.removeAttr(value);
		});
		return result;
	},
	// http://docs.jquery.com/Plugins/Validation/rules
	rules: function(command, argument) {
		var element = this[0];
		
		if (command) {
			var settings = $.data(element.form, 'validator').settings;
			var staticRules = settings.rules;
			var existingRules = $.validator.staticRules(element);
			switch(command) {
			case "add":
				$.extend(existingRules, $.validator.normalizeRule(argument));
				staticRules[element.name] = existingRules;
				if (argument.messages)
					settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
				break;
			case "remove":
				if (!argument) {
					delete staticRules[element.name];
					return existingRules;
				}
				var filtered = {};
				$.each(argument.split(/\s/), function(index, method) {
					filtered[method] = existingRules[method];
					delete existingRules[method];
				});
				return filtered;
			}
		}
		
		var data = $.validator.normalizeRules(
		$.extend(
			{},
			$.validator.metadataRules(element),
			$.validator.classRules(element),
			$.validator.attributeRules(element),
			$.validator.staticRules(element)
		), element);
		
		// make sure required is at front
		if (data.required) {
			var param = data.required;
			delete data.required;
			data = $.extend({required: param}, data);
		}
		
		return data;
	}
});

// Custom selectors
$.extend($.expr[":"], {
	// http://docs.jquery.com/Plugins/Validation/blank
	blank: function(a) {return !$.trim(a.value);},
	// http://docs.jquery.com/Plugins/Validation/filled
	filled: function(a) {return !!$.trim(a.value);},
	// http://docs.jquery.com/Plugins/Validation/unchecked
	unchecked: function(a) {return !a.checked;}
});


$.format = function(source, params) {
	if ( arguments.length == 1 ) 
		return function() {
			var args = $.makeArray(arguments);
			args.unshift(source);
			return $.format.apply( this, args );
		};
	if ( arguments.length > 2 && params.constructor != Array  ) {
		params = $.makeArray(arguments).slice(1);
	}
	if ( params.constructor != Array ) {
		params = [ params ];
	}
	$.each(params, function(i, n) {
		source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
	});
	return source;
};

// constructor for validator
$.validator = function( options, form ) {
	this.settings = $.extend( {}, $.validator.defaults, options );
	this.currentForm = form;
	this.init();
};

$.extend($.validator, {

	defaults: {
		messages: {},
		groups: {},
		rules: {},
		errorClass: "error",
		errorElement: "label",
		focusInvalid: true,
		errorContainer: $( [] ),
		errorLabelContainer: $( [] ),
		onsubmit: true,
		ignore: [],
		ignoreTitle: false,
		onfocusin: function(element) {
			this.lastActive = element;
				
			// hide error label and remove error class on focus if enabled
			if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
				this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass );
				this.errorsFor(element).hide();
			}
		},
		onfocusout: function(element) {
			if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
				this.element(element);
			}
		},
		onkeyup: function(element) {
			if ( element.name in this.submitted || element == this.lastElement ) {
				this.element(element);
			}
		},
		onclick: function(element) {
			if ( element.name in this.submitted )
				this.element(element);
		},
		highlight: function( element, errorClass ) {
			$( element ).addClass( errorClass );
		},
		unhighlight: function( element, errorClass ) {
			$( element ).removeClass( errorClass );
		}
	},

	// http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
	setDefaults: function(settings) {
		$.extend( $.validator.defaults, settings );
	},

	messages: {
		required: "This field is required.",
		remote: "Please fix this field.",
		email: "Please enter a valid email address.",
		url: "Please enter a valid URL.",
		date: "Please enter a valid date.",
		dateISO: "Please enter a valid date (ISO).",
		dateDE: "Bitte geben Sie ein gültiges Datum ein.",
		number: "Please enter a valid number.",
		numberDE: "Bitte geben Sie eine Nummer ein.",
		digits: "Please enter only digits",
		creditcard: "Please enter a valid credit card number.",
		equalTo: "Please enter the same value again.",
		accept: "Please enter a value with a valid extension.",
		maxlength: $.format("Please enter no more than {0} characters."),
		minlength: $.format("Please enter at least {0} characters."),
		rangelength: $.format("Please enter a value between {0} and {1} characters long."),
		range: $.format("Please enter a value between {0} and {1}."),
		max: $.format("Please enter a value less than or equal to {0}."),
		min: $.format("Please enter a value greater than or equal to {0}.")
	},
	
	autoCreateRanges: false,
	
	prototype: {
		
		init: function() {
			this.labelContainer = $(this.settings.errorLabelContainer);
			this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
			this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
			this.submitted = {};
			this.valueCache = {};
			this.pendingRequest = 0;
			this.pending = {};
			this.invalid = {};
			this.reset();
			
			var groups = (this.groups = {});
			$.each(this.settings.groups, function(key, value) {
				$.each(value.split(/\s/), function(index, name) {
					groups[name] = key;
				});
			});
			var rules = this.settings.rules;
			$.each(rules, function(key, value) {
				rules[key] = $.validator.normalizeRule(value);
			});
			
			function delegate(event) {
				var validator = $.data(this[0].form, "validator");
				validator.settings["on" + event.type] && validator.settings["on" + event.type].call(validator, this[0] );
			}
			$(this.currentForm)
				.delegate("focusin focusout keyup", ":text, :password, :file, select, textarea", delegate)
				.delegate("click", ":radio, :checkbox", delegate);

			if (this.settings.invalidHandler)
				$(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
		},

		// http://docs.jquery.com/Plugins/Validation/Validator/form
		form: function() {
			this.checkForm();
			$.extend(this.submitted, this.errorMap);
			this.invalid = $.extend({}, this.errorMap);
			if (!this.valid())
				$(this.currentForm).triggerHandler("invalid-form", [this]);
			this.showErrors();
			return this.valid();
		},
		
		checkForm: function() {
			this.prepareForm();
			for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
				this.check( elements[i] );
			}
			return this.valid(); 
		},
		
		// http://docs.jquery.com/Plugins/Validation/Validator/element
		element: function( element ) {
			element = this.clean( element );
			this.lastElement = element;
			this.prepareElement( element );
			this.currentElements = $(element);
			var result = this.check( element );
			if ( result ) {
				delete this.invalid[element.name];
			} else {
				this.invalid[element.name] = true;
			}
			if ( !this.numberOfInvalids() ) {
				// Hide error containers on last error
				this.toHide = this.toHide.add( this.containers );
			}
			this.showErrors();
			return result;
		},

		// http://docs.jquery.com/Plugins/Validation/Validator/showErrors
		showErrors: function(errors) {
			if(errors) {
				// add items to error list and map
				$.extend( this.errorMap, errors );
				this.errorList = [];
				for ( var name in errors ) {
					this.errorList.push({
						message: errors[name],
						element: this.findByName(name)[0]
					});
				}
				// remove items from success list
				this.successList = $.grep( this.successList, function(element) {
					return !(element.name in errors);
				});
			}
			this.settings.showErrors
				? this.settings.showErrors.call( this, this.errorMap, this.errorList )
				: this.defaultShowErrors();
		},
		
		// http://docs.jquery.com/Plugins/Validation/Validator/resetForm
		resetForm: function() {
			if ( $.fn.resetForm )
				$( this.currentForm ).resetForm();
			this.submitted = {};
			this.prepareForm();
			this.hideErrors();
			this.elements().removeClass( this.settings.errorClass );
		},
		
		numberOfInvalids: function() {
			return this.objectLength(this.invalid);
		},
		
		objectLength: function( obj ) {
			var count = 0;
			for ( var i in obj )
				count++;
			return count;
		},
		
		hideErrors: function() {
			this.addWrapper( this.toHide ).hide();
		},
		
		valid: function() {
			return this.size() == 0;
		},
		
		size: function() {
			return this.errorList.length;
		},
		
		focusInvalid: function() {
			if( this.settings.focusInvalid ) {
				try {
					$(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus();
				} catch(e) {
					// ignore IE throwing errors when focusing hidden elements
				}
			}
		},
		
		findLastActive: function() {
			var lastActive = this.lastActive;
			return lastActive && $.grep(this.errorList, function(n) {
				return n.element.name == lastActive.name;
			}).length == 1 && lastActive;
		},
		
		elements: function() {
			var validator = this,
				rulesCache = {};
			
			// select all valid inputs inside the form (no submit or reset buttons)
			// workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved
			return $([]).add(this.currentForm.elements)
			.filter(":input")
			.not(":submit, :reset, :image, [disabled]")
			.not( this.settings.ignore )
			.filter(function() {
				!this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);
			
				// select only the first element for each name, and only those with rules specified
				if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
					return false;
				
				rulesCache[this.name] = true;
				return true;
			});
		},
		
		clean: function( selector ) {
			return $( selector )[0];
		},
		
		errors: function() {
			return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext );
		},
		
		reset: function() {
			this.successList = [];
			this.errorList = [];
			this.errorMap = {};
			this.toShow = $([]);
			this.toHide = $([]);
			this.formSubmitted = false;
			this.currentElements = $([]);
		},
		
		prepareForm: function() {
			this.reset();
			this.toHide = this.errors().add( this.containers );
		},
		
		prepareElement: function( element ) {
			this.reset();
			this.toHide = this.errorsFor(element);
		},
	
		check: function( element ) {
			element = this.clean( element );
			
			// if radio/checkbox, validate first element in group instead
			if (this.checkable(element)) {
				element = this.findByName( element.name )[0];
			}
			
			var rules = $(element).rules();
			var dependencyMismatch = false;
			for( method in rules ) {
				var rule = { method: method, parameters: rules[method] };
				try {
					var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, rule.parameters );
					
					// if a method indicates that the field is optional and therefore valid,
					// don't mark it as valid when there are no other rules
					if ( result == "dependency-mismatch" ) {
						dependencyMismatch = true;
						continue;
					}
					dependencyMismatch = false;
					
					if ( result == "pending" ) {
						this.toHide = this.toHide.not( this.errorsFor(element) );
						return;
					}
					
					if( !result ) {
						this.formatAndAdd( element, rule );
						return false;
					}
				} catch(e) {
					this.settings.debug && window.console && console.log("exception occured when checking element " + element.id
						 + ", check the '" + rule.method + "' method");
					throw e;
				}
			}
			if (dependencyMismatch)
				return;
			if ( this.objectLength(rules) )
				this.successList.push(element);
			return true;
		},
		
		// return the custom message for the given element and validation method
		// specified in the element's "messages" metadata
		customMetaMessage: function(element, method) {
			if (!$.metadata)
				return;
			
			var meta = this.settings.meta
				? $(element).metadata()[this.settings.meta]
				: $(element).metadata();
			
			return meta && meta.messages && meta.messages[method];
		},
		
		// return the custom message for the given element name and validation method
		customMessage: function( name, method ) {
			var m = this.settings.messages[name];
			return m && (m.constructor == String
				? m
				: m[method]);
		},
		
		// return the first defined argument, allowing empty strings
		findDefined: function() {
			for(var i = 0; i < arguments.length; i++) {
				if (arguments[i] !== undefined)
					return arguments[i];
			}
			return undefined;
		},
		
		defaultMessage: function( element, method) {
			return this.findDefined(
				this.customMessage( element.name, method ),
				this.customMetaMessage( element, method ),
				// title is never undefined, so handle empty string as undefined
				!this.settings.ignoreTitle && element.title || undefined,
				$.validator.messages[method],
				"<strong>Warning: No message defined for " + element.name + "</strong>"
			);
		},
		
		formatAndAdd: function( element, rule ) {
			var message = this.defaultMessage( element, rule.method );
			if ( typeof message == "function" ) 
				message = message.call(this, rule.parameters, element);
			this.errorList.push({
				message: message,
				element: element
			});
			this.errorMap[element.name] = message;
			this.submitted[element.name] = message;
		},
		
		addWrapper: function(toToggle) {
			if ( this.settings.wrapper )
				toToggle = toToggle.add( toToggle.parents( this.settings.wrapper ) );
			return toToggle;
		},
		
		defaultShowErrors: function() {
			for ( var i = 0; this.errorList[i]; i++ ) {
				var error = this.errorList[i];
				this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass );
				this.showLabel( error.element, error.message );
			}
			if( this.errorList.length ) {
				this.toShow = this.toShow.add( this.containers );
			}
			if (this.settings.success) {
				for ( var i = 0; this.successList[i]; i++ ) {
					this.showLabel( this.successList[i] );
				}
			}
			if (this.settings.unhighlight) {
				for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {
					this.settings.unhighlight.call( this, elements[i], this.settings.errorClass );
				}
			}
			this.toHide = this.toHide.not( this.toShow );
			this.hideErrors();
			this.addWrapper( this.toShow ).show();
		},
		
		validElements: function() {
			return this.currentElements.not(this.invalidElements());
		},
		
		invalidElements: function() {
			return $(this.errorList).map(function() {
				return this.element;
			});
		},
		
		showLabel: function(element, message) {
			var label = this.errorsFor( element );
			if ( label.length ) {
				// refresh error/success class
				label.removeClass().addClass( this.settings.errorClass );
			
				// check if we have a generated label, replace the message then
				label.attr("generated") && label.html(message);
			} else {
				// create label
				label = $("<" + this.settings.errorElement + "/>")
					.attr({"for":  this.idOrName(element), generated: true})
					.addClass(this.settings.errorClass)
					.html(message || "");
				if ( this.settings.wrapper ) {
					// make sure the element is visible, even in IE
					// actually showing the wrapped element is handled elsewhere
					label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
				}
				if ( !this.labelContainer.append(label).length )
					this.settings.errorPlacement
						? this.settings.errorPlacement(label, $(element) )
						: label.insertAfter(element);
			}
			if ( !message && this.settings.success ) {
				label.text("");
				typeof this.settings.success == "string"
					? label.addClass( this.settings.success )
					: this.settings.success( label );
			}
			this.toShow = this.toShow.add(label);
		},
		
		errorsFor: function(element) {
			return this.errors().filter("[for='" + this.idOrName(element) + "']");
		},
		
		idOrName: function(element) {
			return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
		},

		checkable: function( element ) {
			return /radio|checkbox/i.test(element.type);
		},
		
		findByName: function( name ) {
			// select by name and filter by form for performance over form.find("[name=...]")
			var form = this.currentForm;
			return $(document.getElementsByName(name)).map(function(index, element) {
				return element.form == form && element.name == name && element  || null;
			});
		},
		
		getLength: function(value, element) {
			switch( element.nodeName.toLowerCase() ) {
			case 'select':
				return $("option:selected", element).length;
			case 'input':
				if( this.checkable( element) )
					return this.findByName(element.name).filter(':checked').length;
			}
			return value.length;
		},
	
		depend: function(param, element) {
			return this.dependTypes[typeof param]
				? this.dependTypes[typeof param](param, element)
				: true;
		},
	
		dependTypes: {
			"boolean": function(param, element) {
				return param;
			},
			"string": function(param, element) {
				return !!$(param, element.form).length;
			},
			"function": function(param, element) {
				return param(element);
			}
		},
		
		optional: function(element) {
			return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
		},
		
		startRequest: function(element) {
			if (!this.pending[element.name]) {
				this.pendingRequest++;
				this.pending[element.name] = true;
			}
		},
		
		stopRequest: function(element, valid) {
			this.pendingRequest--;
			// sometimes synchronization fails, make sure pendingRequest is never < 0
			if (this.pendingRequest < 0)
				this.pendingRequest = 0;
			delete this.pending[element.name];
			if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {
				$(this.currentForm).submit();
			} else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {
				$(this.currentForm).triggerHandler("invalid-form", [this]);
			}
		},
		
		previousValue: function(element) {
			return $.data(element, "previousValue") || $.data(element, "previousValue", previous = {
				old: null,
				valid: true,
				message: this.defaultMessage( element, "remote" )
			});
		}
		
	},
	
	classRuleSettings: {
		required: {required: true},
		email: {email: true},
		url: {url: true},
		date: {date: true},
		dateISO: {dateISO: true},
		dateDE: {dateDE: true},
		number: {number: true},
		numberDE: {numberDE: true},
		digits: {digits: true},
		creditcard: {creditcard: true}
	},
	
	addClassRules: function(className, rules) {
		className.constructor == String ?
			this.classRuleSettings[className] = rules :
			$.extend(this.classRuleSettings, className);
	},
	
	classRules: function(element) {
		var rules = {};
		var classes = $(element).attr('class');
		classes && $.each(classes.split(' '), function() {
			if (this in $.validator.classRuleSettings) {
				$.extend(rules, $.validator.classRuleSettings[this]);
			}
		});
		return rules;
	},
	
	attributeRules: function(element) {
		var rules = {};
		var $element = $(element);
		
		for (method in $.validator.methods) {
			var value = $element.attr(method);
			if (value) {
				rules[method] = value;
			}
		}
		
		// maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
		if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
			delete rules.maxlength;
		}
		
		return rules;
	},
	
	metadataRules: function(element) {
		if (!$.metadata) return {};
		
		var meta = $.data(element.form, 'validator').settings.meta;
		return meta ?
			$(element).metadata()[meta] :
			$(element).metadata();
	},
	
	staticRules: function(element) {
		var rules = {};
		var validator = $.data(element.form, 'validator');
		if (validator.settings.rules) {
			rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
		}
		return rules;
	},
	
	normalizeRules: function(rules, element) {
		// handle dependency check
		$.each(rules, function(prop, val) {
			// ignore rule when param is explicitly false, eg. required:false
			if (val === false) {
				delete rules[prop];
				return;
			}
			if (val.param || val.depends) {
				var keepRule = true;
				switch (typeof val.depends) {
					case "string":
						keepRule = !!$(val.depends, element.form).length;
						break;
					case "function":
						keepRule = val.depends.call(element, element);
						break;
				}
				if (keepRule) {
					rules[prop] = val.param !== undefined ? val.param : true;
				} else {
					delete rules[prop];
				}
			}
		});
		
		// evaluate parameters
		$.each(rules, function(rule, parameter) {
			rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
		});
		
		// clean number parameters
		$.each(['minlength', 'maxlength', 'min', 'max'], function() {
			if (rules[this]) {
				rules[this] = Number(rules[this]);
			}
		});
		$.each(['rangelength', 'range'], function() {
			if (rules[this]) {
				rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
			}
		});
		
		if ($.validator.autoCreateRanges) {
			// auto-create ranges
			if (rules.min && rules.max) {
				rules.range = [rules.min, rules.max];
				delete rules.min;
				delete rules.max;
			}
			if (rules.minlength && rules.maxlength) {
				rules.rangelength = [rules.minlength, rules.maxlength];
				delete rules.minlength;
				delete rules.maxlength;
			}
		}
		
		// To support custom messages in metadata ignore rule methods titled "messages"
		if (rules.messages) {
			delete rules.messages
		}
		
		return rules;
	},
	
	// Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
	normalizeRule: function(data) {
		if( typeof data == "string" ) {
			var transformed = {};
			$.each(data.split(/\s/), function() {
				transformed[this] = true;
			});
			data = transformed;
		}
		return data;
	},
	
	// http://docs.jquery.com/Plugins/Validation/Validator/addMethod
	addMethod: function(name, method, message) {
		$.validator.methods[name] = method;
		$.validator.messages[name] = message;
		if (method.length < 3) {
			$.validator.addClassRules(name, $.validator.normalizeRule(name));
		}
	},

	methods: {

		// http://docs.jquery.com/Plugins/Validation/Methods/required
		required: function(value, element, param) {
			// check if dependency is met
			if ( !this.depend(param, element) )
				return "dependency-mismatch";
			switch( element.nodeName.toLowerCase() ) {
			case 'select':
				var options = $("option:selected", element);
				return options.length > 0 && ( element.type == "select-multiple" || ($.browser.msie && !(options[0].attributes['value'].specified) ? options[0].text : options[0].value).length > 0);
			case 'input':
				if ( this.checkable(element) )
					return this.getLength(value, element) > 0;
			default:
				return $.trim(value).length > 0;
			}
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/remote
		remote: function(value, element, param) {
			if ( this.optional(element) )
				return "dependency-mismatch";
			
			var previous = this.previousValue(element);
			
			if (!this.settings.messages[element.name] )
				this.settings.messages[element.name] = {};
			this.settings.messages[element.name].remote = typeof previous.message == "function" ? previous.message(value) : previous.message;
			
			param = typeof param == "string" && {url:param} || param; 
			
			if ( previous.old !== value ) {
				previous.old = value;
				var validator = this;
				this.startRequest(element);
				var data = {};
				data[element.name] = value;
				$.ajax($.extend(true, {
					url: param,
					mode: "abort",
					port: "validate" + element.name,
					dataType: "json",
					data: data,
					success: function(response) {
						if ( response ) {
							var submitted = validator.formSubmitted;
							validator.prepareElement(element);
							validator.formSubmitted = submitted;
							validator.successList.push(element);
							validator.showErrors();
						} else {
							var errors = {};
							errors[element.name] =  response || validator.defaultMessage( element, "remote" );
							validator.showErrors(errors);
						}
						previous.valid = response;
						validator.stopRequest(element, response);
					}
				}, param));
				return "pending";
			} else if( this.pending[element.name] ) {
				return "pending";
			}
			return previous.valid;
		},

		// http://docs.jquery.com/Plugins/Validation/Methods/minlength
		minlength: function(value, element, param) {
			return this.optional(element) || this.getLength($.trim(value), element) >= param;
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/maxlength
		maxlength: function(value, element, param) {
			return this.optional(element) || this.getLength($.trim(value), element) <= param;
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/rangelength
		rangelength: function(value, element, param) {
			var length = this.getLength($.trim(value), element);
			return this.optional(element) || ( length >= param[0] && length <= param[1] );
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/min
		min: function( value, element, param ) {
			return this.optional(element) || value >= param;
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/max
		max: function( value, element, param ) {
			return this.optional(element) || value <= param;
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/range
		range: function( value, element, param ) {
			return this.optional(element) || ( value >= param[0] && value <= param[1] );
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/email
		email: function(value, element) {
			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
			return this.optional(element) || /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value);
		},
	
		// http://docs.jquery.com/Plugins/Validation/Methods/url
		url: function(value, element) {
			// contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
			return this.optional(element) || /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
		},
        
		// http://docs.jquery.com/Plugins/Validation/Methods/date
		date: function(value, element) {
			return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
		},
	
		// http://docs.jquery.com/Plugins/Validation/Methods/dateISO
		dateISO: function(value, element) {
			return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
		},
	
		// http://docs.jquery.com/Plugins/Validation/Methods/dateDE
		dateDE: function(value, element) {
			return this.optional(element) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);
		},
	
		// http://docs.jquery.com/Plugins/Validation/Methods/number
		number: function(value, element) {
			return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
		},
	
		// http://docs.jquery.com/Plugins/Validation/Methods/numberDE
		numberDE: function(value, element) {
			return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/digits
		digits: function(value, element) {
			return this.optional(element) || /^\d+$/.test(value);
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/creditcard
		// based on http://en.wikipedia.org/wiki/Luhn
		creditcard: function(value, element) {
			if ( this.optional(element) )
				return "dependency-mismatch";
			// accept only digits and dashes
			if (/[^0-9-]+/.test(value))
				return false;
			var nCheck = 0,
				nDigit = 0,
				bEven = false;

			value = value.replace(/\D/g, "");

			for (n = value.length - 1; n >= 0; n--) {
				var cDigit = value.charAt(n);
				var nDigit = parseInt(cDigit, 10);
				if (bEven) {
					if ((nDigit *= 2) > 9)
						nDigit -= 9;
				}
				nCheck += nDigit;
				bEven = !bEven;
			}

			return (nCheck % 10) == 0;
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/accept
		accept: function(value, element, param) {
			param = typeof param == "string" ? param : "png|jpe?g|gif";
			return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i")); 
		},
		
		// http://docs.jquery.com/Plugins/Validation/Methods/equalTo
		equalTo: function(value, element, param) {
			return value == $(param).val();
		}
		
	}
	
});

})(jQuery);

// ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() 
;(function($) {
	var ajax = $.ajax;
	var pendingRequests = {};
	$.ajax = function(settings) {
		// create settings for compatibility with ajaxSetup
		settings = $.extend(settings, $.extend({}, $.ajaxSettings, settings));
		var port = settings.port;
		if (settings.mode == "abort") {
			if ( pendingRequests[port] ) {
				pendingRequests[port].abort();
			}
			return (pendingRequests[port] = ajax.apply(this, arguments));
		}
		return ajax.apply(this, arguments);
	};
})(jQuery);

// provides cross-browser focusin and focusout events
// IE has native support, in other browsers, use event caputuring (neither bubbles)

// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
// handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target 

// provides triggerEvent(type: String, target: Element) to trigger delegated events
;(function($) {
	$.each({
		focus: 'focusin',
		blur: 'focusout'	
	}, function( original, fix ){
		$.event.special[fix] = {
			setup:function() {
				if ( $.browser.msie ) return false;
				this.addEventListener( original, $.event.special[fix].handler, true );
			},
			teardown:function() {
				if ( $.browser.msie ) return false;
				this.removeEventListener( original,
				$.event.special[fix].handler, true );
			},
			handler: function(e) {
				arguments[0] = $.event.fix(e);
				arguments[0].type = fix;
				return $.event.handle.apply(this, arguments);
			}
		};
	});
	$.extend($.fn, {
		delegate: function(type, delegate, handler) {
			return this.bind(type, function(event) {
				var target = $(event.target);
				if (target.is(delegate)) {
					return handler.apply(target, arguments);
				}
			});
		},
		triggerEvent: function(type, target) {
			return this.triggerHandler(type, [$.event.fix({ type: type, target: target })]);
		}
	})
})(jQuery);


/* ************************
* haus/js/jquery.bigtarget.js
*/

// bigTarget.js - A jQuery Plugin
// Version 1.0.1
// Written by Leevi Graham - Technical Director - Newism Web Design & Development
// http://newism.com.au
// Notes: Tooltip code from fitted.js - http://www.trovster.com/lab/plugins/fitted/

// create closure
(function($) {
	// plugin definition
	$.fn.bigTarget = function(options) {
		debug(this);
		// build main options before element iteration
		var opts = $.extend({}, $.fn.bigTarget.defaults, options);
		// iterate and reformat each matched element
		return this.each(function() {
			// set the anchor attributes
			var $a = $(this);
			var href = $a.attr('href');
			var title = $a.attr('title');
			// build element specific options
			var o = $.meta ? $.extend({}, opts, $a.data()) : opts;
			// update element styles
			$a.parents(o.clickZone)
				.hover(function() {
					$h = $(this);
					$h.addClass(o.hoverClass);
					if(typeof o.title != 'undefined' && o.title === true && title != '') {
						$h.attr('title',title);
					}
				}, function() {
					
					$h.removeClass(o.hoverClass);
					if(typeof o.title != 'undefined' && o.title === true && title != '') {
						$h.removeAttr('title');
					}
				})
				// click
				.click(function() {
					if(getSelectedText() == "")
					{
						if($a.is('[rel*=external]')){
							window.open(href);
							return false;
						}
						else {
							//$a.click(); $a.trigger('click');
							window.location = href;
						}
					}
				});
		});
	};
	// private function for debugging
	function debug($obj) {
		if (window.console && window.console.log)
		window.console.log('bigTarget selection count: ' + $obj.size());
	};
	// get selected text
	function getSelectedText(){
		if(window.getSelection){
			return window.getSelection().toString();
		}
		else if(document.getSelection){
			return document.getSelection();
		}
		else if(document.selection){
			return document.selection.createRange().text;
		}
	};
	// plugin defaults
	$.fn.bigTarget.defaults = {
		hoverClass	: 'hover',
		clickZone	: 'li:eq(0)',
		title		: true
	};
// end of closure
})(jQuery);

/* ************************
* haus/js/flowplayer-3.2.2.min.js
*/

/* 
 * flowplayer.js 3.2.2. The Flowplayer API
 * 
 * Copyright 2010 Flowplayer Oy
 * 
 * This file is part of Flowplayer.
 * 
 * Flowplayer is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Flowplayer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * Date: 2010-05-20 17:15:38 +0000 (Thu, 20 May 2010)
 * Revision: 480 
 */
(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p<r&&q.call(s,p,s)!==false;s=t[++p]){}}return t}function c(o){return document.getElementById(o)}function i(q,p,o){if(typeof p!="object"){return q}if(q&&p){m(p,function(r,s){if(!o||typeof s!="function"){q[r]=s}})}return q}function n(s){var q=s.indexOf(".");if(q!=-1){var p=s.slice(0,q)||"*";var o=s.slice(q+1,s.length);var r=[];m(document.getElementsByTagName(p),function(){if(this.className&&this.className.indexOf(o)!=-1){r.push(this)}});return r}}function f(o){o=o||window.event;if(o.preventDefault){o.stopPropagation();o.preventDefault()}else{o.returnValue=false;o.cancelBubble=true}return false}function j(q,o,p){q[o]=q[o]||[];q[o].push(p)}function e(){return"_"+(""+Math.random()).slice(2,10)}var h=function(t,r,s){var q=this,p={},u={};q.index=r;if(typeof t=="string"){t={url:t}}i(this,t,true);m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","),function(){var v="on"+this;if(v.indexOf("*")!=-1){v=v.slice(0,v.length-1);var w="onBefore"+v.slice(2);q[w]=function(x){j(u,w,x);return q}}q[v]=function(x){j(u,v,x);return q};if(r==-1){if(q[w]){s[w]=q[w]}if(q[v]){s[v]=q[v]}}});i(this,{onCuepoint:function(x,w){if(arguments.length==1){p.embedded=[null,x];return q}if(typeof x=="number"){x=[x]}var v=e();p[v]=[x,w];if(s.isLoaded()){s._api().fp_addCuepoints(x,r,v)}return q},update:function(w){i(q,w);if(s.isLoaded()){s._api().fp_updateClip(w,r)}var v=s.getConfig();var x=(r==-1)?v.clip:v.playlist[r];i(x,w,true)},_fireEvent:function(v,y,w,A){if(v=="onLoad"){m(p,function(B,C){if(C[0]){s._api().fp_addCuepoints(C[0],r,B)}});return false}A=A||q;if(v=="onCuepoint"){var z=p[y];if(z){return z[1].call(s,A,w)}}if(y&&"onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v)!=-1){i(A,y);if(y.metaData){if(!A.duration){A.duration=y.metaData.duration}else{A.fullDuration=y.metaData.duration}}}var x=true;m(u[v],function(){x=this.call(s,A,y,w)});return x}});if(t.onCuepoint){var o=t.onCuepoint;q.onCuepoint.apply(q,typeof o=="function"?[o]:o);delete t.onCuepoint}m(t,function(v,w){if(typeof w=="function"){j(u,v,w);delete t[v]}});if(r==-1){s.onCuepoint=this.onCuepoint}};var l=function(p,r,q,t){var o=this,s={},u=false;if(t){i(s,t)}m(r,function(v,w){if(typeof w=="function"){s[v]=w;delete r[v]}});i(this,{animate:function(y,z,x){if(!y){return o}if(typeof z=="function"){x=z;z=500}if(typeof y=="string"){var w=y;y={};y[w]=z;z=500}if(x){var v=e();s[v]=x}if(z===undefined){z=500}r=q._api().fp_animate(p,y,z,v);return o},css:function(w,x){if(x!==undefined){var v={};v[w]=x;w=v}r=q._api().fp_css(p,w);i(o,r);return o},show:function(){this.display="block";q._api().fp_showPlugin(p);return o},hide:function(){this.display="none";q._api().fp_hidePlugin(p);return o},toggle:function(){this.display=q._api().fp_togglePlugin(p);return o},fadeTo:function(y,x,w){if(typeof x=="function"){w=x;x=500}if(w){var v=e();s[v]=w}this.display=q._api().fp_fadeTo(p,y,x,v);this.opacity=y;return o},fadeIn:function(w,v){return o.fadeTo(1,w,v)},fadeOut:function(w,v){return o.fadeTo(0,w,v)},getName:function(){return p},getPlayer:function(){return q},_fireEvent:function(w,v,x){if(w=="onUpdate"){var z=q._api().fp_getPlugin(p);if(!z){return}i(o,z);delete o.methods;if(!u){m(z.methods,function(){var B=""+this;o[B]=function(){var C=[].slice.call(arguments);var D=q._api().fp_invoke(p,B,C);return D==="undefined"||D===undefined?o:D}});u=true}}var A=s[w];if(A){var y=A.apply(o,v);if(w.slice(0,1)=="_"){delete s[w]}return y}return o}})};function b(q,G,t){var w=this,v=null,D=false,u,s,F=[],y={},x={},E,r,p,C,o,A;i(w,{id:function(){return E},isLoaded:function(){return(v!==null&&v.fp_play!=undefined&&!D)},getParent:function(){return q},hide:function(H){if(H){q.style.height="0px"}if(w.isLoaded()){v.style.height="0px"}return w},show:function(){q.style.height=A+"px";if(w.isLoaded()){v.style.height=o+"px"}return w},isHidden:function(){return w.isLoaded()&&parseInt(v.style.height,10)===0},load:function(J){if(!w.isLoaded()&&w._fireEvent("onBeforeLoad")!==false){var H=function(){u=q.innerHTML;if(u&&!flashembed.isSupported(G.version)){q.innerHTML=""}flashembed(q,G,{config:t});if(J){J.cached=true;j(x,"onLoad",J)}};var I=0;m(a,function(){this.unload(function(K){if(++I==a.length){H()}})})}return w},unload:function(J){if(this.isFullscreen()&&/WebKit/i.test(navigator.userAgent)){if(J){J(false)}return w}if(u.replace(/\s/g,"")!==""){if(w._fireEvent("onBeforeUnload")===false){if(J){J(false)}return w}D=true;try{if(v){v.fp_close();w._fireEvent("onUnload")}}catch(H){}var I=function(){v=null;q.innerHTML=u;D=false;if(J){J(true)}};setTimeout(I,50)}else{if(J){J(false)}}return w},getClip:function(H){if(H===undefined){H=C}return F[H]},getCommonClip:function(){return s},getPlaylist:function(){return F},getPlugin:function(H){var J=y[H];if(!J&&w.isLoaded()){var I=w._api().fp_getPlugin(H);if(I){J=new l(H,I,w);y[H]=J}}return J},getScreen:function(){return w.getPlugin("screen")},getControls:function(){return w.getPlugin("controls")._fireEvent("onUpdate")},getLogo:function(){try{return w.getPlugin("logo")._fireEvent("onUpdate")}catch(H){}},getPlay:function(){return w.getPlugin("play")._fireEvent("onUpdate")},getConfig:function(H){return H?k(t):t},getFlashParams:function(){return G},loadPlugin:function(K,J,M,L){if(typeof M=="function"){L=M;M={}}var I=L?e():"_";w._api().fp_loadPlugin(K,J,M,I);var H={};H[I]=L;var N=new l(K,null,w,H);y[K]=N;return N},getState:function(){return w.isLoaded()?v.fp_getState():-1},play:function(I,H){var J=function(){if(I!==undefined){w._api().fp_play(I,H)}else{w._api().fp_play()}};if(w.isLoaded()){J()}else{if(D){setTimeout(function(){w.play(I,H)},50)}else{w.load(function(){J()})}}return w},getVersion:function(){var I="flowplayer.js 3.2.0";if(w.isLoaded()){var H=v.fp_getVersion();H.push(I);return H}return I},_api:function(){if(!w.isLoaded()){throw"Flowplayer "+w.id()+" not loaded when calling an API method"}return v},setClip:function(H){w.setPlaylist([H]);return w},getIndex:function(){return p}});m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","),function(){var H="on"+this;if(H.indexOf("*")!=-1){H=H.slice(0,H.length-1);var I="onBefore"+H.slice(2);w[I]=function(J){j(x,I,J);return w}}w[H]=function(J){j(x,H,J);return w}});m(("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 H=this;w[H]=function(J,I){if(!w.isLoaded()){return w}var K=null;if(J!==undefined&&I!==undefined){K=v["fp_"+H](J,I)}else{K=(J===undefined)?v["fp_"+H]():v["fp_"+H](J)}return K==="undefined"||K===undefined?w:K}});w._fireEvent=function(Q){if(typeof Q=="string"){Q=[Q]}var R=Q[0],O=Q[1],M=Q[2],L=Q[3],K=0;if(t.debug){g(Q)}if(!w.isLoaded()&&R=="onLoad"&&O=="player"){v=v||c(r);o=v.clientHeight;m(F,function(){this._fireEvent("onLoad")});m(y,function(S,T){T._fireEvent("onUpdate")});s._fireEvent("onLoad")}if(R=="onLoad"&&O!="player"){return}if(R=="onError"){if(typeof O=="string"||(typeof O=="number"&&typeof M=="number")){O=M;M=L}}if(R=="onContextMenu"){m(t.contextMenu[O],function(S,T){T.call(w)});return}if(R=="onPluginEvent"||R=="onBeforePluginEvent"){var H=O.name||O;var I=y[H];if(I){I._fireEvent("onUpdate",O);return I._fireEvent(M,Q.slice(3))}return}if(R=="onPlaylistReplace"){F=[];var N=0;m(O,function(){F.push(new h(this,N++,w))})}if(R=="onClipAdd"){if(O.isInStream){return}O=new h(O,M,w);F.splice(M,0,O);for(K=M+1;K<F.length;K++){F[K].index++}}var P=true;if(typeof O=="number"&&O<F.length){C=O;var J=F[O];if(J){P=J._fireEvent(R,M,L)}if(!J||P!==false){P=s._fireEvent(R,M,L,J)}}m(x[R],function(){P=this.call(w,O,M);if(this.cached){x[R].splice(K,1)}if(P===false){return false}K++});return P};function B(){if($f(q)){$f(q).getParent().innerHTML="";p=$f(q).getIndex();a[p]=w}else{a.push(w);p=a.length-1}A=parseInt(q.style.height,10)||q.clientHeight;E=q.id||"fp"+e();r=G.id||E+"_api";G.id=r;t.playerId=E;if(typeof t=="string"){t={clip:{url:t}}}if(typeof t.clip=="string"){t.clip={url:t.clip}}t.clip=t.clip||{};if(q.getAttribute("href",2)&&!t.clip.url){t.clip.url=q.getAttribute("href",2)}s=new h(t.clip,-1,w);t.playlist=t.playlist||[t.clip];var H=0;m(t.playlist,function(){var J=this;if(typeof J=="object"&&J.length){J={url:""+J}}m(t.clip,function(K,L){if(L!==undefined&&J[K]===undefined&&typeof L!="function"){J[K]=L}});t.playlist[H]=J;J=new h(J,H,w);F.push(J);H++});m(t,function(J,K){if(typeof K=="function"){if(s[J]){s[J](K)}else{j(x,J,K)}delete t[J]}});m(t.plugins,function(J,K){if(K){y[J]=new l(J,K,w)}});if(!t.plugins||t.plugins.controls===undefined){y.controls=new l("controls",null,w)}y.canvas=new l("canvas",null,w);function I(J){if(!w.isLoaded()&&w._fireEvent("onBeforeClick")!==false){w.load()}return f(J)}u=q.innerHTML;if(u.replace(/\s/g,"")!==""){if(q.addEventListener){q.addEventListener("click",I,false)}else{if(q.attachEvent){q.attachEvent("onclick",I)}}}else{if(q.addEventListener){q.addEventListener("click",f,false)}w.load()}}if(typeof q=="string"){var z=c(q);if(!z){throw"Flowplayer cannot access element: "+q}else{q=z;B()}}else{B()}}var a=[];function d(o){this.length=o.length;this.each=function(p){m(o,p)};this.size=function(){return o.length}}window.flowplayer=window.$f=function(){var p=null;var o=arguments[0];if(!arguments.length){m(a,function(){if(this.isLoaded()){p=this;return false}});return p||a[0]}if(arguments.length==1){if(typeof o=="number"){return a[o]}else{if(o=="*"){return new d(a)}m(a,function(){if(this.id()==o.id||this.id()==o||this.getParent()==o){p=this;return false}});return p}}if(arguments.length>1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:true},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:o,t,q)}}else{if(o){return new b(o,t,q)}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var h=document.all,j="http://www.adobe.com/go/getflashplayer",c=typeof jQuery=="function",e=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,b={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function i(l,f){if(f){for(key in f){if(f.hasOwnProperty(key)){l[key]=f[key]}}}return l}function a(f,n){var m=[];for(var l in f){if(f.hasOwnProperty(l)){m[l]=n(f[l])}}return m}window.flashembed=function(f,m,l){if(typeof f=="string"){f=document.getElementById(f.replace("#",""))}if(!f){return}if(typeof m=="string"){m={src:m}}return new d(f,i(i({},b),m),l)};var g=i(window.flashembed,{conf:b,getVersion:function(){var f;try{f=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(n){try{var l=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=l&&l.GetVariable("$version")}catch(m){}}f=e.exec(f);return f?[f[1],f[3]]:[0,0]},asString:function(l){if(l===null||l===undefined){return null}var f=typeof l;if(f=="object"&&l.push){f="array"}switch(f){case"string":l=l.replace(new RegExp('(["\\\\])',"g"),"\\$1");l=l.replace(/^\s?(\d+\.?\d+)%/,"$1pct");return'"'+l+'"';case"array":return"["+a(l,function(o){return g.asString(o)}).join(",")+"]";case"function":return'"function()"';case"object":var m=[];for(var n in l){if(l.hasOwnProperty(n)){m.push('"'+n+'":'+g.asString(l[n]))}}return"{"+m.join(",")+"}"}return String(l).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(o,l){o=i({},o);var n='<object width="'+o.width+'" height="'+o.height+'" id="'+o.id+'" name="'+o.id+'"';if(o.cachebusting){o.src+=((o.src.indexOf("?")!=-1?"&":"?")+Math.random())}if(o.w3c||!h){n+=' data="'+o.src+'" type="application/x-shockwave-flash"'}else{n+=' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'}n+=">";if(o.w3c||h){n+='<param name="movie" value="'+o.src+'" />'}o.width=o.height=o.id=o.w3c=o.src=null;o.onFail=o.version=o.expressInstall=null;for(var m in o){if(o[m]){n+='<param name="'+m+'" value="'+o[m]+'" />'}}var p="";if(l){for(var f in l){if(l[f]){var q=l[f];p+=f+"="+(/function|object/.test(typeof q)?g.asString(q):q)+"&"}}p=p.slice(0,-1);n+='<param name="flashvars" value=\''+p+"' />"}n+="</object>";return n},isSupported:function(f){return k[0]>f[0]||k[0]==f[0]&&k[1]>=f[1]}});var k=g.getVersion();function d(f,n,m){if(g.isSupported(n.version)){f.innerHTML=g.getHTML(n,m)}else{if(n.expressInstall&&g.isSupported([6,65])){f.innerHTML=g.getHTML(i(n,{src:n.expressInstall}),{MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title})}else{if(!f.innerHTML.replace(/\s/g,"")){f.innerHTML="<h2>Flash version "+n.version+" or greater is required</h2><h3>"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"</h3>"+(f.tagName=="A"?"<p>Click here to download latest version</p>":"<p>Download latest version from <a href='"+j+"'>here</a></p>");if(f.tagName=="A"){f.onclick=function(){location.href=j}}}if(n.onFail){var l=n.onFail.call(this);if(typeof l=="string"){f.innerHTML=l}}}}if(h){window[n.id]=document.getElementById(n.id)}i(this,{getRoot:function(){return f},getOptions:function(){return n},getConf:function(){return m},getApi:function(){return f.firstChild}})}if(c){jQuery.tools=jQuery.tools||{version:"3.2.0"};jQuery.tools.flashembed={conf:b};jQuery.fn.flashembed=function(l,f){return this.each(function(){$(this).data("flashembed",flashembed(this,l,f))})}}})();


A B C D E F G H I J K L M N O P Q R S T U V W X Y Z