<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-8810384161712431828</atom:id><lastBuildDate>Fri, 06 Sep 2024 05:27:20 +0000</lastBuildDate><category>Hipospadias</category><category>Riñones</category><category>Ureteres</category><category>Vejiga</category><category>Fimosis</category><category>Genitales</category><category>Uretra</category><category>Anatomía</category><category>Balanitis</category><category>Circuncisión</category><category>Cirugía de Hipospadias</category><category>Consentimiento Informado</category><category>Consulta</category><category>Consulta en linea</category><category>Embriología</category><category>Epispadias</category><category>Epónimos</category><category>Extrofia Vesical</category><category>Genitales Ambiguos</category><category>Genitales Femeninos</category><category>Genitales Masculinos</category><category>Glosario Urologia</category><category>Hipospadias Severos</category><category>Historia Clínica de Urología Pediatrica</category><category>Historia de la Circuncisión</category><category>Intersexo</category><category>Luis Fernando Gonzalez Llinas</category><category>Megaprepucio Congénito</category><category>Nature</category><category>Noticias Urologia</category><category>Parafimosis</category><category>Perfil</category><category>Pseudovejiga Prepucial</category><category>Subincision</category><category>UroGaceta</category><category>UroWikipedia</category><category>Urologia Pediatrica</category><category>Urologo Pediatra</category><category>Urología Pediátrica</category><category>Urolólogo Pediatra</category><category>Uropediatra</category><title>Urólogo Pediatra en Linea</title><description></description><link>http://uropediatra-online.blogspot.com/</link><managingEditor>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</managingEditor><generator>Blogger</generator><openSearch:totalResults>67</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle/><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-4340323200281552214</guid><pubDate>Mon, 27 Apr 2020 17:22:00 +0000</pubDate><atom:updated>2020-04-28T01:11:03.461-05:00</atom:updated><title>Memory</title><description>&lt;script type="text/javascript"&gt;
var cartas = new Array( 
  {nombre: '1', seleccion: false}, {nombre: '2', seleccion: false}, 
  {nombre: '3', seleccion: false}, {nombre: '4', seleccion: false}, 
  {nombre: '5', seleccion: false}, {nombre: '6', seleccion: false}, 
  {nombre: '7', seleccion: false}, {nombre: '8', seleccion: false}, 
  {nombre: '1', seleccion: false}, {nombre: '2', seleccion: false}, 
  {nombre: '3', seleccion: false}, {nombre: '4', seleccion: false}, 
  {nombre: '5', seleccion: false}, {nombre: '6', seleccion: false}, 
  {nombre: '7', seleccion: false}, {nombre: '8', seleccion: false} );
        
var intentos = 0;
var jugada1 = "";
var jugada2 = "";
var identificadorJ1 = "";
var identificadorJ2 = "";

function iniciarJuego () {  
  var dato = document.getElementById("juego");
  dato.style.opacity = 1;

  cartas.sort(function() {return Math.random() - 0.5});
  for ( var i = 0 ; i &lt; 16 ; i++ ) {
    var carta = cartas[i].nombre;
    var dato = document.getElementById( i.toString() );
    dato.dataset.valor = carta;
  }
};

function resetearJuego () {
  cartas.sort(function() {return Math.random() - 0.5});
  for ( var i = 0 ; i &lt; 16 ; i++ ) {
    var carta = cartas[i].nombre;
    var dato = document.getElementById( i.toString() );
    dato.dataset.valor = carta;
    colorCambio( i, 'darkred', '☺');
  } 
}

function girarCarta () {
  var evento = window.event;

  jugada2 = evento.target.dataset.valor;
  identificadorJ2 = evento.target.id;


  if ( jugada1 !== "" ) {

    if ( jugada1 === jugada2 &amp;&amp; identificadorJ1 !== identificadorJ2 &amp;&amp; cartas[parseInt(identificadorJ2)].seleccion != true &amp;&amp;               cartas[parseInt(identificadorJ1)].seleccion != true) {
      
      cartas[parseInt(identificadorJ1)].seleccion = true;
      cartas[parseInt(identificadorJ2)].seleccion = true;

      colorCambio(identificadorJ2, "green", jugada2);
      vaciar();
      comprobar();
    }else if(identificadorJ1 !== identificadorJ2){
      var self = this;
      setTimeout(function(){
        colorCambio(self.identificadorJ1, "darkred", "☺")
        colorCambio(self.identificadorJ2, "darkred", "☺")
        vaciar()
      },200); 

      colorCambio(identificadorJ2, "green", jugada2);
    }
  } else if(jugada2 !== "valor") {

    colorCambio(identificadorJ2, "green", jugada2);

    jugada1 = jugada2;
    identificadorJ1 = identificadorJ2;
  }
};

function vaciar ()  {
  jugada1 = ""; 
  jugada2 = ""; 

  identificadorJ1 = "";
  identificadorJ2 = "";
}

function colorCambio (posicion, color, contenido) {
  document.getElementById(posicion.toString()).style.backgroundColor = color;
  document.getElementById(posicion.toString()).innerHTML = contenido;
}   

function comprobar () {
  var aciertos = 0;
  for( var i = 0 ; i &lt; 16 ; i++ ){
    if ( cartas[i].seleccion == true ) {
      aciertos ++;
    }

  }

  if(aciertos == 16){
    alert('Llenaste el Tablero de Verde Esperanza: ERES UN GANADOR.');
  }
}

function resetearJuego () {
            cartas.sort(function() { return Math.random() - 0.5});
            for ( var i = 0; i &lt; 16 ; i++ ) {
                var carta = cartas[i].nombre;
                var dato = document.getElementById( i.toString() );
                dato.dataset.valor = carta;
                colorCambio(i, 'darkred', '☺');
            }
        };
&lt;/script&gt;

&lt;style type="text/css"&gt;
#juego {
    opacity: 0.3;
    width: 400px;
    height: 400px;
}

table {
    width: 100%;
    height: 100%;
}

td {
    width: 25%;
    height: 25%;
    background-color: black;
    border: 3px solid white;
    border-radius: 5px;
}

.letra {
    color: white;
    font-size: 50px;
    text-align: center;
    font-style: italic;
}

input {
    width: 60px;
    height: 20px;
}
&lt;/style&gt;

&lt;script type="text/javascript"&gt;
//setInterval
var cronometro;
function detenerse()
{
    clearInterval(cronometro);
}
function carga()
{
    contador_s =0;
    contador_m =0;
    s = document.getElementById("segundos");
    m = document.getElementById("minutos");

    cronometro = setInterval(
        function(){
            if(contador_s==60)
            {
                contador_s=0;
                contador_m++;
                m.innerHTML = contador_m;

                if(contador_m==60)
                {
                    contador_m=0;
                }
            }

            s.innerHTML = contador_s;
            contador_s++;

            }
            ,1000);

}
&lt;/script&gt;

&lt;style&gt;
cronometro {
  font-size:50px;
  color:#434343;
}
&lt;/style&gt;


&lt;body onload="carga()"&gt;
    &lt;p&gt;
        &lt;span id="minutos"&gt;0&lt;/span&gt;:&lt;span id="segundos"&gt;0&lt;/span&gt;
    &lt;/p&gt;
    &lt;input type="button" onclick="detenerse()" value="PARE"/&gt;

&lt;div align=left&gt;
&lt;div id="juego"&gt;
          &lt;table&gt;
        &lt;tr&gt;
          &lt;td id="0" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="1" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="2" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="3" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id="4" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="5" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="6" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="7" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id="8" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="9" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="10" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="11" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td id="12" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="13" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="14" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
          &lt;td id="15" class="letra" onclick="girarCarta()" data-valor="valor"&gt;☺&lt;/td&gt;
        &lt;/tr&gt;
            &lt;/table&gt;&lt;br /&gt;
&lt;div class="centrar"&gt;
    &lt;div align=left&gt;
    &lt;input type="button" value="Iniciar" onclick="iniciarJuego()" /&gt;    
    &lt;input type="button" value="Borrar" onclick="resetearJuego()" /&gt;
    &lt;/div&gt; 
  &lt;/div&gt;
      &lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;</description><link>http://uropediatra-online.blogspot.com/2020/04/memory.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-3549204452629633347</guid><pubDate>Fri, 25 Aug 2017 21:26:00 +0000</pubDate><atom:updated>2017-08-26T08:20:50.889-05:00</atom:updated><title>Cruci-Frutas</title><description>&lt;style type="text/css"&gt;&lt;!--

body, h1, h2, h3, h4, h5, h6
{
 font-family: "Segoe UI", "Franklin Gothic Medium", "Arial", sans-serif;
}

h1, h2, h3, h4, h5, h6
{
 color: #5d6a86;
}

body
{
 cursor: default;
 font-size: small;
}

.ecw-answerbox
{
 color: black;
 background-color: #FFFAF0;
 border-color: #808080;
 border-style: solid;
 border-width: 1px;
 display: block;
 padding: .75em;
 width: 240pt;
}

.ecw-box
{
 border-style: solid;
 border-width: 1pt;
 cursor: pointer;
 font-size: .12in;
 font-weight: bold;
 height: .18in;
 overflow: hidden;
 text-align: center;
 width: .18in;
}

.ecw-boxcheated_sel
{
 background-color: #FFF1D7;
 border-color: #C00000;
 color: #2080D0;
}

.ecw-boxcheated_unsel
{
 background-color: #ffffff;
 border-color: #606060;
 color: #2080D0;
}

.ecw-boxerror_sel
{
 background-color: #FFF1D7;
 border-color: #C00000;
 color: #BF0000;
}

.ecw-boxerror_unsel
{
 background-color: #FFF0F0;
 border-color: #606060;
 color: #BF0000;
}

.ecw-boxnormal_sel
{
 background-color: #FFF1D7;
 border-color: #C00000;
 color: #000000;
}

.ecw-boxnormal_unsel
{
 background-color: #ffffff;
 border-color: #606060;
 color: #000000;
}

.ecw-button
{
 width: 64pt;
}

.ecw-cluebox
{
 border-bottom-width: 1px;
 border-color: #c0c0c0;
 border-left-width: 0px;
 border-right-width: 0px;
 border-style: solid;
 border-top-width: 1px;
 margin-top: 1em;
 padding-bottom: .5em;
 padding-left: 0pt;
 padding-right: 0pt;
 padding-top: .5em;
}

.ecw-crosswordarea
{
 background:#8ba987 url('https://www.uropediatra-online.com/files/El%20Club/Frutas.jpg') no-repeat center center;
        background-size:100% 100%;
 background-color: #D0D8E0;
 border-color: #808080;
 border-style: solid;
 border-width: 2px;
 padding: .5em;
 font-family: "Segoe UI", "Verdana", "Arial", sans-serif;
 font-size: small;
}

.ecw-copyright
{
 margin-bottom: 1em;
 font-size: x-small;
 font-family: "Segoe UI", "Franklin Gothic Medium", "Arial", sans-serif;
}

.ecw-input
{
 font-family: "Segoe UI", "Verdana", "Arial", sans-serif;
}

.ecw-wordlabel
{
 text-transform: uppercase;
 margin: 0;
}

.ecw-wordinfo
{
 font-size: 8pt;
 color: #808080;
}

.ecw-worderror
{
 color: #c00000;
 font-weight: bold;
 display: none;
 margin-top: 1em;
}

--&gt;&lt;/style&gt;

&lt;h1&gt;Cruci-Frutas&lt;/h1&gt;
&lt;h3 style="margin-top: -1em;"&gt;&lt;/h3&gt;

&lt;div id="waitmessage" class="ecw-answerbox"&gt;
Este crucigrama interactivo requiere JavaScript y un Navegador web reciente, incluidos Windows Internet Explorer, Mozilla Firefox, Google Chrome o Apple Safari. Si ha desactivado las secuencias de comandos de páginas web, vuelva a habilitarlas y actualize la página. Si esta página web se guarda en su computadora, es posible que tenga que hacer clic en la barra de información amarilla en la parte superior o inferior de la página para permitir que el rompecabezas se cargue.
&lt;/div&gt;

&lt;table cellpadding="0" cellspacing="0" border="0"&gt;&lt;tr&gt;

&lt;td class="ecw-crosswordarea"&gt;

&lt;script type="text/javascript"&gt;&lt;!--
 CrosswordWidth = 28;
 CrosswordHeight = 28;
 Words = 31;
 WordLength = new Array(10, 9, 4, 7, 4, 5, 7, 5, 9, 8, 6, 5, 6, 9, 11, 5, 8, 5, 13, 10, 4, 6, 10, 6, 7, 10, 9, 7, 9, 5, 4);
 Word = new Array("GRAPEFRUIT", "RASPBERRY", "PEAR", "SOURSOP", "KIWI", "MANGO", "COCONUT", "GRAPE", "PINEAPPLE", "PLANTAIN", "TOMATO", "MELON", "BANANA", "CRANBERRY", "POMEGRANATE", "PEACH", "CUCUMBER", "APPLE", "PASSION FRUIT", "BLACKBERRY", "PLUM", "ORANGE", "STRAWBERRY", "PAPAYA", "APRICOT", "WATERMELON", "BLUEBERRY", "AVOCADO", "NECTARINE", "LEMON", "LIME");
 Clue = new Array("Toronja-Pomelo", 
"Frambuesa", 
"Pera", 
"Guanabana", 
"Kiwi", 
"Mango", 
"Coco", 
"Uva", 
"Piña", 
"Platano", 
"Tomate", 
"Melón", 
"Banana", 
"Arandano Rojo", 
"Granada", 
"Durazno-Melocotón", 
"Pepino", 
"Manzana", 
"Maracuyá", 
"Mora", 
"Ciruela", 
"Naranja", 
"Fresa", 
"Papaya", 
"Albaricoque", 
"Sandia-Patilla", 
"Arandano Azul", 
"Aguacate", 
"Nectarina", 
"Limon Amarillo", 
"Limon Verde");
 AnswerHash = new Array(48104, 84327, 13704, 18671, 30934, 64975, 39035, 11332, 14307, 86799, 9803, 44590, 22840, 39794, 18827, 26985, 93617, 17269, 47023, 25492, 13781, 63056, 20489, 17763, 21321, 11972, 12336, 93695, 870, 44747, 29353);
 WordX = new Array(12, 12, 24, 13, 10, 17, 9, 22, 15, 9, 5, 18, 0, 16, 2, 14, 19, 17, 13, 26, 15, 18, 23, 21, 15, 19, 0, 3, 5, 10, 7);
 WordY = new Array(2, 8, 9, 10, 11, 12, 13, 13, 17, 19, 22, 22, 23, 25, 27, 0, 1, 4, 7, 7, 8, 10, 11, 15, 16, 16, 19, 19, 19, 19, 20);
 LastHorizontalWord = 14;
 OnlyCheckOnce = false;
//--&gt;
&lt;/script&gt;

&lt;script type="text/javascript"&gt;&lt;!--

var BadChars = "`~!@^*()_={[}]\\|:;\"',&lt;&gt;/?";

var TableAcrossWord, TableDownWord;
var CurrentWord, PrevWordHorizontal, x, y, i, j;
var CrosswordFinished, Initialized;

// Check the user's browser and then initialize the puzzle.
if (document.getElementById("waitmessage") != null)
{
 document.getElementById("waitmessage").innerHTML = "Please wait while the crossword is loaded...";
 
 // Current game variables
 CurrentWord = -1;
 PrevWordHorizontal = false;
 
 // Create the cell-to-word arrays.
 TableAcrossWord = new Array(CrosswordWidth);
 for (var x = 0; x &lt; CrosswordWidth; x++) TableAcrossWord[x] = new Array(CrosswordHeight);
 TableDownWord = new Array(CrosswordWidth);
 for (var x = 0; x &lt; CrosswordWidth; x++) TableDownWord[x] = new Array(CrosswordHeight);
 for (var y = 0; y &lt; CrosswordHeight; y++)
  for (var x = 0; x &lt; CrosswordWidth; x++)
  {
   TableAcrossWord[x][y] = -1;
   TableDownWord[x][y] = -1;
  }
 
 // First, add the horizontal words to the puzzle.
 for (var i = 0; i &lt;= LastHorizontalWord; i++)
 {
  x = WordX[i];
  y = WordY[i];
  for (var j = 0; j &lt; WordLength[i]; j++)
  {
   TableAcrossWord[x + j][y] = i;
  }
 }
 
 // Second, add the vertical words to the puzzle.
 for (var i = LastHorizontalWord + 1; i &lt; Words; i++)
 {
  x = WordX[i];
  y = WordY[i];
  for (var j = 0; j &lt; WordLength[i]; j++)
  {
   TableDownWord[x][y + j] = i;
  }
 }
 
 // Now, insert the crossword table.
 document.writeln("&lt;table id=\"crossword\" cellpadding=\"0\" cellspacing=\"0\" style=\"display: none; border-collapse: collapse;\"&gt;");
 for (var y = 0; y &lt; CrosswordHeight; y++)
 {
  document.writeln("&lt;tr&gt;");
  for (var x = 0; x &lt; CrosswordWidth; x++)
  {
   if (TableAcrossWord[x][y] &gt;= 0 || TableDownWord[x][y] &gt;= 0)
    document.write("&lt;td id=\"c" + PadNumber(x) + PadNumber(y) + "\" class=\"ecw-box ecw-boxnormal_unsel\" onclick=\"SelectThisWord(event);\"&gt;&amp;nbsp;&lt;/td&gt;");
   else
    document.write("&lt;td&gt;&lt;\/td&gt;");
  }
  document.writeln("&lt;\/tr&gt;");
 }
 document.writeln("&lt;\/table&gt;");
 
 // Finally, show the crossword and hide the wait message.
 Initialized = true;
 document.getElementById("waitmessage").style.display = "none";
 document.getElementById("crossword").style.display = "block";
}

// * * * * * * * * * *
// Event handlers

// Raised when a key is pressed in the word entry box.
function WordEntryKeyPress(event)
{
 if (CrosswordFinished) return;
 // Treat an Enter keypress as an OK click.
 if (CurrentWord &gt;= 0 &amp;&amp; event.keyCode == 13) OKClick();
}

// * * * * * * * * * *
// Helper functions

// Called when we're ready to start the crossword.
function BeginCrossword()
{
 if (Initialized)
 {
  document.getElementById("welcomemessage").style.display = "";
  document.getElementById("checkbutton").style.display = "";
 }
}

// Returns true if the string passed in contains any characters prone to evil.
function ContainsBadChars(theirWord)
{
 for (var i = 0; i &lt; theirWord.length; i++)
  if (BadChars.indexOf(theirWord.charAt(i)) &gt;= 0) return true;
 return false;
}

// Pads a number out to three characters.
function PadNumber(number)
{
 if (number &lt; 10)
  return "00" + number;
 else if (number &lt; 100)
  return "0" + number;
 else
  return "" +  number;
}

// Returns the table cell at a particular pair of coordinates.
function CellAt(x, y)
{
 return document.getElementById("c" + PadNumber(x) + PadNumber(y));
}

// Deselects the current word, if there's a word selected.  DOES not change the value of CurrentWord.
function DeselectCurrentWord()
{
 if (CurrentWord &lt; 0) return;
 var x, y, i;
 
 document.getElementById("answerbox").style.display = "none";
 ChangeCurrentWordSelectedStyle(false);
 CurrentWord = -1;
 
}

// Changes the style of the cells in the current word.
function ChangeWordStyle(WordNumber, NewStyle)
{
 if (WordNumber&lt; 0) return;
 var x = WordX[WordNumber];
 var y = WordY[WordNumber];
 
 if (WordNumber&lt;= LastHorizontalWord)
  for (i = 0; i &lt; WordLength[WordNumber]; i++)
   CellAt(x + i, y).className = NewStyle;
 else
  for (i = 0; i &lt; WordLength[WordNumber]; i++)
   CellAt(x, y + i).className = NewStyle;
}

// Changes the style of the cells in the current word between the selected/unselected form.
function ChangeCurrentWordSelectedStyle(IsSelected)
{
 if (CurrentWord &lt; 0) return;
 var x = WordX[CurrentWord];
 var y = WordY[CurrentWord];
 
 if (CurrentWord &lt;= LastHorizontalWord)
  for (i = 0; i &lt; WordLength[CurrentWord]; i++)
   CellAt(x + i, y).className = CellAt(x + i, y).className.replace(IsSelected ? "_unsel" : "_sel", IsSelected ? "_sel" : "_unsel");
 else
  for (i = 0; i &lt; WordLength[CurrentWord]; i++)
   CellAt(x, y + i).className = CellAt(x, y + i).className.replace(IsSelected ? "_unsel" : "_sel", IsSelected ? "_sel" : "_unsel");
}

// Selects the new word by parsing the name of the TD element referenced by the 
// event object, and then applying styles as necessary.
function SelectThisWord(event)
{
 if (CrosswordFinished) return;
 var x, y, i, TheirWord, TableCell;
 
 // Deselect the previous word if one was selected.
 document.getElementById("welcomemessage").style.display = "none";
 if (CurrentWord &gt;= 0) OKClick();
 DeselectCurrentWord();
 
 // Determine the coordinates of the cell they clicked, and then the word that
 // they clicked.
 var target = (event.srcElement ? event.srcElement: event.target);
 x = parseInt(target.id.substring(1, 4), 10);
 y = parseInt(target.id.substring(4, 7), 10);
 
 // If they clicked an intersection, choose the type of word that was NOT selected last time.
 if (TableAcrossWord[x][y] &gt;= 0 &amp;&amp; TableDownWord[x][y] &gt;= 0)
  CurrentWord = PrevWordHorizontal ? TableDownWord[x][y] : TableAcrossWord[x][y];
 else if (TableAcrossWord[x][y] &gt;= 0)
  CurrentWord = TableAcrossWord[x][y];
 else if (TableDownWord[x][y] &gt;= 0)
  CurrentWord = TableDownWord[x][y];

 PrevWordHorizontal = (CurrentWord &lt;= LastHorizontalWord);
 
 // Now, change the style of the cells in this word.
 ChangeCurrentWordSelectedStyle(true);
 
 // Then, prepare the answer box.
 x = WordX[CurrentWord];
 y = WordY[CurrentWord];
 TheirWord = "";
 var TheirWordLength = 0;
 for (i = 0; i &lt; WordLength[CurrentWord]; i++)
 {
  // Find the appropriate table cell.
  if (CurrentWord &lt;= LastHorizontalWord)
   TableCell = CellAt(x + i, y);
  else
   TableCell = CellAt(x, y + i);
  // Add its contents to the word we're building.
  if (TableCell.innerHTML != null &amp;&amp; TableCell.innerHTML.length &gt; 0 &amp;&amp; TableCell.innerHTML != " " &amp;&amp; TableCell.innerHTML.toLowerCase() != "&amp;nbsp;")
  {
   TheirWord += TableCell.innerHTML.toUpperCase();
   TheirWordLength++;
  }
  else
  {
   TheirWord += "&amp;bull;";
  }
 }
 
 document.getElementById("wordlabel").innerHTML = TheirWord;
 document.getElementById("wordinfo").innerHTML = ((CurrentWord &lt;= LastHorizontalWord) ? "Horizontal, " : "Vertical, ") + WordLength[CurrentWord] + " letras.";
 document.getElementById("wordclue").innerHTML = Clue[CurrentWord];
 document.getElementById("worderror").style.display = "none";
 document.getElementById("cheatbutton").style.display = (Word.length == 0) ? "none" : "";
 if (TheirWordLength == WordLength[CurrentWord])
  document.getElementById("wordentry").value = TheirWord.replace(/&amp;AMP;/g, '&amp;');
 else
  document.getElementById("wordentry").value = "";
 
 // Finally, show the answer box.
 document.getElementById("answerbox").style.display = "block";
 try
 {
  document.getElementById("wordentry").focus();
  document.getElementById("wordentry").select();
 }
 catch (e)
 {
 }
 
}

// Called when the user clicks the OK link.
function OKClick()
{
 var TheirWord, x, y, i, TableCell;
 if (CrosswordFinished) return;
 if (document.getElementById("okbutton").disabled) return;
 
 // First, validate the entry.
 TheirWord = document.getElementById("wordentry").value.toUpperCase();
 if (TheirWord.length == 0)
 {
  DeselectCurrentWord();
  return;
 }
 if (ContainsBadChars(TheirWord))
 {
  document.getElementById("worderror").innerHTML = "La palabra que escribiste tiene caracteres invalidos.  Escriba solo letras en la casilla de arriba.";
  document.getElementById("worderror").style.display = "block";
  return;
 }
 if (TheirWord.length &lt; WordLength[CurrentWord])
 {
  document.getElementById("worderror").innerHTML  = "Faltan letras.  Esta palabra tiene " + WordLength[CurrentWord] + " letras.";
  document.getElementById("worderror").style.display = "block";
  return;
 }
 if (TheirWord.length &gt; WordLength[CurrentWord])
 {
  document.getElementById("worderror").innerHTML = "Sobran letras.  Esta palabra tiene " + WordLength[CurrentWord] + " letras.";
  document.getElementById("worderror").style.display = "block";
  return;
 }
 
 // If we made it this far, they typed an acceptable word, so add these letters to the puzzle and hide the entry box.
 x = WordX[CurrentWord];
 y = WordY[CurrentWord];
 for (i = 0; i &lt; TheirWord.length; i++)
 {
  TableCell = CellAt(x + (CurrentWord &lt;= LastHorizontalWord ? i : 0), y + (CurrentWord &gt; LastHorizontalWord ? i : 0));
  TableCell.innerHTML = TheirWord.substring(i, i + 1);
 }
 DeselectCurrentWord();
}

// Called when the "check puzzle" link is clicked.
function CheckClick()
{
 var i, j, x, y, UserEntry, ErrorsFound = 0, EmptyFound = 0, TableCell;
 if (CrosswordFinished) return;
 DeselectCurrentWord();
 
 for (y = 0; y &lt; CrosswordHeight; y++)
 for (x = 0; x &lt; CrosswordWidth; x++)
  if (TableAcrossWord[x][y] &gt;= 0 || TableDownWord[x][y] &gt;= 0)
  {
   TableCell = CellAt(x, y);
   if (TableCell.className == "ecw-box ecw-boxerror_unsel") TableCell.className = "ecw-box ecw-boxnormal_unsel";
  }
  
 for (i = 0; i &lt; Words; i++)
 {
  // Get the user's entry for this word.
  UserEntry = "";
  for (j = 0; j &lt; WordLength[i]; j++)
  {
   if (i &lt;= LastHorizontalWord)
    TableCell = CellAt(WordX[i] + j, WordY[i]);
   else
    TableCell = CellAt(WordX[i], WordY[i] + j);
   if (TableCell.innerHTML.length &gt; 0 &amp;&amp; TableCell.innerHTML.toLowerCase() != "&amp;nbsp;")
   {
    UserEntry += TableCell.innerHTML.toUpperCase();
   }
   else
   {
    UserEntry = "";
    EmptyFound++;
    break;
   }
  }
  UserEntry = UserEntry.replace(/&amp;AMP;/g, '&amp;');
  // If this word doesn't match, it's an error.
  if (HashWord(UserEntry) != AnswerHash[i] &amp;&amp; UserEntry.length &gt; 0)
  {
   ErrorsFound++;
   ChangeWordStyle(i, "ecw-box ecw-boxerror_unsel");
  }
 }
 
 // If they can only check once, disable things prematurely.
 if ( OnlyCheckOnce )
 {
  CrosswordFinished = true;
  document.getElementById("checkbutton").style.display = "none";
 }
 
 // If errors were found, just exit now.
 if (ErrorsFound &gt; 0 &amp;&amp; EmptyFound &gt; 0)
  document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound &gt; 1 ? " errores" : " error") + " y " + EmptyFound + (EmptyFound &gt; 1 ? " incompletas palabras fueron" : " incompleta palabra fue") + " encontrada(s).";
 else if (ErrorsFound &gt; 0)
  document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound &gt; 1 ? " errores fueron" : " error fue") + " encontrado(s).";
 else if (EmptyFound &gt; 0)
  document.getElementById("welcomemessage").innerHTML = "No se encontraron errores, Pero " + EmptyFound + (EmptyFound &gt; 1 ? " incompletas palabras fueron" : " incompleta palabra fue") + " encontrada(s).";
 
 if (ErrorsFound + EmptyFound &gt; 0)
 {
  document.getElementById("welcomemessage").style.display = "";
  return;
 }
   
 // They finished the puzzle!
 CrosswordFinished = true;
 document.getElementById("checkbutton").style.display = "none";
 document.getElementById("congratulations").style.display = "block";
 document.getElementById("welcomemessage").style.display = "none";
}

// Called when the "cheat" link is clicked.
function CheatClick()
{
 if (CrosswordFinished) return;
 var OldWord = CurrentWord;
 document.getElementById("wordentry").value = Word[CurrentWord];
 OKClick();
 ChangeWordStyle(OldWord, "ecw-box ecw-boxcheated_unsel");
}

// Returns a one-way hash for a word.
function HashWord(Word)
{
 var x = (Word.charCodeAt(0) * 719) % 1138;
 var Hash = 837;
 var i;
 for (i = 1; i &lt;= Word.length; i++)
  Hash = (Hash * i + 5 + (Word.charCodeAt(i - 1) - 64) * x) % 98503;
 return Hash;
}

//--&gt;
&lt;/script&gt;

&lt;/td&gt;

&lt;td valign="top" style="padding-left: 1em;"&gt;
&lt;center&gt;&lt;a href="javascript:if (confirm('Si terminó el juego y completó el crucigrama pulse aceptar y será llevado al Hospital del Club de los Urositos')) {parent.location='https://www.uropediatra-online.com/el-hospital-del-club.html';};"&gt;&lt;img src="https://www.uropediatra-online.com/files/El%20Club/Foto%20Perfil-Crucigrama.jpg" width="90" height="67" title="SOLO HAGA CLIC AQUÍ, SI YA COMPLETÓ EL EJERCICIO"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;p&gt;&lt;/p&gt;
&lt;br&gt;
&lt;div id="welcomemessage" class="ecw-answerbox" style="display:none;"&gt;
&lt;h3&gt;BIENVENIDO!&lt;/h3&gt;
&lt;p&gt;Elija y pulse cualquier casilla en blanco para jugar.&lt;/p&gt;
&lt;/div&gt;

&lt;div id="answerbox" class="ecw-answerbox" style="display:none;"&gt;
&lt;h3 id="wordlabel" class="ecw-wordlabel"&gt; &amp;nbsp;&lt;/h3&gt;
&lt;div id="wordinfo" class="ecw-wordinfo"&gt; &lt;/div&gt;
&lt;div id="wordclue" class="ecw-cluebox"&gt; &lt;/div&gt;
&lt;div style="margin-top: 1em;"&gt;
 &lt;input class="ecw-input" id="wordentry" type="text" size="24" style="font-weight: bold; text-transform:uppercase;" onkeypress="WordEntryKeyPress(event)" onchange="WordEntryKeyPress(event)" /&gt;
&lt;/div&gt;
&lt;div id="worderror" class="ecw-worderror"&gt;&lt;/div&gt;

&lt;table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top:1em;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;button id="cheatbutton" type="button" class="ecw-input ecw-button" onclick="CheatClick();"&gt;Ayuda&lt;/button&gt;
&lt;/td&gt;&lt;td align="right"&gt;
&lt;button id="okbutton" type="button" class="ecw-input ecw-button" onclick="OKClick();" style="font-weight: bold;"&gt;Anotar&lt;/button&gt; &amp;nbsp;
&lt;button id="cancelbutton" type="button" class="ecw-input ecw-button" onclick="DeselectCurrentWord();"&gt;Cancelar&lt;/button&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;

&lt;/div&gt;

&lt;div id="congratulations" class="ecw-answerbox" style="display:none;"&gt;
&lt;h3&gt;FELICITACIONES!&lt;/h3&gt;
&lt;p&gt;Has completado &lt;a href="https://www.uropediatra-online.com/la-escuela-en-el-aire.html" style="color: black; text-decoration:none;"&gt;el crucigrama&lt;/a&gt;.
&lt;/p&gt;
&lt;/div&gt;
&lt;div style="margin-top: 1em;"&gt;
 &lt;center&gt;&lt;button id="checkbutton" type="button" onclick="CheckClick();" style="display: none;"&gt;Verificar como voy&lt;/button&gt;
 &lt;a href="javascript:location.reload()"&gt;COMENZAR DE NUEVO&lt;/a&gt;&lt;/center&gt;
&lt;/div&gt;

&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;script type="text/javascript"&gt;&lt;!--
BeginCrossword();
//--&gt;
&lt;/script&gt;</description><link>http://uropediatra-online.blogspot.com/2017/08/cruci-frutas.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-2525474542331581553</guid><pubDate>Fri, 25 Aug 2017 06:31:00 +0000</pubDate><atom:updated>2017-08-25T01:37:48.580-05:00</atom:updated><title>Ahorcadito-Frutas</title><description>&lt;SCRIPT language=JavaScript&gt;
var hombre = new Array("___\n", "   |\n", "   O\n", "  /", "|", "\\\n", "  /", " \\\n", "___")
var palabra
var libreriaPalabras = new Array("a p p l e", "p e a r", "b a n a n a", "p l a n t a i n", "g r a p e",
"o r a n g e", "l e m o n", "l i m e", "g r a p e f r u i t", "s t r a w b e r r y",
"r a s p b e r r y", "b l a c k b e r r y", "b l u e b e r r y", "c r a n b e r r y", "k i w i",
"p i n e a p p l e", "w a t e r m e l o n", "m e l o n", "s o u r s o p", "c u c u m b e r",
"p a p a y a", "m a n g o", "c o c o n u t", "p e a c h", "p l u m", "a v o c a d o" )
var partes = 0
var colNueva = 0
var jugando


function ObtienePalabra() {
   //obtiene la palabra para jugar de forma pseudoaleatoria
   var indice = Math.round ( Math.random() * 25 )
   var cadena = new String( libreriaPalabras[indice] )
   palabra = cadena.split(" ")
}


function DibujaHombre(visor, partes) {
   //dibuja el hombre ahorcado
   //partes indica el numero de partes a dibujar
   var dibujo = ""
   if (partes &lt; 10)
      for(var x = 0; x &lt; partes; x++) {
         dibujo += hombre[x]
      }
   visor.displayHombre.value = dibujo
}


function DibujaLetra(visor, letra) {
   //dibuja una letra de la palabra
   //posicion indica donde debe dibujar la letra
   var flag = false 
   //indica si se encontro la letra 
   //obtiene cadena actual
   var cadena = new String(visor.displayPalabra.value)
   //la separa en sus espacios
   var letrasCadena = cadena.split(" ")
   cadena = "" 
   for (var x = 0; x &lt; palabra.length; x++) {
      if (palabra[x] == letra) {
         cadena += letra + " "
         flag = true
      } else
         cadena += letrasCadena[x] + " "
   }
   visor.displayPalabra.value = cadena
   return flag
}


function NuevaLetra(visor, letra) {
   //añade letra lista de letras
   visor.displayLetras.value += letra + " "
   //comprueba si ha de pasar a la siguiente fila
   if(colNueva == 3) {
      visor.displayLetras.value += "\n"
      colNueva = 0
   } else
      colNueva++
}


function Juega(visor, letra) {
   //comprueba si esta jugando
   if (jugando) {
      //ciclo de jugada
      //1. añade letra a la lista
      NuevaLetra(visor, letra)
      //2. dibuja la letra y comprueba si acierto
      var acierto = DibujaLetra(visor, letra)
      //3. si no acierto, dibuja hombre
      if (!acierto)
         DibujaHombre(visor, ++partes)
      //4. comprueba si fin
      if (partes == 9)
         FinJuego(false)
      else if (CompruebaPalabra(visor))
         FinJuego(true)
      } else {
         alert('Pulsa Juego nuevo para comenzar\nuna partida nueva.')
   }
}

function IniciaJuego(visor) {
   //inicializa visor y variables globales
   jugando = true
   partes = 0
   colNueva = 0
   ObtienePalabra()
   DibujaHombre(visor, partes)
   visor.displayPalabra.value = ""
   for (var x = 0; x &lt; palabra.length; x++)
      visor.displayPalabra.value += "_ "
   visor.displayLetras.value = ""
}

function CompruebaPalabra(visor) {
   //comprueba si se completo toda la palabra
   var fin = true
   //obtiene cadena actual
   var cadena = new String(visor.displayPalabra.value)
   //la separa en sus espacios
   var letrasCadena = cadena.split(" ")
   for(var x = 0; x &lt; letrasCadena.length; x++)
      if (letrasCadena[x] == "_")
         fin = false
   return fin
}


function FinJuego(resultado) {
   //indica que si se ha perdido o ganado
   var solucion = ""
   jugando = false 
   if (resultado) {
      document.visor.ganadas.value++
      alert("Acertaste !")
   } else {
     document.visor.perdidas.value++
     //construye la palabra solucion
     for (var x = 0; x &lt; palabra.length; x++)
        solucion += palabra[x]
     alert("Estas Ahorcado, debes estudiar mas !\n La palabra era: " + solucion)
   }
}
&lt;/SCRIPT&gt;


&lt;FORM name=visor&gt;
&lt;LEFT&gt;
&lt;TABLE width=547&gt;
  &lt;TBODY&gt;
  &lt;TR&gt;
    &lt;TD align=middle width=150 colSpan=3&gt;&lt;TEXTAREA name=displayHombre rows=6 cols=15&gt;&lt;/TEXTAREA&gt; 
    &lt;TD align=middle width=150 colSpan=3&gt;&lt;TEXTAREA name=displayLetras rows=6 cols=15&gt;&lt;/TEXTAREA&gt; 
    &lt;TD width=200&gt;
  &lt;TR&gt;
    &lt;TD align=middle width=300 colSpan=6&gt;&lt;INPUT size=42 name=displayPalabra&gt; 
    &lt;TD align=middle&gt;&amp;nbsp; 
  &lt;TR&gt;
    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'a')" type=button value=" A " name=botA&gt; 

    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'b')" type=button value=" B " name=botB&gt; 

    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'c')" type=button value=" C " name=botC&gt; 

    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'd')" type=button value=" D " name=botD&gt; 

    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'e')" type=button value=" E " name=botE&gt; 

    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'f')" type=button value=" F " name=botF&gt; 

    &lt;TD&gt;
  &lt;TR&gt;
    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'g')" type=button value=" G " name=botG&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'h')" type=button value=" H " name=botH&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'i')" type=button value=" I " name=botI&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'j')" type=button value=" J " name=botJ&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'k')" type=button value=" K " name=botK&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'l')" type=button value=" L " name=botL&gt; 

    &lt;TD vAlign=center align=right&gt;Ganadas: &lt;INPUT size=4 value=0 name=ganadas&gt; 

  &lt;TR&gt;
    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'm')" type=button value=" M " name=botM&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'n')" type=button value=" N " name=botN&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'ñ')" type=button value=" Ñ " name=botÑ&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'o')" type=button value=" O " name=botO&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'p')" type=button value=" P " name=botP&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'q')" type=button value=" Q " name=botQ&gt; 

    &lt;TD vAlign=center align=right&gt;Perdidas: &lt;INPUT size=4 value=0 
      name=perdidas&gt; 
  &lt;TR&gt;
    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'r')" type=button value=" R " name=botR&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 's')" type=button value=" S " name=botS&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 't')" type=button value=" T " name=botT&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'u')" type=button value=" U " name=botU&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'v')" type=button value=" V " name=botV&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'w')" type=button value=" W " name=botW&gt; 

    &lt;TD&gt;
  &lt;TR&gt;
    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'x')" type=button value=" X " name=botX&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'y')" type=button value=" Y " name=botY&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'z')" type=button value=" Z " name=botZ&gt; 

    &lt;TD align=middle colSpan=3&gt;&lt;INPUT onclick=IniciaJuego(this.form) type=button value="  Juego nuevo   " name=Inicia&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="this.form.ganadas.value='0'; this.form.perdidas.value='0'" type=button value=Limpiar name=B1&gt; 
  &lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/LEFT&gt;&lt;/FORM&gt;
</description><link>http://uropediatra-online.blogspot.com/2017/08/ahorcadito-frutas.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-2604808648106916842</guid><pubDate>Wed, 23 Aug 2017 10:20:00 +0000</pubDate><atom:updated>2017-08-23T09:39:47.111-05:00</atom:updated><title>Frutas</title><description>&lt;script language="javascript"&gt;
		function doSearch()
		{
			var tableReg = document.getElementById('tablepress-13');
			var searchText = document.getElementById('searchTerm').value.toLowerCase();
			var cellsOfRow="";
			var found=false;
			var compareWith="";
 
			// Recorremos todas las filas con contenido de la tabla
			for (var i = 1; i &lt; tableReg.rows.length; i++)
			{
				cellsOfRow = tableReg.rows[i].getElementsByTagName('td');
				found = false;
				// Recorremos todas las celdas
				for (var j = 0; j &lt; cellsOfRow.length &amp;&amp; !found; j++)
				{
					compareWith = cellsOfRow[j].innerHTML.toLowerCase();
					// Buscamos el texto en el contenido de la celda
					if (searchText.length == 0 || (compareWith.indexOf(searchText) &gt; -1))
					{
						found = true;
					}
				}
				if(found)
				{
					tableReg.rows[i].style.display = '';
				} else {
					// si no ha encontrado ninguna coincidencia, esconde la
					// fila de la tabla
					tableReg.rows[i].style.display = 'none';
				}
			}
		}
	&lt;/script&gt;

&lt;style&gt;
    table{
        background:#8ba987 url('https://www.uropediatra-online.com/files/El%20Club/Frutas.jpg') no-repeat center center;
        background-size:100% 100%;
    }
    &lt;/style&gt;

&lt;style&gt;
#tablepress-13	{border:1px solid #ccc;padding:10px;}
#tablepress-13 tr:nth-child(even) {background:#ccc;}
#tablepress-13 td {padding:5px;}
&lt;/style&gt;

&lt;style type="text/css"&gt;
div.scroll_vertical {
	height: 270px;
	width: 315px;
	overflow: auto;
	border: 1px solid #666;
	background-color: #ccc;
	padding: 8px;
}
&lt;/style&gt;

&lt;div style="position:absolute; top:10px; left:10px;"&gt;
&lt;div align=left&gt;&lt;form&gt;Buscar &lt;input id="searchTerm" type="text" onkeyup="doSearch()" /&lt;/form&gt;&lt;/div&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr class="row-1 odd"&gt;
	&lt;th class="column-1"&gt;...EN ESPAÑOL.(*)&lt;/th&gt;&lt;th class="column-2"&gt;...EN INGLÉS.&lt;/th&gt;&lt;th class="column-3"&gt;PRONUNCIAR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;/table&gt;
&lt;div class="scroll_vertical"&gt;
&lt;div style="text-align: justify;" align="center"&gt;
&lt;table id="tablepress-13" class="scroll_vertical"&gt;
&lt;tbody class="row-hover"&gt;
&lt;tr class="row-2 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Manzana&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Apple&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;&lt;a href="javascript:void( window.open( 'http://www.uropediatra-online.com/files/Frutas/manzana.mp3', 'blank', 'scrollbars=yes, toolbar=no, width=250, height=50' ) ) "&gt;&lt;img src="https://www.uropediatra-online.com/files/El%20Club/speaker.png" title="ESCUCHAR PRONUNCIACIÓN"&gt;&lt;/a&gt;&lt;a href="https://www.uropediatra-online.com/files/El%20Club/Manzana.gif" rel="ibox"&gt;&lt;img src="https://www.uropediatra-online.com/files/El%20Club/Fotos.png" title="VER FRUTA"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-3 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Pera&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Pear&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;&lt;a href="javascript:void( window.open( 'http://www.uropediatra-online.com/files/Frutas/pera.mp3', 'blank', 'scrollbars=yes, toolbar=no, width=250, height=50' ) ) "&gt;&lt;img src="https://www.uropediatra-online.com/files/El%20Club/speaker.png" title="ESCUCHAR PRONUNCIACIÓN"&gt;&lt;/a&gt;&lt;a href="https://www.uropediatra-online.com/files/El%20Club/Pera.gif" rel="ibox"&gt;&lt;img src="https://www.uropediatra-online.com/files/El%20Club/Fotos.png" title="VER FRUTA"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-4 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Plátano/Banano&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Banana&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;&lt;AQUI&gt;&lt;AQUI&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-5 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Plátano Verde&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Plantain&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-6 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Uva&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Grape&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-7 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Naranja&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Orange&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-8 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Limón-Lima-Amarillo&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Lemon&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-9 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Limón-Lima-Verde&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Lime&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-10 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Toronja-Pomelo&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Grapefruit&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-11 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Fresa&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Strawberry&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-12 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Frambuesa&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Raspberry&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-13 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Mora&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Blackberry&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-14 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Arándano-Azul&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Blueberry&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-15 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Arándano-Rojo&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Cranberry&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-16 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Kiwi&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Kiwi&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-17 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Piña&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Pineapple&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-18 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Sandía-Patilla&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Watermelon&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;Aqui&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-19 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Melón&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Melon&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-20 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Guanábana&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Soursop&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-21 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Pepino&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Cucumber&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-22 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Papaya&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Papaya&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-23 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Mango&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Mango&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-24 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Coco&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Coconut&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-25 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Maracuyá&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Passion Fruit&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-26 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Granada&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Pomegranate&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-27 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Durazno-Melocotón&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Peach&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-28 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Nectarina&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Nectarine&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-29 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Ciruela&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Plum&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-30 even"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Albaricoque&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Apricot&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-31 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Aguacate&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Avocado&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-32 odd"&gt;
	&lt;td class="column-1"&gt;&lt;b&gt;Tomate&lt;/b&gt;&lt;/td&gt;&lt;td class="column-2"&gt;&lt;b&gt;Tomato&lt;/b&gt;&lt;/td&gt;&lt;td class="column-3"&gt;AQUI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;!-- #tablepress-13 from cache --&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/08/frutas.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-1425719995749348322</guid><pubDate>Mon, 21 Aug 2017 07:27:00 +0000</pubDate><atom:updated>2017-08-26T06:45:15.032-05:00</atom:updated><title>Dias-Meses-Estaciones</title><description>&lt;style type="text/css"&gt;&lt;!--

body, h1, h2, h3, h4, h5, h6
{
 font-family: "Segoe UI", "Franklin Gothic Medium", "Arial", sans-serif;
}

h1, h2, h3, h4, h5, h6
{
 color: #5d6a86;
}

body
{
 cursor: default;
 font-size: small;
}

.ecw-answerbox
{
 color: black;
 background-color: #FFFAF0;
 border-color: #808080;
 border-style: solid;
 border-width: 1px;
 display: block;
 padding: .75em;
 width: 240pt;
}

.ecw-box
{
 border-style: solid;
 border-width: 1pt;
 cursor: pointer;
 font-size: .12in;
 font-weight: bold;
 height: .18in;
 overflow: hidden;
 text-align: center;
 width: .18in;
}

.ecw-boxcheated_sel
{
 background-color: #FFF1D7;
 border-color: #C00000;
 color: #2080D0;
}

.ecw-boxcheated_unsel
{
 background-color: #ffffff;
 border-color: #606060;
 color: #2080D0;
}

.ecw-boxerror_sel
{
 background-color: #FFF1D7;
 border-color: #C00000;
 color: #BF0000;
}

.ecw-boxerror_unsel
{
 background-color: #FFF0F0;
 border-color: #606060;
 color: #BF0000;
}

.ecw-boxnormal_sel
{
 background-color: #FFF1D7;
 border-color: #C00000;
 color: #000000;
}

.ecw-boxnormal_unsel
{
 background-color: #ffffff;
 border-color: #606060;
 color: #000000;
}

.ecw-button
{
 width: 64pt;
}

.ecw-cluebox
{
 border-bottom-width: 1px;
 border-color: #c0c0c0;
 border-left-width: 0px;
 border-right-width: 0px;
 border-style: solid;
 border-top-width: 1px;
 margin-top: 1em;
 padding-bottom: .5em;
 padding-left: 0pt;
 padding-right: 0pt;
 padding-top: .5em;
}

.ecw-crosswordarea
{
 background-color: #D0D8E0;
 border-color: #808080;
 border-style: solid;
 border-width: 2px;
 padding: .5em;
 font-family: "Segoe UI", "Verdana", "Arial", sans-serif;
 font-size: small;
}

.ecw-copyright
{
 margin-bottom: 1em;
 font-size: x-small;
 font-family: "Segoe UI", "Franklin Gothic Medium", "Arial", sans-serif;
}

.ecw-input
{
 font-family: "Segoe UI", "Verdana", "Arial", sans-serif;
}

.ecw-wordlabel
{
 text-transform: uppercase;
 margin: 0;
}

.ecw-wordinfo
{
 font-size: 8pt;
 color: #808080;
}

.ecw-worderror
{
 color: #c00000;
 font-weight: bold;
 display: none;
 margin-top: 1em;
}

--&gt;&lt;/style&gt;

&lt;h1&gt;The Days of the Weeks, Mounths and Seasons of the Years.&lt;/h1&gt;
&lt;br&gt;
&lt;h3 style="margin-top: -1em;"&gt;&lt;/h3&gt;

&lt;div id="waitmessage" class="ecw-answerbox"&gt;
 This interactive crossword puzzle requires JavaScript and any 
 recent web browser, including Windows Internet Explorer, Mozilla Firefox, Google Chrome, or 
 Apple Safari.  If you have disabled web page scripting, please re-enable it and refresh
 the page.  If this web page is saved on your computer, you may need to click the yellow Information Bar at the top or bottom of
 the page to allow the puzzle to load.
&lt;/div&gt;

&lt;table cellpadding="0" cellspacing="0" border="0"&gt;&lt;tr&gt;

&lt;td class="ecw-crosswordarea"&gt;

&lt;script type="text/javascript"&gt;&lt;!--
 CrosswordWidth = 19;
 CrosswordHeight = 19;
 Words = 23;
 WordLength = new Array(6, 6, 8, 7, 6, 5, 6, 4, 6, 7, 8, 9, 5, 4, 8, 6, 3, 8, 7, 9, 8, 6, 6);
 Word = new Array("AUTUMN", "SUMMER", "FEBRUARY", "OCTOBER", "AUGUST", "APRIL", "SUNDAY", "JUNE", "MONDAY", "JANUARY", "DECEMBER", "WEDNESDAY", "MARCH", "JULY", "NOVEMBER", "SPRING", "MAY", "THURSDAY", "TUESDAY", "SEPTEMBER", "SATURDAY", "FRIDAY", "WINTER");
 Clue = new Array("Otoño", 
"Verano", 
"Febrero", 
"Octubre", 
"Agosto", 
"Abril", 
"Domingo", 
"Junio", 
"Lunes", 
"Enero", 
"Diciembre", 
"Miercoles", 
"Marzo", 
"Julio", 
"Noviembre", 
"Primavera", 
"Mayo", 
"Jueves", 
"Martes", 
"Septiembre", 
"Sabado", 
"Viernes", 
"Invierno");
 AnswerHash = new Array(9234, 36691, 25312, 30017, 89354, 19733, 51527, 2252, 64184, 73656, 43443, 47889, 5639, 12548, 59753, 86435, 83406, 84690, 21266, 83988, 13250, 68212, 50494);
 WordX = new Array(11, 6, 0, 12, 1, 8, 7, 2, 5, 0, 1, 1, 11, 7, 16, 3, 9, 18, 14, 5, 8, 10, 2);
 WordY = new Array(1, 2, 4, 6, 7, 8, 10, 11, 12, 15, 17, 0, 0, 1, 1, 2, 2, 3, 6, 7, 7, 7, 13);
 LastHorizontalWord = 10;
 OnlyCheckOnce = false;
//--&gt;
&lt;/script&gt;

&lt;script type="text/javascript"&gt;&lt;!--

var BadChars = "`~!@^*()_={[}]\\|:;\"',&lt;&gt;/?";

var TableAcrossWord, TableDownWord;
var CurrentWord, PrevWordHorizontal, x, y, i, j;
var CrosswordFinished, Initialized;

// Check the user's browser and then initialize the puzzle.
if (document.getElementById("waitmessage") != null)
{
 document.getElementById("waitmessage").innerHTML = "Please wait while the crossword is loaded...";
 
 // Current game variables
 CurrentWord = -1;
 PrevWordHorizontal = false;
 
 // Create the cell-to-word arrays.
 TableAcrossWord = new Array(CrosswordWidth);
 for (var x = 0; x &lt; CrosswordWidth; x++) TableAcrossWord[x] = new Array(CrosswordHeight);
 TableDownWord = new Array(CrosswordWidth);
 for (var x = 0; x &lt; CrosswordWidth; x++) TableDownWord[x] = new Array(CrosswordHeight);
 for (var y = 0; y &lt; CrosswordHeight; y++)
  for (var x = 0; x &lt; CrosswordWidth; x++)
  {
   TableAcrossWord[x][y] = -1;
   TableDownWord[x][y] = -1;
  }
 
 // First, add the horizontal words to the puzzle.
 for (var i = 0; i &lt;= LastHorizontalWord; i++)
 {
  x = WordX[i];
  y = WordY[i];
  for (var j = 0; j &lt; WordLength[i]; j++)
  {
   TableAcrossWord[x + j][y] = i;
  }
 }
 
 // Second, add the vertical words to the puzzle.
 for (var i = LastHorizontalWord + 1; i &lt; Words; i++)
 {
  x = WordX[i];
  y = WordY[i];
  for (var j = 0; j &lt; WordLength[i]; j++)
  {
   TableDownWord[x][y + j] = i;
  }
 }
 
 // Now, insert the crossword table.
 document.writeln("&lt;table id=\"crossword\" cellpadding=\"0\" cellspacing=\"0\" style=\"display: none; border-collapse: collapse;\"&gt;");
 for (var y = 0; y &lt; CrosswordHeight; y++)
 {
  document.writeln("&lt;tr&gt;");
  for (var x = 0; x &lt; CrosswordWidth; x++)
  {
   if (TableAcrossWord[x][y] &gt;= 0 || TableDownWord[x][y] &gt;= 0)
    document.write("&lt;td id=\"c" + PadNumber(x) + PadNumber(y) + "\" class=\"ecw-box ecw-boxnormal_unsel\" onclick=\"SelectThisWord(event);\"&gt;&amp;nbsp;&lt;/td&gt;");
   else
    document.write("&lt;td&gt;&lt;\/td&gt;");
  }
  document.writeln("&lt;\/tr&gt;");
 }
 document.writeln("&lt;\/table&gt;");
 
 // Finally, show the crossword and hide the wait message.
 Initialized = true;
 document.getElementById("waitmessage").style.display = "none";
 document.getElementById("crossword").style.display = "block";
}

// * * * * * * * * * *
// Event handlers

// Raised when a key is pressed in the word entry box.
function WordEntryKeyPress(event)
{
 if (CrosswordFinished) return;
 // Treat an Enter keypress as an OK click.
 if (CurrentWord &gt;= 0 &amp;&amp; event.keyCode == 13) OKClick();
}

// * * * * * * * * * *
// Helper functions

// Called when we're ready to start the crossword.
function BeginCrossword()
{
 if (Initialized)
 {
  document.getElementById("welcomemessage").style.display = "";
  document.getElementById("checkbutton").style.display = "";
 }
}

// Returns true if the string passed in contains any characters prone to evil.
function ContainsBadChars(theirWord)
{
 for (var i = 0; i &lt; theirWord.length; i++)
  if (BadChars.indexOf(theirWord.charAt(i)) &gt;= 0) return true;
 return false;
}

// Pads a number out to three characters.
function PadNumber(number)
{
 if (number &lt; 10)
  return "00" + number;
 else if (number &lt; 100)
  return "0" + number;
 else
  return "" +  number;
}

// Returns the table cell at a particular pair of coordinates.
function CellAt(x, y)
{
 return document.getElementById("c" + PadNumber(x) + PadNumber(y));
}

// Deselects the current word, if there's a word selected.  DOES not change the value of CurrentWord.
function DeselectCurrentWord()
{
 if (CurrentWord &lt; 0) return;
 var x, y, i;
 
 document.getElementById("answerbox").style.display = "none";
 ChangeCurrentWordSelectedStyle(false);
 CurrentWord = -1;
 
}

// Changes the style of the cells in the current word.
function ChangeWordStyle(WordNumber, NewStyle)
{
 if (WordNumber&lt; 0) return;
 var x = WordX[WordNumber];
 var y = WordY[WordNumber];
 
 if (WordNumber&lt;= LastHorizontalWord)
  for (i = 0; i &lt; WordLength[WordNumber]; i++)
   CellAt(x + i, y).className = NewStyle;
 else
  for (i = 0; i &lt; WordLength[WordNumber]; i++)
   CellAt(x, y + i).className = NewStyle;
}

// Changes the style of the cells in the current word between the selected/unselected form.
function ChangeCurrentWordSelectedStyle(IsSelected)
{
 if (CurrentWord &lt; 0) return;
 var x = WordX[CurrentWord];
 var y = WordY[CurrentWord];
 
 if (CurrentWord &lt;= LastHorizontalWord)
  for (i = 0; i &lt; WordLength[CurrentWord]; i++)
   CellAt(x + i, y).className = CellAt(x + i, y).className.replace(IsSelected ? "_unsel" : "_sel", IsSelected ? "_sel" : "_unsel");
 else
  for (i = 0; i &lt; WordLength[CurrentWord]; i++)
   CellAt(x, y + i).className = CellAt(x, y + i).className.replace(IsSelected ? "_unsel" : "_sel", IsSelected ? "_sel" : "_unsel");
}

// Selects the new word by parsing the name of the TD element referenced by the 
// event object, and then applying styles as necessary.
function SelectThisWord(event)
{
 if (CrosswordFinished) return;
 var x, y, i, TheirWord, TableCell;
 
 // Deselect the previous word if one was selected.
 document.getElementById("welcomemessage").style.display = "none";
 if (CurrentWord &gt;= 0) OKClick();
 DeselectCurrentWord();
 
 // Determine the coordinates of the cell they clicked, and then the word that
 // they clicked.
 var target = (event.srcElement ? event.srcElement: event.target);
 x = parseInt(target.id.substring(1, 4), 10);
 y = parseInt(target.id.substring(4, 7), 10);
 
 // If they clicked an intersection, choose the type of word that was NOT selected last time.
 if (TableAcrossWord[x][y] &gt;= 0 &amp;&amp; TableDownWord[x][y] &gt;= 0)
  CurrentWord = PrevWordHorizontal ? TableDownWord[x][y] : TableAcrossWord[x][y];
 else if (TableAcrossWord[x][y] &gt;= 0)
  CurrentWord = TableAcrossWord[x][y];
 else if (TableDownWord[x][y] &gt;= 0)
  CurrentWord = TableDownWord[x][y];

 PrevWordHorizontal = (CurrentWord &lt;= LastHorizontalWord);
 
 // Now, change the style of the cells in this word.
 ChangeCurrentWordSelectedStyle(true);
 
 // Then, prepare the answer box.
 x = WordX[CurrentWord];
 y = WordY[CurrentWord];
 TheirWord = "";
 var TheirWordLength = 0;
 for (i = 0; i &lt; WordLength[CurrentWord]; i++)
 {
  // Find the appropriate table cell.
  if (CurrentWord &lt;= LastHorizontalWord)
   TableCell = CellAt(x + i, y);
  else
   TableCell = CellAt(x, y + i);
  // Add its contents to the word we're building.
  if (TableCell.innerHTML != null &amp;&amp; TableCell.innerHTML.length &gt; 0 &amp;&amp; TableCell.innerHTML != " " &amp;&amp; TableCell.innerHTML.toLowerCase() != "&amp;nbsp;")
  {
   TheirWord += TableCell.innerHTML.toUpperCase();
   TheirWordLength++;
  }
  else
  {
   TheirWord += "&amp;bull;";
  }
 }
 
 document.getElementById("wordlabel").innerHTML = TheirWord;
 document.getElementById("wordinfo").innerHTML = ((CurrentWord &lt;= LastHorizontalWord) ? "Horizontal, " : "Vertical, ") + WordLength[CurrentWord] + " letters.";
 document.getElementById("wordclue").innerHTML = Clue[CurrentWord];
 document.getElementById("worderror").style.display = "none";
 document.getElementById("cheatbutton").style.display = (Word.length == 0) ? "none" : "";
 if (TheirWordLength == WordLength[CurrentWord])
  document.getElementById("wordentry").value = TheirWord.replace(/&amp;AMP;/g, '&amp;');
 else
  document.getElementById("wordentry").value = "";
 
 // Finally, show the answer box.
 document.getElementById("answerbox").style.display = "block";
 try
 {
  document.getElementById("wordentry").focus();
  document.getElementById("wordentry").select();
 }
 catch (e)
 {
 }
 
}

// Called when the user clicks the OK link.
function OKClick()
{
 var TheirWord, x, y, i, TableCell;
 if (CrosswordFinished) return;
 if (document.getElementById("okbutton").disabled) return;
 
 // First, validate the entry.
 TheirWord = document.getElementById("wordentry").value.toUpperCase();
 if (TheirWord.length == 0)
 {
  DeselectCurrentWord();
  return;
 }
 if (ContainsBadChars(TheirWord))
 {
  document.getElementById("worderror").innerHTML = "Esta palabra tiene caracteres invalidos.  Escriba solo letras.";
  document.getElementById("worderror").style.display = "block";
  return;
 }
 if (TheirWord.length &lt; WordLength[CurrentWord])
 {
  document.getElementById("worderror").innerHTML  = "No escribiste suficientes letras.  Esta palabra tiene " + WordLength[CurrentWord] + " letras.";
  document.getElementById("worderror").style.display = "block";
  return;
 }
 if (TheirWord.length &gt; WordLength[CurrentWord])
 {
  document.getElementById("worderror").innerHTML = "Escribiste demasiadas letras.  Esta palabra tiene " + WordLength[CurrentWord] + " letras.";
  document.getElementById("worderror").style.display = "block";
  return;
 }
 
 // If we made it this far, they typed an acceptable word, so add these letters to the puzzle and hide the entry box.
 x = WordX[CurrentWord];
 y = WordY[CurrentWord];
 for (i = 0; i &lt; TheirWord.length; i++)
 {
  TableCell = CellAt(x + (CurrentWord &lt;= LastHorizontalWord ? i : 0), y + (CurrentWord &gt; LastHorizontalWord ? i : 0));
  TableCell.innerHTML = TheirWord.substring(i, i + 1);
 }
 DeselectCurrentWord();
}

// Called when the "check puzzle" link is clicked.
function CheckClick()
{
 var i, j, x, y, UserEntry, ErrorsFound = 0, EmptyFound = 0, TableCell;
 if (CrosswordFinished) return;
 DeselectCurrentWord();
 
 for (y = 0; y &lt; CrosswordHeight; y++)
 for (x = 0; x &lt; CrosswordWidth; x++)
  if (TableAcrossWord[x][y] &gt;= 0 || TableDownWord[x][y] &gt;= 0)
  {
   TableCell = CellAt(x, y);
   if (TableCell.className == "ecw-box ecw-boxerror_unsel") TableCell.className = "ecw-box ecw-boxnormal_unsel";
  }
  
 for (i = 0; i &lt; Words; i++)
 {
  // Get the user's entry for this word.
  UserEntry = "";
  for (j = 0; j &lt; WordLength[i]; j++)
  {
   if (i &lt;= LastHorizontalWord)
    TableCell = CellAt(WordX[i] + j, WordY[i]);
   else
    TableCell = CellAt(WordX[i], WordY[i] + j);
   if (TableCell.innerHTML.length &gt; 0 &amp;&amp; TableCell.innerHTML.toLowerCase() != "&amp;nbsp;")
   {
    UserEntry += TableCell.innerHTML.toUpperCase();
   }
   else
   {
    UserEntry = "";
    EmptyFound++;
    break;
   }
  }
  UserEntry = UserEntry.replace(/&amp;AMP;/g, '&amp;');
  // If this word doesn't match, it's an error.
  if (HashWord(UserEntry) != AnswerHash[i] &amp;&amp; UserEntry.length &gt; 0)
  {
   ErrorsFound++;
   ChangeWordStyle(i, "ecw-box ecw-boxerror_unsel");
  }
 }
 
 // If they can only check once, disable things prematurely.
 if ( OnlyCheckOnce )
 {
  CrosswordFinished = true;
  document.getElementById("checkbutton").style.display = "none";
 }
 
 // If errors were found, just exit now.
 if (ErrorsFound &gt; 0 &amp;&amp; EmptyFound &gt; 0)
  document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound &gt; 1 ? " errors" : " error") + " and " + EmptyFound + (EmptyFound &gt; 1 ? " palabras incompletas fueron" : " incompleta palabra fue") + " encontrada(s).";
 else if (ErrorsFound &gt; 0)
  document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound &gt; 1 ? " errores fueros" : " error fue") + " encontrado(s).";
 else if (EmptyFound &gt; 0)
  document.getElementById("welcomemessage").innerHTML = "No hay errores, Pero " + EmptyFound + (EmptyFound &gt; 1 ? " palabras incompletas fueron" : " incompleta palabra fue") + " encontrada(s).";
 
 if (ErrorsFound + EmptyFound &gt; 0)
 {
  document.getElementById("welcomemessage").style.display = "";
  return;
 }
   
 // They finished the puzzle!
 CrosswordFinished = true;
 document.getElementById("checkbutton").style.display = "none";
 document.getElementById("congratulations").style.display = "block";
 document.getElementById("welcomemessage").style.display = "none";
}

// Called when the "cheat" link is clicked.
function CheatClick()
{
 if (CrosswordFinished) return;
 var OldWord = CurrentWord;
 document.getElementById("wordentry").value = Word[CurrentWord];
 OKClick();
 ChangeWordStyle(OldWord, "ecw-box ecw-boxcheated_unsel");
}

// Returns a one-way hash for a word.
function HashWord(Word)
{
 var x = (Word.charCodeAt(0) * 719) % 1138;
 var Hash = 837;
 var i;
 for (i = 1; i &lt;= Word.length; i++)
  Hash = (Hash * i + 5 + (Word.charCodeAt(i - 1) - 64) * x) % 98503;
 return Hash;
}

//--&gt;
&lt;/script&gt;

&lt;/td&gt;

&lt;td valign="top" style="padding-left: 1em;"&gt;
&lt;center&gt;&lt;a href="javascript:if (confirm('Si terminó el juego y completó el crucigrama pulse aceptar y será llevado al Hospital del Club de los Urositos')) {parent.location='https://www.uropediatra-online.com/el-hospital-del-club.html';};"&gt;&lt;img src="https://www.uropediatra-online.com/files/El%20Club/Foto%20Perfil-Crucigrama.jpg" width="90" height="67" title="SOLO HAGA CLIC AQUÍ, SI YA COMPLETÓ EL EJERCICIO"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;div id="welcomemessage" class="ecw-answerbox" style="display:none;"&gt;
&lt;h3&gt;BIENVENIDO!&lt;/h3&gt;
&lt;p&gt;Pulse sobre la casilla en la que desea responder.&lt;/p&gt;
&lt;/div&gt;

&lt;div id="answerbox" class="ecw-answerbox" style="display:none;"&gt;
&lt;h3 id="wordlabel" class="ecw-wordlabel"&gt; &amp;nbsp;&lt;/h3&gt;
&lt;div id="wordinfo" class="ecw-wordinfo"&gt; &lt;/div&gt;
&lt;div id="wordclue" class="ecw-cluebox"&gt; &lt;/div&gt;
&lt;div style="margin-top: 1em;"&gt;
 &lt;input class="ecw-input" id="wordentry" type="text" size="24" style="font-weight: bold; text-transform:uppercase;" onkeypress="WordEntryKeyPress(event)" onchange="WordEntryKeyPress(event)" /&gt;
&lt;/div&gt;
&lt;div id="worderror" class="ecw-worderror"&gt;&lt;/div&gt;

&lt;table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top:1em;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;button id="cheatbutton" type="button" class="ecw-input ecw-button" onclick="CheatClick();"&gt;Ayuda&lt;/button&gt;
&lt;/td&gt;&lt;td align="right"&gt;
&lt;button id="okbutton" type="button" class="ecw-input ecw-button" onclick="OKClick();" style="font-weight: bold;"&gt;Anotar&lt;/button&gt; &amp;nbsp;
&lt;button id="cancelbutton" type="button" class="ecw-input ecw-button" onclick="DeselectCurrentWord();"&gt;Cancelar&lt;/button&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;

&lt;/div&gt;

&lt;div id="congratulations" class="ecw-answerbox" style="display:none;"&gt;
&lt;h3&gt;FELICITACIONES!&lt;/h3&gt;
&lt;p&gt;Lo hiciste &lt;a href="https://www.uropediatra-online.com/la-escuela-en-el-aire.html" style="color: black; text-decoration:none;"&gt;muy bien.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;div style="margin-top: 1em;"&gt;
 &lt;center&gt;&lt;button id="checkbutton" type="button" onclick="CheckClick();" style="display: none;"&gt;Verificar como voy&lt;/button&gt;
 &lt;a href="javascript:location.reload()"&gt;COMENZAR DE NUEVO&lt;/a&gt;&lt;/center&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;



&lt;script type="text/javascript"&gt;&lt;!--
BeginCrossword();
//--&gt;
&lt;/script&gt;
</description><link>http://uropediatra-online.blogspot.com/2017/08/dias-meses-estaciones.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-4137114177688139706</guid><pubDate>Sun, 20 Aug 2017 07:16:00 +0000</pubDate><atom:updated>2017-08-25T16:12:56.128-05:00</atom:updated><title>CruciEnglish</title><description>&lt;style type="text/css"&gt;&lt;!--

body, h1, h2, h3, h4, h5, h6
{
 font-family: "Segoe UI", "Franklin Gothic Medium", "Arial", sans-serif;
}

h1, h2, h3, h4, h5, h6
{
 color: #5d6a86;
}

body
{
 cursor: default;
 font-size: small;
}

.ecw-answerbox
{
 color: black;
 background-color: #FFFAF0;
 border-color: #808080;
 border-style: solid;
 border-width: 1px;
 display: block;
 padding: .75em;
 width: 240pt;
}

.ecw-box
{
 border-style: solid;
 border-width: 1pt;
 cursor: pointer;
 font-size: .12in;
 font-weight: bold;
 height: .18in;
 overflow: hidden;
 text-align: center;
 width: .18in;
}

.ecw-boxcheated_sel
{
 background-color: #FFF1D7;
 border-color: #C00000;
 color: #2080D0;
}

.ecw-boxcheated_unsel
{
 background-color: #ffffff;
 border-color: #606060;
 color: #2080D0;
}

.ecw-boxerror_sel
{
 background-color: #FFF1D7;
 border-color: #C00000;
 color: #BF0000;
}

.ecw-boxerror_unsel
{
 background-color: #FFF0F0;
 border-color: #606060;
 color: #BF0000;
}

.ecw-boxnormal_sel
{
 background-color: #FFF1D7;
 border-color: #C00000;
 color: #000000;
}

.ecw-boxnormal_unsel
{
 background-color: #ffffff;
 border-color: #606060;
 color: #000000;
}

.ecw-button
{
 width: 64pt;
}

.ecw-cluebox
{
 border-bottom-width: 1px;
 border-color: #c0c0c0;
 border-left-width: 0px;
 border-right-width: 0px;
 border-style: solid;
 border-top-width: 1px;
 margin-top: 1em;
 padding-bottom: .5em;
 padding-left: 0pt;
 padding-right: 0pt;
 padding-top: .5em;
}

.ecw-crosswordarea
{
 background-color: #D0D8E0;
 border-color: #808080;
 border-style: solid;
 border-width: 2px;
 padding: .5em;
 font-family: "Segoe UI", "Verdana", "Arial", sans-serif;
 font-size: small;
}

.ecw-copyright
{
 margin-bottom: 1em;
 font-size: x-small;
 font-family: "Segoe UI", "Franklin Gothic Medium", "Arial", sans-serif;
}

.ecw-input
{
 font-family: "Segoe UI", "Verdana", "Arial", sans-serif;
}

.ecw-wordlabel
{
 text-transform: uppercase;
 margin: 0;
}

.ecw-wordinfo
{
 font-size: 8pt;
 color: #808080;
}

.ecw-worderror
{
 color: #c00000;
 font-weight: bold;
 display: none;
 margin-top: 1em;
}

--&gt;&lt;/style&gt;

&lt;h1&gt;THE CRUCI-ENGLISH: Parts of the Body and Colors...&lt;/h1&gt;
&lt;h3 style="margin-top: -1em;"&gt;&lt;/h3&gt;

&lt;div id="waitmessage" class="ecw-answerbox"&gt;
 This interactive crossword puzzle requires JavaScript and any 
 recent web browser, including Windows Internet Explorer, Mozilla Firefox, Google Chrome, or 
 Apple Safari.  If you have disabled web page scripting, please re-enable it and refresh
 the page.  If this web page is saved on your computer, you may need to click the yellow Information Bar at the top or bottom of
 the page to allow the puzzle to load.
&lt;/div&gt;

&lt;table cellpadding="0" cellspacing="0" border="0"&gt;&lt;tr&gt;

&lt;td class="ecw-crosswordarea"&gt;

&lt;script type="text/javascript"&gt;&lt;!--
 CrosswordWidth = 15;
 CrosswordHeight = 15;
 Words = 18;
 WordLength = new Array(6, 9, 5, 4, 4, 4, 5, 5, 7, 6, 4, 5, 4, 9, 7, 5, 5, 4);
 Word = new Array("ORANGE", "EYELASHES", "BRAIN", "BACK", "IRIS", "DARK", "CHEST", "HEART", "STOMACH", "KIDNEY", "BODY", "CHEEK", "LUNG", "SHOULDERS", "BLADDER", "WAIST", "BEIGE", "HEEL");
 Clue = new Array("naranja o anaranjado", 
"pestañas", 
"cerebro", 
"espalda", 
"iris", 
"oscuro", 
"pecho", 
"corazón", 
"estomago", 
"riñon", 
"cuerpo", 
"mejilla", 
"pulmón", 
"hombros", 
"vejiga", 
"cintura", 
"beige", 
"talon o tacon");
 AnswerHash = new Array(63056, 7139, 33038, 86361, 87986, 32623, 6690, 89066, 97249, 17130, 37411, 75410, 32353, 91042, 44544, 83480, 16909, 80262);
 WordX = new Array(3, 2, 1, 11, 9, 1, 5, 0, 7, 9, 3, 14, 5, 7, 1, 9, 11, 13);
 WordY = new Array(1, 3, 5, 5, 7, 8, 9, 10, 11, 13, 0, 1, 3, 3, 5, 5, 5, 11);
 LastHorizontalWord = 9;
 OnlyCheckOnce = false;
//--&gt;
&lt;/script&gt;

&lt;script type="text/javascript"&gt;&lt;!--

var BadChars = "`~!@^*()_={[}]\\|:;\"',&lt;&gt;/?";

var TableAcrossWord, TableDownWord;
var CurrentWord, PrevWordHorizontal, x, y, i, j;
var CrosswordFinished, Initialized;

// Check the user's browser and then initialize the puzzle.
if (document.getElementById("waitmessage") != null)
{
 document.getElementById("waitmessage").innerHTML = "Please wait while the crossword is loaded...";
 
 // Current game variables
 CurrentWord = -1;
 PrevWordHorizontal = false;
 
 // Create the cell-to-word arrays.
 TableAcrossWord = new Array(CrosswordWidth);
 for (var x = 0; x &lt; CrosswordWidth; x++) TableAcrossWord[x] = new Array(CrosswordHeight);
 TableDownWord = new Array(CrosswordWidth);
 for (var x = 0; x &lt; CrosswordWidth; x++) TableDownWord[x] = new Array(CrosswordHeight);
 for (var y = 0; y &lt; CrosswordHeight; y++)
  for (var x = 0; x &lt; CrosswordWidth; x++)
  {
   TableAcrossWord[x][y] = -1;
   TableDownWord[x][y] = -1;
  }
 
 // First, add the horizontal words to the puzzle.
 for (var i = 0; i &lt;= LastHorizontalWord; i++)
 {
  x = WordX[i];
  y = WordY[i];
  for (var j = 0; j &lt; WordLength[i]; j++)
  {
   TableAcrossWord[x + j][y] = i;
  }
 }
 
 // Second, add the vertical words to the puzzle.
 for (var i = LastHorizontalWord + 1; i &lt; Words; i++)
 {
  x = WordX[i];
  y = WordY[i];
  for (var j = 0; j &lt; WordLength[i]; j++)
  {
   TableDownWord[x][y + j] = i;
  }
 }
 
 // Now, insert the crossword table.
 document.writeln("&lt;table id=\"crossword\" cellpadding=\"0\" cellspacing=\"0\" style=\"display: none; border-collapse: collapse;\"&gt;");
 for (var y = 0; y &lt; CrosswordHeight; y++)
 {
  document.writeln("&lt;tr&gt;");
  for (var x = 0; x &lt; CrosswordWidth; x++)
  {
   if (TableAcrossWord[x][y] &gt;= 0 || TableDownWord[x][y] &gt;= 0)
    document.write("&lt;td id=\"c" + PadNumber(x) + PadNumber(y) + "\" class=\"ecw-box ecw-boxnormal_unsel\" onclick=\"SelectThisWord(event);\"&gt;&amp;nbsp;&lt;/td&gt;");
   else
    document.write("&lt;td&gt;&lt;\/td&gt;");
  }
  document.writeln("&lt;\/tr&gt;");
 }
 document.writeln("&lt;\/table&gt;");
 
 // Finally, show the crossword and hide the wait message.
 Initialized = true;
 document.getElementById("waitmessage").style.display = "none";
 document.getElementById("crossword").style.display = "block";
}

// * * * * * * * * * *
// Event handlers

// Raised when a key is pressed in the word entry box.
function WordEntryKeyPress(event)
{
 if (CrosswordFinished) return;
 // Treat an Enter keypress as an OK click.
 if (CurrentWord &gt;= 0 &amp;&amp; event.keyCode == 13) OKClick();
}

// * * * * * * * * * *
// Helper functions

// Called when we're ready to start the crossword.
function BeginCrossword()
{
 if (Initialized)
 {
  document.getElementById("welcomemessage").style.display = "";
  document.getElementById("checkbutton").style.display = "";
 }
}

// Returns true if the string passed in contains any characters prone to evil.
function ContainsBadChars(theirWord)
{
 for (var i = 0; i &lt; theirWord.length; i++)
  if (BadChars.indexOf(theirWord.charAt(i)) &gt;= 0) return true;
 return false;
}

// Pads a number out to three characters.
function PadNumber(number)
{
 if (number &lt; 10)
  return "00" + number;
 else if (number &lt; 100)
  return "0" + number;
 else
  return "" +  number;
}

// Returns the table cell at a particular pair of coordinates.
function CellAt(x, y)
{
 return document.getElementById("c" + PadNumber(x) + PadNumber(y));
}

// Deselects the current word, if there's a word selected.  DOES not change the value of CurrentWord.
function DeselectCurrentWord()
{
 if (CurrentWord &lt; 0) return;
 var x, y, i;
 
 document.getElementById("answerbox").style.display = "none";
 ChangeCurrentWordSelectedStyle(false);
 CurrentWord = -1;
 
}

// Changes the style of the cells in the current word.
function ChangeWordStyle(WordNumber, NewStyle)
{
 if (WordNumber&lt; 0) return;
 var x = WordX[WordNumber];
 var y = WordY[WordNumber];
 
 if (WordNumber&lt;= LastHorizontalWord)
  for (i = 0; i &lt; WordLength[WordNumber]; i++)
   CellAt(x + i, y).className = NewStyle;
 else
  for (i = 0; i &lt; WordLength[WordNumber]; i++)
   CellAt(x, y + i).className = NewStyle;
}

// Changes the style of the cells in the current word between the selected/unselected form.
function ChangeCurrentWordSelectedStyle(IsSelected)
{
 if (CurrentWord &lt; 0) return;
 var x = WordX[CurrentWord];
 var y = WordY[CurrentWord];
 
 if (CurrentWord &lt;= LastHorizontalWord)
  for (i = 0; i &lt; WordLength[CurrentWord]; i++)
   CellAt(x + i, y).className = CellAt(x + i, y).className.replace(IsSelected ? "_unsel" : "_sel", IsSelected ? "_sel" : "_unsel");
 else
  for (i = 0; i &lt; WordLength[CurrentWord]; i++)
   CellAt(x, y + i).className = CellAt(x, y + i).className.replace(IsSelected ? "_unsel" : "_sel", IsSelected ? "_sel" : "_unsel");
}

// Selects the new word by parsing the name of the TD element referenced by the 
// event object, and then applying styles as necessary.
function SelectThisWord(event)
{
 if (CrosswordFinished) return;
 var x, y, i, TheirWord, TableCell;
 
 // Deselect the previous word if one was selected.
 document.getElementById("welcomemessage").style.display = "none";
 if (CurrentWord &gt;= 0) OKClick();
 DeselectCurrentWord();
 
 // Determine the coordinates of the cell they clicked, and then the word that
 // they clicked.
 var target = (event.srcElement ? event.srcElement: event.target);
 x = parseInt(target.id.substring(1, 4), 10);
 y = parseInt(target.id.substring(4, 7), 10);
 
 // If they clicked an intersection, choose the type of word that was NOT selected last time.
 if (TableAcrossWord[x][y] &gt;= 0 &amp;&amp; TableDownWord[x][y] &gt;= 0)
  CurrentWord = PrevWordHorizontal ? TableDownWord[x][y] : TableAcrossWord[x][y];
 else if (TableAcrossWord[x][y] &gt;= 0)
  CurrentWord = TableAcrossWord[x][y];
 else if (TableDownWord[x][y] &gt;= 0)
  CurrentWord = TableDownWord[x][y];

 PrevWordHorizontal = (CurrentWord &lt;= LastHorizontalWord);
 
 // Now, change the style of the cells in this word.
 ChangeCurrentWordSelectedStyle(true);
 
 // Then, prepare the answer box.
 x = WordX[CurrentWord];
 y = WordY[CurrentWord];
 TheirWord = "";
 var TheirWordLength = 0;
 for (i = 0; i &lt; WordLength[CurrentWord]; i++)
 {
  // Find the appropriate table cell.
  if (CurrentWord &lt;= LastHorizontalWord)
   TableCell = CellAt(x + i, y);
  else
   TableCell = CellAt(x, y + i);
  // Add its contents to the word we're building.
  if (TableCell.innerHTML != null &amp;&amp; TableCell.innerHTML.length &gt; 0 &amp;&amp; TableCell.innerHTML != " " &amp;&amp; TableCell.innerHTML.toLowerCase() != "&amp;nbsp;")
  {
   TheirWord += TableCell.innerHTML.toUpperCase();
   TheirWordLength++;
  }
  else
  {
   TheirWord += "&amp;bull;";
  }
 }
 
 document.getElementById("wordlabel").innerHTML = TheirWord;
 document.getElementById("wordinfo").innerHTML = ((CurrentWord &lt;= LastHorizontalWord) ? "Horizontal, " : "Vertical, ") + WordLength[CurrentWord] + " letras.";
 document.getElementById("wordclue").innerHTML = Clue[CurrentWord];
 document.getElementById("worderror").style.display = "none";
 document.getElementById("cheatbutton").style.display = (Word.length == 0) ? "none" : "";
 if (TheirWordLength == WordLength[CurrentWord])
  document.getElementById("wordentry").value = TheirWord.replace(/&amp;AMP;/g, '&amp;');
 else
  document.getElementById("wordentry").value = "";
 
 // Finally, show the answer box.
 document.getElementById("answerbox").style.display = "block";
 try
 {
  document.getElementById("wordentry").focus();
  document.getElementById("wordentry").select();
 }
 catch (e)
 {
 }
 
}

// Called when the user clicks the OK link.
function OKClick()
{
 var TheirWord, x, y, i, TableCell;
 if (CrosswordFinished) return;
 if (document.getElementById("okbutton").disabled) return;
 
 // First, validate the entry.
 TheirWord = document.getElementById("wordentry").value.toUpperCase();
 if (TheirWord.length == 0)
 {
  DeselectCurrentWord();
  return;
 }
 if (ContainsBadChars(TheirWord))
 {
  document.getElementById("worderror").innerHTML = "La palabra escrita contiene caracteres invalidos.  Escriba solo letras.";
  document.getElementById("worderror").style.display = "block";
  return;
 }
 if (TheirWord.length &lt; WordLength[CurrentWord])
 {
  document.getElementById("worderror").innerHTML  = "No escribiste suficientes letras.  esta palabra tiene " + WordLength[CurrentWord] + " letras.";
  document.getElementById("worderror").style.display = "block";
  return;
 }
 if (TheirWord.length &gt; WordLength[CurrentWord])
 {
  document.getElementById("worderror").innerHTML = "Escribió muchas letras.  Esta palabra tiene " + WordLength[CurrentWord] + " letras.";
  document.getElementById("worderror").style.display = "block";
  return;
 }
 
 // If we made it this far, they typed an acceptable word, so add these letters to the puzzle and hide the entry box.
 x = WordX[CurrentWord];
 y = WordY[CurrentWord];
 for (i = 0; i &lt; TheirWord.length; i++)
 {
  TableCell = CellAt(x + (CurrentWord &lt;= LastHorizontalWord ? i : 0), y + (CurrentWord &gt; LastHorizontalWord ? i : 0));
  TableCell.innerHTML = TheirWord.substring(i, i + 1);
 }
 DeselectCurrentWord();
}

// Called when the "check puzzle" link is clicked.
function CheckClick()
{
 var i, j, x, y, UserEntry, ErrorsFound = 0, EmptyFound = 0, TableCell;
 if (CrosswordFinished) return;
 DeselectCurrentWord();
 
 for (y = 0; y &lt; CrosswordHeight; y++)
 for (x = 0; x &lt; CrosswordWidth; x++)
  if (TableAcrossWord[x][y] &gt;= 0 || TableDownWord[x][y] &gt;= 0)
  {
   TableCell = CellAt(x, y);
   if (TableCell.className == "ecw-box ecw-boxerror_unsel") TableCell.className = "ecw-box ecw-boxnormal_unsel";
  }
  
 for (i = 0; i &lt; Words; i++)
 {
  // Get the user's entry for this word.
  UserEntry = "";
  for (j = 0; j &lt; WordLength[i]; j++)
  {
   if (i &lt;= LastHorizontalWord)
    TableCell = CellAt(WordX[i] + j, WordY[i]);
   else
    TableCell = CellAt(WordX[i], WordY[i] + j);
   if (TableCell.innerHTML.length &gt; 0 &amp;&amp; TableCell.innerHTML.toLowerCase() != "&amp;nbsp;")
   {
    UserEntry += TableCell.innerHTML.toUpperCase();
   }
   else
   {
    UserEntry = "";
    EmptyFound++;
    break;
   }
  }
  UserEntry = UserEntry.replace(/&amp;AMP;/g, '&amp;');
  // If this word doesn't match, it's an error.
  if (HashWord(UserEntry) != AnswerHash[i] &amp;&amp; UserEntry.length &gt; 0)
  {
   ErrorsFound++;
   ChangeWordStyle(i, "ecw-box ecw-boxerror_unsel");
  }
 }
 
 // If they can only check once, disable things prematurely.
 if ( OnlyCheckOnce )
 {
  CrosswordFinished = true;
  document.getElementById("checkbutton").style.display = "none";
 }
 
 // If errors were found, just exit now.
 if (ErrorsFound &gt; 0 &amp;&amp; EmptyFound &gt; 0)
  document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound &gt; 1 ? " errores" : " error") + " y " + EmptyFound + (EmptyFound &gt; 1 ? " incompletas palabras fueron" : " incompleta palabra fue") + " encontrada(s).";
 else if (ErrorsFound &gt; 0)
  document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound &gt; 1 ? " errores fueron" : " error fue") + " encontrado(s).";
 else if (EmptyFound &gt; 0)
  document.getElementById("welcomemessage").innerHTML = "No hay errores, Pero " + EmptyFound + (EmptyFound &gt; 1 ? " incompletas palabras fueron" : " incompleta palabra fue") + " encontrada(s).";
 
 if (ErrorsFound + EmptyFound &gt; 0)
 {
  document.getElementById("welcomemessage").style.display = "";
  return;
 }
   
 // They finished the puzzle!
 CrosswordFinished = true;
 document.getElementById("checkbutton").style.display = "none";
 document.getElementById("congratulations").style.display = "block";
 document.getElementById("welcomemessage").style.display = "none";
}

// Called when the "cheat" link is clicked.
function CheatClick()
{
 if (CrosswordFinished) return;
 var OldWord = CurrentWord;
 document.getElementById("wordentry").value = Word[CurrentWord];
 OKClick();
 ChangeWordStyle(OldWord, "ecw-box ecw-boxcheated_unsel");
}

// Returns a one-way hash for a word.
function HashWord(Word)
{
 var x = (Word.charCodeAt(0) * 719) % 1138;
 var Hash = 837;
 var i;
 for (i = 1; i &lt;= Word.length; i++)
  Hash = (Hash * i + 5 + (Word.charCodeAt(i - 1) - 64) * x) % 98503;
 return Hash;
}

//--&gt;
&lt;/script&gt;

&lt;/td&gt;

&lt;td valign="top" style="padding-left: 1em;"&gt;
&lt;center&gt;&lt;a href="javascript:if (confirm('Si terminó el juego y completó el crucigrama pulse aceptar y será llevado al Hospital del Club de los Urositos')) {parent.location='https://www.uropediatra-online.com/el-hospital-del-club.html';};"&gt;&lt;img src="https://www.uropediatra-online.com/files/El%20Club/Foto%20Perfil-Crucigrama.jpg" width="90" height="67" title="SOLO HAGA CLIC AQUÍ, SI YA COMPLETÓ EL EJERCICIO"&gt;&lt;/a&gt;&lt;/center&gt;
&lt;div id="welcomemessage" class="ecw-answerbox" style="display:none;"&gt;
&lt;h3&gt;BIENVENIDO&lt;/h3&gt;
&lt;p&gt;Pulsar siempre sobre la casilla a llenar. !SUERTE!&lt;/p&gt;
&lt;/div&gt;

&lt;div id="answerbox" class="ecw-answerbox" style="display:none;"&gt;
&lt;h3 id="wordlabel" class="ecw-wordlabel"&gt; &amp;nbsp;&lt;/h3&gt;
&lt;div id="wordinfo" class="ecw-wordinfo"&gt; &lt;/div&gt;
&lt;div id="wordclue" class="ecw-cluebox"&gt; &lt;/div&gt;
&lt;div style="margin-top: 1em;"&gt;
 &lt;input class="ecw-input" id="wordentry" type="text" size="24" style="font-weight: bold; text-transform:uppercase;" onkeypress="WordEntryKeyPress(event)" onchange="WordEntryKeyPress(event)" /&gt;
&lt;/div&gt;
&lt;div id="worderror" class="ecw-worderror"&gt;&lt;/div&gt;

&lt;table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top:1em;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;button id="cheatbutton" type="button" class="ecw-input ecw-button" onclick="CheatClick();"&gt;Ayuda&lt;/button&gt;
&lt;/td&gt;&lt;td align="right"&gt;
&lt;button id="okbutton" type="button" class="ecw-input ecw-button" onclick="OKClick();" style="font-weight: bold;"&gt;Ingresar&lt;/button&gt; &amp;nbsp;
&lt;button id="cancelbutton" type="button" class="ecw-input ecw-button" onclick="DeselectCurrentWord();"&gt;Cancelar&lt;/button&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;

&lt;/div&gt;
&lt;div style="margin-top: 1em;"&gt;
 &lt;center&gt;&lt;button id="checkbutton" type="button" onclick="CheckClick();" style="display: none;"&gt;Verificar como voy&lt;/button&gt;
 &lt;a href="javascript:location.reload()"&gt;COMENZAR DE NUEVO&lt;/a&gt;&lt;/center&gt;
&lt;/div&gt;
&lt;div id="congratulations" class="ecw-answerbox" style="display:none;"&gt;
&lt;h3&gt;Felicitaciones!&lt;/h3&gt;
&lt;p&gt;Lo hiciste &lt;a href="https://www.uropediatra-online.com/la-escuela-en-el-aire.html" style="color: black; text-decoration:none;"&gt;muy bien.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;

&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;script type="text/javascript"&gt;&lt;!--
BeginCrossword();
//--&gt;
&lt;/script&gt;
</description><link>http://uropediatra-online.blogspot.com/2017/08/crucienglish.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-4698001949967006434</guid><pubDate>Sat, 19 Aug 2017 02:50:00 +0000</pubDate><atom:updated>2017-08-19T07:40:26.291-05:00</atom:updated><title>El Ahorcado</title><description>&lt;SCRIPT language=JavaScript&gt;
var hombre = new Array("___\n", "   |\n", "   O\n", "  /", "|", "\\\n", "  /", " \\\n", "___")
var palabra
var libreriaPalabras = new Array("h a i r", "h e a d", "f a c e", "f o r e h e a d", "c h i n",
"e y e b r o w s", "e y e", "l i p s", "m o u t h", "t e e t h",
"m u s t a c h e", "t o o t h", "t o n g u e", "e a r", "n o s e",
"n e c k", "n a i l", "w h i t e", "b l a c k", "r e d",
"b l u e", "g r e e n", "y e l l o w", "b r o w n", "p i n k",
"p u r p l e", "g r a y", "e l b o w", "w r i s t", "h a n d",
"f i n g e r s", "h i p", "t h u m b", "l e g", "k n e e", "c a l f", "a n k l e", "f o o t", "t o e s", "k i d n e y", "a r m" )
var partes = 0
var colNueva = 0
var jugando


function ObtienePalabra() {
   //obtiene la palabra para jugar de forma pseudoaleatoria
   var indice = Math.round ( Math.random() * 40 )
   var cadena = new String( libreriaPalabras[indice] )
   palabra = cadena.split(" ")
}


function DibujaHombre(visor, partes) {
   //dibuja el hombre ahorcado
   //partes indica el numero de partes a dibujar
   var dibujo = ""
   if (partes &lt; 10)
      for(var x = 0; x &lt; partes; x++) {
         dibujo += hombre[x]
      }
   visor.displayHombre.value = dibujo
}


function DibujaLetra(visor, letra) {
   //dibuja una letra de la palabra
   //posicion indica donde debe dibujar la letra
   var flag = false 
   //indica si se encontro la letra 
   //obtiene cadena actual
   var cadena = new String(visor.displayPalabra.value)
   //la separa en sus espacios
   var letrasCadena = cadena.split(" ")
   cadena = "" 
   for (var x = 0; x &lt; palabra.length; x++) {
      if (palabra[x] == letra) {
         cadena += letra + " "
         flag = true
      } else
         cadena += letrasCadena[x] + " "
   }
   visor.displayPalabra.value = cadena
   return flag
}


function NuevaLetra(visor, letra) {
   //añade letra lista de letras
   visor.displayLetras.value += letra + " "
   //comprueba si ha de pasar a la siguiente fila
   if(colNueva == 3) {
      visor.displayLetras.value += "\n"
      colNueva = 0
   } else
      colNueva++
}


function Juega(visor, letra) {
   //comprueba si esta jugando
   if (jugando) {
      //ciclo de jugada
      //1. añade letra a la lista
      NuevaLetra(visor, letra)
      //2. dibuja la letra y comprueba si acierto
      var acierto = DibujaLetra(visor, letra)
      //3. si no acierto, dibuja hombre
      if (!acierto)
         DibujaHombre(visor, ++partes)
      //4. comprueba si fin
      if (partes == 9)
         FinJuego(false)
      else if (CompruebaPalabra(visor))
         FinJuego(true)
      } else {
         alert('Pulsa Juego nuevo para comenzar\nuna partida nueva.')
   }
}

function IniciaJuego(visor) {
   //inicializa visor y variables globales
   jugando = true
   partes = 0
   colNueva = 0
   ObtienePalabra()
   DibujaHombre(visor, partes)
   visor.displayPalabra.value = ""
   for (var x = 0; x &lt; palabra.length; x++)
      visor.displayPalabra.value += "_ "
   visor.displayLetras.value = ""
}

function CompruebaPalabra(visor) {
   //comprueba si se completo toda la palabra
   var fin = true
   //obtiene cadena actual
   var cadena = new String(visor.displayPalabra.value)
   //la separa en sus espacios
   var letrasCadena = cadena.split(" ")
   for(var x = 0; x &lt; letrasCadena.length; x++)
      if (letrasCadena[x] == "_")
         fin = false
   return fin
}


function FinJuego(resultado) {
   //indica que si se ha perdido o ganado
   var solucion = ""
   jugando = false 
   if (resultado) {
      document.visor.ganadas.value++
      alert("Acertaste !")
   } else {
     document.visor.perdidas.value++
     //construye la palabra solucion
     for (var x = 0; x &lt; palabra.length; x++)
        solucion += palabra[x]
     alert("Estas Ahorcado, debes estudiar mas !\n La palabra era: " + solucion)
   }
}
&lt;/SCRIPT&gt;


&lt;FORM name=visor&gt;
&lt;LEFT&gt;
&lt;TABLE width=547&gt;
  &lt;TBODY&gt;
  &lt;TR&gt;
    &lt;TD align=middle width=150 colSpan=3&gt;&lt;TEXTAREA name=displayHombre rows=6 cols=15&gt;&lt;/TEXTAREA&gt; 
    &lt;TD align=middle width=150 colSpan=3&gt;&lt;TEXTAREA name=displayLetras rows=6 cols=15&gt;&lt;/TEXTAREA&gt; 
    &lt;TD width=200&gt;
  &lt;TR&gt;
    &lt;TD align=middle width=300 colSpan=6&gt;&lt;INPUT size=42 name=displayPalabra&gt; 
    &lt;TD align=middle&gt;&amp;nbsp; 
  &lt;TR&gt;
    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'a')" type=button value=" A " name=botA&gt; 

    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'b')" type=button value=" B " name=botB&gt; 

    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'c')" type=button value=" C " name=botC&gt; 

    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'd')" type=button value=" D " name=botD&gt; 

    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'e')" type=button value=" E " name=botE&gt; 

    &lt;TD align=middle width=50&gt;&lt;INPUT onclick="Juega(this.form, 'f')" type=button value=" F " name=botF&gt; 

    &lt;TD&gt;
  &lt;TR&gt;
    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'g')" type=button value=" G " name=botG&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'h')" type=button value=" H " name=botH&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'i')" type=button value=" I " name=botI&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'j')" type=button value=" J " name=botJ&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'k')" type=button value=" K " name=botK&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'l')" type=button value=" L " name=botL&gt; 

    &lt;TD vAlign=center align=right&gt;Ganadas: &lt;INPUT size=4 value=0 name=ganadas&gt; 

  &lt;TR&gt;
    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'm')" type=button value=" M " name=botM&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'n')" type=button value=" N " name=botN&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'ñ')" type=button value=" Ñ " name=botÑ&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'o')" type=button value=" O " name=botO&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'p')" type=button value=" P " name=botP&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'q')" type=button value=" Q " name=botQ&gt; 

    &lt;TD vAlign=center align=right&gt;Perdidas: &lt;INPUT size=4 value=0 
      name=perdidas&gt; 
  &lt;TR&gt;
    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'r')" type=button value=" R " name=botR&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 's')" type=button value=" S " name=botS&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 't')" type=button value=" T " name=botT&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'u')" type=button value=" U " name=botU&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'v')" type=button value=" V " name=botV&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'w')" type=button value=" W " name=botW&gt; 

    &lt;TD&gt;
  &lt;TR&gt;
    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'x')" type=button value=" X " name=botX&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'y')" type=button value=" Y " name=botY&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="Juega(this.form, 'z')" type=button value=" Z " name=botZ&gt; 

    &lt;TD align=middle colSpan=3&gt;&lt;INPUT onclick=IniciaJuego(this.form) type=button value="  Juego nuevo   " name=Inicia&gt; 

    &lt;TD align=middle&gt;&lt;INPUT onclick="this.form.ganadas.value='0'; this.form.perdidas.value='0'" type=button value=Limpiar name=B1&gt; 
  &lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/LEFT&gt;&lt;/FORM&gt;</description><link>http://uropediatra-online.blogspot.com/2017/08/el-ahorcado.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-8002217628765308118</guid><pubDate>Thu, 03 Aug 2017 13:04:00 +0000</pubDate><atom:updated>2017-08-03T09:04:21.970-05:00</atom:updated><title>TicTac</title><description>&lt;style type="text/css"&gt;
&lt;!-- 
body 
{
font-size:18px;font-weight:bold;} 
h1 {font-size:20px;align:center;}

--&gt;
&lt;/style&gt;

&lt;script type="text/javascript"&gt;
var image1=new Image(); image1.src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/ex.gif";
var image2=new Image(); image2.src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/up-oh.gif";

var level=1, myway, mynextmove;
var tmp, done, iswon, content;
var pcwins=[0,0,0,0];
var playerwins=[0,0,0,0];
var draws=[0,0,0,0]; 
var playerstarts=true;
var moves=new Array();
var game=new Array(9);
var choices=[11,12,13,21,22,23,31,32,33];
var corners=[11,13,31,33];
var ways=new Array();
ways[1]=[0,11,12,13];
ways[2]=[0,21,22,23];
ways[3]=[0,31,32,33];
ways[4]=[0,11,21,31];
ways[5]=[0,12,22,32];
ways[6]=[0,13,23,33];
ways[7]=[0,11,22,33];
ways[8]=[0,13,22,31]; 
var w3c=(document.getElementById)?true:false;
var ns4=(document.layers)?true:false;
var ie4=(document.all &amp;&amp; !w3c)?true:false;
var ie5=(document.all &amp;&amp; w3c)?true:false;
var ns6=(w3c &amp;&amp; navigator.appName.indexOf("Netscape")&gt;=0)?true:false;

function init(){
oktoplay=true;
iswon=false;
done=0;
writetext(4);
moves[11]=0; moves[12]=0; moves[13]=0; moves[21]=0; moves[22]=0; moves[23]=0; moves[31]=0; moves[32]=0; moves[33]=0;
for(i=0;i&lt;=8;i++){
document.images['rc'+choices[i]].src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/nothing.gif";
document.images['rc'+choices[i]].alt="";
game[i]=0;
}
if(!playerstarts)pcturn();
}

function writetext(num){
switch(num){
case 1: content='Esta partida es un empate';
break;
case 2: content=' Tu UroPediatra ganó esta partida.';
break;
case 3: content='Ganas esta partida.';
break;
case 4: content='NIVEL: '+level+'\n\nUroPediatra:  R/Nivel- '+pcwins[level]+'  (Total: '+(pcwins[0]+pcwins[1]+pcwins[2]+pcwins[3])+')\nInvitado  :  R/Nivel- '+playerwins[level]+'  (Total: '+(playerwins[0]+playerwins[1]+playerwins[2]+playerwins[3])+')\nEmpates        :  R/Nivel- '+draws[level]+'  (Total: '+(draws[0]+draws[1]+draws[2]+draws[3])+')';
break;
}

document.scores.scores2.value=content

if(num&lt;4)setTimeout('init(4)',1000);
}

function setlevel(x){
	if (level!=x){
		level=x;
		init();
}}

function setbutton(cellnum){
if (!iswon){ 			// Thanks to Roger for finding this Bug !!!
if(moves[cellnum]==0){
document.images['rc'+cellnum].src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/ex.gif";
document.images['rc'+cellnum].alt=" X ";
moves[cellnum]=1;
game[done]=cellnum;
done++;
findwinner(true);
}else alert('Sin trampas...Este lugar yá es mio.!');
}}

function pcstrategy(istowin){
if (level&gt;0){
var str=(istowin)? 2 : 1;
for(n=1;n&lt;=8;n++){
if((moves[ways[n][1]]==str) &amp;&amp; (moves[ways[n][2]]==str) &amp;&amp; (moves[ways[n][3]]==0)) tmp=ways[n][3];
if((moves[ways[n][1]]==str) &amp;&amp; (moves[ways[n][3]]==str) &amp;&amp; (moves[ways[n][2]]==0)) tmp=ways[n][2];
if((moves[ways[n][2]]==str) &amp;&amp; (moves[ways[n][3]]==str) &amp;&amp; (moves[ways[n][1]]==0)) tmp=ways[n][1];
}}}


function selecCorner(which){
if (which=="empty"){
do{
tmp=corners[Math.floor(Math.random()*4)];
}while(moves[tmp]!=0);
}
else
tmp=corners[Math.floor(Math.random()*4)];
}


function pcdontlose(){
if (!playerstarts){
if (done==0){
tmp=choices[2*Math.floor(Math.random()*5)];
if (tmp==22) myway=1;
else myway=2;
}
else if (done==2){
if (myway==1){
if (game[1]==11 || game[1]==13 || game[1]==31 || game[1]==33)
tmp=44-game[1];	
else{
dlta=22-game[1];
op0=22+dlta+(10/dlta);
op1=22+dlta-(10/dlta);
tmp=eval("op"+Math.floor(Math.random()*2));
}}
else if (myway==2){
if (game[1]==22){
tmp=44-game[0];
myway=21;
}
else if (game[1]==11 || game[1]==13 || game[1]==31 || game[1]==33){
selecCorner("empty");
myway=22;
}
else{
tmp=22;
myway=23;
}}}
else if (done==4){
if (myway==22){
for (i=0; i&lt;4 ;i++){            
if (moves[corners[i]]==0){
tmp=corners[i];
}}}
else if (myway==23){
dlta=game[1]-game[0];
op0=44-(game[1]+dlta);
op1=(op0+game[0])/2;
tmp=eval("op"+Math.floor(Math.random()*2));
}
else if (myway==1)
tmp=44+game[2]-(2*game[3]);
}}
else if (level==3){
if (done==1){
if (game[0]==11 || game[0]==13 || game[0]==31 || game[0]==33){
tmp=22;
myway=1;
}
else if (game[0]==22){
selecCorner("any");
myway=2;
}
else{
tmp=22;
myway=3;
}}
else if (done==3){
if (myway==1){
if (game[2]==44-game[0])
tmp=choices[1+(2*Math.floor(Math.random()*4))];
else
tmp=44-game[0]
}
else if (myway==2){
if (game[2]==44-game[1])
selecCorner("empty");
}
else if (myway==3){
if (game[2]==11 || game[2]==13 || game[2]==31 || game[2]==33)
tmp=44-game[2];
if (game[2]==44-game[0]){
dlta=22-game[2];
tmp=22+(10/dlta);
mynextmove=tmp+dlta;
}
else{
dlta=22-game[0];
op0=game[0]+(10/dlta);	
op1=game[0]-(10/dlta);	
op2=game[2]+dlta;	
tmp=eval("op"+Math.floor(Math.random()*3));
}}}
else if (done==5 &amp;&amp; myway==3){
tmp=mynextmove;
}}}


function findwinner(isplayer){
me=(isplayer)? 1 : 2;
for(n=1;n&lt;=8;n++){
if( (moves[ways[n][1]]==me) &amp;&amp; (moves[ways[n][2]]==me) &amp;&amp; (moves[ways[n][3]]==me) ){
iswon=true;
break;
}}
if(iswon){
if(isplayer){
playerwins[level]++;
playerstarts=true;
writetext(3);
}else{
pcwins[level]++;
playerstarts=false;
writetext(2);
}}else{
if(done&gt;8){
draws[level]++;
playerstarts=!playerstarts;
writetext(1);
}else if(isplayer) pcturn();
}}

function pcrandom(){
do{
tmp=choices[Math.floor(Math.random()*9)];
}while(moves[tmp]!=0);
}

function pcturn(){
tmp='00';
pcstrategy(true);
if(tmp=='00')pcstrategy(false);
if(tmp=='00' &amp;&amp; level&gt;1)
	pcdontlose();
if(tmp=='00')
	pcrandom();
moves[tmp]=2;
game[done]=tmp;
document.images['rc'+tmp].src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/up-oh.gif";
document.images['rc'+tmp].alt=" O ";
done++;
findwinner(false);
}

window.onload=init;

window.onresize=function(){
  if(ns4)setTimeout('history.go(0)',400);
}


&lt;/script&gt;

&lt;div style="position:fixed; top:10px; left:50px;"&gt;
&lt;h1&gt;&lt;font color="#0000FF"&gt;Tic&lt;/font&gt; &lt;font color="#DF0101"&gt;Tac&lt;/font&gt;&lt;/h1&gt;
&lt;table cellpadding="0" cellspacing="0" border="5" bgcolor="white"&gt;
&lt;tr&gt; &lt;td width="60"&gt;&lt;a href="javascript:setbutton(11)"&gt;&lt;img src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/nothing.gif" alt="" border="0" name="rc11"&gt;&lt;/a&gt;&lt;/td&gt; &lt;td width="60"&gt;&lt;a href="javascript:setbutton(12)"&gt;&lt;img src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/nothing.gif" alt="" border="0" name="rc12"&gt;&lt;/a&gt;&lt;/td&gt; &lt;td width="60"&gt;&lt;a href="javascript:setbutton(13)"&gt;&lt;img src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/nothing.gif" alt="" border="0" name="rc13"&gt;&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td width="60"&gt;&lt;a href="javascript:setbutton(21)"&gt;&lt;img src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/nothing.gif" alt="" border="0" name="rc21"&gt;&lt;/a&gt;&lt;/td&gt; &lt;td width="60"&gt;&lt;a href="javascript:setbutton(22)"&gt;&lt;img src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/nothing.gif" alt="" border="0" name="rc22"&gt;&lt;/a&gt;&lt;/td&gt; &lt;td width="60"&gt;&lt;a href="javascript:setbutton(23)"&gt;&lt;img src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/nothing.gif" alt="" border="0" name="rc23"&gt;&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td width="60"&gt;&lt;a href="javascript:setbutton(31)"&gt;&lt;img src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/nothing.gif" alt="" border="0" name="rc31"&gt;&lt;/a&gt;&lt;/td&gt; &lt;td width="60"&gt;&lt;a href="javascript:setbutton(32)"&gt;&lt;img src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/nothing.gif" alt="" border="0" name="rc32"&gt;&lt;/a&gt;&lt;/td&gt; &lt;td width="60"&gt;&lt;a href="javascript:setbutton(33)"&gt;&lt;img src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/nothing.gif" alt="" border="0" name="rc33"&gt;&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="position:fixed; top:300px; left:0px;"&gt;
&lt;form action="" name="scores"&gt;
&lt;textarea name="scores2" cols="43" rows="6" &gt;&lt;/textarea&gt;&lt;br&gt;
&lt;input type="radio" name="level"  onclick="setlevel(0)"&gt;Nivel 0 
&lt;input type="radio" name="level"  onclick="setlevel(1)"&gt;Nivel 1 
&lt;input type="radio" name="level"  onclick="setlevel(2)"&gt;Nivel 2 
&lt;input type="radio" name="level"  onclick="setlevel(3)" checked&gt;Nivel 3&lt;br&gt; 
&lt;/form&gt;
&lt;/div&gt;
&lt;div style="position:fixed; top:435px; left:75px;"&gt;
&lt;a href="http://www.uropediatra-online.com"&gt;&lt;img src="http://www.uropediatra-online.com/files/Imagenes%20TICTAC/By%20UroPed.png" width="130" height="38" /&gt;&lt;/a&gt;
&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/08/tictac.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-8334258597161455816</guid><pubDate>Thu, 15 Jun 2017 01:59:00 +0000</pubDate><atom:updated>2017-06-14T22:25:54.424-05:00</atom:updated><title>Calendario SIUP</title><description>&lt;style type="text/css"&gt;
#calendario { border: 0px double black ; max-width: 300px; 
              background-color:#ffffff; text-align: center; }
#anterior { float: left; width: 100px; font: bold 8pt arial; padding: 0.5em 0.1em; cursor: pointer ; }
#posterior { float: right; width: 100px; font: bold 8pt arial; padding: 0.5em 0.1em; cursor: pointer ;}
#anterior:hover {color: green;text-decoration: underline;}
#posterior:hover {color: green; text-decoration: underline;}
#titulos { font: normal 7pt "arial black"; padding: 0.2em; }
#diasc { border: 0px solid black; border-collapse: separate; border-spacing: 4px; }
#diasc th,#diasc td { font: normal 10pt arial; width: 40px; height: 20px; }
#diasc th { color: #ffffff; background-color: #088A08 }
#diasc td { color: #088A08; background-color: #31B404 }
#fechaactual { font: bold 10pt arial; padding: 0.4em }
#fechaactual i { cursor: pointer ; }
#fechaactual i:hover { color: green; text-decoration: underline; }
#buscafecha { background-color: #088A08; color: #ffffff; padding: 5px }
#buscafecha select,#buscafecha input  { background-color: #31B404; color: #000000; font: bold 8pt arial;  }
#buscafecha [type=text]  { text-align: center; }
#buscafecha  [type=button] { cursor: pointer; }

&lt;/style&gt;&lt;br /&gt;
&lt;script type="text/javascript"&gt;
//Arrays de datos:
meses=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];
lasemana=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]
diassemana=["Lun","Mar","Mié","Jue","Vie","Sáb","Dom"];
//Tras cargarse la página ...
window.onload = function() {
//fecha actual
hoy=new Date(); //objeto fecha actual
diasemhoy=hoy.getDay(); //dia semana actual
diahoy=hoy.getDate(); //dia mes actual
meshoy=hoy.getMonth(); //mes actual
annohoy=hoy.getFullYear(); //año actual

// Elementos del DOM: en cabecera de calendario 
tit=document.getElementById("titulos"); //cabecera del calendario
ant=document.getElementById("anterior");
pos=document.getElementById("posterior");
// Elementos del DOM en primera fila
f0=document.getElementById("fila0");

// Definir elementos iniciales:
mescal = meshoy; //mes principal
annocal = annohoy //año principal




//primera línea de tabla: días de la semana.
function primeralinea() {
     for (i=0;i&lt;7;i++) {
        celda0=f0.getElementsByTagName("th")[i];
        celda0.innerHTML=diassemana[i]
        }
     }   
//iniciar calendario:
cabecera() 
primeralinea()
escribirdias()

//Pie de calendario
pie=document.getElementById("fechaactual");
pie.innerHTML+=lasemana[diasemhoy]+", "+diahoy+" de "+meses[meshoy]+" de "+annohoy;
//formulario: datos iniciales:
document.buscar.buscaanno.value=annohoy;



}


//FUNCIONES de creación del calendario:
//cabecera del calendario
function cabecera() {
     tit.innerHTML=meses[mescal]+" de "+annocal;
     mesant=mescal-1; //mes anterior
     mespos=mescal+1; //mes posterior
     if (mesant&lt;0) {mesant=11;}
     if (mespos&gt;11) {mespos=0;}
     ant.innerHTML=meses[mesant]
     pos.innerHTML=meses[mespos]
     }
//rellenar celdas con los días
function escribirdias() {
     //Buscar dia de la semana del dia 1 del mes:
     primeromes=new Date(annocal,mescal,"1") //buscar primer día del mes
     prsem=primeromes.getDay() //buscar día de la semana del día 1
     prsem--; //adaptar al calendario español (empezar por lunes)
     if (prsem==-1) {prsem=6;}
     //buscar fecha para primera celda:
     diaprmes=primeromes.getDate() 
     prcelda=diaprmes-prsem; //restar días que sobran de la semana
     empezar=primeromes.setDate(prcelda) //empezar= nº del tiempo UNIX, 1ª celda
     diames=new Date() //convertir en fecha
     diames.setTime(empezar); //diames=fecha primera celda.
     //escribir las fechas:
     for (i=1;i&lt;7;i++) { //localizar fila
        fila=document.getElementById("fila"+i);
        for (j=0;j&lt;7;j++) {
          midia=diames.getDate() 
         mimes=diames.getMonth()
         mianno=diames.getFullYear()
         celda=fila.getElementsByTagName("td")[j];
         celda.innerHTML=midia;
         celda.style.backgroundColor="#31B404";
         celda.style.color="#000000";
         //domingos en rojo
         if (j==6) { 
            celda.style.color="#f11445";
                    }
                 //dias restantes del mes en gris 
                 if (mimes!=mescal) { 
            celda.style.color="#a0babc";
           }
         //destacar la fecha actual
         if (mimes==meshoy &amp;&amp; midia==diahoy &amp;&amp; mianno==annohoy ) { 
             celda.style.backgroundColor="#ffffff";
            celda.innerHTML="&lt;cite title='Fecha Actual'&gt;"+midia+"&lt;/cite&gt;";
            }
         //pasar al siguiente día
        midia=midia+1;
        diames.setDate(midia);
        
        
        }
      }
     }

function mesantes() {
     nuevomes=new Date()
     primeromes--;
     nuevomes.setTime(primeromes)
     mescal=nuevomes.getMonth()
     annocal=nuevomes.getFullYear()
     cabecera()
     escribirdias()
     }
function mesdespues() {
     nuevomes=new Date()
     tiempounix=primeromes.getTime()
     tiempounix=tiempounix+(45*24*60*60*1000)
     nuevomes.setTime(tiempounix)
     mescal=nuevomes.getMonth()
     annocal=nuevomes.getFullYear()
     cabecera()
     escribirdias()
     }
function actualizar() {
     mescal=hoy.getMonth();
     annocal=hoy.getFullYear(); 
     cabecera()
     escribirdias()
     }    
function mifecha() {
     mianno=document.buscar.buscaanno.value;
     listameses=document.buscar.buscames;
     opciones=listameses.options;
     num=listameses.selectedIndex
     mimes=opciones[num].value;
     if (isNaN(mianno) || mianno&lt;1) {
       alert("El año no es válido:\n debe ser un número no negativo")
      }
     else {
        mife=new Date();
        mife.setMonth(mimes);
        mife.setFullYear(mianno);
        mescal=mife.getMonth();
        annocal=mife.getFullYear();
        cabecera()
        escribirdias()
       }
     }


  


&lt;/script&gt;

&lt;div style="position:fixed; top:0px; left:0px;"&gt;
&lt;div id="calendario"&gt;
&lt;!--&lt;div id="calendario"&gt;
 --&gt;
&lt;div id="anterior" onclick="mesantes()"&gt;
&lt;/div&gt;&lt;div id="posterior" onclick="mesdespues()"&gt;
&lt;/div&gt;&lt;h2 id="titulos"&gt;
&lt;/h2&gt;&lt;table id="diasc"&gt;
&lt;tr id="fila0"&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr id="fila1"&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr id="fila2"&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr id="fila3"&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr id="fila4"&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr id="fila5"&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr id="fila6"&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;div id="fechaactual"&gt;
&lt;i onclick="actualizar()"&gt;Hoy es: &lt;/i&gt;&lt;/div&gt;&lt;div id="buscafecha"&gt;
&lt;form action="#" name="buscar"&gt;
&lt;p&gt;
Ir...a:
&lt;select name="buscames"&gt;
 &lt;option value="0"&gt;Enero&lt;/option&gt;
 &lt;option value="1"&gt;Febrero&lt;/option&gt;
 &lt;option value="2"&gt;Marzo&lt;/option&gt;
 &lt;option value="3"&gt;Abril&lt;/option&gt;
 &lt;option value="4"&gt;Mayo&lt;/option&gt;
 &lt;option value="5"&gt;Junio&lt;/option&gt;
 &lt;option value="6"&gt;Julio&lt;/option&gt;
 &lt;option value="7"&gt;Agosto&lt;/option&gt;
 &lt;option value="8"&gt;Septiembre&lt;/option&gt;
 &lt;option value="9"&gt;Octubre&lt;/option&gt;
 &lt;option value="10"&gt;Noviembre&lt;/option&gt;
 &lt;option value="11"&gt;Diciembre&lt;/option&gt;
&lt;/select&gt;
del
&lt;input type="text" name="buscaanno" maxlength="4" size="4" /&gt;
... 
&lt;input type="button" value="BUSCAR" onclick="mifecha()" /&gt;

&lt;/p&gt;&lt;/form&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/calendario-siup.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-5506891697282212173</guid><pubDate>Sat, 10 Jun 2017 09:01:00 +0000</pubDate><atom:updated>2017-06-11T21:40:14.618-05:00</atom:updated><title>Caja de UroNoticas</title><description>&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;&lt;br /&gt;
&lt;link href="http://www.uropediatra-online.com/files/Twitter%20Grupal/apple-touch-icon.png.png" rel="apple-touch-icon"/&gt;&lt;br /&gt;
&lt;link rel="SHORTCUT ICON" type="image/x-icon" href="http://www.uropediatra-online.com/files/Grupo%20UP-Herramientas/Androide-iPhoneIcon_Medium-72x72.png"&gt;&lt;br /&gt;
&lt;link href=”css/movil.css” rel=”stylesheet” type=”text/css” media=”handheld, only screen and (max-device-width: 480px)” /&gt;&lt;br /&gt;
&lt;link href=”css/escritorio.css” rel=”stylesheet” type=”text/css” media=”screen and (min-width: 481px)” /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="position:fixed; top:15px; left:15px;"&gt;&lt;div align=center&gt;&lt;div style="height:500px;"&gt;&lt;iframe style='overflow:hidden;width:95%;height:85%;' frameborder='0' border='0' src="http://chat.zoho.com/shout.sas?k=%7B%22g%22%3A%22Anonymous%22%2C%22c%22%3A%22d284c45b46972075469e57131f1bf9ed5d5a5a78a44c37e5%22%2C%22o%22%3A%220d21665669a92a9f%22%7D&amp;chaturl=UroChat&amp;V=000000-70a9e1-eff4f9-70a9e1-Twitter%20del%20Grupo%20UP%20online"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/caja-de-uronoticas.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-6506024572261472005</guid><pubDate>Thu, 08 Jun 2017 01:18:00 +0000</pubDate><atom:updated>2017-06-07T20:18:12.183-05:00</atom:updated><title>Ir a Convertidor Fr en mm</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;&lt;br /&gt;
&lt;link href=”css/movil.css” rel=”stylesheet” type=”text/css” media=”handheld, only screen and (max-device-width: 480px)” /&gt;&lt;br /&gt;
&lt;link href=”css/escritorio.css” rel=”stylesheet” type=”text/css” media=”screen and (min-width: 481px)” /&gt;&lt;br /&gt;
&lt;meta http-equiv="Refresh" content="10;URL=http://www.uropediatra-online.com/convertir-de-fr-a-mm-y-de-mm-a-fr.html"&gt;&lt;br /&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
 alert("NO TOQUE NADA y espere unos cuantos segundos mientras nos alistamos para atenderlo y se organizan nuestras calculadoras. Su anfitrión: UroPediatra de profesión y WebMaster aficionado de todo corazón, le da la Bienvenida y le solicita informar al correo uropediatra@gmail.com, cualquier error o mal funcionamiento que se presente en esta página. Pulse Aceptar para empezar.");
&lt;/script&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;  
 body  
 {  
  background: #000;  
  overflow: hidden; /* Evita la barra de desplazamiento */  
  line-height: 15px; /* Acorta la distancia vertical de caracteres */  
  font-size: 14px;  
 }  
 div.cadena  
 {  
  position: absolute; /* Para poder posicionar en 'x' y 'y' */  
  color: #0f0;  
  text-align: center;  
  width: 10px; /* Forza los caracteres a irse a otra línea */  
  overflow: visible; /* Para que la cadena no se coma los carateres */  
  font-family: 'Courier New'; /* Fuente más o menos ad hoc a matrix */  
 }  
&lt;/style&gt;  &lt;br /&gt;
&lt;script&gt;  
 // Cuántas cadenas se van a mostrar al mismo tiempo  
 var NUMERO_CADENAS   = 70;  
 // Cuántos caracteres contendrá cada cadena  
 var TAMANO_CADENA    = 25;  
 // Máxima cantidad de píxeles que una cadena puede  
 // recorrer en cada ciclo de la animación.  
 var VELOCIDAD_MAXIMA = 100;  
 // Aquí se almacenarán todas las cadenas existentes  
 var cadenas = new Array(NUMERO_CADENAS);  
   
 window.onload = function()  
 {    
  // Crear 'n' número de cadenas basado  
  // en la variable NUMERO_CADENAS.  
  for( var i = 0; i &lt; NUMERO_CADENAS; i++ )  
  {  
   var divCadena = document.createElement('div');  
   // Ponerle la clase tomada desde la hoja de estilos  
   divCadena.className = 'cadena';  
   // Aplicar la cadena aleatoria al objeto  
   divCadena.innerHTML = generarCadenaAleatoria();  
     
   // Lo agregamos al arreglo principal de cadenas  
   cadenas[i] = divCadena;  
     
   // Y finalmente al "plano de gráficos"  
   document.body.appendChild( cadenas[i] );  
     
   // Posicionar el elemento  
   prepararCadena(divCadena);  
  }  
    
  // Iniciar la animación  
  animar();  
 }  
   
 function animar()  
 {  
  var c;  
  for( var i = 0; i &lt; cadenas.length; i++ )  
  {  
   c = cadenas[i];  
     
   // Incrementamos la posición vertical de  
   // acuerdo a la velocida de la cadena.  
   c.style.top = (c.offsetTop + c.velocidad) + 'px';  
     
   // Al final de cada movimiento, verificamos si  
   // la cadena se fue más abajo de lo alto del body,  
   // si es así, volvemos a definir sus posiciones.  
   if( c.offsetTop &gt; window.innerHeight )  
    prepararCadena(c);  
  }  
    
  // Repetir el proceso  
  setTimeout('animar();', 50);  
 }  
   
 function prepararCadena(cad)  
 {  
  // La velocidad será un número aleatorio, tomando  
  // como límite el valor de VELOCIDAD_MAXIMA.  
  // Le vamos a sumar 1 al resultado, de esta manera  
  // evitamos que la velocidad sea 0.  
  cad.velocidad = Math.round( Math.random() * VELOCIDAD_MAXIMA ) + 1;  
    
  // El color puede ser una variante de verde, para eso  
  // utilizamos un tipo de color RGB (según el estándar CSS),  
  // solo cambiando el G por un número aleatorio, tomando  
  // como máximo el 255 (no se puede más).  
  cad.style.color = 'rgb(0,'+( Math.round(Math.random()*255) )+',0)';  
    
  // Aquí simplemente definimos la posición horizontal  
  // sin pasar del límite de tamaño de la página.  
  cad.style.left = Math.round(Math.random() * document.body.offsetWidth) + 'px';  
    
  // Y colocamos la cadena antes del píxel 0, así no  
  // la podremos en primaria instancia.  
  cad.style.top  = (-cad.offsetHeight) + 'px';  
 }  
   
 function generarCadenaAleatoria()  
 {  
  var strCadena = '';  
  var intLetra  =  0;  
  for( var i = 0; i &lt; TAMANO_CADENA; i++ )  
  {  
   // Calcular un código ASCII aleatorio.  
   intLetra = Math.round(Math.random() * 27) + 65;  
   // Convertir el código ASCII a caracter de cadena.  
   strCadena += String.fromCharCode(intLetra) + ' ';  
  }  
    
  return strCadena;  
 }  
   
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
 //setInterval
 var cronometro;
 setTimeout('carga_Timer()', 0)

 function carga_Timer()
 {
  contador_s =0;
  contador_m =0;
  s = document.getElementById("segundos");
  m = document.getElementById("minutos");

  cronometro = setInterval(
   function(){
    if(contador_s==60)
    {
     contador_s=0;
     contador_m++;
     m.innerHTML = contador_m;

     if(contador_m==60)
     {
      contador_m=0;
     }
    }

    s.innerHTML = contador_s;
    contador_s++;

   }
   ,1000);

 }

&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
#segundos {
color: #DF0101;
}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="display: block; position:relative; width:256px; height:331px; margin: 0px auto; text-align: center; background:url(http://www.uropediatra-online.com/files/Herramientas/Calculadora%20al%20Cargar.png);"&gt;&lt;div style="position:absolute; top:36px; left:123px;"&gt;&lt;form&gt;&lt;span id="minutos"&gt;&lt;font color="#DF0101"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&lt;span id="segundos"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;/form&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/ir-convertidor-fr-en-mm.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-8576870923982176550</guid><pubDate>Thu, 08 Jun 2017 01:15:00 +0000</pubDate><atom:updated>2017-06-07T20:15:07.985-05:00</atom:updated><title>Ir a IVU en RVU</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;&lt;br /&gt;
&lt;link href=”css/movil.css” rel=”stylesheet” type=”text/css” media=”handheld, only screen and (max-device-width: 480px)” /&gt;&lt;br /&gt;
&lt;link href=”css/escritorio.css” rel=”stylesheet” type=”text/css” media=”screen and (min-width: 481px)” /&gt;&lt;br /&gt;
&lt;meta http-equiv="Refresh" content="10;URL=http://www.uropediatra-online.com/probabilidad-de-ivu-en-rvu.html"&gt;&lt;br /&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
 alert("NO TOQUE NADA y espere unos cuantos segundos mientras nos alistamos para atenderlo y se organizan nuestras calculadoras. Su anfitrión: UroPediatra de profesión y WebMaster aficionado de todo corazón, le da la Bienvenida y le solicita informar al correo uropediatra@gmail.com, cualquier error o mal funcionamiento que se presente en esta página. Pulse Aceptar para empezar.");
&lt;/script&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;  
 body  
 {  
  background: #000;  
  overflow: hidden; /* Evita la barra de desplazamiento */  
  line-height: 15px; /* Acorta la distancia vertical de caracteres */  
  font-size: 14px;  
 }  
 div.cadena  
 {  
  position: absolute; /* Para poder posicionar en 'x' y 'y' */  
  color: #0f0;  
  text-align: center;  
  width: 10px; /* Forza los caracteres a irse a otra línea */  
  overflow: visible; /* Para que la cadena no se coma los carateres */  
  font-family: 'Courier New'; /* Fuente más o menos ad hoc a matrix */  
 }  
&lt;/style&gt;  &lt;br /&gt;
&lt;script&gt;  
 // Cuántas cadenas se van a mostrar al mismo tiempo  
 var NUMERO_CADENAS   = 70;  
 // Cuántos caracteres contendrá cada cadena  
 var TAMANO_CADENA    = 25;  
 // Máxima cantidad de píxeles que una cadena puede  
 // recorrer en cada ciclo de la animación.  
 var VELOCIDAD_MAXIMA = 100;  
 // Aquí se almacenarán todas las cadenas existentes  
 var cadenas = new Array(NUMERO_CADENAS);  
   
 window.onload = function()  
 {    
  // Crear 'n' número de cadenas basado  
  // en la variable NUMERO_CADENAS.  
  for( var i = 0; i &lt; NUMERO_CADENAS; i++ )  
  {  
   var divCadena = document.createElement('div');  
   // Ponerle la clase tomada desde la hoja de estilos  
   divCadena.className = 'cadena';  
   // Aplicar la cadena aleatoria al objeto  
   divCadena.innerHTML = generarCadenaAleatoria();  
     
   // Lo agregamos al arreglo principal de cadenas  
   cadenas[i] = divCadena;  
     
   // Y finalmente al "plano de gráficos"  
   document.body.appendChild( cadenas[i] );  
     
   // Posicionar el elemento  
   prepararCadena(divCadena);  
  }  
    
  // Iniciar la animación  
  animar();  
 }  
   
 function animar()  
 {  
  var c;  
  for( var i = 0; i &lt; cadenas.length; i++ )  
  {  
   c = cadenas[i];  
     
   // Incrementamos la posición vertical de  
   // acuerdo a la velocida de la cadena.  
   c.style.top = (c.offsetTop + c.velocidad) + 'px';  
     
   // Al final de cada movimiento, verificamos si  
   // la cadena se fue más abajo de lo alto del body,  
   // si es así, volvemos a definir sus posiciones.  
   if( c.offsetTop &gt; window.innerHeight )  
    prepararCadena(c);  
  }  
    
  // Repetir el proceso  
  setTimeout('animar();', 50);  
 }  
   
 function prepararCadena(cad)  
 {  
  // La velocidad será un número aleatorio, tomando  
  // como límite el valor de VELOCIDAD_MAXIMA.  
  // Le vamos a sumar 1 al resultado, de esta manera  
  // evitamos que la velocidad sea 0.  
  cad.velocidad = Math.round( Math.random() * VELOCIDAD_MAXIMA ) + 1;  
    
  // El color puede ser una variante de verde, para eso  
  // utilizamos un tipo de color RGB (según el estándar CSS),  
  // solo cambiando el G por un número aleatorio, tomando  
  // como máximo el 255 (no se puede más).  
  cad.style.color = 'rgb(0,'+( Math.round(Math.random()*255) )+',0)';  
    
  // Aquí simplemente definimos la posición horizontal  
  // sin pasar del límite de tamaño de la página.  
  cad.style.left = Math.round(Math.random() * document.body.offsetWidth) + 'px';  
    
  // Y colocamos la cadena antes del píxel 0, así no  
  // la podremos en primaria instancia.  
  cad.style.top  = (-cad.offsetHeight) + 'px';  
 }  
   
 function generarCadenaAleatoria()  
 {  
  var strCadena = '';  
  var intLetra  =  0;  
  for( var i = 0; i &lt; TAMANO_CADENA; i++ )  
  {  
   // Calcular un código ASCII aleatorio.  
   intLetra = Math.round(Math.random() * 27) + 65;  
   // Convertir el código ASCII a caracter de cadena.  
   strCadena += String.fromCharCode(intLetra) + ' ';  
  }  
    
  return strCadena;  
 }  
   
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
 //setInterval
 var cronometro;
 setTimeout('carga_Timer()', 0)

 function carga_Timer()
 {
  contador_s =0;
  contador_m =0;
  s = document.getElementById("segundos");
  m = document.getElementById("minutos");

  cronometro = setInterval(
   function(){
    if(contador_s==60)
    {
     contador_s=0;
     contador_m++;
     m.innerHTML = contador_m;

     if(contador_m==60)
     {
      contador_m=0;
     }
    }

    s.innerHTML = contador_s;
    contador_s++;

   }
   ,1000);

 }

&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
#segundos {
color: #DF0101;
}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="display: block; position:relative; width:256px; height:331px; margin: 0px auto; text-align: center; background:url(http://www.uropediatra-online.com/files/Herramientas/Calculadora%20al%20Cargar.png);"&gt;&lt;div style="position:absolute; top:36px; left:123px;"&gt;&lt;form&gt;&lt;span id="minutos"&gt;&lt;font color="#DF0101"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&lt;span id="segundos"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;/form&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/ir-ivu-en-rvu.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-2345680764894632536</guid><pubDate>Thu, 08 Jun 2017 01:11:00 +0000</pubDate><atom:updated>2017-06-07T20:11:24.946-05:00</atom:updated><title>Ir al Indice de Hodson</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;&lt;br /&gt;
&lt;link href=”css/movil.css” rel=”stylesheet” type=”text/css” media=”handheld, only screen and (max-device-width: 480px)” /&gt;&lt;br /&gt;
&lt;link href=”css/escritorio.css” rel=”stylesheet” type=”text/css” media=”screen and (min-width: 481px)” /&gt;&lt;br /&gt;
&lt;meta http-equiv="Refresh" content="10;URL=http://www.uropediatra-online.com/indice-de-hipoplasia-renal.html"&gt;&lt;br /&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
 alert("NO TOQUE NADA y espere unos cuantos segundos mientras nos alistamos para atenderlo y se organizan nuestras calculadoras. Su anfitrión: UroPediatra de profesión y WebMaster aficionado de todo corazón, le da la Bienvenida y le solicita informar al correo uropediatra@gmail.com, cualquier error o mal funcionamiento que se presente en esta página. Pulse Aceptar para empezar.");
&lt;/script&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;  
 body  
 {  
  background: #000;  
  overflow: hidden; /* Evita la barra de desplazamiento */  
  line-height: 15px; /* Acorta la distancia vertical de caracteres */  
  font-size: 14px;  
 }  
 div.cadena  
 {  
  position: absolute; /* Para poder posicionar en 'x' y 'y' */  
  color: #0f0;  
  text-align: center;  
  width: 10px; /* Forza los caracteres a irse a otra línea */  
  overflow: visible; /* Para que la cadena no se coma los carateres */  
  font-family: 'Courier New'; /* Fuente más o menos ad hoc a matrix */  
 }  
&lt;/style&gt;  &lt;br /&gt;
&lt;script&gt;  
 // Cuántas cadenas se van a mostrar al mismo tiempo  
 var NUMERO_CADENAS   = 70;  
 // Cuántos caracteres contendrá cada cadena  
 var TAMANO_CADENA    = 25;  
 // Máxima cantidad de píxeles que una cadena puede  
 // recorrer en cada ciclo de la animación.  
 var VELOCIDAD_MAXIMA = 100;  
 // Aquí se almacenarán todas las cadenas existentes  
 var cadenas = new Array(NUMERO_CADENAS);  
   
 window.onload = function()  
 {    
  // Crear 'n' número de cadenas basado  
  // en la variable NUMERO_CADENAS.  
  for( var i = 0; i &lt; NUMERO_CADENAS; i++ )  
  {  
   var divCadena = document.createElement('div');  
   // Ponerle la clase tomada desde la hoja de estilos  
   divCadena.className = 'cadena';  
   // Aplicar la cadena aleatoria al objeto  
   divCadena.innerHTML = generarCadenaAleatoria();  
     
   // Lo agregamos al arreglo principal de cadenas  
   cadenas[i] = divCadena;  
     
   // Y finalmente al "plano de gráficos"  
   document.body.appendChild( cadenas[i] );  
     
   // Posicionar el elemento  
   prepararCadena(divCadena);  
  }  
    
  // Iniciar la animación  
  animar();  
 }  
   
 function animar()  
 {  
  var c;  
  for( var i = 0; i &lt; cadenas.length; i++ )  
  {  
   c = cadenas[i];  
     
   // Incrementamos la posición vertical de  
   // acuerdo a la velocida de la cadena.  
   c.style.top = (c.offsetTop + c.velocidad) + 'px';  
     
   // Al final de cada movimiento, verificamos si  
   // la cadena se fue más abajo de lo alto del body,  
   // si es así, volvemos a definir sus posiciones.  
   if( c.offsetTop &gt; window.innerHeight )  
    prepararCadena(c);  
  }  
    
  // Repetir el proceso  
  setTimeout('animar();', 50);  
 }  
   
 function prepararCadena(cad)  
 {  
  // La velocidad será un número aleatorio, tomando  
  // como límite el valor de VELOCIDAD_MAXIMA.  
  // Le vamos a sumar 1 al resultado, de esta manera  
  // evitamos que la velocidad sea 0.  
  cad.velocidad = Math.round( Math.random() * VELOCIDAD_MAXIMA ) + 1;  
    
  // El color puede ser una variante de verde, para eso  
  // utilizamos un tipo de color RGB (según el estándar CSS),  
  // solo cambiando el G por un número aleatorio, tomando  
  // como máximo el 255 (no se puede más).  
  cad.style.color = 'rgb(0,'+( Math.round(Math.random()*255) )+',0)';  
    
  // Aquí simplemente definimos la posición horizontal  
  // sin pasar del límite de tamaño de la página.  
  cad.style.left = Math.round(Math.random() * document.body.offsetWidth) + 'px';  
    
  // Y colocamos la cadena antes del píxel 0, así no  
  // la podremos en primaria instancia.  
  cad.style.top  = (-cad.offsetHeight) + 'px';  
 }  
   
 function generarCadenaAleatoria()  
 {  
  var strCadena = '';  
  var intLetra  =  0;  
  for( var i = 0; i &lt; TAMANO_CADENA; i++ )  
  {  
   // Calcular un código ASCII aleatorio.  
   intLetra = Math.round(Math.random() * 27) + 65;  
   // Convertir el código ASCII a caracter de cadena.  
   strCadena += String.fromCharCode(intLetra) + ' ';  
  }  
    
  return strCadena;  
 }  
   
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
 //setInterval
 var cronometro;
 setTimeout('carga_Timer()', 0)

 function carga_Timer()
 {
  contador_s =0;
  contador_m =0;
  s = document.getElementById("segundos");
  m = document.getElementById("minutos");

  cronometro = setInterval(
   function(){
    if(contador_s==60)
    {
     contador_s=0;
     contador_m++;
     m.innerHTML = contador_m;

     if(contador_m==60)
     {
      contador_m=0;
     }
    }

    s.innerHTML = contador_s;
    contador_s++;

   }
   ,1000);

 }

&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
#segundos {
color: #DF0101;
}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="display: block; position:relative; width:256px; height:331px; margin: 0px auto; text-align: center; background:url(http://www.uropediatra-online.com/files/Herramientas/Calculadora%20al%20Cargar.png);"&gt;&lt;div style="position:absolute; top:36px; left:123px;"&gt;&lt;form&gt;&lt;span id="minutos"&gt;&lt;font color="#DF0101"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&lt;span id="segundos"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;/form&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/ir-al-indice-de-hodson.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-4390433500341427662</guid><pubDate>Thu, 08 Jun 2017 01:08:00 +0000</pubDate><atom:updated>2017-06-07T20:08:31.465-05:00</atom:updated><title>Ir a Capacidad Vesical</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;&lt;br /&gt;
&lt;link href=”css/movil.css” rel=”stylesheet” type=”text/css” media=”handheld, only screen and (max-device-width: 480px)” /&gt;&lt;br /&gt;
&lt;link href=”css/escritorio.css” rel=”stylesheet” type=”text/css” media=”screen and (min-width: 481px)” /&gt;&lt;br /&gt;
&lt;meta http-equiv="Refresh" content="10;URL=http://www.uropediatra-online.com/calcular-capacidad-vesical.html"&gt;&lt;br /&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
 alert("NO TOQUE NADA y espere unos cuantos segundos mientras nos alistamos para atenderlo y se organizan nuestras calculadoras. Su anfitrión: UroPediatra de profesión y WebMaster aficionado de todo corazón, le da la Bienvenida y le solicita informar al correo uropediatra@gmail.com, cualquier error o mal funcionamiento que se presente en esta página. Pulse Aceptar para empezar.");
&lt;/script&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;  
 body  
 {  
  background: #000;  
  overflow: hidden; /* Evita la barra de desplazamiento */  
  line-height: 15px; /* Acorta la distancia vertical de caracteres */  
  font-size: 14px;  
 }  
 div.cadena  
 {  
  position: absolute; /* Para poder posicionar en 'x' y 'y' */  
  color: #0f0;  
  text-align: center;  
  width: 10px; /* Forza los caracteres a irse a otra línea */  
  overflow: visible; /* Para que la cadena no se coma los carateres */  
  font-family: 'Courier New'; /* Fuente más o menos ad hoc a matrix */  
 }  
&lt;/style&gt;  &lt;br /&gt;
&lt;script&gt;  
 // Cuántas cadenas se van a mostrar al mismo tiempo  
 var NUMERO_CADENAS   = 70;  
 // Cuántos caracteres contendrá cada cadena  
 var TAMANO_CADENA    = 25;  
 // Máxima cantidad de píxeles que una cadena puede  
 // recorrer en cada ciclo de la animación.  
 var VELOCIDAD_MAXIMA = 100;  
 // Aquí se almacenarán todas las cadenas existentes  
 var cadenas = new Array(NUMERO_CADENAS);  
   
 window.onload = function()  
 {    
  // Crear 'n' número de cadenas basado  
  // en la variable NUMERO_CADENAS.  
  for( var i = 0; i &lt; NUMERO_CADENAS; i++ )  
  {  
   var divCadena = document.createElement('div');  
   // Ponerle la clase tomada desde la hoja de estilos  
   divCadena.className = 'cadena';  
   // Aplicar la cadena aleatoria al objeto  
   divCadena.innerHTML = generarCadenaAleatoria();  
     
   // Lo agregamos al arreglo principal de cadenas  
   cadenas[i] = divCadena;  
     
   // Y finalmente al "plano de gráficos"  
   document.body.appendChild( cadenas[i] );  
     
   // Posicionar el elemento  
   prepararCadena(divCadena);  
  }  
    
  // Iniciar la animación  
  animar();  
 }  
   
 function animar()  
 {  
  var c;  
  for( var i = 0; i &lt; cadenas.length; i++ )  
  {  
   c = cadenas[i];  
     
   // Incrementamos la posición vertical de  
   // acuerdo a la velocida de la cadena.  
   c.style.top = (c.offsetTop + c.velocidad) + 'px';  
     
   // Al final de cada movimiento, verificamos si  
   // la cadena se fue más abajo de lo alto del body,  
   // si es así, volvemos a definir sus posiciones.  
   if( c.offsetTop &gt; window.innerHeight )  
    prepararCadena(c);  
  }  
    
  // Repetir el proceso  
  setTimeout('animar();', 50);  
 }  
   
 function prepararCadena(cad)  
 {  
  // La velocidad será un número aleatorio, tomando  
  // como límite el valor de VELOCIDAD_MAXIMA.  
  // Le vamos a sumar 1 al resultado, de esta manera  
  // evitamos que la velocidad sea 0.  
  cad.velocidad = Math.round( Math.random() * VELOCIDAD_MAXIMA ) + 1;  
    
  // El color puede ser una variante de verde, para eso  
  // utilizamos un tipo de color RGB (según el estándar CSS),  
  // solo cambiando el G por un número aleatorio, tomando  
  // como máximo el 255 (no se puede más).  
  cad.style.color = 'rgb(0,'+( Math.round(Math.random()*255) )+',0)';  
    
  // Aquí simplemente definimos la posición horizontal  
  // sin pasar del límite de tamaño de la página.  
  cad.style.left = Math.round(Math.random() * document.body.offsetWidth) + 'px';  
    
  // Y colocamos la cadena antes del píxel 0, así no  
  // la podremos en primaria instancia.  
  cad.style.top  = (-cad.offsetHeight) + 'px';  
 }  
   
 function generarCadenaAleatoria()  
 {  
  var strCadena = '';  
  var intLetra  =  0;  
  for( var i = 0; i &lt; TAMANO_CADENA; i++ )  
  {  
   // Calcular un código ASCII aleatorio.  
   intLetra = Math.round(Math.random() * 27) + 65;  
   // Convertir el código ASCII a caracter de cadena.  
   strCadena += String.fromCharCode(intLetra) + ' ';  
  }  
    
  return strCadena;  
 }  
   
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
 //setInterval
 var cronometro;
 setTimeout('carga_Timer()', 0)

 function carga_Timer()
 {
  contador_s =0;
  contador_m =0;
  s = document.getElementById("segundos");
  m = document.getElementById("minutos");

  cronometro = setInterval(
   function(){
    if(contador_s==60)
    {
     contador_s=0;
     contador_m++;
     m.innerHTML = contador_m;

     if(contador_m==60)
     {
      contador_m=0;
     }
    }

    s.innerHTML = contador_s;
    contador_s++;

   }
   ,1000);

 }

&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
#segundos {
color: #DF0101;
}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="display: block; position:relative; width:256px; height:331px; margin: 0px auto; text-align: center; background:url(http://www.uropediatra-online.com/files/Herramientas/Calculadora%20al%20Cargar.png);"&gt;&lt;div style="position:absolute; top:36px; left:123px;"&gt;&lt;form&gt;&lt;span id="minutos"&gt;&lt;font color="#DF0101"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&lt;span id="segundos"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;/form&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/ir-capacidad-vesical.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-8868506797285599956</guid><pubDate>Wed, 07 Jun 2017 22:22:00 +0000</pubDate><atom:updated>2017-06-07T20:03:34.387-05:00</atom:updated><title>Ir a la UroCalculadora</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;&lt;br /&gt;
&lt;link href=”css/movil.css” rel=”stylesheet” type=”text/css” media=”handheld, only screen and (max-device-width: 480px)” /&gt;&lt;br /&gt;
&lt;link href=”css/escritorio.css” rel=”stylesheet” type=”text/css” media=”screen and (min-width: 481px)” /&gt;&lt;br /&gt;
&lt;meta http-equiv="Refresh" content="10;URL=http://www.uropediatra-online.com/urocalculadora.html"&gt;&lt;br /&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
 alert("NO TOQUE NADA y espere unos cuantos segundos mientras nos alistamos para atenderlo y se organizan nuestras calculadoras. Su anfitrión: UroPediatra de profesión y WebMaster aficionado de todo corazón, le da la Bienvenida y le solicita informar al correo uropediatra@gmail.com, cualquier error o mal funcionamiento que se presente en esta página. Pulse Aceptar para empezar.");
&lt;/script&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;  
 body  
 {  
  background: #000;  
  overflow: hidden; /* Evita la barra de desplazamiento */  
  line-height: 15px; /* Acorta la distancia vertical de caracteres */  
  font-size: 14px;  
 }  
 div.cadena  
 {  
  position: absolute; /* Para poder posicionar en 'x' y 'y' */  
  color: #0f0;  
  text-align: center;  
  width: 10px; /* Forza los caracteres a irse a otra línea */  
  overflow: visible; /* Para que la cadena no se coma los carateres */  
  font-family: 'Courier New'; /* Fuente más o menos ad hoc a matrix */  
 }  
&lt;/style&gt;  &lt;br /&gt;
&lt;script&gt;  
 // Cuántas cadenas se van a mostrar al mismo tiempo  
 var NUMERO_CADENAS   = 70;  
 // Cuántos caracteres contendrá cada cadena  
 var TAMANO_CADENA    = 25;  
 // Máxima cantidad de píxeles que una cadena puede  
 // recorrer en cada ciclo de la animación.  
 var VELOCIDAD_MAXIMA = 100;  
 // Aquí se almacenarán todas las cadenas existentes  
 var cadenas = new Array(NUMERO_CADENAS);  
   
 window.onload = function()  
 {    
  // Crear 'n' número de cadenas basado  
  // en la variable NUMERO_CADENAS.  
  for( var i = 0; i &lt; NUMERO_CADENAS; i++ )  
  {  
   var divCadena = document.createElement('div');  
   // Ponerle la clase tomada desde la hoja de estilos  
   divCadena.className = 'cadena';  
   // Aplicar la cadena aleatoria al objeto  
   divCadena.innerHTML = generarCadenaAleatoria();  
     
   // Lo agregamos al arreglo principal de cadenas  
   cadenas[i] = divCadena;  
     
   // Y finalmente al "plano de gráficos"  
   document.body.appendChild( cadenas[i] );  
     
   // Posicionar el elemento  
   prepararCadena(divCadena);  
  }  
    
  // Iniciar la animación  
  animar();  
 }  
   
 function animar()  
 {  
  var c;  
  for( var i = 0; i &lt; cadenas.length; i++ )  
  {  
   c = cadenas[i];  
     
   // Incrementamos la posición vertical de  
   // acuerdo a la velocida de la cadena.  
   c.style.top = (c.offsetTop + c.velocidad) + 'px';  
     
   // Al final de cada movimiento, verificamos si  
   // la cadena se fue más abajo de lo alto del body,  
   // si es así, volvemos a definir sus posiciones.  
   if( c.offsetTop &gt; window.innerHeight )  
    prepararCadena(c);  
  }  
    
  // Repetir el proceso  
  setTimeout('animar();', 50);  
 }  
   
 function prepararCadena(cad)  
 {  
  // La velocidad será un número aleatorio, tomando  
  // como límite el valor de VELOCIDAD_MAXIMA.  
  // Le vamos a sumar 1 al resultado, de esta manera  
  // evitamos que la velocidad sea 0.  
  cad.velocidad = Math.round( Math.random() * VELOCIDAD_MAXIMA ) + 1;  
    
  // El color puede ser una variante de verde, para eso  
  // utilizamos un tipo de color RGB (según el estándar CSS),  
  // solo cambiando el G por un número aleatorio, tomando  
  // como máximo el 255 (no se puede más).  
  cad.style.color = 'rgb(0,'+( Math.round(Math.random()*255) )+',0)';  
    
  // Aquí simplemente definimos la posición horizontal  
  // sin pasar del límite de tamaño de la página.  
  cad.style.left = Math.round(Math.random() * document.body.offsetWidth) + 'px';  
    
  // Y colocamos la cadena antes del píxel 0, así no  
  // la podremos en primaria instancia.  
  cad.style.top  = (-cad.offsetHeight) + 'px';  
 }  
   
 function generarCadenaAleatoria()  
 {  
  var strCadena = '';  
  var intLetra  =  0;  
  for( var i = 0; i &lt; TAMANO_CADENA; i++ )  
  {  
   // Calcular un código ASCII aleatorio.  
   intLetra = Math.round(Math.random() * 27) + 65;  
   // Convertir el código ASCII a caracter de cadena.  
   strCadena += String.fromCharCode(intLetra) + ' ';  
  }  
    
  return strCadena;  
 }  
   
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
 //setInterval
 var cronometro;
 setTimeout('carga_Timer()', 0)

 function carga_Timer()
 {
  contador_s =0;
  contador_m =0;
  s = document.getElementById("segundos");
  m = document.getElementById("minutos");

  cronometro = setInterval(
   function(){
    if(contador_s==60)
    {
     contador_s=0;
     contador_m++;
     m.innerHTML = contador_m;

     if(contador_m==60)
     {
      contador_m=0;
     }
    }

    s.innerHTML = contador_s;
    contador_s++;

   }
   ,1000);

 }

&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
#segundos {
color: #DF0101;
}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="display: block; position:relative; width:256px; height:331px; margin: 0px auto; text-align: center; background:url(http://www.uropediatra-online.com/files/Herramientas/Calculadora%20al%20Cargar.png);"&gt;&lt;div style="position:absolute; top:36px; left:123px;"&gt;&lt;form&gt;&lt;span id="minutos"&gt;&lt;font color="#DF0101"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&lt;span id="segundos"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;/form&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/ir-la-urocalculadora.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-3062677158959648017</guid><pubDate>Wed, 07 Jun 2017 22:05:00 +0000</pubDate><atom:updated>2017-06-07T17:05:10.083-05:00</atom:updated><title>Ir a la NefroCalculadora</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;&lt;br /&gt;
&lt;link href=”css/movil.css” rel=”stylesheet” type=”text/css” media=”handheld, only screen and (max-device-width: 480px)” /&gt;&lt;br /&gt;
&lt;link href=”css/escritorio.css” rel=”stylesheet” type=”text/css” media=”screen and (min-width: 481px)” /&gt;&lt;br /&gt;
 &lt;meta http-equiv="Refresh" content="10;URL=http://www.uropediatra-online.com/nefrocalculadora.html"&gt;&lt;br /&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
 alert("NO TOQUE NADA y espere unos cuantos segundos mientras nos alistamos para atenderlo y se organizan nuestras calculadoras. Su anfitrión: UroPediatra de profesión y WebMaster aficionado de todo corazón, le da la Bienvenida y le solicita informar al correo uropediatra@gmail.com, cualquier error o mal funcionamiento que se presente en esta página. Pulse Aceptar para empezar.");
&lt;/script&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;  
 body  
 {  
  background: #000;  
  overflow: hidden; /* Evita la barra de desplazamiento */  
  line-height: 15px; /* Acorta la distancia vertical de caracteres */  
  font-size: 14px;  
 }  
 div.cadena  
 {  
  position: absolute; /* Para poder posicionar en 'x' y 'y' */  
  color: #0f0;  
  text-align: center;  
  width: 10px; /* Forza los caracteres a irse a otra línea */  
  overflow: visible; /* Para que la cadena no se coma los carateres */  
  font-family: 'Courier New'; /* Fuente más o menos ad hoc a matrix */  
 }  
&lt;/style&gt;  &lt;br /&gt;
&lt;script&gt;  
 // Cuántas cadenas se van a mostrar al mismo tiempo  
 var NUMERO_CADENAS   = 70;  
 // Cuántos caracteres contendrá cada cadena  
 var TAMANO_CADENA    = 25;  
 // Máxima cantidad de píxeles que una cadena puede  
 // recorrer en cada ciclo de la animación.  
 var VELOCIDAD_MAXIMA = 100;  
 // Aquí se almacenarán todas las cadenas existentes  
 var cadenas = new Array(NUMERO_CADENAS);  
   
 window.onload = function()  
 {    
  // Crear 'n' número de cadenas basado  
  // en la variable NUMERO_CADENAS.  
  for( var i = 0; i &lt; NUMERO_CADENAS; i++ )  
  {  
   var divCadena = document.createElement('div');  
   // Ponerle la clase tomada desde la hoja de estilos  
   divCadena.className = 'cadena';  
   // Aplicar la cadena aleatoria al objeto  
   divCadena.innerHTML = generarCadenaAleatoria();  
     
   // Lo agregamos al arreglo principal de cadenas  
   cadenas[i] = divCadena;  
     
   // Y finalmente al "plano de gráficos"  
   document.body.appendChild( cadenas[i] );  
     
   // Posicionar el elemento  
   prepararCadena(divCadena);  
  }  
    
  // Iniciar la animación  
  animar();  
 }  
   
 function animar()  
 {  
  var c;  
  for( var i = 0; i &lt; cadenas.length; i++ )  
  {  
   c = cadenas[i];  
     
   // Incrementamos la posición vertical de  
   // acuerdo a la velocida de la cadena.  
   c.style.top = (c.offsetTop + c.velocidad) + 'px';  
     
   // Al final de cada movimiento, verificamos si  
   // la cadena se fue más abajo de lo alto del body,  
   // si es así, volvemos a definir sus posiciones.  
   if( c.offsetTop &gt; window.innerHeight )  
    prepararCadena(c);  
  }  
    
  // Repetir el proceso  
  setTimeout('animar();', 50);  
 }  
   
 function prepararCadena(cad)  
 {  
  // La velocidad será un número aleatorio, tomando  
  // como límite el valor de VELOCIDAD_MAXIMA.  
  // Le vamos a sumar 1 al resultado, de esta manera  
  // evitamos que la velocidad sea 0.  
  cad.velocidad = Math.round( Math.random() * VELOCIDAD_MAXIMA ) + 1;  
    
  // El color puede ser una variante de verde, para eso  
  // utilizamos un tipo de color RGB (según el estándar CSS),  
  // solo cambiando el G por un número aleatorio, tomando  
  // como máximo el 255 (no se puede más).  
  cad.style.color = 'rgb(0,'+( Math.round(Math.random()*255) )+',0)';  
    
  // Aquí simplemente definimos la posición horizontal  
  // sin pasar del límite de tamaño de la página.  
  cad.style.left = Math.round(Math.random() * document.body.offsetWidth) + 'px';  
    
  // Y colocamos la cadena antes del píxel 0, así no  
  // la podremos en primaria instancia.  
  cad.style.top  = (-cad.offsetHeight) + 'px';  
 }  
   
 function generarCadenaAleatoria()  
 {  
  var strCadena = '';  
  var intLetra  =  0;  
  for( var i = 0; i &lt; TAMANO_CADENA; i++ )  
  {  
   // Calcular un código ASCII aleatorio.  
   intLetra = Math.round(Math.random() * 27) + 65;  
   // Convertir el código ASCII a caracter de cadena.  
   strCadena += String.fromCharCode(intLetra) + ' ';  
  }  
    
  return strCadena;  
 }  
   
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
 //setInterval
 var cronometro;
 setTimeout('carga_Timer()', 0)

 function carga_Timer()
 {
  contador_s =0;
  contador_m =0;
  s = document.getElementById("segundos");
  m = document.getElementById("minutos");

  cronometro = setInterval(
   function(){
    if(contador_s==60)
    {
     contador_s=0;
     contador_m++;
     m.innerHTML = contador_m;

     if(contador_m==60)
     {
      contador_m=0;
     }
    }

    s.innerHTML = contador_s;
    contador_s++;

   }
   ,1000);

 }

&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
#segundos {
color: #DF0101;
}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;
&lt;div style="display: block; position:relative; width:256px; height:331px; margin: 0px auto; text-align: center; background:url(http://www.uropediatra-online.com/files/Herramientas/Calculadora%20al%20Cargar.png);"&gt;&lt;div style="position:absolute; top:36px; left:123px;"&gt;&lt;form&gt;&lt;span id="minutos"&gt;&lt;font color="#DF0101"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;b&gt;:&lt;/b&gt;&lt;/font&gt;&lt;span id="segundos"&gt;&lt;b&gt;0&lt;/b&gt;&lt;/span&gt;&lt;/form&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/ir-la-nefrocalculadora.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-1770854206486363097</guid><pubDate>Wed, 07 Jun 2017 08:17:00 +0000</pubDate><atom:updated>2017-06-07T05:02:46.974-05:00</atom:updated><title>Indice de Hipoplasia Renal</title><description>&lt;script language="JavaScript"&gt;
var Memory = 0;
var Number1 = "";
var Number2 = "";
var NewNumber = "blank";
var opvalue = "";
function Display(displaynumber) {
document.calculator.answer.value = displaynumber;
}
function MemoryClear() {
Memory = 0;
document.calculator.mem.value = "";
}
function MemoryRecall(answer) {
if(NewNumber != "blank") {
Number2 += answer;
} else {
Number1 = answer;
}
NewNumber = "blank";
Display(answer);
}
function MemorySubtract(answer) {
Memory = Memory - eval(answer);
}
function MemoryAdd(answer) {
Memory = Memory + eval(answer);
document.calculator.mem.value = " M ";
NewNumber = "blank";
}
function ClearCalc() {
Number1 = "";
Number2 = "";
NewNumber = "blank";
Display("");
}
function Backspace(answer) {
answerlength = answer.length;
answer = answer.substring(0, answerlength - 1);
if (Number2 != "") {
Number2 = answer.toString();
Display(Number2);
} else {
Number1 = answer.toString();
Display(Number1);
   }
}
function CECalc() {
Number2 = "";
NewNumber = "yes";
Display("");
}
function CheckNumber(answer) {
if(answer == ".") {
Number = document.calculator.answer.value;
if(Number.indexOf(".") != -1) {
answer = "";
   }
}
if(NewNumber == "yes") {
Number2 += answer;
Display(Number2);
}
else {
if(NewNumber == "blank") {
Number1 = answer;
Number2 = "";
NewNumber = "no";
}
else {
Number1 += answer;
}
Display(Number1);
   }
}
function AddButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) + parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '+';
Display(Number1);
}
function SubButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) - parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '-';
Display(Number1);
}
function MultButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) * parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '*';
Display(Number1);
}
function DivButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) / parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '/';
Display(Number1);
}
function SqrtButton() {
Number1 = Math.sqrt(Number1);
NewNumber = "blank";
Display(Number1);
}
function PercentButton() {
if(NewNumber != "blank") {
Number2 *= .01;
NewNumber = "blank";
Display(Number2);
   }
}
function RecipButton() {
Number1 = 1/Number1;
NewNumber = "blank";
Display(Number1);
}
function NegateButton() {
Number1 = parseFloat(-Number1);
NewNumber = "no";
Display(Number1);
}
function EqualButton() {
if(opvalue == '+') AddButton(0);
if(opvalue == '-') SubButton(0);
if(opvalue == '*') MultButton(0);
if(opvalue == '/') DivButton(0);
Number2 = "";
opvalue = "";
}
function VN() {
alert("El rango promedio aceptado es de +/- 2 cms. Con una diferencia por encima de 2cms se inician los diversos grados de Hipoplasia Renal.");
}
function FX() {
alert("Fórmula:(Talla-cm x 0,057)+2,646");
}
function Tuto() {
alert("Para realizar el cálculo del Indice de Hipoplasia Renal: Debe ingresar primero la Talla en cms y luego en forma sucesiva pero pausada, pulsar los botones 1, 2, 3, 4. Una vez que se han realizado los ajustes, pulse en Calcular...Y listo. El resultado obtenido se equipara con las mediciones de los estudios radiologicos. Y su comparación con el Riñon contralateral.");
}
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
body{
}
body {font-family: helvetica;}

p {font-size: 14pt}

.brown {color: brown}

.green {color: green}

.blue {color: blue}

.red {color: red}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="position:fixed; top:0px; left:0px;"&gt;&lt;form name="calculator" action=""&gt;&lt;table bgcolor="#DBA901" width="180" border="1"&gt;&lt;tr&gt;&lt;td&gt; &lt;br /&gt;
&lt;table border="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td bgcolor="#ffffff"&gt;&lt;a href="#"&gt;&lt;center&gt;&lt;b&gt;Longitud del Riñon&lt;/b&gt;&lt;/center&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;br /&gt;
&lt;table width="100%" border="0"&gt;&lt;tr&gt;&lt;td colspan="6"&gt;&lt;center&gt;&lt;input type="text" name="answer" size="33" maxlength="33" placeholder="Ingrese la Talla en cms y...1,2,3,4 a calcular" onchange="CheckNumber(this.value)"/&gt;&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan="6"&gt; &lt;br /&gt;
&lt;table border="0" cellpadding="0"&gt;&lt;tr&gt; &lt;td&gt;&lt;input type="reset" name="C" class="blue" value="Realizar un nuevo cálculo" onclick="ClearCalc(); return false;"/&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;input type="button" name="multiply" class="brown" value="Paso 1" onclick="MultButton(1); return false;"/&gt;&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;td&gt;&lt;input type="button" name="calc7" class="blue" value="Paso 2" onclick="CheckNumber('0.057'); return false;"/&gt;&lt;/td&gt;&lt;br /&gt;
&lt;/tr&gt;&lt;br /&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;td&gt;&lt;input type="button" name="tutorial" class="green" value=" Como usar esta calculadora " onclick="Tuto()"/&gt;&lt;/td&gt;&lt;br /&gt;
&lt;/tr&gt;&lt;br /&gt;
&lt;tr&gt;&lt;br /&gt;
&lt;td&gt;&lt;input type="button" name="plus" class="brown" value="Paso 3" onclick="AddButton(1); return false;"/&gt;&lt;/td&gt;&lt;br /&gt;
&lt;td&gt;&lt;br /&gt;
&lt;td&gt;&lt;input type="button" name="calc8" class="blue" value="Paso 4" onclick="CheckNumber('2.646'); return false;"/&gt;&lt;/td&gt;&lt;br /&gt;
&lt;/tr&gt;&lt;br /&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;td&gt;&lt;center&gt;&lt;input type="button" name="equal" class="brown" value="Calcular el Indice de Hodson" onclick="EqualButton(); return false;"/&gt;&lt;/center&gt;&lt;/td&gt;&lt;br /&gt;
&lt;/tr&gt;&lt;br /&gt;
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;
&lt;/table&gt;&lt;div style="position:absolute; top:10px; left:80px;"&gt;&lt;input type="button" name="normal" class="green" value="V-Normal" onclick="VN()"/&gt;&lt;/div&gt;&lt;div style="position:absolute; top:10px; left:170px;"&gt;&lt;input type="button" name="formula" class="green" value="Fórmula" onclick="FX()"/&gt;&lt;/div&gt;&lt;/form&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/indice-de-hipoplasia-renal.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-380184630807842105</guid><pubDate>Tue, 06 Jun 2017 09:20:00 +0000</pubDate><atom:updated>2017-06-06T04:54:11.606-05:00</atom:updated><title>Capacidad Vesical</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;link 480px="" and="" href="”css/movil.css”" max-device-width:="" media="”handheld," only="" rel="”stylesheet”" screen="" type="”text/css”"&gt;&lt;/link&gt;&lt;br /&gt;
&lt;link 481px="" and="" href="”css/escritorio.css”" media="”screen" min-width:="" rel="”stylesheet”" type="”text/css”"&gt;&lt;/link&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script language="JavaScript"&gt;
var Memory = 0;
var Number1 = "";
var Number2 = "";
var NewNumber = "blank";
var opvalue = "";
function Display(displaynumber) {
document.calculator.answer.value = displaynumber;
}
function MemoryClear() {
Memory = 0;
document.calculator.mem.value = "";
}
function MemoryRecall(answer) {
if(NewNumber != "blank") {
Number2 += answer;
} else {
Number1 = answer;
}
NewNumber = "blank";
Display(answer);
}
function MemorySubtract(answer) {
Memory = Memory - eval(answer);
}
function MemoryAdd(answer) {
Memory = Memory + eval(answer);
document.calculator.mem.value = " M ";
NewNumber = "blank";
}
function ClearCalc() {
Number1 = "";
Number2 = "";
NewNumber = "blank";
Display("");
}
function Backspace(answer) {
answerlength = answer.length;
answer = answer.substring(0, answerlength - 1);
if (Number2 != "") {
Number2 = answer.toString();
Display(Number2);
} else {
Number1 = answer.toString();
Display(Number1);
   }
}
function CECalc() {
Number2 = "";
NewNumber = "yes";
Display("");
}
function CheckNumber(answer) {
if(answer == ".") {
Number = document.calculator.answer.value;
if(Number.indexOf(".") != -1) {
answer = "";
   }
}
if(NewNumber == "yes") {
Number2 += answer;
Display(Number2);
}
else {
if(NewNumber == "blank") {
Number1 = answer;
Number2 = "";
NewNumber = "no";
}
else {
Number1 += answer;
}
Display(Number1);
   }
}
function AddButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) + parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '+';
Display(Number1);
}
function SubButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) - parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '-';
Display(Number1);
}
function MultButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) * parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '*';
Display(Number1);
}
function DivButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) / parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '/';
Display(Number1);
}
function SqrtButton() {
Number1 = Math.sqrt(Number1);
NewNumber = "blank";
Display(Number1);
}
function PercentButton() {
if(NewNumber != "blank") {
Number2 *= .01;
NewNumber = "blank";
Display(Number2);
   }
}
function RecipButton() {
Number1 = 1/Number1;
NewNumber = "blank";
Display(Number1);
}
function NegateButton() {
Number1 = parseFloat(-Number1);
NewNumber = "no";
Display(Number1);
}
function EqualButton() {
if(opvalue == '+') AddButton(0);
if(opvalue == '-') SubButton(0);
if(opvalue == '*') MultButton(0);
if(opvalue == '/') DivButton(0);
Number2 = "";
opvalue = "";
}
function VN() {
alert("Recién Nacidos: Pretérminos: 12-15 cc. A Término: peso Kg x 7. A los 3 meses 60 cc. Al 1er año: 70-90 cc. A los 2 años: 120cc. A partir de alli, aumenta 30 cc/año en promedio.");
}
function FX() {
alert("Fórmula usada:(Edad-años + 2)x 30. Existe otra fórmula que utilizan algunos centros hospitalarios: 30 + (edad en años x 30). La cual da resultados de 30 ml menos en cada año, al comparala con la usada. No estando muy acorde a la realidad.");
}
function Tuto() {
alert("Para realizar el cálculo de la Capacidad Vesical: Debe ingresar primero la edad del paciente en años y luego en forma sucesiva pero pausada, pulsar los pasos 1, 2, 3, 4. Una vez que se han realizado los ajustes, pulse en Calcular...Y listo.");
}
function Informe() {
alert("Aunque no existen unos parametros estandarizados y se presentan variables que influyen en niñ@s de igual peso o edad... la siguiente calculadora adquiere mayor precisión al ser usada entre los 2 y 15 años de edad. Para resultados por debajo de 2 años, consulte el botón de valores normales al pie de su pantalla. A partir de los 15 años los valores de referencia son equiparables al del adulto.");
}
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
form {
}
form {font-family: helvetica;}

p {font-size: 14pt}

.brown {color: brown}

.green {color: green}

.blue {color: blue}

.red {color: red}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="position:fixed; top:8px; left:5px;"&gt;&lt;form action="" name="calculator"&gt;&lt;table bgcolor="#CBD508" style="width: 180px;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;table bgcolor="#CBD154" border="1"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;table border="0" style="width: 100%px;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td colspan="6"&gt;&lt;center&gt;&lt;input maxlength="33" name="answer" onchange="CheckNumber(this.value)" placeholder="Ingrese la edad en años." size="33" type="number" /&gt;&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan="6"&gt;&lt;br /&gt;
&lt;table border="0" cellpadding="0"&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;&lt;input class="brown" name="C" onclick="ClearCalc(); return false;" type="reset" value="Borrar todo y realizar un nuevo cálculo..." /&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;input class="green" name="plus" onclick="AddButton(1); return false;" type="button" value="Paso 1" /&gt;&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;input class="green" name="calc7" onclick="CheckNumber('2'); return false;" type="button" value="Paso 2" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;input class="blue" name="tutorial" onclick="Tuto()" type="button" value=" Como usar esta calculadora " /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;&lt;input class="green" name="multiply" onclick="MultButton(1); return false;" type="button" value="Paso 3" /&gt;&lt;/td&gt; &lt;td&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;input class="green" name="calc8" onclick="CheckNumber('30'); return false;" type="button" value="Paso 4" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;/td&gt;&lt;td&gt;&lt;center&gt;&lt;input class="brown" name="equal" onclick="EqualButton(); return false;" type="button" value="Calcular la Capacidad Vesical" /&gt;&lt;/center&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/form&gt;&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;&lt;input class="iimage" height="29" onclick="Informe()" src="http://www.uropediatra-online.com/files/UroCalculadora/De%20que%20se%20trata.png" type="image" width="29" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input class="green" name="normal" onclick="VN()" type="button" value="V-Normal" /&gt;&lt;/td&gt; &lt;td&gt;&lt;input class="green" name="formula" onclick="FX()" type="button" value="Fórmula" /&gt;&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/capacidad-vesical.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-6649285328907151651</guid><pubDate>Sun, 04 Jun 2017 11:37:00 +0000</pubDate><atom:updated>2017-06-04T06:44:51.249-05:00</atom:updated><title>NefroCrucigrama</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;meta name="generator" content="EclipseCrossword" /&gt;&lt;br /&gt;
&lt;style type="text/css"&gt;&lt;!--

body, h1, h2, h3, h4, h5, h6
{
	font-family: "Segoe UI, Franklin Gothic Medium, Arial, sans-serif";
}

h1, h2, h3, h4, h5, h6
{
	color: #5d6a86;
}

body
{
	cursor: default;
	font-size: small;
}

.ecw-answerbox
{
	color: black;
	background-color: #FFFAF0;
	border-color: #808080;
	border-style: solid;
	border-width: 1px;
	display: block;
	padding: .75em;
	width: 240pt;
}

.ecw-box
{
	border-style: solid;
	border-width: 1pt;
	cursor: pointer;
	font-size: .12in;
	font-weight: bold;
	height: .18in;
	overflow: hidden;
	text-align: center;
	width: .18in;
}

.ecw-boxcheated_sel
{
	background-color: #FFF1D7;
	border-color: #C00000;
	color: #2080D0;
}

.ecw-boxcheated_unsel
{
	background-color: #ffffff;
	border-color: #606060;
	color: #2080D0;
}

.ecw-boxerror_sel
{
	background-color: #FFF1D7;
	border-color: #C00000;
	color: #BF0000;
}

.ecw-boxerror_unsel
{
	background-color: #FFF0F0;
	border-color: #606060;
	color: #BF0000;
}

.ecw-boxnormal_sel
{
	background-color: #FFF1D7;
	border-color: #C00000;
	color: #000000;
}

.ecw-boxnormal_unsel
{
	background-color: #ffffff;
	border-color: #606060;
	color: #000000;
}

.ecw-button
{
	width: 60pt;
}

.ecw-cluebox
{
	border-bottom-width: 1px;
	border-color: #c0c0c0;
	border-left-width: 0px;
	border-right-width: 0px;
	border-style: solid;
	border-top-width: 1px;
	margin-top: 1em;
	padding-bottom: .5em;
	padding-left: 0pt;
	padding-right: 0pt;
	padding-top: .5em;
}

.ecw-crosswordarea
{
	background-color: #D0D8E0;
	border-color: #808080;
	border-style: solid;
	border-width: 2px;
	padding: .5em;
	font-family: "Segoe UI, Verdana, Arial, sans-serif";
	font-size: small;
}

.ecw-copyright
{
	margin-bottom: 1em;
	font-size: x-small;
	font-family: "Segoe UI, Franklin Gothic Medium, Arial, sans-serif";
}

.ecw-input
{
	font-family: "Segoe UI, Franklin Gothic Medium, Arial, sans-serif";
}

.ecw-wordlabel
{
	text-transform: uppercase;
	margin: 0;
}

.ecw-wordinfo
{
	font-size: 8pt;
	color: #808080;
}

.ecw-worderror
{
	color: #c00000;
	font-weight: bold;
	display: none;
	margin-top: 1em;
}

--&gt;&lt;/style&gt;&lt;br /&gt;
&lt;div style="position:fixed; top:5px; left:5px;"&gt;&lt;div style="margin-top: 1em;"&gt;	&lt;button id="checkbutton" type="button" onclick="CheckClick();" style="display: none;"&gt;Crucigrama de IRA-Verificador de Resultados&lt;/button&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div id="waitmessage" class="ecw-answerbox"&gt;	Esre interactivo crucigrama requiere de javascrip y &lt;br /&gt;
	navegador actualizado, incluyendo Windows Internet Explorer, Mozilla Firefox, Google Chrome, o &lt;br /&gt;
	Apple Safari.  Si usted tiene desactivado el scrip, habilítelo y recargue&lt;br /&gt;
	la página.&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;script type="text/javascript"&gt;&lt;!--
	CrosswordWidth = 21;
	CrosswordHeight = 14;
	Words = 14;
	WordLength = new Array(10, 3, 4, 7, 7, 8, 13, 8, 8, 11, 6, 7, 5, 8);
	Word = new Array("FUROSEMIDA", "UNO", "DIEZ", "NEFRONA", "MANITOL", "POLIURIA", "HIPOPERFUSIÓN", "DOPAMINA", "PRERENAL", "OBSTRUCCIÓN", "VEINTE", "VOLEMIA", "RENAL", "OLIGURIA");
	Clue = new Array("Diurético de Asa", 
"En IRA-PreRenal la FE-Na es menor de...", 
"En IRA PreRenal el Na urinario es menor de ?/mEq/l", 
"Esta afectada en la IRA Renal", 
"Diurético osmótico...", 
"Volumen urinario superior a 3 cc/k/h", 
"La IRA PreRenal se origina por...", 
"Catecolamina que mejora el Flujo Sanguineo Renal", 
"De las tres... es la causa mas frecuente de IRA", 
"La IRA PosRenal se origina por...", 
"En IRA PosRenal el Na urinario es superior a ?/mEq/l", 
"La IRA PreRenal puede revertirse si a tiempo se corrige...", 
"Si la FE-Na es mayor de 1 el origen de la IRA es...", 
"Volumen urinario inferior a 0,5 cc/k/h");
	AnswerHash = new Array(61339, 53152, 97287, 43628, 30424, 96396, 62585, 76460, 15801, 30955, 87815, 37725, 76832, 5153);
	WordX = new Array(11, 13, 8, 14, 0, 8, 5, 19, 1, 17, 4, 15, 10, 6);
	WordY = new Array(0, 4, 6, 6, 7, 9, 12, 0, 1, 2, 3, 3, 5, 6);
	LastHorizontalWord = 6;
	OnlyCheckOnce = false;
//--&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;&lt;!--

// EclipseCrossword (C) Copyright 2000-2012 Green Eclipse.
// The puzzle itself remains the property of its creator. Do not remove this copyright notice.

var BadChars = "`~!@^*()_={[}]\\|:;\"',&lt;&gt;/?";

var TableAcrossWord, TableDownWord;
var CurrentWord, PrevWordHorizontal, x, y, i, j;
var CrosswordFinished, Initialized;

// Check the user's browser and then initialize the puzzle.
if (document.getElementById("waitmessage") != null)
{
	document.getElementById("waitmessage").innerHTML = "Espere unos segundos mientras el crucigrama se carga...";
	
	// Current game variables
	CurrentWord = -1;
	PrevWordHorizontal = false;
	
	// Create the cell-to-word arrays.
	TableAcrossWord = new Array(CrosswordWidth);
	for (var x = 0; x &lt; CrosswordWidth; x++) TableAcrossWord[x] = new Array(CrosswordHeight);
	TableDownWord = new Array(CrosswordWidth);
	for (var x = 0; x &lt; CrosswordWidth; x++) TableDownWord[x] = new Array(CrosswordHeight);
	for (var y = 0; y &lt; CrosswordHeight; y++)
		for (var x = 0; x &lt; CrosswordWidth; x++)
		{
			TableAcrossWord[x][y] = -1;
			TableDownWord[x][y] = -1;
		}
	
	// First, add the horizontal words to the puzzle.
	for (var i = 0; i &lt;= LastHorizontalWord; i++)
	{
		x = WordX[i];
		y = WordY[i];
		for (var j = 0; j &lt; WordLength[i]; j++)
		{
			TableAcrossWord[x + j][y] = i;
		}
	}
	
	// Second, add the vertical words to the puzzle.
	for (var i = LastHorizontalWord + 1; i &lt; Words; i++)
	{
		x = WordX[i];
		y = WordY[i];
		for (var j = 0; j &lt; WordLength[i]; j++)
		{
			TableDownWord[x][y + j] = i;
		}
	}
	
	// Now, insert the crossword table.
	document.writeln("&lt;table id=\"crossword\" cellpadding=\"0\" cellspacing=\"0\" style=\"display: none; border-collapse: collapse;\"&gt;");
	for (var y = 0; y &lt; CrosswordHeight; y++)
	{
		document.writeln("&lt;tr&gt;");
		for (var x = 0; x &lt; CrosswordWidth; x++)
		{
			if (TableAcrossWord[x][y] &gt;= 0 || TableDownWord[x][y] &gt;= 0)
				document.write("&lt;td id=\"c" + PadNumber(x) + PadNumber(y) + "\" class=\"ecw-box ecw-boxnormal_unsel\" onclick=\"SelectThisWord(event);\"&gt;&amp;nbsp;&lt;/td&gt;");
			else
				document.write("&lt;td&gt;&lt;\/td&gt;");
		}
		document.writeln("&lt;\/tr&gt;");
	}
	document.writeln("&lt;\/table&gt;");
	
	// Finally, show the crossword and hide the wait message.
	Initialized = true;
	document.getElementById("waitmessage").style.display = "none";
	document.getElementById("crossword").style.display = "block";
}

// * * * * * * * * * *
// Event handlers

// Raised when a key is pressed in the word entry box.
function WordEntryKeyPress(event)
{
	if (CrosswordFinished) return;
	// Treat an Enter keypress as an OK click.
	if (CurrentWord &gt;= 0 &amp;&amp; event.keyCode == 13) OKClick();
}

// * * * * * * * * * *
// Helper functions

// Called when we're ready to start the crossword.
function BeginCrossword()
{
	if (Initialized)
	{
		document.getElementById("welcomemessage").style.display = "";
		document.getElementById("checkbutton").style.display = "";
	}
}

// Returns true if the string passed in contains any characters prone to evil.
function ContainsBadChars(theirWord)
{
	for (var i = 0; i &lt; theirWord.length; i++)
		if (BadChars.indexOf(theirWord.charAt(i)) &gt;= 0) return true;
	return false;
}

// Pads a number out to three characters.
function PadNumber(number)
{
	if (number &lt; 10)
		return "00" + number;
	else if (number &lt; 100)
		return "0" + number;
	else
		return "" +  number;
}

// Returns the table cell at a particular pair of coordinates.
function CellAt(x, y)
{
	return document.getElementById("c" + PadNumber(x) + PadNumber(y));
}

// Deselects the current word, if there's a word selected.  DOES not change the value of CurrentWord.
function DeselectCurrentWord()
{
	if (CurrentWord &lt; 0) return;
	var x, y, i;
	
	document.getElementById("answerbox").style.display = "none";
	ChangeCurrentWordSelectedStyle(false);
	CurrentWord = -1;
	
}

// Changes the style of the cells in the current word.
function ChangeWordStyle(WordNumber, NewStyle)
{
	if (WordNumber&lt; 0) return;
	var x = WordX[WordNumber];
	var y = WordY[WordNumber];
	
	if (WordNumber&lt;= LastHorizontalWord)
		for (i = 0; i &lt; WordLength[WordNumber]; i++)
			CellAt(x + i, y).className = NewStyle;
	else
		for (i = 0; i &lt; WordLength[WordNumber]; i++)
			CellAt(x, y + i).className = NewStyle;
}

// Changes the style of the cells in the current word between the selected/unselected form.
function ChangeCurrentWordSelectedStyle(IsSelected)
{
	if (CurrentWord &lt; 0) return;
	var x = WordX[CurrentWord];
	var y = WordY[CurrentWord];
	
	if (CurrentWord &lt;= LastHorizontalWord)
		for (i = 0; i &lt; WordLength[CurrentWord]; i++)
			CellAt(x + i, y).className = CellAt(x + i, y).className.replace(IsSelected ? "_unsel" : "_sel", IsSelected ? "_sel" : "_unsel");
	else
		for (i = 0; i &lt; WordLength[CurrentWord]; i++)
			CellAt(x, y + i).className = CellAt(x, y + i).className.replace(IsSelected ? "_unsel" : "_sel", IsSelected ? "_sel" : "_unsel");
}

// Selects the new word by parsing the name of the TD element referenced by the 
// event object, and then applying styles as necessary.
function SelectThisWord(event)
{
	if (CrosswordFinished) return;
	var x, y, i, TheirWord, TableCell;
	
	// Deselect the previous word if one was selected.
	document.getElementById("welcomemessage").style.display = "none";
	if (CurrentWord &gt;= 0) OKClick();
	DeselectCurrentWord();
	
	// Determine the coordinates of the cell they clicked, and then the word that
	// they clicked.
	var target = (event.srcElement ? event.srcElement: event.target);
	x = parseInt(target.id.substring(1, 4), 10);
	y = parseInt(target.id.substring(4, 7), 10);
	
	// If they clicked an intersection, choose the type of word that was NOT selected last time.
	if (TableAcrossWord[x][y] &gt;= 0 &amp;&amp; TableDownWord[x][y] &gt;= 0)
		CurrentWord = PrevWordHorizontal ? TableDownWord[x][y] : TableAcrossWord[x][y];
	else if (TableAcrossWord[x][y] &gt;= 0)
		CurrentWord = TableAcrossWord[x][y];
	else if (TableDownWord[x][y] &gt;= 0)
		CurrentWord = TableDownWord[x][y];

	PrevWordHorizontal = (CurrentWord &lt;= LastHorizontalWord);
	
	// Now, change the style of the cells in this word.
	ChangeCurrentWordSelectedStyle(true);
	
	// Then, prepare the answer box.
	x = WordX[CurrentWord];
	y = WordY[CurrentWord];
	TheirWord = "";
	var TheirWordLength = 0;
	for (i = 0; i &lt; WordLength[CurrentWord]; i++)
	{
		// Find the appropriate table cell.
		if (CurrentWord &lt;= LastHorizontalWord)
			TableCell = CellAt(x + i, y);
		else
			TableCell = CellAt(x, y + i);
		// Add its contents to the word we're building.
		if (TableCell.innerHTML != null &amp;&amp; TableCell.innerHTML.length &gt; 0 &amp;&amp; TableCell.innerHTML != " " &amp;&amp; TableCell.innerHTML.toLowerCase() != "&amp;nbsp;")
		{
			TheirWord += TableCell.innerHTML.toUpperCase();
			TheirWordLength++;
		}
		else
		{
			TheirWord += "&amp;bull;";
		}
	}
	
	document.getElementById("wordlabel").innerHTML = TheirWord;
	document.getElementById("wordinfo").innerHTML = ((CurrentWord &lt;= LastHorizontalWord) ? "Horizontal, " : "Vertical, ") + WordLength[CurrentWord] + " letras.";
	document.getElementById("wordclue").innerHTML = Clue[CurrentWord];
	document.getElementById("worderror").style.display = "none";
	document.getElementById("cheatbutton").style.display = (Word.length == 0) ? "none" : "";
	if (TheirWordLength == WordLength[CurrentWord])
		document.getElementById("wordentry").value = TheirWord.replace(/&amp;AMP;/g, '&amp;');
	else
		document.getElementById("wordentry").value = "";
	
	// Finally, show the answer box.
	document.getElementById("answerbox").style.display = "block";
	try
	{
		document.getElementById("wordentry").focus();
		document.getElementById("wordentry").select();
	}
	catch (e)
	{
	}
	
}

// Called when the user clicks the OK link.
function OKClick()
{
	var TheirWord, x, y, i, TableCell;
	if (CrosswordFinished) return;
	if (document.getElementById("okbutton").disabled) return;
	
	// First, validate the entry.
	TheirWord = document.getElementById("wordentry").value.toUpperCase();
	if (TheirWord.length == 0)
	{
		DeselectCurrentWord();
		return;
	}
	if (ContainsBadChars(TheirWord))
	{
		document.getElementById("worderror").innerHTML = "La palabra escrita tiene caracteres invalidos.  Por favor escriba solo letras validas.";
		document.getElementById("worderror").style.display = "block";
		return;
	}
	if (TheirWord.length &lt; WordLength[CurrentWord])
	{
		document.getElementById("worderror").innerHTML  = "Parece que no hay suficientes letras.  Esta palabra tiene " + WordLength[CurrentWord] + " letras.";
		document.getElementById("worderror").style.display = "block";
		return;
	}
	if (TheirWord.length &gt; WordLength[CurrentWord])
	{
		document.getElementById("worderror").innerHTML = "Ha escrito muchas letras.  Esta palabra tiene " + WordLength[CurrentWord] + " letras.";
		document.getElementById("worderror").style.display = "block";
		return;
	}
	
	// If we made it this far, they typed an acceptable word, so add these letters to the puzzle and hide the entry box.
	x = WordX[CurrentWord];
	y = WordY[CurrentWord];
	for (i = 0; i &lt; TheirWord.length; i++)
	{
		TableCell = CellAt(x + (CurrentWord &lt;= LastHorizontalWord ? i : 0), y + (CurrentWord &gt; LastHorizontalWord ? i : 0));
		TableCell.innerHTML = TheirWord.substring(i, i + 1);
	}
	DeselectCurrentWord();
}

// Called when the "check puzzle" link is clicked.
function CheckClick()
{
	var i, j, x, y, UserEntry, ErrorsFound = 0, EmptyFound = 0, TableCell;
	if (CrosswordFinished) return;
	DeselectCurrentWord();
	
	for (y = 0; y &lt; CrosswordHeight; y++)
	for (x = 0; x &lt; CrosswordWidth; x++)
		if (TableAcrossWord[x][y] &gt;= 0 || TableDownWord[x][y] &gt;= 0)
		{
			TableCell = CellAt(x, y);
			if (TableCell.className == "ecw-box ecw-boxerror_unsel") TableCell.className = "ecw-box ecw-boxnormal_unsel";
		}
		
	for (i = 0; i &lt; Words; i++)
	{
		// Get the user's entry for this word.
		UserEntry = "";
		for (j = 0; j &lt; WordLength[i]; j++)
		{
			if (i &lt;= LastHorizontalWord)
				TableCell = CellAt(WordX[i] + j, WordY[i]);
			else
				TableCell = CellAt(WordX[i], WordY[i] + j);
			if (TableCell.innerHTML.length &gt; 0 &amp;&amp; TableCell.innerHTML.toLowerCase() != "&amp;nbsp;")
			{
				UserEntry += TableCell.innerHTML.toUpperCase();
			}
			else
			{
				UserEntry = "";
				EmptyFound++;
				break;
			}
		}
		UserEntry = UserEntry.replace(/&amp;AMP;/g, '&amp;');
		// If this word doesn't match, it's an error.
		if (HashWord(UserEntry) != AnswerHash[i] &amp;&amp; UserEntry.length &gt; 0)
		{
			ErrorsFound++;
			ChangeWordStyle(i, "ecw-box ecw-boxerror_unsel");
		}
	}
	
	// If they can only check once, disable things prematurely.
	if ( OnlyCheckOnce )
	{
		CrosswordFinished = true;
		document.getElementById("checkbutton").style.display = "none";
	}
	
	// If errors were found, just exit now.
	if (ErrorsFound &gt; 0 &amp;&amp; EmptyFound &gt; 0)
		document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound &gt; 1 ? " errores" : " error") + " y " + EmptyFound + (EmptyFound &gt; 1 ? " incompletas palabras fueron" : " incompleta palabra fue") + " encontrada(s).";
	else if (ErrorsFound &gt; 0)
		document.getElementById("welcomemessage").innerHTML = ErrorsFound + (ErrorsFound &gt; 1 ? " errores fueron" : " error fue") + " encontrado(s).";
	else if (EmptyFound &gt; 0)
		document.getElementById("welcomemessage").innerHTML = "No hay errores, pero " + EmptyFound + (EmptyFound &gt; 1 ? " incompletas palabras fueron" : " incompleta palabra fue") + " encontrada(s).";
	
	if (ErrorsFound + EmptyFound &gt; 0)
	{
		document.getElementById("welcomemessage").style.display = "";
		return;
	}
			
	// They finished the puzzle!
	CrosswordFinished = true;
	document.getElementById("checkbutton").style.display = "none";
	document.getElementById("congratulations").style.display = "block";
	document.getElementById("welcomemessage").style.display = "none";
}

// Called when the "cheat" link is clicked.
function CheatClick()
{
	if (CrosswordFinished) return;
	var OldWord = CurrentWord;
	document.getElementById("wordentry").value = Word[CurrentWord];
	OKClick();
	ChangeWordStyle(OldWord, "ecw-box ecw-boxcheated_unsel");
}

// Returns a one-way hash for a word.
function HashWord(Word)
{
	var x = (Word.charCodeAt(0) * 719) % 1138;
	var Hash = 837;
	var i;
	for (i = 1; i &lt;= Word.length; i++)
		Hash = (Hash * i + 5 + (Word.charCodeAt(i - 1) - 64) * x) % 98503;
	return Hash;
}

//--&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div id="welcomemessage" class="ecw-answerbox" style="display:none;"&gt;&lt;h3&gt;Bienvenido&lt;/h3&gt;&lt;p&gt;Pulse sobre cualquier casilla para empezar.&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div id="answerbox" class="ecw-answerbox" style="display:none;"&gt;&lt;h3 id="wordlabel" class="ecw-wordlabel"&gt;&amp;nbsp;&lt;/h3&gt;&lt;div id="wordinfo" class="ecw-wordinfo"&gt;&lt;/div&gt;&lt;div id="wordclue" class="ecw-cluebox"&gt;&lt;/div&gt;&lt;div style="margin-top: 1em;"&gt;	&lt;input class="ecw-input" id="wordentry" type="text" size="24" style="font-weight: bold; text-transform:uppercase;" onkeypress="WordEntryKeyPress(event)" onchange="WordEntryKeyPress(event)" /&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div id="worderror" class="ecw-worderror"&gt;&lt;/div&gt;&lt;br /&gt;
&lt;table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top:1em;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;button id="okbutton" type="button" class="ecw-input ecw-button" onclick="OKClick();" style="font-weight: bold;"&gt;OK&lt;/button&gt; &amp;nbsp;&lt;br /&gt;
&lt;button id="cheatbutton" type="button" class="ecw-input ecw-button" onclick="CheatClick();"&gt;Ayuda&lt;/button&gt;&lt;br /&gt;
&lt;button id="cancelbutton" type="button" class="ecw-input ecw-button" onclick="DeselectCurrentWord();"&gt;Cancelar&lt;/button&gt;&lt;br /&gt;
&lt;a href="javascript:location.reload()"&gt;&lt;img src="http://www.uropediatra-online.com/files/Herramientas/Recargar.png" title="Recargar y hacerlo nuevamente"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div id="congratulations" class="ecw-answerbox" style="display:none;"&gt;&lt;h3&gt;Felicitaciones&lt;/h3&gt;&lt;p&gt;Usted a completado este &lt;a href="http://www.eclipsecrossword.com" style="color: black; text-decoration:none;"&gt;NefroCrucigrama&lt;/a&gt;.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Si desea crear su propio&lt;br /&gt;
&lt;a href="http://www.eclipsecrossword.com" style="color: black; text-decoration:none;"&gt;Crucigrama&lt;/a&gt;&lt;br /&gt;
...visite &lt;a href="http://www.eclipsecrossword.com" onclick="this.target='_blank'"&gt;EclipseCrossword&lt;/a&gt;&lt;br /&gt;
Es Gratis!&lt;br /&gt;
&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;
&lt;script type="text/javascript"&gt;&lt;!--
BeginCrossword();
//--&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;!-- Created with EclipseCrossword, (C) Copyright 2000-2012 Green Eclipse.  eclipsecrossword.com --&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/nefrocrucigrama.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-3313031546114375831</guid><pubDate>Sun, 04 Jun 2017 08:53:00 +0000</pubDate><atom:updated>2017-06-04T03:53:57.134-05:00</atom:updated><title>Calculadora</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;style type="text/css"&gt;
body {font-family: helvetica;background: #F5FFFA}

p {font-size: 12pt}

.brown {color: brown}

.green {color: green}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;
var Memory = 0;
var Number1 = "";
var Number2 = "";
var NewNumber = "blank";
var opvalue = "";
function Display(displaynumber) {
document.calculator.answer.value = displaynumber;
}
function MemoryClear() {
Memory = 0;
document.calculator.mem.value = "";
}
function MemoryRecall(answer) {
if(NewNumber != "blank") {
Number2 += answer;
} else {
Number1 = answer;
}
NewNumber = "blank";
Display(answer);
}
function MemorySubtract(answer) {
Memory = Memory - eval(answer);
}
function MemoryAdd(answer) {
Memory = Memory + eval(answer);
document.calculator.mem.value = " M ";
NewNumber = "blank";
}
function ClearCalc() {
Number1 = "";
Number2 = "";
NewNumber = "blank";
Display("");
}
function Backspace(answer) {
answerlength = answer.length;
answer = answer.substring(0, answerlength - 1);
if (Number2 != "") {
Number2 = answer.toString();
Display(Number2);
} else {
Number1 = answer.toString();
Display(Number1);
   }
}
function CECalc() {
Number2 = "";
NewNumber = "yes";
Display("");
}
function CheckNumber(answer) {
if(answer == ".") {
Number = document.calculator.answer.value;
if(Number.indexOf(".") != -1) {
answer = "";
   }
}
if(NewNumber == "yes") {
Number2 += answer;
Display(Number2);
}
else {
if(NewNumber == "blank") {
Number1 = answer;
Number2 = "";
NewNumber = "no";
}
else {
Number1 += answer;
}
Display(Number1);
   }
}
function AddButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) + parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '+';
Display(Number1);
}
function SubButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) - parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '-';
Display(Number1);
}
function MultButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) * parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '*';
Display(Number1);
}
function DivButton(x) {
if(x == 1) EqualButton();
if(Number2 != "") {
Number1 = parseFloat(Number1) / parseFloat(Number2);
}
NewNumber = "yes";
opvalue = '/';
Display(Number1);
}
function SqrtButton() {
Number1 = Math.sqrt(Number1);
NewNumber = "blank";
Display(Number1);
}
function PercentButton() {
if(NewNumber != "blank") {
Number2 *= .01;
NewNumber = "blank";
Display(Number2);
   }
}
function RecipButton() {
Number1 = 1/Number1;
NewNumber = "blank";
Display(Number1);
}
function NegateButton() {
Number1 = parseFloat(-Number1);
NewNumber = "no";
Display(Number1);
}
function EqualButton() {
if(opvalue == '+') AddButton(0);
if(opvalue == '-') SubButton(0);
if(opvalue == '*') MultButton(0);
if(opvalue == '/') DivButton(0);
Number2 = "";
opvalue = "";
}
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="position:fixed; top:5px; left:5px;"&gt;&lt;form name="calculator" action=""&gt;&lt;table bgcolor="#864504" width="220"&gt;&lt;tr&gt;&lt;td&gt; &lt;br /&gt;
&lt;table bgcolor="#FB9630" border="1"&gt;&lt;tr&gt;&lt;td&gt; &lt;br /&gt;
&lt;table border="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td bgcolor="#DC7208"&gt;&lt;b style="color:green"&gt;&lt;i&gt;&lt;center&gt;Nefro-Calculadora General&lt;/center&gt;&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt; 
&lt;tr&gt;&lt;td&gt; &lt;br /&gt;
&lt;table width="100%" border="0"&gt;&lt;tr&gt;&lt;td colspan="6"&gt;&lt;input type="text" name="answer" size="30" maxlength="30" onchange="CheckNumber(this.value)"/&gt;&lt;/td&gt;&lt;/tr&gt; 
&lt;tr&gt;&lt;td colspan="6"&gt; &lt;br /&gt;
&lt;table border="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td&gt; &lt;br /&gt;
&lt;input type="text" name="mem" size="3" maxlength="3"/&gt; &lt;input type="button" name="backspace" class="brown" value="Backspace" onclick="Backspace(document.calculator.answer.value); return false;"/&gt; &lt;input type="button" name="CE" class="brown" value=" CE " onclick="CECalc(); return false;"/&gt; &lt;input type="reset" name="C" class="brown" value="  C  " onclick="ClearCalc(); return false;"/&gt; &lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt; 
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt; 
&lt;tr&gt;&lt;td&gt;&lt;input type="button" name="MC" class="brown" value=" MC " onclick="MemoryClear(); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="calc7" class="green" value="  7  " onclick="CheckNumber('7'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="calc8" class="green" value="  8  " onclick="CheckNumber('8'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="calc9" class="green" value="  9  " onclick="CheckNumber('9'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="divide" class="brown" value="  /  " onclick="DivButton(1); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="sqrt" class="green" value="sqrt" onclick="SqrtButton(); return false;"/&gt;&lt;/td&gt;&lt;/tr&gt; 
&lt;tr&gt;&lt;td&gt;&lt;input type="button" name="MR" class="brown" value=" MR " onclick="MemoryRecall(Memory); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="calc4" class="green" value="  4  " onclick="CheckNumber('4'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="calc5" class="green" value="  5  " onclick="CheckNumber('5'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="calc6" class="green" value="  6  " onclick="CheckNumber('6'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="multiply" class="brown" value="  *  " onclick="MultButton(1); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="percent" class="green" value=" %  " onclick="PercentButton(); return false;"/&gt;&lt;/td&gt;&lt;/tr&gt; 
&lt;tr&gt;&lt;td&gt;&lt;input type="button" name="MS" class="brown" value=" MS " onclick="MemorySubtract(document.calculator.answer.value); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="calc1" class="green" value="  1  " onclick="CheckNumber('1'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="calc2" class="green" value="  2  " onclick="CheckNumber('2'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="calc3" class="green" value="  3  " onclick="CheckNumber('3'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="minus" class="brown" value="  -  " onclick="SubButton(1); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="recip" class="green" value="1/x " onclick="RecipButton(); return false;"/&gt;&lt;/td&gt;&lt;/tr&gt; 
&lt;tr&gt;&lt;td&gt;&lt;input type="button" name="Mplus" class="brown" value=" M+  " onclick="MemoryAdd(document.calculator.answer.value); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="calc0" class="green" value="  0  " onclick="CheckNumber('0'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="negate" class="green" value="+/- " onclick="NegateButton(); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="dot" class="green" value="  .   " onclick="CheckNumber('.'); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="plus" class="brown" value=" +  " onclick="AddButton(1); return false;"/&gt;&lt;/td&gt; 
&lt;td&gt;&lt;input type="button" name="equal" class="brown" value="  =   " onclick="EqualButton(); return false;"/&gt;&lt;/td&gt; 
&lt;/tr&gt; 
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt; 
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt; 
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt; 
&lt;/table&gt;&lt;/form&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/calculadora.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-8480289127864534990</guid><pubDate>Fri, 02 Jun 2017 21:17:00 +0000</pubDate><atom:updated>2017-06-02T16:17:25.719-05:00</atom:updated><title>Practica Manual de Percentiles13</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;style&gt;
.draggable { position:absolute; top:65px; left:69px; width: 50px; height: 50px; background:url(http://www.uropediatra-online.com/files/Herramientas/Punto%20Rosa-Ni%C3%B1a.png); }
#contenedor { display: block; position:relative; width:501px; height:501px; margin: 0px auto; text-align: center; background:url(http://www.uropediatra-online.com/files/Herramientas/Curva%20Percentiles%20Ni%C3%B1as2.jpg); }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;
/*!
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){

var 
	// Will speed up references to window, and allows munging its name.
	window = this,
	// Will speed up references to undefined, and allows munging its name.
	undefined,
	// Map over jQuery in case of overwrite
	_jQuery = window.jQuery,
	// Map over the $ in case of overwrite
	_$ = window.$,

	jQuery = window.jQuery = window.$ = function( selector, context ) {
		// The jQuery object is actually just the init constructor 'enhanced'
		return new jQuery.fn.init( selector, context );
	},

	// A simple way to check for HTML strings or ID strings
	// (both of which we optimize for)
	quickExpr = /^[^&lt;]*(&lt;(.|\s)+&gt;)[^&gt;]*$|^#([\w-]+)$/,
	// Is it a simple selector
	isSimple = /^.[^:#\[\.,]*$/;

jQuery.fn = jQuery.prototype = {
	init: function( selector, context ) {
		// Make sure that a selection was provided
		selector = selector || document;

		// Handle $(DOMElement)
		if ( selector.nodeType ) {
			this[0] = selector;
			this.length = 1;
			this.context = selector;
			return this;
		}
		// Handle HTML strings
		if ( typeof selector === "string" ) {
			// Are we dealing with HTML string or an ID?
			var match = quickExpr.exec( selector );

			// Verify a match, and that no context was specified for #id
			if ( match &amp;&amp; (match[1] || !context) ) {

				// HANDLE: $(html) -&gt; $(array)
				if ( match[1] )
					selector = jQuery.clean( [ match[1] ], context );

				// HANDLE: $("#id")
				else {
					var elem = document.getElementById( match[3] );

					// Handle the case where IE and Opera return items
					// by name instead of ID
					if ( elem &amp;&amp; elem.id != match[3] )
						return jQuery().find( selector );

					// Otherwise, we inject the element directly into the jQuery object
					var ret = jQuery( elem || [] );
					ret.context = document;
					ret.selector = selector;
					return ret;
				}

			// HANDLE: $(expr, [context])
			// (which is just equivalent to: $(content).find(expr)
			} else
				return jQuery( context ).find( selector );

		// HANDLE: $(function)
		// Shortcut for document ready
		} else if ( jQuery.isFunction( selector ) )
			return jQuery( document ).ready( selector );

		// Make sure that old selector state is passed along
		if ( selector.selector &amp;&amp; selector.context ) {
			this.selector = selector.selector;
			this.context = selector.context;
		}

		return this.setArray(jQuery.isArray( selector ) ?
			selector :
			jQuery.makeArray(selector));
	},

	// Start with an empty selector
	selector: "",

	// The current version of jQuery being used
	jquery: "1.3.2",

	// The number of elements contained in the matched element set
	size: function() {
		return this.length;
	},

	// Get the Nth element in the matched element set OR
	// Get the whole matched element set as a clean array
	get: function( num ) {
		return num === undefined ?

			// Return a 'clean' array
			Array.prototype.slice.call( this ) :

			// Return just the object
			this[ num ];
	},

	// Take an array of elements and push it onto the stack
	// (returning the new matched element set)
	pushStack: function( elems, name, selector ) {
		// Build a new jQuery matched element set
		var ret = jQuery( elems );

		// Add the old object onto the stack (as a reference)
		ret.prevObject = this;

		ret.context = this.context;

		if ( name === "find" )
			ret.selector = this.selector + (this.selector ? " " : "") + selector;
		else if ( name )
			ret.selector = this.selector + "." + name + "(" + selector + ")";

		// Return the newly-formed element set
		return ret;
	},

	// Force the current matched set of elements to become
	// the specified array of elements (destroying the stack in the process)
	// You should use pushStack() in order to do this, but maintain the stack
	setArray: function( elems ) {
		// Resetting the length to 0, then using the native Array push
		// is a super-fast way to populate an object with array-like properties
		this.length = 0;
		Array.prototype.push.apply( this, elems );

		return this;
	},

	// Execute a callback for every element in the matched set.
	// (You can seed the arguments with an array of args, but this is
	// only used internally.)
	each: function( callback, args ) {
		return jQuery.each( this, callback, args );
	},

	// Determine the position of an element within
	// the matched set of elements
	index: function( elem ) {
		// Locate the position of the desired element
		return jQuery.inArray(
			// If it receives a jQuery object, the first element is used
			elem &amp;&amp; elem.jquery ? elem[0] : elem
		, this );
	},

	attr: function( name, value, type ) {
		var options = name;

		// Look for the case where we're accessing a style value
		if ( typeof name === "string" )
			if ( value === undefined )
				return this[0] &amp;&amp; jQuery[ type || "attr" ]( this[0], name );

			else {
				options = {};
				options[ name ] = value;
			}

		// Check to see if we're setting style values
		return this.each(function(i){
			// Set all the styles
			for ( name in options )
				jQuery.attr(
					type ?
						this.style :
						this,
					name, jQuery.prop( this, options[ name ], type, i, name )
				);
		});
	},

	css: function( key, value ) {
		// ignore negative width and height values
		if ( (key == 'width' || key == 'height') &amp;&amp; parseFloat(value) &lt; 0 )
			value = undefined;
		return this.attr( key, value, "curCSS" );
	},

	text: function( text ) {
		if ( typeof text !== "object" &amp;&amp; text != null )
			return this.empty().append( (this[0] &amp;&amp; this[0].ownerDocument || document).createTextNode( text ) );

		var ret = "";

		jQuery.each( text || this, function(){
			jQuery.each( this.childNodes, function(){
				if ( this.nodeType != 8 )
					ret += this.nodeType != 1 ?
						this.nodeValue :
						jQuery.fn.text( [ this ] );
			});
		});

		return ret;
	},

	wrapAll: function( html ) {
		if ( this[0] ) {
			// The elements to wrap the target around
			var wrap = jQuery( html, this[0].ownerDocument ).clone();

			if ( this[0].parentNode )
				wrap.insertBefore( this[0] );

			wrap.map(function(){
				var elem = this;

				while ( elem.firstChild )
					elem = elem.firstChild;

				return elem;
			}).append(this);
		}

		return this;
	},

	wrapInner: function( html ) {
		return this.each(function(){
			jQuery( this ).contents().wrapAll( html );
		});
	},

	wrap: function( html ) {
		return this.each(function(){
			jQuery( this ).wrapAll( html );
		});
	},

	append: function() {
		return this.domManip(arguments, true, function(elem){
			if (this.nodeType == 1)
				this.appendChild( elem );
		});
	},

	prepend: function() {
		return this.domManip(arguments, true, function(elem){
			if (this.nodeType == 1)
				this.insertBefore( elem, this.firstChild );
		});
	},

	before: function() {
		return this.domManip(arguments, false, function(elem){
			this.parentNode.insertBefore( elem, this );
		});
	},

	after: function() {
		return this.domManip(arguments, false, function(elem){
			this.parentNode.insertBefore( elem, this.nextSibling );
		});
	},

	end: function() {
		return this.prevObject || jQuery( [] );
	},

	// For internal use only.
	// Behaves like an Array's method, not like a jQuery method.
	push: [].push,
	sort: [].sort,
	splice: [].splice,

	find: function( selector ) {
		if ( this.length === 1 ) {
			var ret = this.pushStack( [], "find", selector );
			ret.length = 0;
			jQuery.find( selector, this[0], ret );
			return ret;
		} else {
			return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){
				return jQuery.find( selector, elem );
			})), "find", selector );
		}
	},

	clone: function( events ) {
		// Do the clone
		var ret = this.map(function(){
			if ( !jQuery.support.noCloneEvent &amp;&amp; !jQuery.isXMLDoc(this) ) {
				// IE copies events bound via attachEvent when
				// using cloneNode. Calling detachEvent on the
				// clone will also remove the events from the orignal
				// In order to get around this, we use innerHTML.
				// Unfortunately, this means some modifications to
				// attributes in IE that are actually only stored
				// as properties will not be copied (such as the
				// the name attribute on an input).
				var html = this.outerHTML;
				if ( !html ) {
					var div = this.ownerDocument.createElement("div");
					div.appendChild( this.cloneNode(true) );
					html = div.innerHTML;
				}

				return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0];
			} else
				return this.cloneNode(true);
		});

		// Copy the events from the original to the clone
		if ( events === true ) {
			var orig = this.find("*").andSelf(), i = 0;

			ret.find("*").andSelf().each(function(){
				if ( this.nodeName !== orig[i].nodeName )
					return;

				var events = jQuery.data( orig[i], "events" );

				for ( var type in events ) {
					for ( var handler in events[ type ] ) {
						jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
					}
				}

				i++;
			});
		}

		// Return the cloned set
		return ret;
	},

	filter: function( selector ) {
		return this.pushStack(
			jQuery.isFunction( selector ) &amp;&amp;
			jQuery.grep(this, function(elem, i){
				return selector.call( elem, i );
			}) ||

			jQuery.multiFilter( selector, jQuery.grep(this, function(elem){
				return elem.nodeType === 1;
			}) ), "filter", selector );
	},

	closest: function( selector ) {
		var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null,
			closer = 0;

		return this.map(function(){
			var cur = this;
			while ( cur &amp;&amp; cur.ownerDocument ) {
				if ( pos ? pos.index(cur) &gt; -1 : jQuery(cur).is(selector) ) {
					jQuery.data(cur, "closest", closer);
					return cur;
				}
				cur = cur.parentNode;
				closer++;
			}
		});
	},

	not: function( selector ) {
		if ( typeof selector === "string" )
			// test special case where just one selector is passed in
			if ( isSimple.test( selector ) )
				return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector );
			else
				selector = jQuery.multiFilter( selector, this );

		var isArrayLike = selector.length &amp;&amp; selector[selector.length - 1] !== undefined &amp;&amp; !selector.nodeType;
		return this.filter(function() {
			return isArrayLike ? jQuery.inArray( this, selector ) &lt; 0 : this != selector;
		});
	},

	add: function( selector ) {
		return this.pushStack( jQuery.unique( jQuery.merge(
			this.get(),
			typeof selector === "string" ?
				jQuery( selector ) :
				jQuery.makeArray( selector )
		)));
	},

	is: function( selector ) {
		return !!selector &amp;&amp; jQuery.multiFilter( selector, this ).length &gt; 0;
	},

	hasClass: function( selector ) {
		return !!selector &amp;&amp; this.is( "." + selector );
	},

	val: function( value ) {
		if ( value === undefined ) {			
			var elem = this[0];

			if ( elem ) {
				if( jQuery.nodeName( elem, 'option' ) )
					return (elem.attributes.value || {}).specified ? elem.value : elem.text;
				
				// We need to handle select boxes special
				if ( jQuery.nodeName( elem, "select" ) ) {
					var index = elem.selectedIndex,
						values = [],
						options = elem.options,
						one = elem.type == "select-one";

					// Nothing was selected
					if ( index &lt; 0 )
						return null;

					// Loop through all the selected options
					for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i &lt; max; i++ ) {
						var option = options[ i ];

						if ( option.selected ) {
							// Get the specifc value for the option
							value = jQuery(option).val();

							// We don't need an array for one selects
							if ( one )
								return value;

							// Multi-Selects return an array
							values.push( value );
						}
					}

					return values;				
				}

				// Everything else, we just grab the value
				return (elem.value || "").replace(/\r/g, "");

			}

			return undefined;
		}

		if ( typeof value === "number" )
			value += '';

		return this.each(function(){
			if ( this.nodeType != 1 )
				return;

			if ( jQuery.isArray(value) &amp;&amp; /radio|checkbox/.test( this.type ) )
				this.checked = (jQuery.inArray(this.value, value) &gt;= 0 ||
					jQuery.inArray(this.name, value) &gt;= 0);

			else if ( jQuery.nodeName( this, "select" ) ) {
				var values = jQuery.makeArray(value);

				jQuery( "option", this ).each(function(){
					this.selected = (jQuery.inArray( this.value, values ) &gt;= 0 ||
						jQuery.inArray( this.text, values ) &gt;= 0);
				});

				if ( !values.length )
					this.selectedIndex = -1;

			} else
				this.value = value;
		});
	},

	html: function( value ) {
		return value === undefined ?
			(this[0] ?
				this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") :
				null) :
			this.empty().append( value );
	},

	replaceWith: function( value ) {
		return this.after( value ).remove();
	},

	eq: function( i ) {
		return this.slice( i, +i + 1 );
	},

	slice: function() {
		return this.pushStack( Array.prototype.slice.apply( this, arguments ),
			"slice", Array.prototype.slice.call(arguments).join(",") );
	},

	map: function( callback ) {
		return this.pushStack( jQuery.map(this, function(elem, i){
			return callback.call( elem, i, elem );
		}));
	},

	andSelf: function() {
		return this.add( this.prevObject );
	},

	domManip: function( args, table, callback ) {
		if ( this[0] ) {
			var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),
				scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),
				first = fragment.firstChild;

			if ( first )
				for ( var i = 0, l = this.length; i &lt; l; i++ )
					callback.call( root(this[i], first), this.length &gt; 1 || i &gt; 0 ?
							fragment.cloneNode(true) : fragment );
		
			if ( scripts )
				jQuery.each( scripts, evalScript );
		}

		return this;
		
		function root( elem, cur ) {
			return table &amp;&amp; jQuery.nodeName(elem, "table") &amp;&amp; jQuery.nodeName(cur, "tr") ?
				(elem.getElementsByTagName("tbody")[0] ||
				elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
				elem;
		}
	}
};

// Give the init function the jQuery prototype for later instantiation
jQuery.fn.init.prototype = jQuery.fn;

function evalScript( i, elem ) {
	if ( elem.src )
		jQuery.ajax({
			url: elem.src,
			async: false,
			dataType: "script"
		});

	else
		jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );

	if ( elem.parentNode )
		elem.parentNode.removeChild( elem );
}

function now(){
	return +new Date;
}

jQuery.extend = jQuery.fn.extend = function() {
	// copy reference to target object
	var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;

	// Handle a deep copy situation
	if ( typeof target === "boolean" ) {
		deep = target;
		target = arguments[1] || {};
		// skip the boolean and the target
		i = 2;
	}

	// Handle case when target is a string or something (possible in deep copy)
	if ( typeof target !== "object" &amp;&amp; !jQuery.isFunction(target) )
		target = {};

	// extend jQuery itself if only one argument is passed
	if ( length == i ) {
		target = this;
		--i;
	}

	for ( ; i &lt; length; i++ )
		// Only deal with non-null/undefined values
		if ( (options = arguments[ i ]) != null )
			// Extend the base object
			for ( var name in options ) {
				var src = target[ name ], copy = options[ name ];

				// Prevent never-ending loop
				if ( target === copy )
					continue;

				// Recurse if we're merging object values
				if ( deep &amp;&amp; copy &amp;&amp; typeof copy === "object" &amp;&amp; !copy.nodeType )
					target[ name ] = jQuery.extend( deep, 
						// Never move original objects, clone them
						src || ( copy.length != null ? [ ] : { } )
					, copy );

				// Don't bring in undefined values
				else if ( copy !== undefined )
					target[ name ] = copy;

			}

	// Return the modified object
	return target;
};

// exclude the following css properties to add px
var	exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
	// cache defaultView
	defaultView = document.defaultView || {},
	toString = Object.prototype.toString;

jQuery.extend({
	noConflict: function( deep ) {
		window.$ = _$;

		if ( deep )
			window.jQuery = _jQuery;

		return jQuery;
	},

	// See test/unit/core.js for details concerning isFunction.
	// Since version 1.3, DOM methods and functions like alert
	// aren't supported. They return false on IE (#2968).
	isFunction: function( obj ) {
		return toString.call(obj) === "[object Function]";
	},

	isArray: function( obj ) {
		return toString.call(obj) === "[object Array]";
	},

	// check if an element is in a (or is an) XML document
	isXMLDoc: function( elem ) {
		return elem.nodeType === 9 &amp;&amp; elem.documentElement.nodeName !== "HTML" ||
			!!elem.ownerDocument &amp;&amp; jQuery.isXMLDoc( elem.ownerDocument );
	},

	// Evalulates a script in a global context
	globalEval: function( data ) {
		if ( data &amp;&amp; /\S/.test(data) ) {
			// Inspired by code by Andrea Giammarchi
			// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
			var head = document.getElementsByTagName("head")[0] || document.documentElement,
				script = document.createElement("script");

			script.type = "text/javascript";
			if ( jQuery.support.scriptEval )
				script.appendChild( document.createTextNode( data ) );
			else
				script.text = data;

			// Use insertBefore instead of appendChild  to circumvent an IE6 bug.
			// This arises when a base node is used (#2709).
			head.insertBefore( script, head.firstChild );
			head.removeChild( script );
		}
	},

	nodeName: function( elem, name ) {
		return elem.nodeName &amp;&amp; elem.nodeName.toUpperCase() == name.toUpperCase();
	},

	// args is for internal usage only
	each: function( object, callback, args ) {
		var name, i = 0, length = object.length;

		if ( args ) {
			if ( length === undefined ) {
				for ( name in object )
					if ( callback.apply( object[ name ], args ) === false )
						break;
			} else
				for ( ; i &lt; length; )
					if ( callback.apply( object[ i++ ], args ) === false )
						break;

		// A special, fast, case for the most common use of each
		} else {
			if ( length === undefined ) {
				for ( name in object )
					if ( callback.call( object[ name ], name, object[ name ] ) === false )
						break;
			} else
				for ( var value = object[0];
					i &lt; length &amp;&amp; callback.call( value, i, value ) !== false; value = object[++i] ){}
		}

		return object;
	},

	prop: function( elem, value, type, i, name ) {
		// Handle executable functions
		if ( jQuery.isFunction( value ) )
			value = value.call( elem, i );

		// Handle passing in a number to a CSS property
		return typeof value === "number" &amp;&amp; type == "curCSS" &amp;&amp; !exclude.test( name ) ?
			value + "px" :
			value;
	},

	className: {
		// internal only, use addClass("class")
		add: function( elem, classNames ) {
			jQuery.each((classNames || "").split(/\s+/), function(i, className){
				if ( elem.nodeType == 1 &amp;&amp; !jQuery.className.has( elem.className, className ) )
					elem.className += (elem.className ? " " : "") + className;
			});
		},

		// internal only, use removeClass("class")
		remove: function( elem, classNames ) {
			if (elem.nodeType == 1)
				elem.className = classNames !== undefined ?
					jQuery.grep(elem.className.split(/\s+/), function(className){
						return !jQuery.className.has( classNames, className );
					}).join(" ") :
					"";
		},

		// internal only, use hasClass("class")
		has: function( elem, className ) {
			return elem &amp;&amp; jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) &gt; -1;
		}
	},

	// A method for quickly swapping in/out CSS properties to get correct calculations
	swap: function( elem, options, callback ) {
		var old = {};
		// Remember the old values, and insert the new ones
		for ( var name in options ) {
			old[ name ] = elem.style[ name ];
			elem.style[ name ] = options[ name ];
		}

		callback.call( elem );

		// Revert the old values
		for ( var name in options )
			elem.style[ name ] = old[ name ];
	},

	css: function( elem, name, force, extra ) {
		if ( name == "width" || name == "height" ) {
			var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];

			function getWH() {
				val = name == "width" ? elem.offsetWidth : elem.offsetHeight;

				if ( extra === "border" )
					return;

				jQuery.each( which, function() {
					if ( !extra )
						val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
					if ( extra === "margin" )
						val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
					else
						val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
				});
			}

			if ( elem.offsetWidth !== 0 )
				getWH();
			else
				jQuery.swap( elem, props, getWH );

			return Math.max(0, Math.round(val));
		}

		return jQuery.curCSS( elem, name, force );
	},

	curCSS: function( elem, name, force ) {
		var ret, style = elem.style;

		// We need to handle opacity special in IE
		if ( name == "opacity" &amp;&amp; !jQuery.support.opacity ) {
			ret = jQuery.attr( style, "opacity" );

			return ret == "" ?
				"1" :
				ret;
		}

		// Make sure we're using the right name for getting the float value
		if ( name.match( /float/i ) )
			name = styleFloat;

		if ( !force &amp;&amp; style &amp;&amp; style[ name ] )
			ret = style[ name ];

		else if ( defaultView.getComputedStyle ) {

			// Only "float" is needed here
			if ( name.match( /float/i ) )
				name = "float";

			name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();

			var computedStyle = defaultView.getComputedStyle( elem, null );

			if ( computedStyle )
				ret = computedStyle.getPropertyValue( name );

			// We should always get a number back from opacity
			if ( name == "opacity" &amp;&amp; ret == "" )
				ret = "1";

		} else if ( elem.currentStyle ) {
			var camelCase = name.replace(/\-(\w)/g, function(all, letter){
				return letter.toUpperCase();
			});

			ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];

			// From the awesome hack by Dean Edwards
			// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291

			// If we're not dealing with a regular pixel number
			// but a number that has a weird ending, we need to convert it to pixels
			if ( !/^\d+(px)?$/i.test( ret ) &amp;&amp; /^\d/.test( ret ) ) {
				// Remember the original values
				var left = style.left, rsLeft = elem.runtimeStyle.left;

				// Put in the new values to get a computed value out
				elem.runtimeStyle.left = elem.currentStyle.left;
				style.left = ret || 0;
				ret = style.pixelLeft + "px";

				// Revert the changed values
				style.left = left;
				elem.runtimeStyle.left = rsLeft;
			}
		}

		return ret;
	},

	clean: function( elems, context, fragment ) {
		context = context || document;

		// !context.createElement fails in IE with an error but returns typeof 'object'
		if ( typeof context.createElement === "undefined" )
			context = context.ownerDocument || context[0] &amp;&amp; context[0].ownerDocument || document;

		// If a single string is passed in and it's a single tag
		// just do a createElement and skip the rest
		if ( !fragment &amp;&amp; elems.length === 1 &amp;&amp; typeof elems[0] === "string" ) {
			var match = /^&lt;(\w+)\s*\/?&gt;$/.exec(elems[0]);
			if ( match )
				return [ context.createElement( match[1] ) ];
		}

		var ret = [], scripts = [], div = context.createElement("div");

		jQuery.each(elems, function(i, elem){
			if ( typeof elem === "number" )
				elem += '';

			if ( !elem )
				return;

			// Convert html string into DOM nodes
			if ( typeof elem === "string" ) {
				// Fix "XHTML"-style tags in all browsers
				elem = elem.replace(/(&lt;(\w+)[^&gt;]*?)\/&gt;/g, function(all, front, tag){
					return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
						all :
						front + "&gt;&lt;/" + tag + "&gt;";
				});

				// Trim whitespace, otherwise indexOf won't work as expected
				var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase();

				var wrap =
					// option or optgroup
					!tags.indexOf("&lt;opt") &amp;&amp;
					[ 1, "&lt;select multiple='multiple'&gt;", "&lt;/select&gt;" ] ||

					!tags.indexOf("&lt;leg") &amp;&amp;
					[ 1, "&lt;fieldset&gt;", "&lt;/fieldset&gt;" ] ||

					tags.match(/^&lt;(thead|tbody|tfoot|colg|cap)/) &amp;&amp;
					[ 1, "&lt;table&gt;", "&lt;/table&gt;" ] ||

					!tags.indexOf("&lt;tr") &amp;&amp;
					[ 2, "&lt;table&gt;&lt;tbody&gt;", "&lt;/tbody&gt;&lt;/table&gt;" ] ||

				 	// &lt;thead&gt; matched above
					(!tags.indexOf("&lt;td") || !tags.indexOf("&lt;th")) &amp;&amp;
					[ 3, "&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;", "&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;" ] ||

					!tags.indexOf("&lt;col") &amp;&amp;
					[ 2, "&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;colgroup&gt;", "&lt;/colgroup&gt;&lt;/table&gt;" ] ||

					// IE can't serialize &lt;link&gt; and &lt;script&gt; tags normally
					!jQuery.support.htmlSerialize &amp;&amp;
					[ 1, "div&lt;div&gt;", "&lt;/div&gt;" ] ||

					[ 0, "", "" ];

				// Go to html and back, then peel off extra wrappers
				div.innerHTML = wrap[1] + elem + wrap[2];

				// Move to the right depth
				while ( wrap[0]-- )
					div = div.lastChild;

				// Remove IE's autoinserted &lt;tbody&gt; from table fragments
				if ( !jQuery.support.tbody ) {

					// String was a &lt;table&gt;, *may* have spurious &lt;tbody&gt;
					var hasBody = /&lt;tbody/i.test(elem),
						tbody = !tags.indexOf("&lt;table") &amp;&amp; !hasBody ?
							div.firstChild &amp;&amp; div.firstChild.childNodes :

						// String was a bare &lt;thead&gt; or &lt;tfoot&gt;
						wrap[1] == "&lt;table&gt;" &amp;&amp; !hasBody ?
							div.childNodes :
							[];

					for ( var j = tbody.length - 1; j &gt;= 0 ; --j )
						if ( jQuery.nodeName( tbody[ j ], "tbody" ) &amp;&amp; !tbody[ j ].childNodes.length )
							tbody[ j ].parentNode.removeChild( tbody[ j ] );

					}

				// IE completely kills leading whitespace when innerHTML is used
				if ( !jQuery.support.leadingWhitespace &amp;&amp; /^\s/.test( elem ) )
					div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
				
				elem = jQuery.makeArray( div.childNodes );
			}

			if ( elem.nodeType )
				ret.push( elem );
			else
				ret = jQuery.merge( ret, elem );

		});

		if ( fragment ) {
			for ( var i = 0; ret[i]; i++ ) {
				if ( jQuery.nodeName( ret[i], "script" ) &amp;&amp; (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
					scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
				} else {
					if ( ret[i].nodeType === 1 )
						ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
					fragment.appendChild( ret[i] );
				}
			}
			
			return scripts;
		}

		return ret;
	},

	attr: function( elem, name, value ) {
		// don't set attributes on text and comment nodes
		if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
			return undefined;

		var notxml = !jQuery.isXMLDoc( elem ),
			// Whether we are setting (or getting)
			set = value !== undefined;

		// Try to normalize/fix the name
		name = notxml &amp;&amp; jQuery.props[ name ] || name;

		// Only do all the following if this is a node (faster for style)
		// IE elem.getAttribute passes even for style
		if ( elem.tagName ) {

			// These attributes require special treatment
			var special = /href|src|style/.test( name );

			// Safari mis-reports the default selected property of a hidden option
			// Accessing the parent's selectedIndex property fixes it
			if ( name == "selected" &amp;&amp; elem.parentNode )
				elem.parentNode.selectedIndex;

			// If applicable, access the attribute via the DOM 0 way
			if ( name in elem &amp;&amp; notxml &amp;&amp; !special ) {
				if ( set ){
					// We can't allow the type property to be changed (since it causes problems in IE)
					if ( name == "type" &amp;&amp; jQuery.nodeName( elem, "input" ) &amp;&amp; elem.parentNode )
						throw "type property can't be changed";

					elem[ name ] = value;
				}

				// browsers index elements by id/name on forms, give priority to attributes.
				if( jQuery.nodeName( elem, "form" ) &amp;&amp; elem.getAttributeNode(name) )
					return elem.getAttributeNode( name ).nodeValue;

				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
				if ( name == "tabIndex" ) {
					var attributeNode = elem.getAttributeNode( "tabIndex" );
					return attributeNode &amp;&amp; attributeNode.specified
						? attributeNode.value
						: elem.nodeName.match(/(button|input|object|select|textarea)/i)
							? 0
							: elem.nodeName.match(/^(a|area)$/i) &amp;&amp; elem.href
								? 0
								: undefined;
				}

				return elem[ name ];
			}

			if ( !jQuery.support.style &amp;&amp; notxml &amp;&amp;  name == "style" )
				return jQuery.attr( elem.style, "cssText", value );

			if ( set )
				// convert the value to a string (all browsers do this but IE) see #1070
				elem.setAttribute( name, "" + value );

			var attr = !jQuery.support.hrefNormalized &amp;&amp; notxml &amp;&amp; special
					// Some attributes require a special call on IE
					? elem.getAttribute( name, 2 )
					: elem.getAttribute( name );

			// Non-existent attributes return null, we normalize to undefined
			return attr === null ? undefined : attr;
		}

		// elem is actually elem.style ... set the style

		// IE uses filters for opacity
		if ( !jQuery.support.opacity &amp;&amp; name == "opacity" ) {
			if ( set ) {
				// IE has trouble with opacity if it does not have layout
				// Force it by setting the zoom level
				elem.zoom = 1;

				// Set the alpha filter to set the opacity
				elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
					(parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
			}

			return elem.filter &amp;&amp; elem.filter.indexOf("opacity=") &gt;= 0 ?
				(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
				"";
		}

		name = name.replace(/-([a-z])/ig, function(all, letter){
			return letter.toUpperCase();
		});

		if ( set )
			elem[ name ] = value;

		return elem[ name ];
	},

	trim: function( text ) {
		return (text || "").replace( /^\s+|\s+$/g, "" );
	},

	makeArray: function( array ) {
		var ret = [];

		if( array != null ){
			var i = array.length;
			// The window, strings (and functions) also have 'length'
			if( i == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval )
				ret[0] = array;
			else
				while( i )
					ret[--i] = array[i];
		}

		return ret;
	},

	inArray: function( elem, array ) {
		for ( var i = 0, length = array.length; i &lt; length; i++ )
		// Use === because on IE, window == document
			if ( array[ i ] === elem )
				return i;

		return -1;
	},

	merge: function( first, second ) {
		// We have to loop this way because IE &amp; Opera overwrite the length
		// expando of getElementsByTagName
		var i = 0, elem, pos = first.length;
		// Also, we need to make sure that the correct elements are being returned
		// (IE returns comment nodes in a '*' query)
		if ( !jQuery.support.getAll ) {
			while ( (elem = second[ i++ ]) != null )
				if ( elem.nodeType != 8 )
					first[ pos++ ] = elem;

		} else
			while ( (elem = second[ i++ ]) != null )
				first[ pos++ ] = elem;

		return first;
	},

	unique: function( array ) {
		var ret = [], done = {};

		try {

			for ( var i = 0, length = array.length; i &lt; length; i++ ) {
				var id = jQuery.data( array[ i ] );

				if ( !done[ id ] ) {
					done[ id ] = true;
					ret.push( array[ i ] );
				}
			}

		} catch( e ) {
			ret = array;
		}

		return ret;
	},

	grep: function( elems, callback, inv ) {
		var ret = [];

		// Go through the array, only saving the items
		// that pass the validator function
		for ( var i = 0, length = elems.length; i &lt; length; i++ )
			if ( !inv != !callback( elems[ i ], i ) )
				ret.push( elems[ i ] );

		return ret;
	},

	map: function( elems, callback ) {
		var ret = [];

		// Go through the array, translating each of the items to their
		// new value (or values).
		for ( var i = 0, length = elems.length; i &lt; length; i++ ) {
			var value = callback( elems[ i ], i );

			if ( value != null )
				ret[ ret.length ] = value;
		}

		return ret.concat.apply( [], ret );
	}
});

// Use of jQuery.browser is deprecated.
// It's included for backwards compatibility and plugins,
// although they should work to migrate away.

var userAgent = navigator.userAgent.toLowerCase();

// Figure out what browser is being used
jQuery.browser = {
	version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
	safari: /webkit/.test( userAgent ),
	opera: /opera/.test( userAgent ),
	msie: /msie/.test( userAgent ) &amp;&amp; !/opera/.test( userAgent ),
	mozilla: /mozilla/.test( userAgent ) &amp;&amp; !/(compatible|webkit)/.test( userAgent )
};

jQuery.each({
	parent: function(elem){return elem.parentNode;},
	parents: function(elem){return jQuery.dir(elem,"parentNode");},
	next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
	prev: function(elem){return jQuery.nth(elem,2,"previousSibling");},
	nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
	prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
	siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
	children: function(elem){return jQuery.sibling(elem.firstChild);},
	contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
}, function(name, fn){
	jQuery.fn[ name ] = function( selector ) {
		var ret = jQuery.map( this, fn );

		if ( selector &amp;&amp; typeof selector == "string" )
			ret = jQuery.multiFilter( selector, ret );

		return this.pushStack( jQuery.unique( ret ), name, selector );
	};
});

jQuery.each({
	appendTo: "append",
	prependTo: "prepend",
	insertBefore: "before",
	insertAfter: "after",
	replaceAll: "replaceWith"
}, function(name, original){
	jQuery.fn[ name ] = function( selector ) {
		var ret = [], insert = jQuery( selector );

		for ( var i = 0, l = insert.length; i &lt; l; i++ ) {
			var elems = (i &gt; 0 ? this.clone(true) : this).get();
			jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
			ret = ret.concat( elems );
		}

		return this.pushStack( ret, name, selector );
	};
});

jQuery.each({
	removeAttr: function( name ) {
		jQuery.attr( this, name, "" );
		if (this.nodeType == 1)
			this.removeAttribute( name );
	},

	addClass: function( classNames ) {
		jQuery.className.add( this, classNames );
	},

	removeClass: function( classNames ) {
		jQuery.className.remove( this, classNames );
	},

	toggleClass: function( classNames, state ) {
		if( typeof state !== "boolean" )
			state = !jQuery.className.has( this, classNames );
		jQuery.className[ state ? "add" : "remove" ]( this, classNames );
	},

	remove: function( selector ) {
		if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
			// Prevent memory leaks
			jQuery( "*", this ).add([this]).each(function(){
				jQuery.event.remove(this);
				jQuery.removeData(this);
			});
			if (this.parentNode)
				this.parentNode.removeChild( this );
		}
	},

	empty: function() {
		// Remove element nodes and prevent memory leaks
		jQuery(this).children().remove();

		// Remove any remaining nodes
		while ( this.firstChild )
			this.removeChild( this.firstChild );
	}
}, function(name, fn){
	jQuery.fn[ name ] = function(){
		return this.each( fn, arguments );
	};
});

// Helper function used by the dimensions and offset modules
function num(elem, prop) {
	return elem[0] &amp;&amp; parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
}
var expando = "jQuery" + now(), uuid = 0, windowData = {};

jQuery.extend({
	cache: {},

	data: function( elem, name, data ) {
		elem = elem == window ?
			windowData :
			elem;

		var id = elem[ expando ];

		// Compute a unique ID for the element
		if ( !id )
			id = elem[ expando ] = ++uuid;

		// Only generate the data cache if we're
		// trying to access or manipulate it
		if ( name &amp;&amp; !jQuery.cache[ id ] )
			jQuery.cache[ id ] = {};

		// Prevent overriding the named cache with undefined values
		if ( data !== undefined )
			jQuery.cache[ id ][ name ] = data;

		// Return the named cache data, or the ID for the element
		return name ?
			jQuery.cache[ id ][ name ] :
			id;
	},

	removeData: function( elem, name ) {
		elem = elem == window ?
			windowData :
			elem;

		var id = elem[ expando ];

		// If we want to remove a specific section of the element's data
		if ( name ) {
			if ( jQuery.cache[ id ] ) {
				// Remove the section of cache data
				delete jQuery.cache[ id ][ name ];

				// If we've removed all the data, remove the element's cache
				name = "";

				for ( name in jQuery.cache[ id ] )
					break;

				if ( !name )
					jQuery.removeData( elem );
			}

		// Otherwise, we want to remove all of the element's data
		} else {
			// Clean up the element expando
			try {
				delete elem[ expando ];
			} catch(e){
				// IE has trouble directly removing the expando
				// but it's ok with using removeAttribute
				if ( elem.removeAttribute )
					elem.removeAttribute( expando );
			}

			// Completely remove the data cache
			delete jQuery.cache[ id ];
		}
	},
	queue: function( elem, type, data ) {
		if ( elem ){
	
			type = (type || "fx") + "queue";
	
			var q = jQuery.data( elem, type );
	
			if ( !q || jQuery.isArray(data) )
				q = jQuery.data( elem, type, jQuery.makeArray(data) );
			else if( data )
				q.push( data );
	
		}
		return q;
	},

	dequeue: function( elem, type ){
		var queue = jQuery.queue( elem, type ),
			fn = queue.shift();
		
		if( !type || type === "fx" )
			fn = queue[0];
			
		if( fn !== undefined )
			fn.call(elem);
	}
});

jQuery.fn.extend({
	data: function( key, value ){
		var parts = key.split(".");
		parts[1] = parts[1] ? "." + parts[1] : "";

		if ( value === undefined ) {
			var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);

			if ( data === undefined &amp;&amp; this.length )
				data = jQuery.data( this[0], key );

			return data === undefined &amp;&amp; parts[1] ?
				this.data( parts[0] ) :
				data;
		} else
			return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
				jQuery.data( this, key, value );
			});
	},

	removeData: function( key ){
		return this.each(function(){
			jQuery.removeData( this, key );
		});
	},
	queue: function(type, data){
		if ( typeof type !== "string" ) {
			data = type;
			type = "fx";
		}

		if ( data === undefined )
			return jQuery.queue( this[0], type );

		return this.each(function(){
			var queue = jQuery.queue( this, type, data );
			
			 if( type == "fx" &amp;&amp; queue.length == 1 )
				queue[0].call(this);
		});
	},
	dequeue: function(type){
		return this.each(function(){
			jQuery.dequeue( this, type );
		});
	}
});/*!
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){

var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ &gt;+~,(\[\\]+)+|[&gt;+~])(\s*,\s*)?/g,
	done = 0,
	toString = Object.prototype.toString;

var Sizzle = function(selector, context, results, seed) {
	results = results || [];
	context = context || document;

	if ( context.nodeType !== 1 &amp;&amp; context.nodeType !== 9 )
		return [];
	
	if ( !selector || typeof selector !== "string" ) {
		return results;
	}

	var parts = [], m, set, checkSet, check, mode, extra, prune = true;
	
	// Reset the position of the chunker regexp (start from head)
	chunker.lastIndex = 0;
	
	while ( (m = chunker.exec(selector)) !== null ) {
		parts.push( m[1] );
		
		if ( m[2] ) {
			extra = RegExp.rightContext;
			break;
		}
	}

	if ( parts.length &gt; 1 &amp;&amp; origPOS.exec( selector ) ) {
		if ( parts.length === 2 &amp;&amp; Expr.relative[ parts[0] ] ) {
			set = posProcess( parts[0] + parts[1], context );
		} else {
			set = Expr.relative[ parts[0] ] ?
				[ context ] :
				Sizzle( parts.shift(), context );

			while ( parts.length ) {
				selector = parts.shift();

				if ( Expr.relative[ selector ] )
					selector += parts.shift();

				set = posProcess( selector, set );
			}
		}
	} else {
		var ret = seed ?
			{ expr: parts.pop(), set: makeArray(seed) } :
			Sizzle.find( parts.pop(), parts.length === 1 &amp;&amp; context.parentNode ? context.parentNode : context, isXML(context) );
		set = Sizzle.filter( ret.expr, ret.set );

		if ( parts.length &gt; 0 ) {
			checkSet = makeArray(set);
		} else {
			prune = false;
		}

		while ( parts.length ) {
			var cur = parts.pop(), pop = cur;

			if ( !Expr.relative[ cur ] ) {
				cur = "";
			} else {
				pop = parts.pop();
			}

			if ( pop == null ) {
				pop = context;
			}

			Expr.relative[ cur ]( checkSet, pop, isXML(context) );
		}
	}

	if ( !checkSet ) {
		checkSet = set;
	}

	if ( !checkSet ) {
		throw "Syntax error, unrecognized expression: " + (cur || selector);
	}

	if ( toString.call(checkSet) === "[object Array]" ) {
		if ( !prune ) {
			results.push.apply( results, checkSet );
		} else if ( context.nodeType === 1 ) {
			for ( var i = 0; checkSet[i] != null; i++ ) {
				if ( checkSet[i] &amp;&amp; (checkSet[i] === true || checkSet[i].nodeType === 1 &amp;&amp; contains(context, checkSet[i])) ) {
					results.push( set[i] );
				}
			}
		} else {
			for ( var i = 0; checkSet[i] != null; i++ ) {
				if ( checkSet[i] &amp;&amp; checkSet[i].nodeType === 1 ) {
					results.push( set[i] );
				}
			}
		}
	} else {
		makeArray( checkSet, results );
	}

	if ( extra ) {
		Sizzle( extra, context, results, seed );

		if ( sortOrder ) {
			hasDuplicate = false;
			results.sort(sortOrder);

			if ( hasDuplicate ) {
				for ( var i = 1; i &lt; results.length; i++ ) {
					if ( results[i] === results[i-1] ) {
						results.splice(i--, 1);
					}
				}
			}
		}
	}

	return results;
};

Sizzle.matches = function(expr, set){
	return Sizzle(expr, null, null, set);
};

Sizzle.find = function(expr, context, isXML){
	var set, match;

	if ( !expr ) {
		return [];
	}

	for ( var i = 0, l = Expr.order.length; i &lt; l; i++ ) {
		var type = Expr.order[i], match;
		
		if ( (match = Expr.match[ type ].exec( expr )) ) {
			var left = RegExp.leftContext;

			if ( left.substr( left.length - 1 ) !== "\\" ) {
				match[1] = (match[1] || "").replace(/\\/g, "");
				set = Expr.find[ type ]( match, context, isXML );
				if ( set != null ) {
					expr = expr.replace( Expr.match[ type ], "" );
					break;
				}
			}
		}
	}

	if ( !set ) {
		set = context.getElementsByTagName("*");
	}

	return {set: set, expr: expr};
};

Sizzle.filter = function(expr, set, inplace, not){
	var old = expr, result = [], curLoop = set, match, anyFound,
		isXMLFilter = set &amp;&amp; set[0] &amp;&amp; isXML(set[0]);

	while ( expr &amp;&amp; set.length ) {
		for ( var type in Expr.filter ) {
			if ( (match = Expr.match[ type ].exec( expr )) != null ) {
				var filter = Expr.filter[ type ], found, item;
				anyFound = false;

				if ( curLoop == result ) {
					result = [];
				}

				if ( Expr.preFilter[ type ] ) {
					match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );

					if ( !match ) {
						anyFound = found = true;
					} else if ( match === true ) {
						continue;
					}
				}

				if ( match ) {
					for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
						if ( item ) {
							found = filter( item, match, i, curLoop );
							var pass = not ^ !!found;

							if ( inplace &amp;&amp; found != null ) {
								if ( pass ) {
									anyFound = true;
								} else {
									curLoop[i] = false;
								}
							} else if ( pass ) {
								result.push( item );
								anyFound = true;
							}
						}
					}
				}

				if ( found !== undefined ) {
					if ( !inplace ) {
						curLoop = result;
					}

					expr = expr.replace( Expr.match[ type ], "" );

					if ( !anyFound ) {
						return [];
					}

					break;
				}
			}
		}

		// Improper expression
		if ( expr == old ) {
			if ( anyFound == null ) {
				throw "Syntax error, unrecognized expression: " + expr;
			} else {
				break;
			}
		}

		old = expr;
	}

	return curLoop;
};

var Expr = Sizzle.selectors = {
	order: [ "ID", "NAME", "TAG" ],
	match: {
		ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
		CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
		NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,
		ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
		TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,
		CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
		POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
		PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
	},
	attrMap: {
		"class": "className",
		"for": "htmlFor"
	},
	attrHandle: {
		href: function(elem){
			return elem.getAttribute("href");
		}
	},
	relative: {
		"+": function(checkSet, part, isXML){
			var isPartStr = typeof part === "string",
				isTag = isPartStr &amp;&amp; !/\W/.test(part),
				isPartStrNotTag = isPartStr &amp;&amp; !isTag;

			if ( isTag &amp;&amp; !isXML ) {
				part = part.toUpperCase();
			}

			for ( var i = 0, l = checkSet.length, elem; i &lt; l; i++ ) {
				if ( (elem = checkSet[i]) ) {
					while ( (elem = elem.previousSibling) &amp;&amp; elem.nodeType !== 1 ) {}

					checkSet[i] = isPartStrNotTag || elem &amp;&amp; elem.nodeName === part ?
						elem || false :
						elem === part;
				}
			}

			if ( isPartStrNotTag ) {
				Sizzle.filter( part, checkSet, true );
			}
		},
		"&gt;": function(checkSet, part, isXML){
			var isPartStr = typeof part === "string";

			if ( isPartStr &amp;&amp; !/\W/.test(part) ) {
				part = isXML ? part : part.toUpperCase();

				for ( var i = 0, l = checkSet.length; i &lt; l; i++ ) {
					var elem = checkSet[i];
					if ( elem ) {
						var parent = elem.parentNode;
						checkSet[i] = parent.nodeName === part ? parent : false;
					}
				}
			} else {
				for ( var i = 0, l = checkSet.length; i &lt; l; i++ ) {
					var elem = checkSet[i];
					if ( elem ) {
						checkSet[i] = isPartStr ?
							elem.parentNode :
							elem.parentNode === part;
					}
				}

				if ( isPartStr ) {
					Sizzle.filter( part, checkSet, true );
				}
			}
		},
		"": function(checkSet, part, isXML){
			var doneName = done++, checkFn = dirCheck;

			if ( !part.match(/\W/) ) {
				var nodeCheck = part = isXML ? part : part.toUpperCase();
				checkFn = dirNodeCheck;
			}

			checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
		},
		"~": function(checkSet, part, isXML){
			var doneName = done++, checkFn = dirCheck;

			if ( typeof part === "string" &amp;&amp; !part.match(/\W/) ) {
				var nodeCheck = part = isXML ? part : part.toUpperCase();
				checkFn = dirNodeCheck;
			}

			checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
		}
	},
	find: {
		ID: function(match, context, isXML){
			if ( typeof context.getElementById !== "undefined" &amp;&amp; !isXML ) {
				var m = context.getElementById(match[1]);
				return m ? [m] : [];
			}
		},
		NAME: function(match, context, isXML){
			if ( typeof context.getElementsByName !== "undefined" ) {
				var ret = [], results = context.getElementsByName(match[1]);

				for ( var i = 0, l = results.length; i &lt; l; i++ ) {
					if ( results[i].getAttribute("name") === match[1] ) {
						ret.push( results[i] );
					}
				}

				return ret.length === 0 ? null : ret;
			}
		},
		TAG: function(match, context){
			return context.getElementsByTagName(match[1]);
		}
	},
	preFilter: {
		CLASS: function(match, curLoop, inplace, result, not, isXML){
			match = " " + match[1].replace(/\\/g, "") + " ";

			if ( isXML ) {
				return match;
			}

			for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
				if ( elem ) {
					if ( not ^ (elem.className &amp;&amp; (" " + elem.className + " ").indexOf(match) &gt;= 0) ) {
						if ( !inplace )
							result.push( elem );
					} else if ( inplace ) {
						curLoop[i] = false;
					}
				}
			}

			return false;
		},
		ID: function(match){
			return match[1].replace(/\\/g, "");
		},
		TAG: function(match, curLoop){
			for ( var i = 0; curLoop[i] === false; i++ ){}
			return curLoop[i] &amp;&amp; isXML(curLoop[i]) ? match[1] : match[1].toUpperCase();
		},
		CHILD: function(match){
			if ( match[1] == "nth" ) {
				// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
				var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
					match[2] == "even" &amp;&amp; "2n" || match[2] == "odd" &amp;&amp; "2n+1" ||
					!/\D/.test( match[2] ) &amp;&amp; "0n+" + match[2] || match[2]);

				// calculate the numbers (first)n+(last) including if they are negative
				match[2] = (test[1] + (test[2] || 1)) - 0;
				match[3] = test[3] - 0;
			}

			// TODO: Move to normal caching system
			match[0] = done++;

			return match;
		},
		ATTR: function(match, curLoop, inplace, result, not, isXML){
			var name = match[1].replace(/\\/g, "");
			
			if ( !isXML &amp;&amp; Expr.attrMap[name] ) {
				match[1] = Expr.attrMap[name];
			}

			if ( match[2] === "~=" ) {
				match[4] = " " + match[4] + " ";
			}

			return match;
		},
		PSEUDO: function(match, curLoop, inplace, result, not){
			if ( match[1] === "not" ) {
				// If we're dealing with a complex expression, or a simple one
				if ( match[3].match(chunker).length &gt; 1 || /^\w/.test(match[3]) ) {
					match[3] = Sizzle(match[3], null, null, curLoop);
				} else {
					var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
					if ( !inplace ) {
						result.push.apply( result, ret );
					}
					return false;
				}
			} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
				return true;
			}
			
			return match;
		},
		POS: function(match){
			match.unshift( true );
			return match;
		}
	},
	filters: {
		enabled: function(elem){
			return elem.disabled === false &amp;&amp; elem.type !== "hidden";
		},
		disabled: function(elem){
			return elem.disabled === true;
		},
		checked: function(elem){
			return elem.checked === true;
		},
		selected: function(elem){
			// Accessing this property makes selected-by-default
			// options in Safari work properly
			elem.parentNode.selectedIndex;
			return elem.selected === true;
		},
		parent: function(elem){
			return !!elem.firstChild;
		},
		empty: function(elem){
			return !elem.firstChild;
		},
		has: function(elem, i, match){
			return !!Sizzle( match[3], elem ).length;
		},
		header: function(elem){
			return /h\d/i.test( elem.nodeName );
		},
		text: function(elem){
			return "text" === elem.type;
		},
		radio: function(elem){
			return "radio" === elem.type;
		},
		checkbox: function(elem){
			return "checkbox" === elem.type;
		},
		file: function(elem){
			return "file" === elem.type;
		},
		password: function(elem){
			return "password" === elem.type;
		},
		submit: function(elem){
			return "submit" === elem.type;
		},
		image: function(elem){
			return "image" === elem.type;
		},
		reset: function(elem){
			return "reset" === elem.type;
		},
		button: function(elem){
			return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON";
		},
		input: function(elem){
			return /input|select|textarea|button/i.test(elem.nodeName);
		}
	},
	setFilters: {
		first: function(elem, i){
			return i === 0;
		},
		last: function(elem, i, match, array){
			return i === array.length - 1;
		},
		even: function(elem, i){
			return i % 2 === 0;
		},
		odd: function(elem, i){
			return i % 2 === 1;
		},
		lt: function(elem, i, match){
			return i &lt; match[3] - 0;
		},
		gt: function(elem, i, match){
			return i &gt; match[3] - 0;
		},
		nth: function(elem, i, match){
			return match[3] - 0 == i;
		},
		eq: function(elem, i, match){
			return match[3] - 0 == i;
		}
	},
	filter: {
		PSEUDO: function(elem, match, i, array){
			var name = match[1], filter = Expr.filters[ name ];

			if ( filter ) {
				return filter( elem, i, match, array );
			} else if ( name === "contains" ) {
				return (elem.textContent || elem.innerText || "").indexOf(match[3]) &gt;= 0;
			} else if ( name === "not" ) {
				var not = match[3];

				for ( var i = 0, l = not.length; i &lt; l; i++ ) {
					if ( not[i] === elem ) {
						return false;
					}
				}

				return true;
			}
		},
		CHILD: function(elem, match){
			var type = match[1], node = elem;
			switch (type) {
				case 'only':
				case 'first':
					while (node = node.previousSibling)  {
						if ( node.nodeType === 1 ) return false;
					}
					if ( type == 'first') return true;
					node = elem;
				case 'last':
					while (node = node.nextSibling)  {
						if ( node.nodeType === 1 ) return false;
					}
					return true;
				case 'nth':
					var first = match[2], last = match[3];

					if ( first == 1 &amp;&amp; last == 0 ) {
						return true;
					}
					
					var doneName = match[0],
						parent = elem.parentNode;
	
					if ( parent &amp;&amp; (parent.sizcache !== doneName || !elem.nodeIndex) ) {
						var count = 0;
						for ( node = parent.firstChild; node; node = node.nextSibling ) {
							if ( node.nodeType === 1 ) {
								node.nodeIndex = ++count;
							}
						} 
						parent.sizcache = doneName;
					}
					
					var diff = elem.nodeIndex - last;
					if ( first == 0 ) {
						return diff == 0;
					} else {
						return ( diff % first == 0 &amp;&amp; diff / first &gt;= 0 );
					}
			}
		},
		ID: function(elem, match){
			return elem.nodeType === 1 &amp;&amp; elem.getAttribute("id") === match;
		},
		TAG: function(elem, match){
			return (match === "*" &amp;&amp; elem.nodeType === 1) || elem.nodeName === match;
		},
		CLASS: function(elem, match){
			return (" " + (elem.className || elem.getAttribute("class")) + " ")
				.indexOf( match ) &gt; -1;
		},
		ATTR: function(elem, match){
			var name = match[1],
				result = Expr.attrHandle[ name ] ?
					Expr.attrHandle[ name ]( elem ) :
					elem[ name ] != null ?
						elem[ name ] :
						elem.getAttribute( name ),
				value = result + "",
				type = match[2],
				check = match[4];

			return result == null ?
				type === "!=" :
				type === "=" ?
				value === check :
				type === "*=" ?
				value.indexOf(check) &gt;= 0 :
				type === "~=" ?
				(" " + value + " ").indexOf(check) &gt;= 0 :
				!check ?
				value &amp;&amp; result !== false :
				type === "!=" ?
				value != check :
				type === "^=" ?
				value.indexOf(check) === 0 :
				type === "$=" ?
				value.substr(value.length - check.length) === check :
				type === "|=" ?
				value === check || value.substr(0, check.length + 1) === check + "-" :
				false;
		},
		POS: function(elem, match, i, array){
			var name = match[2], filter = Expr.setFilters[ name ];

			if ( filter ) {
				return filter( elem, i, match, array );
			}
		}
	}
};

var origPOS = Expr.match.POS;

for ( var type in Expr.match ) {
	Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
}

var makeArray = function(array, results) {
	array = Array.prototype.slice.call( array );

	if ( results ) {
		results.push.apply( results, array );
		return results;
	}
	
	return array;
};

// Perform a simple check to determine if the browser is capable of
// converting a NodeList to an array using builtin methods.
try {
	Array.prototype.slice.call( document.documentElement.childNodes );

// Provide a fallback method if it does not work
} catch(e){
	makeArray = function(array, results) {
		var ret = results || [];

		if ( toString.call(array) === "[object Array]" ) {
			Array.prototype.push.apply( ret, array );
		} else {
			if ( typeof array.length === "number" ) {
				for ( var i = 0, l = array.length; i &lt; l; i++ ) {
					ret.push( array[i] );
				}
			} else {
				for ( var i = 0; array[i]; i++ ) {
					ret.push( array[i] );
				}
			}
		}

		return ret;
	};
}

var sortOrder;

if ( document.documentElement.compareDocumentPosition ) {
	sortOrder = function( a, b ) {
		var ret = a.compareDocumentPosition(b) &amp; 4 ? -1 : a === b ? 0 : 1;
		if ( ret === 0 ) {
			hasDuplicate = true;
		}
		return ret;
	};
} else if ( "sourceIndex" in document.documentElement ) {
	sortOrder = function( a, b ) {
		var ret = a.sourceIndex - b.sourceIndex;
		if ( ret === 0 ) {
			hasDuplicate = true;
		}
		return ret;
	};
} else if ( document.createRange ) {
	sortOrder = function( a, b ) {
		var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
		aRange.selectNode(a);
		aRange.collapse(true);
		bRange.selectNode(b);
		bRange.collapse(true);
		var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
		if ( ret === 0 ) {
			hasDuplicate = true;
		}
		return ret;
	};
}

// Check to see if the browser returns elements by name when
// querying by getElementById (and provide a workaround)
(function(){
	// We're going to inject a fake input element with a specified name
	var form = document.createElement("form"),
		id = "script" + (new Date).getTime();
	form.innerHTML = "&lt;input name='" + id + "'/&gt;";

	// Inject it into the root element, check its status, and remove it quickly
	var root = document.documentElement;
	root.insertBefore( form, root.firstChild );

	// The workaround has to do additional checks after a getElementById
	// Which slows things down for other browsers (hence the branching)
	if ( !!document.getElementById( id ) ) {
		Expr.find.ID = function(match, context, isXML){
			if ( typeof context.getElementById !== "undefined" &amp;&amp; !isXML ) {
				var m = context.getElementById(match[1]);
				return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" &amp;&amp; m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
			}
		};

		Expr.filter.ID = function(elem, match){
			var node = typeof elem.getAttributeNode !== "undefined" &amp;&amp; elem.getAttributeNode("id");
			return elem.nodeType === 1 &amp;&amp; node &amp;&amp; node.nodeValue === match;
		};
	}

	root.removeChild( form );
})();

(function(){
	// Check to see if the browser returns only elements
	// when doing getElementsByTagName("*")

	// Create a fake element
	var div = document.createElement("div");
	div.appendChild( document.createComment("") );

	// Make sure no comments are found
	if ( div.getElementsByTagName("*").length &gt; 0 ) {
		Expr.find.TAG = function(match, context){
			var results = context.getElementsByTagName(match[1]);

			// Filter out possible comments
			if ( match[1] === "*" ) {
				var tmp = [];

				for ( var i = 0; results[i]; i++ ) {
					if ( results[i].nodeType === 1 ) {
						tmp.push( results[i] );
					}
				}

				results = tmp;
			}

			return results;
		};
	}

	// Check to see if an attribute returns normalized href attributes
	div.innerHTML = "&lt;a href='#'&gt;&lt;/a&gt;";
	if ( div.firstChild &amp;&amp; typeof div.firstChild.getAttribute !== "undefined" &amp;&amp;
			div.firstChild.getAttribute("href") !== "#" ) {
		Expr.attrHandle.href = function(elem){
			return elem.getAttribute("href", 2);
		};
	}
})();

if ( document.querySelectorAll ) (function(){
	var oldSizzle = Sizzle, div = document.createElement("div");
	div.innerHTML = "&lt;p class='TEST'&gt;&lt;/p&gt;";

	// Safari can't handle uppercase or unicode characters when
	// in quirks mode.
	if ( div.querySelectorAll &amp;&amp; div.querySelectorAll(".TEST").length === 0 ) {
		return;
	}
	
	Sizzle = function(query, context, extra, seed){
		context = context || document;

		// Only use querySelectorAll on non-XML documents
		// (ID selectors don't work in non-HTML documents)
		if ( !seed &amp;&amp; context.nodeType === 9 &amp;&amp; !isXML(context) ) {
			try {
				return makeArray( context.querySelectorAll(query), extra );
			} catch(e){}
		}
		
		return oldSizzle(query, context, extra, seed);
	};

	Sizzle.find = oldSizzle.find;
	Sizzle.filter = oldSizzle.filter;
	Sizzle.selectors = oldSizzle.selectors;
	Sizzle.matches = oldSizzle.matches;
})();

if ( document.getElementsByClassName &amp;&amp; document.documentElement.getElementsByClassName ) (function(){
	var div = document.createElement("div");
	div.innerHTML = "&lt;div class='test e'&gt;&lt;/div&gt;&lt;div class='test'&gt;&lt;/div&gt;";

	// Opera can't find a second classname (in 9.6)
	if ( div.getElementsByClassName("e").length === 0 )
		return;

	// Safari caches class attributes, doesn't catch changes (in 3.2)
	div.lastChild.className = "e";

	if ( div.getElementsByClassName("e").length === 1 )
		return;

	Expr.order.splice(1, 0, "CLASS");
	Expr.find.CLASS = function(match, context, isXML) {
		if ( typeof context.getElementsByClassName !== "undefined" &amp;&amp; !isXML ) {
			return context.getElementsByClassName(match[1]);
		}
	};
})();

function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
	var sibDir = dir == "previousSibling" &amp;&amp; !isXML;
	for ( var i = 0, l = checkSet.length; i &lt; l; i++ ) {
		var elem = checkSet[i];
		if ( elem ) {
			if ( sibDir &amp;&amp; elem.nodeType === 1 ){
				elem.sizcache = doneName;
				elem.sizset = i;
			}
			elem = elem[dir];
			var match = false;

			while ( elem ) {
				if ( elem.sizcache === doneName ) {
					match = checkSet[elem.sizset];
					break;
				}

				if ( elem.nodeType === 1 &amp;&amp; !isXML ){
					elem.sizcache = doneName;
					elem.sizset = i;
				}

				if ( elem.nodeName === cur ) {
					match = elem;
					break;
				}

				elem = elem[dir];
			}

			checkSet[i] = match;
		}
	}
}

function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
	var sibDir = dir == "previousSibling" &amp;&amp; !isXML;
	for ( var i = 0, l = checkSet.length; i &lt; l; i++ ) {
		var elem = checkSet[i];
		if ( elem ) {
			if ( sibDir &amp;&amp; elem.nodeType === 1 ) {
				elem.sizcache = doneName;
				elem.sizset = i;
			}
			elem = elem[dir];
			var match = false;

			while ( elem ) {
				if ( elem.sizcache === doneName ) {
					match = checkSet[elem.sizset];
					break;
				}

				if ( elem.nodeType === 1 ) {
					if ( !isXML ) {
						elem.sizcache = doneName;
						elem.sizset = i;
					}
					if ( typeof cur !== "string" ) {
						if ( elem === cur ) {
							match = true;
							break;
						}

					} else if ( Sizzle.filter( cur, [elem] ).length &gt; 0 ) {
						match = elem;
						break;
					}
				}

				elem = elem[dir];
			}

			checkSet[i] = match;
		}
	}
}

var contains = document.compareDocumentPosition ?  function(a, b){
	return a.compareDocumentPosition(b) &amp; 16;
} : function(a, b){
	return a !== b &amp;&amp; (a.contains ? a.contains(b) : true);
};

var isXML = function(elem){
	return elem.nodeType === 9 &amp;&amp; elem.documentElement.nodeName !== "HTML" ||
		!!elem.ownerDocument &amp;&amp; isXML( elem.ownerDocument );
};

var posProcess = function(selector, context){
	var tmpSet = [], later = "", match,
		root = context.nodeType ? [context] : context;

	// Position selectors must be done after the filter
	// And so must :not(positional) so we move all PSEUDOs to the end
	while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
		later += match[0];
		selector = selector.replace( Expr.match.PSEUDO, "" );
	}

	selector = Expr.relative[selector] ? selector + "*" : selector;

	for ( var i = 0, l = root.length; i &lt; l; i++ ) {
		Sizzle( selector, root[i], tmpSet );
	}

	return Sizzle.filter( later, tmpSet );
};

// EXPOSE
jQuery.find = Sizzle;
jQuery.filter = Sizzle.filter;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.filters;

Sizzle.selectors.filters.hidden = function(elem){
	return elem.offsetWidth === 0 || elem.offsetHeight === 0;
};

Sizzle.selectors.filters.visible = function(elem){
	return elem.offsetWidth &gt; 0 || elem.offsetHeight &gt; 0;
};

Sizzle.selectors.filters.animated = function(elem){
	return jQuery.grep(jQuery.timers, function(fn){
		return elem === fn.elem;
	}).length;
};

jQuery.multiFilter = function( expr, elems, not ) {
	if ( not ) {
		expr = ":not(" + expr + ")";
	}

	return Sizzle.matches(expr, elems);
};

jQuery.dir = function( elem, dir ){
	var matched = [], cur = elem[dir];
	while ( cur &amp;&amp; cur != document ) {
		if ( cur.nodeType == 1 )
			matched.push( cur );
		cur = cur[dir];
	}
	return matched;
};

jQuery.nth = function(cur, result, dir, elem){
	result = result || 1;
	var num = 0;

	for ( ; cur; cur = cur[dir] )
		if ( cur.nodeType == 1 &amp;&amp; ++num == result )
			break;

	return cur;
};

jQuery.sibling = function(n, elem){
	var r = [];

	for ( ; n; n = n.nextSibling ) {
		if ( n.nodeType == 1 &amp;&amp; n != elem )
			r.push( n );
	}

	return r;
};

return;

window.Sizzle = Sizzle;

})();
/*
 * A number of helper functions used for managing events.
 * Many of the ideas behind this code originated from
 * Dean Edwards' addEvent library.
 */
jQuery.event = {

	// Bind an event to an element
	// Original by Dean Edwards
	add: function(elem, types, handler, data) {
		if ( elem.nodeType == 3 || elem.nodeType == 8 )
			return;

		// For whatever reason, IE has trouble passing the window object
		// around, causing it to be cloned in the process
		if ( elem.setInterval &amp;&amp; elem != window )
			elem = window;

		// Make sure that the function being executed has a unique ID
		if ( !handler.guid )
			handler.guid = this.guid++;

		// if data is passed, bind to handler
		if ( data !== undefined ) {
			// Create temporary function pointer to original handler
			var fn = handler;

			// Create unique handler function, wrapped around original handler
			handler = this.proxy( fn );

			// Store data in unique handler
			handler.data = data;
		}

		// Init the element's event structure
		var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
			handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
				// Handle the second event of a trigger and when
				// an event is called after a page has unloaded
				return typeof jQuery !== "undefined" &amp;&amp; !jQuery.event.triggered ?
					jQuery.event.handle.apply(arguments.callee.elem, arguments) :
					undefined;
			});
		// Add elem as a property of the handle function
		// This is to prevent a memory leak with non-native
		// event in IE.
		handle.elem = elem;

		// Handle multiple events separated by a space
		// jQuery(...).bind("mouseover mouseout", fn);
		jQuery.each(types.split(/\s+/), function(index, type) {
			// Namespaced event handlers
			var namespaces = type.split(".");
			type = namespaces.shift();
			handler.type = namespaces.slice().sort().join(".");

			// Get the current list of functions bound to this event
			var handlers = events[type];
			
			if ( jQuery.event.specialAll[type] )
				jQuery.event.specialAll[type].setup.call(elem, data, namespaces);

			// Init the event handler queue
			if (!handlers) {
				handlers = events[type] = {};

				// Check for a special event handler
				// Only use addEventListener/attachEvent if the special
				// events handler returns false
				if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false ) {
					// Bind the global event handler to the element
					if (elem.addEventListener)
						elem.addEventListener(type, handle, false);
					else if (elem.attachEvent)
						elem.attachEvent("on" + type, handle);
				}
			}

			// Add the function to the element's handler list
			handlers[handler.guid] = handler;

			// Keep track of which events have been used, for global triggering
			jQuery.event.global[type] = true;
		});

		// Nullify elem to prevent memory leaks in IE
		elem = null;
	},

	guid: 1,
	global: {},

	// Detach an event or set of events from an element
	remove: function(elem, types, handler) {
		// don't do events on text and comment nodes
		if ( elem.nodeType == 3 || elem.nodeType == 8 )
			return;

		var events = jQuery.data(elem, "events"), ret, index;

		if ( events ) {
			// Unbind all events for the element
			if ( types === undefined || (typeof types === "string" &amp;&amp; types.charAt(0) == ".") )
				for ( var type in events )
					this.remove( elem, type + (types || "") );
			else {
				// types is actually an event object here
				if ( types.type ) {
					handler = types.handler;
					types = types.type;
				}

				// Handle multiple events seperated by a space
				// jQuery(...).unbind("mouseover mouseout", fn);
				jQuery.each(types.split(/\s+/), function(index, type){
					// Namespaced event handlers
					var namespaces = type.split(".");
					type = namespaces.shift();
					var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");

					if ( events[type] ) {
						// remove the given handler for the given type
						if ( handler )
							delete events[type][handler.guid];

						// remove all handlers for the given type
						else
							for ( var handle in events[type] )
								// Handle the removal of namespaced events
								if ( namespace.test(events[type][handle].type) )
									delete events[type][handle];
									
						if ( jQuery.event.specialAll[type] )
							jQuery.event.specialAll[type].teardown.call(elem, namespaces);

						// remove generic event handler if no more handlers exist
						for ( ret in events[type] ) break;
						if ( !ret ) {
							if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) {
								if (elem.removeEventListener)
									elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
								else if (elem.detachEvent)
									elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
							}
							ret = null;
							delete events[type];
						}
					}
				});
			}

			// Remove the expando if it's no longer used
			for ( ret in events ) break;
			if ( !ret ) {
				var handle = jQuery.data( elem, "handle" );
				if ( handle ) handle.elem = null;
				jQuery.removeData( elem, "events" );
				jQuery.removeData( elem, "handle" );
			}
		}
	},

	// bubbling is internal
	trigger: function( event, data, elem, bubbling ) {
		// Event object or event type
		var type = event.type || event;

		if( !bubbling ){
			event = typeof event === "object" ?
				// jQuery.Event object
				event[expando] ? event :
				// Object literal
				jQuery.extend( jQuery.Event(type), event ) :
				// Just the event type (string)
				jQuery.Event(type);

			if ( type.indexOf("!") &gt;= 0 ) {
				event.type = type = type.slice(0, -1);
				event.exclusive = true;
			}

			// Handle a global trigger
			if ( !elem ) {
				// Don't bubble custom events when global (to avoid too much overhead)
				event.stopPropagation();
				// Only trigger if we've ever bound an event for it
				if ( this.global[type] )
					jQuery.each( jQuery.cache, function(){
						if ( this.events &amp;&amp; this.events[type] )
							jQuery.event.trigger( event, data, this.handle.elem );
					});
			}

			// Handle triggering a single element

			// don't do events on text and comment nodes
			if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
				return undefined;
			
			// Clean up in case it is reused
			event.result = undefined;
			event.target = elem;
			
			// Clone the incoming data, if any
			data = jQuery.makeArray(data);
			data.unshift( event );
		}

		event.currentTarget = elem;

		// Trigger the event, it is assumed that "handle" is a function
		var handle = jQuery.data(elem, "handle");
		if ( handle )
			handle.apply( elem, data );

		// Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
		if ( (!elem[type] || (jQuery.nodeName(elem, 'a') &amp;&amp; type == "click")) &amp;&amp; elem["on"+type] &amp;&amp; elem["on"+type].apply( elem, data ) === false )
			event.result = false;

		// Trigger the native events (except for clicks on links)
		if ( !bubbling &amp;&amp; elem[type] &amp;&amp; !event.isDefaultPrevented() &amp;&amp; !(jQuery.nodeName(elem, 'a') &amp;&amp; type == "click") ) {
			this.triggered = true;
			try {
				elem[ type ]();
			// prevent IE from throwing an error for some hidden elements
			} catch (e) {}
		}

		this.triggered = false;

		if ( !event.isPropagationStopped() ) {
			var parent = elem.parentNode || elem.ownerDocument;
			if ( parent )
				jQuery.event.trigger(event, data, parent, true);
		}
	},

	handle: function(event) {
		// returned undefined or false
		var all, handlers;

		event = arguments[0] = jQuery.event.fix( event || window.event );
		event.currentTarget = this;
		
		// Namespaced event handlers
		var namespaces = event.type.split(".");
		event.type = namespaces.shift();

		// Cache this now, all = true means, any handler
		all = !namespaces.length &amp;&amp; !event.exclusive;
		
		var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");

		handlers = ( jQuery.data(this, "events") || {} )[event.type];

		for ( var j in handlers ) {
			var handler = handlers[j];

			// Filter the functions by class
			if ( all || namespace.test(handler.type) ) {
				// Pass in a reference to the handler function itself
				// So that we can later remove it
				event.handler = handler;
				event.data = handler.data;

				var ret = handler.apply(this, arguments);

				if( ret !== undefined ){
					event.result = ret;
					if ( ret === false ) {
						event.preventDefault();
						event.stopPropagation();
					}
				}

				if( event.isImmediatePropagationStopped() )
					break;

			}
		}
	},

	props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),

	fix: function(event) {
		if ( event[expando] )
			return event;

		// store a copy of the original event object
		// and "clone" to set read-only properties
		var originalEvent = event;
		event = jQuery.Event( originalEvent );

		for ( var i = this.props.length, prop; i; ){
			prop = this.props[ --i ];
			event[ prop ] = originalEvent[ prop ];
		}

		// Fix target property, if necessary
		if ( !event.target )
			event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either

		// check if target is a textnode (safari)
		if ( event.target.nodeType == 3 )
			event.target = event.target.parentNode;

		// Add relatedTarget, if necessary
		if ( !event.relatedTarget &amp;&amp; event.fromElement )
			event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;

		// Calculate pageX/Y if missing and clientX/Y available
		if ( event.pageX == null &amp;&amp; event.clientX != null ) {
			var doc = document.documentElement, body = document.body;
			event.pageX = event.clientX + (doc &amp;&amp; doc.scrollLeft || body &amp;&amp; body.scrollLeft || 0) - (doc.clientLeft || 0);
			event.pageY = event.clientY + (doc &amp;&amp; doc.scrollTop || body &amp;&amp; body.scrollTop || 0) - (doc.clientTop || 0);
		}

		// Add which for key events
		if ( !event.which &amp;&amp; ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
			event.which = event.charCode || event.keyCode;

		// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
		if ( !event.metaKey &amp;&amp; event.ctrlKey )
			event.metaKey = event.ctrlKey;

		// Add which for click: 1 == left; 2 == middle; 3 == right
		// Note: button is not normalized, so don't use it
		if ( !event.which &amp;&amp; event.button )
			event.which = (event.button &amp; 1 ? 1 : ( event.button &amp; 2 ? 3 : ( event.button &amp; 4 ? 2 : 0 ) ));

		return event;
	},

	proxy: function( fn, proxy ){
		proxy = proxy || function(){ return fn.apply(this, arguments); };
		// Set the guid of unique handler to the same of original handler, so it can be removed
		proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
		// So proxy can be declared as an argument
		return proxy;
	},

	special: {
		ready: {
			// Make sure the ready event is setup
			setup: bindReady,
			teardown: function() {}
		}
	},
	
	specialAll: {
		live: {
			setup: function( selector, namespaces ){
				jQuery.event.add( this, namespaces[0], liveHandler );
			},
			teardown:  function( namespaces ){
				if ( namespaces.length ) {
					var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
					
					jQuery.each( (jQuery.data(this, "events").live || {}), function(){
						if ( name.test(this.type) )
							remove++;
					});
					
					if ( remove &lt; 1 )
						jQuery.event.remove( this, namespaces[0], liveHandler );
				}
			}
		}
	}
};

jQuery.Event = function( src ){
	// Allow instantiation without the 'new' keyword
	if( !this.preventDefault )
		return new jQuery.Event(src);
	
	// Event object
	if( src &amp;&amp; src.type ){
		this.originalEvent = src;
		this.type = src.type;
	// Event type
	}else
		this.type = src;

	// timeStamp is buggy for some events on Firefox(#3843)
	// So we won't rely on the native value
	this.timeStamp = now();
	
	// Mark it as fixed
	this[expando] = true;
};

function returnFalse(){
	return false;
}
function returnTrue(){
	return true;
}

// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
	preventDefault: function() {
		this.isDefaultPrevented = returnTrue;

		var e = this.originalEvent;
		if( !e )
			return;
		// if preventDefault exists run it on the original event
		if (e.preventDefault)
			e.preventDefault();
		// otherwise set the returnValue property of the original event to false (IE)
		e.returnValue = false;
	},
	stopPropagation: function() {
		this.isPropagationStopped = returnTrue;

		var e = this.originalEvent;
		if( !e )
			return;
		// if stopPropagation exists run it on the original event
		if (e.stopPropagation)
			e.stopPropagation();
		// otherwise set the cancelBubble property of the original event to true (IE)
		e.cancelBubble = true;
	},
	stopImmediatePropagation:function(){
		this.isImmediatePropagationStopped = returnTrue;
		this.stopPropagation();
	},
	isDefaultPrevented: returnFalse,
	isPropagationStopped: returnFalse,
	isImmediatePropagationStopped: returnFalse
};
// Checks if an event happened on an element within another element
// Used in jQuery.event.special.mouseenter and mouseleave handlers
var withinElement = function(event) {
	// Check if mouse(over|out) are still within the same parent element
	var parent = event.relatedTarget;
	// Traverse up the tree
	while ( parent &amp;&amp; parent != this )
		try { parent = parent.parentNode; }
		catch(e) { parent = this; }
	
	if( parent != this ){
		// set the correct event type
		event.type = event.data;
		// handle event if we actually just moused on to a non sub-element
		jQuery.event.handle.apply( this, arguments );
	}
};
	
jQuery.each({ 
	mouseover: 'mouseenter', 
	mouseout: 'mouseleave'
}, function( orig, fix ){
	jQuery.event.special[ fix ] = {
		setup: function(){
			jQuery.event.add( this, orig, withinElement, fix );
		},
		teardown: function(){
			jQuery.event.remove( this, orig, withinElement );
		}
	};			   
});

jQuery.fn.extend({
	bind: function( type, data, fn ) {
		return type == "unload" ? this.one(type, data, fn) : this.each(function(){
			jQuery.event.add( this, type, fn || data, fn &amp;&amp; data );
		});
	},

	one: function( type, data, fn ) {
		var one = jQuery.event.proxy( fn || data, function(event) {
			jQuery(this).unbind(event, one);
			return (fn || data).apply( this, arguments );
		});
		return this.each(function(){
			jQuery.event.add( this, type, one, fn &amp;&amp; data);
		});
	},

	unbind: function( type, fn ) {
		return this.each(function(){
			jQuery.event.remove( this, type, fn );
		});
	},

	trigger: function( type, data ) {
		return this.each(function(){
			jQuery.event.trigger( type, data, this );
		});
	},

	triggerHandler: function( type, data ) {
		if( this[0] ){
			var event = jQuery.Event(type);
			event.preventDefault();
			event.stopPropagation();
			jQuery.event.trigger( event, data, this[0] );
			return event.result;
		}		
	},

	toggle: function( fn ) {
		// Save reference to arguments for access in closure
		var args = arguments, i = 1;

		// link all the functions, so any of them can unbind this click handler
		while( i &lt; args.length )
			jQuery.event.proxy( fn, args[i++] );

		return this.click( jQuery.event.proxy( fn, function(event) {
			// Figure out which function to execute
			this.lastToggle = ( this.lastToggle || 0 ) % i;

			// Make sure that clicks stop
			event.preventDefault();

			// and execute the function
			return args[ this.lastToggle++ ].apply( this, arguments ) || false;
		}));
	},

	hover: function(fnOver, fnOut) {
		return this.mouseenter(fnOver).mouseleave(fnOut);
	},

	ready: function(fn) {
		// Attach the listeners
		bindReady();

		// If the DOM is already ready
		if ( jQuery.isReady )
			// Execute the function immediately
			fn.call( document, jQuery );

		// Otherwise, remember the function for later
		else
			// Add the function to the wait list
			jQuery.readyList.push( fn );

		return this;
	},
	
	live: function( type, fn ){
		var proxy = jQuery.event.proxy( fn );
		proxy.guid += this.selector + type;

		jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy );

		return this;
	},
	
	die: function( type, fn ){
		jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
		return this;
	}
});

function liveHandler( event ){
	var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
		stop = true,
		elems = [];

	jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
		if ( check.test(fn.type) ) {
			var elem = jQuery(event.target).closest(fn.data)[0];
			if ( elem )
				elems.push({ elem: elem, fn: fn });
		}
	});

	elems.sort(function(a,b) {
		return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
	});
	
	jQuery.each(elems, function(){
		if ( this.fn.call(this.elem, event, this.fn.data) === false )
			return (stop = false);
	});

	return stop;
}

function liveConvert(type, selector){
	return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join(".");
}

jQuery.extend({
	isReady: false,
	readyList: [],
	// Handle when the DOM is ready
	ready: function() {
		// Make sure that the DOM is not already loaded
		if ( !jQuery.isReady ) {
			// Remember that the DOM is ready
			jQuery.isReady = true;

			// If there are functions bound, to execute
			if ( jQuery.readyList ) {
				// Execute all of them
				jQuery.each( jQuery.readyList, function(){
					this.call( document, jQuery );
				});

				// Reset the list of functions
				jQuery.readyList = null;
			}

			// Trigger any bound ready events
			jQuery(document).triggerHandler("ready");
		}
	}
});

var readyBound = false;

function bindReady(){
	if ( readyBound ) return;
	readyBound = true;

	// Mozilla, Opera and webkit nightlies currently support this event
	if ( document.addEventListener ) {
		// Use the handy event callback
		document.addEventListener( "DOMContentLoaded", function(){
			document.removeEventListener( "DOMContentLoaded", arguments.callee, false );
			jQuery.ready();
		}, false );

	// If IE event model is used
	} else if ( document.attachEvent ) {
		// ensure firing before onload,
		// maybe late but safe also for iframes
		document.attachEvent("onreadystatechange", function(){
			if ( document.readyState === "complete" ) {
				document.detachEvent( "onreadystatechange", arguments.callee );
				jQuery.ready();
			}
		});

		// If IE and not an iframe
		// continually check to see if the document is ready
		if ( document.documentElement.doScroll &amp;&amp; window == window.top ) (function(){
			if ( jQuery.isReady ) return;

			try {
				// If IE is used, use the trick by Diego Perini
				// http://javascript.nwbox.com/IEContentLoaded/
				document.documentElement.doScroll("left");
			} catch( error ) {
				setTimeout( arguments.callee, 0 );
				return;
			}

			// and execute any waiting functions
			jQuery.ready();
		})();
	}

	// A fallback to window.onload, that will always work
	jQuery.event.add( window, "load", jQuery.ready );
}

jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
	"mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," +
	"change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){

	// Handle event binding
	jQuery.fn[name] = function(fn){
		return fn ? this.bind(name, fn) : this.trigger(name);
	};
});

// Prevent memory leaks in IE
// And prevent errors on refresh with events like mouseover in other browsers
// Window isn't included so as not to unbind existing unload events
jQuery( window ).bind( 'unload', function(){ 
	for ( var id in jQuery.cache )
		// Skip the window
		if ( id != 1 &amp;&amp; jQuery.cache[ id ].handle )
			jQuery.event.remove( jQuery.cache[ id ].handle.elem );
}); 
(function(){

	jQuery.support = {};

	var root = document.documentElement,
		script = document.createElement("script"),
		div = document.createElement("div"),
		id = "script" + (new Date).getTime();

	div.style.display = "none";
	div.innerHTML = '   &lt;link/&gt;&lt;table&gt;&lt;/table&gt;&lt;a href="/a" style="color:red;float:left;opacity:.5;"&gt;a&lt;/a&gt;&lt;select&gt;&lt;option&gt;text&lt;/option&gt;&lt;/select&gt;&lt;object&gt;&lt;param/&gt;&lt;/object&gt;';

	var all = div.getElementsByTagName("*"),
		a = div.getElementsByTagName("a")[0];

	// Can't get basic test support
	if ( !all || !all.length || !a ) {
		return;
	}

	jQuery.support = {
		// IE strips leading whitespace when .innerHTML is used
		leadingWhitespace: div.firstChild.nodeType == 3,
		
		// Make sure that tbody elements aren't automatically inserted
		// IE will insert them into empty tables
		tbody: !div.getElementsByTagName("tbody").length,
		
		// Make sure that you can get all elements in an &lt;object&gt; element
		// IE 7 always returns no results
		objectAll: !!div.getElementsByTagName("object")[0]
			.getElementsByTagName("*").length,
		
		// Make sure that link elements get serialized correctly by innerHTML
		// This requires a wrapper element in IE
		htmlSerialize: !!div.getElementsByTagName("link").length,
		
		// Get the style information from getAttribute
		// (IE uses .cssText insted)
		style: /red/.test( a.getAttribute("style") ),
		
		// Make sure that URLs aren't manipulated
		// (IE normalizes it by default)
		hrefNormalized: a.getAttribute("href") === "/a",
		
		// Make sure that element opacity exists
		// (IE uses filter instead)
		opacity: a.style.opacity === "0.5",
		
		// Verify style float existence
		// (IE uses styleFloat instead of cssFloat)
		cssFloat: !!a.style.cssFloat,

		// Will be defined later
		scriptEval: false,
		noCloneEvent: true,
		boxModel: null
	};
	
	script.type = "text/javascript";
	try {
		script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
	} catch(e){}

	root.insertBefore( script, root.firstChild );
	
	// Make sure that the execution of code works by injecting a script
	// tag with appendChild/createTextNode
	// (IE doesn't support this, fails, and uses .text instead)
	if ( window[ id ] ) {
		jQuery.support.scriptEval = true;
		delete window[ id ];
	}

	root.removeChild( script );

	if ( div.attachEvent &amp;&amp; div.fireEvent ) {
		div.attachEvent("onclick", function(){
			// Cloning a node shouldn't copy over any
			// bound event handlers (IE does this)
			jQuery.support.noCloneEvent = false;
			div.detachEvent("onclick", arguments.callee);
		});
		div.cloneNode(true).fireEvent("onclick");
	}

	// Figure out if the W3C box model works as expected
	// document.body must exist before we can do this
	jQuery(function(){
		var div = document.createElement("div");
		div.style.width = div.style.paddingLeft = "1px";

		document.body.appendChild( div );
		jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
		document.body.removeChild( div ).style.display = 'none';
	});
})();

var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat";

jQuery.props = {
	"for": "htmlFor",
	"class": "className",
	"float": styleFloat,
	cssFloat: styleFloat,
	styleFloat: styleFloat,
	readonly: "readOnly",
	maxlength: "maxLength",
	cellspacing: "cellSpacing",
	rowspan: "rowSpan",
	tabindex: "tabIndex"
};
jQuery.fn.extend({
	// Keep a copy of the old load
	_load: jQuery.fn.load,

	load: function( url, params, callback ) {
		if ( typeof url !== "string" )
			return this._load( url );

		var off = url.indexOf(" ");
		if ( off &gt;= 0 ) {
			var selector = url.slice(off, url.length);
			url = url.slice(0, off);
		}

		// Default to a GET request
		var type = "GET";

		// If the second parameter was provided
		if ( params )
			// If it's a function
			if ( jQuery.isFunction( params ) ) {
				// We assume that it's the callback
				callback = params;
				params = null;

			// Otherwise, build a param string
			} else if( typeof params === "object" ) {
				params = jQuery.param( params );
				type = "POST";
			}

		var self = this;

		// Request the remote document
		jQuery.ajax({
			url: url,
			type: type,
			dataType: "html",
			data: params,
			complete: function(res, status){
				// If successful, inject the HTML into all the matched elements
				if ( status == "success" || status == "notmodified" )
					// See if a selector was specified
					self.html( selector ?
						// Create a dummy div to hold the results
						jQuery("&lt;div/&gt;")
							// inject the contents of the document in, removing the scripts
							// to avoid any 'Permission Denied' errors in IE
							.append(res.responseText.replace(/&lt;script(.|\s)*?\/script&gt;/g, ""))

							// Locate the specified elements
							.find(selector) :

						// If not, just inject the full result
						res.responseText );

				if( callback )
					self.each( callback, [res.responseText, status, res] );
			}
		});
		return this;
	},

	serialize: function() {
		return jQuery.param(this.serializeArray());
	},
	serializeArray: function() {
		return this.map(function(){
			return this.elements ? jQuery.makeArray(this.elements) : this;
		})
		.filter(function(){
			return this.name &amp;&amp; !this.disabled &amp;&amp;
				(this.checked || /select|textarea/i.test(this.nodeName) ||
					/text|hidden|password|search/i.test(this.type));
		})
		.map(function(i, elem){
			var val = jQuery(this).val();
			return val == null ? null :
				jQuery.isArray(val) ?
					jQuery.map( val, function(val, i){
						return {name: elem.name, value: val};
					}) :
					{name: elem.name, value: val};
		}).get();
	}
});

// Attach a bunch of functions for handling common AJAX events
jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
	jQuery.fn[o] = function(f){
		return this.bind(o, f);
	};
});

var jsc = now();

jQuery.extend({
  
	get: function( url, data, callback, type ) {
		// shift arguments if data argument was ommited
		if ( jQuery.isFunction( data ) ) {
			callback = data;
			data = null;
		}

		return jQuery.ajax({
			type: "GET",
			url: url,
			data: data,
			success: callback,
			dataType: type
		});
	},

	getScript: function( url, callback ) {
		return jQuery.get(url, null, callback, "script");
	},

	getJSON: function( url, data, callback ) {
		return jQuery.get(url, data, callback, "json");
	},

	post: function( url, data, callback, type ) {
		if ( jQuery.isFunction( data ) ) {
			callback = data;
			data = {};
		}

		return jQuery.ajax({
			type: "POST",
			url: url,
			data: data,
			success: callback,
			dataType: type
		});
	},

	ajaxSetup: function( settings ) {
		jQuery.extend( jQuery.ajaxSettings, settings );
	},

	ajaxSettings: {
		url: location.href,
		global: true,
		type: "GET",
		contentType: "application/x-www-form-urlencoded",
		processData: true,
		async: true,
		/*
		timeout: 0,
		data: null,
		username: null,
		password: null,
		*/
		// Create the request object; Microsoft failed to properly
		// implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
		// This function can be overriden by calling jQuery.ajaxSetup
		xhr:function(){
			return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
		},
		accepts: {
			xml: "application/xml, text/xml",
			html: "text/html",
			script: "text/javascript, application/javascript",
			json: "application/json, text/javascript",
			text: "text/plain",
			_default: "*/*"
		}
	},

	// Last-Modified header cache for next request
	lastModified: {},

	ajax: function( s ) {
		// Extend the settings, but re-extend 's' so that it can be
		// checked again later (in the test suite, specifically)
		s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));

		var jsonp, jsre = /=\?(&amp;|$)/g, status, data,
			type = s.type.toUpperCase();

		// convert data if not already a string
		if ( s.data &amp;&amp; s.processData &amp;&amp; typeof s.data !== "string" )
			s.data = jQuery.param(s.data);

		// Handle JSONP Parameter Callbacks
		if ( s.dataType == "jsonp" ) {
			if ( type == "GET" ) {
				if ( !s.url.match(jsre) )
					s.url += (s.url.match(/\?/) ? "&amp;" : "?") + (s.jsonp || "callback") + "=?";
			} else if ( !s.data || !s.data.match(jsre) )
				s.data = (s.data ? s.data + "&amp;" : "") + (s.jsonp || "callback") + "=?";
			s.dataType = "json";
		}

		// Build temporary JSONP function
		if ( s.dataType == "json" &amp;&amp; (s.data &amp;&amp; s.data.match(jsre) || s.url.match(jsre)) ) {
			jsonp = "jsonp" + jsc++;

			// Replace the =? sequence both in the query string and the data
			if ( s.data )
				s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
			s.url = s.url.replace(jsre, "=" + jsonp + "$1");

			// We need to make sure
			// that a JSONP style response is executed properly
			s.dataType = "script";

			// Handle JSONP-style loading
			window[ jsonp ] = function(tmp){
				data = tmp;
				success();
				complete();
				// Garbage collect
				window[ jsonp ] = undefined;
				try{ delete window[ jsonp ]; } catch(e){}
				if ( head )
					head.removeChild( script );
			};
		}

		if ( s.dataType == "script" &amp;&amp; s.cache == null )
			s.cache = false;

		if ( s.cache === false &amp;&amp; type == "GET" ) {
			var ts = now();
			// try replacing _= if it is there
			var ret = s.url.replace(/(\?|&amp;)_=.*?(&amp;|$)/, "$1_=" + ts + "$2");
			// if nothing was replaced, add timestamp to the end
			s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&amp;" : "?") + "_=" + ts : "");
		}

		// If data is available, append data to url for get requests
		if ( s.data &amp;&amp; type == "GET" ) {
			s.url += (s.url.match(/\?/) ? "&amp;" : "?") + s.data;

			// IE likes to send both get and post data, prevent this
			s.data = null;
		}

		// Watch for a new set of requests
		if ( s.global &amp;&amp; ! jQuery.active++ )
			jQuery.event.trigger( "ajaxStart" );

		// Matches an absolute URL, and saves the domain
		var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url );

		// If we're requesting a remote document
		// and trying to load JSON or Script with a GET
		if ( s.dataType == "script" &amp;&amp; type == "GET" &amp;&amp; parts
			&amp;&amp; ( parts[1] &amp;&amp; parts[1] != location.protocol || parts[2] != location.host )){

			var head = document.getElementsByTagName("head")[0];
			var script = document.createElement("script");
			script.src = s.url;
			if (s.scriptCharset)
				script.charset = s.scriptCharset;

			// Handle Script loading
			if ( !jsonp ) {
				var done = false;

				// Attach handlers for all browsers
				script.onload = script.onreadystatechange = function(){
					if ( !done &amp;&amp; (!this.readyState ||
							this.readyState == "loaded" || this.readyState == "complete") ) {
						done = true;
						success();
						complete();

						// Handle memory leak in IE
						script.onload = script.onreadystatechange = null;
						head.removeChild( script );
					}
				};
			}

			head.appendChild(script);

			// We handle everything using the script element injection
			return undefined;
		}

		var requestDone = false;

		// Create the request object
		var xhr = s.xhr();

		// Open the socket
		// Passing null username, generates a login popup on Opera (#2865)
		if( s.username )
			xhr.open(type, s.url, s.async, s.username, s.password);
		else
			xhr.open(type, s.url, s.async);

		// Need an extra try/catch for cross domain requests in Firefox 3
		try {
			// Set the correct header, if data is being sent
			if ( s.data )
				xhr.setRequestHeader("Content-Type", s.contentType);

			// Set the If-Modified-Since header, if ifModified mode.
			if ( s.ifModified )
				xhr.setRequestHeader("If-Modified-Since",
					jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );

			// Set header so the called script knows that it's an XMLHttpRequest
			xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");

			// Set the Accepts header for the server, depending on the dataType
			xhr.setRequestHeader("Accept", s.dataType &amp;&amp; s.accepts[ s.dataType ] ?
				s.accepts[ s.dataType ] + ", */*" :
				s.accepts._default );
		} catch(e){}

		// Allow custom headers/mimetypes and early abort
		if ( s.beforeSend &amp;&amp; s.beforeSend(xhr, s) === false ) {
			// Handle the global AJAX counter
			if ( s.global &amp;&amp; ! --jQuery.active )
				jQuery.event.trigger( "ajaxStop" );
			// close opended socket
			xhr.abort();
			return false;
		}

		if ( s.global )
			jQuery.event.trigger("ajaxSend", [xhr, s]);

		// Wait for a response to come back
		var onreadystatechange = function(isTimeout){
			// The request was aborted, clear the interval and decrement jQuery.active
			if (xhr.readyState == 0) {
				if (ival) {
					// clear poll interval
					clearInterval(ival);
					ival = null;
					// Handle the global AJAX counter
					if ( s.global &amp;&amp; ! --jQuery.active )
						jQuery.event.trigger( "ajaxStop" );
				}
			// The transfer is complete and the data is available, or the request timed out
			} else if ( !requestDone &amp;&amp; xhr &amp;&amp; (xhr.readyState == 4 || isTimeout == "timeout") ) {
				requestDone = true;

				// clear poll interval
				if (ival) {
					clearInterval(ival);
					ival = null;
				}

				status = isTimeout == "timeout" ? "timeout" :
					!jQuery.httpSuccess( xhr ) ? "error" :
					s.ifModified &amp;&amp; jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
					"success";

				if ( status == "success" ) {
					// Watch for, and catch, XML document parse errors
					try {
						// process the data (runs the xml through httpData regardless of callback)
						data = jQuery.httpData( xhr, s.dataType, s );
					} catch(e) {
						status = "parsererror";
					}
				}

				// Make sure that the request was successful or notmodified
				if ( status == "success" ) {
					// Cache Last-Modified header, if ifModified mode.
					var modRes;
					try {
						modRes = xhr.getResponseHeader("Last-Modified");
					} catch(e) {} // swallow exception thrown by FF if header is not available

					if ( s.ifModified &amp;&amp; modRes )
						jQuery.lastModified[s.url] = modRes;

					// JSONP handles its own success callback
					if ( !jsonp )
						success();
				} else
					jQuery.handleError(s, xhr, status);

				// Fire the complete handlers
				complete();

				if ( isTimeout )
					xhr.abort();

				// Stop memory leaks
				if ( s.async )
					xhr = null;
			}
		};

		if ( s.async ) {
			// don't attach the handler to the request, just poll it instead
			var ival = setInterval(onreadystatechange, 13);

			// Timeout checker
			if ( s.timeout &gt; 0 )
				setTimeout(function(){
					// Check to see if the request is still happening
					if ( xhr &amp;&amp; !requestDone )
						onreadystatechange( "timeout" );
				}, s.timeout);
		}

		// Send the data
		try {
			xhr.send(s.data);
		} catch(e) {
			jQuery.handleError(s, xhr, null, e);
		}

		// firefox 1.5 doesn't fire statechange for sync requests
		if ( !s.async )
			onreadystatechange();

		function success(){
			// If a local callback was specified, fire it and pass it the data
			if ( s.success )
				s.success( data, status );

			// Fire the global callback
			if ( s.global )
				jQuery.event.trigger( "ajaxSuccess", [xhr, s] );
		}

		function complete(){
			// Process result
			if ( s.complete )
				s.complete(xhr, status);

			// The request was completed
			if ( s.global )
				jQuery.event.trigger( "ajaxComplete", [xhr, s] );

			// Handle the global AJAX counter
			if ( s.global &amp;&amp; ! --jQuery.active )
				jQuery.event.trigger( "ajaxStop" );
		}

		// return XMLHttpRequest to allow aborting the request etc.
		return xhr;
	},

	handleError: function( s, xhr, status, e ) {
		// If a local callback was specified, fire it
		if ( s.error ) s.error( xhr, status, e );

		// Fire the global callback
		if ( s.global )
			jQuery.event.trigger( "ajaxError", [xhr, s, e] );
	},

	// Counter for holding the number of active queries
	active: 0,

	// Determines if an XMLHttpRequest was successful or not
	httpSuccess: function( xhr ) {
		try {
			// IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
			return !xhr.status &amp;&amp; location.protocol == "file:" ||
				( xhr.status &gt;= 200 &amp;&amp; xhr.status &lt; 300 ) || xhr.status == 304 || xhr.status == 1223;
		} catch(e){}
		return false;
	},

	// Determines if an XMLHttpRequest returns NotModified
	httpNotModified: function( xhr, url ) {
		try {
			var xhrRes = xhr.getResponseHeader("Last-Modified");

			// Firefox always returns 200. check Last-Modified date
			return xhr.status == 304 || xhrRes == jQuery.lastModified[url];
		} catch(e){}
		return false;
	},

	httpData: function( xhr, type, s ) {
		var ct = xhr.getResponseHeader("content-type"),
			xml = type == "xml" || !type &amp;&amp; ct &amp;&amp; ct.indexOf("xml") &gt;= 0,
			data = xml ? xhr.responseXML : xhr.responseText;

		if ( xml &amp;&amp; data.documentElement.tagName == "parsererror" )
			throw "parsererror";
			
		// Allow a pre-filtering function to sanitize the response
		// s != null is checked to keep backwards compatibility
		if( s &amp;&amp; s.dataFilter )
			data = s.dataFilter( data, type );

		// The filter can actually parse the response
		if( typeof data === "string" ){

			// If the type is "script", eval it in global context
			if ( type == "script" )
				jQuery.globalEval( data );

			// Get the JavaScript object, if JSON is used.
			if ( type == "json" )
				data = window["eval"]("(" + data + ")");
		}
		
		return data;
	},

	// Serialize an array of form elements or a set of
	// key/values into a query string
	param: function( a ) {
		var s = [ ];

		function add( key, value ){
			s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value);
		};

		// If an array was passed in, assume that it is an array
		// of form elements
		if ( jQuery.isArray(a) || a.jquery )
			// Serialize the form elements
			jQuery.each( a, function(){
				add( this.name, this.value );
			});

		// Otherwise, assume that it's an object of key/value pairs
		else
			// Serialize the key/values
			for ( var j in a )
				// If the value is an array then the key names need to be repeated
				if ( jQuery.isArray(a[j]) )
					jQuery.each( a[j], function(){
						add( j, this );
					});
				else
					add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] );

		// Return the resulting serialization
		return s.join("&amp;").replace(/%20/g, "+");
	}

});
var elemdisplay = {},
	timerId,
	fxAttrs = [
		// height animations
		[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
		// width animations
		[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
		// opacity animations
		[ "opacity" ]
	];

function genFx( type, num ){
	var obj = {};
	jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function(){
		obj[ this ] = type;
	});
	return obj;
}

jQuery.fn.extend({
	show: function(speed,callback){
		if ( speed ) {
			return this.animate( genFx("show", 3), speed, callback);
		} else {
			for ( var i = 0, l = this.length; i &lt; l; i++ ){
				var old = jQuery.data(this[i], "olddisplay");
				
				this[i].style.display = old || "";
				
				if ( jQuery.css(this[i], "display") === "none" ) {
					var tagName = this[i].tagName, display;
					
					if ( elemdisplay[ tagName ] ) {
						display = elemdisplay[ tagName ];
					} else {
						var elem = jQuery("&lt;" + tagName + " /&gt;").appendTo("body");
						
						display = elem.css("display");
						if ( display === "none" )
							display = "block";
						
						elem.remove();
						
						elemdisplay[ tagName ] = display;
					}
					
					jQuery.data(this[i], "olddisplay", display);
				}
			}

			// Set the display of the elements in a second loop
			// to avoid the constant reflow
			for ( var i = 0, l = this.length; i &lt; l; i++ ){
				this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
			}
			
			return this;
		}
	},

	hide: function(speed,callback){
		if ( speed ) {
			return this.animate( genFx("hide", 3), speed, callback);
		} else {
			for ( var i = 0, l = this.length; i &lt; l; i++ ){
				var old = jQuery.data(this[i], "olddisplay");
				if ( !old &amp;&amp; old !== "none" )
					jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
			}

			// Set the display of the elements in a second loop
			// to avoid the constant reflow
			for ( var i = 0, l = this.length; i &lt; l; i++ ){
				this[i].style.display = "none";
			}

			return this;
		}
	},

	// Save the old toggle function
	_toggle: jQuery.fn.toggle,

	toggle: function( fn, fn2 ){
		var bool = typeof fn === "boolean";

		return jQuery.isFunction(fn) &amp;&amp; jQuery.isFunction(fn2) ?
			this._toggle.apply( this, arguments ) :
			fn == null || bool ?
				this.each(function(){
					var state = bool ? fn : jQuery(this).is(":hidden");
					jQuery(this)[ state ? "show" : "hide" ]();
				}) :
				this.animate(genFx("toggle", 3), fn, fn2);
	},

	fadeTo: function(speed,to,callback){
		return this.animate({opacity: to}, speed, callback);
	},

	animate: function( prop, speed, easing, callback ) {
		var optall = jQuery.speed(speed, easing, callback);

		return this[ optall.queue === false ? "each" : "queue" ](function(){
		
			var opt = jQuery.extend({}, optall), p,
				hidden = this.nodeType == 1 &amp;&amp; jQuery(this).is(":hidden"),
				self = this;
	
			for ( p in prop ) {
				if ( prop[p] == "hide" &amp;&amp; hidden || prop[p] == "show" &amp;&amp; !hidden )
					return opt.complete.call(this);

				if ( ( p == "height" || p == "width" ) &amp;&amp; this.style ) {
					// Store display property
					opt.display = jQuery.css(this, "display");

					// Make sure that nothing sneaks out
					opt.overflow = this.style.overflow;
				}
			}

			if ( opt.overflow != null )
				this.style.overflow = "hidden";

			opt.curAnim = jQuery.extend({}, prop);

			jQuery.each( prop, function(name, val){
				var e = new jQuery.fx( self, opt, name );

				if ( /toggle|show|hide/.test(val) )
					e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
				else {
					var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
						start = e.cur(true) || 0;

					if ( parts ) {
						var end = parseFloat(parts[2]),
							unit = parts[3] || "px";

						// We need to compute starting value
						if ( unit != "px" ) {
							self.style[ name ] = (end || 1) + unit;
							start = ((end || 1) / e.cur(true)) * start;
							self.style[ name ] = start + unit;
						}

						// If a +=/-= token was provided, we're doing a relative animation
						if ( parts[1] )
							end = ((parts[1] == "-=" ? -1 : 1) * end) + start;

						e.custom( start, end, unit );
					} else
						e.custom( start, val, "" );
				}
			});

			// For JS strict compliance
			return true;
		});
	},

	stop: function(clearQueue, gotoEnd){
		var timers = jQuery.timers;

		if (clearQueue)
			this.queue([]);

		this.each(function(){
			// go in reverse order so anything added to the queue during the loop is ignored
			for ( var i = timers.length - 1; i &gt;= 0; i-- )
				if ( timers[i].elem == this ) {
					if (gotoEnd)
						// force the next step to be the last
						timers[i](true);
					timers.splice(i, 1);
				}
		});

		// start the next in the queue if the last step wasn't forced
		if (!gotoEnd)
			this.dequeue();

		return this;
	}

});

// Generate shortcuts for custom animations
jQuery.each({
	slideDown: genFx("show", 1),
	slideUp: genFx("hide", 1),
	slideToggle: genFx("toggle", 1),
	fadeIn: { opacity: "show" },
	fadeOut: { opacity: "hide" }
}, function( name, props ){
	jQuery.fn[ name ] = function( speed, callback ){
		return this.animate( props, speed, callback );
	};
});

jQuery.extend({

	speed: function(speed, easing, fn) {
		var opt = typeof speed === "object" ? speed : {
			complete: fn || !fn &amp;&amp; easing ||
				jQuery.isFunction( speed ) &amp;&amp; speed,
			duration: speed,
			easing: fn &amp;&amp; easing || easing &amp;&amp; !jQuery.isFunction(easing) &amp;&amp; easing
		};

		opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
			jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;

		// Queueing
		opt.old = opt.complete;
		opt.complete = function(){
			if ( opt.queue !== false )
				jQuery(this).dequeue();
			if ( jQuery.isFunction( opt.old ) )
				opt.old.call( this );
		};

		return opt;
	},

	easing: {
		linear: function( p, n, firstNum, diff ) {
			return firstNum + diff * p;
		},
		swing: function( p, n, firstNum, diff ) {
			return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
		}
	},

	timers: [],

	fx: function( elem, options, prop ){
		this.options = options;
		this.elem = elem;
		this.prop = prop;

		if ( !options.orig )
			options.orig = {};
	}

});

jQuery.fx.prototype = {

	// Simple function for setting a style value
	update: function(){
		if ( this.options.step )
			this.options.step.call( this.elem, this.now, this );

		(jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );

		// Set display property to block for height/width animations
		if ( ( this.prop == "height" || this.prop == "width" ) &amp;&amp; this.elem.style )
			this.elem.style.display = "block";
	},

	// Get the current size
	cur: function(force){
		if ( this.elem[this.prop] != null &amp;&amp; (!this.elem.style || this.elem.style[this.prop] == null) )
			return this.elem[ this.prop ];

		var r = parseFloat(jQuery.css(this.elem, this.prop, force));
		return r &amp;&amp; r &gt; -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
	},

	// Start an animation from one number to another
	custom: function(from, to, unit){
		this.startTime = now();
		this.start = from;
		this.end = to;
		this.unit = unit || this.unit || "px";
		this.now = this.start;
		this.pos = this.state = 0;

		var self = this;
		function t(gotoEnd){
			return self.step(gotoEnd);
		}

		t.elem = this.elem;

		if ( t() &amp;&amp; jQuery.timers.push(t) &amp;&amp; !timerId ) {
			timerId = setInterval(function(){
				var timers = jQuery.timers;

				for ( var i = 0; i &lt; timers.length; i++ )
					if ( !timers[i]() )
						timers.splice(i--, 1);

				if ( !timers.length ) {
					clearInterval( timerId );
					timerId = undefined;
				}
			}, 13);
		}
	},

	// Simple 'show' function
	show: function(){
		// Remember where we started, so that we can go back to it later
		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
		this.options.show = true;

		// Begin the animation
		// Make sure that we start at a small width/height to avoid any
		// flash of content
		this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur());

		// Start by showing the element
		jQuery(this.elem).show();
	},

	// Simple 'hide' function
	hide: function(){
		// Remember where we started, so that we can go back to it later
		this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
		this.options.hide = true;

		// Begin the animation
		this.custom(this.cur(), 0);
	},

	// Each step of an animation
	step: function(gotoEnd){
		var t = now();

		if ( gotoEnd || t &gt;= this.options.duration + this.startTime ) {
			this.now = this.end;
			this.pos = this.state = 1;
			this.update();

			this.options.curAnim[ this.prop ] = true;

			var done = true;
			for ( var i in this.options.curAnim )
				if ( this.options.curAnim[i] !== true )
					done = false;

			if ( done ) {
				if ( this.options.display != null ) {
					// Reset the overflow
					this.elem.style.overflow = this.options.overflow;

					// Reset the display
					this.elem.style.display = this.options.display;
					if ( jQuery.css(this.elem, "display") == "none" )
						this.elem.style.display = "block";
				}

				// Hide the element if the "hide" operation was done
				if ( this.options.hide )
					jQuery(this.elem).hide();

				// Reset the properties, if the item has been hidden or shown
				if ( this.options.hide || this.options.show )
					for ( var p in this.options.curAnim )
						jQuery.attr(this.elem.style, p, this.options.orig[p]);
					
				// Execute the complete function
				this.options.complete.call( this.elem );
			}

			return false;
		} else {
			var n = t - this.startTime;
			this.state = n / this.options.duration;

			// Perform the easing function, defaults to swing
			this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
			this.now = this.start + ((this.end - this.start) * this.pos);

			// Perform the next step of the animation
			this.update();
		}

		return true;
	}

};

jQuery.extend( jQuery.fx, {
	speeds:{
		slow: 600,
 		fast: 200,
 		// Default speed
 		_default: 400
	},
	step: {

		opacity: function(fx){
			jQuery.attr(fx.elem.style, "opacity", fx.now);
		},

		_default: function(fx){
			if ( fx.elem.style &amp;&amp; fx.elem.style[ fx.prop ] != null )
				fx.elem.style[ fx.prop ] = fx.now + fx.unit;
			else
				fx.elem[ fx.prop ] = fx.now;
		}
	}
});
if ( document.documentElement["getBoundingClientRect"] )
	jQuery.fn.offset = function() {
		if ( !this[0] ) return { top: 0, left: 0 };
		if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
		var box  = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement,
			clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
			top  = box.top  + (self.pageYOffset || jQuery.boxModel &amp;&amp; docElem.scrollTop  || body.scrollTop ) - clientTop,
			left = box.left + (self.pageXOffset || jQuery.boxModel &amp;&amp; docElem.scrollLeft || body.scrollLeft) - clientLeft;
		return { top: top, left: left };
	};
else 
	jQuery.fn.offset = function() {
		if ( !this[0] ) return { top: 0, left: 0 };
		if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
		jQuery.offset.initialized || jQuery.offset.initialize();

		var elem = this[0], offsetParent = elem.offsetParent, prevOffsetParent = elem,
			doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
			body = doc.body, defaultView = doc.defaultView,
			prevComputedStyle = defaultView.getComputedStyle(elem, null),
			top = elem.offsetTop, left = elem.offsetLeft;

		while ( (elem = elem.parentNode) &amp;&amp; elem !== body &amp;&amp; elem !== docElem ) {
			computedStyle = defaultView.getComputedStyle(elem, null);
			top -= elem.scrollTop, left -= elem.scrollLeft;
			if ( elem === offsetParent ) {
				top += elem.offsetTop, left += elem.offsetLeft;
				if ( jQuery.offset.doesNotAddBorder &amp;&amp; !(jQuery.offset.doesAddBorderForTableAndCells &amp;&amp; /^t(able|d|h)$/i.test(elem.tagName)) )
					top  += parseInt( computedStyle.borderTopWidth,  10) || 0,
					left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
				prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
			}
			if ( jQuery.offset.subtractsBorderForOverflowNotVisible &amp;&amp; computedStyle.overflow !== "visible" )
				top  += parseInt( computedStyle.borderTopWidth,  10) || 0,
				left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
			prevComputedStyle = computedStyle;
		}

		if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" )
			top  += body.offsetTop,
			left += body.offsetLeft;

		if ( prevComputedStyle.position === "fixed" )
			top  += Math.max(docElem.scrollTop, body.scrollTop),
			left += Math.max(docElem.scrollLeft, body.scrollLeft);

		return { top: top, left: left };
	};

jQuery.offset = {
	initialize: function() {
		if ( this.initialized ) return;
		var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
			html = '&lt;div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';

		rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' };
		for ( prop in rules ) container.style[prop] = rules[prop];

		container.innerHTML = html;
		body.insertBefore(container, body.firstChild);
		innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild;

		this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
		this.doesAddBorderForTableAndCells = (td.offsetTop === 5);

		innerDiv.style.overflow = 'hidden', innerDiv.style.position = 'relative';
		this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);

		body.style.marginTop = '1px';
		this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0);
		body.style.marginTop = bodyMarginTop;

		body.removeChild(container);
		this.initialized = true;
	},

	bodyOffset: function(body) {
		jQuery.offset.initialized || jQuery.offset.initialize();
		var top = body.offsetTop, left = body.offsetLeft;
		if ( jQuery.offset.doesNotIncludeMarginInBodyOffset )
			top  += parseInt( jQuery.curCSS(body, 'marginTop',  true), 10 ) || 0,
			left += parseInt( jQuery.curCSS(body, 'marginLeft', true), 10 ) || 0;
		return { top: top, left: left };
	}
};


jQuery.fn.extend({
	position: function() {
		var left = 0, top = 0, results;

		if ( this[0] ) {
			// Get *real* offsetParent
			var offsetParent = this.offsetParent(),

			// Get correct offsets
			offset       = this.offset(),
			parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();

			// Subtract element margins
			// note: when an element has margin: auto the offsetLeft and marginLeft 
			// are the same in Safari causing offset.left to incorrectly be 0
			offset.top  -= num( this, 'marginTop'  );
			offset.left -= num( this, 'marginLeft' );

			// Add offsetParent borders
			parentOffset.top  += num( offsetParent, 'borderTopWidth'  );
			parentOffset.left += num( offsetParent, 'borderLeftWidth' );

			// Subtract the two offsets
			results = {
				top:  offset.top  - parentOffset.top,
				left: offset.left - parentOffset.left
			};
		}

		return results;
	},

	offsetParent: function() {
		var offsetParent = this[0].offsetParent || document.body;
		while ( offsetParent &amp;&amp; (!/^body|html$/i.test(offsetParent.tagName) &amp;&amp; jQuery.css(offsetParent, 'position') == 'static') )
			offsetParent = offsetParent.offsetParent;
		return jQuery(offsetParent);
	}
});


// Create scrollLeft and scrollTop methods
jQuery.each( ['Left', 'Top'], function(i, name) {
	var method = 'scroll' + name;
	
	jQuery.fn[ method ] = function(val) {
		if (!this[0]) return null;

		return val !== undefined ?

			// Set the scroll offset
			this.each(function() {
				this == window || this == document ?
					window.scrollTo(
						!i ? val : jQuery(window).scrollLeft(),
						 i ? val : jQuery(window).scrollTop()
					) :
					this[ method ] = val;
			}) :

			// Return the scroll offset
			this[0] == window || this[0] == document ?
				self[ i ? 'pageYOffset' : 'pageXOffset' ] ||
					jQuery.boxModel &amp;&amp; document.documentElement[ method ] ||
					document.body[ method ] :
				this[0][ method ];
	};
});
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
jQuery.each([ "Height", "Width" ], function(i, name){

	var tl = i ? "Left"  : "Top",  // top or left
		br = i ? "Right" : "Bottom", // bottom or right
		lower = name.toLowerCase();

	// innerHeight and innerWidth
	jQuery.fn["inner" + name] = function(){
		return this[0] ?
			jQuery.css( this[0], lower, false, "padding" ) :
			null;
	};

	// outerHeight and outerWidth
	jQuery.fn["outer" + name] = function(margin) {
		return this[0] ?
			jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) :
			null;
	};
	
	var type = name.toLowerCase();

	jQuery.fn[ type ] = function( size ) {
		// Get window width or height
		return this[0] == window ?
			// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
			document.compatMode == "CSS1Compat" &amp;&amp; document.documentElement[ "client" + name ] ||
			document.body[ "client" + name ] :

			// Get document width or height
			this[0] == document ?
				// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
				Math.max(
					document.documentElement["client" + name],
					document.body["scroll" + name], document.documentElement["scroll" + name],
					document.body["offset" + name], document.documentElement["offset" + name]
				) :

				// Get or set width or height on the element
				size === undefined ?
					// Get width or height on the element
					(this.length ? jQuery.css( this[0], type ) : null) :

					// Set the width or height on the element (default to pixels if value is unitless)
					this.css( type, typeof size === "string" ? size : size + "px" );
	};

});
})();
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;
/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.core.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;return!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&amp;&amp;d(h))}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&amp;&amp;d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.22",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&amp;&amp;c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.browser.msie&amp;&amp;/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&amp;&amp;/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&amp;&amp;d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&amp;&amp;f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a("&lt;a&gt;").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&amp;&amp;(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&amp;&amp;(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d&gt;=0)&amp;&amp;c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.curCSS||(a.curCSS=a.css),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode)return;for(var e=0;e&lt;d.length;e++)a.options[d[e][0]]&amp;&amp;d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&amp;16:a!==b&amp;&amp;a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&amp;&amp;c==="left"?"scrollLeft":"scrollTop",e=!1;return b[d]&gt;0?!0:(b[d]=1,e=b[d]&gt;0,b[d]=0,e)},isOverAxis:function(a,b,c){return a&gt;b&amp;&amp;a&lt;b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&amp;&amp;a.ui.isOverAxis(c,e,g)}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.widget.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&amp;&amp;a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&amp;&amp;this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&amp;&amp;g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&amp;&amp;e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&amp;&amp;a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&amp;&amp;f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&amp;&amp;this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&amp;&amp;a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&amp;&amp;this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&amp;&amp;g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.mouse.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(c)return;this._mouseStarted&amp;&amp;this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&amp;&amp;b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&amp;&amp;this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted)return b.preventDefault(),!0}return!0===a.data(b.target,this.widgetName+".preventClickEvent")&amp;&amp;a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0},_mouseMove:function(b){return!a.browser.msie||document.documentMode&gt;=9||!!b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&amp;&amp;this._mouseDelayMet(b)&amp;&amp;(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&amp;&amp;(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&amp;&amp;a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))&gt;=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.position.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||"flip").split(" "),k=b.offset?b.offset.split(" "):[0,0],l,m,n;return i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at="left top",l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&amp;&amp;(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&amp;&amp;(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&amp;&amp;(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]==="right"?n.left+=l:b.at[0]===e&amp;&amp;(n.left+=l/2),b.at[1]==="bottom"?n.top+=m:b.at[1]===e&amp;&amp;(n.top+=m/2),n.left+=k[0],n.top+=k[1],this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,"marginLeft",!0))||0,i=parseInt(a.curCSS(this,"marginTop",!0))||0,o=d+h+(parseInt(a.curCSS(this,"marginRight",!0))||0),p=g+i+(parseInt(a.curCSS(this,"marginBottom",!0))||0),q=a.extend({},n),r;b.my[0]==="right"?q.left-=d:b.my[0]===e&amp;&amp;(q.left-=d/2),b.my[1]==="bottom"?q.top-=g:b.my[1]===e&amp;&amp;(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each(["left","top"],function(c,e){a.ui.position[j[c]]&amp;&amp;a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&amp;&amp;c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e&gt;0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e&gt;0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left&lt;0?g+h+i:f&gt;0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top&lt;0?g+h+i:f&gt;0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&amp;&amp;(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?a.isFunction(b)?this.each(function(c){a(this).offset(b.call(this,c,a(this).offset()))}):this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&amp;&amp;a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i&gt;21&amp;&amp;i&lt;22}()})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.draggable.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&amp;&amp;!/^(?:r|a|f)/.test(this.element.css("position"))&amp;&amp;(this.element[0].style.position="relative"),this.options.addClasses&amp;&amp;this.element.addClass("ui-draggable"),this.options.disabled&amp;&amp;this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(!this.element.data("draggable"))return;return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options;return this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(b),this.handle?(c.iframeFix&amp;&amp;a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('&lt;div class="ui-draggable-iframeFix" style="background: #fff;"&gt;&lt;/div&gt;').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&amp;&amp;(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&amp;&amp;this._adjustOffsetFromHelper(c.cursorAt),c.containment&amp;&amp;this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&amp;&amp;!c.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&amp;&amp;a.ui.ddmanager.dragStart(this,b),!0)},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return a.ui.ddmanager&amp;&amp;a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&amp;&amp;!this.options.dropBehaviour&amp;&amp;(c=a.ui.ddmanager.drop(this,b)),this.dropped&amp;&amp;(c=this.dropped,this.dropped=!1);var d=this.element[0],e=!1;while(d&amp;&amp;(d=d.parentNode))d==document&amp;&amp;(e=!0);if(!e&amp;&amp;this.options.helper==="original")return!1;if(this.options.revert=="invalid"&amp;&amp;!c||this.options.revert=="valid"&amp;&amp;c||this.options.revert===!0||a.isFunction(this.options.revert)&amp;&amp;this.options.revert.call(this.element,c)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",b)!==!1&amp;&amp;f._clear()})}else this._trigger("stop",b)!==!1&amp;&amp;this._clear();return!1},_mouseUp:function(b){return this.options.iframeFix===!0&amp;&amp;a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&amp;&amp;a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;return a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&amp;&amp;(c=!0)}),c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&amp;&amp;!/(fixed|absolute)/.test(d.css("position"))&amp;&amp;d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&amp;&amp;(b=b.split(" ")),a.isArray(b)&amp;&amp;(b={left:+b[0],top:+b[1]||0}),"left"in b&amp;&amp;(this.offset.click.left=b.left+this.margins.left),"right"in b&amp;&amp;(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&amp;&amp;(this.offset.click.top=b.top+this.margins.top),"bottom"in b&amp;&amp;(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&amp;&amp;this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0])&amp;&amp;(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()=="html"&amp;&amp;a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&amp;&amp;(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&amp;&amp;b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&amp;&amp;(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&amp;&amp;(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&amp;&amp;(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.left&lt;h[0]&amp;&amp;(f=h[0]+this.offset.click.left),b.pageY-this.offset.click.top&lt;h[1]&amp;&amp;(g=h[1]+this.offset.click.top),b.pageX-this.offset.click.left&gt;h[2]&amp;&amp;(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top&gt;h[3]&amp;&amp;(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.top&lt;h[1]||j-this.offset.click.top&gt;h[3]?j-this.offset.click.top&lt;h[1]?j+c.grid[1]:j-c.grid[1]:j:j;var k=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;f=h?k-this.offset.click.left&lt;h[0]||k-this.offset.click.left&gt;h[2]?k-this.offset.click.left&lt;h[0]?k+c.grid[0]:k-c.grid[0]:k:k}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&amp;&amp;!this.cancelHelperRemoval&amp;&amp;this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),b=="drag"&amp;&amp;(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.extend(a.ui.draggable,{version:"1.8.22"}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"sortable");c&amp;&amp;!c.options.disabled&amp;&amp;(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger("activate",b,f))})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&amp;&amp;(this.instance.options.revert=!0),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,d.options.helper=="original"&amp;&amp;this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("draggable"),e=this,f=function(b){var c=this.offset.click.top,d=this.offset.click.left,e=this.positionAbs.top,f=this.positionAbs.left,g=b.height,h=b.width,i=b.top,j=b.left;return a.ui.isOver(e+c,f+d,i,j,g,h)};a.each(d.sortables,function(f){this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&amp;&amp;this.instance._mouseDrag(b)):this.instance.isOver&amp;&amp;(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&amp;&amp;this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c){var d=a("body"),e=a(this).data("draggable").options;d.css("cursor")&amp;&amp;(e._cursor=d.css("cursor")),d.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;d._cursor&amp;&amp;a("body").css("cursor",d._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("opacity")&amp;&amp;(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;d._opacity&amp;&amp;a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(b,c){var d=a(this).data("draggable");d.scrollParent[0]!=document&amp;&amp;d.scrollParent[0].tagName!="HTML"&amp;&amp;(d.overflowOffset=d.scrollParent.offset())},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=!1;if(d.scrollParent[0]!=document&amp;&amp;d.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")d.overflowOffset.top+d.scrollParent[0].offsetHeight-b.pageY&lt;e.scrollSensitivity?d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top&lt;e.scrollSensitivity&amp;&amp;(d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop-e.scrollSpeed);if(!e.axis||e.axis!="y")d.overflowOffset.left+d.scrollParent[0].offsetWidth-b.pageX&lt;e.scrollSensitivity?d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left&lt;e.scrollSensitivity&amp;&amp;(d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft-e.scrollSpeed)}else{if(!e.axis||e.axis!="x")b.pageY-a(document).scrollTop()&lt;e.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())&lt;e.scrollSensitivity&amp;&amp;(f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!="y")b.pageX-a(document).scrollLeft()&lt;e.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())&lt;e.scrollSensitivity&amp;&amp;(f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed))}f!==!1&amp;&amp;a.ui.ddmanager&amp;&amp;!e.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c){var d=a(this).data("draggable"),e=d.options;d.snapElements=[],a(e.snap.constructor!=String?e.snap.items||":data(draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!=d.element[0]&amp;&amp;d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=e.snapTolerance,g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height;for(var k=d.snapElements.length-1;k&gt;=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f&lt;g&amp;&amp;g&lt;m+f&amp;&amp;n-f&lt;i&amp;&amp;i&lt;o+f||l-f&lt;g&amp;&amp;g&lt;m+f&amp;&amp;n-f&lt;j&amp;&amp;j&lt;o+f||l-f&lt;h&amp;&amp;h&lt;m+f&amp;&amp;n-f&lt;i&amp;&amp;i&lt;o+f||l-f&lt;h&amp;&amp;h&lt;m+f&amp;&amp;n-f&lt;j&amp;&amp;j&lt;o+f)){d.snapElements[k].snapping&amp;&amp;d.options.snap.release&amp;&amp;d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=!1;continue}if(e.snapMode!="inner"){var p=Math.abs(n-j)&lt;=f,q=Math.abs(o-i)&lt;=f,r=Math.abs(l-h)&lt;=f,s=Math.abs(m-g)&lt;=f;p&amp;&amp;(c.position.top=d._convertPositionTo("relative",{top:n-d.helperProportions.height,left:0}).top-d.margins.top),q&amp;&amp;(c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d.margins.top),r&amp;&amp;(c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left),s&amp;&amp;(c.position.left=d._convertPositionTo("relative",{top:0,left:m}).left-d.margins.left)}var t=p||q||r||s;if(e.snapMode!="outer"){var p=Math.abs(n-i)&lt;=f,q=Math.abs(o-j)&lt;=f,r=Math.abs(l-g)&lt;=f,s=Math.abs(m-h)&lt;=f;p&amp;&amp;(c.position.top=d._convertPositionTo("relative",{top:n,left:0}).top-d.margins.top),q&amp;&amp;(c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top),r&amp;&amp;(c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left),s&amp;&amp;(c.position.left=d._convertPositionTo("relative",{top:0,left:m-d.helperProportions.width}).left-d.margins.left)}!d.snapElements[k].snapping&amp;&amp;(p||q||r||s||t)&amp;&amp;d.options.snap.snap&amp;&amp;d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=p||q||r||s||t}}}),a.ui.plugin.add("draggable","stack",{start:function(b,c){var d=a(this).data("draggable").options,e=a.makeArray(a(d.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(!e.length)return;var f=parseInt(e[0].style.zIndex)||0;a(e).each(function(a){this.style.zIndex=f+a}),this[0].style.zIndex=f+e.length}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("zIndex")&amp;&amp;(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;d._zIndex&amp;&amp;a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.droppable.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var b=this.options,c=b.accept;this.isover=0,this.isout=1,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&amp;&amp;this.element.addClass("ui-droppable")},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c&lt;b.length;c++)b[c]==this&amp;&amp;b.splice(c,1);return this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"),this},_setOption:function(b,c){b=="accept"&amp;&amp;(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&amp;&amp;this.element.addClass(this.options.activeClass),c&amp;&amp;this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&amp;&amp;this.element.removeClass(this.options.activeClass),c&amp;&amp;this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;this.accept.call(this.element[0],c.currentItem||c.element)&amp;&amp;(this.options.hoverClass&amp;&amp;this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;this.accept.call(this.element[0],c.currentItem||c.element)&amp;&amp;(this.options.hoverClass&amp;&amp;this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return!1;var e=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&amp;&amp;!b.options.disabled&amp;&amp;b.options.scope==d.options.scope&amp;&amp;b.accept.call(b.element[0],d.currentItem||d.element)&amp;&amp;a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance))return e=!0,!1}),e?!1:this.accept.call(this.element[0],d.currentItem||d.element)?(this.options.activeClass&amp;&amp;this.element.removeClass(this.options.activeClass),this.options.hoverClass&amp;&amp;this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element):!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.extend(a.ui.droppable,{version:"1.8.22"}),a.ui.intersect=function(b,c,d){if(!c.offset)return!1;var e=(b.positionAbs||b.position.absolute).left,f=e+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height,i=c.offset.left,j=i+c.proportions.width,k=c.offset.top,l=k+c.proportions.height;switch(d){case"fit":return i&lt;=e&amp;&amp;f&lt;=j&amp;&amp;k&lt;=g&amp;&amp;h&lt;=l;case"intersect":return i&lt;e+b.helperProportions.width/2&amp;&amp;f-b.helperProportions.width/2&lt;j&amp;&amp;k&lt;g+b.helperProportions.height/2&amp;&amp;h-b.helperProportions.height/2&lt;l;case"pointer":var m=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,n=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,o=a.ui.isOver(n,m,k,i,c.proportions.height,c.proportions.width);return o;case"touch":return(g&gt;=k&amp;&amp;g&lt;=l||h&gt;=k&amp;&amp;h&lt;=l||g&lt;k&amp;&amp;h&gt;l)&amp;&amp;(e&gt;=i&amp;&amp;e&lt;=j||f&gt;=i&amp;&amp;f&lt;=j||e&lt;i&amp;&amp;f&gt;j);default:return!1}},a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf();g:for(var h=0;h&lt;d.length;h++){if(d[h].options.disabled||b&amp;&amp;!d[h].accept.call(d[h].element[0],b.currentItem||b.element))continue;for(var i=0;i&lt;f.length;i++)if(f[i]==d[h].element[0]){d[h].proportions.height=0;continue g}d[h].visible=d[h].element.css("display")!="none";if(!d[h].visible)continue;e=="mousedown"&amp;&amp;d[h]._activate.call(d[h],c),d[h].offset=d[h].element.offset(),d[h].proportions={width:d[h].element[0].offsetWidth,height:d[h].element[0].offsetHeight}}},drop:function(b,c){var d=!1;return a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options)return;!this.options.disabled&amp;&amp;this.visible&amp;&amp;a.ui.intersect(b,this,this.options.tolerance)&amp;&amp;(d=this._drop.call(this,c)||d),!this.options.disabled&amp;&amp;this.visible&amp;&amp;this.accept.call(this.element[0],b.currentItem||b.element)&amp;&amp;(this.isout=1,this.isover=0,this._deactivate.call(this,c))}),d},dragStart:function(b,c){b.element.parents(":not(body,html)").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&amp;&amp;a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var d=a.ui.intersect(b,this,this.options.tolerance),e=!d&amp;&amp;this.isover==1?"isout":d&amp;&amp;this.isover==0?"isover":null;if(!e)return;var f;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");g.length&amp;&amp;(f=a.data(g[0],"droppable"),f.greedyChild=e=="isover"?1:0)}f&amp;&amp;e=="isover"&amp;&amp;(f.isover=0,f.isout=1,f._out.call(f,c)),this[e]=1,this[e=="isout"?"isover":"isout"]=0,this[e=="isover"?"_over":"_out"].call(this,c),f&amp;&amp;e=="isout"&amp;&amp;(f.isout=0,f.isover=1,f._over.call(f,c))})},dragStop:function(b,c){b.element.parents(":not(body,html)").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.resizable.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var b=this,c=this.options;this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&amp;&amp;(this.element.wrap(a('&lt;div class="ui-wrapper" style="overflow: hidden;"&gt;&lt;/div&gt;').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&amp;&amp;(this.handles="n,e,s,w,se,sw,ne,nw");var d=this.handles.split(",");this.handles={};for(var e=0;e&lt;d.length;e++){var f=a.trim(d[e]),g="ui-resizable-"+f,h=a('&lt;div class="ui-resizable-handle '+g+'"&gt;&lt;/div&gt;');h.css({zIndex:c.zIndex}),"se"==f&amp;&amp;h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[f]=".ui-resizable-"+f,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&amp;&amp;(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&amp;&amp;this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(f,e),this._proportionallyResize()}if(!a(this.handles[c]).length)continue}},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&amp;&amp;a[1]?a[1]:"se"}}),c.autoHide&amp;&amp;(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){if(c.disabled)return;a(this).removeClass("ui-resizable-autohide"),b._handles.show()},function(){if(c.disabled)return;b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}return this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement),this},_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&amp;&amp;(c=!0);return!this.options.disabled&amp;&amp;c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&amp;&amp;f.css({position:"absolute",top:e.top,left:e.left}),this._renderProxy();var g=c(this.helper.css("left")),h=c(this.helper.css("top"));d.containment&amp;&amp;(g+=a(d.containment).scrollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:h},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:h},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(".ui-resizable-"+this.axis).css("cursor");return a("body").css("cursor",i=="auto"?this.axis+"-resize":i),f.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c=this.helper,d=this.options,e={},f=this,g=this.originalMousePosition,h=this.axis,i=b.pageX-g.left||0,j=b.pageY-g.top||0,k=this._change[h];if(!k)return!1;var l=k.apply(this,[b,i,j]),m=a.browser.msie&amp;&amp;a.browser.version&lt;7,n=this.sizeDiff;this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)l=this._updateRatio(l,b);return l=this._respectSize(l,b),this._propagate("resize",b),c.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&amp;&amp;this._proportionallyResizeElements.length&amp;&amp;this._proportionallyResize(),this._updateCache(l),this._trigger("resize",b,this.ui()),!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&amp;&amp;/textarea/i.test(e[0].nodeName),g=f&amp;&amp;a.ui.hasScroll(e[0],"left")?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width,i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(i,{top:k,left:j})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&amp;&amp;!c.animate&amp;&amp;this._proportionallyResize()}return a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&amp;&amp;this.helper.remove(),!1},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHeight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a)c=h.minHeight*this.aspectRatio,f=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,g=h.maxWidth/this.aspectRatio,c&gt;h.minWidth&amp;&amp;(h.minWidth=c),f&gt;h.minHeight&amp;&amp;(h.minHeight=f),e&lt;h.maxWidth&amp;&amp;(h.maxWidth=e),g&lt;h.maxHeight&amp;&amp;(h.maxHeight=g);this._vBoundaries=h},_updateCache:function(a){var b=this.options;this.offset=this.helper.offset(),d(a.left)&amp;&amp;(this.position.left=a.left),d(a.top)&amp;&amp;(this.position.top=a.top),d(a.height)&amp;&amp;(this.size.height=a.height),d(a.width)&amp;&amp;(this.size.width=a.width)},_updateRatio:function(a,b){var c=this.options,e=this.position,f=this.size,g=this.axis;return d(a.height)?a.width=a.height*this.aspectRatio:d(a.width)&amp;&amp;(a.height=a.width/this.aspectRatio),g=="sw"&amp;&amp;(a.left=e.left+(f.width-a.width),a.top=null),g=="nw"&amp;&amp;(a.top=e.top+(f.height-a.height),a.left=e.left+(f.width-a.width)),a},_respectSize:function(a,b){var c=this.helper,e=this._vBoundaries,f=this._aspectRatio||b.shiftKey,g=this.axis,h=d(a.width)&amp;&amp;e.maxWidth&amp;&amp;e.maxWidth&lt;a.width,i=d(a.height)&amp;&amp;e.maxHeight&amp;&amp;e.maxHeight&lt;a.height,j=d(a.width)&amp;&amp;e.minWidth&amp;&amp;e.minWidth&gt;a.width,k=d(a.height)&amp;&amp;e.minHeight&amp;&amp;e.minHeight&gt;a.height;j&amp;&amp;(a.width=e.minWidth),k&amp;&amp;(a.height=e.minHeight),h&amp;&amp;(a.width=e.maxWidth),i&amp;&amp;(a.height=e.maxHeight);var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);j&amp;&amp;n&amp;&amp;(a.left=l-e.minWidth),h&amp;&amp;n&amp;&amp;(a.left=l-e.maxWidth),k&amp;&amp;o&amp;&amp;(a.top=m-e.minHeight),i&amp;&amp;o&amp;&amp;(a.top=m-e.maxHeight);var p=!a.width&amp;&amp;!a.height;return p&amp;&amp;!a.left&amp;&amp;a.top?a.top=null:p&amp;&amp;!a.top&amp;&amp;a.left&amp;&amp;(a.left=null),a},_proportionallyResize:function(){var b=this.options;if(!this._proportionallyResizeElements.length)return;var c=this.helper||this.element;for(var d=0;d&lt;this._proportionallyResizeElements.length;d++){var e=this._proportionallyResizeElements[d];if(!this.borderDif){var f=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],g=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=a.map(f,function(a,b){var c=parseInt(a,10)||0,d=parseInt(g[b],10)||0;return c+d})}if(!a.browser.msie||!a(c).is(":hidden")&amp;&amp;!a(c).parents(":hidden").length)e.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0});else continue}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset();if(this._helper){this.helper=this.helper||a('&lt;div style="overflow:hidden;"&gt;&lt;/div&gt;');var d=a.browser.msie&amp;&amp;a.browser.version&lt;7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!="resize"&amp;&amp;this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.extend(a.ui.resizable,{version:"1.8.22"}),a.ui.plugin.add("resizable","alsoResize",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};typeof e.alsoResize=="object"&amp;&amp;!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=e.alsoResize[0],f(e.alsoResize)):a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("resizable-alsoresize"),f={},g=d&amp;&amp;d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&amp;&amp;c&gt;=0&amp;&amp;(f[b]=c||null)}),b.css(f)})};typeof e.alsoResize=="object"&amp;&amp;!e.alsoResize.nodeType?a.each(e.alsoResize,function(a,b){i(a,b)}):i(e.alsoResize)},stop:function(b,c){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","animate",{stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d._proportionallyResizeElements,g=f.length&amp;&amp;/textarea/i.test(f[0].nodeName),h=g&amp;&amp;a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.height,i=g?0:d.sizeDiff.width,j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&amp;&amp;k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};f&amp;&amp;f.length&amp;&amp;a(f[0]).css({width:c.width,height:c.height}),d._updateCache(c),d._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(b,d){var e=a(this).data("resizable"),f=e.options,g=e.element,h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!i)return;e.containerElement=a(i);if(/document/.test(h)||h==document)e.containerOffset={left:0,top:0},e.containerPosition={left:0,top:0},e.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var j=a(i),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,b){k[a]=c(j.css("padding"+b))}),e.containerOffset=j.offset(),e.containerPosition=j.position(),e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i,"left")?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;l[0]!=document&amp;&amp;/static/.test(l.css("position"))&amp;&amp;(k=g),i.left&lt;(d._helper?g.left:0)&amp;&amp;(d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left),j&amp;&amp;(d.size.height=d.size.width/d.aspectRatio),d.position.left=e.helper?g.left:0),i.top&lt;(d._helper?g.top:0)&amp;&amp;(d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top),j&amp;&amp;(d.size.width=d.size.height*d.aspectRatio),d.position.top=d._helper?g.top:0),d.offset.left=d.parentData.left+d.position.left,d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d.sizeDiff.height),o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css("position"));o&amp;&amp;p&amp;&amp;(m-=d.parentData.left),m+d.size.width&gt;=d.parentData.width&amp;&amp;(d.size.width=d.parentData.width-m,j&amp;&amp;(d.size.height=d.size.width/d.aspectRatio)),n+d.size.height&gt;=d.parentData.height&amp;&amp;(d.size.height=d.parentData.height-n,j&amp;&amp;(d.size.width=d.size.height*d.aspectRatio))},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement,j=a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;d._helper&amp;&amp;!e.animate&amp;&amp;/relative/.test(i.css("position"))&amp;&amp;a(this).css({left:k.left-h.left-g.left,width:l,height:m}),d._helper&amp;&amp;!e.animate&amp;&amp;/static/.test(i.css("position"))&amp;&amp;a(this).css({left:k.left-h.left-g.left,width:l,height:m})}}),a.ui.plugin.add("resizable","ghost",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone(),d.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:""),d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&amp;&amp;d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&amp;&amp;d.helper&amp;&amp;d.helper.get(0).removeChild(d.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l):/^(ne)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l):/^(sw)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.left=h.left-k):(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l,d.position.left=h.left-k)}});var c=function(a){return parseInt(a,10)||0},d=function(a){return!isNaN(parseInt(a,10))}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.selectable.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable"),this.dragged=!1;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass("ui-selectee"),c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=c.addClass("ui-selectee"),this._mouseInit(),this.helper=a("&lt;div class='ui-selectable-helper'&gt;&lt;/div&gt;")},destroy:function(){return this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy(),this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(this.options.disabled)return;var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&amp;&amp;this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,!b.metaKey&amp;&amp;!b.ctrlKey&amp;&amp;(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&amp;&amp;!b.ctrlKey||!d.$element.hasClass("ui-selected");return d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d.element}),!1}})},_mouseDrag:function(b){var c=this;this.dragged=!0;if(this.options.disabled)return;var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e&gt;g){var i=g;g=e,e=i}if(f&gt;h){var i=h;h=f,f=i}return this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!i||i.element==c.element[0])return;var j=!1;d.tolerance=="touch"?j=!(i.left&gt;g||i.right&lt;e||i.top&gt;h||i.bottom&lt;f):d.tolerance=="fit"&amp;&amp;(j=i.left&gt;e&amp;&amp;i.right&lt;g&amp;&amp;i.top&gt;f&amp;&amp;i.bottom&lt;h),j?(i.selected&amp;&amp;(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&amp;&amp;(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,c._trigger("selecting",b,{selecting:i.element}))):(i.selecting&amp;&amp;((b.metaKey||b.ctrlKey)&amp;&amp;i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&amp;&amp;(i.$element.addClass("ui-unselecting"),i.unselecting=!0),c._trigger("unselecting",b,{unselecting:i.element}))),i.selected&amp;&amp;!b.metaKey&amp;&amp;!b.ctrlKey&amp;&amp;!i.startselected&amp;&amp;(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,c._trigger("unselecting",b,{unselecting:i.element})))}),!1},_mouseStop:function(b){var c=this;this.dragged=!1;var d=this.options;return a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove(),!1}}),a.extend(a.ui.selectable,{version:"1.8.22"})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.sortable.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"&gt; *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b&gt;=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f)return e=a(this),!1});a.data(b.target,d.widgetName+"-item")==f&amp;&amp;(e=a(b.target));if(!e)return!1;if(this.options.handle&amp;&amp;!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&amp;&amp;(h=!0)});if(!h)return!1}return this.currentItem=e,this._removeCurrentsFromItems(),!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&amp;&amp;this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&amp;&amp;this.currentItem.hide(),this._createPlaceholder(),e.containment&amp;&amp;this._setContainment(),e.cursor&amp;&amp;(a("body").css("cursor")&amp;&amp;(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&amp;&amp;(this.helper.css("opacity")&amp;&amp;(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&amp;&amp;(this.helper.css("zIndex")&amp;&amp;(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!="HTML"&amp;&amp;(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g&gt;=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));return a.ui.ddmanager&amp;&amp;(a.ui.ddmanager.current=this),a.ui.ddmanager&amp;&amp;!e.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY&lt;c.scrollSensitivity?this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-this.overflowOffset.top&lt;c.scrollSensitivity&amp;&amp;(this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX&lt;c.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-this.overflowOffset.left&lt;c.scrollSensitivity&amp;&amp;(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(b.pageY-a(document).scrollTop()&lt;c.scrollSensitivity?d=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())&lt;c.scrollSensitivity&amp;&amp;(d=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)),b.pageX-a(document).scrollLeft()&lt;c.scrollSensitivity?d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())&lt;c.scrollSensitivity&amp;&amp;(d=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed))),d!==!1&amp;&amp;a.ui.ddmanager&amp;&amp;!c.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var e=this.items.length-1;e&gt;=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&amp;&amp;this.placeholder[h==1?"next":"prev"]()[0]!=g&amp;&amp;!a.ui.contains(this.placeholder[0],g)&amp;&amp;(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}return this._contactContainers(b),a.ui.ddmanager&amp;&amp;a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(!b)return;a.ui.ddmanager&amp;&amp;!this.options.dropBehaviour&amp;&amp;a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c&gt;=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&amp;&amp;(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}return this.placeholder&amp;&amp;(this.placeholder[0].parentNode&amp;&amp;this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&amp;&amp;this.helper&amp;&amp;this.helper[0].parentNode&amp;&amp;this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&amp;&amp;b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&amp;&amp;d.push((b.key||c[1]+"[]")+"="+(b.key&amp;&amp;b.expression?c[1]:c[2]))}),!d.length&amp;&amp;b.key&amp;&amp;d.push(b.key+"="),d.join("&amp;")},toArray:function(b){var c=this._getItemsAsjQuery(b&amp;&amp;b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j&gt;h&amp;&amp;d+j&lt;i&amp;&amp;b+k&gt;f&amp;&amp;b+k&lt;g;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&amp;&amp;this.helperProportions[this.floating?"width":"height"]&gt;a[this.floating?"width":"height"]?l:f&lt;b+this.helperProportions.width/2&amp;&amp;c-this.helperProportions.width/2&lt;g&amp;&amp;h&lt;d+this.helperProportions.height/2&amp;&amp;e-this.helperProportions.height/2&lt;i},_intersectsWithPointer:function(b){var c=this.options.axis==="x"||a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),d=this.options.axis==="y"||a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),e=c&amp;&amp;d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return e?this.floating?g&amp;&amp;g=="right"||f=="down"?2:1:f&amp;&amp;(f=="down"?2:1):!1},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&amp;&amp;f?f=="right"&amp;&amp;d||f=="left"&amp;&amp;!d:e&amp;&amp;(e=="down"&amp;&amp;c||e=="up"&amp;&amp;!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&amp;&amp;(a&gt;0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&amp;&amp;(a&gt;0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&amp;&amp;b)for(var g=f.length-1;g&gt;=0;g--){var h=a(f[g]);for(var i=h.length-1;i&gt;=0;i--){var j=a.data(h[i],this.widgetName);j&amp;&amp;j!=this&amp;&amp;!j.options.disabled&amp;&amp;e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g&gt;=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b&lt;this.items.length;b++)for(var c=0;c&lt;a.length;c++)a[c]==this.items[b].item[0]&amp;&amp;this.items.splice(b,1)},_refreshItems:function(b){this.items=[],this.containers=[this];var c=this.items,d=this,e=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],f=this._connectWith();if(f&amp;&amp;this.ready)for(var g=f.length-1;g&gt;=0;g--){var h=a(f[g]);for(var i=h.length-1;i&gt;=0;i--){var j=a.data(h[i],this.widgetName);j&amp;&amp;j!=this&amp;&amp;!j.options.disabled&amp;&amp;(e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g&gt;=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i&lt;m;i++){var n=a(l[i]);n.data(this.widgetName+"-item",k),c.push({item:n,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){this.offsetParent&amp;&amp;this.helper&amp;&amp;(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;c&gt;=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&amp;&amp;this.currentContainer&amp;&amp;d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&amp;&amp;this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c&gt;=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return e||(b.style.visibility="hidden"),b},update:function(a,b){if(e&amp;&amp;!d.forcePlaceholderSize)return;b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e&gt;=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&amp;&amp;a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&amp;&amp;(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!c)return;if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i&gt;=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.containers[d].floating?this.items[i].item.offset().left:this.items[i].item.offset().top;Math.abs(j-h)&lt;f&amp;&amp;(f=Math.abs(j-h),g=this.items[i],this.direction=j-h&gt;0?"down":"up")}if(!g&amp;&amp;!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d],g?this._rearrange(b,g,null,!0):this._rearrange(b,null,this.containers[d].element,!0),this._trigger("change",b,this._uiHash()),this.containers[d]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;return d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]==this.currentItem[0]&amp;&amp;(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(d[0].style.width==""||c.forceHelperSize)&amp;&amp;d.width(this.currentItem.width()),(d[0].style.height==""||c.forceHelperSize)&amp;&amp;d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&amp;&amp;(b=b.split(" ")),a.isArray(b)&amp;&amp;(b={left:+b[0],top:+b[1]||0}),"left"in b&amp;&amp;(this.offset.click.left=b.left+this.margins.left),"right"in b&amp;&amp;(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&amp;&amp;(this.offset.click.top=b.top+this.margins.top),"bottom"in b&amp;&amp;(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&amp;&amp;this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0])&amp;&amp;(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()=="html"&amp;&amp;a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&amp;&amp;(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],d=a(b.containment).offset(),e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&amp;&amp;(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&amp;&amp;this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&amp;&amp;this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&amp;&amp;(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);this.cssPosition=="relative"&amp;&amp;(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&amp;&amp;(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition){this.containment&amp;&amp;(b.pageX-this.offset.click.left&lt;this.containment[0]&amp;&amp;(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top&lt;this.containment[1]&amp;&amp;(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left&gt;this.containment[2]&amp;&amp;(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top&gt;this.containment[3]&amp;&amp;(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.top&lt;this.containment[1]||h-this.offset.click.top&gt;this.containment[3]?h-this.offset.click.top&lt;this.containment[1]?h+c.grid[1]:h-c.grid[1]:h:h;var i=this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0];f=this.containment?i-this.offset.click.left&lt;this.containment[0]||i-this.offset.click.left&gt;this.containment[2]?i-this.offset.click.left&lt;this.containment[0]?i+c.grid[0]:i-c.grid[0]:i:i}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&amp;&amp;this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&amp;&amp;this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){f==e.counter&amp;&amp;e.refreshPositions(!d)},0)},_clear:function(b,c){this.reverting=!1;var d=[],e=this;!this._noFinalSort&amp;&amp;this.currentItem.parent().length&amp;&amp;this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&amp;&amp;!c&amp;&amp;d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&amp;&amp;!c&amp;&amp;d.push(function(a){this._trigger("update",a,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||d.push(function(a){this._trigger("remove",a,this._uiHash())});for(var f=this.containers.length-1;f&gt;=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&amp;&amp;!c&amp;&amp;(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f&gt;=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&amp;&amp;(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&amp;&amp;a("body").css("cursor",this._storedCursor),this._storedOpacity&amp;&amp;this.helper.css("opacity",this._storedOpacity),this._storedZIndex&amp;&amp;this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f&lt;d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1,!1}c||this._trigger("beforeStop",b,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&amp;&amp;this.helper.remove(),this.helper=null;if(!c){for(var f=0;f&lt;d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&amp;&amp;this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}}),a.extend(a.ui.sortable,{version:"1.8.22"})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.accordion.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"&gt; li &gt; :first-child,&gt; :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var b=this,c=b.options;b.running=0,b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-focus")}),b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var d=b.element.find("a").filter(c.navigationFilter).eq(0);if(d.length){var e=d.closest(".ui-accordion-header");e.length?b.active=e:b.active=d.closest(".ui-accordion-content").prev()}}b.active=b._findActive(b.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),b.active.next().addClass("ui-accordion-content-active"),b._createIcons(),b.resize(),b.element.attr("role","tablist"),b.headers.attr("role","tab").bind("keydown.accordion",function(a){return b._keydown(a)}).next().attr("role","tabpanel"),b.headers.not(b.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),b.active.length?b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):b.headers.eq(0).attr("tabIndex",0),a.browser.safari||b.headers.find("a").attr("tabIndex",-1),c.event&amp;&amp;b.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){b._clickHandler.call(b,a,this),a.preventDefault()})},_createIcons:function(){var b=this.options;b.icons&amp;&amp;(a("&lt;span&gt;&lt;/span&gt;").addClass("ui-icon "+b.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove(),this.element.removeClass("ui-accordion-icons")},destroy:function(){var b=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");return(b.autoHeight||b.fillHeight)&amp;&amp;c.css("height",""),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b=="active"&amp;&amp;this.activate(c),b=="icons"&amp;&amp;(this._destroyIcons(),c&amp;&amp;this._createIcons()),b=="disabled"&amp;&amp;this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(b){if(this.options.disabled||b.altKey||b.ctrlKey)return;var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._clickHandler({target:b.target},b.target),b.preventDefault()}return f?(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),!1):!0},resize:function(){var b=this.options,c;if(b.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height(),a.browser.msie&amp;&amp;this.element.parent().css("overflow",d),this.headers.each(function(){c-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else b.autoHeight&amp;&amp;(c=0,this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c));return this},activate:function(a){this.options.active=a;var b=this._findActive(a)[0];return this._clickHandler({target:b},b),this},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===!1?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,c){var d=this.options;if(d.disabled)return;if(!b.target){if(!d.collapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),f={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:e},g=this.active=a([]);this._toggle(g,e,f);return}var h=a(b.currentTarget||c),i=h[0]===this.active[0];d.active=d.collapsible&amp;&amp;i?!1:this.headers.index(h);if(this.running||!d.collapsible&amp;&amp;i)return;var j=this.active,g=h.next(),e=this.active.next(),f={options:d,newHeader:i&amp;&amp;d.collapsible?a([]):h,oldHeader:this.active,newContent:i&amp;&amp;d.collapsible?a([]):g,oldContent:e},k=this.headers.index(this.active[0])&gt;this.headers.index(h[0]);this.active=i?a([]):h,this._toggle(g,e,f,i,k),j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),i||(h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected),h.next().addClass("ui-accordion-content-active"));return},_toggle:function(b,c,d,e,f){var g=this,h=g.options;g.toShow=b,g.toHide=c,g.data=d;var i=function(){if(!g)return;return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data),g.running=c.size()===0?b.size():c.size();if(h.animated){var j={};h.collapsible&amp;&amp;e?j={toShow:a([]),toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}:j={toShow:b,toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace},h.proxied||(h.proxied=h.animated),h.proxiedDuration||(h.proxiedDuration=h.duration),h.animated=a.isFunction(h.proxied)?h.proxied(j):h.proxied,h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(j):h.proxiedDuration;var k=a.ui.accordion.animations,l=h.duration,m=h.animated;m&amp;&amp;!k[m]&amp;&amp;!a.easing[m]&amp;&amp;(m="slide"),k[m]||(k[m]=function(a){this.slide(a,{easing:m,duration:l||700})}),k[m](j)}else h.collapsible&amp;&amp;e?b.toggle():(c.hide(),b.show()),i(!0);c.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),b.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(this.running)return;this.options.clearStyle&amp;&amp;this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&amp;&amp;(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data)}}),a.extend(a.ui.accordion,{version:"1.8.22",animations:{slide:function(b,c){b=a.extend({easing:"swing",duration:300},b,c);if(!b.toHide.size()){b.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},b);return}if(!b.toShow.size()){b.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},b);return}var d=b.toShow.css("overflow"),e=0,f={},g={},h=["height","paddingTop","paddingBottom"],i,j=b.toShow;i=j[0].style.width,j.width(j.parent().width()-parseFloat(j.css("paddingLeft"))-parseFloat(j.css("paddingRight"))-(parseFloat(j.css("borderLeftWidth"))||0)-(parseFloat(j.css("borderRightWidth"))||0)),a.each(h,function(c,d){g[d]="hide";var e=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);f[d]={value:e[1],unit:e[2]||"px"}}),b.toShow.css({height:0,overflow:"hidden"}).show(),b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g,{step:function(a,c){c.prop=="height"&amp;&amp;(e=c.end-c.start===0?0:(c.now-c.start)/(c.end-c.start)),b.toShow[0].style[c.prop]=e*f[c.prop].value+f[c.prop].unit},duration:b.duration,easing:b.easing,complete:function(){b.autoHeight||b.toShow.css("height",""),b.toShow.css({width:i,overflow:d}),b.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.autocomplete.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&amp;&amp;(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&amp;&amp;(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&amp;&amp;(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("&lt;ul&gt;&lt;/ul&gt;").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&amp;&amp;c.target!==d&amp;&amp;!a.ui.contains(d,c.target)&amp;&amp;b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&amp;&amp;/^key/.test(a.originalEvent.type)&amp;&amp;b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&amp;&amp;(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&amp;&amp;b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&amp;&amp;b.element.val()!==b.term&amp;&amp;b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&amp;&amp;this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&amp;&amp;this._initSource(),b==="appendTo"&amp;&amp;this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&amp;&amp;c&amp;&amp;this.xhr&amp;&amp;this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&amp;&amp;b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length&lt;this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)===!1)return;return this._search(a)},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&amp;&amp;a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){!this.options.disabled&amp;&amp;a&amp;&amp;a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close()},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&amp;&amp;(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&amp;&amp;this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&amp;&amp;b[0].label&amp;&amp;b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&amp;&amp;this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("&lt;li&gt;&lt;/li&gt;").data("item.autocomplete",c).append(a("&lt;a&gt;&lt;/a&gt;").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&amp;&amp;/^previous/.test(a)||this.menu.last()&amp;&amp;/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&amp;")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c&lt;0?this.element.scrollTop(d+c):c&gt;=e&amp;&amp;this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&amp;&amp;!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&amp;&amp;!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b&lt;10&amp;&amp;b&gt;-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b&lt;10&amp;&amp;b&gt;-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()&lt;this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.button.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);return c&amp;&amp;(d?e=a(d).find("[name='"+c+"']"):e=a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",j),typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.propAttr("disabled"):this.element.propAttr("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,i=this.type==="checkbox"||this.type==="radio",l="ui-state-hover"+(i?"":" ui-state-active"),m="ui-state-focus";h.label===null&amp;&amp;(h.label=this.buttonElement.html()),this.buttonElement.addClass(g).attr("role","button").bind("mouseenter.button",function(){if(h.disabled)return;a(this).addClass("ui-state-hover"),this===c&amp;&amp;a(this).addClass("ui-state-active")}).bind("mouseleave.button",function(){if(h.disabled)return;a(this).removeClass(l)}).bind("click.button",function(a){h.disabled&amp;&amp;(a.preventDefault(),a.stopImmediatePropagation())}),this.element.bind("focus.button",function(){b.buttonElement.addClass(m)}).bind("blur.button",function(){b.buttonElement.removeClass(m)}),i&amp;&amp;(this.element.bind("change.button",function(){if(f)return;b.refresh()}),this.buttonElement.bind("mousedown.button",function(a){if(h.disabled)return;f=!1,d=a.pageX,e=a.pageY}).bind("mouseup.button",function(a){if(h.disabled)return;if(d!==a.pageX||e!==a.pageY)f=!0})),this.type==="checkbox"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).toggleClass("ui-state-active"),b.buttonElement.attr("aria-pressed",b.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var c=b.element[0];k(c).not(c).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){if(h.disabled)return!1;a(this).addClass("ui-state-active"),c=this,a(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(h.disabled)return!1;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(b){if(h.disabled)return!1;(b.keyCode==a.ui.keyCode.SPACE||b.keyCode==a.ui.keyCode.ENTER)&amp;&amp;a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&amp;&amp;this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&amp;&amp;a(this).click()})),this._setOption("disabled",h.disabled),this._resetButton()},_determineButtonType:function(){this.element.is(":checkbox")?this.type="checkbox":this.element.is(":radio")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";if(this.type==="checkbox"||this.type==="radio"){var a=this.element.parents().filter(":last"),b="label[for='"+this.element.attr("id")+"']";this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible");var c=this.element.is(":checked");c&amp;&amp;this.buttonElement.addClass("ui-state-active"),this.buttonElement.attr("aria-pressed",c)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(g+" "+h+" "+i).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title"),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled"){c?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1);return}this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&amp;&amp;this._setOption("disabled",b),this.type==="radio"?k(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&amp;&amp;(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&amp;&amp;this.element.val(this.options.label);return}var b=this.buttonElement.removeClass(i),c=a("&lt;span&gt;&lt;/span&gt;",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&amp;&amp;d.secondary,f=[];d.primary||d.secondary?(this.options.text&amp;&amp;f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&amp;&amp;b.prepend("&lt;span class='ui-button-icon-primary ui-icon "+d.primary+"'&gt;&lt;/span&gt;"),d.secondary&amp;&amp;b.append("&lt;span class='ui-button-icon-secondary ui-icon "+d.secondary+"'&gt;&lt;/span&gt;"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",c))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&amp;&amp;this.buttons.button("option",b,c),a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var b=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),a.Widget.prototype.destroy.call(this)}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.dialog.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",d={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},f=a.attrFn||{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0,click:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c&lt;0&amp;&amp;a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&amp;&amp;(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||"&amp;#160;",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("&lt;div&gt;&lt;/div&gt;")).appendTo(document.body).hide().addClass(c+d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(c){d.closeOnEscape&amp;&amp;!c.isDefaultPrevented()&amp;&amp;c.keyCode&amp;&amp;c.keyCode===a.ui.keyCode.ESCAPE&amp;&amp;(b.close(c),c.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(!1,a)}),h=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("&lt;div&gt;&lt;/div&gt;")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),j=a('&lt;a href="#"&gt;&lt;/a&gt;').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(a){return b.close(a),!1}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("&lt;span&gt;&lt;/span&gt;")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j),l=a("&lt;span&gt;&lt;/span&gt;").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);a.isFunction(d.beforeclose)&amp;&amp;!a.isFunction(d.beforeClose)&amp;&amp;(d.beforeClose=d.beforeclose),i.find("*").add(i).disableSelection(),d.draggable&amp;&amp;a.fn.draggable&amp;&amp;b._makeDraggable(),d.resizable&amp;&amp;a.fn.resizable&amp;&amp;b._makeResizable(),b._createButtons(d.buttons),b._isOpen=!1,a.fn.bgiframe&amp;&amp;g.bgiframe()},_init:function(){this.options.autoOpen&amp;&amp;this.open()},destroy:function(){var a=this;return a.overlay&amp;&amp;a.overlay.destroy(),a.uiDialog.hide(),a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&amp;&amp;a.element.attr("title",a.originalTitle),a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(!1===c._trigger("beforeClose",b))return;return c.overlay&amp;&amp;c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c._isOpen=!1,c.options.hide?c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&amp;&amp;(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&amp;&amp;(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d),c},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;return e.modal&amp;&amp;!b||!e.stack&amp;&amp;!e.modal?d._trigger("focus",c):(e.zIndex&gt;a.ui.dialog.maxZ&amp;&amp;(a.ui.dialog.maxZ=e.zIndex),d.overlay&amp;&amp;(a.ui.dialog.maxZ+=1,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)),f={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(f),d._trigger("focus",c),d)},open:function(){if(this._isOpen)return;var b=this,c=b.options,d=b.uiDialog;return b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b._size(),b._position(c.position),d.show(c.show),b.moveToTop(!0),c.modal&amp;&amp;d.bind("keydown.ui-dialog",function(b){if(b.keyCode!==a.ui.keyCode.TAB)return;var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&amp;&amp;!b.shiftKey)return d.focus(1),!1;if(b.target===d[0]&amp;&amp;b.shiftKey)return e.focus(1),!1}),a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(),b._isOpen=!0,b._trigger("open"),b},_createButtons:function(b){var c=this,d=!1,e=a("&lt;div&gt;&lt;/div&gt;").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=a("&lt;div&gt;&lt;/div&gt;").addClass("ui-dialog-buttonset").appendTo(e);c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&amp;&amp;b!==null&amp;&amp;a.each(b,function(){return!(d=!0)}),d&amp;&amp;(a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a('&lt;button type="button"&gt;&lt;/button&gt;').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(g);a.each(d,function(a,b){if(a==="click")return;a in f?e[a](b):e.attr(a,b)}),a.fn.button&amp;&amp;e.button()}),e.appendTo(c.uiDialog))},_makeDraggable:function(){function f(a){return{position:a.position,offset:a.offset}}var b=this,c=b.options,d=a(document),e;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){e=c.height==="auto"?"auto":a(this).height(),a(this).height(a(this).height()).addClass("ui-dialog-dragging"),b._trigger("dragStart",d,f(g))},drag:function(a,c){b._trigger("drag",a,f(c))},stop:function(g,h){c.position=[h.position.left-d.scrollLeft(),h.position.top-d.scrollTop()],a(this).removeClass("ui-dialog-dragging").height(e),b._trigger("dragStop",g,f(h)),a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function h(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var d=this,e=d.options,f=d.uiDialog.css("position"),g=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:g,start:function(b,c){a(this).addClass("ui-dialog-resizing"),d._trigger("resizeStart",b,h(c))},resize:function(a,b){d._trigger("resize",a,h(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing"),e.height=a(this).height(),e.width=a(this).width(),d._trigger("resizeStop",b,h(c)),a.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b=="string"||typeof b=="object"&amp;&amp;"0"in b)c=b.split?b.split(" "):[b[0],b[1]],c.length===1&amp;&amp;(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&amp;&amp;(d[a]=c[a],c[a]=b)}),b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog.prototype.options.position;e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b)),e||this.uiDialog.hide()},_setOptions:function(b){var c=this,f={},g=!1;a.each(b,function(a,b){c._setOption(a,b),a in d&amp;&amp;(g=!0),a in e&amp;&amp;(f[a]=b)}),g&amp;&amp;this._size(),this.uiDialog.is(":data(resizable)")&amp;&amp;this.uiDialog.resizable("option",f)},_setOption:function(b,d){var e=this,f=e.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":e._createButtons(d);break;case"closeText":e.uiDialogTitlebarCloseText.text(""+d);break;case"dialogClass":f.removeClass(e.options.dialogClass).addClass(c+d);break;case"disabled":d?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case"draggable":var g=f.is(":data(draggable)");g&amp;&amp;!d&amp;&amp;f.draggable("destroy"),!g&amp;&amp;d&amp;&amp;e._makeDraggable();break;case"position":e._position(d);break;case"resizable":var h=f.is(":data(resizable)");h&amp;&amp;!d&amp;&amp;f.resizable("destroy"),h&amp;&amp;typeof d=="string"&amp;&amp;f.resizable("option","handles",d),!h&amp;&amp;d!==!1&amp;&amp;e._makeResizable(d);break;case"title":a(".ui-dialog-title",e.uiDialogTitlebar).html(""+(d||"&amp;#160;"))}a.Widget.prototype._setOption.apply(e,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),b.minWidth&gt;b.width&amp;&amp;(b.width=b.minWidth),c=this.uiDialog.css({height:"auto",width:b.width}).height(),d=Math.max(0,b.minHeight-c);if(b.height==="auto")if(a.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();var f=this.element.css("height","auto").height();e||this.uiDialog.hide(),this.element.height(Math.max(f,d))}else this.element.height(Math.max(b.height-c,0));this.uiDialog.is(":data(resizable)")&amp;&amp;this.uiDialog.resizable("option","minHeight",this._minHeight())}}),a.extend(a.ui.dialog,{version:"1.8.22",uuid:0,maxZ:0,getTitleId:function(a){var b=a.attr("id");return b||(this.uuid+=1,b=this.uuid),"ui-dialog-title-"+b},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}}),a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){this.instances.length===0&amp;&amp;(setTimeout(function(){a.ui.dialog.overlay.instances.length&amp;&amp;a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()&lt;a.ui.dialog.overlay.maxZ)return!1})},1),a(document).bind("keydown.dialog-overlay",function(c){b.options.closeOnEscape&amp;&amp;!c.isDefaultPrevented()&amp;&amp;c.keyCode&amp;&amp;c.keyCode===a.ui.keyCode.ESCAPE&amp;&amp;(b.close(c),c.preventDefault())}),a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize));var c=(this.oldInstances.pop()||a("&lt;div&gt;&lt;/div&gt;").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return a.fn.bgiframe&amp;&amp;c.bgiframe(),this.instances.push(c),c},destroy:function(b){var c=a.inArray(b,this.instances);c!=-1&amp;&amp;this.oldInstances.push(this.instances.splice(c,1)[0]),this.instances.length===0&amp;&amp;a([document,window]).unbind(".dialog-overlay"),b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))}),this.maxZ=d},height:function(){var b,c;return a.browser.msie&amp;&amp;a.browser.version&lt;7?(b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),b&lt;c?a(window).height()+"px":b+"px"):a(document).height()+"px"},width:function(){var b,c;return a.browser.msie?(b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),b&lt;c?a(window).width()+"px":b+"px"):a(document).width()+"px"},resize:function(){var b=a([]);a.each(a.ui.dialog.overlay.instances,function(){b=b.add(this)}),b.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}}),a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.slider.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="&lt;a class='ui-slider-handle ui-state-default ui-corner-all' href='#'&gt;&lt;/a&gt;",g=d.values&amp;&amp;d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&amp;&amp;(d.range===!0&amp;&amp;(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&amp;&amp;d.values.length!==2&amp;&amp;(d.values=[d.values[0],d.values[0]])),this.range=a("&lt;div&gt;&lt;/div&gt;").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;i&lt;g;i+=1)h.push(f);this.handles=e.add(a(h.join("")).appendTo(b.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")}),this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)}),this.handles.keydown(function(d){var e=a(this).data("index.ui-slider-handle"),f,g,h,i;if(b.options.disabled)return;switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:d.preventDefault();if(!b._keySliding){b._keySliding=!0,a(this).addClass("ui-state-active"),f=b._start(d,e);if(f===!1)return}}i=b.options.step,b.options.values&amp;&amp;b.options.values.length?g=h=b.values(e):g=h=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:h=b._valueMin();break;case a.ui.keyCode.END:h=b._valueMax();break;case a.ui.keyCode.PAGE_UP:h=b._trimAlignValue(g+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:h=b._trimAlignValue(g-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g===b._valueMax())return;h=b._trimAlignValue(g+i);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g===b._valueMin())return;h=b._trimAlignValue(g-i)}b._slide(d,e,h)}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");b._keySliding&amp;&amp;(b._keySliding=!1,b._stop(c,d),b._change(c,d),a(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){return this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),d={x:b.pageX,y:b.pageY},e=this._normValueFromMouse(d),f=this._valueMax()-this._valueMin()+1,h=this,this.handles.each(function(b){var c=Math.abs(e-h.values(b));f&gt;c&amp;&amp;(f=c,g=a(this),i=b)}),c.range===!0&amp;&amp;this.values(1)===c.min&amp;&amp;(i+=1,g=a(this.handles[i])),j=this._start(b,i),j===!1?!1:(this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0,!0))},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d&gt;1&amp;&amp;(d=1),d&lt;0&amp;&amp;(d=0),this.orientation==="vertical"&amp;&amp;(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&amp;&amp;this.options.values.length&amp;&amp;(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&amp;&amp;this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&amp;&amp;this.options.range===!0&amp;&amp;(b===0&amp;&amp;c&gt;d||b===1&amp;&amp;c&lt;d)&amp;&amp;(c=d),c!==this.values(b)&amp;&amp;(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&amp;&amp;this.values(b,c,!0))):c!==this.value()&amp;&amp;(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&amp;&amp;this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&amp;&amp;this.options.values.length&amp;&amp;(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&amp;&amp;!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&amp;&amp;this.options.values.length&amp;&amp;(c.value=this.values(b),c.values=this.values()),this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);return}return this._value()},values:function(b,c){var d,e,f;if(arguments.length&gt;1){this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);return}if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&amp;&amp;this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f&lt;d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;a.isArray(this.options.values)&amp;&amp;(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(d=0;d&lt;e;d+=1)this._change(null,d);this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a),a},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b),b;c=this.options.values.slice();for(d=0;d&lt;c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c},_trimAlignValue:function(a){if(a&lt;=this._valueMin())return this._valueMin();if(a&gt;=this._valueMax())return this._valueMax();var b=this.options.step&gt;0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return Math.abs(c)*2&gt;=b&amp;&amp;(d+=c&gt;0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&amp;&amp;this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&amp;&amp;(d.orientation==="horizontal"?(b===0&amp;&amp;d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&amp;&amp;d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&amp;&amp;d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&amp;&amp;d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&amp;&amp;this.orientation==="horizontal"&amp;&amp;this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&amp;&amp;this.orientation==="horizontal"&amp;&amp;this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&amp;&amp;this.orientation==="vertical"&amp;&amp;this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&amp;&amp;this.orientation==="vertical"&amp;&amp;this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.22"})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.tabs.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"&lt;div&gt;&lt;/div&gt;",remove:null,select:null,show:null,spinner:"&lt;em&gt;Loading&amp;#8230;&lt;/em&gt;",tabTemplate:"&lt;li&gt;&lt;a href='#{href}'&gt;&lt;span&gt;#{label}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;"},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&amp;&amp;b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&amp;&amp;a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&amp;&amp;c.opacity&amp;&amp;b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" &gt; li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&amp;&amp;(h===location.toString().split("#")[0]||(i=a("base")[0])&amp;&amp;h===i.href)&amp;&amp;(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&amp;&amp;g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&amp;&amp;this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&amp;&amp;e.cookie&amp;&amp;(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&amp;&amp;this.lis.filter(".ui-tabs-selected").length&amp;&amp;(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&amp;&amp;(e.selected=-1),e.selected=e.selected&gt;=0&amp;&amp;this.anchors[e.selected]||e.selected&lt;0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&amp;&amp;e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected&gt;=0&amp;&amp;this.anchors.length&amp;&amp;(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&amp;&amp;this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&amp;&amp;!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&amp;&amp;this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&amp;&amp;b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&amp;&amp;(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&amp;&amp;!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&amp;&amp;d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&amp;&amp;d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&amp;&amp;d._cookie(e.selected,e.cookie);if(g.length)f.length&amp;&amp;d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&amp;&amp;this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&amp;&amp;(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&amp;&amp;(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&amp;&amp;this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&amp;&amp;(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e&gt;=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a&gt;=e?++a:a}),this._tabify(),this.anchors.length==1&amp;&amp;(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&amp;&amp;this.anchors.length&gt;1&amp;&amp;this.select(b+(b+1&lt;this.anchors.length?1:-1)),c.disabled=a.map(a.grep(c.disabled,function(a,c){return a!=b}),function(a,c){return a&gt;=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&amp;&amp;(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&amp;&amp;this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&amp;&amp;a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&amp;&amp;a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&amp;&amp;(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.22"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a&lt;c.anchors.length?a:0)},a),b&amp;&amp;b.stopPropagation()}),f=c._unrotate||(c._unrotate=b?function(a){e()}:function(a){a.clientX&amp;&amp;c.rotate(null)});return a?(this.element.bind("tabsshow",e),this.anchors.bind(d.event+".tabs",f),e()):(clearTimeout(c.rotation),this.element.unbind("tabsshow",e),this.anchors.unbind(d.event+".tabs",f),delete this._rotate,delete this._unrotate),this}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.datepicker.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('&lt;div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"&gt;&lt;/div&gt;'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&amp;&amp;d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&amp;&amp;d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&amp;&amp;($.browser.safari&amp;&amp;typeof a=="object"&amp;&amp;a.length||a.constructor&amp;&amp;a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.22"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&amp;&amp;console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&amp;&amp;this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('&lt;div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"&gt;&lt;/div&gt;')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&amp;&amp;this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&amp;&amp;b.append.remove(),c&amp;&amp;(b.append=$('&lt;span class="'+this._appendClass+'"&gt;'+c+"&lt;/span&gt;"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&amp;&amp;b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&amp;&amp;a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("&lt;img/&gt;").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('&lt;button type="button"&gt;&lt;/button&gt;').addClass(this._triggerClass).html(g==""?f:$("&lt;img/&gt;").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&amp;&amp;$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&amp;&amp;$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&amp;&amp;!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;d&lt;a.length;d++)a[d].length&gt;b&amp;&amp;(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&amp;&amp;this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('&lt;input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px;"/&gt;'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&amp;&amp;b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&amp;&amp;$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&amp;&amp;b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b&lt;this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(arguments.length==2&amp;&amp;typeof b=="string")return b=="defaults"?$.extend({},$.datepicker._defaults):d?b=="all"?$.extend({},d.settings):this._get(d,b):null;var e=b||{};typeof b=="string"&amp;&amp;(e={},e[b]=c);if(d){this._curInst==d&amp;&amp;this._hideDatepicker();var f=this._getDateDatepicker(a,!0),g=this._getMinMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e),g!==null&amp;&amp;e.dateFormat!==undefined&amp;&amp;e.minDate===undefined&amp;&amp;(d.settings.minDate=this._formatDate(d,g)),h!==null&amp;&amp;e.dateFormat!==undefined&amp;&amp;e.maxDate===undefined&amp;&amp;(d.settings.maxDate=this._formatDate(d,h)),this._attachments($(a),d),this._autoSize(d),this._setDate(d,f),this._updateAlternate(d),this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&amp;&amp;this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&amp;&amp;(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&amp;&amp;!c.inline&amp;&amp;this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target),c=!0,d=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if($.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._hideDatepicker(),c=!1;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);e[0]&amp;&amp;$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);var f=$.datepicker._get(b,"onSelect");if(f){var g=$.datepicker._formatDate(b);f.apply(b.input?b.input[0]:null,[g,b])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._adjustDate(a.target,d?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&amp;&amp;$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._adjustDate(a.target,d?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&amp;&amp;$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else a.keyCode==36&amp;&amp;a.ctrlKey?$.datepicker._showDatepicker(this):c=!1;c&amp;&amp;(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d&lt;" "||!c||c.indexOf(d)&gt;-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&amp;&amp;($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&amp;&amp;(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&amp;&amp;$.datepicker._curInst!=b&amp;&amp;($.datepicker._curInst.dpDiv.stop(!0,!0),b&amp;&amp;$.datepicker._datepickerShowing&amp;&amp;$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&amp;&amp;(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&amp;&amp;$.browser.opera&amp;&amp;($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&amp;&amp;$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&amp;&amp;$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&amp;&amp;i(),b.input.is(":visible")&amp;&amp;!b.input.is(":disabled")&amp;&amp;b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a)),this._attachHandlers(a);var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f&gt;1&amp;&amp;a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&amp;&amp;$.datepicker._datepickerShowing&amp;&amp;a.input&amp;&amp;a.input.is(":visible")&amp;&amp;!a.input.is(":disabled")&amp;&amp;a.input[0]!=document.activeElement&amp;&amp;a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&amp;&amp;a.yearshtml&amp;&amp;a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+(c?0:$(document).scrollLeft()),i=document.documentElement.clientHeight+(c?0:$(document).scrollTop());return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&amp;&amp;b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&amp;&amp;b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d&gt;h&amp;&amp;h&gt;d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e&gt;i&amp;&amp;i&gt;e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&amp;&amp;(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&amp;&amp;b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&amp;&amp;$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&amp;&amp;f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&amp;&amp;(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&amp;&amp;($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&amp;&amp;b.parents("#"+$.datepicker._mainDivId).length==0&amp;&amp;!b.hasClass($.datepicker.markerClassName)&amp;&amp;!b.closest("."+$.datepicker._triggerClass).length&amp;&amp;$.datepicker._datepickerShowing&amp;&amp;(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&amp;&amp;$.datepicker._curInst!=c)&amp;&amp;$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&amp;&amp;c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&amp;&amp;d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&amp;&amp;d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&amp;&amp;d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b&gt;0&amp;&amp;b&lt;6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1&lt;a.length&amp;&amp;a.charAt(s+1)==b;return c&amp;&amp;s++,c},o=function(a){var c=n(a),d=a=="@"?14:a=="!"?20:a=="y"&amp;&amp;c?4:a=="o"?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;return r+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase())return f=c[0],r+=d.length,!1});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0;for(var s=0;s&lt;a.length;s++)if(m)a.charAt(s)=="'"&amp;&amp;!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r&lt;b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);i==-1?i=(new Date).getFullYear():i&lt;100&amp;&amp;(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i&lt;=d?0:-100));if(l&gt;-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k&lt;=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1&lt;a.length&amp;&amp;a.charAt(m+1)==b;return c&amp;&amp;m++,c},i=function(a,b,c){var d=""+b;if(h(a))while(d.length&lt;c)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m&lt;a.length;m++)if(l)a.charAt(m)=="'"&amp;&amp;!h("'")?l=!1:k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100&lt;10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){var b="",c=!1,d=function(b){var c=e+1&lt;a.length&amp;&amp;a.charAt(e+1)==b;return c&amp;&amp;e++,c};for(var e=0;e&lt;a.length;e++)if(c)a.charAt(e)=="'"&amp;&amp;!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()==a.lastVal)return;var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMonth=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN(b)?c:d(b):new Date(b.getTime());return f=f&amp;&amp;f.toString()=="Invalid Date"?c:f,f&amp;&amp;(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0)),this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()&gt;12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&amp;&amp;!c&amp;&amp;this._notifyChange(a),this._adjustInstDate(a),a.input&amp;&amp;a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&amp;&amp;a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(a){var b=this._get(a,"stepMonths"),c="#"+a.id;a.dpDiv.find("[data-handler]").map(function(){var a={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,-b,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,+b,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(c)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(c,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),a[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n&lt;0&amp;&amp;(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&amp;&amp;p&lt;l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))&gt;p)n--,n&lt;0&amp;&amp;(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'&lt;a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+q+'"&gt;&lt;span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'"&gt;'+q+"&lt;/span&gt;&lt;/a&gt;":e?"":'&lt;a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"&gt;&lt;span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'"&gt;'+q+"&lt;/span&gt;&lt;/a&gt;",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'&lt;a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+s+'"&gt;&lt;span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'"&gt;'+s+"&lt;/span&gt;&lt;/a&gt;":e?"":'&lt;a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"&gt;&lt;span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'"&gt;'+s+"&lt;/span&gt;&lt;/a&gt;",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&amp;&amp;a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'&lt;button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click"&gt;'+this._get(a,"closeText")+"&lt;/button&gt;",x=d?'&lt;div class="ui-datepicker-buttonpane ui-widget-content"&gt;'+(c?w:"")+(this._isInRange(a,v)?'&lt;button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click"&gt;'+u+"&lt;/button&gt;":"")+(c?"":w)+"&lt;/div&gt;":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L&lt;g[0];L++){var M="";this.maxRows=4;for(var N=0;N&lt;g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),P=" ui-corner-all",Q="";if(j){Q+='&lt;div class="ui-datepicker-group';if(g[1]&gt;1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='"&gt;'}Q+='&lt;div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'"&gt;'+(/all|left/.test(P)&amp;&amp;L==0?c?t:r:"")+(/all|right/.test(P)&amp;&amp;L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L&gt;0||N&gt;0,D,E)+'&lt;/div&gt;&lt;table class="ui-datepicker-calendar"&gt;&lt;thead&gt;'+"&lt;tr&gt;";var R=z?'&lt;th class="ui-datepicker-week-col"&gt;'+this._get(a,"weekHeader")+"&lt;/th&gt;":"";for(var S=0;S&lt;7;S++){var T=(S+y)%7;R+="&lt;th"+((S+y+6)%7&gt;=5?' class="ui-datepicker-week-end"':"")+"&gt;"+'&lt;span title="'+A[T]+'"&gt;'+C[T]+"&lt;/span&gt;&lt;/th&gt;"}Q+=R+"&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;";var U=this._getDaysInMonth(o,n);o==a.selectedYear&amp;&amp;n==a.selectedMonth&amp;&amp;(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows&gt;W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z&lt;X;Z++){Q+="&lt;tr&gt;";var _=z?'&lt;td class="ui-datepicker-week-col"&gt;'+this._get(a,"calculateWeek")(Y)+"&lt;/td&gt;":"";for(var S=0;S&lt;7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&amp;&amp;!H||!ba[0]||l&amp;&amp;Y&lt;l||m&amp;&amp;Y&gt;m;_+='&lt;td class="'+((S+y+6)%7&gt;=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&amp;&amp;n==a.selectedMonth&amp;&amp;a._keyEvent||J.getTime()==Y.getTime()&amp;&amp;J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(bc?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&amp;&amp;!G?"":" "+ba[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&amp;&amp;ba[2]?' title="'+ba[2]+'"':"")+(bc?"":' data-handler="selectDay" data-event="click" data-month="'+Y.getMonth()+'" data-year="'+Y.getFullYear()+'"')+"&gt;"+(bb&amp;&amp;!G?"&amp;#xa0;":bc?'&lt;span class="ui-state-default"&gt;'+Y.getDate()+"&lt;/span&gt;":'&lt;a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#"&gt;'+Y.getDate()+"&lt;/a&gt;")+"&lt;/td&gt;",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+"&lt;/tr&gt;"}n++,n&gt;11&amp;&amp;(n=0,o++),Q+="&lt;/tbody&gt;&lt;/table&gt;"+(j?"&lt;/div&gt;"+(g[0]&gt;0&amp;&amp;N==g[1]-1?'&lt;div class="ui-datepicker-row-break"&gt;&lt;/div&gt;':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&amp;&amp;parseInt($.browser.version,10)&lt;7&amp;&amp;!a.inline?'&lt;iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"&gt;&lt;/iframe&gt;':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='&lt;div class="ui-datepicker-title"&gt;',m="";if(f||!i)m+='&lt;span class="ui-datepicker-month"&gt;'+g[b]+"&lt;/span&gt;";else{var n=d&amp;&amp;d.getFullYear()==c,o=e&amp;&amp;e.getFullYear()==c;m+='&lt;select class="ui-datepicker-month" data-handler="selectMonth" data-event="change"&gt;';for(var p=0;p&lt;12;p++)(!n||p&gt;=d.getMonth())&amp;&amp;(!o||p&lt;=e.getMonth())&amp;&amp;(m+='&lt;option value="'+p+'"'+(p==b?' selected="selected"':"")+"&gt;"+h[p]+"&lt;/option&gt;");m+="&lt;/select&gt;"}k||(l+=m+(f||!i||!j?"&amp;#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='&lt;span class="ui-datepicker-year"&gt;'+c+"&lt;/span&gt;";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='&lt;select class="ui-datepicker-year" data-handler="selectYear" data-event="change"&gt;';for(;t&lt;=u;t++)a.yearshtml+='&lt;option value="'+t+'"'+(t==c?' selected="selected"':"")+"&gt;"+t+"&lt;/option&gt;";a.yearshtml+="&lt;/select&gt;",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&amp;&amp;(l+=(f||!i||!j?"&amp;#xa0;":"")+m),l+="&lt;/div&gt;",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&amp;&amp;this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&amp;&amp;b&lt;c?c:b;return e=d&amp;&amp;e&gt;d?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&amp;&amp;b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b&lt;0?b:e[0]*e[1]),1));return b&lt;0&amp;&amp;f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()&gt;=c.getTime())&amp;&amp;(!d||b.getTime()&lt;=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&amp;&amp;a!="getDate"&amp;&amp;a!="widget"?a=="option"&amp;&amp;arguments.length==2&amp;&amp;typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.22",window["DP_jQuery_"+dpuuid]=$})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.progressbar.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("&lt;div class='ui-progressbar-value ui-widget-header ui-corner-left'&gt;&lt;/div&gt;").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&amp;&amp;(this.options.value=c,this._refreshValue(),this._value()===this.options.max&amp;&amp;this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&amp;&amp;(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&amp;&amp;(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a&gt;this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.22"})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.core.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
jQuery.effects||function(a,b){function c(b){var c;return b&amp;&amp;b.constructor==Array&amp;&amp;b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:(c=/rgba\(0, 0, 0, 0\)/.exec(b))?e.transparent:e[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=(a.curCSS||a.css)(b,d);if(e!=""&amp;&amp;e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&amp;&amp;a.length&amp;&amp;a[0]&amp;&amp;a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&amp;&amp;(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&amp;&amp;(b[c]=a[c]);return b}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&amp;&amp;isNaN(parseFloat(d)))&amp;&amp;delete b[c];return b}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&amp;&amp;(c[d]=b[d]);return c}function k(b,c,d,e){typeof b=="object"&amp;&amp;(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&amp;&amp;(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&amp;&amp;(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function l(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&amp;&amp;!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){return a.isFunction(d)&amp;&amp;(e=d,d=null),this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class")||"";a.each(f,function(a,c){b[c]&amp;&amp;g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&amp;&amp;g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&amp;&amp;e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.22",save:function(a,b){for(var c=0;c&lt;b.length;c++)b[c]!==null&amp;&amp;a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c&lt;b.length;c++)b[c]!==null&amp;&amp;a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){return b=="toggle"&amp;&amp;(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("&lt;div&gt;&lt;/div&gt;").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;try{e.id}catch(f){e=document.body}return b.wrap(d),(b[0]===e||a.contains(b[0],e))&amp;&amp;a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&amp;&amp;(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&amp;&amp;a(d).focus(),c):b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]&gt;0&amp;&amp;(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];return a.fx.off||!i?h?this[h](g.duration,g.callback):this.each(function(){g.callback&amp;&amp;g.callback.call(this)}):i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)&gt;0&amp;&amp;(d=[parseFloat(c),b])}),d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)&lt;1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)&lt;1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)&lt;1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)&lt;1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)&lt;1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)&lt;1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h&lt;Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h&lt;Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;g||(g=e*.3*1.5);if(h&lt;Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return b&lt;1?-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,c,d,e,f,g){return g==b&amp;&amp;(g=1.70158),e*(c/=f)*c*((g+1)*c-g)+d},easeOutBack:function(a,c,d,e,f,g){return g==b&amp;&amp;(g=1.70158),e*((c=c/f-1)*c*((g+1)*c+g)+1)+d},easeInOutBack:function(a,c,d,e,f,g){return g==b&amp;&amp;(g=1.70158),(c/=f/2)&lt;1?e/2*c*c*(((g*=1.525)+1)*c-g)+d:e/2*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+d},easeInBounce:function(b,c,d,e,f){return e-a.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(a,b,c,d,e){return(b/=e)&lt;1/2.75?d*7.5625*b*b+c:b&lt;2/2.75?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:b&lt;2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(b,c,d,e,f){return c&lt;f/2?a.easing.easeInBounce(b,c*2,0,e,f)*.5+d:a.easing.easeOutBounce(b,c*2-f,0,e,f)*.5+e*.5+d}})}(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.blind.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.blind=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=f=="vertical"?"height":"width",i=f=="vertical"?g.height():g.width();e=="show"&amp;&amp;g.css(h,0);var j={};j[h]=e=="show"?i:0,g.animate(j,b.duration,b.options.easing,function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.bounce.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.bounce=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"up",g=b.options.distance||20,h=b.options.times||5,i=b.duration||250;/show|hide/.test(e)&amp;&amp;d.push("opacity"),a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",g=b.options.distance||(j=="top"?c.outerHeight(!0)/3:c.outerWidth(!0)/3);e=="show"&amp;&amp;c.css("opacity",0).css(j,k=="pos"?-g:g),e=="hide"&amp;&amp;(g=g/(h*2)),e!="hide"&amp;&amp;h--;if(e=="show"){var l={opacity:1};l[j]=(k=="pos"?"+=":"-=")+g,c.animate(l,i/2,b.options.easing),g=g/2,h--}for(var m=0;m&lt;h;m++){var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing),g=e=="hide"?g*2:g/2}if(e=="hide"){var l={opacity:0};l[j]=(k=="pos"?"-=":"+=")+g,c.animate(l,i/2,b.options.easing,function(){c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments)})}else{var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments)})}c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.clip.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.clip=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","height","width"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=c[0].tagName=="IMG"?g:c,i={size:f=="vertical"?"height":"width",position:f=="vertical"?"top":"left"},j=f=="vertical"?h.height():h.width();e=="show"&amp;&amp;(h.css(i.size,0),h.css(i.position,j/2));var k={};k[i.size]=e=="show"?j:0,k[i.position]=e=="show"?0:j/2,h.animate(k,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(c[0],arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.drop.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.drop=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","opacity"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight(!0)/2:c.outerWidth(!0)/2);e=="show"&amp;&amp;c.css("opacity",0).css(g,h=="pos"?-i:i);var j={opacity:e=="show"?1:0};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.explode.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.explode=function(b){return this.queue(function(){var c=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3,d=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var e=a(this).show().css("visibility","hidden"),f=e.offset();f.top-=parseInt(e.css("marginTop"),10)||0,f.left-=parseInt(e.css("marginLeft"),10)||0;var g=e.outerWidth(!0),h=e.outerHeight(!0);for(var i=0;i&lt;c;i++)for(var j=0;j&lt;d;j++)e.clone().appendTo("body").wrap("&lt;div&gt;&lt;/div&gt;").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500);setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide(),b.callback&amp;&amp;b.callback.apply(e[0]),e.dequeue(),a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.fade.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&amp;&amp;b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.fold.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.size||15,g=!!b.options.horizFirst,h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d),c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),j=e=="show"!=g,k=j?["width","height"]:["height","width"],l=j?[i.width(),i.height()]:[i.height(),i.width()],m=/([0-9]+)%/.exec(f);m&amp;&amp;(f=parseInt(m[1],10)/100*l[e=="hide"?0:1]),e=="show"&amp;&amp;i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f,p[k[1]]=e=="show"?l[1]:0,i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.highlight.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&amp;&amp;(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),e=="show"&amp;&amp;!a.support.opacity&amp;&amp;this.style.removeAttribute("filter"),b.callback&amp;&amp;b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.pulsate.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show"),e=(b.options.times||5)*2-1,f=b.duration?b.duration/2:a.fx.speeds._default/2,g=c.is(":visible"),h=0;g||(c.css("opacity",0).show(),h=1),(d=="hide"&amp;&amp;g||d=="show"&amp;&amp;!g)&amp;&amp;e--;for(var i=0;i&lt;e;i++)c.animate({opacity:h},f,b.options.easing),h=(h+1)%2;c.animate({opacity:h},f,b.options.easing,function(){h==0&amp;&amp;c.hide(),b.callback&amp;&amp;b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}).dequeue()})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.scale.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.puff=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide"),e=parseInt(b.options.percent,10)||150,f=e/100,g={height:c.height(),width:c.width()};a.extend(b.options,{fade:!0,mode:d,percent:d=="hide"?e:100,from:d=="hide"?g:{height:g.height*f,width:g.width*f}}),c.effect("scale",b.options,b.duration,b.callback),c.dequeue()})},a.effects.scale=function(b){return this.queue(function(){var c=a(this),d=a.extend(!0,{},b.options),e=a.effects.setMode(c,b.options.mode||"effect"),f=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:e=="hide"?0:100),g=b.options.direction||"both",h=b.options.origin;e!="effect"&amp;&amp;(d.origin=h||["middle","center"],d.restore=!0);var i={height:c.height(),width:c.width()};c.from=b.options.from||(e=="show"?{height:0,width:0}:i);var j={y:g!="horizontal"?f/100:1,x:g!="vertical"?f/100:1};c.to={height:i.height*j.y,width:i.width*j.x},b.options.fade&amp;&amp;(e=="show"&amp;&amp;(c.from.opacity=0,c.to.opacity=1),e=="hide"&amp;&amp;(c.from.opacity=1,c.to.opacity=0)),d.from=c.from,d.to=c.to,d.mode=e,c.effect("size",d,b.duration,b.callback),c.dequeue()})},a.effects.size=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","width","height","overflow","opacity"],e=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],g=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],j=a.effects.setMode(c,b.options.mode||"effect"),k=b.options.restore||!1,l=b.options.scale||"both",m=b.options.origin,n={height:c.height(),width:c.width()};c.from=b.options.from||n,c.to=b.options.to||n;if(m){var p=a.effects.getBaseline(m,n);c.from.top=(n.height-c.from.height)*p.y,c.from.left=(n.width-c.from.width)*p.x,c.to.top=(n.height-c.to.height)*p.y,c.to.left=(n.width-c.to.width)*p.x}var q={from:{y:c.from.height/n.height,x:c.from.width/n.width},to:{y:c.to.height/n.height,x:c.to.width/n.width}};if(l=="box"||l=="both")q.from.y!=q.to.y&amp;&amp;(d=d.concat(h),c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&amp;&amp;(d=d.concat(i),c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to));(l=="content"||l=="both")&amp;&amp;q.from.y!=q.to.y&amp;&amp;(d=d.concat(g),c.from=a.effects.setTransition(c,g,q.from.y,c.from),c.to=a.effects.setTransition(c,g,q.to.y,c.to)),a.effects.save(c,k?d:e),c.show(),a.effects.createWrapper(c),c.css("overflow","hidden").css(c.from);if(l=="content"||l=="both")h=h.concat(["marginTop","marginBottom"]).concat(g),i=i.concat(["marginLeft","marginRight"]),f=d.concat(h).concat(i),c.find("*[width]").each(function(){var c=a(this);k&amp;&amp;a.effects.save(c,f);var d={height:c.height(),width:c.width()};c.from={height:d.height*q.from.y,width:d.width*q.from.x},c.to={height:d.height*q.to.y,width:d.width*q.to.x},q.from.y!=q.to.y&amp;&amp;(c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&amp;&amp;(c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.options.easing,function(){k&amp;&amp;a.effects.restore(c,f)})});c.animate(c.to,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){c.to.opacity===0&amp;&amp;c.css("opacity",c.from.opacity),j=="hide"&amp;&amp;c.hide(),a.effects.restore(c,k?d:e),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.shake.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.shake=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"left",g=b.options.distance||20,h=b.options.times||3,i=b.duration||b.options.duration||140;a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",l={},m={},n={};l[j]=(k=="pos"?"-=":"+=")+g,m[j]=(k=="pos"?"+=":"-=")+g*2,n[j]=(k=="pos"?"-=":"+=")+g*2,c.animate(l,i,b.options.easing);for(var p=1;p&lt;h;p++)c.animate(m,i,b.options.easing).animate(n,i,b.options.easing);c.animate(m,i,b.options.easing).animate(l,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.slide.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.slide=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"show"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c).css({overflow:"hidden"});var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight(!0):c.outerWidth(!0));e=="show"&amp;&amp;c.css(g,h=="pos"?isNaN(i)?"-"+i:-i:i);var j={};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.transfer.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),d=a(b.options.to),e=d.offset(),f={top:e.top,left:e.left,height:d.innerHeight(),width:d.innerWidth()},g=c.offset(),h=a('&lt;div class="ui-effects-transfer"&gt;&lt;/div&gt;').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&amp;&amp;b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;
$(function() {
  $( "#draggable" ).draggable({autoscroll: false, containment: "#contenedor"});
});
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="position:fixed; top:15px; left:15px;"&gt;&lt;div id="contenedor"&gt;&lt;div id="draggable" class='draggable ui-corner-all'&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/practica-manual-de-percentiles13.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-8989813105957633514</guid><pubDate>Fri, 02 Jun 2017 19:55:00 +0000</pubDate><atom:updated>2017-06-02T14:55:45.331-05:00</atom:updated><title>Practica Manual de Percentiles</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;style&gt;
.draggable { position:absolute; top:79px; left:46px; width: 50px; height: 50px; background:url(http://www.uropediatra-online.com/files/Herramientas/Punto%20Azul-Ni%C3%B1o.png); }
#contenedor { display: block; position:relative; width:451px; height:451px; margin: 0px auto; text-align: center; background:url(http://www.uropediatra-online.com/files/Herramientas/TablaNi%C3%B1os-EdadPeso.jpg); }
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;
/*!
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){

var 
 // Will speed up references to window, and allows munging its name.
 window = this,
 // Will speed up references to undefined, and allows munging its name.
 undefined,
 // Map over jQuery in case of overwrite
 _jQuery = window.jQuery,
 // Map over the $ in case of overwrite
 _$ = window.$,

 jQuery = window.jQuery = window.$ = function( selector, context ) {
  // The jQuery object is actually just the init constructor 'enhanced'
  return new jQuery.fn.init( selector, context );
 },

 // A simple way to check for HTML strings or ID strings
 // (both of which we optimize for)
 quickExpr = /^[^&lt;]*(&lt;(.|\s)+&gt;)[^&gt;]*$|^#([\w-]+)$/,
 // Is it a simple selector
 isSimple = /^.[^:#\[\.,]*$/;

jQuery.fn = jQuery.prototype = {
 init: function( selector, context ) {
  // Make sure that a selection was provided
  selector = selector || document;

  // Handle $(DOMElement)
  if ( selector.nodeType ) {
   this[0] = selector;
   this.length = 1;
   this.context = selector;
   return this;
  }
  // Handle HTML strings
  if ( typeof selector === "string" ) {
   // Are we dealing with HTML string or an ID?
   var match = quickExpr.exec( selector );

   // Verify a match, and that no context was specified for #id
   if ( match &amp;&amp; (match[1] || !context) ) {

    // HANDLE: $(html) -&gt; $(array)
    if ( match[1] )
     selector = jQuery.clean( [ match[1] ], context );

    // HANDLE: $("#id")
    else {
     var elem = document.getElementById( match[3] );

     // Handle the case where IE and Opera return items
     // by name instead of ID
     if ( elem &amp;&amp; elem.id != match[3] )
      return jQuery().find( selector );

     // Otherwise, we inject the element directly into the jQuery object
     var ret = jQuery( elem || [] );
     ret.context = document;
     ret.selector = selector;
     return ret;
    }

   // HANDLE: $(expr, [context])
   // (which is just equivalent to: $(content).find(expr)
   } else
    return jQuery( context ).find( selector );

  // HANDLE: $(function)
  // Shortcut for document ready
  } else if ( jQuery.isFunction( selector ) )
   return jQuery( document ).ready( selector );

  // Make sure that old selector state is passed along
  if ( selector.selector &amp;&amp; selector.context ) {
   this.selector = selector.selector;
   this.context = selector.context;
  }

  return this.setArray(jQuery.isArray( selector ) ?
   selector :
   jQuery.makeArray(selector));
 },

 // Start with an empty selector
 selector: "",

 // The current version of jQuery being used
 jquery: "1.3.2",

 // The number of elements contained in the matched element set
 size: function() {
  return this.length;
 },

 // Get the Nth element in the matched element set OR
 // Get the whole matched element set as a clean array
 get: function( num ) {
  return num === undefined ?

   // Return a 'clean' array
   Array.prototype.slice.call( this ) :

   // Return just the object
   this[ num ];
 },

 // Take an array of elements and push it onto the stack
 // (returning the new matched element set)
 pushStack: function( elems, name, selector ) {
  // Build a new jQuery matched element set
  var ret = jQuery( elems );

  // Add the old object onto the stack (as a reference)
  ret.prevObject = this;

  ret.context = this.context;

  if ( name === "find" )
   ret.selector = this.selector + (this.selector ? " " : "") + selector;
  else if ( name )
   ret.selector = this.selector + "." + name + "(" + selector + ")";

  // Return the newly-formed element set
  return ret;
 },

 // Force the current matched set of elements to become
 // the specified array of elements (destroying the stack in the process)
 // You should use pushStack() in order to do this, but maintain the stack
 setArray: function( elems ) {
  // Resetting the length to 0, then using the native Array push
  // is a super-fast way to populate an object with array-like properties
  this.length = 0;
  Array.prototype.push.apply( this, elems );

  return this;
 },

 // Execute a callback for every element in the matched set.
 // (You can seed the arguments with an array of args, but this is
 // only used internally.)
 each: function( callback, args ) {
  return jQuery.each( this, callback, args );
 },

 // Determine the position of an element within
 // the matched set of elements
 index: function( elem ) {
  // Locate the position of the desired element
  return jQuery.inArray(
   // If it receives a jQuery object, the first element is used
   elem &amp;&amp; elem.jquery ? elem[0] : elem
  , this );
 },

 attr: function( name, value, type ) {
  var options = name;

  // Look for the case where we're accessing a style value
  if ( typeof name === "string" )
   if ( value === undefined )
    return this[0] &amp;&amp; jQuery[ type || "attr" ]( this[0], name );

   else {
    options = {};
    options[ name ] = value;
   }

  // Check to see if we're setting style values
  return this.each(function(i){
   // Set all the styles
   for ( name in options )
    jQuery.attr(
     type ?
      this.style :
      this,
     name, jQuery.prop( this, options[ name ], type, i, name )
    );
  });
 },

 css: function( key, value ) {
  // ignore negative width and height values
  if ( (key == 'width' || key == 'height') &amp;&amp; parseFloat(value) &lt; 0 )
   value = undefined;
  return this.attr( key, value, "curCSS" );
 },

 text: function( text ) {
  if ( typeof text !== "object" &amp;&amp; text != null )
   return this.empty().append( (this[0] &amp;&amp; this[0].ownerDocument || document).createTextNode( text ) );

  var ret = "";

  jQuery.each( text || this, function(){
   jQuery.each( this.childNodes, function(){
    if ( this.nodeType != 8 )
     ret += this.nodeType != 1 ?
      this.nodeValue :
      jQuery.fn.text( [ this ] );
   });
  });

  return ret;
 },

 wrapAll: function( html ) {
  if ( this[0] ) {
   // The elements to wrap the target around
   var wrap = jQuery( html, this[0].ownerDocument ).clone();

   if ( this[0].parentNode )
    wrap.insertBefore( this[0] );

   wrap.map(function(){
    var elem = this;

    while ( elem.firstChild )
     elem = elem.firstChild;

    return elem;
   }).append(this);
  }

  return this;
 },

 wrapInner: function( html ) {
  return this.each(function(){
   jQuery( this ).contents().wrapAll( html );
  });
 },

 wrap: function( html ) {
  return this.each(function(){
   jQuery( this ).wrapAll( html );
  });
 },

 append: function() {
  return this.domManip(arguments, true, function(elem){
   if (this.nodeType == 1)
    this.appendChild( elem );
  });
 },

 prepend: function() {
  return this.domManip(arguments, true, function(elem){
   if (this.nodeType == 1)
    this.insertBefore( elem, this.firstChild );
  });
 },

 before: function() {
  return this.domManip(arguments, false, function(elem){
   this.parentNode.insertBefore( elem, this );
  });
 },

 after: function() {
  return this.domManip(arguments, false, function(elem){
   this.parentNode.insertBefore( elem, this.nextSibling );
  });
 },

 end: function() {
  return this.prevObject || jQuery( [] );
 },

 // For internal use only.
 // Behaves like an Array's method, not like a jQuery method.
 push: [].push,
 sort: [].sort,
 splice: [].splice,

 find: function( selector ) {
  if ( this.length === 1 ) {
   var ret = this.pushStack( [], "find", selector );
   ret.length = 0;
   jQuery.find( selector, this[0], ret );
   return ret;
  } else {
   return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){
    return jQuery.find( selector, elem );
   })), "find", selector );
  }
 },

 clone: function( events ) {
  // Do the clone
  var ret = this.map(function(){
   if ( !jQuery.support.noCloneEvent &amp;&amp; !jQuery.isXMLDoc(this) ) {
    // IE copies events bound via attachEvent when
    // using cloneNode. Calling detachEvent on the
    // clone will also remove the events from the orignal
    // In order to get around this, we use innerHTML.
    // Unfortunately, this means some modifications to
    // attributes in IE that are actually only stored
    // as properties will not be copied (such as the
    // the name attribute on an input).
    var html = this.outerHTML;
    if ( !html ) {
     var div = this.ownerDocument.createElement("div");
     div.appendChild( this.cloneNode(true) );
     html = div.innerHTML;
    }

    return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0];
   } else
    return this.cloneNode(true);
  });

  // Copy the events from the original to the clone
  if ( events === true ) {
   var orig = this.find("*").andSelf(), i = 0;

   ret.find("*").andSelf().each(function(){
    if ( this.nodeName !== orig[i].nodeName )
     return;

    var events = jQuery.data( orig[i], "events" );

    for ( var type in events ) {
     for ( var handler in events[ type ] ) {
      jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
     }
    }

    i++;
   });
  }

  // Return the cloned set
  return ret;
 },

 filter: function( selector ) {
  return this.pushStack(
   jQuery.isFunction( selector ) &amp;&amp;
   jQuery.grep(this, function(elem, i){
    return selector.call( elem, i );
   }) ||

   jQuery.multiFilter( selector, jQuery.grep(this, function(elem){
    return elem.nodeType === 1;
   }) ), "filter", selector );
 },

 closest: function( selector ) {
  var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null,
   closer = 0;

  return this.map(function(){
   var cur = this;
   while ( cur &amp;&amp; cur.ownerDocument ) {
    if ( pos ? pos.index(cur) &gt; -1 : jQuery(cur).is(selector) ) {
     jQuery.data(cur, "closest", closer);
     return cur;
    }
    cur = cur.parentNode;
    closer++;
   }
  });
 },

 not: function( selector ) {
  if ( typeof selector === "string" )
   // test special case where just one selector is passed in
   if ( isSimple.test( selector ) )
    return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector );
   else
    selector = jQuery.multiFilter( selector, this );

  var isArrayLike = selector.length &amp;&amp; selector[selector.length - 1] !== undefined &amp;&amp; !selector.nodeType;
  return this.filter(function() {
   return isArrayLike ? jQuery.inArray( this, selector ) &lt; 0 : this != selector;
  });
 },

 add: function( selector ) {
  return this.pushStack( jQuery.unique( jQuery.merge(
   this.get(),
   typeof selector === "string" ?
    jQuery( selector ) :
    jQuery.makeArray( selector )
  )));
 },

 is: function( selector ) {
  return !!selector &amp;&amp; jQuery.multiFilter( selector, this ).length &gt; 0;
 },

 hasClass: function( selector ) {
  return !!selector &amp;&amp; this.is( "." + selector );
 },

 val: function( value ) {
  if ( value === undefined ) {   
   var elem = this[0];

   if ( elem ) {
    if( jQuery.nodeName( elem, 'option' ) )
     return (elem.attributes.value || {}).specified ? elem.value : elem.text;
    
    // We need to handle select boxes special
    if ( jQuery.nodeName( elem, "select" ) ) {
     var index = elem.selectedIndex,
      values = [],
      options = elem.options,
      one = elem.type == "select-one";

     // Nothing was selected
     if ( index &lt; 0 )
      return null;

     // Loop through all the selected options
     for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i &lt; max; i++ ) {
      var option = options[ i ];

      if ( option.selected ) {
       // Get the specifc value for the option
       value = jQuery(option).val();

       // We don't need an array for one selects
       if ( one )
        return value;

       // Multi-Selects return an array
       values.push( value );
      }
     }

     return values;    
    }

    // Everything else, we just grab the value
    return (elem.value || "").replace(/\r/g, "");

   }

   return undefined;
  }

  if ( typeof value === "number" )
   value += '';

  return this.each(function(){
   if ( this.nodeType != 1 )
    return;

   if ( jQuery.isArray(value) &amp;&amp; /radio|checkbox/.test( this.type ) )
    this.checked = (jQuery.inArray(this.value, value) &gt;= 0 ||
     jQuery.inArray(this.name, value) &gt;= 0);

   else if ( jQuery.nodeName( this, "select" ) ) {
    var values = jQuery.makeArray(value);

    jQuery( "option", this ).each(function(){
     this.selected = (jQuery.inArray( this.value, values ) &gt;= 0 ||
      jQuery.inArray( this.text, values ) &gt;= 0);
    });

    if ( !values.length )
     this.selectedIndex = -1;

   } else
    this.value = value;
  });
 },

 html: function( value ) {
  return value === undefined ?
   (this[0] ?
    this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") :
    null) :
   this.empty().append( value );
 },

 replaceWith: function( value ) {
  return this.after( value ).remove();
 },

 eq: function( i ) {
  return this.slice( i, +i + 1 );
 },

 slice: function() {
  return this.pushStack( Array.prototype.slice.apply( this, arguments ),
   "slice", Array.prototype.slice.call(arguments).join(",") );
 },

 map: function( callback ) {
  return this.pushStack( jQuery.map(this, function(elem, i){
   return callback.call( elem, i, elem );
  }));
 },

 andSelf: function() {
  return this.add( this.prevObject );
 },

 domManip: function( args, table, callback ) {
  if ( this[0] ) {
   var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),
    scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),
    first = fragment.firstChild;

   if ( first )
    for ( var i = 0, l = this.length; i &lt; l; i++ )
     callback.call( root(this[i], first), this.length &gt; 1 || i &gt; 0 ?
       fragment.cloneNode(true) : fragment );
  
   if ( scripts )
    jQuery.each( scripts, evalScript );
  }

  return this;
  
  function root( elem, cur ) {
   return table &amp;&amp; jQuery.nodeName(elem, "table") &amp;&amp; jQuery.nodeName(cur, "tr") ?
    (elem.getElementsByTagName("tbody")[0] ||
    elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
    elem;
  }
 }
};

// Give the init function the jQuery prototype for later instantiation
jQuery.fn.init.prototype = jQuery.fn;

function evalScript( i, elem ) {
 if ( elem.src )
  jQuery.ajax({
   url: elem.src,
   async: false,
   dataType: "script"
  });

 else
  jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );

 if ( elem.parentNode )
  elem.parentNode.removeChild( elem );
}

function now(){
 return +new Date;
}

jQuery.extend = jQuery.fn.extend = function() {
 // copy reference to target object
 var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;

 // Handle a deep copy situation
 if ( typeof target === "boolean" ) {
  deep = target;
  target = arguments[1] || {};
  // skip the boolean and the target
  i = 2;
 }

 // Handle case when target is a string or something (possible in deep copy)
 if ( typeof target !== "object" &amp;&amp; !jQuery.isFunction(target) )
  target = {};

 // extend jQuery itself if only one argument is passed
 if ( length == i ) {
  target = this;
  --i;
 }

 for ( ; i &lt; length; i++ )
  // Only deal with non-null/undefined values
  if ( (options = arguments[ i ]) != null )
   // Extend the base object
   for ( var name in options ) {
    var src = target[ name ], copy = options[ name ];

    // Prevent never-ending loop
    if ( target === copy )
     continue;

    // Recurse if we're merging object values
    if ( deep &amp;&amp; copy &amp;&amp; typeof copy === "object" &amp;&amp; !copy.nodeType )
     target[ name ] = jQuery.extend( deep, 
      // Never move original objects, clone them
      src || ( copy.length != null ? [ ] : { } )
     , copy );

    // Don't bring in undefined values
    else if ( copy !== undefined )
     target[ name ] = copy;

   }

 // Return the modified object
 return target;
};

// exclude the following css properties to add px
var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
 // cache defaultView
 defaultView = document.defaultView || {},
 toString = Object.prototype.toString;

jQuery.extend({
 noConflict: function( deep ) {
  window.$ = _$;

  if ( deep )
   window.jQuery = _jQuery;

  return jQuery;
 },

 // See test/unit/core.js for details concerning isFunction.
 // Since version 1.3, DOM methods and functions like alert
 // aren't supported. They return false on IE (#2968).
 isFunction: function( obj ) {
  return toString.call(obj) === "[object Function]";
 },

 isArray: function( obj ) {
  return toString.call(obj) === "[object Array]";
 },

 // check if an element is in a (or is an) XML document
 isXMLDoc: function( elem ) {
  return elem.nodeType === 9 &amp;&amp; elem.documentElement.nodeName !== "HTML" ||
   !!elem.ownerDocument &amp;&amp; jQuery.isXMLDoc( elem.ownerDocument );
 },

 // Evalulates a script in a global context
 globalEval: function( data ) {
  if ( data &amp;&amp; /\S/.test(data) ) {
   // Inspired by code by Andrea Giammarchi
   // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
   var head = document.getElementsByTagName("head")[0] || document.documentElement,
    script = document.createElement("script");

   script.type = "text/javascript";
   if ( jQuery.support.scriptEval )
    script.appendChild( document.createTextNode( data ) );
   else
    script.text = data;

   // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
   // This arises when a base node is used (#2709).
   head.insertBefore( script, head.firstChild );
   head.removeChild( script );
  }
 },

 nodeName: function( elem, name ) {
  return elem.nodeName &amp;&amp; elem.nodeName.toUpperCase() == name.toUpperCase();
 },

 // args is for internal usage only
 each: function( object, callback, args ) {
  var name, i = 0, length = object.length;

  if ( args ) {
   if ( length === undefined ) {
    for ( name in object )
     if ( callback.apply( object[ name ], args ) === false )
      break;
   } else
    for ( ; i &lt; length; )
     if ( callback.apply( object[ i++ ], args ) === false )
      break;

  // A special, fast, case for the most common use of each
  } else {
   if ( length === undefined ) {
    for ( name in object )
     if ( callback.call( object[ name ], name, object[ name ] ) === false )
      break;
   } else
    for ( var value = object[0];
     i &lt; length &amp;&amp; callback.call( value, i, value ) !== false; value = object[++i] ){}
  }

  return object;
 },

 prop: function( elem, value, type, i, name ) {
  // Handle executable functions
  if ( jQuery.isFunction( value ) )
   value = value.call( elem, i );

  // Handle passing in a number to a CSS property
  return typeof value === "number" &amp;&amp; type == "curCSS" &amp;&amp; !exclude.test( name ) ?
   value + "px" :
   value;
 },

 className: {
  // internal only, use addClass("class")
  add: function( elem, classNames ) {
   jQuery.each((classNames || "").split(/\s+/), function(i, className){
    if ( elem.nodeType == 1 &amp;&amp; !jQuery.className.has( elem.className, className ) )
     elem.className += (elem.className ? " " : "") + className;
   });
  },

  // internal only, use removeClass("class")
  remove: function( elem, classNames ) {
   if (elem.nodeType == 1)
    elem.className = classNames !== undefined ?
     jQuery.grep(elem.className.split(/\s+/), function(className){
      return !jQuery.className.has( classNames, className );
     }).join(" ") :
     "";
  },

  // internal only, use hasClass("class")
  has: function( elem, className ) {
   return elem &amp;&amp; jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) &gt; -1;
  }
 },

 // A method for quickly swapping in/out CSS properties to get correct calculations
 swap: function( elem, options, callback ) {
  var old = {};
  // Remember the old values, and insert the new ones
  for ( var name in options ) {
   old[ name ] = elem.style[ name ];
   elem.style[ name ] = options[ name ];
  }

  callback.call( elem );

  // Revert the old values
  for ( var name in options )
   elem.style[ name ] = old[ name ];
 },

 css: function( elem, name, force, extra ) {
  if ( name == "width" || name == "height" ) {
   var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];

   function getWH() {
    val = name == "width" ? elem.offsetWidth : elem.offsetHeight;

    if ( extra === "border" )
     return;

    jQuery.each( which, function() {
     if ( !extra )
      val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
     if ( extra === "margin" )
      val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
     else
      val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
    });
   }

   if ( elem.offsetWidth !== 0 )
    getWH();
   else
    jQuery.swap( elem, props, getWH );

   return Math.max(0, Math.round(val));
  }

  return jQuery.curCSS( elem, name, force );
 },

 curCSS: function( elem, name, force ) {
  var ret, style = elem.style;

  // We need to handle opacity special in IE
  if ( name == "opacity" &amp;&amp; !jQuery.support.opacity ) {
   ret = jQuery.attr( style, "opacity" );

   return ret == "" ?
    "1" :
    ret;
  }

  // Make sure we're using the right name for getting the float value
  if ( name.match( /float/i ) )
   name = styleFloat;

  if ( !force &amp;&amp; style &amp;&amp; style[ name ] )
   ret = style[ name ];

  else if ( defaultView.getComputedStyle ) {

   // Only "float" is needed here
   if ( name.match( /float/i ) )
    name = "float";

   name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();

   var computedStyle = defaultView.getComputedStyle( elem, null );

   if ( computedStyle )
    ret = computedStyle.getPropertyValue( name );

   // We should always get a number back from opacity
   if ( name == "opacity" &amp;&amp; ret == "" )
    ret = "1";

  } else if ( elem.currentStyle ) {
   var camelCase = name.replace(/\-(\w)/g, function(all, letter){
    return letter.toUpperCase();
   });

   ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];

   // From the awesome hack by Dean Edwards
   // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291

   // If we're not dealing with a regular pixel number
   // but a number that has a weird ending, we need to convert it to pixels
   if ( !/^\d+(px)?$/i.test( ret ) &amp;&amp; /^\d/.test( ret ) ) {
    // Remember the original values
    var left = style.left, rsLeft = elem.runtimeStyle.left;

    // Put in the new values to get a computed value out
    elem.runtimeStyle.left = elem.currentStyle.left;
    style.left = ret || 0;
    ret = style.pixelLeft + "px";

    // Revert the changed values
    style.left = left;
    elem.runtimeStyle.left = rsLeft;
   }
  }

  return ret;
 },

 clean: function( elems, context, fragment ) {
  context = context || document;

  // !context.createElement fails in IE with an error but returns typeof 'object'
  if ( typeof context.createElement === "undefined" )
   context = context.ownerDocument || context[0] &amp;&amp; context[0].ownerDocument || document;

  // If a single string is passed in and it's a single tag
  // just do a createElement and skip the rest
  if ( !fragment &amp;&amp; elems.length === 1 &amp;&amp; typeof elems[0] === "string" ) {
   var match = /^&lt;(\w+)\s*\/?&gt;$/.exec(elems[0]);
   if ( match )
    return [ context.createElement( match[1] ) ];
  }

  var ret = [], scripts = [], div = context.createElement("div");

  jQuery.each(elems, function(i, elem){
   if ( typeof elem === "number" )
    elem += '';

   if ( !elem )
    return;

   // Convert html string into DOM nodes
   if ( typeof elem === "string" ) {
    // Fix "XHTML"-style tags in all browsers
    elem = elem.replace(/(&lt;(\w+)[^&gt;]*?)\/&gt;/g, function(all, front, tag){
     return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
      all :
      front + "&gt;&lt;/" + tag + "&gt;";
    });

    // Trim whitespace, otherwise indexOf won't work as expected
    var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase();

    var wrap =
     // option or optgroup
     !tags.indexOf("&lt;opt") &amp;&amp;
     [ 1, "&lt;select multiple='multiple'&gt;", "&lt;/select&gt;" ] ||

     !tags.indexOf("&lt;leg") &amp;&amp;
     [ 1, "&lt;fieldset&gt;", "&lt;/fieldset&gt;" ] ||

     tags.match(/^&lt;(thead|tbody|tfoot|colg|cap)/) &amp;&amp;
     [ 1, "&lt;table&gt;", "&lt;/table&gt;" ] ||

     !tags.indexOf("&lt;tr") &amp;&amp;
     [ 2, "&lt;table&gt;&lt;tbody&gt;", "&lt;/tbody&gt;&lt;/table&gt;" ] ||

      // &lt;thead&gt; matched above
     (!tags.indexOf("&lt;td") || !tags.indexOf("&lt;th")) &amp;&amp;
     [ 3, "&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;", "&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;" ] ||

     !tags.indexOf("&lt;col") &amp;&amp;
     [ 2, "&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;colgroup&gt;", "&lt;/colgroup&gt;&lt;/table&gt;" ] ||

     // IE can't serialize &lt;link&gt; and &lt;script&gt; tags normally
     !jQuery.support.htmlSerialize &amp;&amp;
     [ 1, "div&lt;div&gt;", "&lt;/div&gt;" ] ||

     [ 0, "", "" ];

    // Go to html and back, then peel off extra wrappers
    div.innerHTML = wrap[1] + elem + wrap[2];

    // Move to the right depth
    while ( wrap[0]-- )
     div = div.lastChild;

    // Remove IE's autoinserted &lt;tbody&gt; from table fragments
    if ( !jQuery.support.tbody ) {

     // String was a &lt;table&gt;, *may* have spurious &lt;tbody&gt;
     var hasBody = /&lt;tbody/i.test(elem),
      tbody = !tags.indexOf("&lt;table") &amp;&amp; !hasBody ?
       div.firstChild &amp;&amp; div.firstChild.childNodes :

      // String was a bare &lt;thead&gt; or &lt;tfoot&gt;
      wrap[1] == "&lt;table&gt;" &amp;&amp; !hasBody ?
       div.childNodes :
       [];

     for ( var j = tbody.length - 1; j &gt;= 0 ; --j )
      if ( jQuery.nodeName( tbody[ j ], "tbody" ) &amp;&amp; !tbody[ j ].childNodes.length )
       tbody[ j ].parentNode.removeChild( tbody[ j ] );

     }

    // IE completely kills leading whitespace when innerHTML is used
    if ( !jQuery.support.leadingWhitespace &amp;&amp; /^\s/.test( elem ) )
     div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
    
    elem = jQuery.makeArray( div.childNodes );
   }

   if ( elem.nodeType )
    ret.push( elem );
   else
    ret = jQuery.merge( ret, elem );

  });

  if ( fragment ) {
   for ( var i = 0; ret[i]; i++ ) {
    if ( jQuery.nodeName( ret[i], "script" ) &amp;&amp; (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
     scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
    } else {
     if ( ret[i].nodeType === 1 )
      ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
     fragment.appendChild( ret[i] );
    }
   }
   
   return scripts;
  }

  return ret;
 },

 attr: function( elem, name, value ) {
  // don't set attributes on text and comment nodes
  if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
   return undefined;

  var notxml = !jQuery.isXMLDoc( elem ),
   // Whether we are setting (or getting)
   set = value !== undefined;

  // Try to normalize/fix the name
  name = notxml &amp;&amp; jQuery.props[ name ] || name;

  // Only do all the following if this is a node (faster for style)
  // IE elem.getAttribute passes even for style
  if ( elem.tagName ) {

   // These attributes require special treatment
   var special = /href|src|style/.test( name );

   // Safari mis-reports the default selected property of a hidden option
   // Accessing the parent's selectedIndex property fixes it
   if ( name == "selected" &amp;&amp; elem.parentNode )
    elem.parentNode.selectedIndex;

   // If applicable, access the attribute via the DOM 0 way
   if ( name in elem &amp;&amp; notxml &amp;&amp; !special ) {
    if ( set ){
     // We can't allow the type property to be changed (since it causes problems in IE)
     if ( name == "type" &amp;&amp; jQuery.nodeName( elem, "input" ) &amp;&amp; elem.parentNode )
      throw "type property can't be changed";

     elem[ name ] = value;
    }

    // browsers index elements by id/name on forms, give priority to attributes.
    if( jQuery.nodeName( elem, "form" ) &amp;&amp; elem.getAttributeNode(name) )
     return elem.getAttributeNode( name ).nodeValue;

    // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
    // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
    if ( name == "tabIndex" ) {
     var attributeNode = elem.getAttributeNode( "tabIndex" );
     return attributeNode &amp;&amp; attributeNode.specified
      ? attributeNode.value
      : elem.nodeName.match(/(button|input|object|select|textarea)/i)
       ? 0
       : elem.nodeName.match(/^(a|area)$/i) &amp;&amp; elem.href
        ? 0
        : undefined;
    }

    return elem[ name ];
   }

   if ( !jQuery.support.style &amp;&amp; notxml &amp;&amp;  name == "style" )
    return jQuery.attr( elem.style, "cssText", value );

   if ( set )
    // convert the value to a string (all browsers do this but IE) see #1070
    elem.setAttribute( name, "" + value );

   var attr = !jQuery.support.hrefNormalized &amp;&amp; notxml &amp;&amp; special
     // Some attributes require a special call on IE
     ? elem.getAttribute( name, 2 )
     : elem.getAttribute( name );

   // Non-existent attributes return null, we normalize to undefined
   return attr === null ? undefined : attr;
  }

  // elem is actually elem.style ... set the style

  // IE uses filters for opacity
  if ( !jQuery.support.opacity &amp;&amp; name == "opacity" ) {
   if ( set ) {
    // IE has trouble with opacity if it does not have layout
    // Force it by setting the zoom level
    elem.zoom = 1;

    // Set the alpha filter to set the opacity
    elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
     (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
   }

   return elem.filter &amp;&amp; elem.filter.indexOf("opacity=") &gt;= 0 ?
    (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
    "";
  }

  name = name.replace(/-([a-z])/ig, function(all, letter){
   return letter.toUpperCase();
  });

  if ( set )
   elem[ name ] = value;

  return elem[ name ];
 },

 trim: function( text ) {
  return (text || "").replace( /^\s+|\s+$/g, "" );
 },

 makeArray: function( array ) {
  var ret = [];

  if( array != null ){
   var i = array.length;
   // The window, strings (and functions) also have 'length'
   if( i == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval )
    ret[0] = array;
   else
    while( i )
     ret[--i] = array[i];
  }

  return ret;
 },

 inArray: function( elem, array ) {
  for ( var i = 0, length = array.length; i &lt; length; i++ )
  // Use === because on IE, window == document
   if ( array[ i ] === elem )
    return i;

  return -1;
 },

 merge: function( first, second ) {
  // We have to loop this way because IE &amp; Opera overwrite the length
  // expando of getElementsByTagName
  var i = 0, elem, pos = first.length;
  // Also, we need to make sure that the correct elements are being returned
  // (IE returns comment nodes in a '*' query)
  if ( !jQuery.support.getAll ) {
   while ( (elem = second[ i++ ]) != null )
    if ( elem.nodeType != 8 )
     first[ pos++ ] = elem;

  } else
   while ( (elem = second[ i++ ]) != null )
    first[ pos++ ] = elem;

  return first;
 },

 unique: function( array ) {
  var ret = [], done = {};

  try {

   for ( var i = 0, length = array.length; i &lt; length; i++ ) {
    var id = jQuery.data( array[ i ] );

    if ( !done[ id ] ) {
     done[ id ] = true;
     ret.push( array[ i ] );
    }
   }

  } catch( e ) {
   ret = array;
  }

  return ret;
 },

 grep: function( elems, callback, inv ) {
  var ret = [];

  // Go through the array, only saving the items
  // that pass the validator function
  for ( var i = 0, length = elems.length; i &lt; length; i++ )
   if ( !inv != !callback( elems[ i ], i ) )
    ret.push( elems[ i ] );

  return ret;
 },

 map: function( elems, callback ) {
  var ret = [];

  // Go through the array, translating each of the items to their
  // new value (or values).
  for ( var i = 0, length = elems.length; i &lt; length; i++ ) {
   var value = callback( elems[ i ], i );

   if ( value != null )
    ret[ ret.length ] = value;
  }

  return ret.concat.apply( [], ret );
 }
});

// Use of jQuery.browser is deprecated.
// It's included for backwards compatibility and plugins,
// although they should work to migrate away.

var userAgent = navigator.userAgent.toLowerCase();

// Figure out what browser is being used
jQuery.browser = {
 version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
 safari: /webkit/.test( userAgent ),
 opera: /opera/.test( userAgent ),
 msie: /msie/.test( userAgent ) &amp;&amp; !/opera/.test( userAgent ),
 mozilla: /mozilla/.test( userAgent ) &amp;&amp; !/(compatible|webkit)/.test( userAgent )
};

jQuery.each({
 parent: function(elem){return elem.parentNode;},
 parents: function(elem){return jQuery.dir(elem,"parentNode");},
 next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
 prev: function(elem){return jQuery.nth(elem,2,"previousSibling");},
 nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
 prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
 siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
 children: function(elem){return jQuery.sibling(elem.firstChild);},
 contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
}, function(name, fn){
 jQuery.fn[ name ] = function( selector ) {
  var ret = jQuery.map( this, fn );

  if ( selector &amp;&amp; typeof selector == "string" )
   ret = jQuery.multiFilter( selector, ret );

  return this.pushStack( jQuery.unique( ret ), name, selector );
 };
});

jQuery.each({
 appendTo: "append",
 prependTo: "prepend",
 insertBefore: "before",
 insertAfter: "after",
 replaceAll: "replaceWith"
}, function(name, original){
 jQuery.fn[ name ] = function( selector ) {
  var ret = [], insert = jQuery( selector );

  for ( var i = 0, l = insert.length; i &lt; l; i++ ) {
   var elems = (i &gt; 0 ? this.clone(true) : this).get();
   jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
   ret = ret.concat( elems );
  }

  return this.pushStack( ret, name, selector );
 };
});

jQuery.each({
 removeAttr: function( name ) {
  jQuery.attr( this, name, "" );
  if (this.nodeType == 1)
   this.removeAttribute( name );
 },

 addClass: function( classNames ) {
  jQuery.className.add( this, classNames );
 },

 removeClass: function( classNames ) {
  jQuery.className.remove( this, classNames );
 },

 toggleClass: function( classNames, state ) {
  if( typeof state !== "boolean" )
   state = !jQuery.className.has( this, classNames );
  jQuery.className[ state ? "add" : "remove" ]( this, classNames );
 },

 remove: function( selector ) {
  if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
   // Prevent memory leaks
   jQuery( "*", this ).add([this]).each(function(){
    jQuery.event.remove(this);
    jQuery.removeData(this);
   });
   if (this.parentNode)
    this.parentNode.removeChild( this );
  }
 },

 empty: function() {
  // Remove element nodes and prevent memory leaks
  jQuery(this).children().remove();

  // Remove any remaining nodes
  while ( this.firstChild )
   this.removeChild( this.firstChild );
 }
}, function(name, fn){
 jQuery.fn[ name ] = function(){
  return this.each( fn, arguments );
 };
});

// Helper function used by the dimensions and offset modules
function num(elem, prop) {
 return elem[0] &amp;&amp; parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
}
var expando = "jQuery" + now(), uuid = 0, windowData = {};

jQuery.extend({
 cache: {},

 data: function( elem, name, data ) {
  elem = elem == window ?
   windowData :
   elem;

  var id = elem[ expando ];

  // Compute a unique ID for the element
  if ( !id )
   id = elem[ expando ] = ++uuid;

  // Only generate the data cache if we're
  // trying to access or manipulate it
  if ( name &amp;&amp; !jQuery.cache[ id ] )
   jQuery.cache[ id ] = {};

  // Prevent overriding the named cache with undefined values
  if ( data !== undefined )
   jQuery.cache[ id ][ name ] = data;

  // Return the named cache data, or the ID for the element
  return name ?
   jQuery.cache[ id ][ name ] :
   id;
 },

 removeData: function( elem, name ) {
  elem = elem == window ?
   windowData :
   elem;

  var id = elem[ expando ];

  // If we want to remove a specific section of the element's data
  if ( name ) {
   if ( jQuery.cache[ id ] ) {
    // Remove the section of cache data
    delete jQuery.cache[ id ][ name ];

    // If we've removed all the data, remove the element's cache
    name = "";

    for ( name in jQuery.cache[ id ] )
     break;

    if ( !name )
     jQuery.removeData( elem );
   }

  // Otherwise, we want to remove all of the element's data
  } else {
   // Clean up the element expando
   try {
    delete elem[ expando ];
   } catch(e){
    // IE has trouble directly removing the expando
    // but it's ok with using removeAttribute
    if ( elem.removeAttribute )
     elem.removeAttribute( expando );
   }

   // Completely remove the data cache
   delete jQuery.cache[ id ];
  }
 },
 queue: function( elem, type, data ) {
  if ( elem ){
 
   type = (type || "fx") + "queue";
 
   var q = jQuery.data( elem, type );
 
   if ( !q || jQuery.isArray(data) )
    q = jQuery.data( elem, type, jQuery.makeArray(data) );
   else if( data )
    q.push( data );
 
  }
  return q;
 },

 dequeue: function( elem, type ){
  var queue = jQuery.queue( elem, type ),
   fn = queue.shift();
  
  if( !type || type === "fx" )
   fn = queue[0];
   
  if( fn !== undefined )
   fn.call(elem);
 }
});

jQuery.fn.extend({
 data: function( key, value ){
  var parts = key.split(".");
  parts[1] = parts[1] ? "." + parts[1] : "";

  if ( value === undefined ) {
   var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);

   if ( data === undefined &amp;&amp; this.length )
    data = jQuery.data( this[0], key );

   return data === undefined &amp;&amp; parts[1] ?
    this.data( parts[0] ) :
    data;
  } else
   return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
    jQuery.data( this, key, value );
   });
 },

 removeData: function( key ){
  return this.each(function(){
   jQuery.removeData( this, key );
  });
 },
 queue: function(type, data){
  if ( typeof type !== "string" ) {
   data = type;
   type = "fx";
  }

  if ( data === undefined )
   return jQuery.queue( this[0], type );

  return this.each(function(){
   var queue = jQuery.queue( this, type, data );
   
    if( type == "fx" &amp;&amp; queue.length == 1 )
    queue[0].call(this);
  });
 },
 dequeue: function(type){
  return this.each(function(){
   jQuery.dequeue( this, type );
  });
 }
});/*!
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){

var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ &gt;+~,(\[\\]+)+|[&gt;+~])(\s*,\s*)?/g,
 done = 0,
 toString = Object.prototype.toString;

var Sizzle = function(selector, context, results, seed) {
 results = results || [];
 context = context || document;

 if ( context.nodeType !== 1 &amp;&amp; context.nodeType !== 9 )
  return [];
 
 if ( !selector || typeof selector !== "string" ) {
  return results;
 }

 var parts = [], m, set, checkSet, check, mode, extra, prune = true;
 
 // Reset the position of the chunker regexp (start from head)
 chunker.lastIndex = 0;
 
 while ( (m = chunker.exec(selector)) !== null ) {
  parts.push( m[1] );
  
  if ( m[2] ) {
   extra = RegExp.rightContext;
   break;
  }
 }

 if ( parts.length &gt; 1 &amp;&amp; origPOS.exec( selector ) ) {
  if ( parts.length === 2 &amp;&amp; Expr.relative[ parts[0] ] ) {
   set = posProcess( parts[0] + parts[1], context );
  } else {
   set = Expr.relative[ parts[0] ] ?
    [ context ] :
    Sizzle( parts.shift(), context );

   while ( parts.length ) {
    selector = parts.shift();

    if ( Expr.relative[ selector ] )
     selector += parts.shift();

    set = posProcess( selector, set );
   }
  }
 } else {
  var ret = seed ?
   { expr: parts.pop(), set: makeArray(seed) } :
   Sizzle.find( parts.pop(), parts.length === 1 &amp;&amp; context.parentNode ? context.parentNode : context, isXML(context) );
  set = Sizzle.filter( ret.expr, ret.set );

  if ( parts.length &gt; 0 ) {
   checkSet = makeArray(set);
  } else {
   prune = false;
  }

  while ( parts.length ) {
   var cur = parts.pop(), pop = cur;

   if ( !Expr.relative[ cur ] ) {
    cur = "";
   } else {
    pop = parts.pop();
   }

   if ( pop == null ) {
    pop = context;
   }

   Expr.relative[ cur ]( checkSet, pop, isXML(context) );
  }
 }

 if ( !checkSet ) {
  checkSet = set;
 }

 if ( !checkSet ) {
  throw "Syntax error, unrecognized expression: " + (cur || selector);
 }

 if ( toString.call(checkSet) === "[object Array]" ) {
  if ( !prune ) {
   results.push.apply( results, checkSet );
  } else if ( context.nodeType === 1 ) {
   for ( var i = 0; checkSet[i] != null; i++ ) {
    if ( checkSet[i] &amp;&amp; (checkSet[i] === true || checkSet[i].nodeType === 1 &amp;&amp; contains(context, checkSet[i])) ) {
     results.push( set[i] );
    }
   }
  } else {
   for ( var i = 0; checkSet[i] != null; i++ ) {
    if ( checkSet[i] &amp;&amp; checkSet[i].nodeType === 1 ) {
     results.push( set[i] );
    }
   }
  }
 } else {
  makeArray( checkSet, results );
 }

 if ( extra ) {
  Sizzle( extra, context, results, seed );

  if ( sortOrder ) {
   hasDuplicate = false;
   results.sort(sortOrder);

   if ( hasDuplicate ) {
    for ( var i = 1; i &lt; results.length; i++ ) {
     if ( results[i] === results[i-1] ) {
      results.splice(i--, 1);
     }
    }
   }
  }
 }

 return results;
};

Sizzle.matches = function(expr, set){
 return Sizzle(expr, null, null, set);
};

Sizzle.find = function(expr, context, isXML){
 var set, match;

 if ( !expr ) {
  return [];
 }

 for ( var i = 0, l = Expr.order.length; i &lt; l; i++ ) {
  var type = Expr.order[i], match;
  
  if ( (match = Expr.match[ type ].exec( expr )) ) {
   var left = RegExp.leftContext;

   if ( left.substr( left.length - 1 ) !== "\\" ) {
    match[1] = (match[1] || "").replace(/\\/g, "");
    set = Expr.find[ type ]( match, context, isXML );
    if ( set != null ) {
     expr = expr.replace( Expr.match[ type ], "" );
     break;
    }
   }
  }
 }

 if ( !set ) {
  set = context.getElementsByTagName("*");
 }

 return {set: set, expr: expr};
};

Sizzle.filter = function(expr, set, inplace, not){
 var old = expr, result = [], curLoop = set, match, anyFound,
  isXMLFilter = set &amp;&amp; set[0] &amp;&amp; isXML(set[0]);

 while ( expr &amp;&amp; set.length ) {
  for ( var type in Expr.filter ) {
   if ( (match = Expr.match[ type ].exec( expr )) != null ) {
    var filter = Expr.filter[ type ], found, item;
    anyFound = false;

    if ( curLoop == result ) {
     result = [];
    }

    if ( Expr.preFilter[ type ] ) {
     match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );

     if ( !match ) {
      anyFound = found = true;
     } else if ( match === true ) {
      continue;
     }
    }

    if ( match ) {
     for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
      if ( item ) {
       found = filter( item, match, i, curLoop );
       var pass = not ^ !!found;

       if ( inplace &amp;&amp; found != null ) {
        if ( pass ) {
         anyFound = true;
        } else {
         curLoop[i] = false;
        }
       } else if ( pass ) {
        result.push( item );
        anyFound = true;
       }
      }
     }
    }

    if ( found !== undefined ) {
     if ( !inplace ) {
      curLoop = result;
     }

     expr = expr.replace( Expr.match[ type ], "" );

     if ( !anyFound ) {
      return [];
     }

     break;
    }
   }
  }

  // Improper expression
  if ( expr == old ) {
   if ( anyFound == null ) {
    throw "Syntax error, unrecognized expression: " + expr;
   } else {
    break;
   }
  }

  old = expr;
 }

 return curLoop;
};

var Expr = Sizzle.selectors = {
 order: [ "ID", "NAME", "TAG" ],
 match: {
  ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
  CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
  NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,
  ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
  TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,
  CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
  POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
  PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
 },
 attrMap: {
  "class": "className",
  "for": "htmlFor"
 },
 attrHandle: {
  href: function(elem){
   return elem.getAttribute("href");
  }
 },
 relative: {
  "+": function(checkSet, part, isXML){
   var isPartStr = typeof part === "string",
    isTag = isPartStr &amp;&amp; !/\W/.test(part),
    isPartStrNotTag = isPartStr &amp;&amp; !isTag;

   if ( isTag &amp;&amp; !isXML ) {
    part = part.toUpperCase();
   }

   for ( var i = 0, l = checkSet.length, elem; i &lt; l; i++ ) {
    if ( (elem = checkSet[i]) ) {
     while ( (elem = elem.previousSibling) &amp;&amp; elem.nodeType !== 1 ) {}

     checkSet[i] = isPartStrNotTag || elem &amp;&amp; elem.nodeName === part ?
      elem || false :
      elem === part;
    }
   }

   if ( isPartStrNotTag ) {
    Sizzle.filter( part, checkSet, true );
   }
  },
  "&gt;": function(checkSet, part, isXML){
   var isPartStr = typeof part === "string";

   if ( isPartStr &amp;&amp; !/\W/.test(part) ) {
    part = isXML ? part : part.toUpperCase();

    for ( var i = 0, l = checkSet.length; i &lt; l; i++ ) {
     var elem = checkSet[i];
     if ( elem ) {
      var parent = elem.parentNode;
      checkSet[i] = parent.nodeName === part ? parent : false;
     }
    }
   } else {
    for ( var i = 0, l = checkSet.length; i &lt; l; i++ ) {
     var elem = checkSet[i];
     if ( elem ) {
      checkSet[i] = isPartStr ?
       elem.parentNode :
       elem.parentNode === part;
     }
    }

    if ( isPartStr ) {
     Sizzle.filter( part, checkSet, true );
    }
   }
  },
  "": function(checkSet, part, isXML){
   var doneName = done++, checkFn = dirCheck;

   if ( !part.match(/\W/) ) {
    var nodeCheck = part = isXML ? part : part.toUpperCase();
    checkFn = dirNodeCheck;
   }

   checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
  },
  "~": function(checkSet, part, isXML){
   var doneName = done++, checkFn = dirCheck;

   if ( typeof part === "string" &amp;&amp; !part.match(/\W/) ) {
    var nodeCheck = part = isXML ? part : part.toUpperCase();
    checkFn = dirNodeCheck;
   }

   checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
  }
 },
 find: {
  ID: function(match, context, isXML){
   if ( typeof context.getElementById !== "undefined" &amp;&amp; !isXML ) {
    var m = context.getElementById(match[1]);
    return m ? [m] : [];
   }
  },
  NAME: function(match, context, isXML){
   if ( typeof context.getElementsByName !== "undefined" ) {
    var ret = [], results = context.getElementsByName(match[1]);

    for ( var i = 0, l = results.length; i &lt; l; i++ ) {
     if ( results[i].getAttribute("name") === match[1] ) {
      ret.push( results[i] );
     }
    }

    return ret.length === 0 ? null : ret;
   }
  },
  TAG: function(match, context){
   return context.getElementsByTagName(match[1]);
  }
 },
 preFilter: {
  CLASS: function(match, curLoop, inplace, result, not, isXML){
   match = " " + match[1].replace(/\\/g, "") + " ";

   if ( isXML ) {
    return match;
   }

   for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
    if ( elem ) {
     if ( not ^ (elem.className &amp;&amp; (" " + elem.className + " ").indexOf(match) &gt;= 0) ) {
      if ( !inplace )
       result.push( elem );
     } else if ( inplace ) {
      curLoop[i] = false;
     }
    }
   }

   return false;
  },
  ID: function(match){
   return match[1].replace(/\\/g, "");
  },
  TAG: function(match, curLoop){
   for ( var i = 0; curLoop[i] === false; i++ ){}
   return curLoop[i] &amp;&amp; isXML(curLoop[i]) ? match[1] : match[1].toUpperCase();
  },
  CHILD: function(match){
   if ( match[1] == "nth" ) {
    // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
    var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
     match[2] == "even" &amp;&amp; "2n" || match[2] == "odd" &amp;&amp; "2n+1" ||
     !/\D/.test( match[2] ) &amp;&amp; "0n+" + match[2] || match[2]);

    // calculate the numbers (first)n+(last) including if they are negative
    match[2] = (test[1] + (test[2] || 1)) - 0;
    match[3] = test[3] - 0;
   }

   // TODO: Move to normal caching system
   match[0] = done++;

   return match;
  },
  ATTR: function(match, curLoop, inplace, result, not, isXML){
   var name = match[1].replace(/\\/g, "");
   
   if ( !isXML &amp;&amp; Expr.attrMap[name] ) {
    match[1] = Expr.attrMap[name];
   }

   if ( match[2] === "~=" ) {
    match[4] = " " + match[4] + " ";
   }

   return match;
  },
  PSEUDO: function(match, curLoop, inplace, result, not){
   if ( match[1] === "not" ) {
    // If we're dealing with a complex expression, or a simple one
    if ( match[3].match(chunker).length &gt; 1 || /^\w/.test(match[3]) ) {
     match[3] = Sizzle(match[3], null, null, curLoop);
    } else {
     var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
     if ( !inplace ) {
      result.push.apply( result, ret );
     }
     return false;
    }
   } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
    return true;
   }
   
   return match;
  },
  POS: function(match){
   match.unshift( true );
   return match;
  }
 },
 filters: {
  enabled: function(elem){
   return elem.disabled === false &amp;&amp; elem.type !== "hidden";
  },
  disabled: function(elem){
   return elem.disabled === true;
  },
  checked: function(elem){
   return elem.checked === true;
  },
  selected: function(elem){
   // Accessing this property makes selected-by-default
   // options in Safari work properly
   elem.parentNode.selectedIndex;
   return elem.selected === true;
  },
  parent: function(elem){
   return !!elem.firstChild;
  },
  empty: function(elem){
   return !elem.firstChild;
  },
  has: function(elem, i, match){
   return !!Sizzle( match[3], elem ).length;
  },
  header: function(elem){
   return /h\d/i.test( elem.nodeName );
  },
  text: function(elem){
   return "text" === elem.type;
  },
  radio: function(elem){
   return "radio" === elem.type;
  },
  checkbox: function(elem){
   return "checkbox" === elem.type;
  },
  file: function(elem){
   return "file" === elem.type;
  },
  password: function(elem){
   return "password" === elem.type;
  },
  submit: function(elem){
   return "submit" === elem.type;
  },
  image: function(elem){
   return "image" === elem.type;
  },
  reset: function(elem){
   return "reset" === elem.type;
  },
  button: function(elem){
   return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON";
  },
  input: function(elem){
   return /input|select|textarea|button/i.test(elem.nodeName);
  }
 },
 setFilters: {
  first: function(elem, i){
   return i === 0;
  },
  last: function(elem, i, match, array){
   return i === array.length - 1;
  },
  even: function(elem, i){
   return i % 2 === 0;
  },
  odd: function(elem, i){
   return i % 2 === 1;
  },
  lt: function(elem, i, match){
   return i &lt; match[3] - 0;
  },
  gt: function(elem, i, match){
   return i &gt; match[3] - 0;
  },
  nth: function(elem, i, match){
   return match[3] - 0 == i;
  },
  eq: function(elem, i, match){
   return match[3] - 0 == i;
  }
 },
 filter: {
  PSEUDO: function(elem, match, i, array){
   var name = match[1], filter = Expr.filters[ name ];

   if ( filter ) {
    return filter( elem, i, match, array );
   } else if ( name === "contains" ) {
    return (elem.textContent || elem.innerText || "").indexOf(match[3]) &gt;= 0;
   } else if ( name === "not" ) {
    var not = match[3];

    for ( var i = 0, l = not.length; i &lt; l; i++ ) {
     if ( not[i] === elem ) {
      return false;
     }
    }

    return true;
   }
  },
  CHILD: function(elem, match){
   var type = match[1], node = elem;
   switch (type) {
    case 'only':
    case 'first':
     while (node = node.previousSibling)  {
      if ( node.nodeType === 1 ) return false;
     }
     if ( type == 'first') return true;
     node = elem;
    case 'last':
     while (node = node.nextSibling)  {
      if ( node.nodeType === 1 ) return false;
     }
     return true;
    case 'nth':
     var first = match[2], last = match[3];

     if ( first == 1 &amp;&amp; last == 0 ) {
      return true;
     }
     
     var doneName = match[0],
      parent = elem.parentNode;
 
     if ( parent &amp;&amp; (parent.sizcache !== doneName || !elem.nodeIndex) ) {
      var count = 0;
      for ( node = parent.firstChild; node; node = node.nextSibling ) {
       if ( node.nodeType === 1 ) {
        node.nodeIndex = ++count;
       }
      } 
      parent.sizcache = doneName;
     }
     
     var diff = elem.nodeIndex - last;
     if ( first == 0 ) {
      return diff == 0;
     } else {
      return ( diff % first == 0 &amp;&amp; diff / first &gt;= 0 );
     }
   }
  },
  ID: function(elem, match){
   return elem.nodeType === 1 &amp;&amp; elem.getAttribute("id") === match;
  },
  TAG: function(elem, match){
   return (match === "*" &amp;&amp; elem.nodeType === 1) || elem.nodeName === match;
  },
  CLASS: function(elem, match){
   return (" " + (elem.className || elem.getAttribute("class")) + " ")
    .indexOf( match ) &gt; -1;
  },
  ATTR: function(elem, match){
   var name = match[1],
    result = Expr.attrHandle[ name ] ?
     Expr.attrHandle[ name ]( elem ) :
     elem[ name ] != null ?
      elem[ name ] :
      elem.getAttribute( name ),
    value = result + "",
    type = match[2],
    check = match[4];

   return result == null ?
    type === "!=" :
    type === "=" ?
    value === check :
    type === "*=" ?
    value.indexOf(check) &gt;= 0 :
    type === "~=" ?
    (" " + value + " ").indexOf(check) &gt;= 0 :
    !check ?
    value &amp;&amp; result !== false :
    type === "!=" ?
    value != check :
    type === "^=" ?
    value.indexOf(check) === 0 :
    type === "$=" ?
    value.substr(value.length - check.length) === check :
    type === "|=" ?
    value === check || value.substr(0, check.length + 1) === check + "-" :
    false;
  },
  POS: function(elem, match, i, array){
   var name = match[2], filter = Expr.setFilters[ name ];

   if ( filter ) {
    return filter( elem, i, match, array );
   }
  }
 }
};

var origPOS = Expr.match.POS;

for ( var type in Expr.match ) {
 Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
}

var makeArray = function(array, results) {
 array = Array.prototype.slice.call( array );

 if ( results ) {
  results.push.apply( results, array );
  return results;
 }
 
 return array;
};

// Perform a simple check to determine if the browser is capable of
// converting a NodeList to an array using builtin methods.
try {
 Array.prototype.slice.call( document.documentElement.childNodes );

// Provide a fallback method if it does not work
} catch(e){
 makeArray = function(array, results) {
  var ret = results || [];

  if ( toString.call(array) === "[object Array]" ) {
   Array.prototype.push.apply( ret, array );
  } else {
   if ( typeof array.length === "number" ) {
    for ( var i = 0, l = array.length; i &lt; l; i++ ) {
     ret.push( array[i] );
    }
   } else {
    for ( var i = 0; array[i]; i++ ) {
     ret.push( array[i] );
    }
   }
  }

  return ret;
 };
}

var sortOrder;

if ( document.documentElement.compareDocumentPosition ) {
 sortOrder = function( a, b ) {
  var ret = a.compareDocumentPosition(b) &amp; 4 ? -1 : a === b ? 0 : 1;
  if ( ret === 0 ) {
   hasDuplicate = true;
  }
  return ret;
 };
} else if ( "sourceIndex" in document.documentElement ) {
 sortOrder = function( a, b ) {
  var ret = a.sourceIndex - b.sourceIndex;
  if ( ret === 0 ) {
   hasDuplicate = true;
  }
  return ret;
 };
} else if ( document.createRange ) {
 sortOrder = function( a, b ) {
  var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
  aRange.selectNode(a);
  aRange.collapse(true);
  bRange.selectNode(b);
  bRange.collapse(true);
  var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
  if ( ret === 0 ) {
   hasDuplicate = true;
  }
  return ret;
 };
}

// Check to see if the browser returns elements by name when
// querying by getElementById (and provide a workaround)
(function(){
 // We're going to inject a fake input element with a specified name
 var form = document.createElement("form"),
  id = "script" + (new Date).getTime();
 form.innerHTML = "&lt;input name='" + id + "'/&gt;";

 // Inject it into the root element, check its status, and remove it quickly
 var root = document.documentElement;
 root.insertBefore( form, root.firstChild );

 // The workaround has to do additional checks after a getElementById
 // Which slows things down for other browsers (hence the branching)
 if ( !!document.getElementById( id ) ) {
  Expr.find.ID = function(match, context, isXML){
   if ( typeof context.getElementById !== "undefined" &amp;&amp; !isXML ) {
    var m = context.getElementById(match[1]);
    return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" &amp;&amp; m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
   }
  };

  Expr.filter.ID = function(elem, match){
   var node = typeof elem.getAttributeNode !== "undefined" &amp;&amp; elem.getAttributeNode("id");
   return elem.nodeType === 1 &amp;&amp; node &amp;&amp; node.nodeValue === match;
  };
 }

 root.removeChild( form );
})();

(function(){
 // Check to see if the browser returns only elements
 // when doing getElementsByTagName("*")

 // Create a fake element
 var div = document.createElement("div");
 div.appendChild( document.createComment("") );

 // Make sure no comments are found
 if ( div.getElementsByTagName("*").length &gt; 0 ) {
  Expr.find.TAG = function(match, context){
   var results = context.getElementsByTagName(match[1]);

   // Filter out possible comments
   if ( match[1] === "*" ) {
    var tmp = [];

    for ( var i = 0; results[i]; i++ ) {
     if ( results[i].nodeType === 1 ) {
      tmp.push( results[i] );
     }
    }

    results = tmp;
   }

   return results;
  };
 }

 // Check to see if an attribute returns normalized href attributes
 div.innerHTML = "&lt;a href='#'&gt;&lt;/a&gt;";
 if ( div.firstChild &amp;&amp; typeof div.firstChild.getAttribute !== "undefined" &amp;&amp;
   div.firstChild.getAttribute("href") !== "#" ) {
  Expr.attrHandle.href = function(elem){
   return elem.getAttribute("href", 2);
  };
 }
})();

if ( document.querySelectorAll ) (function(){
 var oldSizzle = Sizzle, div = document.createElement("div");
 div.innerHTML = "&lt;p class='TEST'&gt;&lt;/p&gt;";

 // Safari can't handle uppercase or unicode characters when
 // in quirks mode.
 if ( div.querySelectorAll &amp;&amp; div.querySelectorAll(".TEST").length === 0 ) {
  return;
 }
 
 Sizzle = function(query, context, extra, seed){
  context = context || document;

  // Only use querySelectorAll on non-XML documents
  // (ID selectors don't work in non-HTML documents)
  if ( !seed &amp;&amp; context.nodeType === 9 &amp;&amp; !isXML(context) ) {
   try {
    return makeArray( context.querySelectorAll(query), extra );
   } catch(e){}
  }
  
  return oldSizzle(query, context, extra, seed);
 };

 Sizzle.find = oldSizzle.find;
 Sizzle.filter = oldSizzle.filter;
 Sizzle.selectors = oldSizzle.selectors;
 Sizzle.matches = oldSizzle.matches;
})();

if ( document.getElementsByClassName &amp;&amp; document.documentElement.getElementsByClassName ) (function(){
 var div = document.createElement("div");
 div.innerHTML = "&lt;div class='test e'&gt;&lt;/div&gt;&lt;div class='test'&gt;&lt;/div&gt;";

 // Opera can't find a second classname (in 9.6)
 if ( div.getElementsByClassName("e").length === 0 )
  return;

 // Safari caches class attributes, doesn't catch changes (in 3.2)
 div.lastChild.className = "e";

 if ( div.getElementsByClassName("e").length === 1 )
  return;

 Expr.order.splice(1, 0, "CLASS");
 Expr.find.CLASS = function(match, context, isXML) {
  if ( typeof context.getElementsByClassName !== "undefined" &amp;&amp; !isXML ) {
   return context.getElementsByClassName(match[1]);
  }
 };
})();

function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
 var sibDir = dir == "previousSibling" &amp;&amp; !isXML;
 for ( var i = 0, l = checkSet.length; i &lt; l; i++ ) {
  var elem = checkSet[i];
  if ( elem ) {
   if ( sibDir &amp;&amp; elem.nodeType === 1 ){
    elem.sizcache = doneName;
    elem.sizset = i;
   }
   elem = elem[dir];
   var match = false;

   while ( elem ) {
    if ( elem.sizcache === doneName ) {
     match = checkSet[elem.sizset];
     break;
    }

    if ( elem.nodeType === 1 &amp;&amp; !isXML ){
     elem.sizcache = doneName;
     elem.sizset = i;
    }

    if ( elem.nodeName === cur ) {
     match = elem;
     break;
    }

    elem = elem[dir];
   }

   checkSet[i] = match;
  }
 }
}

function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
 var sibDir = dir == "previousSibling" &amp;&amp; !isXML;
 for ( var i = 0, l = checkSet.length; i &lt; l; i++ ) {
  var elem = checkSet[i];
  if ( elem ) {
   if ( sibDir &amp;&amp; elem.nodeType === 1 ) {
    elem.sizcache = doneName;
    elem.sizset = i;
   }
   elem = elem[dir];
   var match = false;

   while ( elem ) {
    if ( elem.sizcache === doneName ) {
     match = checkSet[elem.sizset];
     break;
    }

    if ( elem.nodeType === 1 ) {
     if ( !isXML ) {
      elem.sizcache = doneName;
      elem.sizset = i;
     }
     if ( typeof cur !== "string" ) {
      if ( elem === cur ) {
       match = true;
       break;
      }

     } else if ( Sizzle.filter( cur, [elem] ).length &gt; 0 ) {
      match = elem;
      break;
     }
    }

    elem = elem[dir];
   }

   checkSet[i] = match;
  }
 }
}

var contains = document.compareDocumentPosition ?  function(a, b){
 return a.compareDocumentPosition(b) &amp; 16;
} : function(a, b){
 return a !== b &amp;&amp; (a.contains ? a.contains(b) : true);
};

var isXML = function(elem){
 return elem.nodeType === 9 &amp;&amp; elem.documentElement.nodeName !== "HTML" ||
  !!elem.ownerDocument &amp;&amp; isXML( elem.ownerDocument );
};

var posProcess = function(selector, context){
 var tmpSet = [], later = "", match,
  root = context.nodeType ? [context] : context;

 // Position selectors must be done after the filter
 // And so must :not(positional) so we move all PSEUDOs to the end
 while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
  later += match[0];
  selector = selector.replace( Expr.match.PSEUDO, "" );
 }

 selector = Expr.relative[selector] ? selector + "*" : selector;

 for ( var i = 0, l = root.length; i &lt; l; i++ ) {
  Sizzle( selector, root[i], tmpSet );
 }

 return Sizzle.filter( later, tmpSet );
};

// EXPOSE
jQuery.find = Sizzle;
jQuery.filter = Sizzle.filter;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.filters;

Sizzle.selectors.filters.hidden = function(elem){
 return elem.offsetWidth === 0 || elem.offsetHeight === 0;
};

Sizzle.selectors.filters.visible = function(elem){
 return elem.offsetWidth &gt; 0 || elem.offsetHeight &gt; 0;
};

Sizzle.selectors.filters.animated = function(elem){
 return jQuery.grep(jQuery.timers, function(fn){
  return elem === fn.elem;
 }).length;
};

jQuery.multiFilter = function( expr, elems, not ) {
 if ( not ) {
  expr = ":not(" + expr + ")";
 }

 return Sizzle.matches(expr, elems);
};

jQuery.dir = function( elem, dir ){
 var matched = [], cur = elem[dir];
 while ( cur &amp;&amp; cur != document ) {
  if ( cur.nodeType == 1 )
   matched.push( cur );
  cur = cur[dir];
 }
 return matched;
};

jQuery.nth = function(cur, result, dir, elem){
 result = result || 1;
 var num = 0;

 for ( ; cur; cur = cur[dir] )
  if ( cur.nodeType == 1 &amp;&amp; ++num == result )
   break;

 return cur;
};

jQuery.sibling = function(n, elem){
 var r = [];

 for ( ; n; n = n.nextSibling ) {
  if ( n.nodeType == 1 &amp;&amp; n != elem )
   r.push( n );
 }

 return r;
};

return;

window.Sizzle = Sizzle;

})();
/*
 * A number of helper functions used for managing events.
 * Many of the ideas behind this code originated from
 * Dean Edwards' addEvent library.
 */
jQuery.event = {

 // Bind an event to an element
 // Original by Dean Edwards
 add: function(elem, types, handler, data) {
  if ( elem.nodeType == 3 || elem.nodeType == 8 )
   return;

  // For whatever reason, IE has trouble passing the window object
  // around, causing it to be cloned in the process
  if ( elem.setInterval &amp;&amp; elem != window )
   elem = window;

  // Make sure that the function being executed has a unique ID
  if ( !handler.guid )
   handler.guid = this.guid++;

  // if data is passed, bind to handler
  if ( data !== undefined ) {
   // Create temporary function pointer to original handler
   var fn = handler;

   // Create unique handler function, wrapped around original handler
   handler = this.proxy( fn );

   // Store data in unique handler
   handler.data = data;
  }

  // Init the element's event structure
  var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
   handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
    // Handle the second event of a trigger and when
    // an event is called after a page has unloaded
    return typeof jQuery !== "undefined" &amp;&amp; !jQuery.event.triggered ?
     jQuery.event.handle.apply(arguments.callee.elem, arguments) :
     undefined;
   });
  // Add elem as a property of the handle function
  // This is to prevent a memory leak with non-native
  // event in IE.
  handle.elem = elem;

  // Handle multiple events separated by a space
  // jQuery(...).bind("mouseover mouseout", fn);
  jQuery.each(types.split(/\s+/), function(index, type) {
   // Namespaced event handlers
   var namespaces = type.split(".");
   type = namespaces.shift();
   handler.type = namespaces.slice().sort().join(".");

   // Get the current list of functions bound to this event
   var handlers = events[type];
   
   if ( jQuery.event.specialAll[type] )
    jQuery.event.specialAll[type].setup.call(elem, data, namespaces);

   // Init the event handler queue
   if (!handlers) {
    handlers = events[type] = {};

    // Check for a special event handler
    // Only use addEventListener/attachEvent if the special
    // events handler returns false
    if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false ) {
     // Bind the global event handler to the element
     if (elem.addEventListener)
      elem.addEventListener(type, handle, false);
     else if (elem.attachEvent)
      elem.attachEvent("on" + type, handle);
    }
   }

   // Add the function to the element's handler list
   handlers[handler.guid] = handler;

   // Keep track of which events have been used, for global triggering
   jQuery.event.global[type] = true;
  });

  // Nullify elem to prevent memory leaks in IE
  elem = null;
 },

 guid: 1,
 global: {},

 // Detach an event or set of events from an element
 remove: function(elem, types, handler) {
  // don't do events on text and comment nodes
  if ( elem.nodeType == 3 || elem.nodeType == 8 )
   return;

  var events = jQuery.data(elem, "events"), ret, index;

  if ( events ) {
   // Unbind all events for the element
   if ( types === undefined || (typeof types === "string" &amp;&amp; types.charAt(0) == ".") )
    for ( var type in events )
     this.remove( elem, type + (types || "") );
   else {
    // types is actually an event object here
    if ( types.type ) {
     handler = types.handler;
     types = types.type;
    }

    // Handle multiple events seperated by a space
    // jQuery(...).unbind("mouseover mouseout", fn);
    jQuery.each(types.split(/\s+/), function(index, type){
     // Namespaced event handlers
     var namespaces = type.split(".");
     type = namespaces.shift();
     var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");

     if ( events[type] ) {
      // remove the given handler for the given type
      if ( handler )
       delete events[type][handler.guid];

      // remove all handlers for the given type
      else
       for ( var handle in events[type] )
        // Handle the removal of namespaced events
        if ( namespace.test(events[type][handle].type) )
         delete events[type][handle];
         
      if ( jQuery.event.specialAll[type] )
       jQuery.event.specialAll[type].teardown.call(elem, namespaces);

      // remove generic event handler if no more handlers exist
      for ( ret in events[type] ) break;
      if ( !ret ) {
       if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) {
        if (elem.removeEventListener)
         elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
        else if (elem.detachEvent)
         elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
       }
       ret = null;
       delete events[type];
      }
     }
    });
   }

   // Remove the expando if it's no longer used
   for ( ret in events ) break;
   if ( !ret ) {
    var handle = jQuery.data( elem, "handle" );
    if ( handle ) handle.elem = null;
    jQuery.removeData( elem, "events" );
    jQuery.removeData( elem, "handle" );
   }
  }
 },

 // bubbling is internal
 trigger: function( event, data, elem, bubbling ) {
  // Event object or event type
  var type = event.type || event;

  if( !bubbling ){
   event = typeof event === "object" ?
    // jQuery.Event object
    event[expando] ? event :
    // Object literal
    jQuery.extend( jQuery.Event(type), event ) :
    // Just the event type (string)
    jQuery.Event(type);

   if ( type.indexOf("!") &gt;= 0 ) {
    event.type = type = type.slice(0, -1);
    event.exclusive = true;
   }

   // Handle a global trigger
   if ( !elem ) {
    // Don't bubble custom events when global (to avoid too much overhead)
    event.stopPropagation();
    // Only trigger if we've ever bound an event for it
    if ( this.global[type] )
     jQuery.each( jQuery.cache, function(){
      if ( this.events &amp;&amp; this.events[type] )
       jQuery.event.trigger( event, data, this.handle.elem );
     });
   }

   // Handle triggering a single element

   // don't do events on text and comment nodes
   if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
    return undefined;
   
   // Clean up in case it is reused
   event.result = undefined;
   event.target = elem;
   
   // Clone the incoming data, if any
   data = jQuery.makeArray(data);
   data.unshift( event );
  }

  event.currentTarget = elem;

  // Trigger the event, it is assumed that "handle" is a function
  var handle = jQuery.data(elem, "handle");
  if ( handle )
   handle.apply( elem, data );

  // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
  if ( (!elem[type] || (jQuery.nodeName(elem, 'a') &amp;&amp; type == "click")) &amp;&amp; elem["on"+type] &amp;&amp; elem["on"+type].apply( elem, data ) === false )
   event.result = false;

  // Trigger the native events (except for clicks on links)
  if ( !bubbling &amp;&amp; elem[type] &amp;&amp; !event.isDefaultPrevented() &amp;&amp; !(jQuery.nodeName(elem, 'a') &amp;&amp; type == "click") ) {
   this.triggered = true;
   try {
    elem[ type ]();
   // prevent IE from throwing an error for some hidden elements
   } catch (e) {}
  }

  this.triggered = false;

  if ( !event.isPropagationStopped() ) {
   var parent = elem.parentNode || elem.ownerDocument;
   if ( parent )
    jQuery.event.trigger(event, data, parent, true);
  }
 },

 handle: function(event) {
  // returned undefined or false
  var all, handlers;

  event = arguments[0] = jQuery.event.fix( event || window.event );
  event.currentTarget = this;
  
  // Namespaced event handlers
  var namespaces = event.type.split(".");
  event.type = namespaces.shift();

  // Cache this now, all = true means, any handler
  all = !namespaces.length &amp;&amp; !event.exclusive;
  
  var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");

  handlers = ( jQuery.data(this, "events") || {} )[event.type];

  for ( var j in handlers ) {
   var handler = handlers[j];

   // Filter the functions by class
   if ( all || namespace.test(handler.type) ) {
    // Pass in a reference to the handler function itself
    // So that we can later remove it
    event.handler = handler;
    event.data = handler.data;

    var ret = handler.apply(this, arguments);

    if( ret !== undefined ){
     event.result = ret;
     if ( ret === false ) {
      event.preventDefault();
      event.stopPropagation();
     }
    }

    if( event.isImmediatePropagationStopped() )
     break;

   }
  }
 },

 props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),

 fix: function(event) {
  if ( event[expando] )
   return event;

  // store a copy of the original event object
  // and "clone" to set read-only properties
  var originalEvent = event;
  event = jQuery.Event( originalEvent );

  for ( var i = this.props.length, prop; i; ){
   prop = this.props[ --i ];
   event[ prop ] = originalEvent[ prop ];
  }

  // Fix target property, if necessary
  if ( !event.target )
   event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either

  // check if target is a textnode (safari)
  if ( event.target.nodeType == 3 )
   event.target = event.target.parentNode;

  // Add relatedTarget, if necessary
  if ( !event.relatedTarget &amp;&amp; event.fromElement )
   event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;

  // Calculate pageX/Y if missing and clientX/Y available
  if ( event.pageX == null &amp;&amp; event.clientX != null ) {
   var doc = document.documentElement, body = document.body;
   event.pageX = event.clientX + (doc &amp;&amp; doc.scrollLeft || body &amp;&amp; body.scrollLeft || 0) - (doc.clientLeft || 0);
   event.pageY = event.clientY + (doc &amp;&amp; doc.scrollTop || body &amp;&amp; body.scrollTop || 0) - (doc.clientTop || 0);
  }

  // Add which for key events
  if ( !event.which &amp;&amp; ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
   event.which = event.charCode || event.keyCode;

  // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
  if ( !event.metaKey &amp;&amp; event.ctrlKey )
   event.metaKey = event.ctrlKey;

  // Add which for click: 1 == left; 2 == middle; 3 == right
  // Note: button is not normalized, so don't use it
  if ( !event.which &amp;&amp; event.button )
   event.which = (event.button &amp; 1 ? 1 : ( event.button &amp; 2 ? 3 : ( event.button &amp; 4 ? 2 : 0 ) ));

  return event;
 },

 proxy: function( fn, proxy ){
  proxy = proxy || function(){ return fn.apply(this, arguments); };
  // Set the guid of unique handler to the same of original handler, so it can be removed
  proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
  // So proxy can be declared as an argument
  return proxy;
 },

 special: {
  ready: {
   // Make sure the ready event is setup
   setup: bindReady,
   teardown: function() {}
  }
 },
 
 specialAll: {
  live: {
   setup: function( selector, namespaces ){
    jQuery.event.add( this, namespaces[0], liveHandler );
   },
   teardown:  function( namespaces ){
    if ( namespaces.length ) {
     var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
     
     jQuery.each( (jQuery.data(this, "events").live || {}), function(){
      if ( name.test(this.type) )
       remove++;
     });
     
     if ( remove &lt; 1 )
      jQuery.event.remove( this, namespaces[0], liveHandler );
    }
   }
  }
 }
};

jQuery.Event = function( src ){
 // Allow instantiation without the 'new' keyword
 if( !this.preventDefault )
  return new jQuery.Event(src);
 
 // Event object
 if( src &amp;&amp; src.type ){
  this.originalEvent = src;
  this.type = src.type;
 // Event type
 }else
  this.type = src;

 // timeStamp is buggy for some events on Firefox(#3843)
 // So we won't rely on the native value
 this.timeStamp = now();
 
 // Mark it as fixed
 this[expando] = true;
};

function returnFalse(){
 return false;
}
function returnTrue(){
 return true;
}

// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
 preventDefault: function() {
  this.isDefaultPrevented = returnTrue;

  var e = this.originalEvent;
  if( !e )
   return;
  // if preventDefault exists run it on the original event
  if (e.preventDefault)
   e.preventDefault();
  // otherwise set the returnValue property of the original event to false (IE)
  e.returnValue = false;
 },
 stopPropagation: function() {
  this.isPropagationStopped = returnTrue;

  var e = this.originalEvent;
  if( !e )
   return;
  // if stopPropagation exists run it on the original event
  if (e.stopPropagation)
   e.stopPropagation();
  // otherwise set the cancelBubble property of the original event to true (IE)
  e.cancelBubble = true;
 },
 stopImmediatePropagation:function(){
  this.isImmediatePropagationStopped = returnTrue;
  this.stopPropagation();
 },
 isDefaultPrevented: returnFalse,
 isPropagationStopped: returnFalse,
 isImmediatePropagationStopped: returnFalse
};
// Checks if an event happened on an element within another element
// Used in jQuery.event.special.mouseenter and mouseleave handlers
var withinElement = function(event) {
 // Check if mouse(over|out) are still within the same parent element
 var parent = event.relatedTarget;
 // Traverse up the tree
 while ( parent &amp;&amp; parent != this )
  try { parent = parent.parentNode; }
  catch(e) { parent = this; }
 
 if( parent != this ){
  // set the correct event type
  event.type = event.data;
  // handle event if we actually just moused on to a non sub-element
  jQuery.event.handle.apply( this, arguments );
 }
};
 
jQuery.each({ 
 mouseover: 'mouseenter', 
 mouseout: 'mouseleave'
}, function( orig, fix ){
 jQuery.event.special[ fix ] = {
  setup: function(){
   jQuery.event.add( this, orig, withinElement, fix );
  },
  teardown: function(){
   jQuery.event.remove( this, orig, withinElement );
  }
 };      
});

jQuery.fn.extend({
 bind: function( type, data, fn ) {
  return type == "unload" ? this.one(type, data, fn) : this.each(function(){
   jQuery.event.add( this, type, fn || data, fn &amp;&amp; data );
  });
 },

 one: function( type, data, fn ) {
  var one = jQuery.event.proxy( fn || data, function(event) {
   jQuery(this).unbind(event, one);
   return (fn || data).apply( this, arguments );
  });
  return this.each(function(){
   jQuery.event.add( this, type, one, fn &amp;&amp; data);
  });
 },

 unbind: function( type, fn ) {
  return this.each(function(){
   jQuery.event.remove( this, type, fn );
  });
 },

 trigger: function( type, data ) {
  return this.each(function(){
   jQuery.event.trigger( type, data, this );
  });
 },

 triggerHandler: function( type, data ) {
  if( this[0] ){
   var event = jQuery.Event(type);
   event.preventDefault();
   event.stopPropagation();
   jQuery.event.trigger( event, data, this[0] );
   return event.result;
  }  
 },

 toggle: function( fn ) {
  // Save reference to arguments for access in closure
  var args = arguments, i = 1;

  // link all the functions, so any of them can unbind this click handler
  while( i &lt; args.length )
   jQuery.event.proxy( fn, args[i++] );

  return this.click( jQuery.event.proxy( fn, function(event) {
   // Figure out which function to execute
   this.lastToggle = ( this.lastToggle || 0 ) % i;

   // Make sure that clicks stop
   event.preventDefault();

   // and execute the function
   return args[ this.lastToggle++ ].apply( this, arguments ) || false;
  }));
 },

 hover: function(fnOver, fnOut) {
  return this.mouseenter(fnOver).mouseleave(fnOut);
 },

 ready: function(fn) {
  // Attach the listeners
  bindReady();

  // If the DOM is already ready
  if ( jQuery.isReady )
   // Execute the function immediately
   fn.call( document, jQuery );

  // Otherwise, remember the function for later
  else
   // Add the function to the wait list
   jQuery.readyList.push( fn );

  return this;
 },
 
 live: function( type, fn ){
  var proxy = jQuery.event.proxy( fn );
  proxy.guid += this.selector + type;

  jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy );

  return this;
 },
 
 die: function( type, fn ){
  jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
  return this;
 }
});

function liveHandler( event ){
 var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
  stop = true,
  elems = [];

 jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
  if ( check.test(fn.type) ) {
   var elem = jQuery(event.target).closest(fn.data)[0];
   if ( elem )
    elems.push({ elem: elem, fn: fn });
  }
 });

 elems.sort(function(a,b) {
  return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
 });
 
 jQuery.each(elems, function(){
  if ( this.fn.call(this.elem, event, this.fn.data) === false )
   return (stop = false);
 });

 return stop;
}

function liveConvert(type, selector){
 return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join(".");
}

jQuery.extend({
 isReady: false,
 readyList: [],
 // Handle when the DOM is ready
 ready: function() {
  // Make sure that the DOM is not already loaded
  if ( !jQuery.isReady ) {
   // Remember that the DOM is ready
   jQuery.isReady = true;

   // If there are functions bound, to execute
   if ( jQuery.readyList ) {
    // Execute all of them
    jQuery.each( jQuery.readyList, function(){
     this.call( document, jQuery );
    });

    // Reset the list of functions
    jQuery.readyList = null;
   }

   // Trigger any bound ready events
   jQuery(document).triggerHandler("ready");
  }
 }
});

var readyBound = false;

function bindReady(){
 if ( readyBound ) return;
 readyBound = true;

 // Mozilla, Opera and webkit nightlies currently support this event
 if ( document.addEventListener ) {
  // Use the handy event callback
  document.addEventListener( "DOMContentLoaded", function(){
   document.removeEventListener( "DOMContentLoaded", arguments.callee, false );
   jQuery.ready();
  }, false );

 // If IE event model is used
 } else if ( document.attachEvent ) {
  // ensure firing before onload,
  // maybe late but safe also for iframes
  document.attachEvent("onreadystatechange", function(){
   if ( document.readyState === "complete" ) {
    document.detachEvent( "onreadystatechange", arguments.callee );
    jQuery.ready();
   }
  });

  // If IE and not an iframe
  // continually check to see if the document is ready
  if ( document.documentElement.doScroll &amp;&amp; window == window.top ) (function(){
   if ( jQuery.isReady ) return;

   try {
    // If IE is used, use the trick by Diego Perini
    // http://javascript.nwbox.com/IEContentLoaded/
    document.documentElement.doScroll("left");
   } catch( error ) {
    setTimeout( arguments.callee, 0 );
    return;
   }

   // and execute any waiting functions
   jQuery.ready();
  })();
 }

 // A fallback to window.onload, that will always work
 jQuery.event.add( window, "load", jQuery.ready );
}

jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
 "mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," +
 "change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){

 // Handle event binding
 jQuery.fn[name] = function(fn){
  return fn ? this.bind(name, fn) : this.trigger(name);
 };
});

// Prevent memory leaks in IE
// And prevent errors on refresh with events like mouseover in other browsers
// Window isn't included so as not to unbind existing unload events
jQuery( window ).bind( 'unload', function(){ 
 for ( var id in jQuery.cache )
  // Skip the window
  if ( id != 1 &amp;&amp; jQuery.cache[ id ].handle )
   jQuery.event.remove( jQuery.cache[ id ].handle.elem );
}); 
(function(){

 jQuery.support = {};

 var root = document.documentElement,
  script = document.createElement("script"),
  div = document.createElement("div"),
  id = "script" + (new Date).getTime();

 div.style.display = "none";
 div.innerHTML = '   &lt;link/&gt;&lt;table&gt;&lt;/table&gt;&lt;a href="/a" style="color:red;float:left;opacity:.5;"&gt;a&lt;/a&gt;&lt;select&gt;&lt;option&gt;text&lt;/option&gt;&lt;/select&gt;&lt;object&gt;&lt;param/&gt;&lt;/object&gt;';

 var all = div.getElementsByTagName("*"),
  a = div.getElementsByTagName("a")[0];

 // Can't get basic test support
 if ( !all || !all.length || !a ) {
  return;
 }

 jQuery.support = {
  // IE strips leading whitespace when .innerHTML is used
  leadingWhitespace: div.firstChild.nodeType == 3,
  
  // Make sure that tbody elements aren't automatically inserted
  // IE will insert them into empty tables
  tbody: !div.getElementsByTagName("tbody").length,
  
  // Make sure that you can get all elements in an &lt;object&gt; element
  // IE 7 always returns no results
  objectAll: !!div.getElementsByTagName("object")[0]
   .getElementsByTagName("*").length,
  
  // Make sure that link elements get serialized correctly by innerHTML
  // This requires a wrapper element in IE
  htmlSerialize: !!div.getElementsByTagName("link").length,
  
  // Get the style information from getAttribute
  // (IE uses .cssText insted)
  style: /red/.test( a.getAttribute("style") ),
  
  // Make sure that URLs aren't manipulated
  // (IE normalizes it by default)
  hrefNormalized: a.getAttribute("href") === "/a",
  
  // Make sure that element opacity exists
  // (IE uses filter instead)
  opacity: a.style.opacity === "0.5",
  
  // Verify style float existence
  // (IE uses styleFloat instead of cssFloat)
  cssFloat: !!a.style.cssFloat,

  // Will be defined later
  scriptEval: false,
  noCloneEvent: true,
  boxModel: null
 };
 
 script.type = "text/javascript";
 try {
  script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
 } catch(e){}

 root.insertBefore( script, root.firstChild );
 
 // Make sure that the execution of code works by injecting a script
 // tag with appendChild/createTextNode
 // (IE doesn't support this, fails, and uses .text instead)
 if ( window[ id ] ) {
  jQuery.support.scriptEval = true;
  delete window[ id ];
 }

 root.removeChild( script );

 if ( div.attachEvent &amp;&amp; div.fireEvent ) {
  div.attachEvent("onclick", function(){
   // Cloning a node shouldn't copy over any
   // bound event handlers (IE does this)
   jQuery.support.noCloneEvent = false;
   div.detachEvent("onclick", arguments.callee);
  });
  div.cloneNode(true).fireEvent("onclick");
 }

 // Figure out if the W3C box model works as expected
 // document.body must exist before we can do this
 jQuery(function(){
  var div = document.createElement("div");
  div.style.width = div.style.paddingLeft = "1px";

  document.body.appendChild( div );
  jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
  document.body.removeChild( div ).style.display = 'none';
 });
})();

var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat";

jQuery.props = {
 "for": "htmlFor",
 "class": "className",
 "float": styleFloat,
 cssFloat: styleFloat,
 styleFloat: styleFloat,
 readonly: "readOnly",
 maxlength: "maxLength",
 cellspacing: "cellSpacing",
 rowspan: "rowSpan",
 tabindex: "tabIndex"
};
jQuery.fn.extend({
 // Keep a copy of the old load
 _load: jQuery.fn.load,

 load: function( url, params, callback ) {
  if ( typeof url !== "string" )
   return this._load( url );

  var off = url.indexOf(" ");
  if ( off &gt;= 0 ) {
   var selector = url.slice(off, url.length);
   url = url.slice(0, off);
  }

  // Default to a GET request
  var type = "GET";

  // If the second parameter was provided
  if ( params )
   // If it's a function
   if ( jQuery.isFunction( params ) ) {
    // We assume that it's the callback
    callback = params;
    params = null;

   // Otherwise, build a param string
   } else if( typeof params === "object" ) {
    params = jQuery.param( params );
    type = "POST";
   }

  var self = this;

  // Request the remote document
  jQuery.ajax({
   url: url,
   type: type,
   dataType: "html",
   data: params,
   complete: function(res, status){
    // If successful, inject the HTML into all the matched elements
    if ( status == "success" || status == "notmodified" )
     // See if a selector was specified
     self.html( selector ?
      // Create a dummy div to hold the results
      jQuery("&lt;div/&gt;")
       // inject the contents of the document in, removing the scripts
       // to avoid any 'Permission Denied' errors in IE
       .append(res.responseText.replace(/&lt;script(.|\s)*?\/script&gt;/g, ""))

       // Locate the specified elements
       .find(selector) :

      // If not, just inject the full result
      res.responseText );

    if( callback )
     self.each( callback, [res.responseText, status, res] );
   }
  });
  return this;
 },

 serialize: function() {
  return jQuery.param(this.serializeArray());
 },
 serializeArray: function() {
  return this.map(function(){
   return this.elements ? jQuery.makeArray(this.elements) : this;
  })
  .filter(function(){
   return this.name &amp;&amp; !this.disabled &amp;&amp;
    (this.checked || /select|textarea/i.test(this.nodeName) ||
     /text|hidden|password|search/i.test(this.type));
  })
  .map(function(i, elem){
   var val = jQuery(this).val();
   return val == null ? null :
    jQuery.isArray(val) ?
     jQuery.map( val, function(val, i){
      return {name: elem.name, value: val};
     }) :
     {name: elem.name, value: val};
  }).get();
 }
});

// Attach a bunch of functions for handling common AJAX events
jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
 jQuery.fn[o] = function(f){
  return this.bind(o, f);
 };
});

var jsc = now();

jQuery.extend({
  
 get: function( url, data, callback, type ) {
  // shift arguments if data argument was ommited
  if ( jQuery.isFunction( data ) ) {
   callback = data;
   data = null;
  }

  return jQuery.ajax({
   type: "GET",
   url: url,
   data: data,
   success: callback,
   dataType: type
  });
 },

 getScript: function( url, callback ) {
  return jQuery.get(url, null, callback, "script");
 },

 getJSON: function( url, data, callback ) {
  return jQuery.get(url, data, callback, "json");
 },

 post: function( url, data, callback, type ) {
  if ( jQuery.isFunction( data ) ) {
   callback = data;
   data = {};
  }

  return jQuery.ajax({
   type: "POST",
   url: url,
   data: data,
   success: callback,
   dataType: type
  });
 },

 ajaxSetup: function( settings ) {
  jQuery.extend( jQuery.ajaxSettings, settings );
 },

 ajaxSettings: {
  url: location.href,
  global: true,
  type: "GET",
  contentType: "application/x-www-form-urlencoded",
  processData: true,
  async: true,
  /*
  timeout: 0,
  data: null,
  username: null,
  password: null,
  */
  // Create the request object; Microsoft failed to properly
  // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
  // This function can be overriden by calling jQuery.ajaxSetup
  xhr:function(){
   return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
  },
  accepts: {
   xml: "application/xml, text/xml",
   html: "text/html",
   script: "text/javascript, application/javascript",
   json: "application/json, text/javascript",
   text: "text/plain",
   _default: "*/*"
  }
 },

 // Last-Modified header cache for next request
 lastModified: {},

 ajax: function( s ) {
  // Extend the settings, but re-extend 's' so that it can be
  // checked again later (in the test suite, specifically)
  s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));

  var jsonp, jsre = /=\?(&amp;|$)/g, status, data,
   type = s.type.toUpperCase();

  // convert data if not already a string
  if ( s.data &amp;&amp; s.processData &amp;&amp; typeof s.data !== "string" )
   s.data = jQuery.param(s.data);

  // Handle JSONP Parameter Callbacks
  if ( s.dataType == "jsonp" ) {
   if ( type == "GET" ) {
    if ( !s.url.match(jsre) )
     s.url += (s.url.match(/\?/) ? "&amp;" : "?") + (s.jsonp || "callback") + "=?";
   } else if ( !s.data || !s.data.match(jsre) )
    s.data = (s.data ? s.data + "&amp;" : "") + (s.jsonp || "callback") + "=?";
   s.dataType = "json";
  }

  // Build temporary JSONP function
  if ( s.dataType == "json" &amp;&amp; (s.data &amp;&amp; s.data.match(jsre) || s.url.match(jsre)) ) {
   jsonp = "jsonp" + jsc++;

   // Replace the =? sequence both in the query string and the data
   if ( s.data )
    s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
   s.url = s.url.replace(jsre, "=" + jsonp + "$1");

   // We need to make sure
   // that a JSONP style response is executed properly
   s.dataType = "script";

   // Handle JSONP-style loading
   window[ jsonp ] = function(tmp){
    data = tmp;
    success();
    complete();
    // Garbage collect
    window[ jsonp ] = undefined;
    try{ delete window[ jsonp ]; } catch(e){}
    if ( head )
     head.removeChild( script );
   };
  }

  if ( s.dataType == "script" &amp;&amp; s.cache == null )
   s.cache = false;

  if ( s.cache === false &amp;&amp; type == "GET" ) {
   var ts = now();
   // try replacing _= if it is there
   var ret = s.url.replace(/(\?|&amp;)_=.*?(&amp;|$)/, "$1_=" + ts + "$2");
   // if nothing was replaced, add timestamp to the end
   s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&amp;" : "?") + "_=" + ts : "");
  }

  // If data is available, append data to url for get requests
  if ( s.data &amp;&amp; type == "GET" ) {
   s.url += (s.url.match(/\?/) ? "&amp;" : "?") + s.data;

   // IE likes to send both get and post data, prevent this
   s.data = null;
  }

  // Watch for a new set of requests
  if ( s.global &amp;&amp; ! jQuery.active++ )
   jQuery.event.trigger( "ajaxStart" );

  // Matches an absolute URL, and saves the domain
  var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url );

  // If we're requesting a remote document
  // and trying to load JSON or Script with a GET
  if ( s.dataType == "script" &amp;&amp; type == "GET" &amp;&amp; parts
   &amp;&amp; ( parts[1] &amp;&amp; parts[1] != location.protocol || parts[2] != location.host )){

   var head = document.getElementsByTagName("head")[0];
   var script = document.createElement("script");
   script.src = s.url;
   if (s.scriptCharset)
    script.charset = s.scriptCharset;

   // Handle Script loading
   if ( !jsonp ) {
    var done = false;

    // Attach handlers for all browsers
    script.onload = script.onreadystatechange = function(){
     if ( !done &amp;&amp; (!this.readyState ||
       this.readyState == "loaded" || this.readyState == "complete") ) {
      done = true;
      success();
      complete();

      // Handle memory leak in IE
      script.onload = script.onreadystatechange = null;
      head.removeChild( script );
     }
    };
   }

   head.appendChild(script);

   // We handle everything using the script element injection
   return undefined;
  }

  var requestDone = false;

  // Create the request object
  var xhr = s.xhr();

  // Open the socket
  // Passing null username, generates a login popup on Opera (#2865)
  if( s.username )
   xhr.open(type, s.url, s.async, s.username, s.password);
  else
   xhr.open(type, s.url, s.async);

  // Need an extra try/catch for cross domain requests in Firefox 3
  try {
   // Set the correct header, if data is being sent
   if ( s.data )
    xhr.setRequestHeader("Content-Type", s.contentType);

   // Set the If-Modified-Since header, if ifModified mode.
   if ( s.ifModified )
    xhr.setRequestHeader("If-Modified-Since",
     jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );

   // Set header so the called script knows that it's an XMLHttpRequest
   xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");

   // Set the Accepts header for the server, depending on the dataType
   xhr.setRequestHeader("Accept", s.dataType &amp;&amp; s.accepts[ s.dataType ] ?
    s.accepts[ s.dataType ] + ", */*" :
    s.accepts._default );
  } catch(e){}

  // Allow custom headers/mimetypes and early abort
  if ( s.beforeSend &amp;&amp; s.beforeSend(xhr, s) === false ) {
   // Handle the global AJAX counter
   if ( s.global &amp;&amp; ! --jQuery.active )
    jQuery.event.trigger( "ajaxStop" );
   // close opended socket
   xhr.abort();
   return false;
  }

  if ( s.global )
   jQuery.event.trigger("ajaxSend", [xhr, s]);

  // Wait for a response to come back
  var onreadystatechange = function(isTimeout){
   // The request was aborted, clear the interval and decrement jQuery.active
   if (xhr.readyState == 0) {
    if (ival) {
     // clear poll interval
     clearInterval(ival);
     ival = null;
     // Handle the global AJAX counter
     if ( s.global &amp;&amp; ! --jQuery.active )
      jQuery.event.trigger( "ajaxStop" );
    }
   // The transfer is complete and the data is available, or the request timed out
   } else if ( !requestDone &amp;&amp; xhr &amp;&amp; (xhr.readyState == 4 || isTimeout == "timeout") ) {
    requestDone = true;

    // clear poll interval
    if (ival) {
     clearInterval(ival);
     ival = null;
    }

    status = isTimeout == "timeout" ? "timeout" :
     !jQuery.httpSuccess( xhr ) ? "error" :
     s.ifModified &amp;&amp; jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
     "success";

    if ( status == "success" ) {
     // Watch for, and catch, XML document parse errors
     try {
      // process the data (runs the xml through httpData regardless of callback)
      data = jQuery.httpData( xhr, s.dataType, s );
     } catch(e) {
      status = "parsererror";
     }
    }

    // Make sure that the request was successful or notmodified
    if ( status == "success" ) {
     // Cache Last-Modified header, if ifModified mode.
     var modRes;
     try {
      modRes = xhr.getResponseHeader("Last-Modified");
     } catch(e) {} // swallow exception thrown by FF if header is not available

     if ( s.ifModified &amp;&amp; modRes )
      jQuery.lastModified[s.url] = modRes;

     // JSONP handles its own success callback
     if ( !jsonp )
      success();
    } else
     jQuery.handleError(s, xhr, status);

    // Fire the complete handlers
    complete();

    if ( isTimeout )
     xhr.abort();

    // Stop memory leaks
    if ( s.async )
     xhr = null;
   }
  };

  if ( s.async ) {
   // don't attach the handler to the request, just poll it instead
   var ival = setInterval(onreadystatechange, 13);

   // Timeout checker
   if ( s.timeout &gt; 0 )
    setTimeout(function(){
     // Check to see if the request is still happening
     if ( xhr &amp;&amp; !requestDone )
      onreadystatechange( "timeout" );
    }, s.timeout);
  }

  // Send the data
  try {
   xhr.send(s.data);
  } catch(e) {
   jQuery.handleError(s, xhr, null, e);
  }

  // firefox 1.5 doesn't fire statechange for sync requests
  if ( !s.async )
   onreadystatechange();

  function success(){
   // If a local callback was specified, fire it and pass it the data
   if ( s.success )
    s.success( data, status );

   // Fire the global callback
   if ( s.global )
    jQuery.event.trigger( "ajaxSuccess", [xhr, s] );
  }

  function complete(){
   // Process result
   if ( s.complete )
    s.complete(xhr, status);

   // The request was completed
   if ( s.global )
    jQuery.event.trigger( "ajaxComplete", [xhr, s] );

   // Handle the global AJAX counter
   if ( s.global &amp;&amp; ! --jQuery.active )
    jQuery.event.trigger( "ajaxStop" );
  }

  // return XMLHttpRequest to allow aborting the request etc.
  return xhr;
 },

 handleError: function( s, xhr, status, e ) {
  // If a local callback was specified, fire it
  if ( s.error ) s.error( xhr, status, e );

  // Fire the global callback
  if ( s.global )
   jQuery.event.trigger( "ajaxError", [xhr, s, e] );
 },

 // Counter for holding the number of active queries
 active: 0,

 // Determines if an XMLHttpRequest was successful or not
 httpSuccess: function( xhr ) {
  try {
   // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
   return !xhr.status &amp;&amp; location.protocol == "file:" ||
    ( xhr.status &gt;= 200 &amp;&amp; xhr.status &lt; 300 ) || xhr.status == 304 || xhr.status == 1223;
  } catch(e){}
  return false;
 },

 // Determines if an XMLHttpRequest returns NotModified
 httpNotModified: function( xhr, url ) {
  try {
   var xhrRes = xhr.getResponseHeader("Last-Modified");

   // Firefox always returns 200. check Last-Modified date
   return xhr.status == 304 || xhrRes == jQuery.lastModified[url];
  } catch(e){}
  return false;
 },

 httpData: function( xhr, type, s ) {
  var ct = xhr.getResponseHeader("content-type"),
   xml = type == "xml" || !type &amp;&amp; ct &amp;&amp; ct.indexOf("xml") &gt;= 0,
   data = xml ? xhr.responseXML : xhr.responseText;

  if ( xml &amp;&amp; data.documentElement.tagName == "parsererror" )
   throw "parsererror";
   
  // Allow a pre-filtering function to sanitize the response
  // s != null is checked to keep backwards compatibility
  if( s &amp;&amp; s.dataFilter )
   data = s.dataFilter( data, type );

  // The filter can actually parse the response
  if( typeof data === "string" ){

   // If the type is "script", eval it in global context
   if ( type == "script" )
    jQuery.globalEval( data );

   // Get the JavaScript object, if JSON is used.
   if ( type == "json" )
    data = window["eval"]("(" + data + ")");
  }
  
  return data;
 },

 // Serialize an array of form elements or a set of
 // key/values into a query string
 param: function( a ) {
  var s = [ ];

  function add( key, value ){
   s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value);
  };

  // If an array was passed in, assume that it is an array
  // of form elements
  if ( jQuery.isArray(a) || a.jquery )
   // Serialize the form elements
   jQuery.each( a, function(){
    add( this.name, this.value );
   });

  // Otherwise, assume that it's an object of key/value pairs
  else
   // Serialize the key/values
   for ( var j in a )
    // If the value is an array then the key names need to be repeated
    if ( jQuery.isArray(a[j]) )
     jQuery.each( a[j], function(){
      add( j, this );
     });
    else
     add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] );

  // Return the resulting serialization
  return s.join("&amp;").replace(/%20/g, "+");
 }

});
var elemdisplay = {},
 timerId,
 fxAttrs = [
  // height animations
  [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
  // width animations
  [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
  // opacity animations
  [ "opacity" ]
 ];

function genFx( type, num ){
 var obj = {};
 jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function(){
  obj[ this ] = type;
 });
 return obj;
}

jQuery.fn.extend({
 show: function(speed,callback){
  if ( speed ) {
   return this.animate( genFx("show", 3), speed, callback);
  } else {
   for ( var i = 0, l = this.length; i &lt; l; i++ ){
    var old = jQuery.data(this[i], "olddisplay");
    
    this[i].style.display = old || "";
    
    if ( jQuery.css(this[i], "display") === "none" ) {
     var tagName = this[i].tagName, display;
     
     if ( elemdisplay[ tagName ] ) {
      display = elemdisplay[ tagName ];
     } else {
      var elem = jQuery("&lt;" + tagName + " /&gt;").appendTo("body");
      
      display = elem.css("display");
      if ( display === "none" )
       display = "block";
      
      elem.remove();
      
      elemdisplay[ tagName ] = display;
     }
     
     jQuery.data(this[i], "olddisplay", display);
    }
   }

   // Set the display of the elements in a second loop
   // to avoid the constant reflow
   for ( var i = 0, l = this.length; i &lt; l; i++ ){
    this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
   }
   
   return this;
  }
 },

 hide: function(speed,callback){
  if ( speed ) {
   return this.animate( genFx("hide", 3), speed, callback);
  } else {
   for ( var i = 0, l = this.length; i &lt; l; i++ ){
    var old = jQuery.data(this[i], "olddisplay");
    if ( !old &amp;&amp; old !== "none" )
     jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
   }

   // Set the display of the elements in a second loop
   // to avoid the constant reflow
   for ( var i = 0, l = this.length; i &lt; l; i++ ){
    this[i].style.display = "none";
   }

   return this;
  }
 },

 // Save the old toggle function
 _toggle: jQuery.fn.toggle,

 toggle: function( fn, fn2 ){
  var bool = typeof fn === "boolean";

  return jQuery.isFunction(fn) &amp;&amp; jQuery.isFunction(fn2) ?
   this._toggle.apply( this, arguments ) :
   fn == null || bool ?
    this.each(function(){
     var state = bool ? fn : jQuery(this).is(":hidden");
     jQuery(this)[ state ? "show" : "hide" ]();
    }) :
    this.animate(genFx("toggle", 3), fn, fn2);
 },

 fadeTo: function(speed,to,callback){
  return this.animate({opacity: to}, speed, callback);
 },

 animate: function( prop, speed, easing, callback ) {
  var optall = jQuery.speed(speed, easing, callback);

  return this[ optall.queue === false ? "each" : "queue" ](function(){
  
   var opt = jQuery.extend({}, optall), p,
    hidden = this.nodeType == 1 &amp;&amp; jQuery(this).is(":hidden"),
    self = this;
 
   for ( p in prop ) {
    if ( prop[p] == "hide" &amp;&amp; hidden || prop[p] == "show" &amp;&amp; !hidden )
     return opt.complete.call(this);

    if ( ( p == "height" || p == "width" ) &amp;&amp; this.style ) {
     // Store display property
     opt.display = jQuery.css(this, "display");

     // Make sure that nothing sneaks out
     opt.overflow = this.style.overflow;
    }
   }

   if ( opt.overflow != null )
    this.style.overflow = "hidden";

   opt.curAnim = jQuery.extend({}, prop);

   jQuery.each( prop, function(name, val){
    var e = new jQuery.fx( self, opt, name );

    if ( /toggle|show|hide/.test(val) )
     e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
    else {
     var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
      start = e.cur(true) || 0;

     if ( parts ) {
      var end = parseFloat(parts[2]),
       unit = parts[3] || "px";

      // We need to compute starting value
      if ( unit != "px" ) {
       self.style[ name ] = (end || 1) + unit;
       start = ((end || 1) / e.cur(true)) * start;
       self.style[ name ] = start + unit;
      }

      // If a +=/-= token was provided, we're doing a relative animation
      if ( parts[1] )
       end = ((parts[1] == "-=" ? -1 : 1) * end) + start;

      e.custom( start, end, unit );
     } else
      e.custom( start, val, "" );
    }
   });

   // For JS strict compliance
   return true;
  });
 },

 stop: function(clearQueue, gotoEnd){
  var timers = jQuery.timers;

  if (clearQueue)
   this.queue([]);

  this.each(function(){
   // go in reverse order so anything added to the queue during the loop is ignored
   for ( var i = timers.length - 1; i &gt;= 0; i-- )
    if ( timers[i].elem == this ) {
     if (gotoEnd)
      // force the next step to be the last
      timers[i](true);
     timers.splice(i, 1);
    }
  });

  // start the next in the queue if the last step wasn't forced
  if (!gotoEnd)
   this.dequeue();

  return this;
 }

});

// Generate shortcuts for custom animations
jQuery.each({
 slideDown: genFx("show", 1),
 slideUp: genFx("hide", 1),
 slideToggle: genFx("toggle", 1),
 fadeIn: { opacity: "show" },
 fadeOut: { opacity: "hide" }
}, function( name, props ){
 jQuery.fn[ name ] = function( speed, callback ){
  return this.animate( props, speed, callback );
 };
});

jQuery.extend({

 speed: function(speed, easing, fn) {
  var opt = typeof speed === "object" ? speed : {
   complete: fn || !fn &amp;&amp; easing ||
    jQuery.isFunction( speed ) &amp;&amp; speed,
   duration: speed,
   easing: fn &amp;&amp; easing || easing &amp;&amp; !jQuery.isFunction(easing) &amp;&amp; easing
  };

  opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
   jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;

  // Queueing
  opt.old = opt.complete;
  opt.complete = function(){
   if ( opt.queue !== false )
    jQuery(this).dequeue();
   if ( jQuery.isFunction( opt.old ) )
    opt.old.call( this );
  };

  return opt;
 },

 easing: {
  linear: function( p, n, firstNum, diff ) {
   return firstNum + diff * p;
  },
  swing: function( p, n, firstNum, diff ) {
   return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
  }
 },

 timers: [],

 fx: function( elem, options, prop ){
  this.options = options;
  this.elem = elem;
  this.prop = prop;

  if ( !options.orig )
   options.orig = {};
 }

});

jQuery.fx.prototype = {

 // Simple function for setting a style value
 update: function(){
  if ( this.options.step )
   this.options.step.call( this.elem, this.now, this );

  (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );

  // Set display property to block for height/width animations
  if ( ( this.prop == "height" || this.prop == "width" ) &amp;&amp; this.elem.style )
   this.elem.style.display = "block";
 },

 // Get the current size
 cur: function(force){
  if ( this.elem[this.prop] != null &amp;&amp; (!this.elem.style || this.elem.style[this.prop] == null) )
   return this.elem[ this.prop ];

  var r = parseFloat(jQuery.css(this.elem, this.prop, force));
  return r &amp;&amp; r &gt; -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
 },

 // Start an animation from one number to another
 custom: function(from, to, unit){
  this.startTime = now();
  this.start = from;
  this.end = to;
  this.unit = unit || this.unit || "px";
  this.now = this.start;
  this.pos = this.state = 0;

  var self = this;
  function t(gotoEnd){
   return self.step(gotoEnd);
  }

  t.elem = this.elem;

  if ( t() &amp;&amp; jQuery.timers.push(t) &amp;&amp; !timerId ) {
   timerId = setInterval(function(){
    var timers = jQuery.timers;

    for ( var i = 0; i &lt; timers.length; i++ )
     if ( !timers[i]() )
      timers.splice(i--, 1);

    if ( !timers.length ) {
     clearInterval( timerId );
     timerId = undefined;
    }
   }, 13);
  }
 },

 // Simple 'show' function
 show: function(){
  // Remember where we started, so that we can go back to it later
  this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
  this.options.show = true;

  // Begin the animation
  // Make sure that we start at a small width/height to avoid any
  // flash of content
  this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur());

  // Start by showing the element
  jQuery(this.elem).show();
 },

 // Simple 'hide' function
 hide: function(){
  // Remember where we started, so that we can go back to it later
  this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
  this.options.hide = true;

  // Begin the animation
  this.custom(this.cur(), 0);
 },

 // Each step of an animation
 step: function(gotoEnd){
  var t = now();

  if ( gotoEnd || t &gt;= this.options.duration + this.startTime ) {
   this.now = this.end;
   this.pos = this.state = 1;
   this.update();

   this.options.curAnim[ this.prop ] = true;

   var done = true;
   for ( var i in this.options.curAnim )
    if ( this.options.curAnim[i] !== true )
     done = false;

   if ( done ) {
    if ( this.options.display != null ) {
     // Reset the overflow
     this.elem.style.overflow = this.options.overflow;

     // Reset the display
     this.elem.style.display = this.options.display;
     if ( jQuery.css(this.elem, "display") == "none" )
      this.elem.style.display = "block";
    }

    // Hide the element if the "hide" operation was done
    if ( this.options.hide )
     jQuery(this.elem).hide();

    // Reset the properties, if the item has been hidden or shown
    if ( this.options.hide || this.options.show )
     for ( var p in this.options.curAnim )
      jQuery.attr(this.elem.style, p, this.options.orig[p]);
     
    // Execute the complete function
    this.options.complete.call( this.elem );
   }

   return false;
  } else {
   var n = t - this.startTime;
   this.state = n / this.options.duration;

   // Perform the easing function, defaults to swing
   this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
   this.now = this.start + ((this.end - this.start) * this.pos);

   // Perform the next step of the animation
   this.update();
  }

  return true;
 }

};

jQuery.extend( jQuery.fx, {
 speeds:{
  slow: 600,
   fast: 200,
   // Default speed
   _default: 400
 },
 step: {

  opacity: function(fx){
   jQuery.attr(fx.elem.style, "opacity", fx.now);
  },

  _default: function(fx){
   if ( fx.elem.style &amp;&amp; fx.elem.style[ fx.prop ] != null )
    fx.elem.style[ fx.prop ] = fx.now + fx.unit;
   else
    fx.elem[ fx.prop ] = fx.now;
  }
 }
});
if ( document.documentElement["getBoundingClientRect"] )
 jQuery.fn.offset = function() {
  if ( !this[0] ) return { top: 0, left: 0 };
  if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
  var box  = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement,
   clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
   top  = box.top  + (self.pageYOffset || jQuery.boxModel &amp;&amp; docElem.scrollTop  || body.scrollTop ) - clientTop,
   left = box.left + (self.pageXOffset || jQuery.boxModel &amp;&amp; docElem.scrollLeft || body.scrollLeft) - clientLeft;
  return { top: top, left: left };
 };
else 
 jQuery.fn.offset = function() {
  if ( !this[0] ) return { top: 0, left: 0 };
  if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
  jQuery.offset.initialized || jQuery.offset.initialize();

  var elem = this[0], offsetParent = elem.offsetParent, prevOffsetParent = elem,
   doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
   body = doc.body, defaultView = doc.defaultView,
   prevComputedStyle = defaultView.getComputedStyle(elem, null),
   top = elem.offsetTop, left = elem.offsetLeft;

  while ( (elem = elem.parentNode) &amp;&amp; elem !== body &amp;&amp; elem !== docElem ) {
   computedStyle = defaultView.getComputedStyle(elem, null);
   top -= elem.scrollTop, left -= elem.scrollLeft;
   if ( elem === offsetParent ) {
    top += elem.offsetTop, left += elem.offsetLeft;
    if ( jQuery.offset.doesNotAddBorder &amp;&amp; !(jQuery.offset.doesAddBorderForTableAndCells &amp;&amp; /^t(able|d|h)$/i.test(elem.tagName)) )
     top  += parseInt( computedStyle.borderTopWidth,  10) || 0,
     left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
    prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
   }
   if ( jQuery.offset.subtractsBorderForOverflowNotVisible &amp;&amp; computedStyle.overflow !== "visible" )
    top  += parseInt( computedStyle.borderTopWidth,  10) || 0,
    left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
   prevComputedStyle = computedStyle;
  }

  if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" )
   top  += body.offsetTop,
   left += body.offsetLeft;

  if ( prevComputedStyle.position === "fixed" )
   top  += Math.max(docElem.scrollTop, body.scrollTop),
   left += Math.max(docElem.scrollLeft, body.scrollLeft);

  return { top: top, left: left };
 };

jQuery.offset = {
 initialize: function() {
  if ( this.initialized ) return;
  var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
   html = '&lt;div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';

  rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' };
  for ( prop in rules ) container.style[prop] = rules[prop];

  container.innerHTML = html;
  body.insertBefore(container, body.firstChild);
  innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild;

  this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
  this.doesAddBorderForTableAndCells = (td.offsetTop === 5);

  innerDiv.style.overflow = 'hidden', innerDiv.style.position = 'relative';
  this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);

  body.style.marginTop = '1px';
  this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0);
  body.style.marginTop = bodyMarginTop;

  body.removeChild(container);
  this.initialized = true;
 },

 bodyOffset: function(body) {
  jQuery.offset.initialized || jQuery.offset.initialize();
  var top = body.offsetTop, left = body.offsetLeft;
  if ( jQuery.offset.doesNotIncludeMarginInBodyOffset )
   top  += parseInt( jQuery.curCSS(body, 'marginTop',  true), 10 ) || 0,
   left += parseInt( jQuery.curCSS(body, 'marginLeft', true), 10 ) || 0;
  return { top: top, left: left };
 }
};


jQuery.fn.extend({
 position: function() {
  var left = 0, top = 0, results;

  if ( this[0] ) {
   // Get *real* offsetParent
   var offsetParent = this.offsetParent(),

   // Get correct offsets
   offset       = this.offset(),
   parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();

   // Subtract element margins
   // note: when an element has margin: auto the offsetLeft and marginLeft 
   // are the same in Safari causing offset.left to incorrectly be 0
   offset.top  -= num( this, 'marginTop'  );
   offset.left -= num( this, 'marginLeft' );

   // Add offsetParent borders
   parentOffset.top  += num( offsetParent, 'borderTopWidth'  );
   parentOffset.left += num( offsetParent, 'borderLeftWidth' );

   // Subtract the two offsets
   results = {
    top:  offset.top  - parentOffset.top,
    left: offset.left - parentOffset.left
   };
  }

  return results;
 },

 offsetParent: function() {
  var offsetParent = this[0].offsetParent || document.body;
  while ( offsetParent &amp;&amp; (!/^body|html$/i.test(offsetParent.tagName) &amp;&amp; jQuery.css(offsetParent, 'position') == 'static') )
   offsetParent = offsetParent.offsetParent;
  return jQuery(offsetParent);
 }
});


// Create scrollLeft and scrollTop methods
jQuery.each( ['Left', 'Top'], function(i, name) {
 var method = 'scroll' + name;
 
 jQuery.fn[ method ] = function(val) {
  if (!this[0]) return null;

  return val !== undefined ?

   // Set the scroll offset
   this.each(function() {
    this == window || this == document ?
     window.scrollTo(
      !i ? val : jQuery(window).scrollLeft(),
       i ? val : jQuery(window).scrollTop()
     ) :
     this[ method ] = val;
   }) :

   // Return the scroll offset
   this[0] == window || this[0] == document ?
    self[ i ? 'pageYOffset' : 'pageXOffset' ] ||
     jQuery.boxModel &amp;&amp; document.documentElement[ method ] ||
     document.body[ method ] :
    this[0][ method ];
 };
});
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
jQuery.each([ "Height", "Width" ], function(i, name){

 var tl = i ? "Left"  : "Top",  // top or left
  br = i ? "Right" : "Bottom", // bottom or right
  lower = name.toLowerCase();

 // innerHeight and innerWidth
 jQuery.fn["inner" + name] = function(){
  return this[0] ?
   jQuery.css( this[0], lower, false, "padding" ) :
   null;
 };

 // outerHeight and outerWidth
 jQuery.fn["outer" + name] = function(margin) {
  return this[0] ?
   jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) :
   null;
 };
 
 var type = name.toLowerCase();

 jQuery.fn[ type ] = function( size ) {
  // Get window width or height
  return this[0] == window ?
   // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
   document.compatMode == "CSS1Compat" &amp;&amp; document.documentElement[ "client" + name ] ||
   document.body[ "client" + name ] :

   // Get document width or height
   this[0] == document ?
    // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
    Math.max(
     document.documentElement["client" + name],
     document.body["scroll" + name], document.documentElement["scroll" + name],
     document.body["offset" + name], document.documentElement["offset" + name]
    ) :

    // Get or set width or height on the element
    size === undefined ?
     // Get width or height on the element
     (this.length ? jQuery.css( this[0], type ) : null) :

     // Set the width or height on the element (default to pixels if value is unitless)
     this.css( type, typeof size === "string" ? size : size + "px" );
 };

});
})();
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;
/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.core.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;return!b.href||!g||f.nodeName.toLowerCase()!=="map"?!1:(h=a("img[usemap=#"+g+"]")[0],!!h&amp;&amp;d(h))}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&amp;&amp;d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.22",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&amp;&amp;c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.browser.msie&amp;&amp;/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&amp;&amp;/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&amp;&amp;d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&amp;&amp;f!==0)return f}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a("&lt;a&gt;").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function h(b,c,d,f){return a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&amp;&amp;(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&amp;&amp;(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)}),c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===b?g["inner"+d].call(this):this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){return typeof b!="number"?g["outer"+d].call(this,b):this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d&gt;=0)&amp;&amp;c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.curCSS||(a.curCSS=a.css),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode)return;for(var e=0;e&lt;d.length;e++)a.options[d[e][0]]&amp;&amp;d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&amp;16:a!==b&amp;&amp;a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&amp;&amp;c==="left"?"scrollLeft":"scrollTop",e=!1;return b[d]&gt;0?!0:(b[d]=1,e=b[d]&gt;0,b[d]=0,e)},isOverAxis:function(a,b,c){return a&gt;b&amp;&amp;a&lt;b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&amp;&amp;a.ui.isOverAxis(c,e,g)}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.widget.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){return c||(!b||a.filter(b,[this]).length)&amp;&amp;a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}}),d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&amp;&amp;this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;return e=!f&amp;&amp;g.length?a.extend.apply(null,[!0,e].concat(g)):e,f&amp;&amp;e.charAt(0)==="_"?h:(f?this.each(function(){var d=a.data(this,c),f=d&amp;&amp;a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&amp;&amp;f!==b)return h=f,!1}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))}),h)}},a.Widget=function(a,b){arguments.length&amp;&amp;this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&amp;&amp;a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}return this._setOptions(e),this},_setOptions:function(b){var c=this;return a.each(b,function(a,b){c._setOption(a,b)}),this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&amp;&amp;this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&amp;&amp;g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.mouse.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent"))return a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(b){if(c)return;this._mouseStarted&amp;&amp;this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&amp;&amp;b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCapture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&amp;&amp;this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted)return b.preventDefault(),!0}return!0===a.data(b.target,this.widgetName+".preventClickEvent")&amp;&amp;a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0,!0},_mouseMove:function(b){return!a.browser.msie||document.documentMode&gt;=9||!!b.button?this._mouseStarted?(this._mouseDrag(b),b.preventDefault()):(this._mouseDistanceMet(b)&amp;&amp;this._mouseDelayMet(b)&amp;&amp;(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)),!this._mouseStarted):this._mouseUp(b)},_mouseUp:function(b){return a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&amp;&amp;(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&amp;&amp;a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b)),!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))&gt;=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.position.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f={},g=a.fn.position,h=a.fn.offset;a.fn.position=function(b){if(!b||!b.of)return g.apply(this,arguments);b=a.extend({},b);var h=a(b.of),i=h[0],j=(b.collision||"flip").split(" "),k=b.offset?b.offset.split(" "):[0,0],l,m,n;return i.nodeType===9?(l=h.width(),m=h.height(),n={top:0,left:0}):i.setTimeout?(l=h.width(),m=h.height(),n={top:h.scrollTop(),left:h.scrollLeft()}):i.preventDefault?(b.at="left top",l=m=0,n={top:b.of.pageY,left:b.of.pageX}):(l=h.outerWidth(),m=h.outerHeight(),n=h.offset()),a.each(["my","at"],function(){var a=(b[this]||"").split(" ");a.length===1&amp;&amp;(a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]),a[0]=c.test(a[0])?a[0]:e,a[1]=d.test(a[1])?a[1]:e,b[this]=a}),j.length===1&amp;&amp;(j[1]=j[0]),k[0]=parseInt(k[0],10)||0,k.length===1&amp;&amp;(k[1]=k[0]),k[1]=parseInt(k[1],10)||0,b.at[0]==="right"?n.left+=l:b.at[0]===e&amp;&amp;(n.left+=l/2),b.at[1]==="bottom"?n.top+=m:b.at[1]===e&amp;&amp;(n.top+=m/2),n.left+=k[0],n.top+=k[1],this.each(function(){var c=a(this),d=c.outerWidth(),g=c.outerHeight(),h=parseInt(a.curCSS(this,"marginLeft",!0))||0,i=parseInt(a.curCSS(this,"marginTop",!0))||0,o=d+h+(parseInt(a.curCSS(this,"marginRight",!0))||0),p=g+i+(parseInt(a.curCSS(this,"marginBottom",!0))||0),q=a.extend({},n),r;b.my[0]==="right"?q.left-=d:b.my[0]===e&amp;&amp;(q.left-=d/2),b.my[1]==="bottom"?q.top-=g:b.my[1]===e&amp;&amp;(q.top-=g/2),f.fractions||(q.left=Math.round(q.left),q.top=Math.round(q.top)),r={left:q.left-h,top:q.top-i},a.each(["left","top"],function(c,e){a.ui.position[j[c]]&amp;&amp;a.ui.position[j[c]][e](q,{targetWidth:l,targetHeight:m,elemWidth:d,elemHeight:g,collisionPosition:r,collisionWidth:o,collisionHeight:p,offset:k,my:b.my,at:b.at})}),a.fn.bgiframe&amp;&amp;c.bgiframe(),c.offset(a.extend(q,{using:b.using}))})},a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e&gt;0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e&gt;0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e)return;var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left&lt;0?g+h+i:f&gt;0?g+h+i:0},top:function(b,c){if(c.at[1]===e)return;var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top&lt;0?g+h+i:f&gt;0?g+h+i:0}}},a.offset.setOffset||(a.offset.setOffset=function(b,c){/static/.test(a.curCSS(b,"position"))&amp;&amp;(b.style.position="relative");var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",!0),10)||0,g=parseInt(a.curCSS(b,"left",!0),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};"using"in c?c.using.call(b,h):d.css(h)},a.fn.offset=function(b){var c=this[0];return!c||!c.ownerDocument?null:b?a.isFunction(b)?this.each(function(c){a(this).offset(b.call(this,c,a(this).offset()))}):this.each(function(){a.offset.setOffset(this,b)}):h.call(this)}),function(){var b=document.getElementsByTagName("body")[0],c=document.createElement("div"),d,e,g,h,i;d=document.createElement(b?"div":"body"),g={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},b&amp;&amp;a.extend(g,{position:"absolute",left:"-1000px",top:"-1000px"});for(var j in g)d.style[j]=g[j];d.appendChild(c),e=b||document.documentElement,e.insertBefore(d,e.firstChild),c.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",h=a(c).offset(function(a,b){return b}).offset(),d.innerHTML="",e.removeChild(d),i=h.top+h.left+(b?2e3:0),f.fractions=i&gt;21&amp;&amp;i&lt;22}()})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.draggable.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&amp;&amp;!/^(?:r|a|f)/.test(this.element.css("position"))&amp;&amp;(this.element[0].style.position="relative"),this.options.addClasses&amp;&amp;this.element.addClass("ui-draggable"),this.options.disabled&amp;&amp;this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(!this.element.data("draggable"))return;return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options;return this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(b),this.handle?(c.iframeFix&amp;&amp;a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('&lt;div class="ui-draggable-iframeFix" style="background: #fff;"&gt;&lt;/div&gt;').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(b){var c=this.options;return this.helper=this._createHelper(b),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),a.ui.ddmanager&amp;&amp;(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&amp;&amp;this._adjustOffsetFromHelper(c.cursorAt),c.containment&amp;&amp;this._setContainment(),this._trigger("start",b)===!1?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&amp;&amp;!c.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(this,b),this._mouseDrag(b,!0),a.ui.ddmanager&amp;&amp;a.ui.ddmanager.dragStart(this,b),!0)},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1)return this._mouseUp({}),!1;this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";return a.ui.ddmanager&amp;&amp;a.ui.ddmanager.drag(this,b),!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&amp;&amp;!this.options.dropBehaviour&amp;&amp;(c=a.ui.ddmanager.drop(this,b)),this.dropped&amp;&amp;(c=this.dropped,this.dropped=!1);var d=this.element[0],e=!1;while(d&amp;&amp;(d=d.parentNode))d==document&amp;&amp;(e=!0);if(!e&amp;&amp;this.options.helper==="original")return!1;if(this.options.revert=="invalid"&amp;&amp;!c||this.options.revert=="valid"&amp;&amp;c||this.options.revert===!0||a.isFunction(this.options.revert)&amp;&amp;this.options.revert.call(this.element,c)){var f=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",b)!==!1&amp;&amp;f._clear()})}else this._trigger("stop",b)!==!1&amp;&amp;this._clear();return!1},_mouseUp:function(b){return this.options.iframeFix===!0&amp;&amp;a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&amp;&amp;a.ui.ddmanager.dragStop(this,b),a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;return a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&amp;&amp;(c=!0)}),c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&amp;&amp;!/(fixed|absolute)/.test(d.css("position"))&amp;&amp;d.css("position","absolute"),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&amp;&amp;(b=b.split(" ")),a.isArray(b)&amp;&amp;(b={left:+b[0],top:+b[1]||0}),"left"in b&amp;&amp;(this.offset.click.left=b.left+this.margins.left),"right"in b&amp;&amp;(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&amp;&amp;(this.offset.click.top=b.top+this.margins.top),"bottom"in b&amp;&amp;(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&amp;&amp;this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0])&amp;&amp;(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()=="html"&amp;&amp;a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&amp;&amp;(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&amp;&amp;b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&amp;&amp;(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&amp;&amp;(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&amp;&amp;(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.left&lt;h[0]&amp;&amp;(f=h[0]+this.offset.click.left),b.pageY-this.offset.click.top&lt;h[1]&amp;&amp;(g=h[1]+this.offset.click.top),b.pageX-this.offset.click.left&gt;h[2]&amp;&amp;(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top&gt;h[3]&amp;&amp;(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.top&lt;h[1]||j-this.offset.click.top&gt;h[3]?j-this.offset.click.top&lt;h[1]?j+c.grid[1]:j-c.grid[1]:j:j;var k=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;f=h?k-this.offset.click.left&lt;h[0]||k-this.offset.click.left&gt;h[2]?k-this.offset.click.left&lt;h[0]?k+c.grid[0]:k-c.grid[0]:k:k}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&amp;&amp;a.browser.version&lt;526&amp;&amp;this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&amp;&amp;!this.cancelHelperRemoval&amp;&amp;this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){return d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),b=="drag"&amp;&amp;(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.extend(a.ui.draggable,{version:"1.8.22"}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"sortable");c&amp;&amp;!c.options.disabled&amp;&amp;(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigger("activate",b,f))})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&amp;&amp;(this.instance.options.revert=!0),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,d.options.helper=="original"&amp;&amp;this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("draggable"),e=this,f=function(b){var c=this.offset.click.top,d=this.offset.click.left,e=this.positionAbs.top,f=this.positionAbs.left,g=b.height,h=b.width,i=b.top,j=b.left;return a.ui.isOver(e+c,f+d,i,j,g,h)};a.each(d.sortables,function(f){this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&amp;&amp;this.instance._mouseDrag(b)):this.instance.isOver&amp;&amp;(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&amp;&amp;this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c){var d=a("body"),e=a(this).data("draggable").options;d.css("cursor")&amp;&amp;(e._cursor=d.css("cursor")),d.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;d._cursor&amp;&amp;a("body").css("cursor",d._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("opacity")&amp;&amp;(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;d._opacity&amp;&amp;a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(b,c){var d=a(this).data("draggable");d.scrollParent[0]!=document&amp;&amp;d.scrollParent[0].tagName!="HTML"&amp;&amp;(d.overflowOffset=d.scrollParent.offset())},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=!1;if(d.scrollParent[0]!=document&amp;&amp;d.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")d.overflowOffset.top+d.scrollParent[0].offsetHeight-b.pageY&lt;e.scrollSensitivity?d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top&lt;e.scrollSensitivity&amp;&amp;(d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop-e.scrollSpeed);if(!e.axis||e.axis!="y")d.overflowOffset.left+d.scrollParent[0].offsetWidth-b.pageX&lt;e.scrollSensitivity?d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left&lt;e.scrollSensitivity&amp;&amp;(d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft-e.scrollSpeed)}else{if(!e.axis||e.axis!="x")b.pageY-a(document).scrollTop()&lt;e.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())&lt;e.scrollSensitivity&amp;&amp;(f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!="y")b.pageX-a(document).scrollLeft()&lt;e.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())&lt;e.scrollSensitivity&amp;&amp;(f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed))}f!==!1&amp;&amp;a.ui.ddmanager&amp;&amp;!e.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c){var d=a(this).data("draggable"),e=d.options;d.snapElements=[],a(e.snap.constructor!=String?e.snap.items||":data(draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!=d.element[0]&amp;&amp;d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=e.snapTolerance,g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height;for(var k=d.snapElements.length-1;k&gt;=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f&lt;g&amp;&amp;g&lt;m+f&amp;&amp;n-f&lt;i&amp;&amp;i&lt;o+f||l-f&lt;g&amp;&amp;g&lt;m+f&amp;&amp;n-f&lt;j&amp;&amp;j&lt;o+f||l-f&lt;h&amp;&amp;h&lt;m+f&amp;&amp;n-f&lt;i&amp;&amp;i&lt;o+f||l-f&lt;h&amp;&amp;h&lt;m+f&amp;&amp;n-f&lt;j&amp;&amp;j&lt;o+f)){d.snapElements[k].snapping&amp;&amp;d.options.snap.release&amp;&amp;d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=!1;continue}if(e.snapMode!="inner"){var p=Math.abs(n-j)&lt;=f,q=Math.abs(o-i)&lt;=f,r=Math.abs(l-h)&lt;=f,s=Math.abs(m-g)&lt;=f;p&amp;&amp;(c.position.top=d._convertPositionTo("relative",{top:n-d.helperProportions.height,left:0}).top-d.margins.top),q&amp;&amp;(c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d.margins.top),r&amp;&amp;(c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left),s&amp;&amp;(c.position.left=d._convertPositionTo("relative",{top:0,left:m}).left-d.margins.left)}var t=p||q||r||s;if(e.snapMode!="outer"){var p=Math.abs(n-i)&lt;=f,q=Math.abs(o-j)&lt;=f,r=Math.abs(l-g)&lt;=f,s=Math.abs(m-h)&lt;=f;p&amp;&amp;(c.position.top=d._convertPositionTo("relative",{top:n,left:0}).top-d.margins.top),q&amp;&amp;(c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top),r&amp;&amp;(c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left),s&amp;&amp;(c.position.left=d._convertPositionTo("relative",{top:0,left:m-d.helperProportions.width}).left-d.margins.left)}!d.snapElements[k].snapping&amp;&amp;(p||q||r||s||t)&amp;&amp;d.options.snap.snap&amp;&amp;d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=p||q||r||s||t}}}),a.ui.plugin.add("draggable","stack",{start:function(b,c){var d=a(this).data("draggable").options,e=a.makeArray(a(d.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(!e.length)return;var f=parseInt(e[0].style.zIndex)||0;a(e).each(function(a){this.style.zIndex=f+a}),this[0].style.zIndex=f+e.length}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("zIndex")&amp;&amp;(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;d._zIndex&amp;&amp;a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.droppable.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var b=this.options,c=b.accept;this.isover=0,this.isout=1,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&amp;&amp;this.element.addClass("ui-droppable")},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c&lt;b.length;c++)b[c]==this&amp;&amp;b.splice(c,1);return this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"),this},_setOption:function(b,c){b=="accept"&amp;&amp;(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&amp;&amp;this.element.addClass(this.options.activeClass),c&amp;&amp;this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&amp;&amp;this.element.removeClass(this.options.activeClass),c&amp;&amp;this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;this.accept.call(this.element[0],c.currentItem||c.element)&amp;&amp;(this.options.hoverClass&amp;&amp;this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;this.accept.call(this.element[0],c.currentItem||c.element)&amp;&amp;(this.options.hoverClass&amp;&amp;this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return!1;var e=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&amp;&amp;!b.options.disabled&amp;&amp;b.options.scope==d.options.scope&amp;&amp;b.accept.call(b.element[0],d.currentItem||d.element)&amp;&amp;a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance))return e=!0,!1}),e?!1:this.accept.call(this.element[0],d.currentItem||d.element)?(this.options.activeClass&amp;&amp;this.element.removeClass(this.options.activeClass),this.options.hoverClass&amp;&amp;this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d)),this.element):!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.extend(a.ui.droppable,{version:"1.8.22"}),a.ui.intersect=function(b,c,d){if(!c.offset)return!1;var e=(b.positionAbs||b.position.absolute).left,f=e+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height,i=c.offset.left,j=i+c.proportions.width,k=c.offset.top,l=k+c.proportions.height;switch(d){case"fit":return i&lt;=e&amp;&amp;f&lt;=j&amp;&amp;k&lt;=g&amp;&amp;h&lt;=l;case"intersect":return i&lt;e+b.helperProportions.width/2&amp;&amp;f-b.helperProportions.width/2&lt;j&amp;&amp;k&lt;g+b.helperProportions.height/2&amp;&amp;h-b.helperProportions.height/2&lt;l;case"pointer":var m=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,n=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,o=a.ui.isOver(n,m,k,i,c.proportions.height,c.proportions.width);return o;case"touch":return(g&gt;=k&amp;&amp;g&lt;=l||h&gt;=k&amp;&amp;h&lt;=l||g&lt;k&amp;&amp;h&gt;l)&amp;&amp;(e&gt;=i&amp;&amp;e&lt;=j||f&gt;=i&amp;&amp;f&lt;=j||e&lt;i&amp;&amp;f&gt;j);default:return!1}},a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf();g:for(var h=0;h&lt;d.length;h++){if(d[h].options.disabled||b&amp;&amp;!d[h].accept.call(d[h].element[0],b.currentItem||b.element))continue;for(var i=0;i&lt;f.length;i++)if(f[i]==d[h].element[0]){d[h].proportions.height=0;continue g}d[h].visible=d[h].element.css("display")!="none";if(!d[h].visible)continue;e=="mousedown"&amp;&amp;d[h]._activate.call(d[h],c),d[h].offset=d[h].element.offset(),d[h].proportions={width:d[h].element[0].offsetWidth,height:d[h].element[0].offsetHeight}}},drop:function(b,c){var d=!1;return a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options)return;!this.options.disabled&amp;&amp;this.visible&amp;&amp;a.ui.intersect(b,this,this.options.tolerance)&amp;&amp;(d=this._drop.call(this,c)||d),!this.options.disabled&amp;&amp;this.visible&amp;&amp;this.accept.call(this.element[0],b.currentItem||b.element)&amp;&amp;(this.isout=1,this.isover=0,this._deactivate.call(this,c))}),d},dragStart:function(b,c){b.element.parents(":not(body,html)").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&amp;&amp;a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var d=a.ui.intersect(b,this,this.options.tolerance),e=!d&amp;&amp;this.isover==1?"isout":d&amp;&amp;this.isover==0?"isover":null;if(!e)return;var f;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");g.length&amp;&amp;(f=a.data(g[0],"droppable"),f.greedyChild=e=="isover"?1:0)}f&amp;&amp;e=="isover"&amp;&amp;(f.isover=0,f.isout=1,f._out.call(f,c)),this[e]=1,this[e=="isout"?"isover":"isout"]=0,this[e=="isover"?"_over":"_out"].call(this,c),f&amp;&amp;e=="isout"&amp;&amp;(f.isout=0,f.isover=1,f._over.call(f,c))})},dragStop:function(b,c){b.element.parents(":not(body,html)").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.resizable.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var b=this,c=this.options;this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&amp;&amp;(this.element.wrap(a('&lt;div class="ui-wrapper" style="overflow: hidden;"&gt;&lt;/div&gt;').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&amp;&amp;(this.handles="n,e,s,w,se,sw,ne,nw");var d=this.handles.split(",");this.handles={};for(var e=0;e&lt;d.length;e++){var f=a.trim(d[e]),g="ui-resizable-"+f,h=a('&lt;div class="ui-resizable-handle '+g+'"&gt;&lt;/div&gt;');h.css({zIndex:c.zIndex}),"se"==f&amp;&amp;h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[f]=".ui-resizable-"+f,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&amp;&amp;(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&amp;&amp;this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(f,e),this._proportionallyResize()}if(!a(this.handles[c]).length)continue}},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&amp;&amp;a[1]?a[1]:"se"}}),c.autoHide&amp;&amp;(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){if(c.disabled)return;a(this).removeClass("ui-resizable-autohide"),b._handles.show()},function(){if(c.disabled)return;b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}return this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement),this},_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&amp;&amp;(c=!0);return!this.options.disabled&amp;&amp;c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&amp;&amp;f.css({position:"absolute",top:e.top,left:e.left}),this._renderProxy();var g=c(this.helper.css("left")),h=c(this.helper.css("top"));d.containment&amp;&amp;(g+=a(d.containment).scrollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:h},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:h},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(".ui-resizable-"+this.axis).css("cursor");return a("body").css("cursor",i=="auto"?this.axis+"-resize":i),f.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c=this.helper,d=this.options,e={},f=this,g=this.originalMousePosition,h=this.axis,i=b.pageX-g.left||0,j=b.pageY-g.top||0,k=this._change[h];if(!k)return!1;var l=k.apply(this,[b,i,j]),m=a.browser.msie&amp;&amp;a.browser.version&lt;7,n=this.sizeDiff;this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)l=this._updateRatio(l,b);return l=this._respectSize(l,b),this._propagate("resize",b),c.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&amp;&amp;this._proportionallyResizeElements.length&amp;&amp;this._proportionallyResize(),this._updateCache(l),this._trigger("resize",b,this.ui()),!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&amp;&amp;/textarea/i.test(e[0].nodeName),g=f&amp;&amp;a.ui.hasScroll(e[0],"left")?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width,i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(i,{top:k,left:j})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&amp;&amp;!c.animate&amp;&amp;this._proportionallyResize()}return a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&amp;&amp;this.helper.remove(),!1},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHeight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a)c=h.minHeight*this.aspectRatio,f=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,g=h.maxWidth/this.aspectRatio,c&gt;h.minWidth&amp;&amp;(h.minWidth=c),f&gt;h.minHeight&amp;&amp;(h.minHeight=f),e&lt;h.maxWidth&amp;&amp;(h.maxWidth=e),g&lt;h.maxHeight&amp;&amp;(h.maxHeight=g);this._vBoundaries=h},_updateCache:function(a){var b=this.options;this.offset=this.helper.offset(),d(a.left)&amp;&amp;(this.position.left=a.left),d(a.top)&amp;&amp;(this.position.top=a.top),d(a.height)&amp;&amp;(this.size.height=a.height),d(a.width)&amp;&amp;(this.size.width=a.width)},_updateRatio:function(a,b){var c=this.options,e=this.position,f=this.size,g=this.axis;return d(a.height)?a.width=a.height*this.aspectRatio:d(a.width)&amp;&amp;(a.height=a.width/this.aspectRatio),g=="sw"&amp;&amp;(a.left=e.left+(f.width-a.width),a.top=null),g=="nw"&amp;&amp;(a.top=e.top+(f.height-a.height),a.left=e.left+(f.width-a.width)),a},_respectSize:function(a,b){var c=this.helper,e=this._vBoundaries,f=this._aspectRatio||b.shiftKey,g=this.axis,h=d(a.width)&amp;&amp;e.maxWidth&amp;&amp;e.maxWidth&lt;a.width,i=d(a.height)&amp;&amp;e.maxHeight&amp;&amp;e.maxHeight&lt;a.height,j=d(a.width)&amp;&amp;e.minWidth&amp;&amp;e.minWidth&gt;a.width,k=d(a.height)&amp;&amp;e.minHeight&amp;&amp;e.minHeight&gt;a.height;j&amp;&amp;(a.width=e.minWidth),k&amp;&amp;(a.height=e.minHeight),h&amp;&amp;(a.width=e.maxWidth),i&amp;&amp;(a.height=e.maxHeight);var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);j&amp;&amp;n&amp;&amp;(a.left=l-e.minWidth),h&amp;&amp;n&amp;&amp;(a.left=l-e.maxWidth),k&amp;&amp;o&amp;&amp;(a.top=m-e.minHeight),i&amp;&amp;o&amp;&amp;(a.top=m-e.maxHeight);var p=!a.width&amp;&amp;!a.height;return p&amp;&amp;!a.left&amp;&amp;a.top?a.top=null:p&amp;&amp;!a.top&amp;&amp;a.left&amp;&amp;(a.left=null),a},_proportionallyResize:function(){var b=this.options;if(!this._proportionallyResizeElements.length)return;var c=this.helper||this.element;for(var d=0;d&lt;this._proportionallyResizeElements.length;d++){var e=this._proportionallyResizeElements[d];if(!this.borderDif){var f=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],g=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=a.map(f,function(a,b){var c=parseInt(a,10)||0,d=parseInt(g[b],10)||0;return c+d})}if(!a.browser.msie||!a(c).is(":hidden")&amp;&amp;!a(c).parents(":hidden").length)e.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0});else continue}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset();if(this._helper){this.helper=this.helper||a('&lt;div style="overflow:hidden;"&gt;&lt;/div&gt;');var d=a.browser.msie&amp;&amp;a.browser.version&lt;7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!="resize"&amp;&amp;this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.extend(a.ui.resizable,{version:"1.8.22"}),a.ui.plugin.add("resizable","alsoResize",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};typeof e.alsoResize=="object"&amp;&amp;!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=e.alsoResize[0],f(e.alsoResize)):a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("resizable-alsoresize"),f={},g=d&amp;&amp;d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&amp;&amp;c&gt;=0&amp;&amp;(f[b]=c||null)}),b.css(f)})};typeof e.alsoResize=="object"&amp;&amp;!e.alsoResize.nodeType?a.each(e.alsoResize,function(a,b){i(a,b)}):i(e.alsoResize)},stop:function(b,c){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","animate",{stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d._proportionallyResizeElements,g=f.length&amp;&amp;/textarea/i.test(f[0].nodeName),h=g&amp;&amp;a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.height,i=g?0:d.sizeDiff.width,j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&amp;&amp;k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};f&amp;&amp;f.length&amp;&amp;a(f[0]).css({width:c.width,height:c.height}),d._updateCache(c),d._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(b,d){var e=a(this).data("resizable"),f=e.options,g=e.element,h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!i)return;e.containerElement=a(i);if(/document/.test(h)||h==document)e.containerOffset={left:0,top:0},e.containerPosition={left:0,top:0},e.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var j=a(i),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,b){k[a]=c(j.css("padding"+b))}),e.containerOffset=j.offset(),e.containerPosition=j.position(),e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i,"left")?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;l[0]!=document&amp;&amp;/static/.test(l.css("position"))&amp;&amp;(k=g),i.left&lt;(d._helper?g.left:0)&amp;&amp;(d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left),j&amp;&amp;(d.size.height=d.size.width/d.aspectRatio),d.position.left=e.helper?g.left:0),i.top&lt;(d._helper?g.top:0)&amp;&amp;(d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top),j&amp;&amp;(d.size.width=d.size.height*d.aspectRatio),d.position.top=d._helper?g.top:0),d.offset.left=d.parentData.left+d.position.left,d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d.sizeDiff.height),o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css("position"));o&amp;&amp;p&amp;&amp;(m-=d.parentData.left),m+d.size.width&gt;=d.parentData.width&amp;&amp;(d.size.width=d.parentData.width-m,j&amp;&amp;(d.size.height=d.size.width/d.aspectRatio)),n+d.size.height&gt;=d.parentData.height&amp;&amp;(d.size.height=d.parentData.height-n,j&amp;&amp;(d.size.width=d.size.height*d.aspectRatio))},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement,j=a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;d._helper&amp;&amp;!e.animate&amp;&amp;/relative/.test(i.css("position"))&amp;&amp;a(this).css({left:k.left-h.left-g.left,width:l,height:m}),d._helper&amp;&amp;!e.animate&amp;&amp;/static/.test(i.css("position"))&amp;&amp;a(this).css({left:k.left-h.left-g.left,width:l,height:m})}}),a.ui.plugin.add("resizable","ghost",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone(),d.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:""),d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&amp;&amp;d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&amp;&amp;d.helper&amp;&amp;d.helper.get(0).removeChild(d.ghost.get(0))}}),a.ui.plugin.add("resizable","grid",{resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l):/^(ne)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l):/^(sw)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.left=h.left-k):(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l,d.position.left=h.left-k)}});var c=function(a){return parseInt(a,10)||0},d=function(a){return!isNaN(parseInt(a,10))}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.selectable.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable"),this.dragged=!1;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass("ui-selectee"),c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=c.addClass("ui-selectee"),this._mouseInit(),this.helper=a("&lt;div class='ui-selectable-helper'&gt;&lt;/div&gt;")},destroy:function(){return this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy(),this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(this.options.disabled)return;var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.helper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&amp;&amp;this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,!b.metaKey&amp;&amp;!b.ctrlKey&amp;&amp;(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&amp;&amp;!b.ctrlKey||!d.$element.hasClass("ui-selected");return d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d.element}),!1}})},_mouseDrag:function(b){var c=this;this.dragged=!0;if(this.options.disabled)return;var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e&gt;g){var i=g;g=e,e=i}if(f&gt;h){var i=h;h=f,f=i}return this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!i||i.element==c.element[0])return;var j=!1;d.tolerance=="touch"?j=!(i.left&gt;g||i.right&lt;e||i.top&gt;h||i.bottom&lt;f):d.tolerance=="fit"&amp;&amp;(j=i.left&gt;e&amp;&amp;i.right&lt;g&amp;&amp;i.top&gt;f&amp;&amp;i.bottom&lt;h),j?(i.selected&amp;&amp;(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&amp;&amp;(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,c._trigger("selecting",b,{selecting:i.element}))):(i.selecting&amp;&amp;((b.metaKey||b.ctrlKey)&amp;&amp;i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&amp;&amp;(i.$element.addClass("ui-unselecting"),i.unselecting=!0),c._trigger("unselecting",b,{unselecting:i.element}))),i.selected&amp;&amp;!b.metaKey&amp;&amp;!b.ctrlKey&amp;&amp;!i.startselected&amp;&amp;(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,c._trigger("unselecting",b,{unselecting:i.element})))}),!1},_mouseStop:function(b){var c=this;this.dragged=!1;var d=this.options;return a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove(),!1}}),a.extend(a.ui.selectable,{version:"1.8.22"})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.sortable.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"&gt; *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b&gt;=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c){var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f)return e=a(this),!1});a.data(b.target,d.widgetName+"-item")==f&amp;&amp;(e=a(b.target));if(!e)return!1;if(this.options.handle&amp;&amp;!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&amp;&amp;(h=!0)});if(!h)return!1}return this.currentItem=e,this._removeCurrentsFromItems(),!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&amp;&amp;this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&amp;&amp;this.currentItem.hide(),this._createPlaceholder(),e.containment&amp;&amp;this._setContainment(),e.cursor&amp;&amp;(a("body").css("cursor")&amp;&amp;(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&amp;&amp;(this.helper.css("opacity")&amp;&amp;(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&amp;&amp;(this.helper.css("zIndex")&amp;&amp;(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!="HTML"&amp;&amp;(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g&gt;=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));return a.ui.ddmanager&amp;&amp;(a.ui.ddmanager.current=this),a.ui.ddmanager&amp;&amp;!e.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b),!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY&lt;c.scrollSensitivity?this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-this.overflowOffset.top&lt;c.scrollSensitivity&amp;&amp;(this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX&lt;c.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-this.overflowOffset.left&lt;c.scrollSensitivity&amp;&amp;(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(b.pageY-a(document).scrollTop()&lt;c.scrollSensitivity?d=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())&lt;c.scrollSensitivity&amp;&amp;(d=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)),b.pageX-a(document).scrollLeft()&lt;c.scrollSensitivity?d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())&lt;c.scrollSensitivity&amp;&amp;(d=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed))),d!==!1&amp;&amp;a.ui.ddmanager&amp;&amp;!c.dropBehaviour&amp;&amp;a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var e=this.items.length-1;e&gt;=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&amp;&amp;this.placeholder[h==1?"next":"prev"]()[0]!=g&amp;&amp;!a.ui.contains(this.placeholder[0],g)&amp;&amp;(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}return this._contactContainers(b),a.ui.ddmanager&amp;&amp;a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(b,c){if(!b)return;a.ui.ddmanager&amp;&amp;!this.options.dropBehaviour&amp;&amp;a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c&gt;=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&amp;&amp;(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}return this.placeholder&amp;&amp;(this.placeholder[0].parentNode&amp;&amp;this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&amp;&amp;this.helper&amp;&amp;this.helper[0].parentNode&amp;&amp;this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(b){var c=this._getItemsAsjQuery(b&amp;&amp;b.connected),d=[];return b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&amp;&amp;d.push((b.key||c[1]+"[]")+"="+(b.key&amp;&amp;b.expression?c[1]:c[2]))}),!d.length&amp;&amp;b.key&amp;&amp;d.push(b.key+"="),d.join("&amp;")},toArray:function(b){var c=this._getItemsAsjQuery(b&amp;&amp;b.connected),d=[];return b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")}),d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j&gt;h&amp;&amp;d+j&lt;i&amp;&amp;b+k&gt;f&amp;&amp;b+k&lt;g;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&amp;&amp;this.helperProportions[this.floating?"width":"height"]&gt;a[this.floating?"width":"height"]?l:f&lt;b+this.helperProportions.width/2&amp;&amp;c-this.helperProportions.width/2&lt;g&amp;&amp;h&lt;d+this.helperProportions.height/2&amp;&amp;e-this.helperProportions.height/2&lt;i},_intersectsWithPointer:function(b){var c=this.options.axis==="x"||a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),d=this.options.axis==="y"||a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),e=c&amp;&amp;d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();return e?this.floating?g&amp;&amp;g=="right"||f=="down"?2:1:f&amp;&amp;(f=="down"?2:1):!1},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&amp;&amp;f?f=="right"&amp;&amp;d||f=="left"&amp;&amp;!d:e&amp;&amp;(e=="down"&amp;&amp;c||e=="up"&amp;&amp;!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&amp;&amp;(a&gt;0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&amp;&amp;(a&gt;0?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&amp;&amp;b)for(var g=f.length-1;g&gt;=0;g--){var h=a(f[g]);for(var i=h.length-1;i&gt;=0;i--){var j=a.data(h[i],this.widgetName);j&amp;&amp;j!=this&amp;&amp;!j.options.disabled&amp;&amp;e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g&gt;=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b&lt;this.items.length;b++)for(var c=0;c&lt;a.length;c++)a[c]==this.items[b].item[0]&amp;&amp;this.items.splice(b,1)},_refreshItems:function(b){this.items=[],this.containers=[this];var c=this.items,d=this,e=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],f=this._connectWith();if(f&amp;&amp;this.ready)for(var g=f.length-1;g&gt;=0;g--){var h=a(f[g]);for(var i=h.length-1;i&gt;=0;i--){var j=a.data(h[i],this.widgetName);j&amp;&amp;j!=this&amp;&amp;!j.options.disabled&amp;&amp;(e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g&gt;=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i&lt;m;i++){var n=a(l[i]);n.data(this.widgetName+"-item",k),c.push({item:n,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){this.offsetParent&amp;&amp;this.helper&amp;&amp;(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;c&gt;=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&amp;&amp;this.currentContainer&amp;&amp;d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&amp;&amp;this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c&gt;=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.containers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return e||(b.style.visibility="hidden"),b},update:function(a,b){if(e&amp;&amp;!d.forcePlaceholderSize)return;b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e&gt;=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&amp;&amp;a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&amp;&amp;(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!c)return;if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i&gt;=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.containers[d].floating?this.items[i].item.offset().left:this.items[i].item.offset().top;Math.abs(j-h)&lt;f&amp;&amp;(f=Math.abs(j-h),g=this.items[i],this.direction=j-h&gt;0?"down":"up")}if(!g&amp;&amp;!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d],g?this._rearrange(b,g,null,!0):this._rearrange(b,null,this.containers[d].element,!0),this._trigger("change",b,this._uiHash()),this.containers[d]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;return d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]==this.currentItem[0]&amp;&amp;(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(d[0].style.width==""||c.forceHelperSize)&amp;&amp;d.width(this.currentItem.width()),(d[0].style.height==""||c.forceHelperSize)&amp;&amp;d.height(this.currentItem.height()),d},_adjustOffsetFromHelper:function(b){typeof b=="string"&amp;&amp;(b=b.split(" ")),a.isArray(b)&amp;&amp;(b={left:+b[0],top:+b[1]||0}),"left"in b&amp;&amp;(this.offset.click.left=b.left+this.margins.left),"right"in b&amp;&amp;(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&amp;&amp;(this.offset.click.top=b.top+this.margins.top),"bottom"in b&amp;&amp;(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&amp;&amp;this.scrollParent[0]!=document&amp;&amp;a.ui.contains(this.scrollParent[0],this.offsetParent[0])&amp;&amp;(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()=="html"&amp;&amp;a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&amp;&amp;(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],d=a(b.containment).offset(),e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&amp;&amp;(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&amp;&amp;this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&amp;&amp;this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&amp;&amp;(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);this.cssPosition=="relative"&amp;&amp;(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&amp;&amp;(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition){this.containment&amp;&amp;(b.pageX-this.offset.click.left&lt;this.containment[0]&amp;&amp;(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top&lt;this.containment[1]&amp;&amp;(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left&gt;this.containment[2]&amp;&amp;(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top&gt;this.containment[3]&amp;&amp;(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.top&lt;this.containment[1]||h-this.offset.click.top&gt;this.containment[3]?h-this.offset.click.top&lt;this.containment[1]?h+c.grid[1]:h-c.grid[1]:h:h;var i=this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0];f=this.containment?i-this.offset.click.left&lt;this.containment[0]||i-this.offset.click.left&gt;this.containment[2]?i-this.offset.click.left&lt;this.containment[0]?i+c.grid[0]:i-c.grid[0]:i:i}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&amp;&amp;this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&amp;&amp;this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){f==e.counter&amp;&amp;e.refreshPositions(!d)},0)},_clear:function(b,c){this.reverting=!1;var d=[],e=this;!this._noFinalSort&amp;&amp;this.currentItem.parent().length&amp;&amp;this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&amp;&amp;!c&amp;&amp;d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&amp;&amp;!c&amp;&amp;d.push(function(a){this._trigger("update",a,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||d.push(function(a){this._trigger("remove",a,this._uiHash())});for(var f=this.containers.length-1;f&gt;=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&amp;&amp;!c&amp;&amp;(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f&gt;=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&amp;&amp;(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&amp;&amp;a("body").css("cursor",this._storedCursor),this._storedOpacity&amp;&amp;this.helper.css("opacity",this._storedOpacity),this._storedZIndex&amp;&amp;this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f&lt;d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1,!1}c||this._trigger("beforeStop",b,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&amp;&amp;this.helper.remove(),this.helper=null;if(!c){for(var f=0;f&lt;d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&amp;&amp;this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}}),a.extend(a.ui.sortable,{version:"1.8.22"})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.accordion.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:!0,clearStyle:!1,collapsible:!1,event:"click",fillSpace:!1,header:"&gt; li &gt; :first-child,&gt; :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:!1,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var b=this,c=b.options;b.running=0,b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){if(c.disabled)return;a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(c.disabled)return;a(this).removeClass("ui-state-focus")}),b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var d=b.element.find("a").filter(c.navigationFilter).eq(0);if(d.length){var e=d.closest(".ui-accordion-header");e.length?b.active=e:b.active=d.closest(".ui-accordion-content").prev()}}b.active=b._findActive(b.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),b.active.next().addClass("ui-accordion-content-active"),b._createIcons(),b.resize(),b.element.attr("role","tablist"),b.headers.attr("role","tab").bind("keydown.accordion",function(a){return b._keydown(a)}).next().attr("role","tabpanel"),b.headers.not(b.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),b.active.length?b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):b.headers.eq(0).attr("tabIndex",0),a.browser.safari||b.headers.find("a").attr("tabIndex",-1),c.event&amp;&amp;b.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){b._clickHandler.call(b,a,this),a.preventDefault()})},_createIcons:function(){var b=this.options;b.icons&amp;&amp;(a("&lt;span&gt;&lt;/span&gt;").addClass("ui-icon "+b.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected),this.element.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.children(".ui-icon").remove(),this.element.removeClass("ui-accordion-icons")},destroy:function(){var b=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");return(b.autoHeight||b.fillHeight)&amp;&amp;c.css("height",""),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b=="active"&amp;&amp;this.activate(c),b=="icons"&amp;&amp;(this._destroyIcons(),c&amp;&amp;this._createIcons()),b=="disabled"&amp;&amp;this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(b){if(this.options.disabled||b.altKey||b.ctrlKey)return;var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._clickHandler({target:b.target},b.target),b.preventDefault()}return f?(a(b.target).attr("tabIndex",-1),a(f).attr("tabIndex",0),f.focus(),!1):!0},resize:function(){var b=this.options,c;if(b.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height(),a.browser.msie&amp;&amp;this.element.parent().css("overflow",d),this.headers.each(function(){c-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else b.autoHeight&amp;&amp;(c=0,this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c));return this},activate:function(a){this.options.active=a;var b=this._findActive(a)[0];return this._clickHandler({target:b},b),this},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===!1?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,c){var d=this.options;if(d.disabled)return;if(!b.target){if(!d.collapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),f={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:e},g=this.active=a([]);this._toggle(g,e,f);return}var h=a(b.currentTarget||c),i=h[0]===this.active[0];d.active=d.collapsible&amp;&amp;i?!1:this.headers.index(h);if(this.running||!d.collapsible&amp;&amp;i)return;var j=this.active,g=h.next(),e=this.active.next(),f={options:d,newHeader:i&amp;&amp;d.collapsible?a([]):h,oldHeader:this.active,newContent:i&amp;&amp;d.collapsible?a([]):g,oldContent:e},k=this.headers.index(this.active[0])&gt;this.headers.index(h[0]);this.active=i?a([]):h,this._toggle(g,e,f,i,k),j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header),i||(h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected),h.next().addClass("ui-accordion-content-active"));return},_toggle:function(b,c,d,e,f){var g=this,h=g.options;g.toShow=b,g.toHide=c,g.data=d;var i=function(){if(!g)return;return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data),g.running=c.size()===0?b.size():c.size();if(h.animated){var j={};h.collapsible&amp;&amp;e?j={toShow:a([]),toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}:j={toShow:b,toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace},h.proxied||(h.proxied=h.animated),h.proxiedDuration||(h.proxiedDuration=h.duration),h.animated=a.isFunction(h.proxied)?h.proxied(j):h.proxied,h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(j):h.proxiedDuration;var k=a.ui.accordion.animations,l=h.duration,m=h.animated;m&amp;&amp;!k[m]&amp;&amp;!a.easing[m]&amp;&amp;(m="slide"),k[m]||(k[m]=function(a){this.slide(a,{easing:m,duration:l||700})}),k[m](j)}else h.collapsible&amp;&amp;e?b.toggle():(c.hide(),b.show()),i(!0);c.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),b.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(this.running)return;this.options.clearStyle&amp;&amp;this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&amp;&amp;(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data)}}),a.extend(a.ui.accordion,{version:"1.8.22",animations:{slide:function(b,c){b=a.extend({easing:"swing",duration:300},b,c);if(!b.toHide.size()){b.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},b);return}if(!b.toShow.size()){b.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},b);return}var d=b.toShow.css("overflow"),e=0,f={},g={},h=["height","paddingTop","paddingBottom"],i,j=b.toShow;i=j[0].style.width,j.width(j.parent().width()-parseFloat(j.css("paddingLeft"))-parseFloat(j.css("paddingRight"))-(parseFloat(j.css("borderLeftWidth"))||0)-(parseFloat(j.css("borderRightWidth"))||0)),a.each(h,function(c,d){g[d]="hide";var e=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);f[d]={value:e[1],unit:e[2]||"px"}}),b.toShow.css({height:0,overflow:"hidden"}).show(),b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g,{step:function(a,c){c.prop=="height"&amp;&amp;(e=c.end-c.start===0?0:(c.now-c.start)/(c.end-c.start)),b.toShow[0].style[c.prop]=e*f[c.prop].value+f[c.prop].unit},duration:b.duration,easing:b.easing,complete:function(){b.autoHeight||b.toShow.css("height",""),b.toShow.css({width:i,overflow:d}),b.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.autocomplete.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.isMultiLine=this.element.is("textarea"),this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.propAttr("readOnly"))return;d=!1;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._keyEvent("previous",c);break;case e.DOWN:b._keyEvent("next",c);break;case e.ENTER:case e.NUMPAD_ENTER:b.menu.active&amp;&amp;(d=!0,c.preventDefault());case e.TAB:if(!b.menu.active)return;b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term),b.close(c);break;default:clearTimeout(b.searching),b.searching=setTimeout(function(){b.term!=b.element.val()&amp;&amp;(b.selectedItem=null,b.search(null,c))},b.options.delay)}}).bind("keypress.autocomplete",function(a){d&amp;&amp;(d=!1,a.preventDefault())}).bind("focus.autocomplete",function(){if(b.options.disabled)return;b.selectedItem=null,b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled)return;clearTimeout(b.searching),b.closing=setTimeout(function(){b.close(a),b._change(a)},150)}),this._initSource(),this.menu=a("&lt;ul&gt;&lt;/ul&gt;").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];a(c.target).closest(".ui-menu-item").length||setTimeout(function(){a(document).one("mousedown",function(c){c.target!==b.element[0]&amp;&amp;c.target!==d&amp;&amp;!a.ui.contains(d,c.target)&amp;&amp;b.close()})},1),setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");!1!==b._trigger("focus",a,{item:d})&amp;&amp;/^key/.test(a.originalEvent.type)&amp;&amp;b.element.val(d.value)},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;b.element[0]!==c.activeElement&amp;&amp;(b.element.focus(),b.previous=f,setTimeout(function(){b.previous=f,b.selectedItem=e},1)),!1!==b._trigger("select",a,{item:e})&amp;&amp;b.element.val(e.value),b.term=b.element.val(),b.close(a),b.selectedItem=e},blur:function(a,c){b.menu.element.is(":visible")&amp;&amp;b.element.val()!==b.term&amp;&amp;b.element.val(b.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),a.fn.bgiframe&amp;&amp;this.menu.element.bgiframe(),b.beforeunloadHandler=function(){b.element.removeAttr("autocomplete")},a(window).bind("beforeunload",b.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),a(window).unbind("beforeunload",this.beforeunloadHandler),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments),b==="source"&amp;&amp;this._initSource(),b==="appendTo"&amp;&amp;this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0]),b==="disabled"&amp;&amp;c&amp;&amp;this.xhr&amp;&amp;this.xhr.abort()},_initSource:function(){var b=this,c,d;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,b.term))}):typeof this.options.source=="string"?(d=this.options.source,this.source=function(c,e){b.xhr&amp;&amp;b.xhr.abort(),b.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a,b){e(a)},error:function(){e([])}})}):this.source=this.options.source},search:function(a,b){a=a!=null?a:this.element.val(),this.term=this.element.val();if(a.length&lt;this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)===!1)return;return this._search(a)},_search:function(a){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:a},this._response())},_response:function(){var a=this,b=++c;return function(d){b===c&amp;&amp;a.__response(d),a.pending--,a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){!this.options.disabled&amp;&amp;a&amp;&amp;a.length?(a=this._normalize(a),this._suggest(a),this._trigger("open")):this.close()},close:function(a){clearTimeout(this.closing),this.menu.element.is(":visible")&amp;&amp;(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",a))},_change:function(a){this.previous!==this.element.val()&amp;&amp;this._trigger("change",a,{item:this.selectedItem})},_normalize:function(b){return b.length&amp;&amp;b[0].label&amp;&amp;b[0].value?b:a.map(b,function(b){return typeof b=="string"?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b),this.menu.deactivate(),this.menu.refresh(),c.show(),this._resizeMenu(),c.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&amp;&amp;this.menu.next(new a.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("&lt;li&gt;&lt;/li&gt;").data("item.autocomplete",c).append(a("&lt;a&gt;&lt;/a&gt;").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&amp;&amp;/^previous/.test(a)||this.menu.last()&amp;&amp;/^next/.test(a)){this.element.val(this.term),this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}}),a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&amp;")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery),function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length)return;c.preventDefault(),b.select(c)}),this.refresh()},refresh:function(){var b=this,c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();c&lt;0?this.element.scrollTop(d+c):c&gt;=e&amp;&amp;this.element.scrollTop(d+c-e+b.height())}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active)return;this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&amp;&amp;!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&amp;&amp;!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);d.length?this.activate(c,d):this.activate(c,this.element.children(b))},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b&lt;10&amp;&amp;b&gt;-10});e.length||(e=this.element.children(".ui-menu-item:last")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b&lt;10&amp;&amp;b&gt;-10});e.length||(e=this.element.children(".ui-menu-item:first")),this.activate(b,e)}else this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()&lt;this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})}(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.button.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);return c&amp;&amp;(d?e=a(d).find("[name='"+c+"']"):e=a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",j),typeof this.options.disabled!="boolean"?this.options.disabled=!!this.element.propAttr("disabled"):this.element.propAttr("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,i=this.type==="checkbox"||this.type==="radio",l="ui-state-hover"+(i?"":" ui-state-active"),m="ui-state-focus";h.label===null&amp;&amp;(h.label=this.buttonElement.html()),this.buttonElement.addClass(g).attr("role","button").bind("mouseenter.button",function(){if(h.disabled)return;a(this).addClass("ui-state-hover"),this===c&amp;&amp;a(this).addClass("ui-state-active")}).bind("mouseleave.button",function(){if(h.disabled)return;a(this).removeClass(l)}).bind("click.button",function(a){h.disabled&amp;&amp;(a.preventDefault(),a.stopImmediatePropagation())}),this.element.bind("focus.button",function(){b.buttonElement.addClass(m)}).bind("blur.button",function(){b.buttonElement.removeClass(m)}),i&amp;&amp;(this.element.bind("change.button",function(){if(f)return;b.refresh()}),this.buttonElement.bind("mousedown.button",function(a){if(h.disabled)return;f=!1,d=a.pageX,e=a.pageY}).bind("mouseup.button",function(a){if(h.disabled)return;if(d!==a.pageX||e!==a.pageY)f=!0})),this.type==="checkbox"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).toggleClass("ui-state-active"),b.buttonElement.attr("aria-pressed",b.element[0].checked)}):this.type==="radio"?this.buttonElement.bind("click.button",function(){if(h.disabled||f)return!1;a(this).addClass("ui-state-active"),b.buttonElement.attr("aria-pressed","true");var c=b.element[0];k(c).not(c).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){if(h.disabled)return!1;a(this).addClass("ui-state-active"),c=this,a(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(h.disabled)return!1;a(this).removeClass("ui-state-active")}).bind("keydown.button",function(b){if(h.disabled)return!1;(b.keyCode==a.ui.keyCode.SPACE||b.keyCode==a.ui.keyCode.ENTER)&amp;&amp;a(this).addClass("ui-state-active")}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&amp;&amp;this.buttonElement.keyup(function(b){b.keyCode===a.ui.keyCode.SPACE&amp;&amp;a(this).click()})),this._setOption("disabled",h.disabled),this._resetButton()},_determineButtonType:function(){this.element.is(":checkbox")?this.type="checkbox":this.element.is(":radio")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";if(this.type==="checkbox"||this.type==="radio"){var a=this.element.parents().filter(":last"),b="label[for='"+this.element.attr("id")+"']";this.buttonElement=a.find(b),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(b),this.buttonElement.length||(this.buttonElement=a.find(b))),this.element.addClass("ui-helper-hidden-accessible");var c=this.element.is(":checked");c&amp;&amp;this.buttonElement.addClass("ui-state-active"),this.buttonElement.attr("aria-pressed",c)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(g+" "+h+" "+i).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title"),a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled"){c?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1);return}this._resetButton()},refresh:function(){var b=this.element.is(":disabled");b!==this.options.disabled&amp;&amp;this._setOption("disabled",b),this.type==="radio"?k(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):this.type==="checkbox"&amp;&amp;(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if(this.type==="input"){this.options.label&amp;&amp;this.element.val(this.options.label);return}var b=this.buttonElement.removeClass(i),c=a("&lt;span&gt;&lt;/span&gt;",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&amp;&amp;d.secondary,f=[];d.primary||d.secondary?(this.options.text&amp;&amp;f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary")),d.primary&amp;&amp;b.prepend("&lt;span class='ui-button-icon-primary ui-icon "+d.primary+"'&gt;&lt;/span&gt;"),d.secondary&amp;&amp;b.append("&lt;span class='ui-button-icon-secondary ui-icon "+d.secondary+"'&gt;&lt;/span&gt;"),this.options.text||(f.push(e?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||b.attr("title",c))):f.push("ui-button-text-only"),b.addClass(f.join(" "))}}),a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){b==="disabled"&amp;&amp;this.buttons.button("option",b,c),a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var b=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(b?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),a.Widget.prototype.destroy.call(this)}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.dialog.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c="ui-dialog ui-widget ui-widget-content ui-corner-all ",d={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},f=a.attrFn||{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0,click:!0};a.widget("ui.dialog",{options:{autoOpen:!0,buttons:{},closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:!1,maxWidth:!1,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;c&lt;0&amp;&amp;a(this).css("top",b.top-c)}},resizable:!0,show:null,stack:!0,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title"),typeof this.originalTitle!="string"&amp;&amp;(this.originalTitle=""),this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||"&amp;#160;",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("&lt;div&gt;&lt;/div&gt;")).appendTo(document.body).hide().addClass(c+d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(c){d.closeOnEscape&amp;&amp;!c.isDefaultPrevented()&amp;&amp;c.keyCode&amp;&amp;c.keyCode===a.ui.keyCode.ESCAPE&amp;&amp;(b.close(c),c.preventDefault())}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(!1,a)}),h=b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("&lt;div&gt;&lt;/div&gt;")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),j=a('&lt;a href="#"&gt;&lt;/a&gt;').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(a){return b.close(a),!1}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("&lt;span&gt;&lt;/span&gt;")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j),l=a("&lt;span&gt;&lt;/span&gt;").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);a.isFunction(d.beforeclose)&amp;&amp;!a.isFunction(d.beforeClose)&amp;&amp;(d.beforeClose=d.beforeclose),i.find("*").add(i).disableSelection(),d.draggable&amp;&amp;a.fn.draggable&amp;&amp;b._makeDraggable(),d.resizable&amp;&amp;a.fn.resizable&amp;&amp;b._makeResizable(),b._createButtons(d.buttons),b._isOpen=!1,a.fn.bgiframe&amp;&amp;g.bgiframe()},_init:function(){this.options.autoOpen&amp;&amp;this.open()},destroy:function(){var a=this;return a.overlay&amp;&amp;a.overlay.destroy(),a.uiDialog.hide(),a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),a.uiDialog.remove(),a.originalTitle&amp;&amp;a.element.attr("title",a.originalTitle),a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(!1===c._trigger("beforeClose",b))return;return c.overlay&amp;&amp;c.overlay.destroy(),c.uiDialog.unbind("keypress.ui-dialog"),c._isOpen=!1,c.options.hide?c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)}):(c.uiDialog.hide(),c._trigger("close",b)),a.ui.dialog.overlay.resize(),c.options.modal&amp;&amp;(d=0,a(".ui-dialog").each(function(){this!==c.uiDialog[0]&amp;&amp;(e=a(this).css("z-index"),isNaN(e)||(d=Math.max(d,e)))}),a.ui.dialog.maxZ=d),c},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;return e.modal&amp;&amp;!b||!e.stack&amp;&amp;!e.modal?d._trigger("focus",c):(e.zIndex&gt;a.ui.dialog.maxZ&amp;&amp;(a.ui.dialog.maxZ=e.zIndex),d.overlay&amp;&amp;(a.ui.dialog.maxZ+=1,d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)),f={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()},a.ui.dialog.maxZ+=1,d.uiDialog.css("z-index",a.ui.dialog.maxZ),d.element.attr(f),d._trigger("focus",c),d)},open:function(){if(this._isOpen)return;var b=this,c=b.options,d=b.uiDialog;return b.overlay=c.modal?new a.ui.dialog.overlay(b):null,b._size(),b._position(c.position),d.show(c.show),b.moveToTop(!0),c.modal&amp;&amp;d.bind("keydown.ui-dialog",function(b){if(b.keyCode!==a.ui.keyCode.TAB)return;var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&amp;&amp;!b.shiftKey)return d.focus(1),!1;if(b.target===d[0]&amp;&amp;b.shiftKey)return e.focus(1),!1}),a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(),b._isOpen=!0,b._trigger("open"),b},_createButtons:function(b){var c=this,d=!1,e=a("&lt;div&gt;&lt;/div&gt;").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=a("&lt;div&gt;&lt;/div&gt;").addClass("ui-dialog-buttonset").appendTo(e);c.uiDialog.find(".ui-dialog-buttonpane").remove(),typeof b=="object"&amp;&amp;b!==null&amp;&amp;a.each(b,function(){return!(d=!0)}),d&amp;&amp;(a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a('&lt;button type="button"&gt;&lt;/button&gt;').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(g);a.each(d,function(a,b){if(a==="click")return;a in f?e[a](b):e.attr(a,b)}),a.fn.button&amp;&amp;e.button()}),e.appendTo(c.uiDialog))},_makeDraggable:function(){function f(a){return{position:a.position,offset:a.offset}}var b=this,c=b.options,d=a(document),e;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){e=c.height==="auto"?"auto":a(this).height(),a(this).height(a(this).height()).addClass("ui-dialog-dragging"),b._trigger("dragStart",d,f(g))},drag:function(a,c){b._trigger("drag",a,f(c))},stop:function(g,h){c.position=[h.position.left-d.scrollLeft(),h.position.top-d.scrollTop()],a(this).removeClass("ui-dialog-dragging").height(e),b._trigger("dragStop",g,f(h)),a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function h(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var d=this,e=d.options,f=d.uiDialog.css("position"),g=typeof c=="string"?c:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:g,start:function(b,c){a(this).addClass("ui-dialog-resizing"),d._trigger("resizeStart",b,h(c))},resize:function(a,b){d._trigger("resize",a,h(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing"),e.height=a(this).height(),e.width=a(this).width(),d._trigger("resizeStop",b,h(c)),a.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b=="string"||typeof b=="object"&amp;&amp;"0"in b)c=b.split?b.split(" "):[b[0],b[1]],c.length===1&amp;&amp;(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&amp;&amp;(d[a]=c[a],c[a]=b)}),b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog.prototype.options.position;e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b)),e||this.uiDialog.hide()},_setOptions:function(b){var c=this,f={},g=!1;a.each(b,function(a,b){c._setOption(a,b),a in d&amp;&amp;(g=!0),a in e&amp;&amp;(f[a]=b)}),g&amp;&amp;this._size(),this.uiDialog.is(":data(resizable)")&amp;&amp;this.uiDialog.resizable("option",f)},_setOption:function(b,d){var e=this,f=e.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":e._createButtons(d);break;case"closeText":e.uiDialogTitlebarCloseText.text(""+d);break;case"dialogClass":f.removeClass(e.options.dialogClass).addClass(c+d);break;case"disabled":d?f.addClass("ui-dialog-disabled"):f.removeClass("ui-dialog-disabled");break;case"draggable":var g=f.is(":data(draggable)");g&amp;&amp;!d&amp;&amp;f.draggable("destroy"),!g&amp;&amp;d&amp;&amp;e._makeDraggable();break;case"position":e._position(d);break;case"resizable":var h=f.is(":data(resizable)");h&amp;&amp;!d&amp;&amp;f.resizable("destroy"),h&amp;&amp;typeof d=="string"&amp;&amp;f.resizable("option","handles",d),!h&amp;&amp;d!==!1&amp;&amp;e._makeResizable(d);break;case"title":a(".ui-dialog-title",e.uiDialogTitlebar).html(""+(d||"&amp;#160;"))}a.Widget.prototype._setOption.apply(e,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0}),b.minWidth&gt;b.width&amp;&amp;(b.width=b.minWidth),c=this.uiDialog.css({height:"auto",width:b.width}).height(),d=Math.max(0,b.minHeight-c);if(b.height==="auto")if(a.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();var f=this.element.css("height","auto").height();e||this.uiDialog.hide(),this.element.height(Math.max(f,d))}else this.element.height(Math.max(b.height-c,0));this.uiDialog.is(":data(resizable)")&amp;&amp;this.uiDialog.resizable("option","minHeight",this._minHeight())}}),a.extend(a.ui.dialog,{version:"1.8.22",uuid:0,maxZ:0,getTitleId:function(a){var b=a.attr("id");return b||(this.uuid+=1,b=this.uuid),"ui-dialog-title-"+b},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}}),a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){this.instances.length===0&amp;&amp;(setTimeout(function(){a.ui.dialog.overlay.instances.length&amp;&amp;a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()&lt;a.ui.dialog.overlay.maxZ)return!1})},1),a(document).bind("keydown.dialog-overlay",function(c){b.options.closeOnEscape&amp;&amp;!c.isDefaultPrevented()&amp;&amp;c.keyCode&amp;&amp;c.keyCode===a.ui.keyCode.ESCAPE&amp;&amp;(b.close(c),c.preventDefault())}),a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize));var c=(this.oldInstances.pop()||a("&lt;div&gt;&lt;/div&gt;").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return a.fn.bgiframe&amp;&amp;c.bgiframe(),this.instances.push(c),c},destroy:function(b){var c=a.inArray(b,this.instances);c!=-1&amp;&amp;this.oldInstances.push(this.instances.splice(c,1)[0]),this.instances.length===0&amp;&amp;a([document,window]).unbind(".dialog-overlay"),b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))}),this.maxZ=d},height:function(){var b,c;return a.browser.msie&amp;&amp;a.browser.version&lt;7?(b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),b&lt;c?a(window).height()+"px":b+"px"):a(document).height()+"px"},width:function(){var b,c;return a.browser.msie?(b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),b&lt;c?a(window).width()+"px":b+"px"):a(document).width()+"px"},resize:function(){var b=a([]);a.each(a.ui.dialog.overlay.instances,function(){b=b.add(this)}),b.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}}),a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.slider.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="&lt;a class='ui-slider-handle ui-state-default ui-corner-all' href='#'&gt;&lt;/a&gt;",g=d.values&amp;&amp;d.values.length||1,h=[];this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":"")),this.range=a([]),d.range&amp;&amp;(d.range===!0&amp;&amp;(d.values||(d.values=[this._valueMin(),this._valueMin()]),d.values.length&amp;&amp;d.values.length!==2&amp;&amp;(d.values=[d.values[0],d.values[0]])),this.range=a("&lt;div&gt;&lt;/div&gt;").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:"")));for(var i=e.length;i&lt;g;i+=1)h.push(f);this.handles=e.add(a(h.join("")).appendTo(b.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){d.disabled||a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){d.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")}),this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)}),this.handles.keydown(function(d){var e=a(this).data("index.ui-slider-handle"),f,g,h,i;if(b.options.disabled)return;switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:d.preventDefault();if(!b._keySliding){b._keySliding=!0,a(this).addClass("ui-state-active"),f=b._start(d,e);if(f===!1)return}}i=b.options.step,b.options.values&amp;&amp;b.options.values.length?g=h=b.values(e):g=h=b.value();switch(d.keyCode){case a.ui.keyCode.HOME:h=b._valueMin();break;case a.ui.keyCode.END:h=b._valueMax();break;case a.ui.keyCode.PAGE_UP:h=b._trimAlignValue(g+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:h=b._trimAlignValue(g-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g===b._valueMax())return;h=b._trimAlignValue(g+i);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g===b._valueMin())return;h=b._trimAlignValue(g-i)}b._slide(d,e,h)}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");b._keySliding&amp;&amp;(b._keySliding=!1,b._stop(c,d),b._change(c,d),a(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){return this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"),this._mouseDestroy(),this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),d={x:b.pageX,y:b.pageY},e=this._normValueFromMouse(d),f=this._valueMax()-this._valueMin()+1,h=this,this.handles.each(function(b){var c=Math.abs(e-h.values(b));f&gt;c&amp;&amp;(f=c,g=a(this),i=b)}),c.range===!0&amp;&amp;this.values(1)===c.min&amp;&amp;(i+=1,g=a(this.handles[i])),j=this._start(b,i),j===!1?!1:(this._mouseSliding=!0,h._handleIndex=i,g.addClass("ui-state-active").focus(),k=g.offset(),l=!a(b.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(b,i,e),this._animateOff=!0,!0))},_mouseStart:function(a){return!0},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);return this._slide(a,this._handleIndex,c),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;return this.orientation==="horizontal"?(b=this.elementSize.width,c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(b=this.elementSize.height,c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),d=c/b,d&gt;1&amp;&amp;(d=1),d&lt;0&amp;&amp;(d=0),this.orientation==="vertical"&amp;&amp;(d=1-d),e=this._valueMax()-this._valueMin(),f=this._valueMin()+d*e,this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};return this.options.values&amp;&amp;this.options.values.length&amp;&amp;(c.value=this.values(b),c.values=this.values()),this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;this.options.values&amp;&amp;this.options.values.length?(d=this.values(b?0:1),this.options.values.length===2&amp;&amp;this.options.range===!0&amp;&amp;(b===0&amp;&amp;c&gt;d||b===1&amp;&amp;c&lt;d)&amp;&amp;(c=d),c!==this.values(b)&amp;&amp;(e=this.values(),e[b]=c,f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e}),d=this.values(b?0:1),f!==!1&amp;&amp;this.values(b,c,!0))):c!==this.value()&amp;&amp;(f=this._trigger("slide",a,{handle:this.handles[b],value:c}),f!==!1&amp;&amp;this.value(c))},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};this.options.values&amp;&amp;this.options.values.length&amp;&amp;(c.value=this.values(b),c.values=this.values()),this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&amp;&amp;!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};this.options.values&amp;&amp;this.options.values.length&amp;&amp;(c.value=this.values(b),c.values=this.values()),this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);return}return this._value()},values:function(b,c){var d,e,f;if(arguments.length&gt;1){this.options.values[b]=this._trimAlignValue(c),this._refreshValue(),this._change(null,b);return}if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&amp;&amp;this.options.values.length?this._values(b):this.value();d=this.options.values,e=arguments[0];for(f=0;f&lt;d.length;f+=1)d[f]=this._trimAlignValue(e[f]),this._change(null,f);this._refreshValue()},_setOption:function(b,c){var d,e=0;a.isArray(this.options.values)&amp;&amp;(e=this.options.values.length),a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":c?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),this.element.removeClass("ui-disabled"));break;case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":this._animateOff=!0,this._refreshValue();for(d=0;d&lt;e;d+=1)this._change(null,d);this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a),a},_values:function(a){var b,c,d;if(arguments.length)return b=this.options.values[a],b=this._trimAlignValue(b),b;c=this.options.values.slice();for(d=0;d&lt;c.length;d+=1)c[d]=this._trimAlignValue(c[d]);return c},_trimAlignValue:function(a){if(a&lt;=this._valueMin())return this._valueMin();if(a&gt;=this._valueMax())return this._valueMax();var b=this.options.step&gt;0?this.options.step:1,c=(a-this._valueMin())%b,d=a-c;return Math.abs(c)*2&gt;=b&amp;&amp;(d+=c&gt;0?b:-b),parseFloat(d.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=this._animateOff?!1:c.animate,f,g={},h,i,j,k;this.options.values&amp;&amp;this.options.values.length?this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",a(this).stop(1,1)[e?"animate":"css"](g,c.animate),d.options.range===!0&amp;&amp;(d.orientation==="horizontal"?(b===0&amp;&amp;d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate),b===1&amp;&amp;d.range[e?"animate":"css"]({width:f-h+"%"},{queue:!1,duration:c.animate})):(b===0&amp;&amp;d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate),b===1&amp;&amp;d.range[e?"animate":"css"]({height:f-h+"%"},{queue:!1,duration:c.animate}))),h=f}):(i=this.value(),j=this._valueMin(),k=this._valueMax(),f=k!==j?(i-j)/(k-j)*100:0,g[d.orientation==="horizontal"?"left":"bottom"]=f+"%",this.handle.stop(1,1)[e?"animate":"css"](g,c.animate),b==="min"&amp;&amp;this.orientation==="horizontal"&amp;&amp;this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate),b==="max"&amp;&amp;this.orientation==="horizontal"&amp;&amp;this.range[e?"animate":"css"]({width:100-f+"%"},{queue:!1,duration:c.animate}),b==="min"&amp;&amp;this.orientation==="vertical"&amp;&amp;this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate),b==="max"&amp;&amp;this.orientation==="vertical"&amp;&amp;this.range[e?"animate":"css"]({height:100-f+"%"},{queue:!1,duration:c.animate}))}}),a.extend(a.ui.slider,{version:"1.8.22"})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.tabs.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:!1,cookie:null,collapsible:!1,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"&lt;div&gt;&lt;/div&gt;",remove:null,select:null,show:null,spinner:"&lt;em&gt;Loading&amp;#8230;&lt;/em&gt;",tabTemplate:"&lt;li&gt;&lt;a href='#{href}'&gt;&lt;span&gt;#{label}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;"},_create:function(){this._tabify(!0)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&amp;&amp;b==this.options.selected)return;this.select(b)}else this.options[a]=b,this._tabify()},_tabId:function(a){return a.title&amp;&amp;a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display",""),!a.support.opacity&amp;&amp;c.opacity&amp;&amp;b[0].style.removeAttribute("filter")}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=a(" &gt; li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return a("a",this)[0]}),this.panels=a([]),this.anchors.each(function(b,c){var g=a(c).attr("href"),h=g.split("#")[0],i;h&amp;&amp;(h===location.toString().split("#")[0]||(i=a("base")[0])&amp;&amp;h===i.href)&amp;&amp;(g=c.hash,c.href=g);if(f.test(g))d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)));else if(g&amp;&amp;g!=="#"){a.data(c,"href.tabs",g),a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);k.length||(k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list),k.data("destroy.tabs",!0)),d.panels=d.panels.add(k)}else e.disabled.push(b)}),c?(this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"),this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.lis.addClass("ui-state-default ui-corner-top"),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"),e.selected===b?(location.hash&amp;&amp;this.anchors.each(function(a,b){if(b.hash==location.hash)return e.selected=a,!1}),typeof e.selected!="number"&amp;&amp;e.cookie&amp;&amp;(e.selected=parseInt(d._cookie(),10)),typeof e.selected!="number"&amp;&amp;this.lis.filter(".ui-tabs-selected").length&amp;&amp;(e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),e.selected=e.selected||(this.lis.length?0:-1)):e.selected===null&amp;&amp;(e.selected=-1),e.selected=e.selected&gt;=0&amp;&amp;this.anchors[e.selected]||e.selected&lt;0?e.selected:0,e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort(),a.inArray(e.selected,e.disabled)!=-1&amp;&amp;e.disabled.splice(a.inArray(e.selected,e.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),e.selected&gt;=0&amp;&amp;this.anchors.length&amp;&amp;(d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"),d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))}),this.load(e.selected)),a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs"),d.lis=d.anchors=d.panels=null})):e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),e.cookie&amp;&amp;this._cookie(e.selected,e.cookie);for(var g=0,h;h=this.lis[g];g++)a(h)[a.inArray(g,e.disabled)!=-1&amp;&amp;!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");e.cache===!1&amp;&amp;this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){b.is(":not(.ui-state-disabled)")&amp;&amp;b.addClass("ui-state-"+a)},j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))}),this.lis.bind("mouseout.tabs",function(){j("hover",a(this))}),this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;e.fx&amp;&amp;(a.isArray(e.fx)?(k=e.fx[0],l=e.fx[1]):k=l=e.fx);var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l),d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),d._trigger("show",null,d._ui(b,c[0]))},o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),m(b,k),d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active"),b.addClass("ui-tabs-hide"),d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&amp;&amp;!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===!1)return this.blur(),!1;e.selected=d.anchors.index(this),d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected"))return e.selected=-1,e.cookie&amp;&amp;d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs"),this.blur(),!1;if(!f.length)return e.cookie&amp;&amp;d._cookie(e.selected,e.cookie),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this)),this.blur(),!1}e.cookie&amp;&amp;d._cookie(e.selected,e.cookie);if(g.length)f.length&amp;&amp;d.element.queue("tabs",function(){o(b,f)}),d.element.queue("tabs",function(){n(b,g)}),d.load(d.anchors.index(this));else throw"jQuery UI Tabs: Mismatching fragment identifier.";a.browser.msie&amp;&amp;this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(a){return typeof a=="string"&amp;&amp;(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},destroy:function(){var b=this.options;return this.abort(),this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"),this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"),this.anchors.each(function(){var b=a.data(this,"href.tabs");b&amp;&amp;(this.href=b);var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){a.data(this,"destroy.tabs")?a(this).remove():a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),b.cookie&amp;&amp;this._cookie(null,b.cookie),this},add:function(c,d,e){e===b&amp;&amp;(e=this.anchors.length);var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=c.indexOf("#")?this._tabId(a("a",h)[0]):c.replace("#","");h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var j=f.element.find("#"+i);return j.length||(j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",!0)),j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),e&gt;=this.lis.length?(h.appendTo(this.list),j.appendTo(this.list[0].parentNode)):(h.insertBefore(this.lis[e]),j.insertBefore(this.panels[e])),g.disabled=a.map(g.disabled,function(a,b){return a&gt;=e?++a:a}),this._tabify(),this.anchors.length==1&amp;&amp;(g.selected=0,h.addClass("ui-tabs-selected ui-state-active"),j.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[e],this.panels[e])),this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();return d.hasClass("ui-tabs-selected")&amp;&amp;this.anchors.length&gt;1&amp;&amp;this.select(b+(b+1&lt;this.anchors.length?1:-1)),c.disabled=a.map(a.grep(c.disabled,function(a,c){return a!=b}),function(a,c){return a&gt;=b?--a:a}),this._tabify(),this._trigger("remove",null,this._ui(d.find("a")[0],e[0])),this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1)return;return this.lis.eq(b).removeClass("ui-state-disabled"),c.disabled=a.grep(c.disabled,function(a,c){return a!=b}),this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b])),this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;return a!=c.selected&amp;&amp;(this.lis.eq(a).addClass("ui-state-disabled"),c.disabled.push(a),c.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))),this},select:function(a){a=this._getIndex(a);if(a==-1)if(this.options.collapsible&amp;&amp;this.options.selected!=-1)a=this.options.selected;else return this;return this.anchors.eq(a).trigger(this.options.event+".tabs"),this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&amp;&amp;a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}return this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f),c._cleanup(),d.cache&amp;&amp;a.data(e,"cache.tabs",!0),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup(),c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}})),c.element.dequeue("tabs"),this},abort:function(){return this.element.queue([]),this.panels.stop(!1,!0),this.element.queue("tabs",this.element.queue("tabs").splice(-2,2)),this.xhr&amp;&amp;(this.xhr.abort(),delete this.xhr),this._cleanup(),this},url:function(a,b){return this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b),this},length:function(){return this.anchors.length}}),a.extend(a.ui.tabs,{version:"1.8.22"}),a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options,e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation),c.rotation=setTimeout(function(){var a=d.selected;c.select(++a&lt;c.anchors.length?a:0)},a),b&amp;&amp;b.stopPropagation()}),f=c._unrotate||(c._unrotate=b?function(a){e()}:function(a){a.clientX&amp;&amp;c.rotate(null)});return a?(this.element.bind("tabsshow",e),this.anchors.bind(d.event+".tabs",f),e()):(clearTimeout(c.rotation),this.element.unbind("tabsshow",e),this.anchors.unbind(d.event+".tabs",f),delete this._rotate,delete this._unrotate),this}})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.datepicker.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('&lt;div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"&gt;&lt;/div&gt;'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length)return;c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length)return;d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d.addClass("ui-state-hover"),d.hasClass("ui-datepicker-prev")&amp;&amp;d.addClass("ui-datepicker-prev-hover"),d.hasClass("ui-datepicker-next")&amp;&amp;d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&amp;&amp;($.browser.safari&amp;&amp;typeof a=="object"&amp;&amp;a.length||a.constructor&amp;&amp;a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.22"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&amp;&amp;console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return extendRemove(this._defaults,a||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline=nodeName=="div"||nodeName=="span";target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),nodeName=="input"?this._connectDatepicker(target,inst):inline&amp;&amp;this._inlineDatepicker(target,inst)},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?bindHover($('&lt;div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"&gt;&lt;/div&gt;')):this.dpDiv}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]),b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),$.data(a,PROP_NAME,b),b.settings.disabled&amp;&amp;this._disableDatepicker(a)},_attachments:function(a,b){var c=this._get(b,"appendText"),d=this._get(b,"isRTL");b.append&amp;&amp;b.append.remove(),c&amp;&amp;(b.append=$('&lt;span class="'+this._appendClass+'"&gt;'+c+"&lt;/span&gt;"),a[d?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&amp;&amp;b.trigger.remove();var e=this._get(b,"showOn");(e=="focus"||e=="both")&amp;&amp;a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText"),g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("&lt;img/&gt;").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('&lt;button type="button"&gt;&lt;/button&gt;').addClass(this._triggerClass).html(g==""?f:$("&lt;img/&gt;").attr({src:g,alt:f,title:f}))),a[d?"before":"after"](b.trigger),b.trigger.click(function(){return $.datepicker._datepickerShowing&amp;&amp;$.datepicker._lastInput==a[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&amp;&amp;$.datepicker._lastInput!=a[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(a[0])):$.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&amp;&amp;!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0,c=0;for(var d=0;d&lt;a.length;d++)a[d].length&gt;b&amp;&amp;(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),$.data(a,PROP_NAME,b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),b.settings.disabled&amp;&amp;this._disableDatepicker(a),b.dpDiv.css("display","block")},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('&lt;input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px;"/&gt;'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),f=this._dialogInst=this._newInst(this._dialogInput,!1),f.settings={},$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{}),b=b&amp;&amp;b.constructor==Date?this._formatDate(f,b):b,this._dialogInput.val(b),this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth,i=document.documentElement.clientHeight,j=document.documentElement.scrollLeft||document.body.scrollLeft,k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),f.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&amp;&amp;$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,f),this},_destroyDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME),d=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(d=="div"||d=="span")&amp;&amp;b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a),c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName))return;var d=a.nodeName.toLowerCase();if(d=="input")a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled"),e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b&lt;this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return!0;return!1},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(arguments.length==2&amp;&amp;typeof b=="string")return b=="defaults"?$.extend({},$.datepicker._defaults):d?b=="all"?$.extend({},d.settings):this._get(d,b):null;var e=b||{};typeof b=="string"&amp;&amp;(e={},e[b]=c);if(d){this._curInst==d&amp;&amp;this._hideDatepicker();var f=this._getDateDatepicker(a,!0),g=this._getMinMaxDate(d,"min"),h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e),g!==null&amp;&amp;e.dateFormat!==undefined&amp;&amp;e.minDate===undefined&amp;&amp;(d.settings.minDate=this._formatDate(d,g)),h!==null&amp;&amp;e.dateFormat!==undefined&amp;&amp;e.maxDate===undefined&amp;&amp;(d.settings.maxDate=this._formatDate(d,h)),this._attachments($(a),d),this._autoSize(d),this._setDate(d,f),this._updateAlternate(d),this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);b&amp;&amp;this._updateDatepicker(b)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&amp;&amp;(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=this._getInst(a);return c&amp;&amp;!c.inline&amp;&amp;this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target),c=!0,d=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=!0;if($.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._hideDatepicker(),c=!1;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);e[0]&amp;&amp;$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);var f=$.datepicker._get(b,"onSelect");if(f){var g=$.datepicker._formatDate(b);f.apply(b.input?b.input[0]:null,[g,b])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._clearDate(a.target),c=a.ctrlKey||a.metaKey;break;case 36:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._gotoToday(a.target),c=a.ctrlKey||a.metaKey;break;case 37:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._adjustDate(a.target,d?1:-1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&amp;&amp;$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._adjustDate(a.target,-7,"D"),c=a.ctrlKey||a.metaKey;break;case 39:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._adjustDate(a.target,d?-1:1,"D"),c=a.ctrlKey||a.metaKey,a.originalEvent.altKey&amp;&amp;$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:(a.ctrlKey||a.metaKey)&amp;&amp;$.datepicker._adjustDate(a.target,7,"D"),c=a.ctrlKey||a.metaKey;break;default:c=!1}else a.keyCode==36&amp;&amp;a.ctrlKey?$.datepicker._showDatepicker(this):c=!1;c&amp;&amp;(a.preventDefault(),a.stopPropagation())},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat")),d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d&lt;" "||!c||c.indexOf(d)&gt;-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal)try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));c&amp;&amp;($.datepicker._setDateFromField(b),$.datepicker._updateAlternate(b),$.datepicker._updateDatepicker(b))}catch(d){$.datepicker.log(d)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&amp;&amp;(a=$("input",a.parentNode)[0]);if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);$.datepicker._curInst&amp;&amp;$.datepicker._curInst!=b&amp;&amp;($.datepicker._curInst.dpDiv.stop(!0,!0),b&amp;&amp;$.datepicker._datepickerShowing&amp;&amp;$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var c=$.datepicker._get(b,"beforeShow"),d=c?c.apply(a,[a,b]):{};if(d===!1)return;extendRemove(b.settings,d),b.lastVal=null,$.datepicker._lastInput=a,$.datepicker._setDateFromField(b),$.datepicker._inDialog&amp;&amp;(a.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(a),$.datepicker._pos[1]+=a.offsetHeight);var e=!1;$(a).parents().each(function(){return e|=$(this).css("position")=="fixed",!e}),e&amp;&amp;$.browser.opera&amp;&amp;($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var f={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null,b.dpDiv.empty(),b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(b),f=$.datepicker._checkOffset(b,f,e),b.dpDiv.css({position:$.datepicker._inDialog&amp;&amp;$.blockUI?"static":e?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"});if(!b.inline){var g=$.datepicker._get(b,"showAnim"),h=$.datepicker._get(b,"duration"),i=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&amp;&amp;$.effects[g]?b.dpDiv.show(g,$.datepicker._get(b,"showOptions"),h,i):b.dpDiv[g||"show"](g?h:null,i),(!g||!h)&amp;&amp;i(),b.input.is(":visible")&amp;&amp;!b.input.is(":disabled")&amp;&amp;b.input.focus(),$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a,a.dpDiv.empty().append(this._generateHTML(a)),this._attachHandlers(a);var d=a.dpDiv.find("iframe.ui-datepicker-cover");!d.length||d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}),a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a),f=e[1],g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),f&gt;1&amp;&amp;a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em"),a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==$.datepicker._curInst&amp;&amp;$.datepicker._datepickerShowing&amp;&amp;a.input&amp;&amp;a.input.is(":visible")&amp;&amp;!a.input.is(":disabled")&amp;&amp;a.input[0]!=document.activeElement&amp;&amp;a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){h===a.yearshtml&amp;&amp;a.yearshtml&amp;&amp;a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth(),e=a.dpDiv.outerHeight(),f=a.input?a.input.outerWidth():0,g=a.input?a.input.outerHeight():0,h=document.documentElement.clientWidth+(c?0:$(document).scrollLeft()),i=document.documentElement.clientHeight+(c?0:$(document).scrollTop());return b.left-=this._get(a,"isRTL")?d-f:0,b.left-=c&amp;&amp;b.left==a.input.offset().left?$(document).scrollLeft():0,b.top-=c&amp;&amp;b.top==a.input.offset().top+g?$(document).scrollTop():0,b.left-=Math.min(b.left,b.left+d&gt;h&amp;&amp;h&gt;d?Math.abs(b.left+d-h):0),b.top-=Math.min(b.top,b.top+e&gt;i&amp;&amp;i&gt;e?Math.abs(e+g):0),b},_findPos:function(a){var b=this._getInst(a),c=this._get(b,"isRTL");while(a&amp;&amp;(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a)))a=a[c?"previousSibling":"nextSibling"];var d=$(a).offset();return[d.left,d.top]},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&amp;&amp;b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim"),d=this._get(b,"duration"),e=function(){$.datepicker._tidyDialog(b)};$.effects&amp;&amp;$.effects[c]?b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e):b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e),c||e(),this._datepickerShowing=!1;var f=this._get(b,"onClose");f&amp;&amp;f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._lastInput=null,this._inDialog&amp;&amp;(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&amp;&amp;($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target),c=$.datepicker._getInst(b[0]);(b[0].id!=$.datepicker._mainDivId&amp;&amp;b.parents("#"+$.datepicker._mainDivId).length==0&amp;&amp;!b.hasClass($.datepicker.markerClassName)&amp;&amp;!b.closest("."+$.datepicker._triggerClass).length&amp;&amp;$.datepicker._datepickerShowing&amp;&amp;(!$.datepicker._inDialog||!$.blockUI)||b.hasClass($.datepicker.markerClassName)&amp;&amp;$.datepicker._curInst!=c)&amp;&amp;$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a),e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0]))return;this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a),c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&amp;&amp;c.currentDay)c.selectedDay=c.currentDay,c.drawMonth=c.selectedMonth=c.currentMonth,c.drawYear=c.selectedYear=c.currentYear;else{var d=new Date;c.selectedDay=d.getDate(),c.drawMonth=c.selectedMonth=d.getMonth(),c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c),this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a),e=this._getInst(d[0]);e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(d)},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0]))return;var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a),c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a),d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d),d.input&amp;&amp;d.input.val(b),this._updateAlternate(d);var e=this._get(d,"onSelect");e?e.apply(d.input?d.input[0]:null,[b,d]):d.input&amp;&amp;d.input.trigger("change"),d.inline?this._updateDatepicker(d):(this._hideDatepicker(),this._lastInput=d.input[0],typeof d.input[0]!="object"&amp;&amp;d.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),d=this._getDate(a),e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b&gt;0&amp;&amp;b&lt;6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=-1,j=-1,k=-1,l=-1,m=!1,n=function(b){var c=s+1&lt;a.length&amp;&amp;a.charAt(s+1)==b;return c&amp;&amp;s++,c},o=function(a){var c=n(a),d=a=="@"?14:a=="!"?20:a=="y"&amp;&amp;c?4:a=="o"?3:2,e=new RegExp("^\\d{1,"+d+"}"),f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;return r+=f[0].length,parseInt(f[0],10)},p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)}),f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase())return f=c[0],r+=d.length,!1});if(f!=-1)return f+1;throw"Unknown name at position "+r},q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++},r=0;for(var s=0;s&lt;a.length;s++)if(m)a.charAt(s)=="'"&amp;&amp;!n("'")?m=!1:q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear(),j=t.getMonth()+1,k=t.getDate();break;case"'":n("'")?q():m=!0;break;default:q()}if(r&lt;b.length)throw"Extra/unparsed characters found in date: "+b.substring(r);i==-1?i=(new Date).getFullYear():i&lt;100&amp;&amp;(i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i&lt;=d?0:-100));if(l&gt;-1){j=1,k=l;do{var u=this._getDaysInMonth(i,j-1);if(k&lt;=u)break;j++,k-=u}while(!0)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,h=function(b){var c=m+1&lt;a.length&amp;&amp;a.charAt(m+1)==b;return c&amp;&amp;m++,c},i=function(a,b,c){var d=""+b;if(h(a))while(d.length&lt;c)d="0"+d;return d},j=function(a,b,c,d){return h(a)?d[b]:c[b]},k="",l=!1;if(b)for(var m=0;m&lt;a.length;m++)if(l)a.charAt(m)=="'"&amp;&amp;!h("'")?l=!1:k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100&lt;10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":h("'")?k+="'":l=!0;break;default:k+=a.charAt(m)}return k},_possibleChars:function(a){var b="",c=!1,d=function(b){var c=e+1&lt;a.length&amp;&amp;a.charAt(e+1)==b;return c&amp;&amp;e++,c};for(var e=0;e&lt;a.length;e++)if(c)a.charAt(e)=="'"&amp;&amp;!d("'")?c=!1:b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":d("'")?b+="'":c=!0;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()==a.lastVal)return;var c=this._get(a,"dateFormat"),d=a.lastVal=a.input?a.input.val():null,e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h),d=b?"":d}a.selectedDay=e.getDate(),a.drawMonth=a.selectedMonth=e.getMonth(),a.drawYear=a.selectedYear=e.getFullYear(),a.currentDay=d?e.getDate():0,a.currentMonth=d?e.getMonth():0,a.currentYear=d?e.getFullYear():0,this._adjustInstDate(a)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date,e=d.getFullYear(),f=d.getMonth(),g=d.getDate(),h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10),g=Math.min(g,$.datepicker._getDaysInMonth(e,f))}i=h.exec(b)}return new Date(e,f,g)},f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN(b)?c:d(b):new Date(b.getTime());return f=f&amp;&amp;f.toString()=="Invalid Date"?c:f,f&amp;&amp;(f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0)),this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){return a?(a.setHours(a.getHours()&gt;12?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear,g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth(),a.drawYear=a.selectedYear=a.currentYear=g.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&amp;&amp;!c&amp;&amp;this._notifyChange(a),this._adjustInstDate(a),a.input&amp;&amp;a.input.val(d?"":this._formatDate(a))},_getDate:function(a){var b=!a.currentYear||a.input&amp;&amp;a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_attachHandlers:function(a){var b=this._get(a,"stepMonths"),c="#"+a.id;a.dpDiv.find("[data-handler]").map(function(){var a={prev:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,-b,"M")},next:function(){window["DP_jQuery_"+dpuuid].datepicker._adjustDate(c,+b,"M")},hide:function(){window["DP_jQuery_"+dpuuid].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+dpuuid].datepicker._gotoToday(c)},selectDay:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectDay(c,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+dpuuid].datepicker._selectMonthYear(c,this,"Y"),!1}};$(this).bind(this.getAttribute("data-event"),a[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),d=this._get(a,"showButtonPanel"),e=this._get(a,"hideIfNoPrevNext"),f=this._get(a,"navigationAsDateFormat"),g=this._getNumberOfMonths(a),h=this._get(a,"showCurrentAtPos"),i=this._get(a,"stepMonths"),j=g[0]!=1||g[1]!=1,k=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),l=this._getMinMaxDate(a,"min"),m=this._getMinMaxDate(a,"max"),n=a.drawMonth-h,o=a.drawYear;n&lt;0&amp;&amp;(n+=12,o--);if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&amp;&amp;p&lt;l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))&gt;p)n--,n&lt;0&amp;&amp;(n=11,o--)}a.drawMonth=n,a.drawYear=o;var q=this._get(a,"prevText");q=f?this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a)):q;var r=this._canAdjustMonth(a,-1,o,n)?'&lt;a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click" title="'+q+'"&gt;&lt;span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'"&gt;'+q+"&lt;/span&gt;&lt;/a&gt;":e?"":'&lt;a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"&gt;&lt;span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'"&gt;'+q+"&lt;/span&gt;&lt;/a&gt;",s=this._get(a,"nextText");s=f?this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a)):s;var t=this._canAdjustMonth(a,1,o,n)?'&lt;a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click" title="'+s+'"&gt;&lt;span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'"&gt;'+s+"&lt;/span&gt;&lt;/a&gt;":e?"":'&lt;a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"&gt;&lt;span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'"&gt;'+s+"&lt;/span&gt;&lt;/a&gt;",u=this._get(a,"currentText"),v=this._get(a,"gotoCurrent")&amp;&amp;a.currentDay?k:b;u=f?this.formatDate(u,v,this._getFormatConfig(a)):u;var w=a.inline?"":'&lt;button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click"&gt;'+this._get(a,"closeText")+"&lt;/button&gt;",x=d?'&lt;div class="ui-datepicker-buttonpane ui-widget-content"&gt;'+(c?w:"")+(this._isInRange(a,v)?'&lt;button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click"&gt;'+u+"&lt;/button&gt;":"")+(c?"":w)+"&lt;/div&gt;":"",y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek"),A=this._get(a,"dayNames"),B=this._get(a,"dayNamesShort"),C=this._get(a,"dayNamesMin"),D=this._get(a,"monthNames"),E=this._get(a,"monthNamesShort"),F=this._get(a,"beforeShowDay"),G=this._get(a,"showOtherMonths"),H=this._get(a,"selectOtherMonths"),I=this._get(a,"calculateWeek")||this.iso8601Week,J=this._getDefaultDate(a),K="";for(var L=0;L&lt;g[0];L++){var M="";this.maxRows=4;for(var N=0;N&lt;g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay)),P=" ui-corner-all",Q="";if(j){Q+='&lt;div class="ui-datepicker-group';if(g[1]&gt;1)switch(N){case 0:Q+=" ui-datepicker-group-first",P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last",P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle",P=""}Q+='"&gt;'}Q+='&lt;div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'"&gt;'+(/all|left/.test(P)&amp;&amp;L==0?c?t:r:"")+(/all|right/.test(P)&amp;&amp;L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L&gt;0||N&gt;0,D,E)+'&lt;/div&gt;&lt;table class="ui-datepicker-calendar"&gt;&lt;thead&gt;'+"&lt;tr&gt;";var R=z?'&lt;th class="ui-datepicker-week-col"&gt;'+this._get(a,"weekHeader")+"&lt;/th&gt;":"";for(var S=0;S&lt;7;S++){var T=(S+y)%7;R+="&lt;th"+((S+y+6)%7&gt;=5?' class="ui-datepicker-week-end"':"")+"&gt;"+'&lt;span title="'+A[T]+'"&gt;'+C[T]+"&lt;/span&gt;&lt;/th&gt;"}Q+=R+"&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;";var U=this._getDaysInMonth(o,n);o==a.selectedYear&amp;&amp;n==a.selectedMonth&amp;&amp;(a.selectedDay=Math.min(a.selectedDay,U));var V=(this._getFirstDayOfMonth(o,n)-y+7)%7,W=Math.ceil((V+U)/7),X=j?this.maxRows&gt;W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z&lt;X;Z++){Q+="&lt;tr&gt;";var _=z?'&lt;td class="ui-datepicker-week-col"&gt;'+this._get(a,"calculateWeek")(Y)+"&lt;/td&gt;":"";for(var S=0;S&lt;7;S++){var ba=F?F.apply(a.input?a.input[0]:null,[Y]):[!0,""],bb=Y.getMonth()!=n,bc=bb&amp;&amp;!H||!ba[0]||l&amp;&amp;Y&lt;l||m&amp;&amp;Y&gt;m;_+='&lt;td class="'+((S+y+6)%7&gt;=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&amp;&amp;n==a.selectedMonth&amp;&amp;a._keyEvent||J.getTime()==Y.getTime()&amp;&amp;J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(bc?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&amp;&amp;!G?"":" "+ba[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&amp;&amp;ba[2]?' title="'+ba[2]+'"':"")+(bc?"":' data-handler="selectDay" data-event="click" data-month="'+Y.getMonth()+'" data-year="'+Y.getFullYear()+'"')+"&gt;"+(bb&amp;&amp;!G?"&amp;#xa0;":bc?'&lt;span class="ui-state-default"&gt;'+Y.getDate()+"&lt;/span&gt;":'&lt;a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#"&gt;'+Y.getDate()+"&lt;/a&gt;")+"&lt;/td&gt;",Y.setDate(Y.getDate()+1),Y=this._daylightSavingAdjust(Y)}Q+=_+"&lt;/tr&gt;"}n++,n&gt;11&amp;&amp;(n=0,o++),Q+="&lt;/tbody&gt;&lt;/table&gt;"+(j?"&lt;/div&gt;"+(g[0]&gt;0&amp;&amp;N==g[1]-1?'&lt;div class="ui-datepicker-row-break"&gt;&lt;/div&gt;':""):""),M+=Q}K+=M}return K+=x+($.browser.msie&amp;&amp;parseInt($.browser.version,10)&lt;7&amp;&amp;!a.inline?'&lt;iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"&gt;&lt;/iframe&gt;':""),a._keyEvent=!1,K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='&lt;div class="ui-datepicker-title"&gt;',m="";if(f||!i)m+='&lt;span class="ui-datepicker-month"&gt;'+g[b]+"&lt;/span&gt;";else{var n=d&amp;&amp;d.getFullYear()==c,o=e&amp;&amp;e.getFullYear()==c;m+='&lt;select class="ui-datepicker-month" data-handler="selectMonth" data-event="change"&gt;';for(var p=0;p&lt;12;p++)(!n||p&gt;=d.getMonth())&amp;&amp;(!o||p&lt;=e.getMonth())&amp;&amp;(m+='&lt;option value="'+p+'"'+(p==b?' selected="selected"':"")+"&gt;"+h[p]+"&lt;/option&gt;");m+="&lt;/select&gt;"}k||(l+=m+(f||!i||!j?"&amp;#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='&lt;span class="ui-datepicker-year"&gt;'+c+"&lt;/span&gt;";else{var q=this._get(a,"yearRange").split(":"),r=(new Date).getFullYear(),s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b},t=s(q[0]),u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t,u=e?Math.min(u,e.getFullYear()):u,a.yearshtml+='&lt;select class="ui-datepicker-year" data-handler="selectYear" data-event="change"&gt;';for(;t&lt;=u;t++)a.yearshtml+='&lt;option value="'+t+'"'+(t==c?' selected="selected"':"")+"&gt;"+t+"&lt;/option&gt;";a.yearshtml+="&lt;/select&gt;",l+=a.yearshtml,a.yearshtml=null}}return l+=this._get(a,"yearSuffix"),k&amp;&amp;(l+=(f||!i||!j?"&amp;#xa0;":"")+m),l+="&lt;/div&gt;",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0),f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate(),a.drawMonth=a.selectedMonth=g.getMonth(),a.drawYear=a.selectedYear=g.getFullYear(),(c=="M"||c=="Y")&amp;&amp;this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max"),e=c&amp;&amp;b&lt;c?c:b;return e=d&amp;&amp;e&gt;d?d:e,e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&amp;&amp;b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a),f=this._daylightSavingAdjust(new Date(c,d+(b&lt;0?b:e[0]*e[1]),1));return b&lt;0&amp;&amp;f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth())),this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min"),d=this._getMinMaxDate(a,"max");return(!c||b.getTime()&gt;=c.getTime())&amp;&amp;(!d||b.getTime()&lt;=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}}),$.fn.datepicker=function(a){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&amp;&amp;a!="getDate"&amp;&amp;a!="widget"?a=="option"&amp;&amp;arguments.length==2&amp;&amp;typeof arguments[1]=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)}):$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.22",window["DP_jQuery_"+dpuuid]=$})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.ui.progressbar.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=a("&lt;div class='ui-progressbar-value ui-widget-header ui-corner-left'&gt;&lt;/div&gt;").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){return a===b?this._value():(this._setOption("value",a),this)},_setOption:function(b,c){b==="value"&amp;&amp;(this.options.value=c,this._refreshValue(),this._value()===this.options.max&amp;&amp;this._trigger("complete")),a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;return typeof a!="number"&amp;&amp;(a=0),Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value(),b=this._percentage();this.oldValue!==a&amp;&amp;(this.oldValue=a,this._trigger("change")),this.valueDiv.toggle(a&gt;this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%"),this.element.attr("aria-valuenow",a)}}),a.extend(a.ui.progressbar,{version:"1.8.22"})})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.core.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
jQuery.effects||function(a,b){function c(b){var c;return b&amp;&amp;b.constructor==Array&amp;&amp;b.length==3?b:(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))?[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)]:(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))?[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))?[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]:(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))?[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)]:(c=/rgba\(0, 0, 0, 0\)/.exec(b))?e.transparent:e[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=(a.curCSS||a.css)(b,d);if(e!=""&amp;&amp;e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&amp;&amp;a.length&amp;&amp;a[0]&amp;&amp;a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&amp;&amp;(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&amp;&amp;(b[c]=a[c]);return b}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&amp;&amp;isNaN(parseFloat(d)))&amp;&amp;delete b[c];return b}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&amp;&amp;(c[d]=b[d]);return c}function k(b,c,d,e){typeof b=="object"&amp;&amp;(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&amp;&amp;(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};return a.isFunction(d)&amp;&amp;(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete,[b,c,d,e]}function l(b){return!b||typeof b=="number"||a.fx.speeds[b]?!0:typeof b=="string"&amp;&amp;!a.effects[b]?!0:!1}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){return a.isFunction(d)&amp;&amp;(e=d,d=null),this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class")||"";a.each(f,function(a,c){b[c]&amp;&amp;g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&amp;&amp;g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&amp;&amp;e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){return typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.22",save:function(a,b){for(var c=0;c&lt;b.length;c++)b[c]!==null&amp;&amp;a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c&lt;b.length;c++)b[c]!==null&amp;&amp;a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){return b=="toggle"&amp;&amp;(b=a.is(":hidden")?"show":"hide"),b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0),"float":b.css("float")},d=a("&lt;div&gt;&lt;/div&gt;").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;try{e.id}catch(f){e=document.body}return b.wrap(d),(b[0]===e||a.contains(b[0],e))&amp;&amp;a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&amp;&amp;(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;return b.parent().is(".ui-effects-wrapper")?(c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&amp;&amp;a(d).focus(),c):b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]&gt;0&amp;&amp;(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];return a.fx.off||!i?h?this[h](g.duration,g.callback):this.each(function(){g.callback&amp;&amp;g.callback.call(this)}):i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="show",this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);return b[1].mode="hide",this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);return c[1].mode="toggle",this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)&gt;0&amp;&amp;(d=[parseFloat(c),b])}),d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)&lt;1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)&lt;1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)&lt;1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)&lt;1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)&lt;1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)&lt;1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h&lt;Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h&lt;Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;g||(g=e*.3*1.5);if(h&lt;Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return b&lt;1?-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,c,d,e,f,g){return g==b&amp;&amp;(g=1.70158),e*(c/=f)*c*((g+1)*c-g)+d},easeOutBack:function(a,c,d,e,f,g){return g==b&amp;&amp;(g=1.70158),e*((c=c/f-1)*c*((g+1)*c+g)+1)+d},easeInOutBack:function(a,c,d,e,f,g){return g==b&amp;&amp;(g=1.70158),(c/=f/2)&lt;1?e/2*c*c*(((g*=1.525)+1)*c-g)+d:e/2*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+d},easeInBounce:function(b,c,d,e,f){return e-a.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(a,b,c,d,e){return(b/=e)&lt;1/2.75?d*7.5625*b*b+c:b&lt;2/2.75?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:b&lt;2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(b,c,d,e,f){return c&lt;f/2?a.easing.easeInBounce(b,c*2,0,e,f)*.5+d:a.easing.easeOutBounce(b,c*2-f,0,e,f)*.5+e*.5+d}})}(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.blind.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.blind=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=f=="vertical"?"height":"width",i=f=="vertical"?g.height():g.width();e=="show"&amp;&amp;g.css(h,0);var j={};j[h]=e=="show"?i:0,g.animate(j,b.duration,b.options.easing,function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.bounce.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.bounce=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"up",g=b.options.distance||20,h=b.options.times||5,i=b.duration||250;/show|hide/.test(e)&amp;&amp;d.push("opacity"),a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",g=b.options.distance||(j=="top"?c.outerHeight(!0)/3:c.outerWidth(!0)/3);e=="show"&amp;&amp;c.css("opacity",0).css(j,k=="pos"?-g:g),e=="hide"&amp;&amp;(g=g/(h*2)),e!="hide"&amp;&amp;h--;if(e=="show"){var l={opacity:1};l[j]=(k=="pos"?"+=":"-=")+g,c.animate(l,i/2,b.options.easing),g=g/2,h--}for(var m=0;m&lt;h;m++){var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing),g=e=="hide"?g*2:g/2}if(e=="hide"){var l={opacity:0};l[j]=(k=="pos"?"-=":"+=")+g,c.animate(l,i/2,b.options.easing,function(){c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments)})}else{var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g,p[j]=(k=="pos"?"+=":"-=")+g,c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments)})}c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.clip.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.clip=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","height","width"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"vertical";a.effects.save(c,d),c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"}),h=c[0].tagName=="IMG"?g:c,i={size:f=="vertical"?"height":"width",position:f=="vertical"?"top":"left"},j=f=="vertical"?h.height():h.width();e=="show"&amp;&amp;(h.css(i.size,0),h.css(i.position,j/2));var k={};k[i.size]=e=="show"?j:0,k[i.position]=e=="show"?0:j/2,h.animate(k,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(c[0],arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.drop.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.drop=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","opacity"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight(!0)/2:c.outerWidth(!0)/2);e=="show"&amp;&amp;c.css("opacity",0).css(g,h=="pos"?-i:i);var j={opacity:e=="show"?1:0};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.explode.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.explode=function(b){return this.queue(function(){var c=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3,d=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var e=a(this).show().css("visibility","hidden"),f=e.offset();f.top-=parseInt(e.css("marginTop"),10)||0,f.left-=parseInt(e.css("marginLeft"),10)||0;var g=e.outerWidth(!0),h=e.outerHeight(!0);for(var i=0;i&lt;c;i++)for(var j=0;j&lt;d;j++)e.clone().appendTo("body").wrap("&lt;div&gt;&lt;/div&gt;").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500);setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide(),b.callback&amp;&amp;b.callback.apply(e[0]),e.dequeue(),a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.fade.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&amp;&amp;b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.fold.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"hide"),f=b.options.size||15,g=!!b.options.horizFirst,h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d),c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"}),j=e=="show"!=g,k=j?["width","height"]:["height","width"],l=j?[i.width(),i.height()]:[i.height(),i.width()],m=/([0-9]+)%/.exec(f);m&amp;&amp;(f=parseInt(m[1],10)/100*l[e=="hide"?0:1]),e=="show"&amp;&amp;i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f,p[k[1]]=e=="show"?l[1]:0,i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.highlight.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};e=="hide"&amp;&amp;(f.opacity=0),a.effects.save(c,d),c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),e=="show"&amp;&amp;!a.support.opacity&amp;&amp;this.style.removeAttribute("filter"),b.callback&amp;&amp;b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.pulsate.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show"),e=(b.options.times||5)*2-1,f=b.duration?b.duration/2:a.fx.speeds._default/2,g=c.is(":visible"),h=0;g||(c.css("opacity",0).show(),h=1),(d=="hide"&amp;&amp;g||d=="show"&amp;&amp;!g)&amp;&amp;e--;for(var i=0;i&lt;e;i++)c.animate({opacity:h},f,b.options.easing),h=(h+1)%2;c.animate({opacity:h},f,b.options.easing,function(){h==0&amp;&amp;c.hide(),b.callback&amp;&amp;b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}).dequeue()})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.scale.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.puff=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide"),e=parseInt(b.options.percent,10)||150,f=e/100,g={height:c.height(),width:c.width()};a.extend(b.options,{fade:!0,mode:d,percent:d=="hide"?e:100,from:d=="hide"?g:{height:g.height*f,width:g.width*f}}),c.effect("scale",b.options,b.duration,b.callback),c.dequeue()})},a.effects.scale=function(b){return this.queue(function(){var c=a(this),d=a.extend(!0,{},b.options),e=a.effects.setMode(c,b.options.mode||"effect"),f=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:e=="hide"?0:100),g=b.options.direction||"both",h=b.options.origin;e!="effect"&amp;&amp;(d.origin=h||["middle","center"],d.restore=!0);var i={height:c.height(),width:c.width()};c.from=b.options.from||(e=="show"?{height:0,width:0}:i);var j={y:g!="horizontal"?f/100:1,x:g!="vertical"?f/100:1};c.to={height:i.height*j.y,width:i.width*j.x},b.options.fade&amp;&amp;(e=="show"&amp;&amp;(c.from.opacity=0,c.to.opacity=1),e=="hide"&amp;&amp;(c.from.opacity=1,c.to.opacity=0)),d.from=c.from,d.to=c.to,d.mode=e,c.effect("size",d,b.duration,b.callback),c.dequeue()})},a.effects.size=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","width","height","overflow","opacity"],e=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],g=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],j=a.effects.setMode(c,b.options.mode||"effect"),k=b.options.restore||!1,l=b.options.scale||"both",m=b.options.origin,n={height:c.height(),width:c.width()};c.from=b.options.from||n,c.to=b.options.to||n;if(m){var p=a.effects.getBaseline(m,n);c.from.top=(n.height-c.from.height)*p.y,c.from.left=(n.width-c.from.width)*p.x,c.to.top=(n.height-c.to.height)*p.y,c.to.left=(n.width-c.to.width)*p.x}var q={from:{y:c.from.height/n.height,x:c.from.width/n.width},to:{y:c.to.height/n.height,x:c.to.width/n.width}};if(l=="box"||l=="both")q.from.y!=q.to.y&amp;&amp;(d=d.concat(h),c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&amp;&amp;(d=d.concat(i),c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to));(l=="content"||l=="both")&amp;&amp;q.from.y!=q.to.y&amp;&amp;(d=d.concat(g),c.from=a.effects.setTransition(c,g,q.from.y,c.from),c.to=a.effects.setTransition(c,g,q.to.y,c.to)),a.effects.save(c,k?d:e),c.show(),a.effects.createWrapper(c),c.css("overflow","hidden").css(c.from);if(l=="content"||l=="both")h=h.concat(["marginTop","marginBottom"]).concat(g),i=i.concat(["marginLeft","marginRight"]),f=d.concat(h).concat(i),c.find("*[width]").each(function(){var c=a(this);k&amp;&amp;a.effects.save(c,f);var d={height:c.height(),width:c.width()};c.from={height:d.height*q.from.y,width:d.width*q.from.x},c.to={height:d.height*q.to.y,width:d.width*q.to.x},q.from.y!=q.to.y&amp;&amp;(c.from=a.effects.setTransition(c,h,q.from.y,c.from),c.to=a.effects.setTransition(c,h,q.to.y,c.to)),q.from.x!=q.to.x&amp;&amp;(c.from=a.effects.setTransition(c,i,q.from.x,c.from),c.to=a.effects.setTransition(c,i,q.to.x,c.to)),c.css(c.from),c.animate(c.to,b.duration,b.options.easing,function(){k&amp;&amp;a.effects.restore(c,f)})});c.animate(c.to,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){c.to.opacity===0&amp;&amp;c.css("opacity",c.from.opacity),j=="hide"&amp;&amp;c.hide(),a.effects.restore(c,k?d:e),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.shake.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.shake=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"effect"),f=b.options.direction||"left",g=b.options.distance||20,h=b.options.times||3,i=b.duration||b.options.duration||140;a.effects.save(c,d),c.show(),a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left",k=f=="up"||f=="left"?"pos":"neg",l={},m={},n={};l[j]=(k=="pos"?"-=":"+=")+g,m[j]=(k=="pos"?"+=":"-=")+g*2,n[j]=(k=="pos"?"-=":"+=")+g*2,c.animate(l,i,b.options.easing);for(var p=1;p&lt;h;p++)c.animate(m,i,b.options.easing).animate(n,i,b.options.easing);c.animate(m,i,b.options.easing).animate(l,i/2,b.options.easing,function(){a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments)}),c.queue("fx",function(){c.dequeue()}),c.dequeue()})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.slide.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.slide=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"],e=a.effects.setMode(c,b.options.mode||"show"),f=b.options.direction||"left";a.effects.save(c,d),c.show(),a.effects.createWrapper(c).css({overflow:"hidden"});var g=f=="up"||f=="down"?"top":"left",h=f=="up"||f=="left"?"pos":"neg",i=b.options.distance||(g=="top"?c.outerHeight(!0):c.outerWidth(!0));e=="show"&amp;&amp;c.css(g,h=="pos"?isNaN(i)?"-"+i:-i:i);var j={};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i,c.animate(j,{queue:!1,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&amp;&amp;c.hide(),a.effects.restore(c,d),a.effects.removeWrapper(c),b.callback&amp;&amp;b.callback.apply(this,arguments),c.dequeue()}})})}})(jQuery);;/*! jQuery UI - v1.8.22 - 2012-07-24
* https://github.com/jquery/jquery-ui
* Includes: jquery.effects.transfer.js
* Copyright (c) 2012 AUTHORS.txt; Licensed MIT, GPL */
(function(a,b){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),d=a(b.options.to),e=d.offset(),f={top:e.top,left:e.left,height:d.innerHeight(),width:d.innerWidth()},g=c.offset(),h=a('&lt;div class="ui-effects-transfer"&gt;&lt;/div&gt;').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove(),b.callback&amp;&amp;b.callback.apply(c[0],arguments),c.dequeue()})})}})(jQuery);;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;
$(function() {
  $( "#draggable" ).draggable({autoscroll: false, containment: "#contenedor"});
});
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="position:fixed; top:15px; left:15px;"&gt;&lt;div id="contenedor"&gt;&lt;div id="draggable" class='draggable ui-corner-all'&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/practica-manual-de-percentiles.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-3790239154262701256</guid><pubDate>Fri, 02 Jun 2017 07:59:00 +0000</pubDate><atom:updated>2017-06-02T04:57:02.144-05:00</atom:updated><title>Tabla Integrada Peso-Talla-Edad</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUisScDPcXv_zDk1GKYjYWMXOgyx1GPN9R__abdhU-OAQOtQPGM-EM9XP4SlWawnm0VyfStwq59M-PdQyDuUfUSnq4S37FR4uBu3dVUTrbtk6aTyq18nCFI2m0Eo_n0atUHi5-ehtOaH8s/s1600/Imprimir-Tabla+Integrada+Peso+Talla-Edad.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="1600" data-original-width="1237" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUisScDPcXv_zDk1GKYjYWMXOgyx1GPN9R__abdhU-OAQOtQPGM-EM9XP4SlWawnm0VyfStwq59M-PdQyDuUfUSnq4S37FR4uBu3dVUTrbtk6aTyq18nCFI2m0Eo_n0atUHi5-ehtOaH8s/s640/Imprimir-Tabla+Integrada+Peso+Talla-Edad.jpg" width="494" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/06/tabla-integrada-peso-talla-edad.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUisScDPcXv_zDk1GKYjYWMXOgyx1GPN9R__abdhU-OAQOtQPGM-EM9XP4SlWawnm0VyfStwq59M-PdQyDuUfUSnq4S37FR4uBu3dVUTrbtk6aTyq18nCFI2m0Eo_n0atUHi5-ehtOaH8s/s72-c/Imprimir-Tabla+Integrada+Peso+Talla-Edad.jpg" width="72"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-6891005582366722667</guid><pubDate>Thu, 01 Jun 2017 10:02:00 +0000</pubDate><atom:updated>2017-06-01T20:57:44.749-05:00</atom:updated><title>Aclaramiento Cistatina C</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWuk1O4GQ3UcfLB3vEB97TySiicv0-UBi2VAL797KyXtfCATboZ5-HoeGw28MLwcrJupzFJq2QZsg7aUJKWpbqUYAjeH8Mr5exo6NS5Y4aHqa6FSHpNFmemZtcpIHl0KUnsVj3AENg_QG3/s1600/Titulo+Depuraci%25C3%25B3n+Cistatina.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="69" data-original-width="211" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWuk1O4GQ3UcfLB3vEB97TySiicv0-UBi2VAL797KyXtfCATboZ5-HoeGw28MLwcrJupzFJq2QZsg7aUJKWpbqUYAjeH8Mr5exo6NS5Y4aHqa6FSHpNFmemZtcpIHl0KUnsVj3AENg_QG3/s1600/Titulo+Depuraci%25C3%25B3n+Cistatina.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;script src="http://portalempresarial.supersociedades.gov.co/Style%20Library/Portal%20Empresarial/js/jquery-1.4.2.min.js" type="text/javascript"&gt;&lt;/script&gt;&lt;br /&gt;
&lt;script type="text/javascript"&gt;
/*function isNumber(val) {
 return /^-?((\d+\.?\d+)|(\.\d+))$/.test(val);
}*/
function isNumber(n)
{
  var n2 = n;
  n = parseFloat(n);
  return (n!='NaN' &amp;&amp; n2==n);
}
function Albuminuria24Horas()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vVolumen = $('#volumen').val();
  var vAlbumina = $('#albumina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vAlbuminuria = vVolumen*vAlbumina*0.001;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vAlbuminuria = (Math.round(vAlbuminuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#albuminuria').val(vAlbuminuria);
}
function AlbuminuriaMuestraUnica1_18()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vAlbumina = $('#albumina').val();
  var vCreatinina = $('#creatinina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vIAC = vAlbumina/(vCreatinina*0.113);
  var vAlbuminuria = 4.165 * vIAC * vTalla * vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIAC = (Math.round(vIAC*100))*0.01;
  vAlbuminuria = (Math.round(vAlbuminuria*100))*0.01;  
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#iac').val(vIAC);
  $('#albuminuria').val(vAlbuminuria);
}
function AlbuminuriaMuestraUnicaAdultos()
{
  var vTalla = $('#talla').val();
  var vEdad = $('#edad').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vAlbumina = $('#albumina').val();
  var vCreatinina = $('#creatinina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vIAC = vAlbumina/(vCreatinina*0.113);
  var vAlbuminuria = vIAC * (140 - vEdad) * vPeso * vSexo * 0.2;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIAC = (Math.round(vIAC*100))*0.01;
  vAlbuminuria = (Math.round(vAlbuminuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#iac').val(vIAC);
  $('#albuminuria').val(vAlbuminuria);
}
function AlbuminuriaMuestraUnicaMenores()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vAlbumina = $('#albumina').val();
  var vCreatinina = $('#creatinina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vIAC = vAlbumina/(vCreatinina*0.113);
  var vAlbuminuria = 3.7485 * vIAC * vTalla * vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIAC = (Math.round(vIAC*100))*0.01;
  vAlbuminuria = (Math.round(vAlbuminuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#iac').val(vIAC);
  $('#albuminuria').val(vAlbuminuria);
}
function Calciuria24Horas()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vVolumen = $('#volumen').val();
  var vCalcio = $('#calcio').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCalciuria = vVolumen * vCalcio * 40 * 0.001;
  var vCalciuria_24 = vCalciuria/vPeso;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vCalciuria = (Math.round(vCalciuria*100))*0.01;
  vCalciuria_24 = (Math.round(vCalciuria_24*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#calciuria').val(vCalciuria);
  $('#calciuria_24').val(vCalciuria_24);
}
function CalciuriaMuestraUnica1_18()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vCalcio = $('#calcio').val();
  var vCreatinina = $('#creatinina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vICaCr = (vCalcio * 40)/(vCreatinina * 0.113);
  var vCalciuria = 8.33 * 0.50 * vICaCr * vTalla * vSCC;
  var vCalciuria_24 = vCalciuria/vPeso;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vICaCr = (Math.round(vICaCr*100))*0.01;
  vCalciuria = (Math.round(vCalciuria*100))*0.01;
  vCalciuria_24 = (Math.round(vCalciuria_24*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#icacr').val(vICaCr);
  $('#calciuria').val(vCalciuria);
  $('#calciuria_24').val(vCalciuria_24);
}
function CalciuriaMuestraUnicaAdultos()
{
  var vTalla = $('#talla').val();
  var vEdad = $('#edad').val();
  var vPeso = $('#peso').val();
  var vCalcio = $('#calcio').val();
  var vCreatinina = $('#creatinina').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vICaCr = (vCalcio * 40)/(vCreatinina * 0.113);
  var vCalciuria = vICaCr * (140 - vEdad) * vPeso * vSexo * 0.2;
  var vCalciuria_24 = vCalciuria/vPeso;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vICaCr = (Math.round(vICaCr*100))*0.01;
  vCalciuria = (Math.round(vCalciuria*100))*0.01;
  vCalciuria_24 = (Math.round(vCalciuria_24*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#icacr').val(vICaCr);
  $('#calciuria').val(vCalciuria);
  $('#calciuria_24').val(vCalciuria_24);
}
function CalciuriaMuestraUnicaMenores()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vCalcio = $('#calcio').val();
  var vCreatinina = $('#creatinina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vICaCr = (vCalcio * 40)/(vCreatinina * 0.113);
  var vCalciuria = 3.7485 * vICaCr * vTalla * vSCC;
  var vCalciuria_24 = vCalciuria/vPeso;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vICaCr = (Math.round(vICaCr*100))*0.01;
  vCalciuria = (Math.round(vCalciuria*100))*0.01;
  vCalciuria_24 = (Math.round(vCalciuria_24*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#icacr').val(vICaCr);
  $('#calciuria').val(vCalciuria);
  $('#calciuria_24').val(vCalciuria_24);
}
function Fosfaturia24Horas()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vVolumen = $('#volumen').val();
  var vFosfatos = $('#fosfatos').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vFosfaturia = vVolumen * vFosfatos * 30.9 * 0.001;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vFosfaturia = (Math.round(vFosfaturia*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#fosfaturia').val(vFosfaturia);
}
function FosfaturiaMuestraUnica1_18()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vFosfatos = $('#fosfatos').val();
  var vCreatinina = $('#creatinina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vIPC = (vFosfatos * 30.9)/(vCreatinina * 0.113);
  var vFosfaturia = 8.33 * 0.50 * vIPC * vTalla * vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIPC = (Math.round(vIPC*100))*0.01;
  vFosfaturia = (Math.round(vFosfaturia*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#ipc').val(vIPC);
  $('#fosfaturia').val(vFosfaturia);
}
function FosfaturiaMuestraUnicaAdultos()
{
  var vTalla = $('#talla').val();
  var vEdad = $('#edad').val();
  var vPeso = $('#peso').val();
  var vFosfatos = $('#fosfatos').val();
  var vCreatinina = $('#creatinina').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vIPC = (vFosfatos * 30.9)/(vCreatinina * 0.113);
  var vFosfaturia = vIPC * (140 - vEdad) * vPeso * vSexo * 0.2;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIPC = (Math.round(vIPC*100))*0.01;
  vFosfaturia = (Math.round(vFosfaturia*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#ipc').val(vIPC);
  $('#fosfaturia').val(vFosfaturia);
}
function FosfaturiaMuestraUnicaMenores()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vFosfatos = $('#fosfatos').val();
  var vCreatinina = $('#creatinina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vIPC = (vFosfatos * 30.9)/(vCreatinina * 0.113);
  var vFosfaturia = 3.7485 * vIPC * vTalla * vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIPC = (Math.round(vIPC*100))*0.01;
  vFosfaturia = (Math.round(vFosfaturia*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#ipc').val(vIPC);
  $('#fosfaturia').val(vFosfaturia);
}
function Magnesuria24Horas()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vVolumen = $('#volumen').val();
  var vMagnesio = $('#magnesio').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vMagnesuria = vVolumen * vMagnesio * 24.3 * 0.001;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vMagnesuria = (Math.round(vMagnesuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#magnesuria').val(vMagnesuria);
}
function MagnesuriaMuestraUnica1_18()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vMagnesio = $('#magnesio').val();
  var vCreatinina = $('#creatinina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vIMgCr = (vMagnesio * 24.3) / (vCreatinina * 0.113);
  var vMagnesuria = 8.33 * 0.50 * vIMgCr * vTalla * vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIMgCr = (Math.round(vIMgCr*100))*0.01;
  vMagnesuria = (Math.round(vMagnesuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#imgcr').val(vIMgCr);
  $('#magnesuria').val(vMagnesuria);
}
function MagnesuriaMuestraUnicaAdultos()
{
  var vTalla = $('#talla').val();
  var vEdad = $('#edad').val();
  var vPeso = $('#peso').val();
  var vMagnesio = $('#magnesio').val();
  var vCreatinina = $('#creatinina').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vIMgCr = (vMagnesio * 24.3) / (vCreatinina * 0.113);
  var vMagnesuria = vIMgCr * (140 - vEdad) * vPeso * vSexo * 0.2;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIMgCr = (Math.round(vIMgCr*100))*0.01;
  vMagnesuria = (Math.round(vMagnesuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#imgcr').val(vIMgCr);
  $('#magnesuria').val(vMagnesuria);
}
function MagnesuriaMuestraUnicaMenores()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vMagnesio = $('#magnesio').val();
  var vCreatinina = $('#creatinina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vIMgCr = (vMagnesio * 24.3) / (vCreatinina * 0.113);
  var vMagnesuria = 3.7485 * vIMgCr * vTalla * vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIMgCr = (Math.round(vIMgCr*100))*0.01;
  vMagnesuria = (Math.round(vMagnesuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#imgcr').val(vIMgCr);
  $('#magnesuria').val(vMagnesuria);
}
function Proteinuria24Horas()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vVolumen = $('#volumen').val();
  var vProteinas = $('#proteinas').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vProteinuria = vVolumen * vProteinas * 0.001;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vProteinuria = (Math.round(vProteinuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#proteinuria').val(vProteinuria);
}
function ProteinuriaMuestraUnica1_18()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vProteinas = $('#proteinas').val();
  var vCreatinina = $('#creatinina').val();
  var vRPC = vProteinas / (vCreatinina * 0.000113);
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vProteinuria = 0.004165 * vRPC * vTalla * vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vRPC = (Math.round(vRPC*100))*0.01;
  vProteinuria = (Math.round(vProteinuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#rpc').val(vRPC);
  $('#proteinuria').val(vProteinuria);
}
function ProteinuriaMuestraUnicaAdultos()
{
  var vTalla = $('#talla').val();
  var vEdad = $('#edad').val();
  var vPeso = $('#peso').val();
  var vProteinas = $('#proteinas').val();
  var vCreatinina = $('#creatinina').val();
  var vRPC = vProteinas / (vCreatinina * 0.000113);
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vProteinuria = vRPC * (140 - vEdad) * vPeso * vSexo * 0.0002;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vRPC = (Math.round(vRPC*100))*0.01;
  vProteinuria = (Math.round(vProteinuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#rpc').val(vRPC);
  $('#proteinuria').val(vProteinuria);
}
function ProteinuriaMuestraUnicaMenores()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vProteinas = $('#proteinas').val();
  var vCreatinina = $('#creatinina').val();
  var vRPC = vProteinas / (vCreatinina * 0.000113);
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vProteinuria = 0.0037485 * vRPC * vTalla * vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vRPC = (Math.round(vRPC*100))*0.01;
  vProteinuria = (Math.round(vProteinuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#rpc').val(vRPC);
  $('#proteinuria').val(vProteinuria);
}
function Uricosuria24Horas()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vVolumen = $('#volumen').val();
  var vUratos = $('#uratos').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vUricosuria = vVolumen * vUratos * 0.168 * 0.001;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vUricosuria = (Math.round(vUricosuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#uricosuria').val(vUricosuria);
}
function UricosuriaMuestraUnica1_18()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vUratos = $('#uratos').val();
  var vCreatinina = $('#creatinina').val();
  var vIUC = (vUratos * 0.168) / (vCreatinina * 0.113);
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vUricosuria = 8.33 * 0.50 * vIUC * vTalla * vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIUC = (Math.round(vIUC*100))*0.01;
  vUricosuria = (Math.round(vUricosuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#iuc').val(vIUC);
  $('#uricosuria').val(vUricosuria);
}
function UricosuriaMuestraUnicaMenores()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vUratos = $('#uratos').val();
  var vCreatinina = $('#creatinina').val();
  var vIUC = (vUratos * 0.168) / (vCreatinina * 0.113);
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vUricosuria = 8.33 * 0.45 * vIUC * vTalla * vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIUC = (Math.round(vIUC*100))*0.01;
  vUricosuria = (Math.round(vUricosuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#iuc').val(vIUC);
  $('#uricosuria').val(vUricosuria);
}
function UricosuriaMuestraUnicaAdultos()
{
  var vTalla = $('#talla').val();
  var vEdad = $('#edad').val();
  var vPeso = $('#peso').val();
  var vUratos = $('#uratos').val();
  var vCreatinina = $('#creatinina').val();
  var vIUC = (vUratos * 0.168) / (vCreatinina * 0.113);
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vUricosuria = vIUC * (140 - vEdad) * vPeso * vSexo * 0.2;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vIUC = (Math.round(vIUC*100))*0.01;
  vUricosuria = (Math.round(vUricosuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#iuc').val(vIUC);
  $('#uricosuria').val(vUricosuria);
}
function AlbuminuriaDensidadOrina(){
  var vEdad = $('#edad').val();
  var CodigoEdad;
  if (vEdad &lt; 1) 
     {CodigoEdad = 1}
   else 
   if (vEdad &gt;=19 )
      {CodigoEdad = 3}
   else
   {CodigoEdad = 2}

  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vAlbumina = $('#albumina').val();
  var vDensidadOrina = $('#densidad').val();
  var vDensidadCorregida = (vDensidadOrina-1)*100;
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatinina = (vDensidadCorregida * 0.5712 + 0.0777) * vSCC;
  var vIAC = vAlbumina/vCreatinina;
  var vAlbuminuria;
  switch(CodigoEdad) {
        case 1: vAlbuminuria = 0.0037485 * vIAC * vTalla * vSCC
              break;
   case 2: vAlbuminuria = 0.0041650 * vIAC * vTalla * vSCC
              break;
        case 3: vAlbuminuria = vIAC *(140 - vEdad) * vPeso * vSexo * 0.0002
    break; 
  }
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  vCreatinina = (Math.round(vCreatinina*100))*0.01;
  vAlbuminuria = (Math.round(vAlbuminuria*100))*0.01;
  vIAC = (Math.round(vIAC*100))*0.01; 
  $('#creatinina').val(vCreatinina);
  $('#iac').val(vIAC);
  $('#albuminuria').val(vAlbuminuria);
}
function CalciuriaDensidadOrina(){
  var vEdad = $('#edad').val();
  var CodigoEdad;
  if (vEdad &lt; 1) 
     {CodigoEdad = 1}
   else 
   if (vEdad &gt;=19 )
      {CodigoEdad = 3}
   else
   {CodigoEdad = 2}

  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vCalcio = $('#calcio').val();
  var vDensidadOrina = $('#densidad').val();
  var vDensidadCorregida = (vDensidadOrina-1)*100;
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatinina = (vDensidadCorregida * 0.5712 + 0.0777) * vSCC;
  var vICaCr = (vCalcio * 40)/vCreatinina;
  var vCalciuria;
  switch(CodigoEdad) {
        case 1: vCalciuria = 3.7485 * 0.001 * vICaCr * vTalla * vSCC
              break;
   case 2: vCalciuria = 4.1650 * 0.001 * vICaCr * vTalla * vSCC
    break;
        case 3: vCalciuria = vICaCr * (140 - vEdad) * vPeso * vSexo * 0.0002
    break; 
  }
  var vCalciuria_24 = vCalciuria / vPeso;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  vCreatinina = (Math.round(vCreatinina*100))*0.01;
  vICaCr = (Math.round(vICaCr*100))*0.01;
  vCalciuria = (Math.round(vCalciuria*100))*0.01; 
  vCalciuria_24 = (Math.round(vCalciuria_24*100))*0.01;
  $('#creatinina').val(vCreatinina);
  $('#icacr').val(vICaCr);
  $('#calciuria').val(vCalciuria);
  $('#calciuria_24').val(vCalciuria_24);
}
function FosfaturiaDensidadOrina(){
  var vEdad = $('#edad').val();
  var CodigoEdad;
  if (vEdad &lt; 1) 
     {CodigoEdad = 1}
   else 
   if (vEdad &gt;=19 )
      {CodigoEdad = 3}
   else
   {CodigoEdad = 2}

  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vFosfatos = $('#fosfatos').val();
  var vDensidadOrina = $('#densidad').val();
  var vDensidadCorregida = (vDensidadOrina-1)*100;
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatinina = (vDensidadCorregida * 0.5712 + 0.0777) * vSCC;
  var vIPC = (vFosfatos * 30.9) / vCreatinina;
  var vFosfaturia;
  switch(CodigoEdad) {
        case 1: vFosfaturia = 0.0037485 * vIPC * vTalla * vSCC
              break;
   case 2: vFosfaturia = 0.0041650 * vIPC * vTalla * vSCC
    break;
        case 3: vFosfaturia = vIPC * (140 - vEdad) * vPeso * vSexo * 0.0002
    break; 
  }
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  vCreatinina = (Math.round(vCreatinina*100))*0.01;
  $('#creatinina').val(vCreatinina);
  vIPC = (Math.round(vIPC*100))*0.01; 
  $('#ipc').val(vIPC);
  vFosfaturia = (Math.round(vFosfaturia*100))*0.01;
  $('#fosfaturia').val(vFosfaturia);
}
function MagnesuriaDensidadOrina(){
  var vEdad = $('#edad').val();
  var CodigoEdad;
  if (vEdad &lt; 1) 
     {CodigoEdad = 1}
   else 
   if (vEdad &gt;=19 )
      {CodigoEdad = 3}
   else
   {CodigoEdad = 2}

  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vDensidadOrina = $('#densidad').val();
  var vDensidadCorregida = (vDensidadOrina-1)*100;
  var vMagnesio = $('#magnesio').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatinina = (vDensidadCorregida * 0.5712 + 0.0777) * vSCC;
  var vIMgCr = (vMagnesio * 24)/vCreatinina;
  var Magnesuria;
  switch(CodigoEdad) {
        case 1: vMagnesuria = 0.0037485 * vIMgCr * vTalla * vSCC
              break;
   case 2: vMagnesuria = 0.0041650 * vIMgCr * vTalla * vSCC
    break;
        case 3: vMagnesuria = vIMgCr * (140 - vEdad) * vPeso * vSexo * 0.0002
    break; 
  }
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01; 
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  vCreatinina = (Math.round(vCreatinina*100))*0.01;
  $('#creatinina').val(vCreatinina);
  vIMgCr = (Math.round(vIMgCr*100))*0.01;
  $('#imgcr').val(vIMgCr);
  vMagnesuria = (Math.round(vMagnesuria*100))*0.01;
  $('#magnesuria').val(vMagnesuria);
}
function ProteinuriaDensidadOrina(){
  var vEdad = $('#edad').val();
  var CodigoEdad;
  if (vEdad &lt; 1) 
     {CodigoEdad = 1}
   else 
   if (vEdad &gt;=19 )
      {CodigoEdad = 3}
   else
   {CodigoEdad = 2}

  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vProteinas = $('#proteinas').val();
  var vDensidadOrina = $('#densidad').val();
  var vDensidadCorregida = (vDensidadOrina-1)*100;
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatinina = (vDensidadCorregida * 0.5712 + 0.0777) * vSCC;
  var vRPC = vProteinas/vCreatinina;
  var vProteinuria;
  switch(CodigoEdad) {
        case 1: vProteinuria = 3.7485 * 0.001 * vRPC * vTalla * vSCC
              break;
   case 2: vProteinuria = 4.1650 * 0.001 * vRPC * vTalla * vSCC
    break;
        case 3: vProteinuria = vRPC * (140 - vEdad) * vPeso * vSexo * 0.0002
    break; 
  }
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01; 
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  vCreatinina = (Math.round(vCreatinina*100))*0.01;
  $('#creatinina').val(vCreatinina);
  vRPC = (Math.round(vRPC*100))*0.01;
  $('#rpc').val(vRPC);
  vProteinuria = (Math.round(vProteinuria*100))*0.01;
  $('#proteinuria').val(vProteinuria);
}
function UricosuriaDensidadOrina(){
  var vEdad = $('#edad').val();
  var CodigoEdad;
  if (vEdad &lt; 1) 
     {CodigoEdad = 1}
   else 
   if (vEdad &gt;=19)
      {CodigoEdad = 3}
   else
   {CodigoEdad = 2}

  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vUratos = $('#uratos').val();
  var vDensidadOrina = $('#densidad').val();
  var vDensidadCorregida = (vDensidadOrina-1)*100;
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatinina = (vDensidadCorregida * 0.5712 + 0.0777) * vSCC;
  var vIUC = (vUratos * 168)/vCreatinina;
  var Uricosuria;
  switch(CodigoEdad) {
        case 1: vUricosuria = 0.0037485 * vIUC * vTalla * vSCC
              break;
   case 2: vUricosuria = 0.0041650 * vIUC * vTalla * vSCC
    break;
        case 3: vUricosuria = vIUC * (140 - vEdad) * vPeso * vSexo * 0.0002
    break; 
  }
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01; 
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  vCreatinina = (Math.round(vCreatinina*100))*0.01;
  $('#creatinina').val(vCreatinina);
  vIUC = (Math.round(vIUC*100))*0.01;
  $('#iuc').val(vIUC);
  vUricosuria = (Math.round(vUricosuria*100))*0.01;
  $('#uricosuria').val(vUricosuria);
}
function AlbuminuriaMDRDAdultos(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.742;
  var vColorPiel = $('#colorpiel').val();
  var CodigoColorPiel;
  switch(vColorPiel){     
 case "b": CodigoColorPiel=1.000 
           break;            
      case "n": CodigoColorPiel=1.212
      break;
      case "a": CodigoColorPiel=1.000
      break;
      case "m": CodigoColorPiel=1.000
      break;      
  }
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaOrina = $('#CreatininaOrina').val();
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vAlbumina = $('#albumina').val();
  var vRatioAlbuminaCreatinina = vAlbumina/vCreatininaOrina; 
  var vAlbuminuria = vRatioAlbuminaCreatinina*186*(Math.pow(vCreatininaSuero,(-0.154)))*(Math.pow(vEdad,(-0.203)))*CodigoColorPiel*vSexo*vSCC*0.00833;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vRatioAlbuminaCreatinina = (Math.round(vRatioAlbuminaCreatinina*100))*0.01;
  vAlbuminuria = (Math.round(vAlbuminuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#iac').val(vRatioAlbuminaCreatinina); 
  $('#albuminuria').val(vAlbuminuria);
}
function CalciuriaMDRDAdultos(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.742;
  var vColorPiel = $('#colorpiel').val();
  var CodigoColorPiel;
  switch(vColorPiel){     
 case "b": CodigoColorPiel=1.000 
           break;            
      case "n": CodigoColorPiel=1.212
      break;
      case "a": CodigoColorPiel=1.000
      break;
      case "m": CodigoColorPiel=1.000
      break;      
  }
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaOrina = $('#CreatininaOrina').val();
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vCalcio = $('#calcio').val();
  var vRatioCalcioCreatinina = vCalcio/vCreatininaOrina; 
  var vCalciuria = vRatioCalcioCreatinina*186*(Math.pow(vCreatininaSuero,(-0.154)))*(Math.pow(vEdad,(-0.203)))*CodigoColorPiel*vSexo*vSCC*0.00833;
  var vCalciuria_24 = vCalciuria/vPeso;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vRatioCalcioCreatinina = (Math.round(vRatioCalcioCreatinina*100))*0.01;
  vCalciuria = (Math.round(vCalciuria*100))*0.01;
  vCalciuria_24 = (Math.round(vCalciuria_24*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#icacr').val(vRatioCalcioCreatinina); 
  $('#calciuria').val(vCalciuria);
  $('#calciuria_24').val(vCalciuria_24);
}
function FosfaturiaMDRDAdultos(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.742;
  var vColorPiel = $('#colorpiel').val();
  var CodigoColorPiel;
  switch(vColorPiel){     
 case "b": CodigoColorPiel=1.000 
           break;            
      case "n": CodigoColorPiel=1.212
      break;
      case "a": CodigoColorPiel=1.000
      break;
      case "m": CodigoColorPiel=1.000
      break;      
  }
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaOrina = $('#CreatininaOrina').val();
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vFosfatos = $('#fosfatos').val();
  var vRatioFosfatosCreatinina = vFosfatos/vCreatininaOrina; 
  var vFosfaturia = vRatioFosfatosCreatinina*186*(Math.pow(vCreatininaSuero,(-0.154)))*(Math.pow(vEdad,(-0.203)))*CodigoColorPiel*vSexo*vSCC*0.00833;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vRatioFosfatosCreatinina = (Math.round(vRatioFosfatosCreatinina*100))*0.01;
  vFosfaturia = (Math.round(vFosfaturia*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#ipc').val(vRatioFosfatosCreatinina); 
  $('#fosfaturia').val(vFosfaturia);
}
function MagnesuriaMDRDAdultos(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.742;
  var vColorPiel = $('#colorpiel').val();
  var CodigoColorPiel;
  switch(vColorPiel){     
 case "b": CodigoColorPiel=1.000 
           break;            
      case "n": CodigoColorPiel=1.212
      break;
      case "a": CodigoColorPiel=1.000
      break;
      case "m": CodigoColorPiel=1.000
      break;      
  }
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaOrina = $('#CreatininaOrina').val();
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vMagnesio = $('#magnesio').val();
  var vRatioMagnesioCreatinina = vMagnesio/vCreatininaOrina; 
  var vMagnesuria = vRatioMagnesioCreatinina*186*(Math.pow(vCreatininaSuero,(-0.154)))*(Math.pow(vEdad,(-0.203)))*CodigoColorPiel*vSexo*vSCC*0.00833;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vRatioMagnesioCreatinina = (Math.round(vRatioMagnesioCreatinina*100))*0.01;
  vMagnesuria = (Math.round(vMagnesuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#imgcr').val(vRatioMagnesioCreatinina); 
  $('#magnesuria').val(vMagnesuria);
}
function ProteinuriaMDRDAdultos(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.742;
  var vColorPiel = $('#colorpiel').val();
  var CodigoColorPiel;
  switch(vColorPiel){     
 case "b": CodigoColorPiel=1.000 
           break;            
      case "n": CodigoColorPiel=1.212
      break;
      case "a": CodigoColorPiel=1.000
      break;
      case "m": CodigoColorPiel=1.000
      break;      
  }
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaOrina = $('#CreatininaOrina').val();
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vProteinas = $('#proteinas').val();
  var vRatioProteinasCreatinina = vProteinas/vCreatininaOrina; 
  var vProteinuria = vRatioProteinasCreatinina*186*(Math.pow(vCreatininaSuero,(-0.154)))*(Math.pow(vEdad,(-0.203)))*CodigoColorPiel*vSexo*vSCC*0.00833;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vRatioProteinasCreatinina = (Math.round(vRatioProteinasCreatinina*100))*0.01;
  vProteinuria = (Math.round(vProteinuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#rpc').val(vRatioProteinasCreatinina); 
  $('#proteinuria').val(vProteinuria);
}
function UricosuriaMDRDAdultos(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.742;
  var vColorPiel = $('#colorpiel').val();
  var CodigoColorPiel;
  switch(vColorPiel){     
 case "b": CodigoColorPiel=1.000 
           break;            
      case "n": CodigoColorPiel=1.212
      break;
      case "a": CodigoColorPiel=1.000
      break;
      case "m": CodigoColorPiel=1.000
      break;      
  }
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaOrina = $('#CreatininaOrina').val();
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vUratos = $('#uratos').val();
  var vRatioUratosCreatinina = vUratos/vCreatininaOrina; 
  var vUricosuria = vRatioUratosCreatinina*186*(Math.pow(vCreatininaSuero,(-0.154)))*(Math.pow(vEdad,(-0.203)))*CodigoColorPiel*vSexo*vSCC*0.00833;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vRatioUratosCreatinina = (Math.round(vRatioUratosCreatinina*100))*0.01;
  vUricosuria = (Math.round(vUricosuria*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#iuc').val(vRatioUratosCreatinina); 
  $('#uricosuria').val(vUricosuria);
}
function FiltradoGlomerular(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaOrina = $('#CreatininaOrina').val();
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vVolumenOrina = $('#VolumenOrina').val();
  var vIndiceCreatinina = vCreatininaOrina/vCreatininaSuero;
  Vminuto=vVolumenOrina/1440;
  var vCreatininaClearance = Vminuto*vIndiceCreatinina;
  var vFiltradoGlomerular = vCreatininaClearance*1.73/vSCC;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vCreatininaClearance = (Math.round(vCreatininaClearance*100))*0.01;
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#aclaramiento').val(vCreatininaClearance);
  $('#filtrado').val(vFiltradoGlomerular);
}
function FiltradoGlomerularCockcroftGault(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vCreatininaClearance = ((140-vEdad)*vPeso*vSexo)/(72*vCreatininaSuero*0.0113); 
  var vFiltradoGlomerular = (1.73*vCreatininaClearance)/(vSCC);
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vCreatininaClearance = (Math.round(vCreatininaClearance*100))*0.01;
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#aclaramiento').val(vCreatininaClearance);
  $('#filtrado').val(vFiltradoGlomerular);
}
function FiltradoGlomerularCronberg(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:2;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var CodigoSexo;
  switch(vSexo){
   case 1: 
      if (vEdad&lt;70) {CodigoSexo=170} else {CodigoSexo=160}
           break;
      case 2: CodigoSexo=150
           break;
  }
  var vCreatininaClearance = ((CodigoSexo-vEdad)*vPeso)/(vCreatininaSuero);
  var vFiltradoGlomerular = (1.73*vCreatininaClearance)/(vSCC);
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vCreatininaClearance = (Math.round(vCreatininaClearance*100))*0.01;
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#aclaramiento').val(vCreatininaClearance);
  $('#filtrado').val(vFiltradoGlomerular);
}
function FiltradoGlomerularLevey(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.742;
  var vColorPiel = $('#colorpiel').val();
  var CodigoColorPiel;
  switch(vColorPiel){ 
      case "b": CodigoColorPiel=1
                break;
      case "n": CodigoColorPiel=1.212
      break;
      case "a": CodigoColorPiel=1
      break;
 case "m": CodigoColorPiel=1
      break;  
  }
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vFiltradoGlomerular = 186*(Math.pow((vCreatininaSuero*0.0113),(-1.154)))*(Math.pow(vEdad,(-0.203)))*vSexo*CodigoColorPiel;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#filtrado').val(vFiltradoGlomerular);
}
function FiltradoGlomerularSchwartzUno(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vFiltradoGlomerular = (0.45*vTalla)/(vCreatininaSuero*0.0113);
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#filtrado').val(vFiltradoGlomerular);
}
function FiltradoGlomerularSchwartzDos(){
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = ($('#sexo').val() == 'm')?1:0.85;
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vCreatininaSuero = $('#CreatininaSuero').val();
  var vFiltradoGlomerular = (0.50*vTalla)/(vCreatininaSuero*0.0113);
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#filtrado').val(vFiltradoGlomerular);
}
function FiltradoGlomerularCKDEPI()
{
  var vEdad = $('#edad').val();
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vSexo = $('#sexo').val();
  var vColorPiel = $('#colorpiel').val();
  var vCreatininaSuero = $('#CreatininaSuero').val();

  var Constante_a;
  var Constante_b;
  switch(vSexo)
  {
        case "m": 
        Constante_b=0.9;
             switch(vColorPiel)
             {
             case "b":
             Constante_a=141;
             break;
             case "n":
             Constante_a=163;
             break; 
             case "a":
             Constante_a=141;
             break; 
             case "m":
             Constante_a=141;
             break;
             }                
        break;

        case "f":
        Constante_b=0.7;
             switch(vColorPiel)
             {
             case "b":
             Constante_a=144;
             break;
             case "n":
             Constante_a=166;
             break; 
             case "a":
             Constante_a=144;
             break; 
             case "m":
             Constante_a=144;
             break;
             }
        break;  
  } 

  vCreatininaSuero=vCreatininaSuero*0.0113;
    
  var Constante_c;
  switch(vSexo)
  {
        case "m":
             if (vCreatininaSuero &lt;= 0.9)
                {
                Constante_c=-0.411;
                }
             else 
                {
                Constante_c=-1.209;
                } 
        break;
 
        case "f":
             if (vCreatininaSuero &lt;= 0.7)
                {
                Constante_c=-0.329;
                }
             else 
                {
                Constante_c=-1.209;
                }
        break;
  }
 
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vFiltradoGlomerular = Constante_a*(Math.pow((vCreatininaSuero/Constante_b),(Constante_c)))*(Math.pow(0.993,(vEdad)));
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#filtrado').val(vFiltradoGlomerular);
}

function CistatinaAclaramiento_1_18_Filler()
{
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vCistatina = $('#cistatina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vFiltradoGlomerular = 91.62*(Math.pow(vCistatina,(-1.123)));
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#aclaramiento').val(vFiltradoGlomerular);
}
function CistatinaAclaramiento_1_18_Zapitelli()
{
  var vCondicion = ($('#condicion').val() == 'n')?1:1.2;
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vCistatina = $('#cistatina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  var vFiltradoGlomerular = 75.94*vCondicion*(Math.pow(vCistatina,(-1.17)));
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  $('#aclaramiento').val(vFiltradoGlomerular);
}
function CistatinaAclaramiento_Adultos_Grubb()
{
  var vSexo = ($('#sexo').val() == 'm')?1:0.823;
  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vCistatina = $('#cistatina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  var vFiltradoGlomerular;
  vFiltradoGlomerular = 89.12*(Math.pow(vCistatina,(-1.675)));
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#aclaramiento').val(vFiltradoGlomerular);
  vFiltradoGlomerular = 99.19*vSexo*(Math.pow(vCistatina,(-1.713)));
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#aclaramiento2').val(vFiltradoGlomerular);
}
function CistatinaAclaramiento_Grubb()
{
  var vSexo = ($('#sexo').val() == 'm')?1:0.948;
  var vCodigoEdad;
  var vEdad;
  var vEdad = $('#edad').val();
  if (vEdad&gt;=14) 
     {vCodigoEdad=1.000}
  else 
     {vCodigoEdad=1.384}

  var vTalla = $('#talla').val();
  var vPeso = $('#peso').val();
  var vCistatina = $('#cistatina').val();
  var vIMC = vPeso/(Math.pow((vTalla*0.01),2));
  var vSCC=(Math.pow(vTalla,0.725))*(Math.pow(vPeso,0.425))*0.007184;
  vIMC = (Math.round(vIMC*100))*0.01;
  vSCC = (Math.round(vSCC*100))*0.01;
  $('#imc').val(vIMC);
  $('#sc').val(vSCC);
  var vFiltradoGlomerular;
  vFiltradoGlomerular = 83.93*(Math.pow(vCistatina,(-1.676)));
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#aclaramiento').val(vFiltradoGlomerular);
  vFiltradoGlomerular = 86.49*vSexo*(Math.pow(vCistatina,(-1.686)));
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#aclaramiento2').val(vFiltradoGlomerular);
  vFiltradoGlomerular = 84.69*vCodigoEdad*(Math.pow(vCistatina,(-1.680)));
  vFiltradoGlomerular = (Math.round(vFiltradoGlomerular*100))*0.01;
  $('#aclaramiento3').val(vFiltradoGlomerular);
}
function validar(id){
  var error = false;
  $('.enter').each(function() {
 val = (isNumber($(this).val()))?$(this).val():0;
 if (val == 0){
  $(this).addClass('error');
  if (!$('#'+$(this).attr('id') +'_error').length){
   $(this).parent().append('&lt;div id="'+ $(this).attr('id') +'_error" class="error_msg" style="display:none;"&gt;
Debe ingresar un número.&lt;/div&gt;
');
   
  }
  $('#'+$(this).attr('id') +'_error').fadeIn("slow");
  error = true;

 }else{
  if ($('#'+$(this).attr('id') +'_error').length){
   $('#'+$(this).attr('id') +'_error').fadeOut('slow');
   $(this).removeClass('error');
  }
 }
  });
  
  if ((!error) &amp;&amp; (id != 0)){
 switch(id)
        {
          case 1: Albuminuria24Horas(); 
                  break;
          case 2: AlbuminuriaMuestraUnica1_18(); 
                  break;
     case 3: AlbuminuriaMuestraUnicaAdultos(); 
                  break;
     case 4: AlbuminuriaMuestraUnicaMenores(); 
                  break;
     case 5: Calciuria24Horas(); 
                  break;
          case 6: CalciuriaMuestraUnica1_18(); 
                  break;
     case 7: CalciuriaMuestraUnicaAdultos(); 
                  break;
     case 8: CalciuriaMuestraUnicaMenores(); 
                  break;
     case 9: Fosfaturia24Horas(); 
                  break;
          case 10: FosfaturiaMuestraUnica1_18(); 
                  break;
     case 11: FosfaturiaMuestraUnicaAdultos(); 
                  break;
     case 12: FosfaturiaMuestraUnicaMenores(); 
                  break;
     case 13: Magnesuria24Horas(); 
                  break;
          case 14: MagnesuriaMuestraUnica1_18(); 
                  break;
     case 15: MagnesuriaMuestraUnicaAdultos(); 
                  break;
     case 16: MagnesuriaMuestraUnicaMenores(); 
                  break;
     case 17: Proteinuria24Horas(); 
                  break;
          case 18: ProteinuriaMuestraUnica1_18(); 
                  break;
     case 19: ProteinuriaMuestraUnicaAdultos(); 
                  break;
     case 20: ProteinuriaMuestraUnicaMenores(); 
                  break;
     case 21: Uricosuria24Horas(); 
                  break;
     case 22: UricosuriaMuestraUnica1_18(); 
   break;
     case 23: UricosuriaMuestraUnicaAdultos();
   break;
     case 24: UricosuriaMuestraUnicaMenores(); 
   break;
     case 25: AlbuminuriaDensidadOrina(); 
   break;
     case 26: CalciuriaDensidadOrina(); 
   break;
          case 27: FosfaturiaDensidadOrina();
   break;
          case 28: MagnesuriaDensidadOrina();
   break;
     case 29: ProteinuriaDensidadOrina();
   break;
     case 30: UricosuriaDensidadOrina();
   break;
     case 31: AlbuminuriaMDRDAdultos();
   break;     
     case 32: CalciuriaMDRDAdultos();
   break;
     case 33: FosfaturiaMDRDAdultos();
   break;
     case 34: MagnesuriaMDRDAdultos();
   break;
     case 35: ProteinuriaMDRDAdultos();
   break;
     case 36: UricosuriaMDRDAdultos();
   break;
     case 37: FiltradoGlomerular();
   break; 
     case 38: FiltradoGlomerularCockcroftGault()
   break;
     case 39: FiltradoGlomerularCronberg()
   break; 
     case 40: FiltradoGlomerularLevey()
   break;
     case 41: FiltradoGlomerularSchwartzUno()
    break;
     case 42: FiltradoGlomerularSchwartzDos()
    break; 
          case 43: FiltradoGlomerularCKDEPI()
                  break;
     case 44: CistatinaAclaramiento_1_18_Filler()
   break;
     case 45: CistatinaAclaramiento_1_18_Zapitelli()
   break;
     case 46: CistatinaAclaramiento_Adultos_Grubb()
   break;
     case 47: CistatinaAclaramiento_Grubb()
   break; 
     default: 
  if (!$('.error_msg_content').length){
  $('.content').prepend('&lt;div class="error_msg_content" style="display:none;"&gt;
Error en la validación.&lt;/div&gt;
');
  $(".error_msg_content").fadeIn("slow");
  }
 }
  }else if(error){
 $('.result').each(function() {
  $(this).val('');
 });
  }
}
function limpiar(){
  $('input:text').each(function() {
 $(this).val('');
 $(this).removeClass('error');
 $('#' + $(this).attr('id') + '_error').fadeOut('slow');
  });
}
function volver(){
  window.location.href= 'index2.htm';
}
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script type="text/javascript"&gt;

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-761679-13']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="content"&gt;
&lt;div class="input_content"&gt;
&lt;div&gt;
&lt;label&gt;&lt;b&gt;&lt;i&gt;Sexo:&lt;/i&gt;&lt;/b&gt;&lt;/label&gt;&lt;br /&gt;
&lt;div class="input"&gt;
&lt;select id="sexo" name="sexo"&gt;
&lt;option value="m"&gt;Niño&lt;/option&gt;
&lt;option value="f"&gt;Niña&lt;/option&gt;
&lt;/select&gt;&lt;/div&gt;
&lt;div class="clear"&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_content"&gt;
&lt;div&gt;
&lt;label&gt;&lt;b&gt;&lt;i&gt;Talla/cm:&lt;/i&gt;&lt;/b&gt;&lt;/label&gt;&lt;br /&gt;
&lt;div class="input"&gt;
&lt;input class=" enter" id="talla" name="talla" size="10" type="text" /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="clear"&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_content"&gt;
&lt;div&gt;
&lt;label&gt;&lt;b&gt;&lt;i&gt;Peso/Kg:&lt;/i&gt;&lt;/b&gt;&lt;/label&gt;&lt;br /&gt;
&lt;div class="input"&gt;
&lt;input class=" enter" id="peso" name="peso" size="10" type="text" /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="clear"&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="input_content"&gt;
&lt;div&gt;
&lt;label&gt;&lt;b&gt;&lt;i&gt;Cistatina C-Suero en mg/l&lt;sup&gt;-1&lt;/sup&gt;&lt;/i&gt;&lt;/b&gt;&lt;/label&gt;&lt;br /&gt;
&lt;div class="input"&gt;
&lt;input class=" enter" id="cistatina" name="cistatina" size="10" type="text" /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="clear"&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class="buttons"&gt;
&lt;input name="calcular" onclick="validar(44);" style="color: #48b548; font-size: 14px; font-style: normal; font-weight: bold;" type="button" value="...Su Cálculo" /&gt;&lt;br /&gt;
&lt;input name="limpiar" onclick="limpiar();" style="color: #ef5121; font-size: 14px; font-style: normal; font-weight: bold;" type="button" value="Nuevo Cálculo" /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="input_content"&gt;
&lt;div&gt;
&lt;label&gt;&lt;b&gt;&lt;i&gt;TFGr-Cistatina en ml/min&lt;sup&gt;-1&lt;/sup&gt;&lt;/i&gt;&lt;/b&gt;&lt;/label&gt;&lt;br /&gt;
&lt;div class="input"&gt;
&lt;input class="result" id="aclaramiento" name="aclaramiento" readonly="readonly" size="20" type="text" /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div class="clear"&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://uropediatra-online.blogspot.com/2017/06/aclaramiento-cistatina-c.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWuk1O4GQ3UcfLB3vEB97TySiicv0-UBi2VAL797KyXtfCATboZ5-HoeGw28MLwcrJupzFJq2QZsg7aUJKWpbqUYAjeH8Mr5exo6NS5Y4aHqa6FSHpNFmemZtcpIHl0KUnsVj3AENg_QG3/s72-c/Titulo+Depuraci%25C3%25B3n+Cistatina.jpg" width="72"/></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8810384161712431828.post-3021244711758405556</guid><pubDate>Thu, 01 Jun 2017 01:44:00 +0000</pubDate><atom:updated>2017-05-31T21:22:27.036-05:00</atom:updated><title>Filtrado Glomerular</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;script type="text/javascript"&gt;
&lt;!--
function Filt() {
  if (document.forms[0].crea.value=="" || document.forms[0].urea.value=="" || document.forms[0].alb.value=="" || document.forms[0].eda.value=="" || document.forms[0].sex.value=="Nada") {
    alert("Faltan datos");
  }
  else {
    creat = document.forms[0].crea.value;
    unicreat = document.forms[0].Unicrea.value;
    ure = document.forms[0].urea.value;
    uniure = document.forms[0].Uniurea.value;
    albu = document.forms[0].alb.value;
    unialbu = document.forms[0].Unialb.value;
    edad = document.forms[0].eda.value;
    sexo =  document.forms[0].sex.value;
    afroam = document.forms[0].afro.checked;
    creat = CambioComa(creat);
    ure = CambioComa(ure);
    albu = CambioComa(albu);
    edad = CambioComa(edad);
    if (Comprobar(creat) || Comprobar(ure) || Comprobar(albu) || Comprobar(edad)) {
      alert("Datos incorrectos");
    }
    else {
      if (unicreat == "uno") {
        creat = creat;
      }
      else {
        if (unicreat == "dos") {
          creat = creat/10;
        }
        else {
          creat = creat*0.0113;
        }
      }
      if (uniure=="uno") {
        ure =ure;
      }
      else {
         if (uniure=="dos") {
           ure = ure*6.01;
         }
         else {
           if (uniure=="tre") {
             ure = ure*100;
           }
           else {
             ure = ure/10;
           }
         }
      }
      if (unialbu=="dos") {
        albu = albu/10;
      }
      Cr = Math.pow(creat,0.999);
      Ed = Math.pow(edad,0.176);
      Ur = Math.pow(ure,0.17);
      Al = Math.pow(albu,0.318);
      Fi = 170/Cr;
      Fi = Fi/Ed;
      if (sexo=="Mujer") {
        Fi = Fi*0.762;
      }
      if (afroam) {
        Fi = Fi*1.18;
      }
      Fi = Fi/Ur;
      Fi = Fi*Al;
      Fi = Math.round(Fi*100)/100;
      document.forms[0].result.value = Fi;

      if (Fi &lt; 15) {
        document.forms[0].result1.value = "Fallo renal";
      }
      else {
        if (Fi &lt; 30) {
          document.forms[0].result1.value = "Disminuci\xf3n grave del filtrado glomerular. Insuficiencia renal";
        }
        else {
          if (Fi &lt; 60) {
           document.forms[0].result1.value = "Disminuci\xf3n moderada del filtrado glomerular. Insuficiencia renal";
          }
          else {
            if (Fi &lt; 90) {
             document.forms[0].result1.value = "Disminuci\xf3n leve del filtrado glomerular";
            }
            else {
              document.forms[0].result1.value = "Funci\xf3n renal normal";
            }
          }
        }
      }  

    }
  }
}

function Comprobar(numer) {
var todo = numer;
k=0;
var numeros = "0123456789.";
  for (i = 0;  i &lt; todo.length;  i++) {
    if (todo.charAt(i) == ".") {
    k++;
    }
  if (k &gt; 1) {
  return true;
  }
  }
  for (i = 0;  i &lt; todo.length;  i++) {
    for (j = 0;  j &lt; numeros.length;  j++) {
      if (todo.charAt(i) == numeros.charAt(j)) {
      break;
      }
    }
    if (j == numeros.length) {
    return true;
    }
  }
return false;
}

function CambioComa(num) {
  num2 = "";
  for (i = 0;  i &lt; num.length;  i++) {
    if (num.charAt(i) == ",") {
      num2 = num2+".";
    }
    else {
      if (num.charAt(i) == " ") {
        num2 = num2;
      }
      else {
        num2 = num2+num.charAt(i);
      }
    }
  }
  return num2;
}

function Borrar() {
 document.forms[0].crea.value = "";
 document.forms[0].Unicrea.value = "uno";
 document.forms[0].urea.value = "";
 document.forms[0].Uniurea.value = "uno";
 document.forms[0].alb.value = "";
 document.forms[0].Unialb.value = "uno";
 document.forms[0].eda.value = "";
 document.forms[0].sex.value = "Nada";
 document.forms[0].afro.checked = false;
 document.forms[0].result.value = "";
 document.forms[0].result1.value = "";
}
// --&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;div align="left"&gt;&lt;form name="aclaramiento" action="" onSubmit="return false;"&gt;&lt;p&gt;&lt;div align=left&gt;&lt;table border="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div style="width:100; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;i&gt;Edad/años*:&lt;/i&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:50; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;input type="text" name="eda" size="5" style="width:50;" class="newr" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;div align=left&gt;&lt;table border="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div style="width:80; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;i&gt;Sexo/Elija:&lt;/i&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:85; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;select name="sex" size="1" class="newr"&gt;&lt;br /&gt;
&lt;option selected="selected" value="Nada"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/option&gt;&lt;br /&gt;
&lt;option value="Hombre"&gt;Hombre&lt;/option&gt;&lt;br /&gt;
&lt;option value="Mujer"&gt;Mujer&lt;/option&gt;&lt;br /&gt;
&lt;/select&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;div align=left&gt;&lt;table border="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div style="width:100; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;i&gt;Raza/AfroA:&lt;/i&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:50; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;input type="checkbox" name="afro" /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;div align=left&gt;&lt;table border="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div style="width:100; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;i&gt;Creatinina:&lt;/i&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:50; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;input type="text" name="crea" size="5" style="width:50;" class="newr" /&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:94; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;select name="Unicrea" size="1" class="newr"&gt;&lt;br /&gt;
&lt;option selected="selected" value="uno"&gt;&amp;nbsp;mg/100 ml&amp;nbsp;&lt;/option&gt;&lt;br /&gt;
&lt;option value="dos"&gt;&amp;nbsp;mg/l&amp;nbsp;&lt;/option&gt;&lt;br /&gt;
&lt;option value="tres"&gt;&amp;nbsp;&amp;#181;mol/l&amp;nbsp;&lt;/option&gt;&lt;br /&gt;
&lt;/select&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;div align=left&gt;&lt;table border="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div style="width:100; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;i&gt;Valor/Urea:&lt;/i&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:50; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;input type="text" name="urea" size="5" style="width:50;" class="newr" /&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:94; height:24; font-size: 16px; font-style: normal; font-weight:bold; text-align:left;"&gt;&lt;select name="Uniurea" size="1" class="newr"&gt;&lt;br /&gt;
&lt;option selected="selected" value="uno"&gt;&amp;nbsp;mg/100 ml&amp;nbsp;&lt;/option&gt;&lt;br /&gt;
&lt;option value="dos"&gt;&amp;nbsp;mmol/l&amp;nbsp;&lt;/option&gt;&lt;br /&gt;
&lt;option value="tre"&gt;&amp;nbsp;g/l&amp;nbsp;&lt;/option&gt;&lt;br /&gt;
&lt;option value="cua"&gt;&amp;nbsp;mg/l&amp;nbsp;&lt;/option&gt;&lt;br /&gt;
&lt;/select&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;div align=left&gt;&lt;table border="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div style="width:100; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;i&gt;Valor/Albu:&lt;/i&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:50; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;input type="text" name="alb" size="5" style="width:50;" class="newr" /&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:94; height:24; font-size: 16px; font-style: normal; font-weight:bold; text-align:left;"&gt;&lt;select name="Unialb" size="1" class="newr"&gt;&lt;br /&gt;
&lt;option selected="selected" value="uno"&gt;&amp;nbsp;g/100 ml&amp;nbsp;&lt;/option&gt;&lt;br /&gt;
&lt;option value="dos"&gt;&amp;nbsp;g/l&amp;nbsp;&lt;/option&gt;&lt;br /&gt;
&lt;/select&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;div align=left&gt;&lt;table border="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div style="width:165; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;button onClick="Filt(); return false;" style="width:165;"&gt;&lt;span style="font-style:normal; font-weight:bold; color:#48B548; font-size:14px;"&gt;&lt;i&gt;...Su Cálculo&lt;/i&gt;&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:165; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;button onClick="Borrar(); return false;" style="width:165;"&gt;&lt;span style="font-style:normal; font-weight:bold; color:#EF5121; font-size:14px;"&gt;&lt;i&gt;Nuevo Cálculo&lt;/i&gt;&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;&lt;div align=left&gt;&lt;table border="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;div style="width:170; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;i&gt;FG en ml/min/1,73 m&amp;sup2;:&lt;/i&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div style="width:120; height:24; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;input type="text" name="result" size="15" style="width:120;" class="newr" readonly="readonly" /&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;div align="left" style="width:350; height:50; font-size: 16px; font-style: normal; font-weight:bold;"&gt;&lt;input type="text" name="result1" size="49" style="width:350;" class="newr" readonly="readonly" /&gt;&lt;/div&gt;&lt;/form&gt;&lt;/div&gt;</description><link>http://uropediatra-online.blogspot.com/2017/05/filtrado-glomerular.html</link><author>noreply@blogger.com (Luis Fernando Gonzalez Llinás)</author></item></channel></rss>