/* ############################################# */
/* #  WocaDirect                               # */
/* # ......................................... # */
/* #  RUBIX MEDIA LLC                          # */
/* #  @pgold - 7 JUN 2009                      # */
/* ############################################# */



// Initialize globals
var page_init = function() {
	extendCSS.init();
}
jQuery(document).ready(page_init);


var extendCSS = {
	init: function() {
		/* set first and last child classes
		   TO-DO: however, if we are "only child", we need to handle that as well
		*/
		jQuery('li:first-child').each(function(i){
			if (jQuery(this).siblings().length > 0) {
				if (this.className.match('current')) {
					jQuery(this).addClass('current_firstChild');
				} else {
					jQuery(this).addClass('firstChild');
				}
			}
		});
		jQuery('li:last-child, div.component:last-child').each(function(i){
			if (jQuery(this).siblings().length > 0) {
				if (this.className.match('current')) {
					jQuery(this).addClass('current_lastChild');
				} else {
					jQuery(this).addClass('lastChild');
				}
			}
		});
	}
};


