// 2010.02.14 - For Lorem Ipsum
// Grendelfly - A Division of SC&G Technology Solutions
//
// Requires JQuery: jquery-1.3.2.min.js or above



$(function(){
$(document).ready(function() {

// Rotating Picture Funtion
	var target = '#hero img'
	var pnl = 0;
	var lng = $(target).length;
	var fTimer = setInterval(function(){fRotate()}, 8000); // timed at 5 seconds per rotation
	
	$(target).each( function(x,e){
		if(x == pnl){ $(e).fadeIn(800) };
		});
							
	function fRotate(){
		pnl++; if(pnl == lng){pnl = 0};
		$(target).fadeOut(1800);
		$(target).each( function(x,e){
			if(x == pnl){ $(e).fadeIn(1800) };
			});
		}; // function fRotate()

// Belt Link Function
	$('ul#belt li,#pnl ul li').click(function(){
		var g_url = $(this).children('a').attr('href');
		window.location.assign(g_url);
		});


//  Color Box Functions
	$("a.clr_bx").colorbox({transition:"elastic"}); // single
	$("a[rel='clr_bx']").colorbox({transition:"elastic"}); // group

// External Links - Open in new window
// Ancor tags with class of 'ext'
	$('a.ext').each(function(){
		$(this).attr({'target':'_blank'});
	});



}); // $(document).ready(function()
}); // $(function()


