
$(document).ready( function() {

	var IE6 = (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) == 6);
	if(IE6) {
		/// PNGs
		$("img[src$='.png']").each(function() {
			var src = $(this).attr('src');
			$(this).attr("src", "http://www.dynamit.us/img/spacer.gif").attr("style", "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "');");
		});

		document.execCommand("BackgroundImageCache",false,true);
	}
	
	
	// setup the lightbox.
	$(".lightbox").lightbox();


	// CAROUSEL -- homepage
	$('#photos-container ul').dynamItCarousel({
		prev: '.arrowleft2',
		next: '.arrowright2',
		indexnav: '#carousel ul',
		width: 431,
		inview: 1,
		wraparound: true,
		slideshow: true,
		slideshowtimeout: 7000,
		onafter: function(obj, i) {
			var desc = $('#photos-container ul').children('li').eq(obj).find('img').attr('alt');
			$('#photo-tab').html(desc);
		}
	});

	// CAROUSEL -- homepage indexnav
	$('#carousel ul').dynamItCarousel({
		prev: '.arrowleft',
		next: '.arrowright',
		width: 320,
		inview: 4,
		wraparound: true
	});

	$('#qdl').click( function() {
		if($('#qdl-list').css('display') == 'none') {
			$('#qdl-list').css('display', 'block');
		} else {
			$('#qdl-list').css('display', 'none');
	     }
	});

});

function overlay(pg) {
	dynamItLoad(pg, null, null, null, null);
}

function em() {

}
