');
$('.grille', $fiche).css({
'width': '100%',
'height': '100%',
'position': 'relative'
});
}
for (var l = 0; l < this.settings.lines; l++) {
_cells[l] = new Array();
for (var c = 0; c < this.settings.columns; c++) {
_cells[l][c] = new Cell(this, c, l);
};
};
_allBlocks = $('.grid-block', $fiche).length;
if (this.settings.grille) {
_grilleInterval = setInterval(function(){
if(_prePlacedBlocks < _allBlocks){
_placeBlock($('.grid-block', $fiche).eq(_prePlacedBlocks));
_prePlacedBlocks ++;
}else{
clearInterval(_grilleInterval);
}
},1000);
}else{
$('.grid-block', $fiche).each(function() {
// _allBlocks++;
_placeBlock(this);
});
}
function _block_placed(){
// console.log('_block_placed _allBlocks = '+_allBlocks+' _placedBlocks = '+_placedBlocks)
_placedBlocks++;
if(_placedBlocks == _allBlocks){
var event = jQuery.Event('grid_ready');
event.grid = _thisgrid;
$fiche.trigger(event);
}
}
/**
*
*/
function _placeBlock(_this){
//console.log('_placeBlock', _this);
var $this = $(_this),
this_cells_w = 0,
this_cells_h = 0,
free_cells = [];
// if($this.hasClass('image')){
// var sizes = [155, 330, 505],
// i = sizes.length,
// $img = $('img', $this),
// $legende = $('.legende', $this);
//
// while(free_cells.length == 0 && i > 0){
// i--;
// $img.width(sizes[i]);
// $this.width(sizes[i]+$legende.outerWidth()+2);
// this_cells_w = Math.ceil($this.width() / (_thisgrid.settings.cell_w + _thisgrid.settings.gouttiere)),
// this_cells_h = Math.ceil($this.height() / (_thisgrid.settings.cell_h + _thisgrid.settings.gouttiere));
// free_cells = getFreeCells(this_cells_w, this_cells_h);
// }
// }else{
this_cells_w = Math.ceil($this.width() / (_thisgrid.settings.cell_w + _thisgrid.settings.gouttiere)),
this_cells_h = Math.ceil($this.height() / (_thisgrid.settings.cell_h + _thisgrid.settings.gouttiere));
free_cells = getFreeCells(this_cells_w, this_cells_h);
// }
if(free_cells.length > 0){
// var cell_num = Math.round(Math.random() * (free_cells.length - 1));
// var cell_num = 0;
var cell_num = Math.floor((free_cells.length-1)*0.5 + (-2+Math.random()*4));
cell_num = cell_num > free_cells.length-1 ? free_cells.length-1 : ( cell_num < 0 ? 0 : cell_num );
var cell = free_cells[cell_num],
line_limit_loop = cell.getPos().l + (this_cells_h),
column_limit_loop = cell.getPos().c + (this_cells_w);
for (var l = cell.getPos().l; l < line_limit_loop; l++) {
for (var c = cell.getPos().c; c < column_limit_loop; c++) {
var temp_cell = _cells[l][c];
temp_cell.setFull();
};
};
var top = cell.getPos().l * (_thisgrid.settings.cell_h + _thisgrid.settings.gouttiere),
left = cell.getPos().c * (_thisgrid.settings.cell_w + _thisgrid.settings.gouttiere),
latitude = _thisgrid.settings.latitude;
top = !_thisgrid.settings.decalage ? top: top + Math.round(Math.random() * latitude - latitude / 2)
left = !_thisgrid.settings.decalage ? left: left + Math.round(Math.random() * latitude - latitude / 2);
$this.css({
'top': top+_thisgrid.settings.padding.t,
'left': left+_thisgrid.settings.padding.l
});
_thisgrid.maxheight = Math.max(top+_thisgrid.settings.padding.t+$this.height(), _thisgrid.maxheight);
_thisgrid.maxwidth = Math.max(left+_thisgrid.settings.padding.l+$this.width(), _thisgrid.maxwidth);
_block_placed();
} else {
if(!_thisgrid.settings.augmentable){
$this.css({
'border': '2px solid red',
'opacity': 0.2
}).remove();
_block_placed();
}else{
_augmenteGrid();
//console.log('re placeblock');
_placeBlock(_this);
}
}
}
function _augmenteGrid(){
// for (var l = 0; l < this.settings.lines; l++) {
var l = _thisgrid.settings.lines ;
_thisgrid.settings.lines ++;
_cells[l] = new Array();
for (var c = 0; c < _thisgrid.settings.columns; c++) {
_cells[l][c] = new Cell(_thisgrid, c, l);
};
// };
_refreshCells();
// console.log('lines = '+_thisgrid.settings.lines+' | columns = '+_thisgrid.settings.columns);
};
function _refreshCells(){
for (var l = _thisgrid.settings.lines-1; l >= 0 ; l--) {
for (var c = _thisgrid.settings.columns-1; c >= 0 ; c--) {
_cells[l][c].refresh();
}
}
}
/**
* getFreeCells()
*/
function getFreeCells(this_cells_w, this_cells_h){
var free_cells = new Array();
for (var l = 0; l < _thisgrid.settings.lines; l++) {
for (var c = 0; c < _thisgrid.settings.columns; c++) {
var cell = _cells[l][c];
if (cell.isFree() && (cell.getAround().right + 1) >= this_cells_w && (cell.getAround().bottom + 1) >= this_cells_h) {
var good = true;
for (var i = 1; i < this_cells_w; i++) {
var temp_cell = _cells[l][c + i];
if ((temp_cell.getAround().bottom + 1) < this_cells_h) {
good = false;
break;
}
};
if (good) free_cells.push(cell);
}
};
};
return free_cells;
}
/**
* Cell()
*/
function Cell(g, c, l) {
var _g = g,
_column = c,
_line = l,
_free = true,
_free_cell_right = _g.settings.columns - 1 - c,
_free_cell_bottom = _g.settings.lines - 1 - l;
if (_g.settings.grille) {
var _table = '
' + _table + '
');
var _dom = $('.cell-' + l + '-' + c, _g.fiche.find('.grille'));
_dom.css({
'position': 'absolute',
'top': _line * (_g.settings.cell_h + _g.settings.gouttiere) + _g.settings.padding.t,
'left': _column * (_g.settings.cell_w + _g.settings.gouttiere) + _g.settings.padding.l,
'width': _g.settings.cell_w,
'height': _g.settings.cell_h,
'backgroundColor': '#00FF00',
'opacity': 0.6
}).find('table').css({
width:'100%',
height:'100%'
}).find('td').css({width:"30%"});
// $('td', _dom).css({
// 'fontSize': '8px'
// });
}
this.isFree = function() {
return _free;
};
this.getPos = function() {
return {
c: _column,
l: _line
};
};
this.getAround = function() {
return {
right: _free_cell_right,
bottom: _free_cell_bottom
};
};
this.setFull = function() {
_free = false;
_free_cell_bottom = -1;
_free_cell_right = -1;
if (_g.settings.grille) {
_dom.css({
'backgroundColor': '#0000FF'
});
$('.fb', _dom).html(_free_cell_bottom);
$('.fr', _dom).html(_free_cell_right);
}
_propageFreeCells();
};
this.setFreeCellsRight = function(right) {
if (_free) {
// console.log('_setFreeCellRigth | _free_cell_right = ' + _free_cell_right + ' | new right = ' + right);
_free_cell_right = right;
if (_g.settings.grille) $('.fr', _dom).html(_free_cell_right);
_propageFreeCellsLeft();
}
};
this.setFreeCellsBottom = function(bottom) {
if (_free) {
// console.log('_setFreeCellsBottom | _free_cell_bottom = ' + _free_cell_bottom + ' | new right = ' + bottom);
_free_cell_bottom = bottom;
if (_g.settings.grille) $('.fb', _dom).html(_free_cell_bottom);
_propageFreeCellsTop();
}
};
this.refresh = function(){
if(_free)
_propageFreeCellsTop();
};
function _propageFreeCells() {
// console.log('_propageFreeCells');
_propageFreeCellsLeft();
_propageFreeCellsTop();
};
function _propageFreeCellsLeft() {
// console.log('_propageFreeCellsLeft | _column = '+_column);
if (_column > 0) {
var left_cel = _cells[_line][_column - 1];
left_cel.setFreeCellsRight(_free_cell_right + 1);
}
};
function _propageFreeCellsTop() {
// console.log('_propageFreeCellsTop | _line = '+_line);
if (_line > 0) {
var top_cel = _cells[_line - 1][_column];
top_cel.setFreeCellsBottom(_free_cell_bottom + 1);
}
};
if (typeof Cell.initialized == "undefined") {
Cell.prototype.infos = function() {
//console.log('cell | column = ' + this.getPos().c + ', line = ' + this.getPos().l + ', free = ' + this.isFree() + ', free cell right = ' + this.getAround().right + ', free cell bottom = ' + this.getAround().bottom);
};
Cell.initialized = true;
}
}; // cell()
this.clear = function(){
$('.grille', $fiche).fadeOut(200, function() {
$(this).remove();
});
}
}; // GRIB
/**
* on resize
*/
// debulked onresize handler
function on_resize(c,t){onresize=function(){clearTimeout(t);t=setTimeout(c,100)};return c};
on_resize(function() { if(typeof _timeline != 'undefined') _timeline.redraw(); });
/**
* cookies
*/
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name,"",-1);
}
/**
* init
*/
init();
}
function _initPaScPlayer($container, ap){
var $container = $container || $('body');
var ap = ap || false;
// console.log('_initPaScPlayer');
$.paScPlayer.stopAll();
var $links = $('a[rel="soundcloud"]', $container);
// console.log('$links', $links);
if($links.size()){
$links.parents('.field-item').find('span.ext').remove();
$links.paScPlayer({autoplay:ap});
}
}
_initPaScPlayer();
};
$.fn.verticalcenter = function(){
return this.each(function(index) {
$(this).css({
"margin-top": ($(this).parent().height() - $(this).height()) / 2
});
});
};
$.fn.innerheight = function(){
var h = 0;
this.chlidren().each(function(index) {
h = h + $(this).height() + parseInt($(this).css('margin-top')) + parseInt($(this).css('margin-bottom')) + parseInt($(this).css('padding-top')) + parseInt($(this).css('padding-bottom'))
});
return h;
};
})(jQuery);
/** HELPERS */
/**
* returned value: (Array)
*/
array_remove= function(ar){
var what, a= arguments, L= a.length, ax;
while(L && ar.length){
what= a[--L];
while((ax= ar.indexOf(what))!= -1){
ar.splice(ax, 1);
}
}
return ar;
};
array_indexOf = function(ar, what, i){
i= i || 0;
var L= ar.length;
while(i< L){
if(ar[i]=== what) return i;
++i;
}
return -1;
};
array_randomize = function(arr) {
for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x);
return arr;
};
function objectIsEmpty(obj){
for (var prop in obj) {
if (obj.hasOwnProperty(prop))
return false;
};
return true;
}
var Latinise={};Latinise.latin_map={"Á":"A","Ă":"A","Ắ":"A","Ặ":"A","Ằ":"A","Ẳ":"A","Ẵ":"A","Ǎ":"A","Â":"A","Ấ":"A","Ậ":"A","Ầ":"A","Ẩ":"A","Ẫ":"A","Ä":"A","Ǟ":"A","Ȧ":"A","Ǡ":"A","Ạ":"A","Ȁ":"A","À":"A","Ả":"A","Ȃ":"A","Ā":"A","Ą":"A","Å":"A","Ǻ":"A","Ḁ":"A","Ⱥ":"A","Ã":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ḃ":"B","Ḅ":"B","Ɓ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ć":"C","Č":"C","Ç":"C","Ḉ":"C","Ĉ":"C","Ċ":"C","Ƈ":"C","Ȼ":"C","Ď":"D","Ḑ":"D","Ḓ":"D","Ḋ":"D","Ḍ":"D","Ɗ":"D","Ḏ":"D","Dz":"D","Dž":"D","Đ":"D","Ƌ":"D","DZ":"DZ","DŽ":"DZ","É":"E","Ĕ":"E","Ě":"E","Ȩ":"E","Ḝ":"E","Ê":"E","Ế":"E","Ệ":"E","Ề":"E","Ể":"E","Ễ":"E","Ḙ":"E","Ë":"E","Ė":"E","Ẹ":"E","Ȅ":"E","È":"E","Ẻ":"E","Ȇ":"E","Ē":"E","Ḗ":"E","Ḕ":"E","Ę":"E","Ɇ":"E","Ẽ":"E","Ḛ":"E","Ꝫ":"ET","Ḟ":"F","Ƒ":"F","Ǵ":"G","Ğ":"G","Ǧ":"G","Ģ":"G","Ĝ":"G","Ġ":"G","Ɠ":"G","Ḡ":"G","Ǥ":"G","Ḫ":"H","Ȟ":"H","Ḩ":"H","Ĥ":"H","Ⱨ":"H","Ḧ":"H","Ḣ":"H","Ḥ":"H","Ħ":"H","Í":"I","Ĭ":"I","Ǐ":"I","Î":"I","Ï":"I","Ḯ":"I","İ":"I","Ị":"I","Ȉ":"I","Ì":"I","Ỉ":"I","Ȋ":"I","Ī":"I","Į":"I","Ɨ":"I","Ĩ":"I","Ḭ":"I","Ꝺ":"D","Ꝼ":"F","Ᵹ":"G","Ꞃ":"R","Ꞅ":"S","Ꞇ":"T","Ꝭ":"IS","Ĵ":"J","Ɉ":"J","Ḱ":"K","Ǩ":"K","Ķ":"K","Ⱪ":"K","Ꝃ":"K","Ḳ":"K","Ƙ":"K","Ḵ":"K","Ꝁ":"K","Ꝅ":"K","Ĺ":"L","Ƚ":"L","Ľ":"L","Ļ":"L","Ḽ":"L","Ḷ":"L","Ḹ":"L","Ⱡ":"L","Ꝉ":"L","Ḻ":"L","Ŀ":"L","Ɫ":"L","Lj":"L","Ł":"L","LJ":"LJ","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ń":"N","Ň":"N","Ņ":"N","Ṋ":"N","Ṅ":"N","Ṇ":"N","Ǹ":"N","Ɲ":"N","Ṉ":"N","Ƞ":"N","Nj":"N","Ñ":"N","NJ":"NJ","Ó":"O","Ŏ":"O","Ǒ":"O","Ô":"O","Ố":"O","Ộ":"O","Ồ":"O","Ổ":"O","Ỗ":"O","Ö":"O","Ȫ":"O","Ȯ":"O","Ȱ":"O","Ọ":"O","Ő":"O","Ȍ":"O","Ò":"O","Ỏ":"O","Ơ":"O","Ớ":"O","Ợ":"O","Ờ":"O","Ở":"O","Ỡ":"O","Ȏ":"O","Ꝋ":"O","Ꝍ":"O","Ō":"O","Ṓ":"O","Ṑ":"O","Ɵ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Õ":"O","Ṍ":"O","Ṏ":"O","Ȭ":"O","Ƣ":"OI","Ꝏ":"OO","Ɛ":"E","Ɔ":"O","Ȣ":"OU","Ṕ":"P","Ṗ":"P","Ꝓ":"P","Ƥ":"P","Ꝕ":"P","Ᵽ":"P","Ꝑ":"P","Ꝙ":"Q","Ꝗ":"Q","Ŕ":"R","Ř":"R","Ŗ":"R","Ṙ":"R","Ṛ":"R","Ṝ":"R","Ȑ":"R","Ȓ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꜿ":"C","Ǝ":"E","Ś":"S","Ṥ":"S","Š":"S","Ṧ":"S","Ş":"S","Ŝ":"S","Ș":"S","Ṡ":"S","Ṣ":"S","Ṩ":"S","Ť":"T","Ţ":"T","Ṱ":"T","Ț":"T","Ⱦ":"T","Ṫ":"T","Ṭ":"T","Ƭ":"T","Ṯ":"T","Ʈ":"T","Ŧ":"T","Ɐ":"A","Ꞁ":"L","Ɯ":"M","Ʌ":"V","Ꜩ":"TZ","Ú":"U","Ŭ":"U","Ǔ":"U","Û":"U","Ṷ":"U","Ü":"U","Ǘ":"U","Ǚ":"U","Ǜ":"U","Ǖ":"U","Ṳ":"U","Ụ":"U","Ű":"U","Ȕ":"U","Ù":"U","Ủ":"U","Ư":"U","Ứ":"U","Ự":"U","Ừ":"U","Ử":"U","Ữ":"U","Ȗ":"U","Ū":"U","Ṻ":"U","Ų":"U","Ů":"U","Ũ":"U","Ṹ":"U","Ṵ":"U","Ꝟ":"V","Ṿ":"V","Ʋ":"V","Ṽ":"V","Ꝡ":"VY","Ẃ":"W","Ŵ":"W","Ẅ":"W","Ẇ":"W","Ẉ":"W","Ẁ":"W","Ⱳ":"W","Ẍ":"X","Ẋ":"X","Ý":"Y","Ŷ":"Y","Ÿ":"Y","Ẏ":"Y","Ỵ":"Y","Ỳ":"Y","Ƴ":"Y","Ỷ":"Y","Ỿ":"Y","Ȳ":"Y","Ɏ":"Y","Ỹ":"Y","Ź":"Z","Ž":"Z","Ẑ":"Z","Ⱬ":"Z","Ż":"Z","Ẓ":"Z","Ȥ":"Z","Ẕ":"Z","Ƶ":"Z","IJ":"IJ","Œ":"OE","ᴀ":"A","ᴁ":"AE","ʙ":"B","ᴃ":"B","ᴄ":"C","ᴅ":"D","ᴇ":"E","ꜰ":"F","ɢ":"G","ʛ":"G","ʜ":"H","ɪ":"I","ʁ":"R","ᴊ":"J","ᴋ":"K","ʟ":"L","ᴌ":"L","ᴍ":"M","ɴ":"N","ᴏ":"O","ɶ":"OE","ᴐ":"O","ᴕ":"OU","ᴘ":"P","ʀ":"R","ᴎ":"N","ᴙ":"R","ꜱ":"S","ᴛ":"T","ⱻ":"E","ᴚ":"R","ᴜ":"U","ᴠ":"V","ᴡ":"W","ʏ":"Y","ᴢ":"Z","á":"a","ă":"a","ắ":"a","ặ":"a","ằ":"a","ẳ":"a","ẵ":"a","ǎ":"a","â":"a","ấ":"a","ậ":"a","ầ":"a","ẩ":"a","ẫ":"a","ä":"a","ǟ":"a","ȧ":"a","ǡ":"a","ạ":"a","ȁ":"a","à":"a","ả":"a","ȃ":"a","ā":"a","ą":"a","ᶏ":"a","ẚ":"a","å":"a","ǻ":"a","ḁ":"a","ⱥ":"a","ã":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ḃ":"b","ḅ":"b","ɓ":"b","ḇ":"b","ᵬ":"b","ᶀ":"b","ƀ":"b","ƃ":"b","ɵ":"o","ć":"c","č":"c","ç":"c","ḉ":"c","ĉ":"c","ɕ":"c","ċ":"c","ƈ":"c","ȼ":"c","ď":"d","ḑ":"d","ḓ":"d","ȡ":"d","ḋ":"d","ḍ":"d","ɗ":"d","ᶑ":"d","ḏ":"d","ᵭ":"d","ᶁ":"d","đ":"d","ɖ":"d","ƌ":"d","ı":"i","ȷ":"j","ɟ":"j","ʄ":"j","dz":"dz","dž":"dz","é":"e","ĕ":"e","ě":"e","ȩ":"e","ḝ":"e","ê":"e","ế":"e","ệ":"e","ề":"e","ể":"e","ễ":"e","ḙ":"e","ë":"e","ė":"e","ẹ":"e","ȅ":"e","è":"e","ẻ":"e","ȇ":"e","ē":"e","ḗ":"e","ḕ":"e","ⱸ":"e","ę":"e","ᶒ":"e","ɇ":"e","ẽ":"e","ḛ":"e","ꝫ":"et","ḟ":"f","ƒ":"f","ᵮ":"f","ᶂ":"f","ǵ":"g","ğ":"g","ǧ":"g","ģ":"g","ĝ":"g","ġ":"g","ɠ":"g","ḡ":"g","ᶃ":"g","ǥ":"g","ḫ":"h","ȟ":"h","ḩ":"h","ĥ":"h","ⱨ":"h","ḧ":"h","ḣ":"h","ḥ":"h","ɦ":"h","ẖ":"h","ħ":"h","ƕ":"hv","í":"i","ĭ":"i","ǐ":"i","î":"i","ï":"i","ḯ":"i","ị":"i","ȉ":"i","ì":"i","ỉ":"i","ȋ":"i","ī":"i","į":"i","ᶖ":"i","ɨ":"i","ĩ":"i","ḭ":"i","ꝺ":"d","ꝼ":"f","ᵹ":"g","ꞃ":"r","ꞅ":"s","ꞇ":"t","ꝭ":"is","ǰ":"j","ĵ":"j","ʝ":"j","ɉ":"j","ḱ":"k","ǩ":"k","ķ":"k","ⱪ":"k","ꝃ":"k","ḳ":"k","ƙ":"k","ḵ":"k","ᶄ":"k","ꝁ":"k","ꝅ":"k","ĺ":"l","ƚ":"l","ɬ":"l","ľ":"l","ļ":"l","ḽ":"l","ȴ":"l","ḷ":"l","ḹ":"l","ⱡ":"l","ꝉ":"l","ḻ":"l","ŀ":"l","ɫ":"l","ᶅ":"l","ɭ":"l","ł":"l","lj":"lj","ſ":"s","ẜ":"s","ẛ":"s","ẝ":"s","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ᵯ":"m","ᶆ":"m","ń":"n","ň":"n","ņ":"n","ṋ":"n","ȵ":"n","ṅ":"n","ṇ":"n","ǹ":"n","ɲ":"n","ṉ":"n","ƞ":"n","ᵰ":"n","ᶇ":"n","ɳ":"n","ñ":"n","nj":"nj","ó":"o","ŏ":"o","ǒ":"o","ô":"o","ố":"o","ộ":"o","ồ":"o","ổ":"o","ỗ":"o","ö":"o","ȫ":"o","ȯ":"o","ȱ":"o","ọ":"o","ő":"o","ȍ":"o","ò":"o","ỏ":"o","ơ":"o","ớ":"o","ợ":"o","ờ":"o","ở":"o","ỡ":"o","ȏ":"o","ꝋ":"o","ꝍ":"o","ⱺ":"o","ō":"o","ṓ":"o","ṑ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","õ":"o","ṍ":"o","ṏ":"o","ȭ":"o","ƣ":"oi","ꝏ":"oo","ɛ":"e","ᶓ":"e","ɔ":"o","ᶗ":"o","ȣ":"ou","ṕ":"p","ṗ":"p","ꝓ":"p","ƥ":"p","ᵱ":"p","ᶈ":"p","ꝕ":"p","ᵽ":"p","ꝑ":"p","ꝙ":"q","ʠ":"q","ɋ":"q","ꝗ":"q","ŕ":"r","ř":"r","ŗ":"r","ṙ":"r","ṛ":"r","ṝ":"r","ȑ":"r","ɾ":"r","ᵳ":"r","ȓ":"r","ṟ":"r","ɼ":"r","ᵲ":"r","ᶉ":"r","ɍ":"r","ɽ":"r","ↄ":"c","ꜿ":"c","ɘ":"e","ɿ":"r","ś":"s","ṥ":"s","š":"s","ṧ":"s","ş":"s","ŝ":"s","ș":"s","ṡ":"s","ṣ":"s","ṩ":"s","ʂ":"s","ᵴ":"s","ᶊ":"s","ȿ":"s","ɡ":"g","ᴑ":"o","ᴓ":"o","ᴝ":"u","ť":"t","ţ":"t","ṱ":"t","ț":"t","ȶ":"t","ẗ":"t","ⱦ":"t","ṫ":"t","ṭ":"t","ƭ":"t","ṯ":"t","ᵵ":"t","ƫ":"t","ʈ":"t","ŧ":"t","ᵺ":"th","ɐ":"a","ᴂ":"ae","ǝ":"e","ᵷ":"g","ɥ":"h","ʮ":"h","ʯ":"h","ᴉ":"i","ʞ":"k","ꞁ":"l","ɯ":"m","ɰ":"m","ᴔ":"oe","ɹ":"r","ɻ":"r","ɺ":"r","ⱹ":"r","ʇ":"t","ʌ":"v","ʍ":"w","ʎ":"y","ꜩ":"tz","ú":"u","ŭ":"u","ǔ":"u","û":"u","ṷ":"u","ü":"u","ǘ":"u","ǚ":"u","ǜ":"u","ǖ":"u","ṳ":"u","ụ":"u","ű":"u","ȕ":"u","ù":"u","ủ":"u","ư":"u","ứ":"u","ự":"u","ừ":"u","ử":"u","ữ":"u","ȗ":"u","ū":"u","ṻ":"u","ų":"u","ᶙ":"u","ů":"u","ũ":"u","ṹ":"u","ṵ":"u","ᵫ":"ue","ꝸ":"um","ⱴ":"v","ꝟ":"v","ṿ":"v","ʋ":"v","ᶌ":"v","ⱱ":"v","ṽ":"v","ꝡ":"vy","ẃ":"w","ŵ":"w","ẅ":"w","ẇ":"w","ẉ":"w","ẁ":"w","ⱳ":"w","ẘ":"w","ẍ":"x","ẋ":"x","ᶍ":"x","ý":"y","ŷ":"y","ÿ":"y","ẏ":"y","ỵ":"y","ỳ":"y","ƴ":"y","ỷ":"y","ỿ":"y","ȳ":"y","ẙ":"y","ɏ":"y","ỹ":"y","ź":"z","ž":"z","ẑ":"z","ʑ":"z","ⱬ":"z","ż":"z","ẓ":"z","ȥ":"z","ẕ":"z","ᵶ":"z","ᶎ":"z","ʐ":"z","ƶ":"z","ɀ":"z","ff":"ff","ffi":"ffi","ffl":"ffl","fi":"fi","fl":"fl","ij":"ij","œ":"oe","st":"st","ₐ":"a","ₑ":"e","ᵢ":"i","ⱼ":"j","ₒ":"o","ᵣ":"r","ᵤ":"u","ᵥ":"v","ₓ":"x"};
String.prototype.latinise=function(){return this.replace(/[^A-Za-z0-9\[\] ]/g,function(a){return Latinise.latin_map[a]||a})};
String.prototype.latinize=String.prototype.latinise;
String.prototype.isLatin=function(){return this==this.latinise()}