/*
Local Variables:
coding: utf-8
End:
 */

var XLII = function () {


//privé-------------------------------------------------------------------------

	var _domains = {
		internet: 'internet.tld',
		xlii: 'quarante-deux.org'
	};

	var _ax = ['2843440734', 'Axiomatique', 'axiomatique'];
	var _ra = ['2843440823', 'Radieux',     'radieux'];
	var _oc = ['2843440947', 'Océanique',   'oceanique'];

	var _axraoc = [_ax, _ra, _ra, _ra, _oc, _oc][Math.floor(Math.random()*6)];

	var _$ad = $(
		'<div class="aside" id="publivre">' +
			'<h2>En librairie</h2>' +
			'<h3>' +
				'<a href="http://www.amazon.fr/exec/obidos/ASIN/' + _axraoc[0] + '/quarantedeux-21" title="Chercher ce livre sur amazon.fr">' + _axraoc[1] + '</a>' +
			'</h3>' +
			'<p>' +
				'<a href="http://www.amazon.fr/exec/obidos/ASIN/' + _axraoc[0] + '/quarantedeux-21" title="Chercher ce livre sur amazon.fr">' +
					'<img src="/cosmos/themes/theme-xlii/pub/' + _axraoc[2] + '.jpg" alt="" height="131" width="92" />' +
				'</a>' +
			'</p>' +
			'<p>Recueil<br />de Greg Egan</p>' +
		'</div><!-- /#publivre -->'
	);


//public------------------------------------------------------------------------

	var self = new Object();

	self.description = 'Quarante-Deux/Cosmos privés : carnets personnels';
	self.version = '0.0.3 (2011-04-09T00:00:00+00:00)';

	self.init = function () {

		window.defaultStatus = self.description;

		$(document).ready(function () {

			_$ad.insertAfter('#blogextra');

			$('a[href^="mailto:"]')
				.css({cursor: 'url(/images/int/zig/mail_cursor.gif), pointer'})
				.attr('href', function () {
					var mailto = this.href;
					var address = mailto.split(':')[1].split('(arrobase)')[0];
					return mailto.replace(_domains.internet, _domains[address]);
				})
				.click(function () {
					this.href = this.href.replace('(arrobase)', '@');
				});

			$('#q').parents('form').submit(function () {
				return this.q.value ? true : false;
			});

		});
	};



	return self;

}();


XLII.init();

