$(document).ready(function() {

	$('#callout .holder > ul').tabs({ fx: { opacity: 'toggle' } });
	$('#f-feature a').click(function () {
		$('#callout').addClass('feature');
	});
	$('#f-case a').click(function () {
		$('#callout').removeClass('feature');
	});
	
	$('.icons').addClass('pics');
	
	$(window).load(function() {
		$('#slidholder').cycle({
			timeout: 4000,
			delay: 2000,
			random: 0,
			pause: 1
		});
		
		$('.icons li').hide();
		$('.icon1').fadeIn(500, function(){
			$('.icon2').fadeIn(500, function(){
				$('.icon3').fadeIn(500, function(){
					$('.icon4').fadeIn(500);
				});
			});
		});
		$('.icons li').cycle({
			delay: 2000,
			random: 0,
			pause: 1
		});
		$('.icon1').cycle({ timeout: 3500 });
		$('.icon2').cycle({ timeout: 4000 });
		$('.icon3').cycle({ timeout: 3800 });
		$('.icon4').cycle({ timeout: 4200 });
		
		$('#featured').cycle({ 
			timeout: 4000,
			delay: 2000,
			pager: '#pager',
			pause: 1,
			pagerEvent: 'click',
			pauseOnPagerHover: true
		});
		
	});
	
	$("#login-frm").validate({
		errorContainer: "#error",
		errorLabelContainer: "#error ul",
		wrapper: "li"
	});
});





var friz = {
	src: '/js/friz.swf',
	ratios: [9, 1.27, 14, 1.19, 21, 1.16, 28, 1.13, 38, 1.12, 53, 1.11, 60, 1.1, 61, 1.11, 94, 1.1, 96, 1.09, 101, 1.1, 102, 1.09, 103, 1.1, 108, 1.09, 110, 1.1, 1.09],
	tuneHeight:'-8',
	offsetTop: '-5'
	};
	
var frizStrong = {
	src: '/js/friz-strong.swf',
	ratios: [9, 1.27, 14, 1.19, 21, 1.16, 28, 1.13, 38, 1.12, 53, 1.11, 60, 1.1, 61, 1.11, 94, 1.1, 96, 1.09, 101, 1.1, 102, 1.09, 103, 1.1, 108, 1.09, 110, 1.1, 1.09],
	tuneHeight:'-8',
	offsetTop: '-5'
	};

sIFR.activate(friz,frizStrong);

sIFR.replace(frizStrong, {
	selector: '#info.green h2.strong',
	css: [
		'.sIFR-root { color: #ffffff; leading: 5; }'
		],
	filters: { DropShadow: { knockout: false, distance: 1, color: '#4c6b26', strength: 1 } },
	wmode: 'transparent'
});

sIFR.replace(friz, {
	selector: '.green-header h2',
	css: [
		'.sIFR-root { color: #ffffff; leading: 5; }',
	],
	filters: { DropShadow: { knockout: false, distance: 1, color: '#4c6b26', strength: 1 } },
	wmode: 'transparent'
});

sIFR.replace(friz, {
	selector: '#info.green h2',
	css: [
		'.sIFR-root { color: #ffffff; leading: 5; }',
	],
	filters: { DropShadow: { knockout: false, distance: 1, color: '#4c6b26', strength: 1 } },
	wmode: 'transparent'
});

sIFR.replace(friz, {
	selector: '#info h2',
	css: [
		'.sIFR-root { leading: 5; }'
		]
});

sIFR.replace(friz, {
	selector: '#clients h2',
	tuneHeight:'-9',
	offsetTop: '-3',
	css: [
		'.sIFR-root { color: #a27c5f; text-align: center; leading: 0; }'
		],
	wmode: 'transparent'
});

sIFR.replace(frizStrong, {
	selector: '#clients .fields label',
	tuneHeight:'-1',
	offsetTop: '3',
	css: [
		'.sIFR-root { text-align: right; color: #6f8e41; leading: 5; }'
		],
	wmode: 'transparent'
});



sIFR.replace(frizStrong, {
	selector: '#info.green h3',
	offsetTop: '-3',
	css: [
		'.sIFR-root { color: #ffffff; leading: 5; }'
		],
	filters: { DropShadow: { knockout: false, distance: 1, color: '#4c6b26', strength: 1 } },
	wmode: 'transparent'
});

sIFR.replace(frizStrong, {
	selector: '#info h3',
	offsetTop: '-3',
	css: [
		'.sIFR-root { color: #4c6b26; leading: 5; }'
		],
	wmode: 'transparent'
});

sIFR.replace(frizStrong, {
	selector: '#subinfo.green h2',
	css: [
		'.sIFR-root { color: #ffffff; leading: -3; }'
		],
	filters: { DropShadow: { knockout: false, distance: 1, color: '#4c6b26', strength: 1 } },
	wmode: 'transparent'
});

sIFR.replace(frizStrong, {
	selector: '#subinfo h2',
	css: [
		'.sIFR-root { leading: -5; }'
		]
});
