Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 7.6.3

Fixed regex path detection with querystring.
Fixed image edit function on paste.
Fixed removing empty tags.
Fixed problem with unpredictable text removing.
Fixed autoresize issue.
Improved cleanup code on paste.
Fixed French translation.
Added translation: Dutch, Turkish, Albanian, Japanese, Chinese Simpifiled, Hungarian, Belorussian.

Version 7.6.2

Italian translation.
Spanish translation.
Option: fullscreen by default.
Now licensed under Creative Commons Attribution-NonCommercial 3.0.
  • Loading branch information...
commit 81099d608523884b7c21b42fb47a4f61463e8c37 1 parent df3e8b6
Aleksey Baranov authored committed
View
44 js/redactor/css/redactor.css
@@ -14,6 +14,8 @@
overflow: auto;
}
.redactor_box textarea {
+ font-family: Menlo, Monaco, monospace, sans-serif;
+ font-size: 13px;
overflow: auto;
resize: none;
margin: 0;
@@ -24,7 +26,11 @@
outline: none;
border: none;
width: 100%;
- font-size: 13px;
+}
+.redactor_box textarea:focus {
+ outline: none !important;
+ border: none !important;
+ box-shadow: none;
}
/*
@@ -54,14 +60,14 @@ body .redactor_box_fullscreen {
line-height: 0 !important;
list-style: none;
font-size: 0;
- background: #f5f5f5;
- background: -moz-linear-gradient(top, #f5f5f5 0%, #dedede 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#dedede));
- background: -webkit-linear-gradient(top, #f5f5f5 0%,#dedede 100%);
- background: -o-linear-gradient(top, #f5f5f5 0%,#dedede 100%);
- background: -ms-linear-gradient(top, #f5f5f5 0%,#dedede 100%);
- background: linear-gradient(top, #f5f5f5 0%,#dedede 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#dedede',GradientType=0 );
+ background: #f2f2f2;
+ background: -moz-linear-gradient(top, #f5f5f5 0%, #ddd 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#ddd));
+ background: -webkit-linear-gradient(top, #f5f5f5 0%,#ddd 100%);
+ background: -o-linear-gradient(top, #f5f5f5 0%,#ddd 100%);
+ background: -ms-linear-gradient(top, #f5f5f5 0%,#ddd 100%);
+ background: linear-gradient(top, #f5f5f5 0%,#ddd 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#dddddd',GradientType=0 );
overflow: hidden;
border-bottom: 1px solid #c2c2c2;
}
@@ -69,11 +75,12 @@ body .redactor_box_fullscreen {
float: left !important;
padding: 3px 1px;
padding-right: 0;
+ list-style-type: none;
}
.redactor_toolbar li.redactor_separator {
float: left;
height: 34px;
- border-left: 1px solid #cfcfcf;
+ border-left: 1px solid #d7d7d7;
border-right: 1px solid #eee;
padding: 0;
margin: 0 2px 0 3px;
@@ -106,7 +113,7 @@ li.redactor_toolbar_right {
.redactor_toolbar li a:hover {
border-color: #98a6ba;
- background-color: #d6dce6;
+ background-color: #dde4ef;
}
.redactor_toolbar li a:active, .redactor_toolbar li a.act {
border-color: #b5b5b5;
@@ -150,7 +157,7 @@ body .redactor_toolbar li a.redactor_btn_normalscreen span { background-posit
font-family: Arial, Tahoma, Verdana, Helvetica, sans-serif;
background-color: #f5f5f5;
padding-top: 2px;
- line-height: 6px;
+ line-height: 4px;
font-size: 12px;
color: #ddd;
text-align: center;
@@ -193,7 +200,7 @@ body .redactor_toolbar li a.redactor_btn_normalscreen span { background-posit
.redactor_dropdown a:hover {
color: #444 !important;
text-decoration: none;
- background-color: #f2f2f2;
+ background-color: #dde4ef;
}
/* ColorPicker */
@@ -230,7 +237,7 @@ body .redactor_toolbar li a.redactor_btn_normalscreen span { background-posit
#redactor_modal {
background-color: #fff;
- padding: 10px 50px;
+ padding: 0;
position: fixed;
top: 50%;
left: 50%;
@@ -248,12 +255,17 @@ body .redactor_toolbar li a.redactor_btn_normalscreen span { background-posit
color: #000;
}
#redactor_modal_header {
- padding: 30px 0;
+ padding: 15px;
font-size: 18px;
+
+ border-radius: 8px 8px 0 0;
+
font-weight: bold;
+ background-color: #f6f6f6;
+ border-bottom: 1px solid #ddd;
}
#redactor_modal_inner {
- padding: 0 0 30px 0;
+ padding: 30px;
}
#redactor_modal_close {
position: absolute;
View
72 js/redactor/langs/by.js
@@ -0,0 +1,72 @@
+var RLANG = {
+ html: 'Код',
+ video: 'Відэа',
+ image: 'Малюнак',
+ table: 'Табліца',
+ link: 'Спасылка',
+ link_insert: 'Уставіць спасылку ...',
+ unlink: 'Выдаліць спасылку',
+ styles: 'Стылі',
+ paragraph: 'Звычайны тэкст',
+ quote: 'Цытата',
+ code: 'Код',
+ header1: 'Загаловак 1',
+ header2: 'Загаловак 2',
+ format: 'Фармат',
+ bold: 'Паўтлусты',
+ italic: 'Нахільны',
+ superscript: 'Надрадковы',
+ strikethrough: 'Закрэслены',
+ fontcolor: 'Колер тэксту',
+ backcolor: 'Заліванне тэксту',
+ removeformat: 'Выдаліць фармат',
+ cleanstyles: 'Выдаліць стылі MS Word',
+ lists: 'Спісы',
+ unorderedlist: 'Звычайны спіс',
+ orderedlist: 'Нумараваны спіс',
+ outdent: 'Паменьшыць водступ',
+ indent: 'Павялічыць водступ',
+ redo: 'Паўтор',
+ undo: 'Адмена',
+ cut: 'Кат / Урэзка',
+ cancel: 'Адмяніць',
+ insert: 'Уставіць',
+ save: 'Захаваць',
+ _delete: 'Выдаліць',
+ insert_table: 'Уставіць табліцу',
+ insert_row_above: 'Дадаць радок зверху',
+ insert_row_below: 'Дадаць радок знізу',
+ insert_column_left: 'Дадаць слупок злева',
+ insert_column_right: 'Дадаць слупок справа',
+ delete_column: 'Выдаліць слупок',
+ delete_row: 'Выдаліць радок',
+ delete_table: 'Выдаліць табліцу',
+ Rows: 'Радкі',
+ Columns: 'Стаўбцы',
+ add_head: 'Дадаць загаловак',
+ delete_head: 'Выдаліць загаловак',
+ title: 'Падказка',
+ image_view: 'Запампаваць малюнак',
+ image_position: 'Абцяканне тэкстам',
+ none: 'Няма',
+ left: 'Злева',
+ right: 'Справа',
+ image_web_link: 'Спасылка на малюнак',
+ text: 'Тэкст',
+ mailto: 'Эл. пошта ',
+ web: 'URL',
+ video_html_code: 'Код відэа роліка',
+ file: 'Файл',
+ upload: 'Загрузіць',
+ download: 'Запампаваць',
+ choose: 'Выбраць',
+ or_choose: 'Ці іншае',
+ drop_file_here: 'Перацягніце файл сюды',
+ align_left: 'Па левым краі',
+ align_center: 'Па цэнтры',
+ align_right: 'Па правым краі',
+ align_justify: 'Выраўнаваць тэкст па шырыні',
+ horizontalrule: 'Гарызантальная лінейка',
+ fullscreen: 'Ва ўвесь экран',
+ deleted: 'Закрэслены'
+};
View
76 js/redactor/langs/es.js
@@ -0,0 +1,76 @@
+var RLANG = {
+ html: 'HTML',
+ video: 'Video',
+ image: 'Imagen',
+ table: 'Tabla',
+ link: 'Enlace',
+ link_insert: 'Insertar enlace ...',
+ unlink: 'Desenlazar',
+ styles: 'Estilos',
+ paragraph: 'Párrafo',
+ quote: 'Comillas',
+ code: 'Código',
+ header1: 'Cabecera 1',
+ header2: 'Cabecera 2',
+ header3: 'Cabecera 3',
+ header4: 'Cabecera 4',
+ format: 'Formato',
+ bold: 'Negrita',
+ italic: 'Itálica',
+ superscript: 'Superindice',
+ strikethrough: 'Tachado',
+ fontcolor: 'Color fuente',
+ backcolor: 'Color fondo',
+ removeformat: 'Elimar formato',
+ cleanstyles: 'Limpiar estilos',
+ lists: 'Listas',
+ unorderedlist: 'Lista sin orden',
+ orderedlist: 'Lista ordenada',
+ outdent: 'Disminuir sangrado',
+ indent: 'Sangrar',
+ redo: 'Rehacer',
+ undo: 'Deshacer',
+ cut: 'Cortar',
+ cancel: 'Cancelar',
+ insert: 'Añadir',
+ save: 'Guardar',
+ _delete: 'Borrar',
+ insert_table: 'Añadir tabla',
+ insert_row_above: 'Añadir fila arriba',
+ insert_row_below: 'Añadir fila debajo',
+ insert_column_left: 'Añadir columna a la izquierda',
+ insert_column_right: 'Añadir column a la derecha',
+ delete_column: 'Borrar columna',
+ delete_row: 'Borrar fila',
+ delete_table: 'Borrar tabla',
+ Rows: 'Filas',
+ Columns: 'Columnas',
+ add_head: 'Añadir cabecera',
+ delete_head: 'Borrar cabecera',
+ title: 'Título',
+ image_view: 'Ver imagen',
+ image_position: 'Posición',
+ none: 'ninguna',
+ left: 'izquierda',
+ right: 'derecha',
+ image_web_link: 'Enlace de imagen web',
+ text: 'Texto',
+ mailto: 'Email',
+ web: 'URL',
+ video_html_code: 'Código embebido del video',
+ file: 'Fichero',
+ upload: 'Cargar',
+ download: 'Descargar',
+ choose: 'Seleccionar',
+ or_choose: 'O seleccionar',
+ drop_file_here: 'Soltar el fichero aquí',
+ align_left: 'Alinear a la izquierda',
+ align_center: 'Alinear al centro',
+ align_right: 'Alinear a la derecha',
+ align_justify: 'Justificar',
+ horizontalrule: 'Trazo horizontal',
+ fullscreen: 'Pantalla completa',
+ deleted: 'Borrado',
+ none: 'Ninguno',
+ anchor: 'Anclaje o anchor'
+};
View
122 js/redactor/langs/fr.js
@@ -1,74 +1,74 @@
var RLANG = {
- html: 'Le code',
+ html: 'Code HTML',
video: 'Vidéo',
- image: 'L’image',
- table: 'La table',
- link: 'La référence',
- link_insert: 'Insérer la référence ...',
- unlink: 'Éloigner la référence',
- styles: 'Les styles',
+ image: 'Image',
+ table: 'Tableau',
+ link: 'Lien URL',
+ link_insert: 'Insérer un lien',
+ unlink: 'Nétoyer le lien',
+ styles: 'Styles',
paragraph: 'Paragraphe',
- quote: 'La citation',
- code: 'Le code',
- header1: 'Le titre 1',
- header2: 'Le titre 2',
- header3: 'Le titre 3',
- header4: 'Le titre 4',
- format: 'Le format',
- bold: 'Demi-gras',
- italic: 'Incliné',
+ quote: 'Citation',
+ code: 'Code',
+ header1: 'Titre 1',
+ header2: 'Titre 2',
+ header3: 'Titre 3',
+ header4: 'Titre 4',
+ format: 'Format',
+ bold: 'Gras',
+ italic: 'Italique',
superscript: 'Diacritique',
strikethrough: 'Rayé',
- fontcolor: 'La Couleur du texte',
- backcolor: 'Le coulage du texte',
- removeformat: 'Éloigner le format',
- lists: 'Les Listes',
- unorderedlist: 'La liste Ordinaire',
- orderedlist: 'La liste Numérotée',
+ fontcolor: 'Couleur du texte',
+ backcolor: 'Couleur du fond de ligne',
+ removeformat: 'Nétoyer le format',
+ lists: 'Listes',
+ unorderedlist: 'Liste à puce',
+ orderedlist: 'Liste numérotée',
outdent: 'Diminuer l\'alinéa',
indent: 'Augmenter l\'alinéa',
- redo: 'La Répétition',
- undo: 'L’annulation',
- cut: 'Cut',
- cancel: 'Annuler',
+ redo: 'Refaire',
+ undo: 'Défaire',
+ cut: 'Couper',
+ cancel: 'Annuler',
insert: 'Insérer',
- save: 'Garder',
- _delete: 'Éloigner',
- insert_table: 'Insérer la table',
- insert_row_above: 'Ajouter la ligne par dessus',
- insert_row_below: 'Ajouter la ligne d\'en bas',
- insert_column_left: 'Ajouter la colonne à gauche',
- insert_column_right: 'Ajouter la colonne à droite',
- delete_column: 'Éloigner la colonne',
- delete_row: 'Éloigner la ligne',
- delete_table: 'Éloigner la table',
- Rows: 'Les Lignes ',
- Columns: 'Les colonnes',
- add_head: 'Ajouter le titre',
- delete_head: 'Éloigner le titre',
- title: 'l\'Aide',
- image_view: 'Transférer l\'image',
+ save: 'Sauvegarder',
+ _delete: 'Supprimer',
+ insert_table: 'Insérer le tableau',
+ insert_row_above: 'Ajouter une ligne au dessus',
+ insert_row_below: 'Ajouter une ligne en dessous',
+ insert_column_left: 'Ajouter une colonne à gauche',
+ insert_column_right: 'Ajouter une colonne à droite',
+ delete_column: 'Supprimer la colonne',
+ delete_row: 'Supprimer la ligne',
+ delete_table: 'Supprimer le tableau',
+ Rows: 'Lignes ',
+ Columns: 'Colonnes',
+ add_head: 'Ajouter un titre',
+ delete_head: 'Supprimer le titre',
+ title: 'Titre',
+ image_view: 'Voir l\'image',
image_position: 'Position de l\'image',
- none: 'non',
+ none: 'aucun',
left: 'à gauche',
right: 'à droite',
- image_web_link: 'la référence à l’image',
- text: 'Le Texte',
- mailto: 'La Poste ',
+ image_web_link: 'lien de l’image',
+ text: 'Texte',
+ mailto: 'Envoyer à ',
web: 'URL',
- video_html_code: 'Le Code de vidéo',
- file: 'Le Fichier',
- upload: 'Charger',
- download: 'Transférer',
- choose: 'Choose',
- or_choose: 'Or choose',
- drop_file_here: 'Drop file here',
- align_left: 'Align left',
- align_center: 'Align center',
- align_right: 'Align right',
- align_justify: 'Justify',
- horizontalrule: 'Horizontal rule',
- fullscreen: 'Fullscreen',
- deleted: 'Deleted',
- none: 'None'
+ video_html_code: 'Code HTML de la vidéo',
+ file: 'Fichier',
+ upload: 'Envoyer',
+ download: 'Télécharger',
+ choose: 'Choisir',
+ or_choose: 'ou',
+ drop_file_here: 'Glissez-déposez le fichier ici',
+ align_left: 'Aligenr à gauche',
+ align_center: 'Aligner au centre',
+ align_right: 'Aligner à droite',
+ align_justify: 'Justifier',
+ horizontalrule: 'Ligne horizontale',
+ fullscreen: 'Plein écran',
+ deleted: 'Supprimer',
+ none: 'aucun'
};
View
76 js/redactor/langs/hu.js
@@ -0,0 +1,76 @@
+var RLANG = {
+ html: 'HTML',
+ video: 'Videó',
+ image: 'Kép',
+ table: 'Tábla',
+ link: 'Link',
+ link_insert: 'Link beszúrás ...',
+ unlink: 'Link megszüntetés',
+ styles: 'Stílusok',
+ paragraph: 'Bekezdés',
+ quote: 'Idézet',
+ code: 'Kód',
+ header1: 'Címsor 1',
+ header2: 'Címsor 2',
+ header3: 'Címsor 3',
+ header4: 'Címsor 4',
+ format: 'Formátum',
+ bold: 'Félkövér',
+ italic: 'Dőlt',
+ superscript: 'Felső index',
+ strikethrough: 'Áthúzott',
+ fontcolor: 'Szöveg szine',
+ backcolor: 'Szöveg hátterének szine',
+ removeformat: 'Formátum eltávolítása',
+ cleanstyles: 'Stilusok törlése',
+ lists: 'Listák',
+ unorderedlist: 'Nem számozott lista',
+ orderedlist: 'Számozott lista',
+ outdent: 'Outdent',
+ indent: 'Indent',
+ redo: 'Újra',
+ undo: 'Visszavonás',
+ cut: 'Kivágás',
+ cancel: 'Mégsem',
+ insert: 'Beszurás',
+ save: 'Mentés',
+ _delete: 'Törlés',
+ insert_table: 'Táblázat beszúrása',
+ insert_row_above: 'Sor beszúrása az aktuális sor fölé',
+ insert_row_below: 'Sor beszúrása ez alá',
+ insert_column_left: 'Oszlop beszúrása ettöl balra',
+ insert_column_right: 'Oszlop hozzáadása ettöl jobbra',
+ delete_column: 'Oszlop törlése',
+ delete_row: 'Sor törlése',
+ delete_table: 'Táblázat törlése',
+ Rows: 'Sorok',
+ Columns: 'Oszlopok',
+ add_head: 'Fejrész hozzáadása',
+ delete_head: 'Fejrész törlése',
+ title: 'Felira',
+ image_view: 'Kép megnézése',
+ image_position: 'Pozició',
+ none: 'nincs',
+ left: 'bal',
+ right: 'jobb',
+ image_web_link: 'Link a képre',
+ text: 'Szöveg',
+ mailto: 'Email',
+ web: 'URL',
+ video_html_code: 'Videó embed code',
+ file: 'File',
+ upload: 'Feltöltés',
+ download: 'Letöltés',
+ choose: 'Válassz',
+ or_choose: 'Vagy válassz',
+ drop_file_here: 'Ide dobd a file-t',
+ align_left: 'Balra igazítás',
+ align_center: 'Középre igazítás',
+ align_right: 'Jobbra igazítás',
+ align_justify: 'Sorkizárt',
+ horizontalrule: 'Horizontális vonal',
+ fullscreen: 'Teljes képernyős',
+ deleted: 'Törölt',
+ none: 'Nincs',
+ anchor: 'Horgony'
+};
View
76 js/redactor/langs/it.js
@@ -0,0 +1,76 @@
+var RLANG = {
+ html: 'HTML',
+ video: 'Video',
+ image: 'Immagine',
+ table: 'Tabella',
+ link: 'Collegamento',
+ link_insert: 'Inserisci un collegamento ...',
+ unlink: 'Rimuovi il collegamento',
+ styles: 'Stili',
+ paragraph: 'Paragrafo',
+ quote: 'Quote',
+ code: 'Codice',
+ header1: 'H1',
+ header2: 'H2',
+ header3: 'H3',
+ header4: 'H4',
+ format: 'Formatta',
+ bold: 'Grassetto',
+ italic: 'Corsivo',
+ superscript: 'Superscript',
+ strikethrough: 'Strikethrough',
+ fontcolor: 'Colore del font',
+ backcolor: 'Colore di sfondo',
+ removeformat: 'Rimuovi formattazione',
+ cleanstyles: 'Ripulisci stili',
+ lists: 'Elenco',
+ unorderedlist: 'Elenco puntato',
+ orderedlist: 'Elenco numerato',
+ outdent: 'Outdent',
+ indent: 'Indent',
+ redo: 'Ripeti',
+ undo: 'Annulla',
+ cut: 'Taglia',
+ cancel: 'Cancella',
+ insert: 'Inserisci',
+ save: 'Salva',
+ _delete: 'rimuovi',
+ insert_table: 'Inserisci tabella',
+ insert_row_above: 'Inserisci una riga sopra',
+ insert_row_below: 'Inserisci una riga sotto',
+ insert_column_left: 'Aggiungi una colonna a sinistra',
+ insert_column_right: 'Aggiungi una colonna a destra',
+ delete_column: 'Cancella colonna',
+ delete_row: 'Cancella riga',
+ delete_table: 'Cancella tabella',
+ Rows: 'Righe',
+ Columns: 'Colonne',
+ add_head: 'Aggiungi head',
+ delete_head: 'Cancella head',
+ title: 'Titolo',
+ image_view: 'Visualizza immagine',
+ image_position: 'Posizione',
+ none: 'Nessun',
+ left: 'Sinistra',
+ right: 'Destra',
+ image_web_link: 'URL immagine',
+ text: 'Testo',
+ mailto: 'Email',
+ web: 'URL',
+ video_html_code: 'Embed code filmato',
+ file: 'File',
+ upload: 'Upload',
+ download: 'Download',
+ choose: 'Scegli',
+ or_choose: 'O Scegli',
+ drop_file_here: 'Trascina il file qui',
+ align_left: 'Allinea a sinistra',
+ align_center: 'Allinea al centro',
+ align_right: 'Allinea a destra',
+ align_justify: 'Giustifica',
+ horizontalrule: 'Orizzonatale',
+ fullscreen: 'Schermo intero',
+ deleted: 'Cancellato',
+ none: 'Nessun',
+ anchor: 'Ancora'
+};
View
76 js/redactor/langs/ja.js
@@ -0,0 +1,76 @@
+var RLANG = {
+ html: 'HTML',
+ video: 'ビデオ',
+ image: 'イメージ',
+ table: 'テーブル',
+ link: 'リンク',
+ link_insert: 'リンクの挿入 ...',
+ unlink: 'リンクを外す',
+ styles: 'スタイル',
+ paragraph: '段落',
+ quote: '引用',
+ code: 'コード',
+ header1: 'ヘッダー 1',
+ header2: 'ヘッダー 2',
+ header3: 'ヘッダー 3',
+ header4: 'ヘッダー 4',
+ format: 'フォーマット',
+ bold: '太字',
+ italic: 'イタリック',
+ superscript: '上付き文字',
+ strikethrough: '取り消し線',
+ fontcolor: 'フォント色',
+ backcolor: '背景色',
+ removeformat: 'フォーマットの解除',
+ cleanstyles: 'スタイルのクリヤー',
+ lists: 'リスト',
+ unorderedlist: '番号なしリスト',
+ orderedlist: '番号つきリスト',
+ outdent: '字上げ(逆インデント)',
+ indent: '字下げ(インデント)',
+ redo: '再実行',
+ undo: '元に戻す',
+ cut: 'カット',
+ cancel: 'キャンセル',
+ insert: '挿入',
+ save: '保存',
+ _delete: '削除',
+ insert_table: 'テーブルの挿入',
+ insert_row_above: '列を上に追加',
+ insert_row_below: '列を下に追加',
+ insert_column_left: '行を左に追加',
+ insert_column_right: '行を右に追加',
+ delete_column: '行を削除',
+ delete_row: '列を削除',
+ delete_table: 'テーブルを削除',
+ Rows: '',
+ Columns: '',
+ add_head: 'テーブルヘッダの追加',
+ delete_head: 'テーブルヘッダの削除',
+ title: 'タイトル',
+ image_view: 'イメージを見る',
+ image_position: 'イメージの位置',
+ none: '無し',
+ left: '',
+ right: '',
+ image_web_link: 'イメージへのリンク',
+ text: 'テキスト',
+ mailto: 'メール',
+ web: 'URL',
+ video_html_code: 'ビデオ埋め込みコード',
+ file: 'ファイル',
+ upload: 'アップロード',
+ download: 'ダウンロード',
+ choose: '選択',
+ or_choose: 'または選択',
+ drop_file_here: 'ファイルをここにドロップ',
+ align_left: '左揃え',
+ align_center: '中央揃え',
+ align_right: '右揃え',
+ align_justify: '均等割り付け',
+ horizontalrule: '水平線',
+ fullscreen: '全画面',
+ deleted: '打消し',
+ none: '無し',
+ anchor: 'アンカー'
+};
View
76 js/redactor/langs/nl.js
@@ -0,0 +1,76 @@
+var RLANG = {
+ html: 'HTML',
+ video: 'Video',
+ image: 'Afbeelding',
+ table: 'Tabel',
+ link: 'Link',
+ link_insert: 'Link invoegen...',
+ unlink: 'Link ontkoppelen',
+ styles: 'Stijlen',
+ paragraph: 'Paragraaf',
+ quote: 'Citaat',
+ code: 'Code',
+ header1: 'Kop 1',
+ header2: 'Kop 2',
+ header3: 'Kop 3',
+ header4: 'Kop 4',
+ format: 'Format',
+ bold: 'Vet',
+ italic: 'Cursief',
+ superscript: 'Superscript',
+ strikethrough: 'Doorstrepen',
+ fontcolor: 'Tekstkleur',
+ backcolor: 'Achtergrondkleur',
+ removeformat: 'Verwijder formattering',
+ cleanstyles: 'Stijlen opschonen',
+ lists: 'Lijsten',
+ unorderedlist: 'Ongeordende lijst',
+ orderedlist: 'Geordende lijst',
+ outdent: 'Uitspringen',
+ indent: 'Inspringen',
+ redo: 'Opnieuw maken',
+ undo: 'Ongedaan maken',
+ cut: 'Knippen',
+ cancel: 'Annuleren',
+ insert: 'Invoegen',
+ save: 'Opslaan',
+ _delete: 'Verwijderen',
+ insert_table: 'Tabel invoegen',
+ insert_row_above: 'Rij hierboven invoegen',
+ insert_row_below: 'Rij hieronder invoegen',
+ insert_column_left: 'Kolom links toevoegen',
+ insert_column_right: 'Kolom rechts toevoegen',
+ delete_column: 'Verwijder kolom',
+ delete_row: 'Verwijder rij',
+ delete_table: 'Verwijder tabel',
+ Rows: 'Rijen',
+ Columns: 'Kolommen',
+ add_head: 'Titel toevoegen',
+ delete_head: 'Titel verwijderen',
+ title: 'Titel',
+ image_view: 'Toon afbeelding',
+ image_position: 'Positie',
+ none: 'geen',
+ left: 'links',
+ right: 'rechts',
+ image_web_link: 'Afbeelding link',
+ text: 'Tekst',
+ mailto: 'Email',
+ web: 'URL',
+ video_html_code: 'Video embed code',
+ file: 'Bestand',
+ upload: 'Uploaden',
+ download: 'Downloaden',
+ choose: 'Kies',
+ or_choose: 'Of kies',
+ drop_file_here: 'Sleep bestand hier',
+ align_left: 'Links uitlijnen',
+ align_center: 'Centreren',
+ align_right: 'Rechts uitlijnen',
+ align_justify: 'Uitvullen',
+ horizontalrule: 'Horizontale lijn',
+ fullscreen: 'Volledig scherm',
+ deleted: 'Verwijderd',
+ none: 'Geen',
+ anchor: 'Anker'
+};
View
76 js/redactor/langs/sq.js
@@ -0,0 +1,76 @@
+var RLANG = {
+ html: 'HTML',
+ video: 'Video',
+ image: 'Fotografi',
+ table: 'Tabelë',
+ link: 'Link',
+ link_insert: 'Lidh linq ...',
+ unlink: 'Hiq linkun',
+ styles: 'Stilet',
+ paragraph: 'Paragraf',
+ quote: 'Kuotë',
+ code: 'Kod',
+ header1: 'Header 1',
+ header2: 'Header 2',
+ header3: 'Header 3',
+ header4: 'Header 4',
+ format: 'Formati',
+ bold: 'Te trasha / Bold',
+ italic: 'Kursive / Italic',
+ superscript: 'Superscript',
+ strikethrough: 'Strikethrough',
+ fontcolor: 'Ngjyra e shkronjave',
+ backcolor: 'Ngjyra e mbrapavisë së shkronjave',
+ removeformat: 'Fshije formatin',
+ cleanstyles: 'Pastro stilet',
+ lists: 'Listat',
+ unorderedlist: 'Liste pa renditje',
+ orderedlist: 'Liste me renditje',
+ outdent: 'Outdent',
+ indent: 'Indent',
+ redo: 'Ribëj',
+ undo: 'Zhbëj',
+ cut: 'Cut',
+ cancel: 'Anulo',
+ insert: 'Insert',
+ save: 'Ruaje',
+ _delete: 'Fshije',
+ insert_table: 'Shto tabelë',
+ insert_row_above: 'Shto rresht sipër',
+ insert_row_below: 'Shto rresht përfundi',
+ insert_column_left: 'Shto kolonë majtas',
+ insert_column_right: 'Shto kolonë djathtas',
+ delete_column: 'Fshije kolonën',
+ delete_row: 'Fshije rreshtin',
+ delete_table: 'Fshije tabelën',
+ Rows: 'Rreshta',
+ Columns: 'Kolona',
+ add_head: 'Shto titujt e tabelës',
+ delete_head: 'Fshije titujt e tabelës',
+ title: 'Titulli',
+ image_view: 'Shiko fotografinë',
+ image_position: 'Pozita',
+ none: 'Normale',
+ left: 'Majtas',
+ right: 'Djathtas',
+ image_web_link: 'Linku i fotografisë në internet',
+ text: 'Teksti',
+ mailto: 'Email',
+ web: 'URL',
+ video_html_code: 'Video embed code',
+ file: 'Fajll',
+ upload: 'Ngarko',
+ download: 'Shkarko',
+ choose: 'Zgjedh',
+ or_choose: 'Ose zgjedh',
+ drop_file_here: 'Gjuaje fajllin këtu',
+ align_left: 'Rreshtoje majtas',
+ align_center: 'Rreshtoje në mes',
+ align_right: 'Rreshtoje djathtas',
+ align_justify: 'Rreshtoje të gjithin njejt',
+ horizontalrule: 'Vizë horizontale',
+ fullscreen: 'Pamje e plotë',
+ deleted: 'E fshirë',
+ none: 'None',
+ anchor: 'Anchor'
+};
View
76 js/redactor/langs/tr.js
@@ -0,0 +1,76 @@
+var RLANG = {
+ html: 'HTML',
+ video: 'Video',
+ image: 'Görsel',
+ table: 'Tablo',
+ link: 'Bağlantı',
+ link_insert: 'Bağlantı Ekle ...',
+ unlink: 'Bağlantı Kaldır',
+ styles: 'Stiller',
+ paragraph: 'Paragraf',
+ quote: 'Alıntı',
+ code: 'Kod',
+ header1: 'Başlık 1',
+ header2: 'Başlık 2',
+ header3: 'Başlık 3',
+ header4: 'Başlık 4',
+ format: 'Biçim',
+ bold: 'Kalın',
+ italic: 'Eğik',
+ superscript: 'Üst simge',
+ strikethrough: 'Üstü çizili',
+ fontcolor: 'Yazı rengi',
+ backcolor: 'Arkaplan rengi',
+ removeformat: 'Biçimi kaldır',
+ cleanstyles: 'Stilleri temizle',
+ lists: 'Listeler',
+ unorderedlist: 'Sırasız liste',
+ orderedlist: 'Sıralı liste',
+ outdent: 'Girintiyi azalt',
+ indent: 'Girintiyi artır',
+ redo: 'Yeniden yap',
+ undo: 'Geri al',
+ cut: 'Kes',
+ cancel: 'İptal',
+ insert: 'Ekle',
+ save: 'Kaydet',
+ _delete: 'Sil',
+ insert_table: 'Tablo ekle',
+ insert_row_above: 'Yukarı satır ekle',
+ insert_row_below: 'Alta satır ekle',
+ insert_column_left: 'Sola sütun ekle',
+ insert_column_right: 'Sağa sütun ekle',
+ delete_column: 'Sütun sil',
+ delete_row: 'Satır sil',
+ delete_table: 'Tablo sil',
+ Rows: 'Satırlar',
+ Columns: 'Sütunlar',
+ add_head: 'Başlık ekle',
+ delete_head: 'Başlık sil',
+ title: 'Başlık',
+ image_view: 'Görseli göster',
+ image_position: 'Pozisyon',
+ none: 'hiçbiri',
+ left: 'sol',
+ right: 'sağ',
+ image_web_link: 'Görselin web bağlantısı',
+ text: 'Yazı',
+ mailto: 'E-Posta',
+ web: 'URL',
+ video_html_code: 'Video embed kodu',
+ file: 'Dosya',
+ upload: 'Yükle',
+ download: 'İndir',
+ choose: 'Seç',
+ or_choose: 'Veya seç',
+ drop_file_here: 'Dosyayı buraya bırak',
+ align_left: 'Sola hizala',
+ align_center: 'Ortala',
+ align_right: 'Sağa hizala',
+ align_justify: 'Satır uzunluğuna ayarla',
+ horizontalrule: 'Yatay çizgi',
+ fullscreen: 'Tam ekran',
+ deleted: 'Silindi',
+ none: 'Hiçbiri',
+ anchor: 'Çapa'
+};
View
77 js/redactor/langs/zh_cn.js
@@ -0,0 +1,77 @@
+//@chen1706@gmail.com
+var RLANG = {
+ html: 'HTML代码',
+ video: '视频',
+ image: '图片',
+ table: '表格',
+ link: '链接',
+ link_insert: '插入链接',
+ unlink: '取消链接',
+ styles: '样式',
+ paragraph: '段落',
+ quote: '引用',
+ code: '代码',
+ header1: '一级标题',
+ header2: '二级标题',
+ header3: '三级标题',
+ header4: '四级标题',
+ format: '格式',
+ bold: '粗体',
+ italic: '斜体',
+ superscript: '上标',
+ strikethrough: '删除线',
+ fontcolor: '字体颜色',
+ backcolor: '背景颜色',
+ removeformat: '取消格式',
+ cleanstyles: '清除样式',
+ lists: '目录',
+ unorderedlist: '项目编号',
+ orderedlist: '数字编号',
+ outdent: '减少缩进',
+ indent: '增加缩进',
+ redo: '重做',
+ undo: '撤销',
+ cut: '剪切',
+ cancel: '取消',
+ insert: '插入',
+ save: '保存',
+ _delete: '删除',
+ insert_table: '插入表格',
+ insert_row_above: '在上方插入',
+ insert_row_below: '在下方插入',
+ insert_column_left: '在左侧插入',
+ insert_column_right: '在右侧插入',
+ delete_column: '删除整列',
+ delete_row: '删除整行',
+ delete_table: '删除表格',
+ Rows: '',
+ Columns: '',
+ add_head: '添加标题',
+ delete_head: '删除标题',
+ title: '标题',
+ image_view: '查看图片',
+ image_position: '位置',
+ none: '',
+ left: '',
+ right: '',
+ image_web_link: '图片网页链接',
+ text: '文本',
+ mailto: '邮箱',
+ web: '网址',
+ video_html_code: '视频嵌入代码',
+ file: '文件',
+ upload: '上传',
+ download: '下载',
+ choose: '选择',
+ or_choose: '或选择',
+ drop_file_here: '将文件拖拽至此区域',
+ align_left: '左对齐',
+ align_center: '居中',
+ align_right: '右对齐',
+ align_justify: '两端对齐',
+ horizontalrule: '水平线',
+ fullscreen: '全屏',
+ deleted: '删除',
+ none: '',
+ anchor: '锚点'
+};
View
170 js/redactor/redactor.js
@@ -1,11 +1,11 @@
/*
- Redactor v7.6.1
- Updated 22.05.2012
+ Redactor v7.6.3
+ Updated 31.05.2012
http://redactorjs.com/
Copyright (c) 2009-2012, Imperavi Ltd.
- Dual licensed under the MIT or GPL Version 2 licenses.
+ Licensed under Creative Commons Attribution-NonCommercial 3.0 license.
Usage: $('#content').redactor();
*/
@@ -192,6 +192,8 @@ var RTOOLBAR = {};
this.pasteCleanUp();
}, this), 200);
+
+
}, this));
@@ -209,7 +211,7 @@ var RTOOLBAR = {};
.keyup($.proxy(function(e)
{
var key = e.keyCode || e.which;
-
+
if (this.opts.autoformat)
{
// if empty
@@ -218,14 +220,14 @@ var RTOOLBAR = {};
// new line p
if (key == 13 && !e.shiftKey && !e.ctrlKey && !e.metaKey) return this.formatNewLine(e);
}
-
+ //console.log(e);
this.syncCode();
}, this));
// toolbar
this.buildToolbar();
-
+
// resizer
if (this.opts.autoresize === false) this.buildResizer();
else this.observeAutoResize();
@@ -239,6 +241,13 @@ var RTOOLBAR = {};
// observers
this.observeImages();
+ // fullscreen on start
+ if (this.opts.fullscreen)
+ {
+ this.opts.fullscreen = false;
+ this.fullscreen();
+ }
+
// focus
if (this.opts.focus) this.focus();
@@ -286,7 +295,8 @@ var RTOOLBAR = {};
{
if (s.src)
{
- var regexp = new RegExp(/\/redactor\.min\.js|\/redactor\.js/);
+ // Match redactor.js or redactor.min.js, followed by an optional querystring (often used for cache purposes)
+ var regexp = new RegExp(/\/redactor(\.min)?\.js(\?.*)?/);
if (s.src.match(regexp)) this.opts.path = s.src.replace(regexp, '');
}
}, this));
@@ -333,7 +343,7 @@ var RTOOLBAR = {};
frameHtml += html;
frameHtml += '</div></body></html>';
return frameHtml;
- },
+ },
getDoc: function(frame)
{
if (frame.contentDocument) return frame.contentDocument;
@@ -348,7 +358,7 @@ var RTOOLBAR = {};
syncCode: function()
{
var html = this.formating(this.$editor.html());
- this.$el.val(html);
+ this.$el.val(html);
},
// API functions
@@ -432,27 +442,17 @@ var RTOOLBAR = {};
},
observeAutoResize: function()
{
- this.setAutoSize();
+ this.$editor.css({ 'min-height':this.$el.height()+'px' });
+ this.$frame.css({ 'overflow-x':'auto', 'overflow-y':'hidden' });
+ this.$frame.load($.proxy(this.setAutoSize, this));
$(this.doc).keyup($.proxy(this.setAutoSize, this));
-
},
setAutoSize: function()
{
- var oheight = parseInt(this.height.replace('px', ''));
- var height = this.getEditorHeight();
-
- if (height <= oheight) height = oheight+40;
- else height += 40;
-
- this.$frame.height(height);
- this.$el.height(height);
- },
- getEditorHeight: function()
- {
- return this.$editor.height() + this.normalize(this.$editor.css('margin-top')) + this.normalize(this.$editor.css('margin-bottom'))
- + this.normalize(this.$editor.css('padding-top')) + this.normalize(this.$editor.css('padding-bottom'));
+ this.$frame.height(this.$editor.outerHeight(true)+30);
},
-
+
+
// EXECCOMMAND
execCommand: function(cmd, param)
{
@@ -486,13 +486,13 @@ var RTOOLBAR = {};
if (e.preventDefault) e.preventDefault();
element = $(this.getCurrentNode());
- if (element.get(0).tagName == 'DIV')
+ if (element.get(0).tagName == 'DIV' && (element.html() == '' || element.html() == '<br>'))
{
newElement = $('<p>').append(element.clone().get(0).childNodes);
element.replaceWith(newElement);
newElement.html('<br />');
this.setFocusNode(newElement.get(0));
-
+
this.syncCode();
return false;
}
@@ -628,7 +628,7 @@ var RTOOLBAR = {};
return html;
},
- // REMOVE ALL CLASSES AND STYLES
+ // REMOVE CLASSES AND STYLES
cleanUpClasses: function(html)
{
html = html.replace(/\s*class="TOC(.*?)"/gi, "" );
@@ -639,6 +639,7 @@ var RTOOLBAR = {};
},
cleanUpStyles: function(html)
{
+
html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, "" );
html = html.replace( /\s*margin(.*?)pt\s*;/gi, "" );
html = html.replace( /\s*margin(.*?)cm\s*;/gi, "" );
@@ -709,6 +710,8 @@ var RTOOLBAR = {};
html = this.cleanUp(html);
html = this.formating(html);
+
+ html = html.replace(/<b(.*?)id="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi, "$3");
html = html.replace(/#marker#/, '<span id="pastemarkerend">&nbsp;</span>');
@@ -718,6 +721,7 @@ var RTOOLBAR = {};
this.setFocusNode(node);
this.syncCode();
+ this.observeImages();
},
// TEXTAREA CODE FORMATTING
@@ -755,13 +759,14 @@ var RTOOLBAR = {};
html = html.replace(/[\s\n]*$/, '');
// empty tags
- var etags = ["<pre></pre>","<blockquote></blockquote>","<em></em>","<b></b>","<ul></ul>","<ol></ol>","<li></li>","<table></table>","<tr></tr>","<span><span>", "<span>&nbsp;<span>", "<p> </p>", "<p></p>", "<p>&nbsp;</p>", "<p><br></p>", "<div></div>"];
+ var etags = ["<pre></pre>","<blockquote>\\s*</blockquote>","<em>\\s*</em>","<b>\\s*</b>","<ul></ul>","<ol></ol>","<li></li>","<table></table>","<tr></tr>","<span>\\s*<span>", "<span>&nbsp;<span>", "<p>\\s*</p>", "<p>&nbsp;</p>", "<p>\\s*<br>\\s*</p>", "<div>\\s*</div>", "<div>\\s*<br>\\s*</div>"];
for (var i = 0; i < etags.length; ++i)
{
var bbb = etags[i];
html = html.replace(new RegExp(bbb,'gi'), "");
}
+
// add formatting before
var lb = '\r\n';
var btags = ["<form","<fieldset","<legend","<object","<embed","<select","<option","<input","<textarea","<pre","<blockquote","<ul","<ol","<li","<dl","<dt","<dd","<table", "<thead","<tbody","<caption","</caption>","<th","<tr","<td","<figure"];
@@ -800,7 +805,7 @@ var RTOOLBAR = {};
html = this.$editor.html();
html = $.trim(this.formating(html));
- this.$el.val(html).show();
+ this.$el.val(html).show().focus();
this.setBtnActive('html');
this.opts.visual = false;
@@ -851,6 +856,8 @@ var RTOOLBAR = {};
$.each(RTOOLBAR[this.opts.toolbar], $.proxy(function(key,s)
{
+ if (this.opts.fileUpload === false && key == 'file') return true;
+
var li = $('<li>');
if (key == 'fullscreen') $(li).addClass('redactor_toolbar_right');
@@ -960,7 +967,7 @@ var RTOOLBAR = {};
this.syncCode();
},
- // DROPDOWN
+ // DROPDOWNS
showDropDown: function(e, dropdown, key)
{
this.hideAllDropDown();
@@ -1061,7 +1068,7 @@ var RTOOLBAR = {};
}
},
- // =BUTTONS MANIPULATIONS
+ // BUTTONS MANIPULATIONS
getBtn: function(key)
{
return $(this.$toolbar.find('a.redactor_btn_' + key));
@@ -1112,13 +1119,14 @@ var RTOOLBAR = {};
$(document.body).prepend(this.$box).css('overflow', 'hidden');
- this.$editor = this.enable(html);
+ this.$editor = this.enable(html);
$(this.doc).click($.proxy(this.hideAllDropDown, this));
// focus always on page
$(this.doc).click($.proxy(function(e) { this.$editor.focus(); }, this));
this.observeImages();
+ this.$box.find('.redactor_resizer').hide();
this.fullScreenResize();
$(window).resize($.proxy(this.fullScreenResize, this));
@@ -1145,6 +1153,7 @@ var RTOOLBAR = {};
this.observeImages();
this.observeAutoResize();
+ this.$box.find('.redactor_resizer').show();
$(this.doc).click($.proxy(this.hideAllDropDown, this));
// focus always on page
@@ -1164,7 +1173,7 @@ var RTOOLBAR = {};
var hfix = 42;
if (this.opts.air) hfix = 2;
- var height = $(window).height() - hfix;
+ var height = $(window).height() - hfix;
this.$box.width($(window).width() - 2);
this.$frame.height(height);
@@ -1310,7 +1319,7 @@ var RTOOLBAR = {};
// TABLE
showTable: function()
{
- this.modalInit(RLANG.table, this.opts.path + '/plugins/table.html', 230, $.proxy(function()
+ this.modalInit(RLANG.table, this.opts.path + '/plugins/table.html', 300, $.proxy(function()
{
$('#redactor_table_rows').focus();
$('#redactor_insert_table_btn').click($.proxy(this.insertTable, this));
@@ -1567,21 +1576,40 @@ var RTOOLBAR = {};
}
else
{
- $('#redactor_tabs li').eq(1).remove();
+ $('#redactor_tabs a').eq(1).remove();
}
- // dragupload
- if ($('#redactor_file').size() !== 0)
+ if (this.opts.imageUpload !== false)
{
- $('#redactor_file').dragupload(
+ // dragupload
+ if ($('#redactor_file').size() !== 0)
{
- url: this.opts.imageUpload,
- success: $.proxy(this.imageUploadCallback, this)
- });
- }
+ $('#redactor_file').dragupload(
+ {
+ url: this.opts.imageUpload,
+ success: $.proxy(this.imageUploadCallback, this)
+ });
+ }
- // ajax upload
- this.uploadInit('redactor_file', { auto: true, url: this.opts.imageUpload, success: $.proxy(this.imageUploadCallback, this) });
+ // ajax upload
+ this.uploadInit('redactor_file', { auto: true, url: this.opts.imageUpload, success: $.proxy(this.imageUploadCallback, this) });
+ }
+ else
+ {
+ $('.redactor_tab').hide();
+ if (this.opts.imageGetJson === false)
+ {
+ $('#redactor_tabs').remove();
+ $('#redactor_tab3').show();
+ }
+ else
+ {
+ var tabs = $('#redactor_tabs a');
+ tabs.eq(0).remove();
+ tabs.eq(1).addClass('redactor_tabs_act');
+ $('#redactor_tab2').show();
+ }
+ }
$('#redactor_upload_btn').click($.proxy(this.imageUploadCallbackLink, this));
@@ -1672,26 +1700,32 @@ var RTOOLBAR = {};
var url = '';
}
}
-
+
$('.redactor_link_text').val(text);
$('#redactor_link_url').val(url).focus();
$('#redactor_insert_link_btn').click($.proxy(this.insertLink, this));
-
- // dragupload
- if ($('#redactor_file').size() != 0)
+ if (this.opts.linkFileUpload === false)
{
- $('#redactor_file').dragupload(
+ $('#redactor_tabs a').eq(3).remove();
+ }
+ else
+ {
+ // dragupload
+ if ($('#redactor_file').size() != 0)
{
- url: this.opts.linkFileUpload,
- success: $.proxy(this.insertLinkFile, this)
- });
+ $('#redactor_file').dragupload(
+ {
+ url: this.opts.linkFileUpload,
+ success: $.proxy(this.insertLinkFile, this)
+ });
+ }
+
+ // ajax upload
+ this.uploadInit('redactor_file', { auto: true, url: this.opts.linkFileUpload, success: $.proxy(this.insertLinkFile, this) });
}
- // ajax upload
- this.uploadInit('redactor_file', { auto: true, url: this.opts.linkFileUpload, success: $.proxy(this.insertLinkFile, this) });
-
}, this);
this.modalInit(RLANG.link, this.opts.path + '/plugins/link.html', 460, handler);
@@ -1838,17 +1872,6 @@ var RTOOLBAR = {};
$('#redactor_modal_inner').html(data);
$('#redactor_modal_header').html(title);
-
- if (typeof(handler) == 'function') handler();
-
- var height = $('#redactor_modal').outerHeight();
-
- $('#redactor_modal').css({ width: width + 'px', height: 'auto', marginTop: '-' + (height+10)/2 + 'px', marginLeft: '-' + (width+100)/2 + 'px' }).fadeIn('fast');
-
- if (scroll === true)
- {
- $('#redactor_image_box').height(300).css('overflow', 'auto');
- }
// tabs
if ($('#redactor_tabs').size() != 0)
@@ -1871,6 +1894,19 @@ var RTOOLBAR = {};
}
$('#redactor_btn_modal_close').click($.proxy(this.modalClose, this));
+
+ // callback
+ if (typeof(handler) == 'function') handler();
+
+ // setup
+ var height = $('#redactor_modal').outerHeight();
+
+ $('#redactor_modal').css({ width: width + 'px', height: 'auto', marginTop: '-' + (height+10)/2 + 'px', marginLeft: '-' + (width+60)/2 + 'px' }).fadeIn('fast');
+
+ if (scroll === true)
+ {
+ $('#redactor_image_box').height(300).css('overflow', 'auto');
+ }
}, this)
});
View
2  js/redactor/redactor.min.js
@@ -1 +1 @@
-var RTOOLBAR={};(function(b){jQuery.fn.redactor=function(c){return this.each(function(){var e=b(this);var d=e.data("redactor");if(!d){e.data("redactor",(d=new a(this,c)))}})};var a=function(d,c){this.$el=b(d);this.opts=b.extend({lang:"en",toolbar:"default",load:true,path:false,css:"style.css",focus:true,resize:true,autoresize:false,fixed:false,autoformat:true,cleanUp:true,convertDivs:true,removeClasses:true,removeStyles:false,convertLinks:true,handler:false,autosave:false,interval:60,imageGetJson:false,imageUpload:false,linkFileUpload:false,fileUpload:false,visual:true,fullscreen:false,overlay:true,colors:Array("#ffffff","#000000","#eeece1","#1f497d","#4f81bd","#c0504d","#9bbb59","#8064a2","#4bacc6","#f79646","#ffff00","#f2f2f2","#7f7f7f","#ddd9c3","#c6d9f0","#dbe5f1","#f2dcdb","#ebf1dd","#e5e0ec","#dbeef3","#fdeada","#fff2ca","#d8d8d8","#595959","#c4bd97","#8db3e2","#b8cce4","#e5b9b7","#d7e3bc","#ccc1d9","#b7dde8","#fbd5b5","#ffe694","#bfbfbf","#3f3f3f","#938953","#548dd4","#95b3d7","#d99694","#c3d69b","#b2a2c7","#b7dde8","#fac08f","#f2c314","#a5a5a5","#262626","#494429","#17365d","#366092","#953734","#76923c","#5f497a","#92cddc","#e36c09","#c09100","#7f7f7f","#0c0c0c","#1d1b10","#0f243e","#244061","#632423","#4f6128","#3f3151","#31859b","#974806","#7f6000"),allEmptyHtml:"<p><br /></p>",mozillaEmptyHtml:"<p>&nbsp;</p>"},c,this.$el.data());this.dropdowns=[];this.init()};a.prototype={_loadFile:function(c,f){var d=f[0];f.splice(0,1);var e;if(typeof(d)=="function"){e=d}else{e=b.proxy(function(){this._loadFile(d,f)},this)}this.dynamicallyLoad(c,e)},loadFiles:function(d){var c=d[0];d.splice(0,1);this._loadFile(c,d)},dynamicallyLoad:function(e,g){var f=document.getElementsByTagName("head")[0];var d=document.createElement("script");d.src=e;var c=false;d.onload=d.onreadystatechange=function(){if(!c&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){c=true;if(g){g()}d.onload=d.onreadystatechange=null}};f.appendChild(d)},init:function(){this.getPath();if(this.opts.load){var c=[];c.push(this.opts.path+"/langs/"+this.opts.lang+".js");if(this.opts.toolbar!==false){c.push(this.opts.path+"/toolbars/"+this.opts.toolbar+".js")}c.push(b.proxy(this.start,this));this.loadFiles(c)}else{this.start()}},start:function(){this.height=this.$el.css("height");this.width=this.$el.css("width");this.build();var c=this.$el.val();c=this.preformater(c);if(this.opts.autoformat){c=this.paragraphy(c)}this.$editor=this.enable(c);b(this.doc).click(b.proxy(function(d){this.$editor.focus()},this));b(this.doc).bind("paste",b.proxy(function(d){setTimeout(b.proxy(function(){var e=b('<span id="pastemarkerend">&nbsp;</span>');this.insertNodeAtCaret(e.get(0));this.pasteCleanUp()},this),200)},this));b(this.doc).keypress(b.proxy(function(f){var d=f.keyCode||f.which;if(navigator.userAgent.indexOf("AppleWebKit")!=-1){return this.safariShiftKeyEnter(f,d)}},this)).keyup(b.proxy(function(f){var d=f.keyCode||f.which;if(this.opts.autoformat){if(d==8||d==46){return this.formatEmpty(f)}if(d==13&&!f.shiftKey&&!f.ctrlKey&&!f.metaKey){return this.formatNewLine(f)}}this.syncCode()},this));this.buildToolbar();if(this.opts.autoresize===false){this.buildResizer()}else{this.observeAutoResize()}this.shortcuts();this.autoSave();this.observeImages();if(this.opts.focus){this.focus()}if(this.opts.fixed){this.observeScroll();b(document).scroll(b.proxy(this.observeScroll,this))}},shortcuts:function(){b(this.doc).keydown(b.proxy(function(d){var c=d.keyCode||d.which;if(d.ctrlKey){if(c==90){this._shortcuts(d,"undo")}else{if(c==90&&d.shiftKey){this._shortcuts(d,"redo")}else{if(c==77){this._shortcuts(d,"removeFormat")}else{if(c==66){this._shortcuts(d,"bold")}else{if(c==73){this._shortcuts(d,"italic")}else{if(c==74){this._shortcuts(d,"insertunorderedlist")}else{if(c==75){this._shortcuts(d,"insertorderedlist")}else{if(c==76){this._shortcuts(d,"superscript")}}}}}}}}}if(!d.shiftKey&&c==9){this._shortcuts(d,"indent")}else{if(d.shiftKey&&c==9){this._shortcuts(d,"outdent")}}},this))},_shortcuts:function(d,c){if(d.preventDefault){d.preventDefault()}this.execCommand(c,null)},getPath:function(){if(this.opts.path!==false){return this.opts.path}b("script").each(b.proxy(function(c,d){if(d.src){var e=new RegExp(/\/redactor\.min\.js|\/redactor\.js/);if(d.src.match(e)){this.opts.path=d.src.replace(e,"")}}},this))},build:function(){this.$box=b('<div class="redactor_box"></div>');this.$frame=b('<iframe frameborder="0" scrolling="auto" style="height: '+this.height+';" class="redactor_frame"></iframe>');this.$el.css("width","100%").hide();this.$box.insertAfter(this.$el).append(this.$frame).append(this.$el)},write:function(c){this.doc.open();this.doc.write(c);this.doc.close()},enable:function(c){this.doc=this.getDoc(this.$frame.get(0));if(this.doc!==null){this.write(this.setDoc(c));if(b.browser.mozilla){this.doc.execCommand("useCSS",false,true)}return b(this.doc).find("#page")}else{return false}},setDoc:function(d){var c="<!DOCTYPE html>\n";c+='<html><head><link media="all" type="text/css" href="'+this.opts.path+"/css/"+this.opts.css+'" rel="stylesheet"></head>';c+='<body><div id="page" contenteditable="true">';c+=d;c+="</div></body></html>";return c},getDoc:function(c){if(c.contentDocument){return c.contentDocument}else{if(c.contentWindow&&c.contentWindow.document){return c.contentWindow.document}else{if(c.document){return c.document}else{return null}}}},focus:function(){this.$editor.focus()},syncCode:function(){var c=this.formating(this.$editor.html());this.$el.val(c)},setCode:function(c){c=this.preformater(c);this.$editor.html(c).focus();this.syncCode()},getCode:function(){var c=this.$editor?this.$editor.html():this.$el.val();c=this.reformater(c);return c},insertHtml:function(c){this.execCommand("inserthtml",c)},destroy:function(){var c=this.getCode();this.$box.after(this.$el);this.$box.remove();this.$el.val(c).show();this.dropdowns.forEach(function(e,d){e.remove();delete (this.dropdowns[d])},this)},handler:function(){b.ajax({url:this.opts.handler,type:"post",data:"redactor="+escape(encodeURIComponent(this.getCode())),success:b.proxy(function(c){this.setCode(c);this.syncCode()},this)})},observeImages:function(){if(b.browser.mozilla){this.doc.execCommand("enableObjectResizing",false,"false")}b(this.doc).find("img").attr("unselectable","on").each(b.proxy(function(c,d){this.resizeImage(d)},this))},observeScroll:function(){var c=b(document).scrollTop();var d=this.$box.offset().top;if(c>d){this.fixed=true;this.$toolbar.css({position:"fixed",width:"100%"})}else{this.fixed=false;this.$toolbar.css({position:"relative",width:"auto"})}},observeAutoResize:function(){this.setAutoSize();b(this.doc).keyup(b.proxy(this.setAutoSize,this))},setAutoSize:function(){var d=parseInt(this.height.replace("px",""));var c=this.getEditorHeight();if(c<=d){c=d+40}else{c+=40}this.$frame.height(c);this.$el.height(c)},getEditorHeight:function(){return this.$editor.height()+this.normalize(this.$editor.css("margin-top"))+this.normalize(this.$editor.css("margin-bottom"))+this.normalize(this.$editor.css("padding-top"))+this.normalize(this.$editor.css("padding-bottom"))},execCommand:function(c,f){if(this.opts.visual&&this.doc){try{if(b.browser.msie){this.focus()}if(c=="inserthtml"&&b.browser.msie){this.doc.selection.createRange().pasteHTML(f)}else{if(c=="formatblock"&&b.browser.msie){this.doc.execCommand(c,false,"<"+f+">")}else{this.doc.execCommand(c,false,f)}}this.syncCode();this.focus()}catch(d){}}},formatNewLine:function(d){var c=this.getParentNode();if(c.nodeName=="DIV"&&c.id=="page"){if(d.preventDefault){d.preventDefault()}element=b(this.getCurrentNode());if(element.get(0).tagName=="DIV"){newElement=b("<p>").append(element.clone().get(0).childNodes);element.replaceWith(newElement);newElement.html("<br />");this.setFocusNode(newElement.get(0));this.syncCode();return false}else{this.syncCode()}if(this.opts.convertLinks){this.$editor.linkify()}}else{this.syncCode();return true}},safariShiftKeyEnter:function(f,d){if(f.shiftKey&&d==13){if(f.preventDefault){f.preventDefault()}var c=b("<span><br /></span>");this.insertNodeAtCaret(c.get(0));this.setFocusNode(c.get(0));this.syncCode();return false}},formatEmpty:function(g){var d=b.trim(this.$editor.html());if(b.browser.mozilla){d=d.replace(/<br>/gi,"")}if(d===""){if(g.preventDefault){g.preventDefault()}var c=this.opts.allEmptyHtml;if(b.browser.mozilla){c=this.opts.mozillaEmptyHtml}var f=b(c).get(0);this.$editor.html(f);this.setFocusNode(f);this.syncCode();return false}else{this.syncCode()}},paragraphy:function(e){e=b.trim(e);if(e===""){if(!b.browser.mozilla){return this.opts.allEmptyHtml}else{return this.opts.mozillaEmptyHtml}}if(this.opts.convertDivs){e=e.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p>$2</p>")}var f=function(h,i,g){return h.replace(new RegExp(i,"g"),g)};var c=function(h,g){return f(e,h,g)};var d="(table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|style|script|object|input|param|p|h[1-6])";e+="\n";c("<br />\\s*<br />","\n\n");c("(<"+d+"[^>]*>)","\n$1");c("(</"+d+">)","$1\n\n");c("\r\n|\r","\n");c("\n\n+","\n\n");c("\n?((.|\n)+?)$","<p>$1</p>\n");c("<p>\\s*?</p>","");c("<p>(<div[^>]*>\\s*)","$1<p>");c("<p>([^<]+)\\s*?(</(div|address|form)[^>]*>)","<p>$1</p>$2");c("<p>\\s*(</?"+d+"[^>]*>)\\s*</p>","$1");c("<p>(<li.+?)</p>","$1");c("<p>\\s*(</?"+d+"[^>]*>)","$1");c("(</?"+d+"[^>]*>)\\s*</p>","$1");c("(</?"+d+"[^>]*>)\\s*<br />","$1");c("<br />(\\s*</?(p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)","$1");if(e.indexOf("<pre")!=-1){c("(<pre(.|\n)*?>)((.|\n)*?)</pre>",function(j,i,h,g){return f(i,"\\\\(['\"\\\\])","$1")+f(f(f(g,"<p>","\n"),"</p>|<br />",""),"\\\\(['\"\\\\])","$1")+"</pre>"})}return c("\n</p>$","</p>")},preformater:function(c){c=c.replace(/<br>/gi,"<br />");c=c.replace(/<blockquote\b[^>]*>([\w\W]*?)<p>([\w\W]*?)<\/p>([\w\W]*?)<\/blockquote[^>]*>/gi,"<blockquote>$1$2<br />$3</blockquote>");c=c.replace(/<strong\b[^>]*>([\w\W]*?)<\/strong[^>]*>/gi,"<b>$1</b>");c=c.replace(/<em\b[^>]*>([\w\W]*?)<\/em[^>]*>/gi,"<i>$1</i>");c=c.replace(/<del\b[^>]*>([\w\W]*?)<\/del[^>]*>/gi,"<strike>$1</strike>");return c},reformater:function(c){c=c.replace(/<br>/gi,"<br />");c=c.replace(/<b\b[^>]*>([\w\W]*?)<\/b[^>]*>/gi,"<strong>$1</strong>");c=c.replace(/<i\b[^>]*>([\w\W]*?)<\/i[^>]*>/gi,"<em>$1</em>");c=c.replace(/<strike\b[^>]*>([\w\W]*?)<\/strike[^>]*>/gi,"<del>$1</del>");c=c.replace(/<span(.*?)style="font-weight: bold;">([\w\W]*?)<\/span>/gi,"<strong>$2</strong>");c=c.replace(/<span(.*?)style="font-style: italic;">([\w\W]*?)<\/span>/gi,"<em>$2</em>");c=c.replace(/<span(.*?)style="font-weight: bold; font-style: italic;">([\w\W]*?)<\/span>/gi,"<em><strong>$2</strong></em>");c=c.replace(/<span(.*?)style="font-style: italic; font-weight: bold;">([\w\W]*?)<\/span>/gi,"<strong><em>$2</em></strong>");return c},cleanUpClasses:function(c){c=c.replace(/\s*class="TOC(.*?)"/gi,"");c=c.replace(/\s*class="Heading(.*?)"/gi,"");c=c.replace(/\s*class="Body(.*?)"/gi,"");return c},cleanUpStyles:function(c){c=c.replace(/\s*mso-[^:]+:[^;"]+;?/gi,"");c=c.replace(/\s*margin(.*?)pt\s*;/gi,"");c=c.replace(/\s*margin(.*?)cm\s*;/gi,"");c=c.replace(/\s*text-indent:(.*?)\s*;/gi,"");c=c.replace(/\s*line-height:(.*?)\s*;/gi,"");c=c.replace(/\s*page-break-before: [^\s;]+;?"/gi,'"');c=c.replace(/\s*font-variant: [^\s;]+;?"/gi,'"');c=c.replace(/\s*tab-stops:[^;"]*;?/gi,"");c=c.replace(/\s*tab-stops:[^"]*/gi,"");c=c.replace(/\s*face="[^"]*"/gi,"");c=c.replace(/\s*face=[^ >]*/gi,"");c=c.replace(/\s*font:(.*?);/gi,"");c=c.replace(/\s*font-size:(.*?);/gi,"");c=c.replace(/\s*font-weight:(.*?);/gi,"");c=c.replace(/\s*font-family:[^;"]*;?/gi,"");c=c.replace(/<span style="Times New Roman&quot;">\s\n<\/span>/gi,"");return c},cleanUp:function(c){c=c.replace(/(<\!\-\-([\w\W]*?)\-\->)/ig,"");if(this.opts.convertDivs){c=c.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p$1>$2</p>")}c=c.replace(/ lang="([\w\W]*?)"/gi,"");c=c.replace(/<a name="(.*?)">([\w\W]*?)<\/a>/gi,"");c=c.replace(/\&nbsp;\&nbsp;\&nbsp;/gi," ");c=c.replace(/\&nbsp;\&nbsp;/gi," ");c=c.replace(/<o:p>(.*?)<\/o:p>/gi,"");c=c.replace(/\s*style="\s*"/gi,"");c=c.replace(/<span>&nbsp;<\/span>/gi,"");c=c.replace(/<span>([\w\W]*?)<\/span>/gi,"$1");return c},removeTags:function(c){return c.replace(/<(?!\s*\/?(code|span|div|label|a|br|p|b|i|del|strike|img|video|audio|iframe|object|embed|param|blockquote|mark|cite|small|ul|ol|li|hr|dl|dt|dd|sup|sub|big|pre|code|figure|figcaption|strong|em|table|tr|td|th|tbody|thead|tfoot|h1|h2|h3|h4|h5|h6)\b)[^>]+>/gi,"")},pasteCleanUp:function(){var c=this.$editor.html();c=c.replace(/<span id="pastemarkerend">&nbsp;<\/span>/,"#marker#");c=this.formating(c);c=this.cleanUp(c);if(this.opts.removeClasses){c=c.replace(/ class="([\w\W]*?)"/gi,"")}else{c=this.cleanUpClasses(c)}if(this.opts.removeStyles){c=c.replace(/ style="([\w\W]*?)"/gi,"")}else{c=this.cleanUpStyles(c)}c=this.cleanUp(c);c=this.formating(c);c=c.replace(/#marker#/,'<span id="pastemarkerend">&nbsp;</span>');this.$editor.html(c);var d=b(this.doc.body).find("#pastemarkerend").get(0);this.setFocusNode(d);this.syncCode()},formating:function(j){if(b.browser.msie){j=j.replace(/<*(\/ *)?(\w+)/g,function(i){return i.toLowerCase()});j=j.replace(/style="(.*?)"/g,function(i){return i.toLowerCase()});j=j.replace(/ jQuery(.*?)=\"(.*?)\"/gi,"")}j=j.replace(/<font([\w\W]*?)color="(.*?)">([\w\W]*?)<\/font\>/gi,'<span style="color: $2;">$3</span>');j=j.replace(/<font([\w\W]*?)>([\w\W]*?)<\/font\>/gi,"<span$1>$2</span>");j=j.replace(/<span>([\w\W]*?)<\/span>/gi,"$1");j=j.replace(/ class="Apple-style-span"/gi,"");j=j.replace(/ class="Apple-tab-span"/gi,"");j=j.replace(/<p><p>/g,"<p>");j=j.replace(/<\/p><\/p>/g,"</p>");j=j.replace(/<hr(.*?)>/g,"<hr />");j=j.replace(/<p>&nbsp;/g,"<p>");j=j.replace(/<p><ul>/g,"<ul>");j=j.replace(/<p><ol>/g,"<ol>");j=j.replace(/<\/ul><\/p>/g,"</ul>");j=j.replace(/<\/ol><\/p>/g,"</ol>");j=j.replace(/<p(.*?)>&nbsp;<\/p>/gi,"");j=j.replace(/[\t]*/g,"");j=j.replace(/\n\s*\n/g,"\n");j=j.replace(/^[\s\n]*/,"");j=j.replace(/[\s\n]*$/,"");var e=["<pre></pre>","<blockquote></blockquote>","<em></em>","<b></b>","<ul></ul>","<ol></ol>","<li></li>","<table></table>","<tr></tr>","<span><span>","<span>&nbsp;<span>","<p> </p>","<p></p>","<p>&nbsp;</p>","<p><br></p>","<div></div>"];for(var f=0;f<e.length;++f){var l=e[f];j=j.replace(new RegExp(l,"gi"),"")}var d="\r\n";var h=["<form","<fieldset","<legend","<object","<embed","<select","<option","<input","<textarea","<pre","<blockquote","<ul","<ol","<li","<dl","<dt","<dd","<table","<thead","<tbody","<caption","</caption>","<th","<tr","<td","<figure"];for(var f=0;f<h.length;++f){var g=h[f];j=j.replace(new RegExp(g,"gi"),d+g)}var k=["</p>","</div>","</ul>","</ol>","</h1>","</h2>","</h3>","</h4>","</h5>","</h6>","<br>","<br />","</dl>","</dt>","</dd>","</form>","</blockquote>","</pre>","</legend>","</fieldset>","</object>","</embed>","</textarea>","</select>","</option>","</table>","</thead>","</tbody>","</tr>","</td>","</th>","</figure>"];for(var f=0;f<k.length;++f){var c=k[f];j=j.replace(new RegExp(c,"gi"),c+d)}j=j.replace(/<li/g,"\t<li");j=j.replace(/<tr/g,"\t<tr");j=j.replace(/<td/g,"\t\t<td");j=j.replace(/<\/tr>/g,"\t</tr>");return j},toggle:function(){var c;if(this.opts.visual){this.$frame.hide();c=this.$editor.html();c=b.trim(this.formating(c));this.$el.val(c).show();this.setBtnActive("html");this.opts.visual=false}else{this.$el.hide();this.$editor.html(this.$el.val());this.$frame.show();if(this.$editor.html()===""){if(!b.browser.mozilla){c=this.opts.allEmptyHtml}else{c=this.opts.mozillaEmptyHtml}this.setCode(c)}this.focus();this.setBtnInactive("html");this.opts.visual=true;this.observeImages()}},autoSave:function(){if(this.opts.autosave===false){return false}setInterval(b.proxy(function(){b.post(this.opts.autosave,{data:this.getCode()})},this),this.opts.interval*1000)},buildToolbar:function(){if(this.opts.toolbar===false){return false}this.$toolbar=b("<ul>").addClass("redactor_toolbar");this.$box.prepend(this.$toolbar);b.each(RTOOLBAR[this.opts.toolbar],b.proxy(function(e,f){var c=b("<li>");if(e=="fullscreen"){b(c).addClass("redactor_toolbar_right")}var d=this.buildButton(e,f);if(e=="backcolor"||e=="fontcolor"||typeof(f.dropdown)!="undefined"){var g=b('<div class="redactor_dropdown" style="display: none;">');if(e=="backcolor"||e=="fontcolor"){g=this.buildColorPicker(g,e)}else{g=this.buildDropdown(g,f.dropdown)}this.dropdowns.push(g.appendTo(b(document.body)));this.hdlHideDropDown=b.proxy(function(h){this.hideDropDown(h,g,e)},this);this.hdlShowDropDown=b.proxy(function(h){this.showDropDown(h,g,e)},this);d.click(this.hdlShowDropDown)}this.$toolbar.append(b(c).append(d));if(typeof(f.separator)!="undefined"){this.$toolbar.append(b('<li class="redactor_separator"></li>'))}},this));b(document).click(this.hdlHideDropDown);b(this.doc).click(this.hdlHideDropDown)},buildButton:function(d,e){var c=b('<a href="javascript:void(null);" title="'+e.title+'" class="redactor_btn_'+d+'"><span>&nbsp;</span></a>');if(typeof(e.func)=="undefined"){c.click(b.proxy(function(){this.execCommand(e.exec,d)},this))}else{if(e.func!="show"){c.click(b.proxy(function(f){this[e.func](f)},this))}}return c},buildDropdown:function(d,c){b.each(c,b.proxy(function(e,g){if(typeof(g.style)=="undefined"){g.style=""}var f;if(g.name=="separator"){f=b('<a class="redactor_separator_drop">')}else{f=b('<a href="javascript:void(null);" style="'+g.style+'">'+g.title+"</a>");if(typeof(g.func)=="undefined"){b(f).click(b.proxy(function(){this.execCommand(g.exec,e)},this))}else{b(f).click(b.proxy(function(h){this[g.func](h)},this))}}b(d).append(f)},this));return d},buildColorPicker:function(l,k){var f;if(k=="backcolor"){if(b.browser.msie){f="BackColor"}else{f="hilitecolor"}}else{f="forecolor"}b(l).width(210);var g=this.opts.colors.length;for(var e=0;e<g;++e){var c=this.opts.colors[e];var j=b('<a rel="'+c+'" href="javascript:void(null);" class="redactor_color_link"></a>').css({backgroundColor:c});b(l).append(j);var h=this;b(j).click(function(){h.execCommand(f,b(this).attr("rel"))})}var d=b('<a href="javascript:void(null);" class="redactor_color_none"></a>').html(RLANG.none);if(k=="backcolor"){d.click(b.proxy(this.setBackgroundNone,this))}else{d.click(b.proxy(this.setColorNone,this))}b(l).append(d);return l},setBackgroundNone:function(){b(this.getParentNode()).css("background-color","transparent");this.syncCode()},setColorNone:function(){b(this.getParentNode()).attr("color","").css("color","");this.syncCode()},showDropDown:function(g,h,c){this.hideAllDropDown();this.setBtnActive(c);this.getBtn(c).addClass("dropact");var f=this.getBtn(c).offset().left;if(this.opts.fixed&&this.fixed){b(h).css({position:"fixed",left:f+"px",top:"30px"}).show()}else{var d=this.$toolbar.offset().top+30;b(h).css({position:"absolute",left:f+"px",top:d+"px"}).show()}},hideAllDropDown:function(){this.$toolbar.find("a.dropact").removeClass("act").removeClass("dropact");b(".redactor_dropdown").hide()},hideDropDown:function(d,f,c){if(!b(d.target).parent().hasClass("dropact")){b(f).removeClass("act");this.showedDropDown=false;this.hideAllDropDown()}},getSelection:function(){if(this.$frame.get(0).contentWindow.getSelection){return this.$frame.get(0).contentWindow.getSelection()}else{if(this.$frame.get(0).contentWindow.document.selection){return this.$frame.get(0).contentWindow.document.selection.createRange()}}},getParentNode:function(){if(window.getSelection){return this.getSelection().getRangeAt(0).startContainer.parentNode}else{if(document.selection){return this.getSelection().parentElement()}}},getCurrentNode:function(){if(window.getSelection){return this.getSelection().getRangeAt(0).startContainer}else{if(document.selection){return this.getSelection()}}},setFocusNode:function(f,d){var c=this.doc.createRange();var e=this.getSelection();d=d?0:1;if(e!==null){c.selectNodeContents(f);e.addRange(c);e.collapse(f,d)}this.focus()},insertNodeAtCaret:function(g){if(typeof window.getSelection!="undefined"){var h=this.getSelection();if(h.rangeCount){var d=h.getRangeAt(0);d.collapse(false);d.insertNode(g);d=d.cloneRange();d.selectNodeContents(g);d.collapse(false);h.removeAllRanges();h.addRange(d)}}else{if(typeof document.selection!="undefined"&&document.selection.type!="Control"){var e=(g.nodeType==1)?g.outerHTML:g.data;var i="marker_"+(""+Math.random()).slice(2);e+='<span id="'+i+'"></span>';var f=this.getSelection();f.collapse(false);f.pasteHTML(e);var c=document.getElementById(i);f.moveToElementText(c);f.select();c.parentNode.removeChild(c)}}},getBtn:function(c){return b(this.$toolbar.find("a.redactor_btn_"+c))},setBtnActive:function(c){this.getBtn(c).addClass("act")},setBtnInactive:function(c){this.getBtn(c).removeClass("act")},changeBtnIcon:function(c,d){this.getBtn(c).addClass("redactor_btn_"+d)},removeBtnIcon:function(c,d){this.getBtn(c).removeClass("redactor_btn_"+d)},removeBtn:function(c){this.getBtn(c).remove()},addBtn:function(c,d){this.$toolbar.append(b("<li>").append(this.buildButton(c,d)))},fullscreen:function(){var c;if(this.opts.fullscreen===false){this.changeBtnIcon("fullscreen","normalscreen");this.setBtnActive("fullscreen");this.opts.fullscreen=true;this.height=this.$frame.css("height");this.width=(this.$box.width()-2)+"px";c=this.getCode();this.tmpspan=b("<span></span>");this.$box.addClass("redactor_box_fullscreen").after(this.tmpspan);b(document.body).prepend(this.$box).css("overflow","hidden");this.$editor=this.enable(c);b(this.doc).click(b.proxy(this.hideAllDropDown,this));b(this.doc).click(b.proxy(function(d){this.$editor.focus()},this));this.observeImages();this.fullScreenResize();b(window).resize(b.proxy(this.fullScreenResize,this));b(document).scrollTop(0,0);this.focus()}else{this.removeBtnIcon("fullscreen","normalscreen");this.setBtnInactive("fullscreen");this.opts.fullscreen=false;b(window).unbind("resize",b.proxy(this.fullScreenResize,this));b(document.body).css("overflow","");c=this.getCode();this.$box.removeClass("redactor_box_fullscreen").css("width","auto");this.tmpspan.after(this.$box).remove();this.$editor=this.enable(c);this.observeImages();this.observeAutoResize();b(this.doc).click(b.proxy(this.hideAllDropDown,this));b(this.doc).click(b.proxy(function(d){this.$editor.focus()},this));this.syncCode();this.$frame.css("height",this.height);this.$el.css("height",this.height);this.focus()}},fullScreenResize:function(){if(this.opts.fullscreen===false){return}var d=42;if(this.opts.air){d=2}var c=b(window).height()-d;this.$box.width(b(window).width()-2);this.$frame.height(c);this.$el.height(c)},buildResizer:function(){if(this.opts.resize===false){return false}this.$resizer=b('<div class="redactor_resizer">&mdash;</div>');this.$box.append(this.$resizer);this.$resizer.mousedown(b.proxy(this.initResize,this))},initResize:function(c){if(c.preventDefault){c.preventDefault()}this.splitter=c.target;if(this.opts.visual){this.element_resize=this.$frame;this.element_resize.get(0).style.visibility="hidden";this.element_resize_parent=this.$el}else{this.element_resize=this.$el;this.element_resize_parent=this.$frame}this.stopResizeHdl=b.proxy(this.stopResize,this);this.startResizeHdl=b.proxy(this.startResize,this);this.resizeHdl=b.proxy(this.resize,this);b(document).mousedown(this.startResizeHdl);b(document).mouseup(this.stopResizeHdl);b(this.splitter).mouseup(this.stopResizeHdl);this.null_point=false;this.h_new=false;this.h=this.element_resize.height()},startResize:function(){b(document).mousemove(this.resizeHdl)},resize:function(d){if(d.preventDefault){d.preventDefault()}var f=d.pageY;if(this.null_point===false){this.null_point=f}if(this.h_new===false){this.h_new=this.element_resize.height()}var c=(this.h_new+f-this.null_point)-10;if(c<=30){return true}if(c>=0){this.element_resize.get(0).style.height=c+"px";this.element_resize_parent.get(0).style.height=c+"px"}},stopResize:function(c){b(document).unbind("mousemove",this.resizeHdl);b(document).unbind("mousedown",this.startResizeHdl);b(document).unbind("mouseup",this.stopResizeHdl);b(this.splitter).unbind("mouseup",this.stopResizeHdl);this.element_resize.get(0).style.visibility="visible"},resizeImage:function(d){var g=false;var c=false;var l;var k;var f=b(d).width()/b(d).height();var h=1;var i=1;var j=1;var e=1;b(d).hover(function(){b(d).css("cursor","nw-resize")},function(){b(d).css("cursor","default");g=false});b(d).mousedown(function(m){if(m.preventDefault){m.preventDefault()}g=true;c=true;l=Math.round(m.pageX-b(d).eq(0).offset().left);k=Math.round(m.pageY-b(d).eq(0).offset().top)});b(d).mouseup(b.proxy(function(m){g=false;this.syncCode()},this));b(d).click(b.proxy(function(m){if(c){this.imageEdit(m)}},this));b(d).mousemove(function(q){if(g){c=false;var n=Math.round(q.pageX-b(this).eq(0).offset().left)-l;var m=Math.round(q.pageY-b(this).eq(0).offset().top)-k;var p=b(d).height();var r=parseInt(p)+m;var o=r*f;if(i==1||(typeof(i)=="number"&&o<i&&o>j)){b(d).width(o)}if(h==1||(typeof(h)=="number"&&r<h&&r>e)){b(d).height(r)}l=Math.round(q.pageX-b(this).eq(0).offset().left);k=Math.round(q.pageY-b(this).eq(0).offset().top)}})},showTable:function(){this.modalInit(RLANG.table,this.opts.path+"/plugins/table.html",230,b.proxy(function(){b("#redactor_table_rows").focus();b("#redactor_insert_table_btn").click(b.proxy(this.insertTable,this))},this))},insertTable:function(){var m=b("#redactor_table_rows").val();var f=b("#redactor_table_columns").val();var c=b("<div></div>");var d=Math.floor(Math.random()*99999);var k=b('<table id="table'+d+'"><tbody></tbody></table>');for(var g=0;g<m;g++){var l=b("<tr></tr>");for(var j=0;j<f;j++){var e=b("<td>&nbsp;</td>");b(l).append(e)}b(k).append(l)}b(c).append(k);var h=b(c).html();if(b.browser.msie){h+="<p></p>"}else{h+="<p>&nbsp;</p>"}this.execCommand("inserthtml",h);this.modalClose();this.$table=b(this.doc).find("body").find("#table"+d);this.$table.click(b.proxy(this.tableObserver,this))},tableObserver:function(c){this.$table=b(c.target).parents("table");this.$table_tr=this.$table.find("tr");this.$table_td=this.$table.find("td");this.$table_td.removeClass("current");this.$tbody=b(c.target).parents("tbody");this.$thead=b(this.$table).find("thead");this.$current_td=b(c.target);this.$current_td.addClass("current");this.$current_tr=b(c.target).parents("tr")},deleteTable:function(){b(this.$table).remove();this.$table=false;this.syncCode()},deleteRow:function(){b(this.$current_tr).remove();this.syncCode()},deleteColumn:function(){var c=b(this.$current_td).get(0).cellIndex;b(this.$table).find("tr").each(function(){b(this).find("td").eq(c).remove()});this.syncCode()},addHead:function(){if(b(this.$table).find("thead").size()!==0){this.deleteHead()}else{var c=b(this.$table).find("tr").first().clone();c.find("td").html("&nbsp;");this.$thead=b("<thead></thead>");this.$thead.append(c);b(this.$table).prepend(this.$thead);this.syncCode()}},deleteHead:function(){b(this.$thead).remove();this.$thead=false;this.syncCode()},insertRowAbove:function(){this.insertRow("before")},insertRowBelow:function(){this.insertRow("after")},insertColumnLeft:function(){this.insertColumn("before")},insertColumnRight:function(){this.insertColumn("after")},insertRow:function(c){var d=b(this.$current_tr).clone();d.find("td").html("&nbsp;");if(c=="after"){b(this.$current_tr).after(d)}else{b(this.$current_tr).before(d)}this.syncCode()},insertColumn:function(d){var c=0;this.$current_td.addClass("current");this.$current_tr.find("td").each(function(e,f){if(b(f).hasClass("current")){c=e}});this.$table_tr.each(function(e,f){var g=b(f).find("td").eq(c);var h=g.clone();h.html("&nbsp;");if(d=="after"){b(g).after(h)}else{b(g).before(h)}});this.syncCode()},showVideo:function(){if(b.browser.msie){this.markerIE()}this.modalInit(RLANG.video,this.opts.path+"/plugins/video.html",600,b.proxy(function(){b("#redactor_insert_video_area").focus();b("#redactor_insert_video_btn").click(b.proxy(this.insertVideo,this))},this))},insertVideo:function(){var c=b("#redactor_insert_video_area").val();if(b.browser.msie){b(this.doc.getElementById("span"+this.spanid)).after(c).remove();this.syncCode()}else{this.execCommand("inserthtml",c)}this.modalClose()},imageEdit:function(g){var c=b(g.target);var f=c.parent();var d=b.proxy(function(){b("#redactor_file_alt").val(c.attr("alt"));b("#redactor_image_edit_src").attr("href",c.attr("src"));b("#redactor_form_image_align").val(c.css("float"));if(b(f).get(0).tagName=="A"){b("#redactor_file_link").val(b(f).attr("href"))}b("#redactor_image_delete_btn").click(b.proxy(function(){this.imageDelete(c)},this));b("#redactorSaveBtn").click(b.proxy(function(){this.imageSave(c)},this))},this);this.modalInit(RLANG.image,this.opts.path+"/plugins/image_edit.html",380,d)},imageDelete:function(c){b(c).remove();this.modalClose();this.syncCode()},imageSave:function(d){var c=b(d).parent();b(d).attr("alt",b("#redactor_file_alt").val());var f=b("#redactor_form_image_align").val();if(f=="left"){b(d).css({"float":"left",margin:"0 10px 10px 0"})}else{if(f=="right"){b(d).css({"float":"right",margin:"0 0 10px 10px"})}else{b(d).css({"float":"none",margin:"0"})}}var e=b.trim(b("#redactor_file_link").val());if(e!==""){if(b(c).get(0).tagName!="A"){b(d).replaceWith('<a href="'+e+'">'+this.outerHTML(d)+"</a>")}else{b(c).attr("href",e)}}this.modalClose();this.observeImages();this.syncCode()},showImage:function(){if(b.browser.msie){this.markerIE()}var c=b.proxy(function(){if(this.opts.imageGetJson!==false){b.getJSON(this.opts.imageGetJson,b.proxy(function(d){b.each(d,b.proxy(function(f,g){var e=b('<img src="'+g.thumb+'" rel="'+g.image+'" />');b("#redactor_image_box").append(e);b(e).click(b.proxy(this.imageSetThumb,this))},this))},this))}else{b("#redactor_tabs li").eq(1).remove()}if(b("#redactor_file").size()!==0){b("#redactor_file").dragupload({url:this.opts.imageUpload,success:b.proxy(this.imageUploadCallback,this)})}this.uploadInit("redactor_file",{auto:true,url:this.opts.imageUpload,success:b.proxy(this.imageUploadCallback,this)});b("#redactor_upload_btn").click(b.proxy(this.imageUploadCallbackLink,this))},this);this.modalInit(RLANG.image,this.opts.path+"/plugins/image.html",570,c,true)},imageSetThumb:function(c){this._imageSet('<img alt="" src="'+b(c.target).attr("rel")+'" />')},imageUploadCallbackLink:function(){if(b("#redactor_file_link").val()!==""){var c='<img src="'+b("#redactor_file_link").val()+'" />';this._imageSet(c)}else{this.modalClose()}},imageUploadCallback:function(c){this._imageSet(c)},_imageSet:function(c){c="<p>"+c+"</p>";this.focus();if(b.browser.msie){b(this.doc.getElementById("span"+this.spanid)).after(c).remove();this.syncCode()}else{this.execCommand("inserthtml",c)}this.modalClose();this.observeImages()},showLink:function(){var c=b.proxy(function(){var g=this.getSelection();if(b.browser.msie){var f=this.getParentNode();if(f.nodeName=="A"){this.insert_link_node=b(f);var h=this.insert_link_node.text();var d=this.insert_link_node.attr("href")}else{if(this.oldIE()){var h=g.text}else{var h=g.toString()}var d="";this.spanid=Math.floor(Math.random()*99999);var e='<span id="span'+this.spanid+'">'+h+"</span>";if(h!=""){e='<span id="span'+this.spanid+'">'+h+"</span>"}this.execCommand("inserthtml",e)}}else{if(g&&g.anchorNode.parentNode.tagName=="A"){var d=g.anchorNode.parentNode.href;var h=g.anchorNode.parentNode.text;if(g.toString()===""){this.insert_link_node=g.anchorNode.parentNode}}else{var h=g.toString();var d=""}}b(".redactor_link_text").val(h);b("#redactor_link_url").val(d).focus();b("#redactor_insert_link_btn").click(b.proxy(this.insertLink,this));if(b("#redactor_file").size()!=0){b("#redactor_file").dragupload({url:this.opts.linkFileUpload,success:b.proxy(this.insertLinkFile,this)})}this.uploadInit("redactor_file",{auto:true,url:this.opts.linkFileUpload,success:b.proxy(this.insertLinkFile,this)})},this);this.modalInit(RLANG.link,this.opts.path+"/plugins/link.html",460,c)},insertLink:function(){var d=b("#redactor_tab_selected").val();var c="",e="";if(d==1){c=b("#redactor_link_url").val();e=b("#redactor_link_url_text").val()}else{if(d==2){c="mailto:"+b("#redactor_link_mailto").val();e=b("#redactor_link_mailto_text").val()}else{if(d==3){c="#"+b("#redactor_link_anchor").val();e=b("#redactor_link_anchor_text").val()}}}this._insertLink('<a href="'+c+'">'+e+"</a> ",b.trim(e),c)},insertLinkFile:function(c){text=b("#redactor_link_file_text").val();this._insertLink('<a href="'+c+'">'+text+"</a> ",b.trim(text),c)},_insertLink:function(c,e,d){if(e!=""){if(this.insert_link_node){b(this.insert_link_node).text(e);b(this.insert_link_node).attr("href",d);this.syncCode()}else{if(b.browser.msie){b(this.doc.getElementById("span"+this.spanid)).replaceWith(c);this.syncCode()}else{this.execCommand("inserthtml",c)}}}this.modalClose()},showFile:function(){if(b.browser.msie){this.markerIE()}var c=b.proxy(function(){b("#redactor_file").dragupload({url:this.opts.fileUpload,success:b.proxy(function(d){this.fileUploadCallback(d)},this)});this.uploadInit("redactor_file",{auto:true,url:this.opts.fileUpload,success:b.proxy(function(d){this.fileUploadCallback(d)},this)})},this);this.modalInit(RLANG.file,this.opts.path+"/plugins/file.html",500,c)},fileUploadCallback:function(c){if(b.browser.webkit&&!!window.chrome){c=c+"&nbsp;"}if(b.browser.msie){b(this.doc.getElementById("span"+this.spanid)).after(c).remove();this.syncCode()}else{this.execCommand("inserthtml",c)}this.modalClose()},modalInit:function(g,d,f,e,c){if(b("#redactor_modal_overlay").size()==0){this.overlay=b('<div id="redactor_modal_overlay" style="display: none;"></div>');b("body").prepend(this.overlay)}if(this.opts.overlay){b("#redactor_modal_overlay").show();b("#redactor_modal_overlay").click(b.proxy(this.modalClose,this))}if(b("#redactor_modal").size()==0){this.modal=b('<div id="redactor_modal" style="display: none;"><div id="redactor_modal_close">&times;</div><div id="redactor_modal_header"></div><div id="redactor_modal_inner"></div></div>');b("body").append(this.modal)}b("#redactor_modal_close").click(b.proxy(this.modalClose,this));this.hdlModalClose=b.proxy(function(h){if(h.keyCode==27){this.modalClose()}},this);b(document).keyup(this.hdlModalClose);b(this.doc).keyup(this.hdlModalClose);b.ajax({dataType:"html",type:"get",url:d,success:b.proxy(function(i){b.each(RLANG,function(j,l){var k=new RegExp("%RLANG."+j+"%","gi");i=i.replace(k,l)});b("#redactor_modal_inner").html(i);b("#redactor_modal_header").html(g);if(typeof(e)=="function"){e()}var h=b("#redactor_modal").outerHeight();b("#redactor_modal").css({width:f+"px",height:"auto",marginTop:"-"+(h+10)/2+"px",marginLeft:"-"+(f+100)/2+"px"}).fadeIn("fast");if(c===true){b("#redactor_image_box").height(300).css("overflow","auto")}if(b("#redactor_tabs").size()!=0){b("#redactor_tabs a").each(function(j,k){j++;b(k).click(function(){b("#redactor_tabs a").removeClass("redactor_tabs_act");b(this).addClass("redactor_tabs_act");b(".redactor_tab").hide();b("#redactor_tab"+j).show();b("#redactor_tab_selected").val(j);var l=b("#redactor_modal").outerHeight();b("#redactor_modal").css("margin-top","-"+(l+10)/2+"px")})})}b("#redactor_btn_modal_close").click(b.proxy(this.modalClose,this))},this)})},modalClose:function(){b("#redactor_modal_close").unbind("click",this.modalClose);b("#redactor_modal").fadeOut("fast",b.proxy(function(){b("#redactor_modal_inner").html("");if(this.opts.overlay){b("#redactor_modal_overlay").hide();b("#redactor_modal_overlay").unbind("click",this.modalClose)}b(document).unbind("keyup",this.hdlModalClose);b(this.doc).unbind("keyup",this.hdlModalClose)},this))},uploadInit:function(d,c){this.uploadOptions={url:false,success:false,start:false,trigger:false,auto:false,input:false};b.extend(this.uploadOptions,c);if(b("#"+d).size()!=0&&b("#"+d).get(0).tagName=="INPUT"){this.uploadOptions.input=b("#"+d);this.element=b(b("#"+d).get(0).form)}else{this.element=b("#"+d)}this.element_action=this.element.attr("action");if(this.uploadOptions.auto){b(this.uploadOptions.input).change(b.proxy(function(){this.element.submit(function(f){return false});this.uploadSubmit()},this))}else{if(this.uploadOptions.trigger){b("#"+this.uploadOptions.trigger).click(b.proxy(this.uploadSubmit,this))}}},uploadSubmit:function(){this.uploadForm(this.element,this.uploadFrame())},uploadFrame:function(){this.id="f"+Math.floor(Math.random()*99999);var e=document.createElement("div");var c='<iframe style="display:none" src="about:blank" id="'+this.id+'" name="'+this.id+'"></iframe>';e.innerHTML=c;document.body.appendChild(e);if(this.uploadOptions.start){this.uploadOptions.start()}b("#"+this.id).load(b.proxy(this.uploadLoaded,this));return this.id},uploadForm:function(g,e){if(this.uploadOptions.input){var h="redactorUploadForm"+this.id;var c="redactorUploadFile"+this.id;this.form=b('<form action="'+this.uploadOptions.url+'" method="POST" target="'+e+'" name="'+h+'" id="'+h+'" enctype="multipart/form-data"></form>');var d=this.uploadOptions.input;var i=b(d).clone();b(d).attr("id",c);b(d).before(i);b(d).appendTo(this.form);b(this.form).css("position","absolute");b(this.form).css("top","-2000px");b(this.form).css("left","-2000px");b(this.form).appendTo("body");this.form.submit()}else{g.attr("target",e);g.attr("method","POST");g.attr("enctype","multipart/form-data");g.attr("action",this.uploadOptions.url);this.element.submit()}},uploadLoaded:function(){var c=b("#"+this.id);if(c.contentDocument){var e=c.contentDocument}else{if(c.contentWindow){var e=c.contentWindow.document}else{var e=window.frames[this.id].document}}if(e.location.href=="about:blank"){return true}if(this.uploadOptions.success){this.uploadOptions.success(e.body.innerHTML)}this.element.attr("action",this.element_action);this.element.attr("target","")},markerIE:function(){this.spanid=Math.floor(Math.random()*99999);this.execCommand("inserthtml",'<span id="span'+this.spanid+'"></span>')},oldIE:function(){if(b.browser.msie&&parseInt(b.browser.version,10)<9){return true}return false},outerHTML:function(c){return b("<p>").append(b(c).eq(0).clone()).html()},normalize:function(c){return parseInt(c.replace("px",""))}};b.fn.getDoc=function(){return b(this.data("redactor").doc)};b.fn.getFrame=function(){return this.data("redactor").$frame};b.fn.getEditor=function(){return this.data("redactor").$editor};b.fn.getCode=function(){return this.data("redactor").getCode()};b.fn.setCode=function(c){this.data("redactor").setCode(c)};b.fn.insertHtml=function(c){this.data("redactor").insertHtml(c)};b.fn.destroyEditor=function(){this.data("redactor").destroy();this.removeData("redactor")};b.fn.setFocus=function(){this.data("redactor").focus()};b.fn.execCommand=function(c,d){this.data("redactor").execCommand(c,d)}})(jQuery);(function(b){b.fn.dragupload=function(c){return this.each(function(){var d=new a(this,c);d.init()})};function a(d,c){this.opts=b.extend({url:false,success:false,preview:false,text:RLANG.drop_file_here,atext:RLANG.or_choose},c);this.$el=b(d)}a.prototype={init:function(){if(!b.browser.opera&&!b.browser.msie){this.droparea=b('<div class="redactor_droparea"></div>');this.dropareabox=b('<div class="redactor_dropareabox">'+this.opts.text+"</div>");this.dropalternative=b('<div class="redactor_dropalternative">'+this.opts.atext+"</div>");this.droparea.append(this.dropareabox);this.$el.before(this.droparea);this.$el.before(this.dropalternative);this.dropareabox.bind("dragover",b.proxy(function(){return this.ondrag()},this));this.dropareabox.bind("dragleave",b.proxy(function(){return this.ondragleave()},this));this.dropareabox.get(0).ondrop=b.proxy(function(e){e.preventDefault();this.dropareabox.removeClass("hover").addClass("drop");var d=e.dataTransfer.files[0];var c=new FormData();c.append("file",d);b.ajax({dataType:"html",url:this.opts.url,data:c,cache:false,contentType:false,processData:false,type:"POST",success:b.proxy(function(f){if(this.opts.success!==false){this.opts.success(f)}if(this.opts.preview===true){this.dropareabox.html(f)}},this)})},this)}},ondrag:function(){this.dropareabox.addClass("hover");return false},ondragleave:function(){this.dropareabox.removeClass("hover");return false}}})(jQuery);(function(b){var d=/(^|&lt;|\s)(www\..+?\..+?)(\s|&gt;|$)/g,a=/(^|&lt;|\s)(((https?|ftp):\/\/|mailto:).+?)(\s|&gt;|$)/g,c=function(){var g=this.childNodes,f=g.length;while(f--){var h=g[f];if(h.nodeType==3){var e=h.nodeValue;if(e){e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(d,'$1<a href="http://$2">$2</a>$3').replace(a,'$1<a href="$2">$2</a>$5');b(h).after(e).remove()}}else{if(h.nodeType==1&&!/^(a|button|textarea)$/i.test(h.tagName)){c.call(h)}}}};b.fn.linkify=function(){this.each(c)}})(jQuery);
+var RTOOLBAR={};(function(b){jQuery.fn.redactor=function(c){return this.each(function(){var e=b(this);var d=e.data("redactor");if(!d){e.data("redactor",(d=new a(this,c)))}})};var a=function(d,c){this.$el=b(d);this.opts=b.extend({lang:"en",toolbar:"default",load:true,path:false,css:"style.css",focus:true,resize:true,autoresize:false,fixed:false,autoformat:true,cleanUp:true,convertDivs:true,removeClasses:true,removeStyles:false,convertLinks:true,handler:false,autosave:false,interval:60,imageGetJson:false,imageUpload:false,linkFileUpload:false,fileUpload:false,visual:true,fullscreen:false,overlay:true,colors:Array("#ffffff","#000000","#eeece1","#1f497d","#4f81bd","#c0504d","#9bbb59","#8064a2","#4bacc6","#f79646","#ffff00","#f2f2f2","#7f7f7f","#ddd9c3","#c6d9f0","#dbe5f1","#f2dcdb","#ebf1dd","#e5e0ec","#dbeef3","#fdeada","#fff2ca","#d8d8d8","#595959","#c4bd97","#8db3e2","#b8cce4","#e5b9b7","#d7e3bc","#ccc1d9","#b7dde8","#fbd5b5","#ffe694","#bfbfbf","#3f3f3f","#938953","#548dd4","#95b3d7","#d99694","#c3d69b","#b2a2c7","#b7dde8","#fac08f","#f2c314","#a5a5a5","#262626","#494429","#17365d","#366092","#953734","#76923c","#5f497a","#92cddc","#e36c09","#c09100","#7f7f7f","#0c0c0c","#1d1b10","#0f243e","#244061","#632423","#4f6128","#3f3151","#31859b","#974806","#7f6000"),allEmptyHtml:"<p><br /></p>",mozillaEmptyHtml:"<p>&nbsp;</p>"},c,this.$el.data());this.dropdowns=[];this.init()};a.prototype={_loadFile:function(c,f){var d=f[0];f.splice(0,1);var e;if(typeof(d)=="function"){e=d}else{e=b.proxy(function(){this._loadFile(d,f)},this)}this.dynamicallyLoad(c,e)},loadFiles:function(d){var c=d[0];d.splice(0,1);this._loadFile(c,d)},dynamicallyLoad:function(e,g){var f=document.getElementsByTagName("head")[0];var d=document.createElement("script");d.src=e;var c=false;d.onload=d.onreadystatechange=function(){if(!c&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){c=true;if(g){g()}d.onload=d.onreadystatechange=null}};f.appendChild(d)},init:function(){this.getPath();if(this.opts.load){var c=[];c.push(this.opts.path+"/langs/"+this.opts.lang+".js");if(this.opts.toolbar!==false){c.push(this.opts.path+"/toolbars/"+this.opts.toolbar+".js")}c.push(b.proxy(this.start,this));this.loadFiles(c)}else{this.start()}},start:function(){this.height=this.$el.css("height");this.width=this.$el.css("width");this.build();var c=this.$el.val();c=this.preformater(c);if(this.opts.autoformat){c=this.paragraphy(c)}this.$editor=this.enable(c);b(this.doc).click(b.proxy(function(d){this.$editor.focus()},this));b(this.doc).bind("paste",b.proxy(function(d){setTimeout(b.proxy(function(){var e=b('<span id="pastemarkerend">&nbsp;</span>');this.insertNodeAtCaret(e.get(0));this.pasteCleanUp()},this),200)},this));b(this.doc).keypress(b.proxy(function(f){var d=f.keyCode||f.which;if(navigator.userAgent.indexOf("AppleWebKit")!=-1){return this.safariShiftKeyEnter(f,d)}},this)).keyup(b.proxy(function(f){var d=f.keyCode||f.which;if(this.opts.autoformat){if(d==8||d==46){return this.formatEmpty(f)}if(d==13&&!f.shiftKey&&!f.ctrlKey&&!f.metaKey){return this.formatNewLine(f)}}this.syncCode()},this));this.buildToolbar();if(this.opts.autoresize===false){this.buildResizer()}else{this.observeAutoResize()}this.shortcuts();this.autoSave();this.observeImages();if(this.opts.fullscreen){this.opts.fullscreen=false;this.fullscreen()}if(this.opts.focus){this.focus()}if(this.opts.fixed){this.observeScroll();b(document).scroll(b.proxy(this.observeScroll,this))}},shortcuts:function(){b(this.doc).keydown(b.proxy(function(d){var c=d.keyCode||d.which;if(d.ctrlKey){if(c==90){this._shortcuts(d,"undo")}else{if(c==90&&d.shiftKey){this._shortcuts(d,"redo")}else{if(c==77){this._shortcuts(d,"removeFormat")}else{if(c==66){this._shortcuts(d,"bold")}else{if(c==73){this._shortcuts(d,"italic")}else{if(c==74){this._shortcuts(d,"insertunorderedlist")}else{if(c==75){this._shortcuts(d,"insertorderedlist")}else{if(c==76){this._shortcuts(d,"superscript")}}}}}}}}}if(!d.shiftKey&&c==9){this._shortcuts(d,"indent")}else{if(d.shiftKey&&c==9){this._shortcuts(d,"outdent")}}},this))},_shortcuts:function(d,c){if(d.preventDefault){d.preventDefault()}this.execCommand(c,null)},getPath:function(){if(this.opts.path!==false){return this.opts.path}b("script").each(b.proxy(function(c,d){if(d.src){var e=new RegExp(/\/redactor(\.min)?\.js(\?.*)?/);if(d.src.match(e)){this.opts.path=d.src.replace(e,"")}}},this))},build:function(){this.$box=b('<div class="redactor_box"></div>');this.$frame=b('<iframe frameborder="0" scrolling="auto" style="height: '+this.height+';" class="redactor_frame"></iframe>');this.$el.css("width","100%").hide();this.$box.insertAfter(this.$el).append(this.$frame).append(this.$el)},write:function(c){this.doc.open();this.doc.write(c);this.doc.close()},enable:function(c){this.doc=this.getDoc(this.$frame.get(0));if(this.doc!==null){this.write(this.setDoc(c));if(b.browser.mozilla){this.doc.execCommand("useCSS",false,true)}return b(this.doc).find("#page")}else{return false}},setDoc:function(d){var c="<!DOCTYPE html>\n";c+='<html><head><link media="all" type="text/css" href="'+this.opts.path+"/css/"+this.opts.css+'" rel="stylesheet"></head>';c+='<body><div id="page" contenteditable="true">';c+=d;c+="</div></body></html>";return c},getDoc:function(c){if(c.contentDocument){return c.contentDocument}else{if(c.contentWindow&&c.contentWindow.document){return c.contentWindow.document}else{if(c.document){return c.document}else{return null}}}},focus:function(){this.$editor.focus()},syncCode:function(){var c=this.formating(this.$editor.html());this.$el.val(c)},setCode:function(c){c=this.preformater(c);this.$editor.html(c).focus();this.syncCode()},getCode:function(){var c=this.$editor?this.$editor.html():this.$el.val();c=this.reformater(c);return c},insertHtml:function(c){this.execCommand("inserthtml",c)},destroy:function(){var c=this.getCode();this.$box.after(this.$el);this.$box.remove();this.$el.val(c).show();this.dropdowns.forEach(function(e,d){e.remove();delete (this.dropdowns[d])},this)},handler:function(){b.ajax({url:this.opts.handler,type:"post",data:"redactor="+escape(encodeURIComponent(this.getCode())),success:b.proxy(function(c){this.setCode(c);this.syncCode()},this)})},observeImages:function(){if(b.browser.mozilla){this.doc.execCommand("enableObjectResizing",false,"false")}b(this.doc).find("img").attr("unselectable","on").each(b.proxy(function(c,d){this.resizeImage(d)},this))},observeScroll:function(){var c=b(document).scrollTop();var d=this.$box.offset().top;if(c>d){this.fixed=true;this.$toolbar.css({position:"fixed",width:"100%"})}else{this.fixed=false;this.$toolbar.css({position:"relative",width:"auto"})}},observeAutoResize:function(){this.$editor.css({"min-height":this.$el.height()+"px"});this.$frame.css({"overflow-x":"auto","overflow-y":"hidden"});this.$frame.load(b.proxy(this.setAutoSize,this));b(this.doc).keyup(b.proxy(this.setAutoSize,this))},setAutoSize:function(){this.$frame.height(this.$editor.outerHeight(true)+30)},execCommand:function(c,f){if(this.opts.visual&&this.doc){try{if(b.browser.msie){this.focus()}if(c=="inserthtml"&&b.browser.msie){this.doc.selection.createRange().pasteHTML(f)}else{if(c=="formatblock"&&b.browser.msie){this.doc.execCommand(c,false,"<"+f+">")}else{this.doc.execCommand(c,false,f)}}this.syncCode();this.focus()}catch(d){}}},formatNewLine:function(d){var c=this.getParentNode();if(c.nodeName=="DIV"&&c.id=="page"){if(d.preventDefault){d.preventDefault()}element=b(this.getCurrentNode());if(element.get(0).tagName=="DIV"&&(element.html()==""||element.html()=="<br>")){newElement=b("<p>").append(element.clone().get(0).childNodes);element.replaceWith(newElement);newElement.html("<br />");this.setFocusNode(newElement.get(0));this.syncCode();return false}else{this.syncCode()}if(this.opts.convertLinks){this.$editor.linkify()}}else{this.syncCode();return true}},safariShiftKeyEnter:function(f,d){if(f.shiftKey&&d==13){if(f.preventDefault){f.preventDefault()}var c=b("<span><br /></span>");this.insertNodeAtCaret(c.get(0));this.setFocusNode(c.get(0));this.syncCode();return false}},formatEmpty:function(g){var d=b.trim(this.$editor.html());if(b.browser.mozilla){d=d.replace(/<br>/gi,"")}if(d===""){if(g.preventDefault){g.preventDefault()}var c=this.opts.allEmptyHtml;if(b.browser.mozilla){c=this.opts.mozillaEmptyHtml}var f=b(c).get(0);this.$editor.html(f);this.setFocusNode(f);this.syncCode();return false}else{this.syncCode()}},paragraphy:function(e){e=b.trim(e);if(e===""){if(!b.browser.mozilla){return this.opts.allEmptyHtml}else{return this.opts.mozillaEmptyHtml}}if(this.opts.convertDivs){e=e.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p>$2</p>")}var f=function(h,i,g){return h.replace(new RegExp(i,"g"),g)};var c=function(h,g){return f(e,h,g)};var d="(table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|style|script|object|input|param|p|h[1-6])";e+="\n";c("<br />\\s*<br />","\n\n");c("(<"+d+"[^>]*>)","\n$1");c("(</"+d+">)","$1\n\n");c("\r\n|\r","\n");c("\n\n+","\n\n");c("\n?((.|\n)+?)$","<p>$1</p>\n");c("<p>\\s*?</p>","");c("<p>(<div[^>]*>\\s*)","$1<p>");c("<p>([^<]+)\\s*?(</(div|address|form)[^>]*>)","<p>$1</p>$2");c("<p>\\s*(</?"+d+"[^>]*>)\\s*</p>","$1");c("<p>(<li.+?)</p>","$1");c("<p>\\s*(</?"+d+"[^>]*>)","$1");c("(</?"+d+"[^>]*>)\\s*</p>","$1");c("(</?"+d+"[^>]*>)\\s*<br />","$1");c("<br />(\\s*</?(p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)","$1");if(e.indexOf("<pre")!=-1){c("(<pre(.|\n)*?>)((.|\n)*?)</pre>",function(j,i,h,g){return f(i,"\\\\(['\"\\\\])","$1")+f(f(f(g,"<p>","\n"),"</p>|<br />",""),"\\\\(['\"\\\\])","$1")+"</pre>"})}return c("\n</p>$","</p>")},preformater:function(c){c=c.replace(/<br>/gi,"<br />");c=c.replace(/<blockquote\b[^>]*>([\w\W]*?)<p>([\w\W]*?)<\/p>([\w\W]*?)<\/blockquote[^>]*>/gi,"<blockquote>$1$2<br />$3</blockquote>");c=c.replace(/<strong\b[^>]*>([\w\W]*?)<\/strong[^>]*>/gi,"<b>$1</b>");c=c.replace(/<em\b[^>]*>([\w\W]*?)<\/em[^>]*>/gi,"<i>$1</i>");c=c.replace(/<del\b[^>]*>([\w\W]*?)<\/del[^>]*>/gi,"<strike>$1</strike>");return c},reformater:function(c){c=c.replace(/<br>/gi,"<br />");c=c.replace(/<b\b[^>]*>([\w\W]*?)<\/b[^>]*>/gi,"<strong>$1</strong>");c=c.replace(/<i\b[^>]*>([\w\W]*?)<\/i[^>]*>/gi,"<em>$1</em>");c=c.replace(/<strike\b[^>]*>([\w\W]*?)<\/strike[^>]*>/gi,"<del>$1</del>");c=c.replace(/<span(.*?)style="font-weight: bold;">([\w\W]*?)<\/span>/gi,"<strong>$2</strong>");c=c.replace(/<span(.*?)style="font-style: italic;">([\w\W]*?)<\/span>/gi,"<em>$2</em>");c=c.replace(/<span(.*?)style="font-weight: bold; font-style: italic;">([\w\W]*?)<\/span>/gi,"<em><strong>$2</strong></em>");c=c.replace(/<span(.*?)style="font-style: italic; font-weight: bold;">([\w\W]*?)<\/span>/gi,"<strong><em>$2</em></strong>");return c},cleanUpClasses:function(c){c=c.replace(/\s*class="TOC(.*?)"/gi,"");c=c.replace(/\s*class="Heading(.*?)"/gi,"");c=c.replace(/\s*class="Body(.*?)"/gi,"");return c},cleanUpStyles:function(c){c=c.replace(/\s*mso-[^:]+:[^;"]+;?/gi,"");c=c.replace(/\s*margin(.*?)pt\s*;/gi,"");c=c.replace(/\s*margin(.*?)cm\s*;/gi,"");c=c.replace(/\s*text-indent:(.*?)\s*;/gi,"");c=c.replace(/\s*line-height:(.*?)\s*;/gi,"");c=c.replace(/\s*page-break-before: [^\s;]+;?"/gi,'"');c=c.replace(/\s*font-variant: [^\s;]+;?"/gi,'"');c=c.replace(/\s*tab-stops:[^;"]*;?/gi,"");c=c.replace(/\s*tab-stops:[^"]*/gi,"");c=c.replace(/\s*face="[^"]*"/gi,"");c=c.replace(/\s*face=[^ >]*/gi,"");c=c.replace(/\s*font:(.*?);/gi,"");c=c.replace(/\s*font-size:(.*?);/gi,"");c=c.replace(/\s*font-weight:(.*?);/gi,"");c=c.replace(/\s*font-family:[^;"]*;?/gi,"");c=c.replace(/<span style="Times New Roman&quot;">\s\n<\/span>/gi,"");return c},cleanUp:function(c){c=c.replace(/(<\!\-\-([\w\W]*?)\-\->)/ig,"");if(this.opts.convertDivs){c=c.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p$1>$2</p>")}c=c.replace(/ lang="([\w\W]*?)"/gi,"");c=c.replace(/<a name="(.*?)">([\w\W]*?)<\/a>/gi,"");c=c.replace(/\&nbsp;\&nbsp;\&nbsp;/gi," ");c=c.replace(/\&nbsp;\&nbsp;/gi," ");c=c.replace(/<o:p>(.*?)<\/o:p>/gi,"");c=c.replace(/\s*style="\s*"/gi,"");c=c.replace(/<span>&nbsp;<\/span>/gi,"");c=c.replace(/<span>([\w\W]*?)<\/span>/gi,"$1");return c},removeTags:function(c){return c.replace(/<(?!\s*\/?(code|span|div|label|a|br|p|b|i|del|strike|img|video|audio|iframe|object|embed|param|blockquote|mark|cite|small|ul|ol|li|hr|dl|dt|dd|sup|sub|big|pre|code|figure|figcaption|strong|em|table|tr|td|th|tbody|thead|tfoot|h1|h2|h3|h4|h5|h6)\b)[^>]+>/gi,"")},pasteCleanUp:function(){var c=this.$editor.html();c=c.replace(/<span id="pastemarkerend">&nbsp;<\/span>/,"#marker#");c=this.formating(c);c=this.cleanUp(c);if(this.opts.removeClasses){c=c.replace(/ class="([\w\W]*?)"/gi,"")}else{c=this.cleanUpClasses(c)}if(this.opts.removeStyles){c=c.replace(/ style="([\w\W]*?)"/gi,"")}else{c=this.cleanUpStyles(c)}c=this.cleanUp(c);c=this.formating(c);c=c.replace(/<b(.*?)id="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi,"$3");c=c.replace(/#marker#/,'<span id="pastemarkerend">&nbsp;</span>');this.$editor.html(c);var d=b(this.doc.body).find("#pastemarkerend").get(0);this.setFocusNode(d);this.syncCode();this.observeImages()},formating:function(j){if(b.browser.msie){j=j.replace(/<*(\/ *)?(\w+)/g,function(i){return i.toLowerCase()});j=j.replace(/style="(.*?)"/g,function(i){return i.toLowerCase()});j=j.replace(/ jQuery(.*?)=\"(.*?)\"/gi,"")}j=j.replace(/<font([\w\W]*?)color="(.*?)">([\w\W]*?)<\/font\>/gi,'<span style="color: $2;">$3</span>');j=j.replace(/<font([\w\W]*?)>([\w\W]*?)<\/font\>/gi,"<span$1>$2</span>");j=j.replace(/<span>([\w\W]*?)<\/span>/gi,"$1");j=j.replace(/ class="Apple-style-span"/gi,"");j=j.replace(/ class="Apple-tab-span"/gi,"");j=j.replace(/<p><p>/g,"<p>");j=j.replace(/<\/p><\/p>/g,"</p>");j=j.replace(/<hr(.*?)>/g,"<hr />");j=j.replace(/<p>&nbsp;/g,"<p>");j=j.replace(/<p><ul>/g,"<ul>");j=j.replace(/<p><ol>/g,"<ol>");j=j.replace(/<\/ul><\/p>/g,"</ul>");j=j.replace(/<\/ol><\/p>/g,"</ol>");j=j.replace(/<p(.*?)>&nbsp;<\/p>/gi,"");j=j.replace(/[\t]*/g,"");j=j.replace(/\n\s*\n/g,"\n");j=j.replace(/^[\s\n]*/,"");j=j.replace(/[\s\n]*$/,"");var e=["<pre></pre>","<blockquote>\\s*</blockquote>","<em>\\s*</em>","<b>\\s*</b>","<ul></ul>","<ol></ol>","<li></li>","<table></table>","<tr></tr>","<span>\\s*<span>","<span>&nbsp;<span>","<p>\\s*</p>","<p>&nbsp;</p>","<p>\\s*<br>\\s*</p>","<div>\\s*</div>","<div>\\s*<br>\\s*</div>"];for(var f=0;f<e.length;++f){var l=e[f];j=j.replace(new RegExp(l,"gi"),"")}var d="\r\n";var h=["<form","<fieldset","<legend","<object","<embed","<select","<option","<input","<textarea","<pre","<blockquote","<ul","<ol","<li","<dl","<dt","<dd","<table","<thead","<tbody","<caption","</caption>","<th","<tr","<td","<figure"];for(var f=0;f<h.length;++f){var g=h[f];j=j.replace(new RegExp(g,"gi"),d+g)}var k=["</p>","</div>","</ul>","</ol>","</h1>","</h2>","</h3>","</h4>","</h5>","</h6>","<br>","<br />","</dl>","</dt>","</dd>","</form>","</blockquote>","</pre>","</legend>","</fieldset>","</object>","</embed>","</textarea>","</select>","</option>","</table>","</thead>","</tbody>","</tr>","</td>","</th>","</figure>"];for(var f=0;f<k.length;++f){var c=k[f];j=j.replace(new RegExp(c,"gi"),c+d)}j=j.replace(/<li/g,"\t<li");j=j.replace(/<tr/g,"\t<tr");j=j.replace(/<td/g,"\t\t<td");j=j.replace(/<\/tr>/g,"\t</tr>");return j},toggle:function(){var c;if(this.opts.visual){this.$frame.hide();c=this.$editor.html();c=b.trim(this.formating(c));this.$el.val(c).show().focus();this.setBtnActive("html");this.opts.visual=false}else{this.$el.hide();this.$editor.html(this.$el.val());this.$frame.show();if(this.$editor.html()===""){if(!b.browser.mozilla){c=this.opts.allEmptyHtml}else{c=this.opts.mozillaEmptyHtml}this.setCode(c)}this.focus();this.setBtnInactive("html");this.opts.visual=true;this.observeImages()}},autoSave:function(){if(this.opts.autosave===false){return false}setInterval(b.proxy(function(){b.post(this.opts.autosave,{data:this.getCode()})},this),this.opts.interval*1000)},buildToolbar:function(){if(this.opts.toolbar===false){return false}this.$toolbar=b("<ul>").addClass("redactor_toolbar");this.$box.prepend(this.$toolbar);b.each(RTOOLBAR[this.opts.toolbar],b.proxy(function(e,f){if(this.opts.fileUpload===false&&e=="file"){return true}var c=b("<li>");if(e=="fullscreen"){b(c).addClass("redactor_toolbar_right")}var d=this.buildButton(e,f);if(e=="backcolor"||e=="fontcolor"||typeof(f.dropdown)!="undefined"){var g=b('<div class="redactor_dropdown" style="display: none;">');if(e=="backcolor"||e=="fontcolor"){g=this.buildColorPicker(g,e)}else{g=this.buildDropdown(g,f.dropdown)}this.dropdowns.push(g.appendTo(b(document.body)));this.hdlHideDropDown=b.proxy(function(h){this.hideDropDown(h,g,e)},this);this.hdlShowDropDown=b.proxy(function(h){this.showDropDown(h,g,e)},this);d.click(this.hdlShowDropDown)}this.$toolbar.append(b(c).append(d));if(typeof(f.separator)!="undefined"){this.$toolbar.append(b('<li class="redactor_separator"></li>'))}},this));b(document).click(this.hdlHideDropDown);b(this.doc).click(this.hdlHideDropDown)},buildButton:function(d,e){var c=b('<a href="javascript:void(null);" title="'+e.title+'" class="redactor_btn_'+d+'"><span>&nbsp;</span></a>');if(typeof(e.func)=="undefined"){c.click(b.proxy(function(){this.execCommand(e.exec,d)},this))}else{if(e.func!="show"){c.click(b.proxy(function(f){this[e.func](f)},this))}}return c},buildDropdown:function(d,c){b.each(c,b.proxy(function(e,g){if(typeof(g.style)=="undefined"){g.style=""}var f;if(g.name=="separator"){f=b('<a class="redactor_separator_drop">')}else{f=b('<a href="javascript:void(null);" style="'+g.style+'">'+g.title+"</a>");if(typeof(g.func)=="undefined"){b(f).click(b.proxy(function(){this.execCommand(g.exec,e)},this))}else{b(f).click(b.proxy(function(h){this[g.func](h)},this))}}b(d).append(f)},this));return d},buildColorPicker:function(l,k){var f;if(k=="backcolor"){if(b.browser.msie){f="BackColor"}else{f="hilitecolor"}}else{f="forecolor"}b(l).width(210);var g=this.opts.colors.length;for(var e=0;e<g;++e){var c=this.opts.colors[e];var j=b('<a rel="'+c+'" href="javascript:void(null);" class="redactor_color_link"></a>').css({backgroundColor:c});b(l).append(j);var h=this;b(j).click(function(){h.execCommand(f,b(this).attr("rel"))})}var d=b('<a href="javascript:void(null);" class="redactor_color_none"></a>').html(RLANG.none);if(k=="backcolor"){d.click(b.proxy(this.setBackgroundNone,this))}else{d.click(b.proxy(this.setColorNone,this))}b(l).append(d);return l},setBackgroundNone:function(){b(this.getParentNode()).css("background-color","transparent");this.syncCode()},setColorNone:function(){b(this.getParentNode()).attr("color","").css("color","");this.syncCode()},showDropDown:function(g,h,c){this.hideAllDropDown();this.setBtnActive(c);this.getBtn(c).addClass("dropact");var f=this.getBtn(c).offset().left;if(this.opts.fixed&&this.fixed){b(h).css({position:"fixed",left:f+"px",top:"30px"}).show()}else{var d=this.$toolbar.offset().top+30;b(h).css({position:"absolute",left:f+"px",top:d+"px"}).show()}},hideAllDropDown:function(){this.$toolbar.find("a.dropact").removeClass("act").removeClass("dropact");b(".redactor_dropdown").hide()},hideDropDown:function(d,f,c){if(!b(d.target).parent().hasClass("dropact")){b(f).removeClass("act");this.showedDropDown=false;this.hideAllDropDown()}},getSelection:function(){if(this.$frame.get(0).contentWindow.getSelection){return this.$frame.get(0).contentWindow.getSelection()}else{if(this.$frame.get(0).contentWindow.document.selection){return this.$frame.get(0).contentWindow.document.selection.createRange()}}},getParentNode:function(){if(window.getSelection){return this.getSelection().getRangeAt(0).startContainer.parentNode}else{if(document.selection){return this.getSelection().parentElement()}}},getCurrentNode:function(){if(window.getSelection){return this.getSelection().getRangeAt(0).startContainer}else{if(document.selection){return this.getSelection()}}},setFocusNode:function(f,d){var c=this.doc.createRange();var e=this.getSelection();d=d?0:1;if(e!==null){c.selectNodeContents(f);e.addRange(c);e.collapse(f,d)}this.focus()},insertNodeAtCaret:function(g){if(typeof window.getSelection!="undefined"){var h=this.getSelection();if(h.rangeCount){var d=h.getRangeAt(0);d.collapse(false);d.insertNode(g);d=d.cloneRange();d.selectNodeContents(g);d.collapse(false);h.removeAllRanges();h.addRange(d)}}else{if(typeof document.selection!="undefined"&&document.selection.type!="Control"){var e=(g.nodeType==1)?g.outerHTML:g.data;var i="marker_"+(""+Math.random()).slice(2);e+='<span id="'+i+'"></span>';var f=this.getSelection();f.collapse(false);f.pasteHTML(e);var c=document.getElementById(i);f.moveToElementText(c);f.select();c.parentNode.removeChild(c)}}},getBtn:function(c){return b(this.$toolbar.find("a.redactor_btn_"+c))},setBtnActive:function(c){this.getBtn(c).addClass("act")},setBtnInactive:function(c){this.getBtn(c).removeClass("act")},changeBtnIcon:function(c,d){this.getBtn(c).addClass("redactor_btn_"+d)},removeBtnIcon:function(c,d){this.getBtn(c).removeClass("redactor_btn_"+d)},removeBtn:function(c){this.getBtn(c).remove()},addBtn:function(c,d){this.$toolbar.append(b("<li>").append(this.buildButton(c,d)))},fullscreen:function(){var c;if(this.opts.fullscreen===false){this.changeBtnIcon("fullscreen","normalscreen");this.setBtnActive("fullscreen");this.opts.fullscreen=true;this.height=this.$frame.css("height");this.width=(this.$box.width()-2)+"px";c=this.getCode();this.tmpspan=b("<span></span>");this.$box.addClass("redactor_box_fullscreen").after(this.tmpspan);b(document.body).prepend(this.$box).css("overflow","hidden");this.$editor=this.enable(c);b(this.doc).click(b.proxy(this.hideAllDropDown,this));b(this.doc).click(b.proxy(function(d){this.$editor.focus()},this));this.observeImages();this.$box.find(".redactor_resizer").hide();this.fullScreenResize();b(window).resize(b.proxy(this.fullScreenResize,this));b(document).scrollTop(0,0);this.focus()}else{this.removeBtnIcon("fullscreen","normalscreen");this.setBtnInactive("fullscreen");this.opts.fullscreen=false;b(window).unbind("resize",b.proxy(this.fullScreenResize,this));b(document.body).css("overflow","");c=this.getCode();this.$box.removeClass("redactor_box_fullscreen").css("width","auto");this.tmpspan.after(this.$box).remove();this.$editor=this.enable(c);this.observeImages();this.observeAutoResize();this.$box.find(".redactor_resizer").show();b(this.doc).click(b.proxy(this.hideAllDropDown,this));b(this.doc).click(b.proxy(function(d){this.$editor.focus()},this));this.syncCode();this.$frame.css("height",this.height);this.$el.css("height",this.height);this.focus()}},fullScreenResize:function(){if(this.opts.fullscreen===false){return}var d=42;if(this.opts.air){d=2}var c=b(window).height()-d;this.$box.width(b(window).width()-2);this.$frame.height(c);this.$el.height(c)},buildResizer:function(){if(this.opts.resize===false){return false}this.$resizer=b('<div class="redactor_resizer">&mdash;</div>');this.$box.append(this.$resizer);this.$resizer.mousedown(b.proxy(this.initResize,this))},initResize:function(c){if(c.preventDefault){c.preventDefault()}this.splitter=c.target;if(this.opts.visual){this.element_resize=this.$frame;this.element_resize.get(0).style.visibility="hidden";this.element_resize_parent=this.$el}else{this.element_resize=this.$el;this.element_resize_parent=this.$frame}this.stopResizeHdl=b.proxy(this.stopResize,this);this.startResizeHdl=b.proxy(this.startResize,this);this.resizeHdl=b.proxy(this.resize,this);b(document).mousedown(this.startResizeHdl);b(document).mouseup(this.stopResizeHdl);b(this.splitter).mouseup(this.stopResizeHdl);this.null_point=false;this.h_new=false;this.h=this.element_resize.height()},startResize:function(){b(document).mousemove(this.resizeHdl)},resize:function(d){if(d.preventDefault){d.preventDefault()}var f=d.pageY;if(this.null_point===false){this.null_point=f}if(this.h_new===false){this.h_new=this.element_resize.height()}var c=(this.h_new+f-this.null_point)-10;if(c<=30){return true}if(c>=0){this.element_resize.get(0).style.height=c+"px";this.element_resize_parent.get(0).style.height=c+"px"}},stopResize:function(c){b(document).unbind("mousemove",this.resizeHdl);b(document).unbind("mousedown",this.startResizeHdl);b(document).unbind("mouseup",this.stopResizeHdl);b(this.splitter).unbind("mouseup",this.stopResizeHdl);this.element_resize.get(0).style.visibility="visible"},resizeImage:function(d){var g=false;var c=false;var l;var k;var f=b(d).width()/b(d).height();var h=1;var i=1;var j=1;var e=1;b(d).hover(function(){b(d).css("cursor","nw-resize")},function(){b(d).css("cursor","default");g=false});b(d).mousedown(function(m){if(m.preventDefault){m.preventDefault()}g=true;c=true;l=Math.round(m.pageX-b(d).eq(0).offset().left);k=Math.round(m.pageY-b(d).eq(0).offset().top)});b(d).mouseup(b.proxy(function(m){g=false;this.syncCode()},this));b(d).click(b.proxy(function(m){if(c){this.imageEdit(m)}},this));b(d).mousemove(function(q){if(g){c=false;var n=Math.round(q.pageX-b(this).eq(0).offset().left)-l;var m=Math.round(q.pageY-b(this).eq(0).offset().top)-k;var p=b(d).height();var r=parseInt(p)+m;var o=r*f;if(i==1||(typeof(i)=="number"&&o<i&&o>j)){b(d).width(o)}if(h==1||(typeof(h)=="number"&&r<h&&r>e)){b(d).height(r)}l=Math.round(q.pageX-b(this).eq(0).offset().left);k=Math.round(q.pageY-b(this).eq(0).offset().top)}})},showTable:function(){this.modalInit(RLANG.table,this.opts.path+"/plugins/table.html",300,b.proxy(function(){b("#redactor_table_rows").focus();b("#redactor_insert_table_btn").click(b.proxy(this.insertTable,this))},this))},insertTable:function(){var m=b("#redactor_table_rows").val();var f=b("#redactor_table_columns").val();var c=b("<div></div>");var d=Math.floor(Math.random()*99999);var k=b('<table id="table'+d+'"><tbody></tbody></table>');for(var g=0;g<m;g++){var l=b("<tr></tr>");for(var j=0;j<f;j++){var e=b("<td>&nbsp;</td>");b(l).append(e)}b(k).append(l)}b(c).append(k);var h=b(c).html();if(b.browser.msie){h+="<p></p>"}else{h+="<p>&nbsp;</p>"}this.execCommand("inserthtml",h);this.modalClose();this.$table=b(this.doc).find("body").find("#table"+d);this.$table.click(b.proxy(this.tableObserver,this))},tableObserver:function(c){this.$table=b(c.target).parents("table");this.$table_tr=this.$table.find("tr");this.$table_td=this.$table.find("td");this.$table_td.removeClass("current");this.$tbody=b(c.target).parents("tbody");this.$thead=b(this.$table).find("thead");this.$current_td=b(c.target);this.$current_td.addClass("current");this.$current_tr=b(c.target).parents("tr")},deleteTable:function(){b(this.$table).remove();this.$table=false;this.syncCode()},deleteRow:function(){b(this.$current_tr).remove();this.syncCode()},deleteColumn:function(){var c=b(this.$current_td).get(0).cellIndex;b(this.$table).find("tr").each(function(){b(this).find("td").eq(c).remove()});this.syncCode()},addHead:function(){if(b(this.$table).find("thead").size()!==0){this.deleteHead()}else{var c=b(this.$table).find("tr").first().clone();c.find("td").html("&nbsp;");this.$thead=b("<thead></thead>");this.$thead.append(c);b(this.$table).prepend(this.$thead);this.syncCode()}},deleteHead:function(){b(this.$thead).remove();this.$thead=false;this.syncCode()},insertRowAbove:function(){this.insertRow("before")},insertRowBelow:function(){this.insertRow("after")},insertColumnLeft:function(){this.insertColumn("before")},insertColumnRight:function(){this.insertColumn("after")},insertRow:function(c){var d=b(this.$current_tr).clone();d.find("td").html("&nbsp;");if(c=="after"){b(this.$current_tr).after(d)}else{b(this.$current_tr).before(d)}this.syncCode()},insertColumn:function(d){var c=0;this.$current_td.addClass("current");this.$current_tr.find("td").each(function(e,f){if(b(f).hasClass("current")){c=e}});this.$table_tr.each(function(e,f){var g=b(f).find("td").eq(c);var h=g.clone();h.html("&nbsp;");if(d=="after"){b(g).after(h)}else{b(g).before(h)}});this.syncCode()},showVideo:function(){if(b.browser.msie){this.markerIE()}this.modalInit(RLANG.video,this.opts.path+"/plugins/video.html",600,b.proxy(function(){b("#redactor_insert_video_area").focus();b("#redactor_insert_video_btn").click(b.proxy(this.insertVideo,this))},this))},insertVideo:function(){var c=b("#redactor_insert_video_area").val();if(b.browser.msie){b(this.doc.getElementById("span"+this.spanid)).after(c).remove();this.syncCode()}else{this.execCommand("inserthtml",c)}this.modalClose()},imageEdit:function(g){var c=b(g.target);var f=c.parent();var d=b.proxy(function(){b("#redactor_file_alt").val(c.attr("alt"));b("#redactor_image_edit_src").attr("href",c.attr("src"));b("#redactor_form_image_align").val(c.css("float"));if(b(f).get(0).tagName=="A"){b("#redactor_file_link").val(b(f).attr("href"))}b("#redactor_image_delete_btn").click(b.proxy(function(){this.imageDelete(c)},this));b("#redactorSaveBtn").click(b.proxy(function(){this.imageSave(c)},this))},this);this.modalInit(RLANG.image,this.opts.path+"/plugins/image_edit.html",380,d)},imageDelete:function(c){b(c).remove();this.modalClose();this.syncCode()},imageSave:function(d){var c=b(d).parent();b(d).attr("alt",b("#redactor_file_alt").val());var f=b("#redactor_form_image_align").val();if(f=="left"){b(d).css({"float":"left",margin:"0 10px 10px 0"})}else{if(f=="right"){b(d).css({"float":"right",margin:"0 0 10px 10px"})}else{b(d).css({"float":"none",margin:"0"})}}var e=b.trim(b("#redactor_file_link").val());if(e!==""){if(b(c).get(0).tagName!="A"){b(d).replaceWith('<a href="'+e+'">'+this.outerHTML(d)+"</a>")}else{b(c).attr("href",e)}}this.modalClose();this.observeImages();this.syncCode()},showImage:function(){if(b.browser.msie){this.markerIE()}var c=b.proxy(function(){if(this.opts.imageGetJson!==false){b.getJSON(this.opts.imageGetJson,b.proxy(function(e){b.each(e,b.proxy(function(g,h){var f=b('<img src="'+h.thumb+'" rel="'+h.image+'" />');b("#redactor_image_box").append(f);b(f).click(b.proxy(this.imageSetThumb,this))},this))},this))}else{b("#redactor_tabs a").eq(1).remove()}if(this.opts.imageUpload!==false){if(b("#redactor_file").size()!==0){b("#redactor_file").dragupload({url:this.opts.imageUpload,success:b.proxy(this.imageUploadCallback,this)})}this.uploadInit("redactor_file",{auto:true,url:this.opts.imageUpload,success:b.proxy(this.imageUploadCallback,this)})}else{b(".redactor_tab").hide();if(this.opts.imageGetJson===false){b("#redactor_tabs").remove();b("#redactor_tab3").show()}else{var d=b("#redactor_tabs a");d.eq(0).remove();d.eq(1).addClass("redactor_tabs_act");b("#redactor_tab2").show()}}b("#redactor_upload_btn").click(b.proxy(this.imageUploadCallbackLink,this))},this);this.modalInit(RLANG.image,this.opts.path+"/plugins/image.html",570,c,true)},imageSetThumb:function(c){this._imageSet('<img alt="" src="'+b(c.target).attr("rel")+'" />')},imageUploadCallbackLink:function(){if(b("#redactor_file_link").val()!==""){var c='<img src="'+b("#redactor_file_link").val()+'" />';this._imageSet(c)}else{this.modalClose()}},imageUploadCallback:function(c){this._imageSet(c)},_imageSet:function(c){c="<p>"+c+"</p>";this.focus();if(b.browser.msie){b(this.doc.getElementById("span"+this.spanid)).after(c).remove();this.syncCode()}else{this.execCommand("inserthtml",c)}this.modalClose();this.observeImages()},showLink:function(){var c=b.proxy(function(){var g=this.getSelection();if(b.browser.msie){var f=this.getParentNode();if(f.nodeName=="A"){this.insert_link_node=b(f);var h=this.insert_link_node.text();var d=this.insert_link_node.attr("href")}else{if(this.oldIE()){var h=g.text}else{var h=g.toString()}var d="";this.spanid=Math.floor(Math.random()*99999);var e='<span id="span'+this.spanid+'">'+h+"</span>";if(h!=""){e='<span id="span'+this.spanid+'">'+h+"</span>"}this.execCommand("inserthtml",e)}}else{if(g&&g.anchorNode.parentNode.tagName=="A"){var d=g.anchorNode.parentNode.href;var h=g.anchorNode.parentNode.text;if(g.toString()===""){this.insert_link_node=g.anchorNode.parentNode}}else{var h=g.toString();var d=""}}b(".redactor_link_text").val(h);b("#redactor_link_url").val(d).focus();b("#redactor_insert_link_btn").click(b.proxy(this.insertLink,this));if(this.opts.linkFileUpload===false){b("#redactor_tabs a").eq(3).remove()}else{if(b("#redactor_file").size()!=0){b("#redactor_file").dragupload({url:this.opts.linkFileUpload,success:b.proxy(this.insertLinkFile,this)})}this.uploadInit("redactor_file",{auto:true,url:this.opts.linkFileUpload,success:b.proxy(this.insertLinkFile,this)})}},this);this.modalInit(RLANG.link,this.opts.path+"/plugins/link.html",460,c)},insertLink:function(){var d=b("#redactor_tab_selected").val();var c="",e="";if(d==1){c=b("#redactor_link_url").val();e=b("#redactor_link_url_text").val()}else{if(d==2){c="mailto:"+b("#redactor_link_mailto").val();e=b("#redactor_link_mailto_text").val()}else{if(d==3){c="#"+b("#redactor_link_anchor").val();e=b("#redactor_link_anchor_text").val()}}}this._insertLink('<a href="'+c+'">'+e+"</a> ",b.trim(e),c)},insertLinkFile:function(c){text=b("#redactor_link_file_text").val();this._insertLink('<a href="'+c+'">'+text+"</a> ",b.trim(text),c)},_insertLink:function(c,e,d){if(e!=""){if(this.insert_link_node){b(this.insert_link_node).text(e);b(this.insert_link_node).attr("href",d);this.syncCode()}else{if(b.browser.msie){b(this.doc.getElementById("span"+this.spanid)).replaceWith(c);this.syncCode()}else{this.execCommand("inserthtml",c)}}}this.modalClose()},showFile:function(){if(b.browser.msie){this.markerIE()}var c=b.proxy(function(){b("#redactor_file").dragupload({url:this.opts.fileUpload,success:b.proxy(function(d){this.fileUploadCallback(d)},this)});this.uploadInit("redactor_file",{auto:true,url:this.opts.fileUpload,success:b.proxy(function(d){this.fileUploadCallback(d)},this)})},this);this.modalInit(RLANG.file,this.opts.path+"/plugins/file.html",500,c)},fileUploadCallback:function(c){if(b.browser.webkit&&!!window.chrome){c=c+"&nbsp;"}if(b.browser.msie){b(this.doc.getElementById("span"+this.spanid)).after(c).remove();this.syncCode()}else{this.execCommand("inserthtml",c)}this.modalClose()},modalInit:function(g,d,f,e,c){if(b("#redactor_modal_overlay").size()==0){this.overlay=b('<div id="redactor_modal_overlay" style="display: none;"></div>');b("body").prepend(this.overlay)}if(this.opts.overlay){b("#redactor_modal_overlay").show();b("#redactor_modal_overlay").click(b.proxy(this.modalClose,this))}if(b("#redactor_modal").size()==0){this.modal=b('<div id="redactor_modal" style="display: none;"><div id="redactor_modal_close">&times;</div><div id="redactor_modal_header"></div><div id="redactor_modal_inner"></div></div>');b("body").append(this.modal)}b("#redactor_modal_close").click(b.proxy(this.modalClose,this));this.hdlModalClose=b.proxy(function(h){if(h.keyCode==27){this.modalClose()}},this);b(document).keyup(this.hdlModalClose);b(this.doc).keyup(this.hdlModalClose);b.ajax({dataType:"html",type:"get",url:d,success:b.proxy(function(i){b.each(RLANG,function(j,l){var k=new RegExp("%RLANG."+j+"%","gi");i=i.replace(k,l)});b("#redactor_modal_inner").html(i);b("#redactor_modal_header").html(g);if(b("#redactor_tabs").size()!=0){b("#redactor_tabs a").each(function(j,k){j++;b(k).click(function(){b("#redactor_tabs a").removeClass("redactor_tabs_act");b(this).addClass("redactor_tabs_act");b(".redactor_tab").hide();b("#redactor_tab"+j).show();b("#redactor_tab_selected").val(j);var l=b("#redactor_modal").outerHeight();b("#redactor_modal").css("margin-top","-"+(l+10)/2+"px")})})}b("#redactor_btn_modal_close").click(b.proxy(this.modalClose,this));if(typeof(e)=="function"){e()}var h=b("#redactor_modal").outerHeight();b("#redactor_modal").css({width:f+"px",height:"auto",marginTop:"-"+(h+10)/2+"px",marginLeft:"-"+(f+60)/2+"px"}).fadeIn("fast");if(c===true){b("#redactor_image_box").height(300).css("overflow","auto")}},this)})},modalClose:function(){b("#redactor_modal_close").unbind("click",this.modalClose);b("#redactor_modal").fadeOut("fast",b.proxy(function(){b("#redactor_modal_inner").html("");if(this.opts.overlay){b("#redactor_modal_overlay").hide();b("#redactor_modal_overlay").unbind("click",this.modalClose)}b(document).unbind("keyup",this.hdlModalClose);b(this.doc).unbind("keyup",this.hdlModalClose)},this))},uploadInit:function(d,c){this.uploadOptions={url:false,success:false,start:false,trigger:false,auto:false,input:false};b.extend(this.uploadOptions,c);if(b("#"+d).size()!=0&&b("#"+d).get(0).tagName=="INPUT"){this.uploadOptions.input=b("#"+d);this.element=b(b("#"+d).get(0).form)}else{this.element=b("#"+d)}this.element_action=this.element.attr("action");if(this.uploadOptions.auto){b(this.uploadOptions.input).change(b.proxy(function(){this.element.submit(function(f){return false});this.uploadSubmit()},this))}else{if(this.uploadOptions.trigger){b("#"+this.uploadOptions.trigger).click(b.proxy(this.uploadSubmit,this))}}},uploadSubmit:function(){this.uploadForm(this.element,this.uploadFrame())},uploadFrame:function(){this.id="f"+Math.floor(Math.random()*99999);var e=document.createElement("div");var c='<iframe style="display:none" src="about:blank" id="'+this.id+'" name="'+this.id+'"></iframe>';e.innerHTML=c;document.body.appendChild(e);if(this.uploadOptions.start){this.uploadOptions.start()}b("#"+this.id).load(b.proxy(this.uploadLoaded,this));return this.id},uploadForm:function(g,e){if(this.uploadOptions.input){var h="redactorUploadForm"+this.id;var c="redactorUploadFile"+this.id;this.form=b('<form action="'+this.uploadOptions.url+'" method="POST" target="'+e+'" name="'+h+'" id="'+h+'" enctype="multipart/form-data"></form>');var d=this.uploadOptions.input;var i=b(d).clone();b(d).attr("id",c);b(d).before(i);b(d).appendTo(this.form);b(this.form).css("position","absolute");b(this.form).css("top","-2000px");b(this.form).css("left","-2000px");b(this.form).appendTo("body");this.form.submit()}else{g.attr("target",e);g.attr("method","POST");g.attr("enctype","multipart/form-data");g.attr("action",this.uploadOptions.url);this.element.submit()}},uploadLoaded:function(){var c=b("#"+this.id);if(c.contentDocument){var e=c.contentDocument}else{if(c.contentWindow){var e=c.contentWindow.document}else{var e=window.frames[this.id].document}}if(e.location.href=="about:blank"){return true}if(this.uploadOptions.success){this.uploadOptions.success(e.body.innerHTML)}this.element.attr("action",this.element_action);this.element.attr("target","")},markerIE:function(){this.spanid=Math.floor(Math.random()*99999);this.execCommand("inserthtml",'<span id="span'+this.spanid+'"></span>')},oldIE:function(){if(b.browser.msie&&parseInt(b.browser.version,10)<9){return true}return false},outerHTML:function(c){return b("<p>").append(b(c).eq(0).clone()).html()},normalize:function(c){return parseInt(c.replace("px",""))}};b.fn.getDoc=function(){return b(this.data("redactor").doc)};b.fn.getFrame=function(){return this.data("redactor").$frame};b.fn.getEditor=function(){return this.data("redactor").$editor};b.fn.getCode=function(){return this.data("redactor").getCode()};b.fn.setCode=function(c){this.data("redactor").setCode(c)};b.fn.insertHtml=function(c){this.data("redactor").insertHtml(c)};b.fn.destroyEditor=function(){this.data("redactor").destroy();this.removeData("redactor")};b.fn.setFocus=function(){this.data("redactor").focus()};b.fn.execCommand=function(c,d){this.data("redactor").execCommand(c,d)}})(jQuery);(function(b){b.fn.dragupload=function(c){return this.each(function(){var d=new a(this,c);d.init()})};function a(d,c){this.opts=b.extend({url:false,success:false,preview:false,text:RLANG.drop_file_here,atext:RLANG.or_choose},c);this.$el=b(d)}a.prototype={init:function(){if(!b.browser.opera&&!b.browser.msie){this.droparea=b('<div class="redactor_droparea"></div>');this.dropareabox=b('<div class="redactor_dropareabox">'+this.opts.text+"</div>");this.dropalternative=b('<div class="redactor_dropalternative">'+this.opts.atext+"</div>");this.droparea.append(this.dropareabox);this.$el.before(this.droparea);this.$el.before(this.dropalternative);this.dropareabox.bind("dragover",b.proxy(function(){return this.ondrag()},this));this.dropareabox.bind("dragleave",b.proxy(function(){return this.ondragleave()},this));this.dropareabox.get(0).ondrop=b.proxy(function(e){e.preventDefault();this.dropareabox.removeClass("hover").addClass("drop");var d=e.dataTransfer.files[0];var c=new FormData();c.append("file",d);b.ajax({dataType:"html",url:this.opts.url,data:c,cache:false,contentType:false,processData:false,type:"POST",success:b.proxy(function(f){if(this.opts.success!==false){this.opts.success(f)}if(this.opts.preview===true){this.dropareabox.html(f)}},this)})},this)}},ondrag:function(){this.dropareabox.addClass("hover");return false},ondragleave:function(){this.dropareabox.removeClass("hover");return false}}})(jQuery);(function(b){var d=/(^|&lt;|\s)(www\..+?\..+?)(\s|&gt;|$)/g,a=/(^|&lt;|\s)(((https?|ftp):\/\/|mailto:).+?)(\s|&gt;|$)/g,c=function(){var g=this.childNodes,f=g.length;while(f--){var h=g[f];if(h.nodeType==3){var e=h.nodeValue;if(e){e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(d,'$1<a href="http://$2">$2</a>$3').replace(a,'$1<a href="$2">$2</a>$5');b(h).after(e).remove()}}else{if(h.nodeType==1&&!/^(a|button|textarea)$/i.test(h.tagName)){c.call(h)}}}};b.fn.linkify=function(){this.each(c)}})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.