﻿// settings
var settings = new Object();
//
settings.colors = new Object();
settings.colors.bg = 0x655d5f;
settings.colors.blue = 0x46a5d5;
settings.colors.blueLight = 0x96bfde;
settings.colors.grayMedium1 = 0x847d7f;
settings.colors.grayMedium2 = 0xcbcbce;
settings.colors.orange = 0xf57e20;
settings.colors.textTitle = 0x635757;
settings.colors.textGray = 0x6d6e71;
settings.colors.textLightGray = 0xdad8d8;
//
settings.animSlow = 1000;
settings.animNormal = 500;
settings.animFast = 250;
settings.animNull = 0;

//
var ajaxPage = '/AJAX.aspx';

// jCache
var jCache = new Object();

// on DOM ready
$(function()
{
	// showme automation
	jCache.showmeImages = $('img[rel="showme"], img[rel$="showme"], img[rel^="showme"]');
	jCache.showmeImages.css('display', 'none').load(function(){
		ShowMe(this);
	});
	window.setTimeout('jCache.showmeImages.trigger(\'load\')', 500);

	// fix cols height
	jCache.cols = $('#cols');
	jCache.cols.height(Math.max(jCache.cols.height(), $(document).height()));

	// fix single columns height
	jCache.columns = jCache.cols.find('.col');
	jCache.columns.height(jCache.cols.height());

	// fix first column bg
	jCache.col1bg = jCache.cols.find('.col .bg');
	jCache.col1bg.css('opacity', 0.25).css('background-color', '#FFF').height(jCache.cols.height());
	
	// fix reserved area > register bg height
	$('#bg_panel').height(jCache.cols.height());
});

//
function ShowMe(sender)
{
	var j = $(sender);
	if(j.is(':visible')) return;
	j.css('opacity', 0.0).show().animate({'opacity': 1.0}, {queue:false, duration:settings.animSlow, complete:function(){$(this).css('opacity', '')}});
};
