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


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

// Javascript for stacks_in_720_page1
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
/*
 *
 * RapidWeaver Multi Language Enclosure stack by Tsooj Media
 * Version 1.0.0
 *
 * Visit http://www.tsooj.net for more information on how to use this stacks product for RapidWeaver.
 *
 */
 
 
 /**
  * Based on the Cookie plugin
  *
  * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
  * Dual licensed under the MIT and GPL licenses:
  *
  */
 
 /**
  * Create a cookie with the given name and value and other optional parameters.
  *
  * @example $.cookie('the_cookie', 'the_value');
  * @desc Set the value of a cookie.
  * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
  * @desc Create a cookie with all available options.
  * @example $.cookie('the_cookie', 'the_value');
  * @desc Create a session cookie.
  * @example $.cookie('the_cookie', null);
  * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
  *       used when the cookie was set.
  *
  * @param String name The name of the cookie.
  * @param String value The value of the cookie.
  * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
  * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
  *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
  *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
  *                             when the the browser exits.
  * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
  * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
  * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
  *                        require a secure protocol (like HTTPS).
  * @type undefined
  *
  * @name $.cookie
  * @cat Plugins/Cookie
  * @author Klaus Hartl/klaus.hartl@stilbuero.de
  */
 
 /**
  * Get the value of a cookie with the given name.
  *
  * @example $.cookie('the_cookie');
  * @desc Get the value of a cookie.
  *
  * @param String name The name of the cookie.
  * @return The value of the cookie.
  * @type String
  *
  * @name $.cookie
  * @cat Plugins/Cookie
  * @author Klaus Hartl/klaus.hartl@stilbuero.de
  */
 
 (function($){
 	$.cookie = function(key, value, options) {
 		if(arguments.length > 1) {
 			var o = $.extend({}, $.cookie.defaults, options);
 	        if (value === null || value === undefined) {
 	            value = '';
 	            o.expires = -1;
 	        }
 	        if (o.expires.constructor != Date) {
 				var today = new Date();
 				today.setDate(today.getDate() + o.expires);
 				o.expires = today;
 			}
 			// Create the cookie string
 			document.cookie = 
 				key + '=' + value +
 				'; expires=' + o.expires.toUTCString() +
 				(o.path? '; path=' + (o.path) : '') +
 				(o.domain? '; domain=' + (o.domain) : '') +
 				(o.secure? '; secure' : '');
 		} else {
 			if(result = new RegExp(key+"=(.*?)(?:;|$)").exec(document.cookie))
 				return decodeURIComponent(result[1]);
 			return false;
 		}
 	};
 	$.cookie.defaults = {
 		expires: ((90 == 0) ? -1 : 90),
 		path: '/',
 		domain: document.domain,
 		secure: ((document.location.protocol == 'https:') ? true : false),
 	}
 })(jQuery);
 

// Global Vars.
stacks.atm_gstrRwmlCurrentLanguage = '';
 
// Local Vars.
var atm_strRwmlDefaultLanguage = 'FR';
var atm_strRwmlCookieName = 'rwml_preferred_language';
var atm_strRwmlCurrentLanguage = '';
var atm_blnRwmlHanleRedirects = false;


function atm_rwmlShowLanguage(strLanguage, blnDocumentReady) {
	
	 /**	Hide all language content, note that a lot of RW Themes come with a wrong html xml declaration.
	 		For example: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">.
	 		This is wrong because the language could be something else and the RW users should be able to 
	 		set the correct Language(s) themself by using RW in our opinion.
	 
	 		So therefore we are using the specific document.body target for the Lang(uage) selection, 
	 		otherwise the entire document content could be hidden by the RWML script.
	 */
	 
	// Only perform actions when a different Language is chosen.
	if (atm_strRwmlCurrentLanguage != strLanguage) { 
	
		$('[lang]', document.body).hide();
	
		// Show Selected Language, fade in when Switching from Language.
		$('[lang]', document.body).each(function() {
			if (($(this).attr('lang') == strLanguage) && blnDocumentReady) {
				$(this).show();
			} 
			else if (($(this).attr('lang') == strLanguage) && !blnDocumentReady) {
				$(this).fadeIn(500);
			}
			else {
				$(this).hide();
			}		
		}); 	
	
		// Show all RWML system (rwml-sys) contained Language content items.
		if (blnDocumentReady) {
			$('.rwml-sys').show();
		}
		
		// Set the Active Language;
		atm_strRwmlCurrentLanguage = strLanguage;
			
		// Make sure the Cookie is renewed.
		$.cookie(atm_strRwmlCookieName, null);

		// Set the Active Language;
		atm_strRwmlCurrentLanguage = strLanguage;

		// Store used Language in RWML Cookie.  
		$.cookie(atm_strRwmlCookieName, strLanguage);	

		// Handle Redirects when needed.
		if (atm_blnRwmlHanleRedirects) {
			setTimeout(atm_rwmlRedirect(atm_strRwmlCurrentLanguage), 500);
		}	
	}
} 


// Hide the Language Content items that belong to the RWML system (rwml-sys) during page load.
// This prevents that the Content comes available during page loading.
document.write("<style type='text/css'>.rwml-sys {display: none;}</style>"); 

$(document).ready(function() {   
 
 	// Create Switch Links based on the RWML Switch Stack(s).
	$('a[rel="rwml"]').click(function() {
		var atm_strHrefLang = $(this).attr('HREFLANG');
		atm_rwmlShowLanguage(atm_strHrefLang, false);
		return false; // Disable  default behaviour.
    });
    
    // Create Switch Links based on the Toolbar aka Menu Items.
	$('a[href*="rwml-sys"]').click(function() {
		var atm_strHrefLang = $(this).text();
		atm_rwmlShowLanguage(atm_strHrefLang, false);
		return false; // Disable  default behaviour.
	});
	
	// Handle Redirects.
	$('#rwml-redirect').each(function() {
		atm_blnRwmlHanleRedirects = true;
	});
    
    // Show the 'Selected' Language based on Autoselect.
	atm_rwmlShowLanguage(($.cookie(atm_strRwmlCookieName)) ? $.cookie(atm_strRwmlCookieName) : atm_strRwmlDefaultLanguage, true);
	
});



	return stack;
})(stacks.stacks_in_720_page1);


// Javascript for stacks_in_574_page1
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
// Liftoff v1.1.0 by Joe Workman
/* jquery-counter plugin
 * Copyright (c) 2009 Martin Conte Mac Donell <Reflejo@gmail.com>
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 */
jQuery.fn.countdown = function(userOptions)
{
  // Default options
  var options = {
    stepTime: 60,
    // startTime and format MUST follow the same format.
    // also you cannot specify a format unordered (e.g. hh:ss:mm is wrong)
    format: "dd:hh:mm:ss",
    startTime: "01:12:32:55",
    digitImages: 6,
    digitWidth: 53,
    digitHeight: 77,
    timerEnd: function(){},
    image: "digits.png"
  };
  var digits = [], interval;

  // Draw digits in given container
  var createDigits = function(where) 
  {
    var c = 0;
    var tempStartTime = options.startTime;
    // Iterate each startTime digit, if it is not a digit
    // we'll asume that it's a separator
    for (var i = 0; i < options.startTime.length; i++)
    {
      if (parseInt(tempStartTime.charAt(i)) >= 0) 
      {
        elem = jQuery('<div id="cnt_' + i + '" class="cntDigit" />').css({
          height: options.digitHeight * options.digitImages * 10, 
          float: 'left', background: 'url(\'' + options.image + '\')',
          width: options.digitWidth});
        digits.push(elem);
        margin(c, -((parseInt(tempStartTime.charAt(i)) * options.digitHeight *
                              options.digitImages)));
        digits[c].__max = 9;
        // Add max digits, for example, first digit of minutes (mm) has 
        // a max of 5. Conditional max is used when the left digit has reach
        // the max. For example second "hours" digit has a conditional max of 4 
        switch (options.format.charAt(i)) {
          case 'h':
            digits[c].__max = (c % 2 == 0) ? 2: 9;
            if (c % 2 != 0)
              digits[c].__condmax = 3;
            break;
          case 'd': 
            digits[c].__max = 9;
            break;
          case 'm':
          case 's':
            digits[c].__max = (c % 2 == 0) ? 5: 9;
        }
        ++c;
      }
      else 
        elem = jQuery('<div class="cntSeparator"/>').css({float: 'left'})
                .text(tempStartTime.charAt(i));

          where.append('<div>');
      where.append(elem);
          where.append('</div>');
    }
  };
  
  // Set or get element margin
  var margin = function(elem, val) 
  {
    if (val !== undefined)
      return digits[elem].css({'marginTop': val + 'px'});

    return parseInt(digits[elem].css('marginTop').replace('px', ''));
  };

  // Makes the movement. This is done by "digitImages" steps.
  var moveStep = function(elem) 
  {
    digits[elem]._digitInitial = -(digits[elem].__max * options.digitHeight * options.digitImages);
    return function _move() {
      mtop = margin(elem) + options.digitHeight;
      if (mtop == options.digitHeight) {
        margin(elem, digits[elem]._digitInitial);
        if (elem > 0) moveStep(elem - 1)();
        else 
        {
          clearInterval(interval);
          for (var i=0; i < digits.length; i++) margin(i, 0);
          options.timerEnd();
          return;
        }
        if ((elem > 0) && (digits[elem].__condmax !== undefined) && 
            (digits[elem - 1]._digitInitial == margin(elem - 1)))
          margin(elem, -(digits[elem].__condmax * options.digitHeight * options.digitImages));
        return;
      }

      margin(elem, mtop);
      if (margin(elem) / options.digitHeight % options.digitImages != 0)
        setTimeout(_move, options.stepTime);

      if (mtop == 0) digits[elem].__ismax = true;
    }
  };

  jQuery.extend(options, userOptions);
  this.css({height: options.digitHeight, overflow: 'hidden'});
  createDigits(this);
  interval = setInterval(moveStep(digits.length - 1), 1000);
};

$(document).ready(function() {
	function get_time_difference(dateOne,dateTwo,futureDateTwo) {	    
		// if future date is used find that diff else find the diff for the date in the past.
		var nTotalDiff = futureDateTwo ? dateTwo.getTime() - dateOne.getTime() : dateOne.getTime() - dateTwo.getTime();
		var oDiff = new Object();
		// if the number happens to be negative, just return 0
		if (nTotalDiff < 0) {
			oDiff.days = oDiff.hours = oDiff.minutes = oDiff.seconds = '00';
			return oDiff;
		}
		// Days		
		oDiff.days = Math.floor(nTotalDiff/1000/60/60/24);
		nTotalDiff -= oDiff.days*1000*60*60*24;
		if (oDiff.days < 10) { oDiff.days = '0' + oDiff.days; }
		// Hours
		oDiff.hours = Math.floor(nTotalDiff/1000/60/60);
		nTotalDiff -= oDiff.hours*1000*60*60;
		if (oDiff.hours < 10) { oDiff.hours = '0' + oDiff.hours; }
		// Minutes
		oDiff.minutes = Math.floor(nTotalDiff/1000/60);
		nTotalDiff -= oDiff.minutes*1000*60;
		if (oDiff.minutes < 10) { oDiff.minutes = '0' + oDiff.minutes; }
		// Seconds
		oDiff.seconds = Math.floor(nTotalDiff/1000);
		if (oDiff.seconds < 10) { oDiff.seconds = '0' + oDiff.seconds; }
		
		return oDiff;	 
	}
	processall_stacks_in_574_page1 = function() {
		showcontainer_stacks_in_574_page1();
		hidecounter_stacks_in_574_page1();
	}
	showcontainer_stacks_in_574_page1 = function() {
		$('#countdown-container-stacks_in_574_page1').slideDown('slow');
	}
	hidecounter_stacks_in_574_page1 = function() {
		// Can add an option in here to hide the counter or not
		if (true == true) {
		    var hideDelay = 0 * 1000;
    		$('#stacks_in_574_page1 .counter-wrapper').delay(hideDelay).slideUp('slow');
		}
	}

	var dateFuture  = new Date('jan 01, 2012 00:00:00');
	var dateCurrent = new Date();

    // console.log('Future Date: '+ dateFuture.toString());
    // console.log('Current Date: '+ dateCurrent.toString());
    // console.log('Future GMT Date: '+ dateFuture.toGMTString());
    // console.log('Current GMT Date: '+ dateCurrent.toGMTString());
	
    // Set Both Dates to GMT so its consistent across the board
    dateFuture.setTime(dateFuture.getTime() - (1 *60*60*1000));
    dateCurrent.setTime(dateCurrent.getTime() + (dateCurrent.getTimezoneOffset() *60*1000));
    
    // console.log('Future My GMT Date: '+ dateFuture.toString());
    // console.log('Current My GMT Date: '+ dateCurrent.toString());
    
	var earlyFinish = 0;
	var timeDiff = get_time_difference(dateCurrent,dateFuture,true);
	
	if (timeDiff.days == '00' && timeDiff.hours == '00' && timeDiff.minutes == '00' && timeDiff.seconds == '00') {
		if ('true' == 'true') {
		    $('#stacks_in_574_page1 .counter-wrapper').hide();
		}
		processall_stacks_in_574_page1();
	}
	else {	
		if (earlyFinish) {	
			var earlyDateFuture = new Date(dateFuture.getTime() - (earlyFinish*60*1000));
			var earlyTimeDiff = get_time_difference(dateCurrent,earlyDateFuture,true);
	
			$('#counter-hide').countdown({
				image: 'index_files/liftoff-images/countdown1.png',
				startTime: earlyTimeDiff.days +':'+ earlyTimeDiff.hours +':'+ earlyTimeDiff.minutes +':'+ earlyTimeDiff.seconds,
				timerEnd: showcontainer_stacks_in_574_page1
			});	
	
			$('#counter').countdown({
				image: 'index_files/liftoff-images/countdown1.png',
				startTime: timeDiff.days +':'+ timeDiff.hours +':'+ timeDiff.minutes +':'+ timeDiff.seconds,
				timerEnd: hidecounter_stacks_in_574_page1
			});	
		}
		else {
			$('#counter').countdown({
				image: 'index_files/liftoff-images/countdown1.png',
				startTime: timeDiff.days +':'+ timeDiff.hours +':'+ timeDiff.minutes +':'+ timeDiff.seconds,
				timerEnd: processall_stacks_in_574_page1
			});		
		}
	}
	
	if ('inline-block'  == 'none') { $('div.cntSeparator:eq(0)').hide(); }
	if ('inline-block' == 'none') { $('div.cntSeparator:eq(1)').hide(); }
	if (''  == 'none') { $('div.cntSeparator:eq(2)').hide(); }
	if ('inline-block'  == 'none') { $('div.cntSeparator:eq(2)').hide(); }
});
// End Liftoff
	return stack;
})(stacks.stacks_in_574_page1);


// Javascript for stacks_in_308_page1
// ---------------------------------------------------------------------

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

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

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	

/*
FX Slider Stack 1.0.1 - http://www.weaveraddons.com/stacks/fx-slider for more information
*/

/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

/*
 Dual licensed under the MIT or GPL Version 2 licenses
 @example http://thiagosf.net/projects/jquery/skitter/
*/

var img=new Image;img.src="rw_common/plugins/stacks/fxslider/ajax-loader.gif";jQuery.easing.jswing=jQuery.easing.swing;
jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(c,a,d,b,e){return jQuery.easing[jQuery.easing.def](c,a,d,b,e)},easeInQuad:function(c,a,d,b,e){return b*(a/=e)*a+d},easeOutQuad:function(c,a,d,b,e){return-b*(a/=e)*(a-2)+d},easeInOutQuad:function(c,a,d,b,e){return(a/=e/2)<1?b/2*a*a+d:-b/2*(--a*(a-2)-1)+d},easeInCubic:function(c,a,d,b,e){return b*(a/=e)*a*a+d},easeOutCubic:function(c,a,d,b,e){return b*((a=a/e-1)*a*a+1)+d},easeInOutCubic:function(c,a,d,b,e){return(a/=e/2)<1?b/2*a*a*a+d:b/
2*((a-=2)*a*a+2)+d},easeInQuart:function(c,a,d,b,e){return b*(a/=e)*a*a*a+d},easeOutQuart:function(c,a,d,b,e){return-b*((a=a/e-1)*a*a*a-1)+d},easeInOutQuart:function(c,a,d,b,e){return(a/=e/2)<1?b/2*a*a*a*a+d:-b/2*((a-=2)*a*a*a-2)+d},easeInQuint:function(c,a,d,b,e){return b*(a/=e)*a*a*a*a+d},easeOutQuint:function(c,a,d,b,e){return b*((a=a/e-1)*a*a*a*a+1)+d},easeInOutQuint:function(c,a,d,b,e){return(a/=e/2)<1?b/2*a*a*a*a*a+d:b/2*((a-=2)*a*a*a*a+2)+d},easeInSine:function(c,a,d,b,e){return-b*Math.cos(a/
e*(Math.PI/2))+b+d},easeOutSine:function(c,a,d,b,e){return b*Math.sin(a/e*(Math.PI/2))+d},easeInOutSine:function(c,a,d,b,e){return-b/2*(Math.cos(Math.PI*a/e)-1)+d},easeInExpo:function(c,a,d,b,e){return a==0?d:b*Math.pow(2,10*(a/e-1))+d},easeOutExpo:function(c,a,d,b,e){return a==e?d+b:b*(-Math.pow(2,-10*a/e)+1)+d},easeInOutExpo:function(c,a,d,b,e){return a==0?d:a==e?d+b:(a/=e/2)<1?b/2*Math.pow(2,10*(a-1))+d:b/2*(-Math.pow(2,-10*--a)+2)+d},easeInCirc:function(c,a,d,b,e){return-b*(Math.sqrt(1-(a/=e)*
a)-1)+d},easeOutCirc:function(c,a,d,b,e){return b*Math.sqrt(1-(a=a/e-1)*a)+d},easeInOutCirc:function(c,a,d,b,e){return(a/=e/2)<1?-b/2*(Math.sqrt(1-a*a)-1)+d:b/2*(Math.sqrt(1-(a-=2)*a)+1)+d},easeInElastic:function(c,a,d,b,e){var c=1.70158,f=0,m=b;if(a==0)return d;if((a/=e)==1)return d+b;f||(f=e*0.3);m<Math.abs(b)?(m=b,c=f/4):c=f/(2*Math.PI)*Math.asin(b/m);return-(m*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/f))+d},easeOutElastic:function(c,a,d,b,e){var c=1.70158,f=0,m=b;if(a==0)return d;if((a/=
e)==1)return d+b;f||(f=e*0.3);m<Math.abs(b)?(m=b,c=f/4):c=f/(2*Math.PI)*Math.asin(b/m);return m*Math.pow(2,-10*a)*Math.sin((a*e-c)*2*Math.PI/f)+b+d},easeInOutElastic:function(c,a,d,b,e){var c=1.70158,f=0,m=b;if(a==0)return d;if((a/=e/2)==2)return d+b;f||(f=e*0.3*1.5);m<Math.abs(b)?(m=b,c=f/4):c=f/(2*Math.PI)*Math.asin(b/m);return a<1?-0.5*m*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/f)+d:m*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/f)*0.5+b+d},easeInBack:function(c,a,d,b,e,f){f==void 0&&
(f=1.70158);return b*(a/=e)*a*((f+1)*a-f)+d},easeOutBack:function(c,a,d,b,e,f){f==void 0&&(f=1.70158);return b*((a=a/e-1)*a*((f+1)*a+f)+1)+d},easeInOutBack:function(c,a,d,b,e,f){f==void 0&&(f=1.70158);return(a/=e/2)<1?b/2*a*a*(((f*=1.525)+1)*a-f)+d:b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+d},easeInBounce:function(c,a,d,b,e){return b-jQuery.easing.easeOutBounce(c,e-a,0,b,e)+d},easeOutBounce:function(c,a,d,b,e){return(a/=e)<1/2.75?b*7.5625*a*a+d:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+0.75)+d:a<2.5/2.75?b*
(7.5625*(a-=2.25/2.75)*a+0.9375)+d:b*(7.5625*(a-=2.625/2.75)*a+0.984375)+d},easeInOutBounce:function(c,a,d,b,e){return a<e/2?jQuery.easing.easeInBounce(c,a*2,0,b,e)*0.5+d:jQuery.easing.easeOutBounce(c,a*2-e,0,b,e)*0.5+b*0.5+d}});
Utils=function(){return{wait:function(c){var c=$.extend({until:function(){return false},success:function(){},error:function(){Galleria.raise("Could not complete wait function.")},timeout:3E3},c),a=Utils.timestamp(),d,b,e=function(){b=Utils.timestamp();d=b-a;if(c.until(d))return c.success(),false;if(b>=a+c.timeout)return c.error(),false;window.setTimeout(e,10)};window.setTimeout(e,10)},timestamp:function(){return(new Date).getTime()},toggleQuality:function(c,a){if(!(IE!==7&&IE!==8)&&c)typeof a==="undefined"&&
(a=c.style.msInterpolationMode==="nearest-neighbor"),c.style.msInterpolationMode=a?"bicubic":"nearest-neighbor"}}}();
(function(c){var a=0,d=[];c.fn.skitter=function(h){return this.each(function(){c(this).data("skitter_number",a);d.push(new e(this,h,a));++a})};var b={v:1,i:2500,a:"",nr:true,n:true,lb:true,b:null,ti:null,il:null,ia:null,lia:null,laa:null,w:null,h:null,ii:1,ian:false,ih:false,ria:null,sr:false,th:false,aou:{backgroundColor:"#333",color:"#fff"},ao:{backgroundColor:"#000",color:"#fff"},aa:{backgroundColor:"#cc3333",color:"#fff"},ht:false,f:false,x:false,d:false,wl:null,o:0.75,iie:300,ioe:500,l:null,
is:null,mnh:20,ls:true,fl:1,ahl:true,s:'<a href="#" class="prev_button">prev</a><a href="#" class="next_button">next</a><span class="info_slide"></span><div class="border_skitter"><div class="container_skitter"><div class="image"><a href=""><img class="image_main" /></a><div class="label_skitter"></div></div></div></div>'};c.skitter=function(h,a,o){this.b=c(h);this.timer=null;this.s=c.extend({},b,a||{});this.number_skitter=o;this.ca=0;this.oc=this.at=false;this.setup()};var e=c.skitter;e.fn=e.prototype=
{};e.fn.extend=c.extend;e.fn.extend({setup:function(){var h=this;this.at=this.s.a.replace(/,/g," ").split(/\s+/);if(this.at.length<=1)this.at=false;this.b.append(this.s.s);if(this.s.v>=2)this.s.v=1.3;if(this.s.v<=0)this.s.v=1;!this.s.nr&&!this.s.th&&!this.s.d&&this.b.find(".info_slide").hide();this.s.lb||this.b.find(".label_skitter").hide();this.s.n||(this.b.find(".prev_button").hide(),this.b.find(".next_button").hide());if(this.s.f)this.s.w=c(window).width(),this.s.h=c(window).height(),this.b.css({position:"absolute",
top:0,left:0,"z-index":1E3}),c("body").css({overflown:"hidden"});else if(!this.s.w||!this.s.h){var a=h.b.find(".skitter_size_info:first"),o=h.b.find("img:first");if(a.length)this.s.w=a.data("width")||a.attr("data-width"),this.s.h=a.data("height")||a.attr("data-height");else if(o.length){if(this.s.w=o.attr("width"),this.s.h=o.attr("height"),!this.s.w||!this.s.h){a=false;o=o.parent().html();if(a=o.match(/width\s*=\s*["']?([0-9]+)/))this.s.w=a[1];if(a=o.match(/height\s*=\s*["']?([0-9]+)/))this.s.h=a[1]}}else this.s.w=
800,this.s.h=300}this.s.w=parseInt(this.s.w,10);this.s.h=parseInt(this.s.h,10);if(this.s.w==0||this.s.h==0)this.s.w=800,this.s.h=300;this.b.width(this.s.w+this.s.bw*2).height(this.s.h+this.s.bw*2);this.b.find(".container_skitter").width(this.s.w).height(this.s.h);this.s.bw&&this.b.find(".border_skitter").css("border","0px solid #000000");this.s.sbr&&this.b.css({"margin-bottom":this.s.sbr+5+"px","margin-top":this.s.sbr+5+"px"});o=this.s.wl?this.s.wl:this.s.w;this.b.find(".label_skitter").width(o);
var o=" image_number_select",k=0;this.s.il=[];this.s.x?c.ajax({type:"GET",url:this.s.x,async:false,dataType:"xml",success:function(a){c("<ul></ul>");c(a).find("skitter slide").each(function(){++k;var a=c(this).find("link").text()?c(this).find("link").text():"#",o=c(this).find("image").text(),g=c(this).find("image").attr("type"),b=c(this).find("label").text();h.s.il.push([o,a,g,b])})}}):this.s.json||this.b.find("ul li").each(function(){++k;var a=c(this).find("a").length?c(this).find("a").attr("href"):
"#",o=c(this).find("img").attr("src"),g=c(this).find("img").attr("alt");g&&g.match(/Stacks Image [0-9+]/i)&&(g="");typeof o!="undefined"&&h.s.il.push([o,a,"",g])});if(this.s.il.length>1){this.s.sr&&this.s.il.sort(function(){return Math.random()-0.5});for(i=0;i<this.s.il.length;i++)this.s.th?(a="",a=this.s.w>this.s.h?'height="100"':'width="100"',this.b.find(".info_slide").append('<span class="image_number'+o+'" rel="'+i+'" id="image_n_'+(i+1)+"_"+this.number_skitter+'"><img src="'+this.s.il[i][0]+
'" '+a+" /></span> ")):this.b.find(".info_slide").append('<span class="image_number'+o+'" rel="'+i+'" id="image_n_'+(i+1)+"_"+this.number_skitter+'">'+(i+1)+"</span> "),o=""}if(h.s.th){h.s.aou={opacity:0.5,width:"70px"};h.s.ao={opacity:1,width:"70px"};h.s.aa={opacity:1,width:"70px"};h.b.find(".info_slide").addClass("info_slide_thumb");o=k*55+75;h.b.find(".info_slide_thumb").width(o);h.b.css({height:h.b.height()+h.b.find(".info_slide").height()+5});h.s.lb=false;h.s.nl=="top"?h.b.find(".border_skitter").prepend('<div class="container_thumbs"></div>'):
(h.s.nl="bottom",h.b.find(".border_skitter").append('<div class="container_thumbs"></div>'));a=h.b.find(".info_slide").clone();h.b.find(".info_slide").remove();h.b.find(".container_thumbs").width(h.s.w).height(50).append(a);var b=0,u=this.s.w,j=this.s.h,g=0,d=h.b.find(".info_slide_thumb"),e=h.b.offset().left,n=h.b.offset().top;d.find(".image_number").each(function(){b+=c(this).width()+parseInt(c(this).css("marginLeft"))+parseInt(c(this).css("marginRight"))+parseInt(c(this).css("paddingLeft"))+parseInt(c(this).css("paddingRight"))});
d.width(b+"px");g=d.width();width_valor=this.s.w;width_valor=u-100;e+=90;o>h.s.w&&h.b.mousemove(function(a){var c=a.pageX,a=a.pageY,k=0;c-=e;a-=n;novo_width=g-width_valor;k=-(novo_width*c/width_valor);k>0&&(k=0);k<-(g-u-5)&&(k=-(g-u-5));(h.s.nl=="bottom"&&a>j||h.s.nl=="top"&&a<50)&&d.css({left:k})});h.b.find(".scroll_thumbs").css({left:10});o<h.s.w&&(h.b.find(".info_slide").width(h.s.w),h.b.find(".box_scroll_thumbs").hide())}else if(h.s.d||h.s.nr){o={};h.s.d?(a=Math.round(h.s.ds*1.8),a<15?a=15:a>
50&&(a=45)):a=30;if(h.s.nl=="top")o.top="-"+a+"px",o.bottom="auto",(!this.s.sbr||this.s.sbr<a)&&h.b.css("margin-top",a+"px");else if(h.s.nl=="bottom")o.bottom="-"+a+"px",o.top="auto",(!this.s.sbr||this.s.sbr<a)&&h.b.css("margin-bottom",a+"px");a=h.b.find(".info_slide");if(h.s.d)a.addClass("info_slide_dots").removeClass("info_slide");else if(h.s.nl=="top"||h.s.nl=="bottom")a.addClass("info_slide_numbers"),a.height()>h.s.mnh&&a.hide();h.s.nl=="top"||h.s.nl=="bottom"?o.left=(h.s.w+this.s.bw*2-a.width())/
2:(o.top=15+this.s.bw,o.left=15+this.s.bw);a.css(o)}this.b.find("ul").hide();this.s.ia=this.s.il[0][0];this.s.lia=this.s.il[0][1];this.s.laa=this.s.il[0][3];this.s.il.length>1&&(this.b.find(".prev_button").click(function(){var a=h.s.ii-2;a<0&&(a=h.s.il.length+a);h.jumpToImage(a);return false}),this.b.find(".next_button").click(function(){h.jumpToImage(h.s.ii);return false}),this.b.find(".next_button, .prev_button").hover(function(){c(this).stop().animate({opacity:1},200)},function(){c(this).stop().animate({opacity:0.75},
200)}),this.b.find(".image_number").hover(function(){c(this).attr("class")!="image_number image_number_select"&&c(this).css(h.s.ao)},function(){c(this).attr("class")!="image_number image_number_select"&&c(this).css(h.s.aou)}),this.b.find(".image_number").click(function(){if(c(this).attr("class")!="image_number image_number_select"){var a=c(this).attr("rel");h.jumpToImage(a)}return false}),this.b.find(".image_number").css(h.s.aou),this.b.find(".image_number:eq(0)").css(h.s.aa));this.s.ht&&this.hideTools();
this.loadImages()},loadImages:function(){var h=this;this.b.append(c('<div class="loading">Loading</div>'));var a=this.s.il.length,o=0;c.each(this.s.il,function(){var k=c('<span class="image_loading"></span>');k.css({position:"absolute",top:"-9999em"});h.b.append(k);k=new Image;c(k).load(function(){++o;o==a&&(h.b.find(".loading").remove(),h.b.find(".image_loading").remove(),h.start())}).error(function(){h.b.find(".loading, .image_loading, .image_number, .next_button, .prev_button").remove();h.b.html('<p style="color:white;background:black;">Error loading images. One or more images were not found.</p>')}).attr("src",
this[0])})},start:function(){var h=this;this.setLinkAtual();this.b.find(".image a img").attr({src:this.s.ia});img_link=this.b.find(".image a");img_link=this.resizeImage(img_link);img_link.find("img").fadeIn(1500);this.setValueBoxText();this.showBoxText();this.stopOnMouseOver();this.s.il.length>1?this.timer=setTimeout(function(){h.nextImage()},this.s.i):this.b.find(".loading, .image_loading, .image_number, .next_button, .prev_button").remove();c.isFunction(this.s.l)&&this.s.l()},jumpToImage:function(h){this.s.ian==
false?(this.b.find(".box_clone").stop(),this.clearTimer(true),this.s.ii=Math.floor(h),this.b.find(".image a").attr({href:this.s.lia}),this.b.find(".image_main").attr({src:this.s.ia}),this.b.find(".box_clone").remove(),this.nextImage()):this.oc=h},nextImage:function(){animations_functions="cube,cuberandom,block,cubestop,cubestoprandom,cubehide,cubesize,horizontal,showbars,showbarsrandom,tube,fade,fadefour,paralell,blind,blindheight,blindwidth,directiontop,directionbottom,directionright,directionleft,cubespread,glasscube,glassblock,circles,circlesinside,circlesrotate".split(",");
if(this.at&&!this.s.il[this.s.ii][2]){if(animation_type=this.at[this.ca],this.ca++,this.ca>=this.at.length)this.ca=0}else animation_type=this.s.il[this.s.ii][2]?this.s.il[this.s.ii][2]:this.s.a==""?"randomsmart":this.s.a;if(animation_type=="randomsmart"){if(!this.s.ria)animations_functions.sort(function(){return 0.5-Math.random()}),this.s.ria=animations_functions;animation_type=this.s.ria[this.s.ii]}else if(animation_type=="random"){var h=parseInt(Math.random()*animations_functions.length);animation_type=
animations_functions[h]}animation_type=animation_type.toLowerCase();h={};if(animation_type.match(/random/i))animation_type=animation_type.replace(/random/i,""),h.random=true;else{var a={blindheight:{height:true},blindwidth:{height:false,time_animate:400,delay:50},directiontop:{direction:"top"},directionbottom:{direction:"bottom"},directionright:{direction:"right",total:5},directionleft:{direction:"left",total:5}};a[animation_type]&&(h=a[animation_type],animation_type=animation_type.replace(/width|height|top|bottom|left|right/i,
""))}easing="easeOutQuad";this.s.ian=true;a="animation"+animation_type.charAt(0).toUpperCase()+animation_type.slice(1);if(this[a])this[a](h);else this.animationTube()},animationCube:function(h){var a=this;easing="easeOutBack";var c=700/this.s.v;this.setActualLevel();var k=Math.ceil(this.s.w/(this.s.w/8)),b=Math.ceil(this.s.h/(this.s.h/3)),u=k*b,k=Math.ceil(this.s.w/k),j=Math.ceil(this.s.h/b),g=init_left=this.s.h+200,d=0,e=0;for(i=0;i<u;i++){var n=this.getBoxClone();n.hide();var f={left:this.s.w/2,
top:this.s.h+50,width:k,height:j};if(h.random)f.left=(i%2==0?init_left:-init_left)+k*e+e*50+"px",f.top=(i%2==0?g:-g)+j*d+d*50+"px";n.css(f);n.find("img").css({left:-(k*e),top:-(j*d)});this.addBoxClone(n);var f=40*e,p=i==u-1?function(){a.finishAnimation()}:"";n.show().delay(f).animate({top:j*d+"px",left:k*e+"px"},c,easing,p);d++;d==b&&(d=0,e++)}},animationBlock:function(){var h=this,a=500/this.s.v;this.setActualLevel();var c=Math.ceil(this.s.w/(this.s.w/10)),k=Math.ceil(this.s.w/c),b=this.s.h;for(i=
0;i<c;i++){var d=k*i,j=this.getBoxClone();j.css({left:this.s.w,top:0,width:k,height:b});j.find("img").css({left:-(k*i),top:0});this.addBoxClone(j);var g=i==c-1?function(){h.finishAnimation()}:"";j.delay(80*i).animate({top:0,left:d,opacity:"show"},a,easing,g)}},animationCubestop:function(h){var a=this;easing="easeOutBack";var c=800/this.s.v,k=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var b=Math.ceil(this.s.w/(this.s.w/
8)),d=Math.ceil(this.s.h/(this.s.w/8)),j=b*d,b=Math.ceil(this.s.w/b),g=Math.ceil(this.s.h/d),e=0,l=0,n=0,f=0,p=this.s.w/16;for(i=0;i<j;i++){var e=i%2==0?e:-e,l=i%2==0?l:-l,q=e+g*n,m=l+b*f,t=-(g*n),v=-(b*f),x=q-p,w=m-p,s=this.getBoxClone(k);s.css({left:m+"px",top:q+"px",width:b,height:g});s.find("img").css({left:v,top:t});this.addBoxClone(s);s.show();t=30*i;h.random&&(c=1E3/this.s.v,x=q,w=m,t=30*Math.random()*30);q=i==j-1?function(){a.finishAnimation()}:"";s.delay(t).animate({opacity:"hide",top:x+
"px",left:w+"px"},c,easing,q);n++;n==d&&(n=0,f++)}},animationCubehide:function(){var h=this,a=500/this.s.v,c=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var k=Math.ceil(this.s.w/(this.s.w/8)),b=Math.ceil(this.s.h/(this.s.h/3)),d=k*b,k=Math.ceil(this.s.w/k),j=Math.ceil(this.s.h/b),g=0,e=0,l=0,n=0;for(i=0;i<d;i++){var g=i%2==0?g:-g,e=i%2==0?e:-e,f=g+j*l,p=e+k*n,q=-(j*l),m=-(k*n),t=this.getBoxClone(c);t.css({left:p+
"px",top:f+"px",width:k,height:j});t.find("img").css({left:m,top:q});this.addBoxClone(t);t.show();f=50*i;f=i==d-1?d*50:f;p=i==d-1?function(){h.finishAnimation()}:"";t.delay(f).animate({opacity:"hide"},a,easing,p);l++;l==b&&(l=0,n++)}},animationCubejelly:function(){var h=this;easing="easeInBack";var a=300/this.s.v,c=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var k=Math.ceil(this.s.w/(this.s.w/8)),b=Math.ceil(this.s.h/
(this.s.h/3)),d=k*b,k=Math.ceil(this.s.w/k),e=Math.ceil(this.s.h/b),g=0,r=0,l=0,f=0,m=-1;for(i=0;i<d;i++){f%2!=0?(l==0&&(m=m+b+1),m--):(f>0&&l==0&&(m+=2),m++);var g=i%2==0?g:-g,r=i%2==0?r:-r,p=g+e*l,q=r+k*f,s=-(e*l),t=-(k*f),v=this.getBoxClone(c);v.css({left:q+"px",top:p+"px",width:k,height:e});v.find("img").css({left:t,top:s});this.addBoxClone(v);v.show();p=i==d-1?function(){h.finishAnimation()}:"";v.delay(50*i).animate({width:"+=100px",height:"+=100px",top:"-=20px",left:"-=20px",opacity:"hide"},
a,easing,p);l++;l==b&&(l=0,f++)}},animationCubesize:function(){var h=this;easing="easeInOutQuad";var a=600/this.s.v,c=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var k=Math.ceil(this.s.w/(this.s.w/8)),b=Math.ceil(this.s.h/(this.s.h/3)),d=k*b,k=Math.ceil(this.s.w/k),e=Math.ceil(this.s.h/b),g=0,f=0,l=0,n=0;Math.ceil(this.s.w/6);for(i=0;i<d;i++){var g=i%2==0?g:-g,f=i%2==0?f:-f,m=g+e*l,p=f+k*n,q=-(e*l),s=-(k*n),t=this.getBoxClone(c);
t.css({left:p,top:m,width:k,height:e});t.find("img").css({left:s,top:q});this.addBoxClone(t);t.show();q=i==d-1?function(){h.finishAnimation()}:"";t.delay(50*i).animate({opacity:"hide",width:"hide",height:"hide",top:m+k*1.5,left:p+e*1.5},a,easing,q);l++;l==b&&(l=0,n++)}},animationHorizontal:function(){var h=this;easing="easeOutExpo";var a=700/this.s.v;this.setActualLevel();var c=Math.ceil(this.s.w/(this.s.w/7)),k=this.s.w,b=Math.ceil(this.s.h/c);for(i=0;i<c;i++){var d=(i%2==0?"":"")+k,e=i*b,g=this.getBoxClone();
g.css({left:d+"px",top:e+"px",width:k,height:b});g.find("img").css({left:0,top:-e});this.addBoxClone(g);d=i==c-1?function(){h.finishAnimation()}:"";g.delay(70*i).animate({opacity:"show",top:e,left:0},a,easing,d)}},animationShowbars:function(h){var a=this,c=400/this.s.v;this.setActualLevel();var k=Math.ceil(this.s.w/(this.s.w/10)),b=Math.ceil(this.s.w/k),d=this.s.h;for(i=0;i<k;i++){var e=b*i,g=this.getBoxClone();g.css({left:e,top:-50,width:b,height:d});g.find("img").css({left:-(b*i),top:0});this.addBoxClone(g);
if(h.random)var f=50*this.getRandom(k),f=i==k-1?50*k:f;else f=70*i,c-=i*2;var l=i==k-1?function(){a.finishAnimation()}:"";g.delay(f).animate({opacity:"show",top:"0px",left:e+"px"},c,easing,l)}},animationTube:function(){var h=this;easing="easeOutElastic";var a=600/this.s.v;this.setActualLevel();var c=Math.ceil(this.s.w/(this.s.w/10)),b=Math.ceil(this.s.w/c),d=this.s.h;for(i=0;i<c;i++){var e=d,j=b*i,g=this.getBoxClone();g.css({left:j,top:e,height:d,width:b});g.find("img").css({left:-j});this.addBoxClone(g);
e=40*this.getRandom(c);j=i==c-1?function(){h.finishAnimation()}:"";g.show().delay(e).animate({top:0},a,easing,j)}},animationFade:function(){var h=this,a=800/this.s.v;this.setActualLevel();var c=this.s.w,b=this.s.h;for(i=0;i<2;i++){var d=this.getBoxClone();d.css({left:0,top:0,width:c,height:b});this.addBoxClone(d);d.animate({opacity:"show",left:0,top:0},a,easing,i==1?function(){h.finishAnimation()}:"")}},animationFadefour:function(){var h=this,a=500/this.s.v;this.setActualLevel();var c=this.s.w,b=
this.s.h;for(i=0;i<4;i++){if(i==0)var d="-100px",e="-100px";else i==1?(d="-100px",e="100px"):i==2?(d="100px",e="-100px"):i==3&&(e=d="100px");var j=this.getBoxClone();j.css({left:e,top:d,width:c,height:b});this.addBoxClone(j);j.animate({opacity:"show",left:0,top:0},a,easing,i==3?function(){h.finishAnimation()}:"")}},animationParalell:function(){var h=this;easing="easeOutCirc";var a=400/this.s.v;this.setActualLevel();var c=Math.ceil(this.s.w/(this.s.w/16)),b=Math.ceil(this.s.w/c),d=this.s.h;for(i=0;i<
c;i++){var e=b*i,j=this.getBoxClone();j.css({left:e,top:0-this.s.h,width:b,height:d});j.find("img").css({left:-(b*i),top:0});this.addBoxClone(j);var g;i<=c/2-1?g=1400-i*200:i>c/2-1&&(g=(i-c/2)*200);g/=2.5;var f=i==c-1?function(){h.finishAnimation()}:"";j.show().delay(g).animate({top:"0px",left:e+"px"},a,easing,f)}},animationBlind:function(h){var a=this,c=400/this.s.v;this.setActualLevel();var b=Math.ceil(this.s.w/(this.s.w/16)),d=Math.ceil(this.s.w/b),e=this.s.h;for(i=0;i<b;i++){var j=d*i,g=this.getBoxClone();
g.css({left:j,top:0,width:d,height:e});g.find("img").css({left:-(d*i),top:0});this.addBoxClone(g);var f;if(h.height)i<=b/2-1?f=200+i*200:i>b/2-1&&(f=(b/2-i)*200+b*100),l=i==b/2?function(){a.finishAnimation()}:"";else{i<=b/2-1?f=1400-i*200:i>b/2-1&&(f=(i-b/2)*200);var l=i==b-1?function(){a.finishAnimation()}:""}f/=2.5;h.height?(c+=i*2,easing="easeOutQuad",g.delay(f).animate({opacity:"show",top:"0px",left:j+"px",height:"show"},c,easing,l)):g.delay(f).animate({opacity:"show",top:"0px",left:j+"px",width:"show"},
c,easing,l)}},animationBlinddimension:function(a){var b=this,a=c.extend({},{height:true,time_animate:500,delay:100},a||{}),d=a.time_animate/this.s.v;this.setActualLevel();var e=Math.ceil(this.s.w/(this.s.w/16)),f=Math.ceil(this.s.w/e),u=this.s.h;for(i=0;i<e;i++){var j=f*i,g=this.getBoxClone();g.css({left:j,top:0,width:f,height:u});g.find("img").css({left:-(f*i),top:0});this.addBoxClone(g);var r=a.delay*i,l=i==e-1?function(){b.finishAnimation()}:"";a.height?(easing="easeOutQuad",g.delay(r).animate({opacity:"show",
top:"0px",left:j+"px",height:"show"},d,easing,l)):g.delay(r).animate({opacity:"show",top:"0px",left:j+"px",width:"show"},d,easing,l)}},animationDirection:function(a){var b=this,a=c.extend({},{direction:"top",delay_type:"sequence",total:7},a||{});easing="easeInOutExpo";var d=1200/this.s.v,e=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});this.b.find(".image_main").hide();var f=a.total;for(i=0;i<f;i++){switch(a.direction){default:case "top":var u=
Math.ceil(this.s.w/f),j=this.s.h,g=0,r=u*i,l=-j,n=r,m=j,p=r,q=0,s=r,t=0,v=-r;break;case "bottom":u=Math.ceil(this.s.w/f);j=this.s.h;g=0;r=u*i;l=j;n=r;m=-j;p=r;q=0;s=r;t=0;v=-r;break;case "right":u=this.s.w;j=Math.ceil(this.s.h/f);g=j*i;r=0;l=g;n=u;m=g;p=-n;q=g;s=0;t=-g;v=0;break;case "left":u=this.s.w,j=Math.ceil(this.s.h/f),g=j*i,r=0,l=g,n=-u,m=g,p=-n,q=g,s=0,t=-g,v=0}switch(a.delay_type){default:var x=i%2==0?0:150;break;case "random":x=30*Math.random()*30;break;case "sequence":x=i*100}var w=this.getBoxClone(e);
w.find("img").css({left:v,top:t});w.css({top:g,left:r,width:u,height:j});this.addBoxClone(w);w.show();w.delay(x).animate({top:l,left:n},d,easing);g=this.getBoxClone();g.find("img").css({left:v,top:t});g.css({top:m,left:p,width:u,height:j});this.addBoxClone(g);g.show();u=i==f-1?function(){b.finishAnimation()}:"";g.delay(x).animate({top:q,left:s},d,easing,u)}},animationCubespread:function(){var a=this;easing="easeInOutQuad";var c=700/this.s.v;this.setActualLevel();var b=Math.ceil(this.s.w/(this.s.w/
8)),d=Math.ceil(this.s.h/(this.s.w/8)),e=b*d,b=Math.ceil(this.s.w/b),f=Math.ceil(this.s.h/d),j=0,g=0,r=0,l=0,n=[],m=[];for(i=0;i<e;i++){var j=i%2==0?j:-j,g=i%2==0?g:-g,p=j+f*r,q=g+b*l;n[i]=[p,q];r++;r==d&&(r=0,l++)}for(i=l=r=0;i<e;i++)m[i]=i;m=a.shuffleArray(m);for(i=0;i<e;i++){var j=i%2==0?j:-j,g=i%2==0?g:-g,p=j+f*r,q=g+b*l,s=-(f*r),t=-(b*l),v=p,x=q,p=n[m[i]][0],q=n[m[i]][1],w=this.getBoxClone();w.css({left:q+"px",top:p+"px",width:b,height:f});w.find("img").css({left:t,top:s});this.addBoxClone(w);
p=30*Math.random()*30;i==e-1&&(p=900);q=i==e-1?function(){a.finishAnimation()}:"";w.delay(p).animate({opacity:"show",top:v+"px",left:x+"px"},c,easing,q);r++;r==d&&(r=0,l++)}},animationGlasscube:function(){var a=this;easing="easeOutExpo";var c=500/this.s.v;this.setActualLevel();var b=Math.ceil(this.s.w/(this.s.w/10))*2,d=Math.ceil(this.s.w/b)*2,e=this.s.h/2,f=0;for(i=0;i<b;i++){mod=i%2==0?true:false;var j=d*f,g=mod?-a.s.h:a.s.h,m=d*f,l=mod?0:e,n=-(d*f),s=mod?0:-e,p=120*f,q=this.getBoxClone();q.css({left:j,
top:g,width:d,height:e});q.find("img").css({left:n+d/1.5,top:s}).delay(p).animate({left:n,top:s},c*1.9,"easeOutQuad");this.addBoxClone(q);j=i==b-1?function(){a.finishAnimation()}:"";q.show().delay(p).animate({top:l,left:m},c,easing,j);i%2!=0&&f++}},animationGlassblock:function(){var a=this;easing="easeOutExpo";var c=700/this.s.v;this.setActualLevel();var b=Math.ceil(this.s.w/(this.s.w/10)),d=Math.ceil(this.s.w/b),e=this.s.h;for(i=0;i<b;i++){var f=d*i,j=d*i,g=-(d*i),m=100*i,l=this.getBoxClone();l.css({left:f,
top:0,width:d,height:e});l.find("img").css({left:g+d/1.5,top:0}).delay(m).animate({left:g,top:0},c*1.1,"easeInOutQuad");this.addBoxClone(l);f=i==b-1?function(){a.finishAnimation()}:"";l.delay(m).animate({top:0,left:j,opacity:"show"},c,easing,f)}},animationCircles:function(){var a=this;easing="easeInQuad";var c=500/this.s.v;this.setActualLevel();var b=Math.ceil(this.s.w/(this.s.w/10)),d=100,e=Math.sqrt(Math.pow(this.s.w,2)+Math.pow(this.s.h,2)),e=Math.ceil(e);for(i=0;i<b;i++){var f=a.s.w/2-d/2,j=a.s.h/
2-d/2,g=f,m=j,l=this.getBoxClone();l.css({left:f,top:j,width:d,height:d}).css3({"border-radius":e+"px"});l.find("img").css({left:-f,top:-j});d+=100;this.addBoxClone(l);f=i==b-1?function(){a.finishAnimation()}:"";l.delay(70*i).animate({top:m,left:g,opacity:"show"},c,easing,f)}},animationCirclesinside:function(){var a=this;easing="easeInQuad";var c=500/this.s.v,b=this.b.find(".image_main").attr("src");this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var d=Math.ceil(this.s.w/
(this.s.w/10)),e=Math.sqrt(Math.pow(this.s.w,2)+Math.pow(this.s.h,2)),f=e=Math.ceil(e);for(i=0;i<d;i++){var j=a.s.w/2-f/2,g=a.s.h/2-f/2,m=j,l=g,n=this.getBoxClone(b);n.css({left:j,top:g,width:f,height:f}).css3({"border-radius":e+"px"});n.find("img").css({left:-j,top:-g});f-=100;this.addBoxClone(n);n.show();j=i==d-1?function(){a.finishAnimation()}:"";n.delay(70*i).animate({top:l,left:m,opacity:"hide"},c,easing,j)}},animationCirclesrotate:function(){var a=this,c=500/this.s.v,b=this.b.find(".image_main").attr("src");
this.setActualLevel();this.setLinkAtual();this.b.find(".image_main").attr({src:this.s.ia});var d=Math.ceil(this.s.w/(this.s.w/10)),e=Math.sqrt(Math.pow(this.s.w,2)+Math.pow(this.s.h,2)),f=e=Math.ceil(e);for(i=0;i<d;i++){var j=a.s.w/2-f/2,g=a.s.h/2-f/2,m=j,l=g,n=this.getBoxClone(b);n.css({left:j,top:g,width:f,height:f}).css3({"border-radius":e+"px"});n.find("img").css({left:-j,top:-g});f-=100;this.addBoxClone(n);n.show();j=i==d-1?function(){a.finishAnimation()}:"";g=i%2==0?"20deg":"-20deg";n.delay(100*
i).animate({top:l,left:m,opacity:"hide",rotate:g},c,easing,j)}},finishAnimation:function(){var a=this;this.b.find(".image_main").show();this.showBoxText();this.s.ian=false;if(a.oc!==false)a.jumpToImage(a.oc),a.oc=false;else if((!this.s.poh||!this.s.ih)&&(this.s.ls||this.s.fl))this.timer=setTimeout(function(){a.completeMove()},this.s.i),this.b.find(".image_main").attr({src:this.s.ia}),this.b.find(".image a").attr({href:this.s.lia})},completeMove:function(){var a=true;if(!this.s.ls&&this.s.fl&&(this.s.fl++,
this.s.fl>=this.s.il.length))a=this.s.fl=false;this.clearTimer(true);this.b.find(".box_clone").remove();a&&this.nextImage()},setActualLevel:function(){var a=this;c.isFunction(this.s.is)&&this.s.imageSwitched(this.s.ii,this);var b=this.s.il[this.s.ii][1],d=this.s.il[this.s.ii][3];this.s.ia=this.s.il[this.s.ii][0];this.s.lia=b;this.s.laa=d;this.b.find(".image_number_select").css(a.s.aou).removeClass("image_number_select");c("#image_n_"+(this.s.ii+1)+"_"+a.number_skitter).css(a.s.aa).addClass("image_number_select");
this.s.ahl?this.b.find(".label_skitter").slideUp(200,function(){a.setValueBoxText()}):(a.setValueBoxText(),(this.s.laa==void 0||this.s.laa=="")&&this.b.find(".label_skitter").css("display","none"));this.s.ii++;if(this.s.ii==this.s.il.length)this.s.ii=0},getBoxClone:function(a){a=this.s.lia!="#"?c('<a href="'+this.s.lia+'"><img src="'+(a?a:this.s.ia)+'" /></a>'):c('<img src="'+(a?a:this.s.ia)+'" />');a=this.resizeImage(a);return c('<div class="box_clone"></div>').append(a)},resizeImage:function(a){this.s.f&&
a.find("img").height(this.s.h);return a},addBoxClone:function(a){this.b.find(".container_skitter").append(a)},getRandom:function(a){return Math.floor(Math.random()*a)},setValueBoxText:function(){this.b.find(".label_skitter").html("<p>"+this.s.laa+"</p>")},showBoxText:function(){this.s.laa!=void 0&&this.s.laa!=""&&this.s.lb&&(this.s.ahl?this.b.find(".label_skitter").slideDown(400):this.b.find(".label_skitter").css("display","block"))},stopOnMouseOver:function(){var a=this,c=a.s.o,b=a.s.iie,d=a.s.iie;
a.b.hover(function(){a.s.ht&&(a.s.nl!="top"&&a.s.nl!="bottom"&&a.b.find(".info_slide,.info_slide_dots").show().css({opacity:0}).animate({opacity:c},b),a.s.n&&(a.b.find(".prev_button").show().css({opacity:0}).animate({opacity:c},b),a.b.find(".next_button").show().css({opacity:0}).animate({opacity:c},b)));a.s.poh&&a.clearTimer(true);a.s.ih=true},function(){a.s.ht&&(a.s.nl!="top"&&a.s.nl!="bottom"&&a.b.find(".info_slide,.info_slide_dots").queue("fx",[]).show().css({opacity:c}).animate({opacity:0},d),
a.s.n&&(a.b.find(".prev_button").queue("fx",[]).show().css({opacity:c}).animate({opacity:0},d),a.b.find(".next_button").queue("fx",[]).show().css({opacity:c}).animate({opacity:0},d)));if(a.s.poh&&(a.clearTimer(true),!a.s.ian&&a.s.il.length>1&&(a.s.fl||a.s.ls)))a.timer=setTimeout(function(){a.timer=setTimeout(function(){a.completeMove()},a.s.i);a.b.find(".image_main").attr({src:a.s.ia});a.b.find(".image a").attr({href:a.s.lia})},a.s.i);a.s.ih=false})},clearTimer:function(){clearInterval(this.timer)},
setLinkAtual:function(){this.s.lia!="#"?this.b.find(".image a").attr({href:this.s.lia}):this.b.find(".image a").removeAttr("href")},hideTools:function(){this.s.nl!="top"&&this.s.nl!="bottom"&&this.b.find(".info_slide,.info_slide_dots").hide();this.b.find(".prev_button,.next_button,.label_skitter").hide()},shuffleArray:function(a){for(var c=[],b;a.length>0;)b=this.randomUnique(0,a.length-1),c[c.length]=a[b],a.splice(b,1);return c},randomUnique:function(a,c){var b;do b=Math.random();while(b==1);return b*
(c-a+1)+a|0}});c.fn.css3=function(a){var c={},b=["moz","ms","o","webkit"],d;for(d in a){for(var e=0;e<b.length;e++)c["-"+b[e]+"-"+d]=a[d];c[d]=a[d]}this.css(c);return this};var f="deg";c.fn.rotate=function(a){var b=c(this).css("transform")||"none";if(typeof a=="undefined")return b&&(a=b.match(/rotate\(([^)]+)\)/))&&a[1]?a[1]:0;if(a=a.toString().match(/^(-?\d+(\.\d+)?)(.+)?$/))a[3]&&(f=a[3]),c(this).css("transform",b.replace(/none|rotate\([^)]*\)/,"")+"rotate("+a[1]+f+")");return this};c.fn.scale=
function(a){var b=c(this).css("transform");if(typeof a=="undefined")return b&&(a=b.match(/scale\(([^)]+)\)/))&&a[1]?a[1]:1;c(this).css("transform",b.replace(/none|scale\([^)]*\)/,"")+"scale("+a+")");return this};var m=c.fx.prototype.cur;c.fx.prototype.cur=function(){if(this.prop=="rotate")return parseFloat(c(this.elem).rotate());else if(this.prop=="scale")return parseFloat(c(this.elem).scale());return m.apply(this,arguments)};c.fx.step.rotate=function(a){c(a.elem).rotate(a.now+f)};c.fx.step.scale=
function(a){c(a.elem).scale(a.now)};var y=c.fn.animate;c.fn.animate=function(a){if(typeof a.rotate!="undefined"){var b=a.rotate.toString().match(/^(([+-]=)?(-?\d+(\.\d+)?))(.+)?$/);b&&b[5]&&(f=b[5]);a.rotate=b[1]}return y.apply(this,arguments)};var s=null,z=c.fn.css;c.fn.css=function(a,b){s===null&&(s=typeof c.cssProps!="undefined"?c.cssProps:typeof c.props!="undefined"?c.props:{});if(typeof s.transform=="undefined"&&(a=="transform"||typeof a=="object"&&typeof a.transform!="undefined")){var d=s,e;
a:{e=this.get(0);for(var f=["transform","WebkitTransform","msTransform","MozTransform","OTransform"],m;m=f.shift();)if(typeof e.style[m]!="undefined"){e=m;break a}e="transform"}d.transform=e}if(s.transform!="transform")if(a=="transform"){if(a=s.transform,typeof b=="undefined"&&jQuery.style)return jQuery.style(this.get(0),a)}else if(typeof a=="object"&&typeof a.transform!="undefined")a[s.transform]=a.transform,delete a.transform;return z.apply(this,arguments)}})(jQuery);


$(function(){
	$('#stacks_in_308_page1images img').appendTo($('#stacks_in_308_page1container'));
	$('#stacks_in_308_page1container').skitter({'a': 'random', 
								 'd': ('none'.match(/dots/i) != null), 
								 'nr': ('none'.match(/number/i) != null), 
								 'th': ('none'.match(/thumb/i) != null),
								 'ds': 18,
								 'nl': 'bottom', 
								 'al': '',
								 'sr': true, 
								 'i': 5.0*1000, 
								 'ls': true,
								 'ht': true,
								 'ahl': true,
								 'bw': 0, 
								 'sbr': 15,								
								 'aou': {backgroundColor: '#333333', color: '#FFFFFF'},
								 'ao': {backgroundColor: '#000000', color: '#FFFFFF'},
								 'aa': {backgroundColor: '#CC3333', color: '#FFFFFF'}, 
								 'poh': true});
});

	return stack;
})(stacks.stacks_in_308_page1);



