
// '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_115_page11
// ---------------------------------------------------------------------

// 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_115_page11 = {};

// 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_115_page11 = (function(stack) {

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

//-- InfoBar Stack v1.0.6 by Joe Workman --//
/* Activebar2 is free software http://www.westhoffswelt.de */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(d($){$.7.4=d(a){p a=$.7.1b({},$.7.4.G,a);i($.7.4.8==q){$.7.4.8=H(a)}I($.7.4.8,a);$.7.4.y();$(\'.r\',$.7.4.8).1c();$(m).1d(d(){$(\'.r\',$.7.4.8).s(m)});$.7.4.8.J(\'z\');i(a.n!=q){$.7.4.8.z(d(){j.1e.1f=a.n})}$.7.4.8.9(\'e\',\'-\'+$.7.4.8.k()+\'o\');$.7.4.K()};$.7.4.G={\'l\':\'1g\',\'L\':\'#1h\',\'M\':\'1i\',\'N\':\'1j 1k 1l,1m,1n-1o\',\'O\':\'1p\',\'A\':\'1q\',\'t\':\'P/4-1r.Q\',\'R\':\'P/4-1s.Q\',\'n\':q};$.7.4.g=0;$.7.4.8=q;$.7.4.K=d(){i($.7.4.g>1){B}$.7.4.g=2;$.7.4.8.9(\'C\',\'1t\');p a=$.7.4.8.k();$.7.4.8.S({\'e\':\'+=\'+a+\'o\'},a*T,\'U\',d(){$.7.4.g=3})};$.7.4.y=d(){i($.7.4.g<2){B}$.7.4.g=1;p a=$.7.4.8.k();$.7.4.8.S({\'e\':\'-=\'+a+\'o\'},a*T,\'U\',d(){$.7.4.8.9(\'C\',\'V\');$.7.4.1u=1v})};d H(b){p c=$(\'<f></f>\').u(\'1w\',\'4-8\');c.9({\'C\':\'V\',\'W\':\'1x\',\'1y\':\'1z\',\'e\':\'X\',\'v\':\'X\',\'1A\':\'1B\'});$(j).1C(\'Y\',d(){c.w($(m).w())});$(j).1D(\'Y\');i($.D.1E&&($.D.Z.10(0,1)==\'5\'||$.D.Z.10(0,1)==\'6\')){c.9(\'W\',\'1F\');$(j).1G(d(){c.1H(11,11);i($.7.4.g==3){c.9(\'e\',$(j).12()+\'o\')}1I{c.9(\'e\',($(j).12()-c.k())+\'o\')}})}c.s($(\'<f></f>\').u(\'E\',\'t\').9({\'13\':\'v\',\'w\':\'x\',\'k\':\'x\',\'F\':\'14 h h h\'}));c.s($(\'<f></f>\').u(\'E\',\'15\').9({\'13\':\'1J\',\'F\':\'14 h h h\',\'w\':\'x\',\'k\':\'x\'}).z(d(a){$.7.4.y();a.1K()}));c.s($(\'<f></f>\').u(\'E\',\'r\').9({\'F\':\'1L 16 h 16\'}));$(\'1M\').1N(c);B c};d I(a,b){a.9({\'l\':b.l,\'1O\':\'1P 1Q \'+b.L});a.J(\'1R 1S\');a.1T(d(){$(m).9(\'17\',b.M)},d(){$(m).9(\'17\',b.l)});$(\'.t\',a).9(\'l\',\'18 n( \\\'\'+b.t+\'\\\' ) e v 19-1a\');$(\'.15\',a).9(\'l\',\'18 n( \\\'\'+b.R+\'\\\' ) e v 19-1a\');$(\'.r\',a).9({\'1U\':b.O,\'1V\':b.N,\'A\':b.A})}})(1W);',62,121,'||||activebar|||fn|container|css||||function|top|div|state|4px|if|window|height|background|this|url|px|var|null|content|append|icon|attr|left|width|16px|hide|click|fontSize|return|display|browser|class|margin|defaults|initializeActivebar|setOptionsOnContainer|unbind|show|border|highlight|font|fontColor|images|png|button|animate|20|linear|none|position|0px|resize|version|substring|true|scrollTop|float|6px|close|28px|backgroundColor|transparent|no|repeat|extend|empty|each|location|href|InfoBackground|c8c8c8|Highlight|Bitstream|Vera|Sans|verdana|sans|serif|InfoText|12px|information|closebtn|block|visible|false|id|fixed|zIndex|9999|cursor|pointer|bind|trigger|msie|absolute|scroll|stop|else|right|stopPropagation|8px|body|prepend|borderBottom|1px|solid|mouseenter|mouseleave|hover|color|fontFamily|jQuery'.split('|'),0,{}))

$(document).ready(function() {
    $('#infobar_stacks_in_115_page11').activebar({  button:'files/infobar-close.png',
                                    icon:'files/infobar-close.png',
                                    url:null,
                                    background:'#D36666',
                                    highlight:'#FF6666',
                                    font:'sans-serif, verdana',
                                    fontColor:'#FFFFFF',
                                    fontSize:'14pt'
    });
});
//-- End InfoBar Stack --//

	return stack;
})(stacks.stacks_in_115_page11);


// Javascript for stacks_in_46_page11
// ---------------------------------------------------------------------

// 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_46_page11 = {};

// 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_46_page11 = (function(stack) {

	// When jQuery is used it will be available as $ and jQuery but only
	// inside the closure.
	var jQuery = stacks.jQuery;
	var $ = jQuery;
	
/*!
 * jQuery Countdown plugin v1.0
 * http://www.littlewebthings.com/projects/countdown/
 *
 * Copyright 2010, Vassilis Dourdounis
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
/*!
 * jQuery Countdown plugin v1.0
 * http://www.littlewebthings.com/projects/countdown/
 *
 * Copyright 2010, Vassilis Dourdounis
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
(function($){

	$.fn.countDown = function (options) {

		config = {};

		$.extend(config, options);

		diffSecs = this.setCountDown(config);
	
		if (config.onComplete)
		{
			$.data($(this)[0], 'callback', config.onComplete);
		}
		if (config.omitWeeks)
		{
			$.data($(this)[0], 'omitWeeks', config.omitWeeks);
		}

		$('#' + $(this).attr('id') + ' .digit').html('<div class="top"></div><div class="bottom"></div>');
		$(this).doCountDown($(this).attr('id'), diffSecs, 500);

		return this;

	};

	$.fn.stopCountDown = function () {
		clearTimeout($.data(this[0], 'timer'));
	};

	$.fn.startCountDown = function () {
		this.doCountDown($(this).attr('id'),$.data(this[0], 'diffSecs'), 500);
	};

	$.fn.setCountDown = function (options) {
		var targetTime = new Date();

		if (options.targetDate)
		{
			targetTime = new Date(options.targetDate.month + '/' + options.targetDate.day + '/' + options.targetDate.year + ' ' + options.targetDate.hour + ':' + options.targetDate.min + ':' + options.targetDate.sec + (options.targetDate.utc ? ' UTC' : ''));
		}
		else if (options.targetOffset)
		{
			targetTime.setFullYear(options.targetOffset.year + targetTime.getFullYear());
			targetTime.setMonth(options.targetOffset.month + targetTime.getMonth());
			targetTime.setDate(options.targetOffset.day + targetTime.getDate());
			targetTime.setHours(options.targetOffset.hour + targetTime.getHours());
			targetTime.setMinutes(options.targetOffset.min + targetTime.getMinutes());
			targetTime.setSeconds(options.targetOffset.sec + targetTime.getSeconds());
		}

		var nowTime = new Date();

		diffSecs = Math.floor((targetTime.valueOf()-nowTime.valueOf())/1000);

		$.data(this[0], 'diffSecs', diffSecs);

		return diffSecs;
	};

	$.fn.doCountDown = function (id, diffSecs, duration) {
		$this = $('#' + id);
		if (diffSecs <= 0)
		{
			diffSecs = 0;
			if ($.data($this[0], 'timer'))
			{
				clearTimeout($.data($this[0], 'timer'));
			}
		}

		secs = diffSecs % 60;
		mins = Math.floor(diffSecs/60)%60;
		hours = Math.floor(diffSecs/60/60)%24;
		if ($.data($this[0], 'omitWeeks') == true)
		{
			days = Math.floor(diffSecs/60/60/24);
			weeks = Math.floor(diffSecs/60/60/24/7);
		}
		else 
		{
			days = Math.floor(diffSecs/60/60/24)%7;
			weeks = Math.floor(diffSecs/60/60/24/7);
		}

		$this.dashChangeTo(id, 'seconds_dash', secs, duration ? duration : 800);
		$this.dashChangeTo(id, 'minutes_dash', mins, duration ? duration : 1200);
		$this.dashChangeTo(id, 'hours_dash', hours, duration ? duration : 1200);
		$this.dashChangeTo(id, 'days_dash', days, duration ? duration : 1200);
		$this.dashChangeTo(id, 'weeks_dash', weeks, duration ? duration : 1200);

		$.data($this[0], 'diffSecs', diffSecs);
		if (diffSecs > 0)
		{
			e = $this;
			t = setTimeout(function() { e.doCountDown(id, diffSecs-1) } , 1000);
			$.data(e[0], 'timer', t);
		} 
		else if (cb = $.data($this[0], 'callback')) 
		{
			$.data($this[0], 'callback')();
		}

	};

	$.fn.dashChangeTo = function(id, dash, n, duration) {
		  $this = $('#' + id);
		 
		  for (var i=($this.find('.' + dash + ' .digit').length-1); i>=0; i--)
		  {
				var d = n%10;
				n = (n - d) / 10;
				$this.digitChangeTo('#' + $this.attr('id') + ' .' + dash + ' .digit:eq('+i+')', d, duration);
		  }
	};

	$.fn.digitChangeTo = function (digit, n, duration) {
		if (!duration)
		{
			duration = 800;
		}
		if ($(digit + ' div.top').html() != n + '')
		{

			$(digit + ' div.top').css({'display': 'none'});
			$(digit + ' div.top').html((n ? n : '0')).slideDown(duration);

			$(digit + ' div.bottom').animate({'height': ''}, duration, function() {
				$(digit + ' div.bottom').html($(digit + ' div.top').html());
				$(digit + ' div.bottom').css({'display': 'block', 'height': ''});
				$(digit + ' div.top').hide().slideUp(10);

			
			});
		}
	};

})(jQuery);


jQuery(document).ready(function() {
	
});

function dateFromString(dateString) {
	var str=dateString;
	var dateTimeSplit=str.split(" ");
	var dateSplit=dateTimeSplit[0].split("-");
	var timeSplit=dateTimeSplit[1].split(":");


	var theYear=dateSplit[0];
	var theMonth=dateSplit[1];
	var theDay=dateSplit[2];

	var theHour=parseInt(timeSplit[0]);
	var theMinute=parseInt(timeSplit[1]);
	var theSecond=parseInt(timeSplit[2]);
	
	theMonth-=1;
	
	var theDate=new Date(theYear, theMonth, theDay, theHour, theMinute, theSecond);
	return theDate;
}
function dateToUTC(theDate) {
	var UTCOffsetMilli=theDate.getTimezoneOffset()*60*1000;
	theDate=theDate.getTime()+UTCOffsetMilli;
	var theUTCDate=new Date(theDate);
	return theUTCDate;
}

function toUTC(theDate) {
	var UTCOffsetMilli=theDate.getTimezoneOffset()*60*1000;
	theDate=theDate.getTime()+UTCOffsetMilli;
	return theDate;
}
function dateShow() {
	var today=new Date();
	var startDate=dateFromString("2012-01-24 01:00:00");
	var endDate=dateFromString("2012-06-02 19:00:00");
	if(0) {
		today=toUTC(today);
	}
	
	if((today>startDate) && (today<endDate)){
	
		if('showContent'=='showContent') {
			document.getElementById('onTimestacks_in_46_page11').style.display="block";
			}
		else if('showContent'=='javascript') {
			eval("");
			}
		else if('showContent'=='redirect') {
			var theURL="http://www.rapid-ideas.com";
			document.location.href=theURL;
		}
		
		else if('showContent'=='loadScript') {
			jQuery.getScript("", function() {
				
			});
		}
		
	}
	
	
}

function showCountDown() {
	var str="2012-06-02 19:00:00";
	var dateTimeSplit=str.split(" ");
	var dateSplit=dateTimeSplit[0].split("-");
	var timeSplit=dateTimeSplit[1].split(":");


	var theYear=dateSplit[0];
	var theMonth=dateSplit[1];
	var theDay=dateSplit[2];

	var theHour=parseInt(timeSplit[0]);
	var theMinute=parseInt(timeSplit[1]);
	var theSecond=parseInt(timeSplit[2]);
	
	//theMonth-=1;
	
	
	$('#onTimestacks_in_46_page11 #stacks_in_46_page11countdown_dashboard').countDown({
					targetDate: {
						'day': 		theDay,
						'month': 	theMonth,
						'year': 	theYear,
						'hour': 	theHour,
						'min': 		theMinute,
						'sec': 		theSecond
					}
				});
		
		jQuery('#onTimestacks_in_46_page11 div.dash').css({
			'margin-left': jQuery('#onTimestacks_in_46_page11 div.digit').width()/4,
			'padding-left': jQuery('#onTimestacks_in_46_page11 div.digit').width()/5,
			'padding-right': jQuery('#onTimestacks_in_46_page11 div.digit').width()/5
			});
		jQuery('#onTimestacks_in_46_page11 #stacks_in_46_page11countdown_dashboard').css('width', ((jQuery('#onTimestacks_in_46_page11 div.dash').outerWidth())*5)+(jQuery('#onTimestacks_in_46_page11 div.digit').width()+6));
}

 
jQuery(function() {
	dateShow();
	if ('True'=='True') {
		showCountDown();
	}
});
	return stack;
})(stacks.stacks_in_46_page11);



