2017-01-12 00:24:32 +01:00
|
|
|
// remap jQuery to $
|
2017-01-16 22:57:11 +01:00
|
|
|
(function ($) {
|
2017-01-12 00:24:32 +01:00
|
|
|
|
|
|
|
|
2017-01-16 22:57:11 +01:00
|
|
|
$('div.french').hide();
|
|
|
|
$('#main > div > div').hide();
|
2017-01-12 00:24:32 +01:00
|
|
|
|
2017-01-16 22:57:11 +01:00
|
|
|
$('#en-lang').click(function () {
|
|
|
|
$('.french').hide();
|
|
|
|
$('.english').show();
|
|
|
|
});
|
2017-01-12 00:24:32 +01:00
|
|
|
|
2017-01-16 22:57:11 +01:00
|
|
|
$('#fr-lang').click(function () {
|
|
|
|
$('.french').show();
|
|
|
|
$('.english').hide();
|
|
|
|
});
|
2017-01-12 00:24:32 +01:00
|
|
|
|
2017-01-16 22:57:11 +01:00
|
|
|
$('h2').click(function () {
|
|
|
|
$('h2').removeClass('active');
|
|
|
|
$(this).addClass('active');
|
|
|
|
$('#main > div > div').slideUp();
|
|
|
|
$(this).next('div').slideDown();
|
|
|
|
});
|
2017-01-12 00:24:32 +01:00
|
|
|
|
2017-01-16 22:57:11 +01:00
|
|
|
$('hr').hide();
|
2017-01-12 00:24:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
})(window.jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
// usage: log('inside coolFunc',this,arguments);
|
|
|
|
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
|
2017-01-16 22:57:11 +01:00
|
|
|
window.log = function () {
|
|
|
|
log.history = log.history || []; // store logs to an array for reference
|
|
|
|
log.history.push(arguments);
|
|
|
|
if (this.console) {
|
|
|
|
console.log(Array.prototype.slice.call(arguments));
|
|
|
|
}
|
2017-01-12 00:24:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// catch all document.write() calls
|
2017-01-16 22:57:11 +01:00
|
|
|
(function (doc) {
|
|
|
|
var write = doc.write;
|
|
|
|
doc.write = function (q) {
|
|
|
|
log('document.write(): ', arguments);
|
|
|
|
if (/docwriteregexwhitelist/.test(q)) write.apply(doc, arguments);
|
|
|
|
};
|
2017-01-12 00:24:32 +01:00
|
|
|
})(document);
|
|
|
|
|
|
|
|
|