/* Im-Pact - js/jquery.scripts.js - jQuery-dependent scripts */



$(document).ready(function(){


	/* Fake Vertical centering of navPrimary links
	============================= */
	$('#navPrimary > li > a:last-child').each(function(){ /* `a:last-child` to skip anchors that have a sibling UL element */
		if( $(this).height() <= 15 ) {
			$(this).css({
				'line-height' : '30px'
			})
		}
	});


	/* Slideshow hanging quotes
	============================= */
	$('#features .svSlideshow dl').each(function(){
		var $slide_h3 = $(this).find('dd.summary h3');

		var $slide_h3_txt = $slide_h3.html();

		if ( ($slide_h3_txt.indexOf('“') == 0) || ($slide_h3_txt.indexOf('"') == 0) ) {
			$slide_h3.addClass('hang');
		}
	});


	/* Slideshow unlink images
	============================= */
	$('#features .svSlideshow dd.image img').unwrap();


	/* Content Tables
	============================= */
	// give all tables a class of 'columnar' if they don't already have a class of 'listing'
	$('div.content table').each(function(){
		if ( $(this).hasClass('listing') ){
			return
		} else {
			$(this).addClass('columnar');
		}
	});
	// apply classes to table.columnar cells to be styled by CSS
	$('table.columnar tr').each(function(){
		$(this).find('td:first-child, th:first-child').addClass('col-first');
		$(this).find('td:last-child, th:last-child').addClass('col-last');
		$(this).find('td:even').addClass('hilite');
	});


});



// $(window).load(function(){ /* wait for images to be loaded before firing js */
// 
// 
// });



/* EOF */

