$( document ).ready( function()
{
	var hrefparts = location.href.split( '/' );
	if( hrefparts[3] == '' )
	{
		hrefparts[3] = 'home';
	}
	$( '#' + hrefparts[3] ).addClass( 'active' );
	$( '#' + hrefparts[3] + '_footer' ).addClass( 'active' );
});

/**
 * ZEBRA TABLE
 */
$( window ).load( function() { $( '.zebra' ).zebra(); } );

$( window ).load( function() { $( 'a.a_delete' ).click( function() { return confirm( 'Are you sure?' ); } ); } );

function newsletterAjax( obj )
{
	var f = $( obj );
	f.css( 'position', 'relative' );
	var loading = '<div style="margin:0; padding: 0; position: absolute; top: 0; left: 0; width: ' + f.width() + 'px; height: ' + f.height() + 'px; background: #a5a4a4 url( /img/loadingAnimation.gif ) 50% 50% no-repeat; color:#c2272d; text-align: center; vertical-align: middle; filter:alpha(opacity=60); -moz-opacity: 0.6; opacity: 0.6;">&nbsp;</div>';
	f.append( loading );
	$.ajax( {
	   type: "post",
	   url: f.attr( 'action' ),
	   dataType: "html",
	   data: f.serialize(),
	   success: function( response ) {
	     f.replaceWith( response );
	   }
	} );
	
	return false;
}
