<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>ini.php</filename>
    </added>
    <added>
      <filename>resources/public/help/wildfire_cms_help.pdf</filename>
    </added>
    <added>
      <filename>view/shared/help.html</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -37,6 +37,12 @@ class CMSAdminComponent extends WaxController {
 	public $allowed_images = false; //if a number then allows the use images to be attached (cms_content only by default)
 	public $allowed_categories = false; //if true then allows the use of categories (cms_content only by default)
 
+
+  public $base_help = array('CMS Overview'=&gt;array('file' =&gt; &quot;/help/wildfire_cms_help.pdf&quot;));
+  public $extra_help = array();
+  public $help_files = array(); //merged result of the 2 above
+  public $help_titles = array('index' =&gt; 'Listing', 'edit'=&gt;'Editing', 'create'=&gt;'Creating');
+
 	/** scaffold columns can be overrided to specify what properties are listed
 	* @var array
 	**/
@@ -49,7 +55,8 @@ class CMSAdminComponent extends WaxController {
 	public $permissions = array();
 	
 	function __construct($initialise = true) {
-	  $this-&gt;permissions = array_merge($this-&gt;base_permissions,$this-&gt;permissions);
+	  $this-&gt;permissions = array_unique(array_merge($this-&gt;base_permissions,$this-&gt;permissions));
+	  $this-&gt;help_files = array_unique(array_merge($this-&gt;extra_help, $this-&gt;base_help));
 	  if($initialise) $this-&gt;initialise();
 	}
 	
@@ -250,5 +257,7 @@ class CMSAdminComponent extends WaxController {
 		return $desc;
 	}
 	
+	public function help(){}
+	
 }
 ?&gt;
\ No newline at end of file</diff>
      <filename>lib/controller/CMSAdminComponent.php</filename>
    </modified>
    <modified>
      <diff>@@ -28,7 +28,7 @@ class CMSAdminContentController extends AdminComponent {
 	public $status_col = &quot;status&quot;;
 	public $modal_preview = false;
 	public $languages = array(0=&gt;&quot;english&quot;);
-	public $permissions = array(&quot;create&quot;,&quot;edit&quot;,&quot;delete&quot;,&quot;categories&quot;,&quot;attach_images&quot;,&quot;inline_images&quot;,&quot;html&quot;,&quot;video&quot;,&quot;audio&quot;);
+	public $permissions = array(&quot;create&quot;,&quot;edit&quot;,&quot;delete&quot;,&quot;categories&quot;,&quot;attach_images&quot;,&quot;inline_images&quot;,&quot;html&quot;,&quot;video&quot;,&quot;audio&quot;, &quot;publish&quot;);
 	
 	public function controller_global(){
     if($ids = $this-&gt;current_user-&gt;allowed_sections_ids) $this-&gt;model-&gt;filter(array(&quot;cms_section_id&quot;=&gt;$ids));
@@ -128,15 +128,72 @@ class CMSAdminContentController extends AdminComponent {
 		$this-&gt;image_model = new WildfireFile;
 		//partials
 	}
-	
-	public function setup_preview_defaults($preview, $master, $copy_attributes){
-	  $preview-&gt;status = 4;
-    $saved = $preview-&gt;save();
-  	if($saved &amp;&amp; $saved-&gt;primval) $preview-&gt;set_attributes($copy_attributes);
-  	$preview-&gt;status = 4;
-  	$preview-&gt;url = $master-&gt;url;
-  	$preview-&gt;master = $master-&gt;primval;
-  	return $preview-&gt;save();
+	/**
+	 * get the other language model for a master - creates one if it doesn't exist
+	 *
+	 * @param string $master 
+	 * @param integer $lang_id 
+	 * @return WaxModel - new language model
+	 */
+	private function get_language_model($master, $lang_id){
+	  $model = new $this-&gt;model_class;
+    if($lang_model = $model-&gt;filter(array('preview_master_id'=&gt;$master-&gt;primval,'language'=&gt;$lang_id))-&gt;first()){
+      return $lang_model;
+    }else{
+	    Session::add_message(&quot;A {$this-&gt;languages[$lang_id]} version of this content has been created. The {$this-&gt;languages[0]} content was copied into it for convenience.&quot;);
+	    //if a lang entry doesn't exist create one
+		  foreach($master-&gt;columns as $col =&gt; $params)
+		    if($master-&gt;$col) $copy_attributes[$col] = $master-&gt;$col;
+		  $copy_attributes = array_diff_key($copy_attributes,array($master-&gt;primary_key=&gt;false,'revisions'=&gt;false)); //take out ID and revisions
+		  
+  	  $lang = new $this-&gt;model_class;
+  	  $lang-&gt;save();
+		  $lang-&gt;set_attributes($copy_attributes);
+		  $lang-&gt;status = 5;
+		  $lang-&gt;url = $master-&gt;url;
+		  $lang-&gt;master = $master-&gt;primval;
+		  $lang-&gt;language = $lang_id;
+		  $lang-&gt;save();
+		  return $lang;
+    }
+	}
+	/**
+	 * get the preview revision for a master - creates one if it doesn't exist
+	 *
+	 * @param string $master 
+	 * @return WaxModel - existing copy of the model, new copy of the model, or the master itself
+	 */
+	private function get_preview_model($master){
+		if(!in_array($master-&gt;status,array(1,6))) return $master; //pass through for everything but published articles
+	  $preview = new $this-&gt;model_class;
+	  $ret = $preview-&gt;filter(&quot;preview_master_id&quot;,$master-&gt;{$master-&gt;primary_key})-&gt;filter(&quot;status&quot;,4)-&gt;first();
+	  if(!$ret){ //if a preview entry doesn't exist create one
+      $preview-&gt;clear()-&gt;save(); //create preview model, needs an ID so associations will work
+		  $preview_primval = $preview-&gt;primval(); //save new ID to put back later
+		  foreach($master-&gt;columns as $col =&gt; $params) if($master-&gt;$col) $preview-&gt;$col = $master-&gt;$col; //copy all columns into the preview model
+	    $preview-&gt;{$preview-&gt;primary_key} = $preview_primval;
+      $preview-&gt;status = 4;
+      $preview-&gt;preview_master_id = $master-&gt;primval;
+    	$ret = $preview-&gt;save();
+    }
+    return $ret;
+	}
+	/**
+	 * update the master with the preview's details, every field is updated except primary key and status
+	 *
+	 * @param string $preview 
+	 * @param string $master 
+	 * @return WaxModel - updated master
+	 */
+	private function update_master($preview, $master){
+	  if($preview instanceOf $this-&gt;model_class &amp;&amp; $preview-&gt;primval){
+      $preview-&gt;set_attributes($_POST[$preview-&gt;table]);
+      $preview-&gt;status = 4;
+      $preview-&gt;save();
+  	  foreach($preview-&gt;columns as $col =&gt; $params) if($preview-&gt;$col) $copy_attributes[$col] = $preview-&gt;$col;
+  	  $copy_attributes = array_diff_key($copy_attributes,array_flip(array($preview-&gt;primary_key,&quot;master&quot;,&quot;status&quot;))); //take out IDs and status
+	    return $master-&gt;update_attributes($copy_attributes);
+    }else return $master;
 	}
 	/**
 	* the editing function... lets you change all the bits associated with the content record
@@ -145,59 +202,46 @@ class CMSAdminContentController extends AdminComponent {
 	* render the partials
 	*/
 	public function edit() {
-	  $this-&gt;id = WaxUrl::get(&quot;id&quot;);
-		if(!$this-&gt;id) $this-&gt;id = $this-&gt;route_array[0];
-
 		if(($lang_id = Request::get(&quot;lang&quot;)) &amp;&amp; (!$this-&gt;languages[$lang_id])){
 	    Session::add_message(&quot;That language isn't allowed on your system. Here's the {$this-&gt;languages[0]} version instead.&quot;);
 	    $this-&gt;redirect_to(&quot;/admin/&quot;.$this-&gt;module_name.&quot;/edit/$this-&gt;id&quot;);
     }
 
-    $master = new $this-&gt;model_class($this-&gt;id);
-    if($master-&gt;status == 4) $this-&gt;redirect_to(&quot;/admin/&quot;.$this-&gt;module_name.&quot;/edit/$master-&gt;preview_master_id&quot;); //this isn't a master, jump to the right url
-    if($master-&gt;language) $this-&gt;redirect_to(&quot;/admin/&quot;.$this-&gt;module_name.&quot;/edit/$master-&gt;preview_master_id?lang=&quot;.$master-&gt;language);
+	  $this-&gt;id = WaxUrl::get(&quot;id&quot;);
+		if(!$this-&gt;id) $this-&gt;id = $this-&gt;route_array[0];
+    if(!($this-&gt;model = new $this-&gt;model_class($this-&gt;id))){
+      $this-&gt;redirect_to(Session::get(&quot;list_refer&quot;));
+    }
     
-    if($lang_id) $master = $this-&gt;get_language_model($master, $lang_id);
+    //if this is a revision, jump to the master
+    if($this-&gt;model-&gt;preview_master_id) $this-&gt;redirect_to(&quot;/admin/&quot;.$this-&gt;module_name.&quot;/edit/&quot;.$this-&gt;model-&gt;preview_master_id.&quot;?lang=&quot;.$this-&gt;model-&gt;language);
 
-	  $preview = new $this-&gt;model_class;
-	  //preview revision - create a copy of the content if needed or use the existing copy
-		if(($master-&gt;status == 1) || ($master-&gt;status == 6)){
-		  if(!($preview = $preview-&gt;filter(array(&quot;preview_master_id&quot; =&gt; $master-&gt;primval, &quot;status&quot; =&gt; 4))-&gt;first())){
-		    //if a preview entry doesn't exist create one
-  		  foreach($master-&gt;columns as $col =&gt; $params){
-  		    if($master-&gt;$col) $copy_attributes[$col] = $master-&gt;$col;
-		    }
-  		  $copy_attributes = array_diff_key($copy_attributes,array($this-&gt;model-&gt;primary_key =&gt; false)); //take out ID
-    	  $preview = new $this-&gt;model_class;
-				$preview = $this-&gt;setup_preview_defaults($preview, $master, $copy_attributes);
-	    }
-      $this-&gt;model = $preview;
-		}else{
-		  $this-&gt;model = $master;
-		}
-		if($this-&gt;model-&gt;is_posted()){
-  		if($_POST['publish']){
-  		  if(($master-&gt;status != 1) &amp;&amp; ($master-&gt;status != 6)){
-  		    $master-&gt;set_attributes($_POST[$master-&gt;table]);
-  		    if($master-&gt;status == 5) $master-&gt;status = 6;
-  		    else $master-&gt;status = 1;
-  		    $master-&gt;save();
-	      }else{
-	        $this-&gt;update_master($preview, $master);
-	        if($preview-&gt;primval) $preview-&gt;delete();
+    if($lang_id) $this-&gt;model = $this-&gt;get_language_model($this-&gt;model, $lang_id);
+    $this-&gt;model = $this-&gt;get_preview_model($this-&gt;model);
+
+    //this massive block handles the possible posts for save (default), publish and close
+		if($this-&gt;model &amp;&amp; $this-&gt;model-&gt;is_posted()){
+  		if($_POST['close_x']) $this-&gt;redirect_to(Session::get(&quot;list_refer&quot;));
+  		elseif($_POST['publish_x']){
+        if($this-&gt;model-&gt;status == 4){ //if we have a preview copy we should update the master and destroy the copy
+	        $this-&gt;update_master($this-&gt;model, $this-&gt;model-&gt;master);
+	        $this-&gt;model-&gt;delete();
+	      }else{ //otherwise this is a first publish, and we should just save, forcing the status to be published
+  		    $this-&gt;model-&gt;set_attributes($_POST[$this-&gt;model-&gt;table]);
+  		    if($this-&gt;model-&gt;status == 5) $this-&gt;model-&gt;status = 6;
+  		    else $this-&gt;model-&gt;status = 1;
+  		    $this-&gt;model-&gt;save();
 	      }
 		    Session::add_message($this-&gt;display_name.&quot; &quot;.&quot;Successfully Published&quot;);
-		    $this-&gt;redirect_to(&quot;/admin/$this-&gt;module_name/&quot;);
-  		}elseif($_POST['close']){
-		    //delete the preview if it has no changes from the master
-		    if($preview-&gt;equals($master) &amp;&amp; $preview-&gt;primval) $preview-&gt;delete();
-  		  $this-&gt;redirect_to(Session::get(&quot;list_refer&quot;));
+		    $this-&gt;redirect_to(Session::get(&quot;list_refer&quot;));
   	  }else{ //save button is default post, as it's the least destructive thing to do
-  	    if($preview-&gt;primval &amp;&amp; (($_POST[$this-&gt;model-&gt;table]['status'] == 0) || ($_POST[$this-&gt;model-&gt;table]['status'] == 5))){
-          $this-&gt;update_master($preview, $master);
-          if($preview-&gt;primval) $preview-&gt;delete();
-          $this-&gt;save($master, &quot;/admin/$this-&gt;module_name/edit/&quot;.$master-&gt;id.&quot;/&quot;);
-  	    }else $this-&gt;save($this-&gt;model, &quot;/admin/$this-&gt;module_name/edit/&quot;.$master-&gt;id.&quot;/&quot;);
+  	    //unpublish a published article (i.e. current status is 4 and saving status back to 0 or 5)
+  	    if(($this-&gt;model-&gt;status == 4) &amp;&amp; (($_POST[$this-&gt;model-&gt;table]['status'] == 0) || ($_POST[$this-&gt;model-&gt;table]['status'] == 5))){
+  	      $preview = $this-&gt;model;
+          $this-&gt;model = $this-&gt;update_master($this-&gt;model, $this-&gt;model-&gt;master);
+          $preview-&gt;delete();
+  	    }
+  	    $this-&gt;save($this-&gt;model, &quot;/admin/$this-&gt;module_name/edit/&quot;.$this-&gt;model-&gt;id.&quot;/&quot;);
   	  }
     }
 
@@ -226,51 +270,6 @@ class CMSAdminContentController extends AdminComponent {
 		
 	}
 	/**
-	 * update the master with the preview's details, every field is updated except primary key and status
-	 *
-	 * @param string $preview 
-	 * @param string $master 
-	 * @return WaxModel - updated master
-	 */
-	private function update_master($preview, $master){
-    $preview-&gt;set_attributes($_POST[$preview-&gt;table]);
-    $preview-&gt;status = 4;
-    $preview-&gt;save();
-	  foreach($preview-&gt;columns as $col =&gt; $params)
-	    $copy_attributes[$col] = $preview-&gt;$col;
-	  $copy_attributes = array_diff_key($copy_attributes,array_flip(array($preview-&gt;primary_key,&quot;master&quot;,&quot;status&quot;))); //take out IDs and status
-	  return $master-&gt;update_attributes($copy_attributes);
-	}
-	/**
-	 * get the other language model for a master - creates one if it doesn't exist
-	 *
-	 * @param string $master 
-	 * @param integer $lang_id 
-	 * @return WaxModel - new language model
-	 */
-	private function get_language_model($master, $lang_id){
-	  $model = new $this-&gt;model_class;
-    if($lang_model = $model-&gt;filter(array('preview_master_id'=&gt;$master-&gt;primval,'language'=&gt;$lang_id))-&gt;first()){
-      return $lang_model;
-    }else{
-	    Session::add_message(&quot;A {$this-&gt;languages[$lang_id]} version of this content has been created. The {$this-&gt;languages[0]} content was copied into it for convenience.&quot;);
-	    //if a lang entry doesn't exist create one
-		  foreach($master-&gt;columns as $col =&gt; $params)
-		    if($master-&gt;$col) $copy_attributes[$col] = $master-&gt;$col;
-		  $copy_attributes = array_diff_key($copy_attributes,array($master-&gt;primary_key=&gt;false,'revisions'=&gt;false)); //take out ID and revisions
-		  
-  	  $lang = new $this-&gt;model_class;
-  	  $lang-&gt;save();
-		  $lang-&gt;set_attributes($copy_attributes);
-		  $lang-&gt;status = 5;
-		  $lang-&gt;url = $master-&gt;url;
-		  $lang-&gt;master = $master-&gt;primval;
-		  $lang-&gt;language = $lang_id;
-		  $lang-&gt;save();
-		  return $lang;
-    }
-	}
-	/**
 	 * delete function - cleans up any preview content for the deleted content
 	 *
 	 * @return void</diff>
      <filename>lib/controller/CMSAdminContentController.php</filename>
    </modified>
    <modified>
      <diff>@@ -21,33 +21,38 @@ class CMSAdminEmailController extends AdminComponent {
 	public $default_direction = 'DESC';
 	
 	public $show_operations = false;
+	public $base_permissions = array(&quot;enabled&quot;,&quot;menu&quot;);
+	public $permissions = array('create');
 	
 	function __construct($initialise = true) {
+	  $this-&gt;permissions = array_unique(array_merge($this-&gt;base_permissions,$this-&gt;permissions));
+	  $this-&gt;help_files = array_unique(array_merge($this-&gt;extra_help, $this-&gt;base_help));
 	  if($initialise) $this-&gt;initialise();
 	}
 
 	private function initialise() {
 		$auth = new WaxAuthDb(array(&quot;encrypt&quot;=&gt;false, &quot;db_table&quot;=&gt;$this-&gt;auth_database_table, &quot;session_key&quot;=&gt;&quot;wildfire_user_cookie&quot;));
 		$this-&gt;current_user = $auth-&gt;get_user();
+		if($this-&gt;current_user) $this-&gt;current_user-&gt;fetch_permissions();
 
-		$this-&gt;before_filter(&quot;all&quot;, &quot;check_authorised&quot;, array(&quot;login&quot;));
-		$this-&gt;configure_modules();
-		$this-&gt;all_modules = CMSApplication::get_modules(true);
-		if(!array_key_exists($this-&gt;module_name,CMSApplication::get_modules())){
+		$this-&gt;all_modules = $this-&gt;configure_modules();
+		$this-&gt;menu_modules = $this-&gt;configure_modules('menu');
+	
+	  if(!in_array(Request::get(&quot;action&quot;),array(&quot;login&quot;,&quot;install&quot;))) $this-&gt;check_authorised();
+		
+		if(!array_key_exists($this-&gt;module_name, $this-&gt;all_modules)){
 			Session::add_message('This component is not registered with the application.');
 			$this-&gt;redirect_to('/admin/home/index');
 		}
-
+	  
+		if($this-&gt;current_user &amp;&amp; $this-&gt;current_user-&gt;access($this-&gt;module_name,&quot;create&quot;)) $this-&gt;sub_links[&quot;create&quot;] = &quot;Create New &quot;. $this-&gt;display_name;
+		
+		if(!$this-&gt;this_page = WaxUrl::get(&quot;page&quot;)) $this-&gt;this_page=1;
 		$this-&gt;cm_conf = CmsConfiguration::get(&quot;general&quot;);
 		if($this-&gt;model_class) {							
 			$this-&gt;model = new $this-&gt;model_class($this-&gt;cm_conf['campaign_monitor_ClientID']);
 		  $this-&gt;model_name = Inflections::underscore($this-&gt;model_class);
 	  }
-
-		$this-&gt;sub_links[&quot;create&quot;] = &quot;Create New &quot;. $this-&gt;display_name;
-		$this-&gt;sub_links[&quot;view_subscriber&quot;] = &quot;View Subscribers&quot;;
-		$this-&gt;sub_links[&quot;view_segments&quot;] = &quot;View Segments&quot;;
-		if(!$this-&gt;this_page = WaxUrl::get(&quot;page&quot;)) $this-&gt;this_page=1;
 	}
 	
 	/**
@@ -96,10 +101,11 @@ class CMSAdminEmailController extends AdminComponent {
 				$this-&gt;redirect_to('/admin/email');				
 			}
 		}		
-		
-		$lists = $model-&gt;GetLists();
+		$mod = new $this-&gt;model_class($this-&gt;cm_conf['campaign_monitor_ClientID']);
+		$lists = $mod-&gt;GetLists();
 		$this-&gt;mail_lists = array_merge(array(''=&gt;array('ListID'=&gt;'', 'Name'=&gt;'None')), $lists-&gt;rowset);
-		$segments = $model-&gt;GetSegments();
+		$mod = new $this-&gt;model_class($this-&gt;cm_conf['campaign_monitor_ClientID']);
+		$segments = $mod-&gt;GetSegments();
 		$this-&gt;segments = array_merge(array(''=&gt;array('ListID'=&gt;'', 'Name'=&gt;'None')), $segments-&gt;rowset);
 		$cont = new CmsContent(&quot;published&quot;);
 		$this-&gt;contents = $cont-&gt;all();</diff>
      <filename>lib/controller/CMSAdminEmailController.php</filename>
    </modified>
    <modified>
      <diff>@@ -181,27 +181,31 @@ class CMSAdminFileController extends AdminComponent {
 	
 	
 	public function browse_images() {
-		$this-&gt;use_layout=false;
+		$this-&gt;browse_filesystem();
+	}
+	
+	public function browse_filesystem(){
+	  $mime_type = $_REQUEST['mime_type'];
+	  $this-&gt;use_layout=false;
 	  $model = new WildfireFile(&quot;available&quot;);
+	  $model-&gt;order(&quot;filename ASC&quot;);
 	  $fs = new CmsFilesystem;
-	  $folder = $fs-&gt;relativePath;
-		if(!$folder) $folder =&quot;files&quot;;
-	  $this-&gt;all_images = $model-&gt;filter(array(&quot;status&quot;=&gt;&quot;found&quot;,&quot;rpath&quot;=&gt;$folder))-&gt;filter(&quot;type LIKE '%image%'&quot;)-&gt;order(&quot;filename ASC&quot;)-&gt;all();
-  	if($_POST['filterfolder']) {
-  	  $this-&gt;all_images = $model-&gt;clear()-&gt;filter(array(&quot;status&quot;=&gt;&quot;found&quot;,&quot;rpath&quot;=&gt;$_POST['filterfolder']))-&gt;filter(&quot;type LIKE '%image%'&quot;)-&gt;order(&quot;filename ASC&quot;)-&gt;all();
-  	}
-    $this-&gt;all_images_partial = $this-&gt;render_partial(&quot;list_all_images&quot;);  
+	  $default_folder = $fs-&gt;relativePath;
+		if(!$default_folder) $default_folder =&quot;files&quot;;
+		if($mime_type != &quot;all&quot;) $model-&gt;filter(&quot;type&quot;,&quot;%&quot;.Request::param('mime_type').&quot;%&quot;, &quot;LIKE&quot;);	  
+		if($filter = Request::param('filter')){
+      $filter = mysql_escape_string($filter);
+      $model-&gt;filter(&quot;(id LIKE '%$filter%' OR filename LIKE '%$filter%' OR description LIKE '%$filter%')&quot;);
+    }
+    if($folder=Request::post('filterfolder')) $this-&gt;all_images = $model-&gt;filter(&quot;rpath&quot;, $folder)-&gt;all();
+  	else if(!Request::param('filter')) $this-&gt;all_images = $model-&gt;filter(&quot;rpath&quot;, $default_folder)-&gt;all();
+  	else $this-&gt;all_images = $model-&gt;all();
+    $this-&gt;all_images_partial = $this-&gt;render_partial(&quot;list_all_images&quot;);
 	}
 	
 	public function image_filter() {
-	  if(strlen($_POST['filter'])&lt;1) {
-	    $this-&gt;route_array[0] = &quot;1&quot;;
-	    $this-&gt;browse_images();
-	  } else {
-      $this-&gt;use_layout=false;
-      $this-&gt;all_images = ($image = new WildfireFile(&quot;available&quot;)) ? $image-&gt;find_filter_images($_POST['filter'], &quot;30&quot;): array();
-      $this-&gt;all_images_partial = $this-&gt;render_partial(&quot;list_all_images&quot;);
-    }
+	  $this-&gt;browse_filesystem();
+	  $this-&gt;use_view = &quot;image_filter&quot;;
   }
   
   public function preview() {</diff>
      <filename>lib/controller/CMSAdminFileController.php</filename>
    </modified>
    <modified>
      <diff>@@ -37,6 +37,16 @@ class CMSAdminSectionController extends AdminComponent {
     $this-&gt;model = new $this-&gt;model_class(Request::get(&quot;id&quot;));
 		$this-&gt;form();
 	}
+	
+	public function create(){
+		$this-&gt;possible_parents = array(&quot;None&quot;);
+		foreach($this-&gt;model-&gt;tree() as $section){ //all sections
+			$tmp = str_pad(&quot;&quot;, $section-&gt;get_level(), &quot;*&quot;, STR_PAD_LEFT);
+			$tmp = str_replace(&quot;*&quot;, &quot;&amp;nbsp;&amp;nbsp;&quot;, $tmp);
+			$this-&gt;possible_parents[$section-&gt;id] = $tmp.$section-&gt;title;
+		}
+	  parent::create();
+	}
 
   public function create($save=true) {
   	$this-&gt;model = new $this-&gt;model_class();		</diff>
      <filename>lib/controller/CMSAdminSectionController.php</filename>
    </modified>
    <modified>
      <diff>@@ -18,6 +18,7 @@ class CMSApplicationController extends WaxController{
 	public $languages = array(0=&gt;&quot;english&quot;);
 	public $content_model = &quot;CmsContent&quot;;
 	public $section_model = &quot;CmsSection&quot;;
+	public $exclude_default_content = false; //this can be used in the cms_list / nav to check if you should show the default content
 	
 	//default action when content/section is found
 	public function cms_content() {}
@@ -125,16 +126,12 @@ class CMSApplicationController extends WaxController{
 	 */	
 	protected function find_content($url){
 		$content = new $this-&gt;content_model();
-    
 		if($url){
-	    if(!($this-&gt;cms_content = $content-&gt;scope(&quot;published&quot;)-&gt;filter(array('url'=&gt;$url, 'cms_section_id'=&gt;$this-&gt;cms_section-&gt;id))-&gt;first())) //first look inside the section
+	    if(!($this-&gt;cms_content = $content-&gt;scope(&quot;published&quot;)-&gt;filter(array('url'=&gt;$url, 'cms_section_id'=&gt;$this-&gt;cms_section-&gt;primval))-&gt;first())) //first look inside the section
 			  $this-&gt;cms_content = $content-&gt;clear()-&gt;scope(&quot;published&quot;)-&gt;filter(array('url'=&gt;$url))-&gt;first(); //then look anywhere for the matched url
 		  
-		  //print_r(Session::get(&quot;wildfire_language_id&quot;)); exit;
 		  if((count($this-&gt;languages) &gt; 1) &amp;&amp; ($lang_id = Session::get(&quot;wildfire_language_id&quot;)) &amp;&amp; $this-&gt;languages[$lang_id] &amp;&amp; $this-&gt;cms_content){ //look for another language version
-  			if($logged_in) $access_filter = array(&quot;status&quot; =&gt; array(5,6));
-  	    else $access_filter = array(&quot;status&quot; =&gt; 6);
-	      $lang_content = $content-&gt;clear()-&gt;scope(&quot;published&quot;)-&gt;filter(array(&quot;preview_master_id&quot;=&gt;$this-&gt;cms_content-&gt;primval,&quot;language&quot;=&gt;$lang_id))-&gt;first();
+	      $lang_content = $content-&gt;clear()-&gt;scope(&quot;published&quot;)-&gt;filter(&quot;status&quot;,6)-&gt;filter(array(&quot;preview_master_id&quot;=&gt;$this-&gt;cms_content-&gt;primval,&quot;language&quot;=&gt;$lang_id))-&gt;first();
 	      if($lang_content) $this-&gt;cms_content = $lang_content;
 		  }
 		  
@@ -324,39 +321,38 @@ class CMSApplicationController extends WaxController{
 			}	
       echo &quot;Uploaded&quot;;
     } elseif($_FILES) {
-      error_log(&quot;Starting File upload&quot;);
-      error_log(print_r($_POST,1));
-        $path = $_POST['wildfire_file_folder'];
-        $fs = new CmsFilesystem;
-        $_FILES['upload'] = $_FILES[&quot;Filedata&quot;];
-				$_FILES['upload']['name'] = str_replace(' ', '', $_FILES['upload']['name']);
-        $fs-&gt;upload($path);
-        $fs-&gt;databaseSync($fs-&gt;defaultFileStore.$path, $path);
-				$fname = $fs-&gt;defaultFileStore.$path.&quot;/&quot;.$_FILES['upload']['name'];
-				if($dimensions = getimagesize($fname)) {
-				  if($dimensions[2]==&quot;7&quot; || $dimensions[2]==&quot;8&quot;) {
-						WaxLog::log(&quot;error&quot;, &quot;Detected TIFF Upload&quot;);
-						$command=&quot;mogrify &quot;.escapeshellcmd($fname).&quot; -colorspace RGB -format jpg&quot;;
-						system($command);
-						$newname = str_replace(&quot;.tiff&quot;, &quot;.jpg&quot;,$fname);
-						$newname = str_replace(&quot;.tif&quot;, &quot;.jpg&quot;,$newname);
-						rename($fname, $newname);
-					}
-				}
-				chmod($fname, 0777);				
-        $file = new WildfireFile;
-        $newfile = $file-&gt;filter(array(&quot;filename&quot;=&gt;$_FILES['upload']['name'], &quot;rpath&quot;=&gt;$path))-&gt;first();
-        $newfile-&gt;description = $_POST[&quot;wildfire_file_description&quot;];
-				$newfile-&gt;save();		
-				//if these are set then attach the image to the doc!
-				if(Request::post('content_id') &amp;&amp; Request::post('model_string') &amp;&amp; Request::post('join_field') ){
-					$model_id = Request::post('content_id');
-					$class = Inflections::camelize(Request::post('model_string'));
-					$field = Request::post('join_field');
-					$model = new $class($model_id);
-					$model-&gt;$field = $newfile;
+      $path = $_POST['wildfire_file_folder'];
+      $fs = new CmsFilesystem;
+      $_FILES['upload'] = $_FILES[&quot;Filedata&quot;];
+			$_FILES['upload']['name'] = str_replace(' ', '', $_FILES['upload']['name']);
+      $fs-&gt;upload($path);
+      $fs-&gt;databaseSync($fs-&gt;defaultFileStore.$path, $path);
+			$fname = $fs-&gt;defaultFileStore.$path.&quot;/&quot;.$_FILES['upload']['name'];
+			if($dimensions = getimagesize($fname)) {
+			  if($dimensions[2]==&quot;7&quot; || $dimensions[2]==&quot;8&quot;) {
+					WaxLog::log(&quot;error&quot;, &quot;Detected TIFF Upload&quot;);
+					$command=&quot;mogrify &quot;.escapeshellcmd($fname).&quot; -colorspace RGB -format jpg&quot;;
+					system($command);
+					$newname = str_replace(&quot;.tiff&quot;, &quot;.jpg&quot;,$fname);
+					$newname = str_replace(&quot;.tif&quot;, &quot;.jpg&quot;,$newname);
+					rename($fname, $newname);
 				}
-        echo &quot;Uploaded&quot;;
+			}
+			
+			@chmod($fname, 0777);				
+      $file = new WildfireFile;
+      $newfile = $file-&gt;filter(array(&quot;filename&quot;=&gt;$_FILES['upload']['name'], &quot;rpath&quot;=&gt;$path))-&gt;first();
+      $newfile-&gt;description = $_POST[&quot;wildfire_file_description&quot;];
+			$newfile-&gt;save();		
+			//if these are set then attach the image to the doc!
+			if(Request::post('content_id') &amp;&amp; Request::post('model_string') &amp;&amp; Request::post('join_field') ){
+				$model_id = Request::post('content_id');
+				$class = Inflections::camelize(Request::post('model_string'), true);
+				$field = Request::post('join_field');
+				$model = new $class($model_id);
+				$model-&gt;$field = $newfile;
+			}
+      echo &quot;Uploaded&quot;;
     } else die(&quot;UPLOAD ERROR&quot;);
     exit;
 	}</diff>
      <filename>lib/controller/CMSApplicationController.php</filename>
    </modified>
    <modified>
      <diff>@@ -51,8 +51,8 @@ class CmsTextFilter  {
   }
   
   static public function strip_attributes($text) {
-		$text = preg_replace(&quot;/&lt;(table|td|tr|tbody|thead|tfoot)\s+([^&gt;]*)(border|bgcolor|background|style)+([^&gt;]*)&gt;/&quot;, &quot;&lt;$1 $2 $3\&gt;&quot;, $text);
-    return preg_replace(&quot;/&lt;(p|h1|h2|h3|h4|h5|h6|ul|ol|li|span|font)\s+([^&gt;]*)&gt;/&quot;, &quot;&lt;$1&gt;&quot;, $text);
+		$text = preg_replace(&quot;/&lt;(table|td|tr|tbody|thead|tfoot)\s+([^&gt;]*)(border|bgcolor|background|style)+([^&gt;]*)&gt;/i&quot;, &quot;&lt;$1 $2 $3\&gt;&quot;, $text);
+    return preg_replace(&quot;/&lt;(p|h1|h2|h3|h4|h5|h6|ul|ol|li|span|font)\s+([^&gt;]*)( class=\&quot;.*?\&quot;)([^&gt;]*)&gt;/i&quot;, &quot;&lt;$1$3&gt;&quot;, $text);
   }
   
   static public function clean_word($text) {</diff>
      <filename>lib/filters/CmsTextFilter.php</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ class WildfireUser extends WaxModel {
     $this-&gt;define(&quot;firstname&quot;, &quot;CharField&quot;);
     $this-&gt;define(&quot;surname&quot;, &quot;CharField&quot;);
     $this-&gt;define(&quot;email&quot;, &quot;CharField&quot;);
-    $this-&gt;define(&quot;password&quot;, &quot;CharField&quot;);
+    $this-&gt;define(&quot;password&quot;, &quot;PasswordField&quot;);
     
     $this-&gt;define(&quot;allowed_sections&quot;, &quot;ManyToManyField&quot;, array('target_model' =&gt; 'CmsSection'));
     $this-&gt;define(&quot;permissions&quot;, &quot;HasManyField&quot;, array('target_model' =&gt; 'CmsPermission', 'join_order' =&gt; 'class', 'join_field' =&gt; 'wildfire_user_id', 'eager_loading' =&gt; true));</diff>
      <filename>lib/model/WildfireUser.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,4 @@
-/*
- * 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 l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^&lt;]*(&lt;(.|\s)+&gt;)[^&gt;]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E===&quot;string&quot;){var G=D.exec(E);if(G&amp;&amp;(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&amp;&amp;I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&amp;&amp;E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:&quot;&quot;,jquery:&quot;1.3.2&quot;,size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H===&quot;find&quot;){G.selector=this.selector+(this.selector?&quot; &quot;:&quot;&quot;)+E}else{if(H){G.selector=this.selector+&quot;.&quot;+H+&quot;(&quot;+E+&quot;)&quot;}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&amp;&amp;E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F===&quot;string&quot;){if(H===g){return this[0]&amp;&amp;o[G||&quot;attr&quot;](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E==&quot;width&quot;||E==&quot;height&quot;)&amp;&amp;parseFloat(F)&lt;0){F=g}return this.attr(E,F,&quot;curCSS&quot;)},text:function(F){if(typeof F!==&quot;object&quot;&amp;&amp;F!=null){return this.empty().append((this[0]&amp;&amp;this[0].ownerDocument||document).createTextNode(F))}var E=&quot;&quot;;o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],&quot;find&quot;,E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),&quot;find&quot;,E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&amp;&amp;!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement(&quot;div&quot;);J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;).replace(/^\s*/,&quot;&quot;)])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find(&quot;*&quot;).andSelf(),F=0;E.find(&quot;*&quot;).andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],&quot;events&quot;);for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&amp;&amp;o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),&quot;filter&quot;,E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&amp;&amp;H.ownerDocument){if(G?G.index(H)&gt;-1:o(H).is(E)){o.data(H,&quot;closest&quot;,F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E===&quot;string&quot;){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),&quot;not&quot;,E)}else{E=o.multiFilter(E,this)}}var F=E.length&amp;&amp;E[E.length-1]!==g&amp;&amp;!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)&lt;0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E===&quot;string&quot;?o(E):o.makeArray(E))))},is:function(E){return !!E&amp;&amp;o.multiFilter(E,this).length&gt;0},hasClass:function(E){return !!E&amp;&amp;this.is(&quot;.&quot;+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,&quot;option&quot;)){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,&quot;select&quot;)){var I=E.selectedIndex,L=[],M=E.options,H=E.type==&quot;select-one&quot;;if(I&lt;0){return null}for(var F=H?I:0,J=H?I+1:M.length;F&lt;J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||&quot;&quot;).replace(/\r/g,&quot;&quot;)}return g}if(typeof K===&quot;number&quot;){K+=&quot;&quot;}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&amp;&amp;/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)&gt;=0||o.inArray(this.name,K)&gt;=0)}else{if(o.nodeName(this,&quot;select&quot;)){var N=o.makeArray(K);o(&quot;option&quot;,this).each(function(){this.selected=(o.inArray(this.value,N)&gt;=0||o.inArray(this.text,N)&gt;=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),&quot;slice&quot;,Array.prototype.slice.call(arguments).join(&quot;,&quot;))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G&lt;E;G++){L.call(K(this[G],H),this.length&gt;1||G&gt;0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&amp;&amp;o.nodeName(N,&quot;table&quot;)&amp;&amp;o.nodeName(O,&quot;tr&quot;)?(N.getElementsByTagName(&quot;tbody&quot;)[0]||N.appendChild(N.ownerDocument.createElement(&quot;tbody&quot;))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:&quot;script&quot;})}else{o.globalEval(F.text||F.textContent||F.innerHTML||&quot;&quot;)}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J===&quot;boolean&quot;){E=J;J=arguments[1]||{};H=2}if(typeof J!==&quot;object&quot;&amp;&amp;!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H&lt;I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&amp;&amp;L&amp;&amp;typeof L===&quot;object&quot;&amp;&amp;!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)===&quot;[object Function]&quot;},isArray:function(E){return s.call(E)===&quot;[object Array]&quot;},isXMLDoc:function(E){return E.nodeType===9&amp;&amp;E.documentElement.nodeName!==&quot;HTML&quot;||!!E.ownerDocument&amp;&amp;o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&amp;&amp;/\S/.test(G)){var F=document.getElementsByTagName(&quot;head&quot;)[0]||document.documentElement,E=document.createElement(&quot;script&quot;);E.type=&quot;text/javascript&quot;;if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&amp;&amp;F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H&lt;I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H&lt;I&amp;&amp;K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I===&quot;number&quot;&amp;&amp;G==&quot;curCSS&quot;&amp;&amp;!b.test(E)?I+&quot;px&quot;:I},className:{add:function(E,F){o.each((F||&quot;&quot;).split(/\s+/),function(G,H){if(E.nodeType==1&amp;&amp;!o.className.has(E.className,H)){E.className+=(E.className?&quot; &quot;:&quot;&quot;)+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(&quot; &quot;):&quot;&quot;}},has:function(F,E){return F&amp;&amp;o.inArray(E,(F.className||F).toString().split(/\s+/))&gt;-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F==&quot;width&quot;||F==&quot;height&quot;){var L,G={position:&quot;absolute&quot;,visibility:&quot;hidden&quot;,display:&quot;block&quot;},K=F==&quot;width&quot;?[&quot;Left&quot;,&quot;Right&quot;]:[&quot;Top&quot;,&quot;Bottom&quot;];function I(){L=F==&quot;width&quot;?H.offsetWidth:H.offsetHeight;if(E===&quot;border&quot;){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,&quot;padding&quot;+this,true))||0}if(E===&quot;margin&quot;){L+=parseFloat(o.curCSS(H,&quot;margin&quot;+this,true))||0}else{L-=parseFloat(o.curCSS(H,&quot;border&quot;+this+&quot;Width&quot;,true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F==&quot;opacity&quot;&amp;&amp;!o.support.opacity){L=o.attr(E,&quot;opacity&quot;);return L==&quot;&quot;?&quot;1&quot;:L}if(F.match(/float/i)){F=w}if(!G&amp;&amp;E&amp;&amp;E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F=&quot;float&quot;}F=F.replace(/([A-Z])/g,&quot;-$1&quot;).toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F==&quot;opacity&quot;&amp;&amp;L==&quot;&quot;){L=&quot;1&quot;}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&amp;&amp;/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+&quot;px&quot;;E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement===&quot;undefined&quot;){K=K.ownerDocument||K[0]&amp;&amp;K[0].ownerDocument||document}if(!I&amp;&amp;F.length===1&amp;&amp;typeof F[0]===&quot;string&quot;){var H=/^&lt;(\w+)\s*\/?&gt;$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement(&quot;div&quot;);o.each(F,function(P,S){if(typeof S===&quot;number&quot;){S+=&quot;&quot;}if(!S){return}if(typeof S===&quot;string&quot;){S=S.replace(/(&lt;(\w+)[^&gt;]*?)\/&gt;/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+&quot;&gt;&lt;/&quot;+T+&quot;&gt;&quot;});var O=S.replace(/^\s+/,&quot;&quot;).substring(0,10).toLowerCase();var Q=!O.indexOf(&quot;&lt;opt&quot;)&amp;&amp;[1,&quot;&lt;select multiple='multiple'&gt;&quot;,&quot;&lt;/select&gt;&quot;]||!O.indexOf(&quot;&lt;leg&quot;)&amp;&amp;[1,&quot;&lt;fieldset&gt;&quot;,&quot;&lt;/fieldset&gt;&quot;]||O.match(/^&lt;(thead|tbody|tfoot|colg|cap)/)&amp;&amp;[1,&quot;&lt;table&gt;&quot;,&quot;&lt;/table&gt;&quot;]||!O.indexOf(&quot;&lt;tr&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&quot;,&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;]||(!O.indexOf(&quot;&lt;td&quot;)||!O.indexOf(&quot;&lt;th&quot;))&amp;&amp;[3,&quot;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&quot;,&quot;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&quot;]||!O.indexOf(&quot;&lt;col&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;colgroup&gt;&quot;,&quot;&lt;/colgroup&gt;&lt;/table&gt;&quot;]||!o.support.htmlSerialize&amp;&amp;[1,&quot;div&lt;div&gt;&quot;,&quot;&lt;/div&gt;&quot;]||[0,&quot;&quot;,&quot;&quot;];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/&lt;tbody/i.test(S),N=!O.indexOf(&quot;&lt;table&quot;)&amp;&amp;!R?L.firstChild&amp;&amp;L.firstChild.childNodes:Q[1]==&quot;&lt;table&gt;&quot;&amp;&amp;!R?L.childNodes:[];for(var M=N.length-1;M&gt;=0;--M){if(o.nodeName(N[M],&quot;tbody&quot;)&amp;&amp;!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&amp;&amp;/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],&quot;script&quot;)&amp;&amp;(!G[J].type||G[J].type.toLowerCase()===&quot;text/javascript&quot;)){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName(&quot;script&quot;))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&amp;&amp;o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G==&quot;selected&quot;&amp;&amp;J.parentNode){J.parentNode.selectedIndex}if(G in J&amp;&amp;H&amp;&amp;!F){if(L){if(G==&quot;type&quot;&amp;&amp;o.nodeName(J,&quot;input&quot;)&amp;&amp;J.parentNode){throw&quot;type property can't be changed&quot;}J[G]=K}if(o.nodeName(J,&quot;form&quot;)&amp;&amp;J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G==&quot;tabIndex&quot;){var I=J.getAttributeNode(&quot;tabIndex&quot;);return I&amp;&amp;I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&amp;&amp;J.href?0:g}return J[G]}if(!o.support.style&amp;&amp;H&amp;&amp;G==&quot;style&quot;){return o.attr(J.style,&quot;cssText&quot;,K)}if(L){J.setAttribute(G,&quot;&quot;+K)}var E=!o.support.hrefNormalized&amp;&amp;H&amp;&amp;F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&amp;&amp;G==&quot;opacity&quot;){if(L){J.zoom=1;J.filter=(J.filter||&quot;&quot;).replace(/alpha\([^)]*\)/,&quot;&quot;)+(parseInt(K)+&quot;&quot;==&quot;NaN&quot;?&quot;&quot;:&quot;alpha(opacity=&quot;+K*100+&quot;)&quot;)}return J.filter&amp;&amp;J.filter.indexOf(&quot;opacity=&quot;)&gt;=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+&quot;&quot;:&quot;&quot;}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||&quot;&quot;).replace(/^\s+|\s+$/g,&quot;&quot;)},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G===&quot;string&quot;||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E&lt;F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G&lt;H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H&lt;I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G&lt;H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,&quot;0&quot;])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&amp;&amp;!/opera/.test(C),mozilla:/mozilla/.test(C)&amp;&amp;!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,&quot;parentNode&quot;)},next:function(E){return o.nth(E,2,&quot;nextSibling&quot;)},prev:function(E){return o.nth(E,2,&quot;previousSibling&quot;)},nextAll:function(E){return o.dir(E,&quot;nextSibling&quot;)},prevAll:function(E){return o.dir(E,&quot;previousSibling&quot;)},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,&quot;iframe&quot;)?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&amp;&amp;typeof G==&quot;string&quot;){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:&quot;append&quot;,prependTo:&quot;prepend&quot;,insertBefore:&quot;before&quot;,insertAfter:&quot;after&quot;,replaceAll:&quot;replaceWith&quot;},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K&lt;H;K++){var I=(K&gt;0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,&quot;&quot;);if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!==&quot;boolean&quot;){E=!o.className.has(this,F)}o.className[E?&quot;add&quot;:&quot;remove&quot;](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o(&quot;*&quot;,this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&amp;&amp;parseInt(o.curCSS(E[0],F,true),10)||0}var h=&quot;jQuery&quot;+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&amp;&amp;!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E=&quot;&quot;;for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||&quot;fx&quot;)+&quot;queue&quot;;var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G===&quot;fx&quot;){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(&quot;.&quot;);H[1]=H[1]?&quot;.&quot;+H[1]:&quot;&quot;;if(G===g){var F=this.triggerHandler(&quot;getData&quot;+H[1]+&quot;!&quot;,[H[0]]);if(F===g&amp;&amp;this.length){F=o.data(this[0],E)}return F===g&amp;&amp;H[1]?this.data(H[0]):F}else{return this.trigger(&quot;setData&quot;+H[1]+&quot;!&quot;,[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!==&quot;string&quot;){F=E;E=&quot;fx&quot;}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E==&quot;fx&quot;&amp;&amp;G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
-/*
- * 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 R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['&quot;][^'&quot;]*['&quot;]|[^[\]'&quot;]+)+\]|\\.|[^ &gt;+~,(\[\\]+)+|[&gt;+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&amp;&amp;U.nodeType!==9){return[]}if(!Y||typeof Y!==&quot;string&quot;){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length&gt;1&amp;&amp;M.exec(Y)){if(Z.length===2&amp;&amp;I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&amp;&amp;U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length&gt;0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=&quot;&quot;}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw&quot;Syntax error, unrecognized expression: &quot;+(ah||Y)}if(H.call(ai)===&quot;[object Array]&quot;){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&amp;&amp;(ai[aa]===true||ai[aa].nodeType===1&amp;&amp;K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&amp;&amp;ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa&lt;ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W&lt;V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!==&quot;\\&quot;){X[1]=(X[1]||&quot;&quot;).replace(/\\/g,&quot;&quot;);Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],&quot;&quot;);break}}}}if(!Z){Z=T.getElementsByTagName(&quot;*&quot;)}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&amp;&amp;ac[0]&amp;&amp;Q(ac[0]);while(ad&amp;&amp;ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&amp;&amp;ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],&quot;&quot;);if(!T){return[]}break}}}if(ad==V){if(T==null){throw&quot;Syntax error, unrecognized expression: &quot;+ad}else{break}}V=ad}return aa};var I=F.selectors={order:[&quot;ID&quot;,&quot;NAME&quot;,&quot;TAG&quot;],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['&quot;]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['&quot;]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['&quot;]*)(.*?)\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_-]|\\.)+)(?:\((['&quot;]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{&quot;class&quot;:&quot;className&quot;,&quot;for&quot;:&quot;htmlFor&quot;},attrHandle:{href:function(T){return T.getAttribute(&quot;href&quot;)}},relative:{&quot;+&quot;:function(aa,T,Z){var X=typeof T===&quot;string&quot;,ab=X&amp;&amp;!/\W/.test(T),Y=X&amp;&amp;!ab;if(ab&amp;&amp;!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W&lt;V;W++){if((U=aa[W])){while((U=U.previousSibling)&amp;&amp;U.nodeType!==1){}aa[W]=Y||U&amp;&amp;U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},&quot;&gt;&quot;:function(Z,U,aa){var X=typeof U===&quot;string&quot;;if(X&amp;&amp;!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V&lt;T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V&lt;T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},&quot;&quot;:function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T(&quot;parentNode&quot;,U,V,W,X,Y)},&quot;~&quot;:function(W,U,Y){var V=L++,T=S;if(typeof U===&quot;string&quot;&amp;&amp;!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T(&quot;previousSibling&quot;,U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!==&quot;undefined&quot;&amp;&amp;!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!==&quot;undefined&quot;){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W&lt;T;W++){if(X[W].getAttribute(&quot;name&quot;)===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=&quot; &quot;+W[1].replace(/\\/g,&quot;&quot;)+&quot; &quot;;if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&amp;&amp;(&quot; &quot;+Y.className+&quot; &quot;).indexOf(W)&gt;=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,&quot;&quot;)},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&amp;&amp;Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]==&quot;nth&quot;){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]==&quot;even&quot;&amp;&amp;&quot;2n&quot;||T[2]==&quot;odd&quot;&amp;&amp;&quot;2n+1&quot;||!/\D/.test(T[2])&amp;&amp;&quot;0n+&quot;+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,&quot;&quot;);if(!Z&amp;&amp;I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]===&quot;~=&quot;){X[4]=&quot; &quot;+X[4]+&quot; &quot;}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]===&quot;not&quot;){if(X[3].match(R).length&gt;1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&amp;&amp;T.type!==&quot;hidden&quot;},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return&quot;text&quot;===T.type},radio:function(T){return&quot;radio&quot;===T.type},checkbox:function(T){return&quot;checkbox&quot;===T.type},file:function(T){return&quot;file&quot;===T.type},password:function(T){return&quot;password&quot;===T.type},submit:function(T){return&quot;submit&quot;===T.type},image:function(T){return&quot;image&quot;===T.type},reset:function(T){return&quot;reset&quot;===T.type},button:function(T){return&quot;button&quot;===T.type||T.nodeName.toUpperCase()===&quot;BUTTON&quot;},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U&lt;T[3]-0},gt:function(V,U,T){return U&gt;T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U===&quot;contains&quot;){return(Z.textContent||Z.innerText||&quot;&quot;).indexOf(V[3])&gt;=0}else{if(U===&quot;not&quot;){var Y=V[3];for(var W=0,T=Y.length;W&lt;T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case&quot;only&quot;:case&quot;first&quot;:while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z==&quot;first&quot;){return true}U=T;case&quot;last&quot;:while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case&quot;nth&quot;:var V=W[2],ac=W[3];if(V==1&amp;&amp;ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&amp;&amp;(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&amp;&amp;aa/V&gt;=0)}}},ID:function(U,T){return U.nodeType===1&amp;&amp;U.getAttribute(&quot;id&quot;)===T},TAG:function(U,T){return(T===&quot;*&quot;&amp;&amp;U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(&quot; &quot;+(U.className||U.getAttribute(&quot;class&quot;))+&quot; &quot;).indexOf(T)&gt;-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+&quot;&quot;,X=W[2],U=W[4];return T==null?X===&quot;!=&quot;:X===&quot;=&quot;?Z===U:X===&quot;*=&quot;?Z.indexOf(U)&gt;=0:X===&quot;~=&quot;?(&quot; &quot;+Z+&quot; &quot;).indexOf(U)&gt;=0:!U?Z&amp;&amp;T!==false:X===&quot;!=&quot;?Z!=U:X===&quot;^=&quot;?Z.indexOf(U)===0:X===&quot;$=&quot;?Z.substr(Z.length-U.length)===U:X===&quot;|=&quot;?Z===U||Z.substr(0,U.length+1)===U+&quot;-&quot;:false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)===&quot;[object Array]&quot;){Array.prototype.push.apply(U,X)}else{if(typeof X.length===&quot;number&quot;){for(var V=0,T=X.length;V&lt;T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&amp;4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if(&quot;sourceIndex&quot; in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement(&quot;form&quot;),V=&quot;script&quot;+(new Date).getTime();U.innerHTML=&quot;&lt;input name='&quot;+V+&quot;'/&gt;&quot;;var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!==&quot;undefined&quot;&amp;&amp;!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!==&quot;undefined&quot;&amp;&amp;W.getAttributeNode(&quot;id&quot;).nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!==&quot;undefined&quot;&amp;&amp;Y.getAttributeNode(&quot;id&quot;);return Y.nodeType===1&amp;&amp;X&amp;&amp;X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement(&quot;div&quot;);T.appendChild(document.createComment(&quot;&quot;));if(T.getElementsByTagName(&quot;*&quot;).length&gt;0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]===&quot;*&quot;){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML=&quot;&lt;a href='#'&gt;&lt;/a&gt;&quot;;if(T.firstChild&amp;&amp;typeof T.firstChild.getAttribute!==&quot;undefined&quot;&amp;&amp;T.firstChild.getAttribute(&quot;href&quot;)!==&quot;#&quot;){I.attrHandle.href=function(U){return U.getAttribute(&quot;href&quot;,2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement(&quot;div&quot;);U.innerHTML=&quot;&lt;p class='TEST'&gt;&lt;/p&gt;&quot;;if(U.querySelectorAll&amp;&amp;U.querySelectorAll(&quot;.TEST&quot;).length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&amp;&amp;X.nodeType===9&amp;&amp;!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&amp;&amp;document.documentElement.getElementsByClassName){(function(){var T=document.createElement(&quot;div&quot;);T.innerHTML=&quot;&lt;div class='test e'&gt;&lt;/div&gt;&lt;div class='test'&gt;&lt;/div&gt;&quot;;if(T.getElementsByClassName(&quot;e&quot;).length===0){return}T.lastChild.className=&quot;e&quot;;if(T.getElementsByClassName(&quot;e&quot;).length===1){return}I.order.splice(1,0,&quot;CLASS&quot;);I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!==&quot;undefined&quot;&amp;&amp;!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U==&quot;previousSibling&quot;&amp;&amp;!ac;for(var W=0,V=ad.length;W&lt;V;W++){var T=ad[W];if(T){if(ab&amp;&amp;T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&amp;&amp;!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U==&quot;previousSibling&quot;&amp;&amp;!ac;for(var W=0,V=ad.length;W&lt;V;W++){var T=ad[W];if(T){if(ab&amp;&amp;T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!==&quot;string&quot;){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length&gt;0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&amp;16}:function(U,T){return U!==T&amp;&amp;(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&amp;&amp;T.documentElement.nodeName!==&quot;HTML&quot;||!!T.ownerDocument&amp;&amp;Q(T.ownerDocument)};var J=function(T,aa){var W=[],X=&quot;&quot;,Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,&quot;&quot;)}T=I.relative[T]?T+&quot;*&quot;:T;for(var Z=0,U=V.length;Z&lt;U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[&quot;:&quot;]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth&gt;0||T.offsetHeight&gt;0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=&quot;:not(&quot;+V+&quot;)&quot;}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&amp;&amp;W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&amp;&amp;++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&amp;&amp;V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&amp;&amp;I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,&quot;events&quot;)||o.data(I,&quot;events&quot;,{}),J=o.data(I,&quot;handle&quot;)||o.data(I,&quot;handle&quot;,function(){return typeof o!==&quot;undefined&quot;&amp;&amp;!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(&quot;.&quot;);N=O.shift();H.type=O.slice().sort().join(&quot;.&quot;);var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent(&quot;on&quot;+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,&quot;events&quot;),F,E;if(G){if(H===g||(typeof H===&quot;string&quot;&amp;&amp;H.charAt(0)==&quot;.&quot;)){for(var I in G){this.remove(K,I+(H||&quot;&quot;))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(&quot;.&quot;);O=Q.shift();var N=RegExp(&quot;(^|\\.)&quot;+Q.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,&quot;handle&quot;),false)}else{if(K.detachEvent){K.detachEvent(&quot;on&quot;+O,o.data(K,&quot;handle&quot;))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,&quot;handle&quot;);if(L){L.elem=null}o.removeData(K,&quot;events&quot;);o.removeData(K,&quot;handle&quot;)}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I===&quot;object&quot;?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf(&quot;!&quot;)&gt;=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&amp;&amp;this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,&quot;handle&quot;);if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,&quot;a&quot;)&amp;&amp;G==&quot;click&quot;))&amp;&amp;H[&quot;on&quot;+G]&amp;&amp;H[&quot;on&quot;+G].apply(H,K)===false){I.result=false}if(!E&amp;&amp;H[G]&amp;&amp;!I.isDefaultPrevented()&amp;&amp;!(o.nodeName(H,&quot;a&quot;)&amp;&amp;G==&quot;click&quot;)){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(&quot;.&quot;);K.type=L.shift();J=!L.length&amp;&amp;!K.exclusive;var I=RegExp(&quot;(^|\\.)&quot;+L.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);E=(o.data(this,&quot;events&quot;)||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:&quot;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&quot;.split(&quot; &quot;),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&amp;&amp;H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&amp;&amp;H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&amp;&amp;I.scrollLeft||E&amp;&amp;E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&amp;&amp;I.scrollTop||E&amp;&amp;E.scrollTop||0)-(I.clientTop||0)}if(!H.which&amp;&amp;((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&amp;&amp;H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&amp;&amp;H.button){H.which=(H.button&amp;1?1:(H.button&amp;2?3:(H.button&amp;4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp(&quot;(^|\\.)&quot;+G[0]+&quot;(\\.|$)&quot;);o.each((o.data(this,&quot;events&quot;).live||{}),function(){if(F.test(this.type)){E++}});if(E&lt;1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&amp;&amp;E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&amp;&amp;E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:&quot;mouseenter&quot;,mouseout:&quot;mouseleave&quot;},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F==&quot;unload&quot;?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&amp;&amp;G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&amp;&amp;H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F&lt;E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp(&quot;(^|\\.)&quot;+H.type+&quot;(\\.|$)&quot;),G=true,F=[];o.each(o.data(this,&quot;events&quot;).live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,&quot;closest&quot;)-o.data(I.elem,&quot;closest&quot;)});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return[&quot;live&quot;,F,E.replace(/\./g,&quot;`&quot;).replace(/ /g,&quot;|&quot;)].join(&quot;.&quot;)}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler(&quot;ready&quot;)}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener(&quot;DOMContentLoaded&quot;,function(){document.removeEventListener(&quot;DOMContentLoaded&quot;,arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent(&quot;onreadystatechange&quot;,function(){if(document.readyState===&quot;complete&quot;){document.detachEvent(&quot;onreadystatechange&quot;,arguments.callee);o.ready()}});if(document.documentElement.doScroll&amp;&amp;l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll(&quot;left&quot;)}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,&quot;load&quot;,o.ready)}o.each((&quot;blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error&quot;).split(&quot;,&quot;),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind(&quot;unload&quot;,function(){for(var E in o.cache){if(E!=1&amp;&amp;o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement(&quot;script&quot;),K=document.createElement(&quot;div&quot;),J=&quot;script&quot;+(new Date).getTime();K.style.display=&quot;none&quot;;K.innerHTML='   &lt;link/&gt;&lt;table&gt;&lt;/table&gt;&lt;a href=&quot;/a&quot; style=&quot;color:red;float:left;opacity:.5;&quot;&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 H=K.getElementsByTagName(&quot;*&quot;),E=K.getElementsByTagName(&quot;a&quot;)[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName(&quot;tbody&quot;).length,objectAll:!!K.getElementsByTagName(&quot;object&quot;)[0].getElementsByTagName(&quot;*&quot;).length,htmlSerialize:!!K.getElementsByTagName(&quot;link&quot;).length,style:/red/.test(E.getAttribute(&quot;style&quot;)),hrefNormalized:E.getAttribute(&quot;href&quot;)===&quot;/a&quot;,opacity:E.style.opacity===&quot;0.5&quot;,cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type=&quot;text/javascript&quot;;try{G.appendChild(document.createTextNode(&quot;window.&quot;+J+&quot;=1;&quot;))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&amp;&amp;K.fireEvent){K.attachEvent(&quot;onclick&quot;,function(){o.support.noCloneEvent=false;K.detachEvent(&quot;onclick&quot;,arguments.callee)});K.cloneNode(true).fireEvent(&quot;onclick&quot;)}o(function(){var L=document.createElement(&quot;div&quot;);L.style.width=L.style.paddingLeft=&quot;1px&quot;;document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display=&quot;none&quot;})})();var w=o.support.cssFloat?&quot;cssFloat&quot;:&quot;styleFloat&quot;;o.props={&quot;for&quot;:&quot;htmlFor&quot;,&quot;class&quot;:&quot;className&quot;,&quot;float&quot;:w,cssFloat:w,styleFloat:w,readonly:&quot;readOnly&quot;,maxlength:&quot;maxLength&quot;,cellspacing:&quot;cellSpacing&quot;,rowspan:&quot;rowSpan&quot;,tabindex:&quot;tabIndex&quot;};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!==&quot;string&quot;){return this._load(G)}var I=G.indexOf(&quot; &quot;);if(I&gt;=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H=&quot;GET&quot;;if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J===&quot;object&quot;){J=o.param(J);H=&quot;POST&quot;}}}var F=this;o.ajax({url:G,type:H,dataType:&quot;html&quot;,data:J,complete:function(M,L){if(L==&quot;success&quot;||L==&quot;notmodified&quot;){F.html(E?o(&quot;&lt;div/&gt;&quot;).append(M.responseText.replace(/&lt;script(.|\s)*?\/script&gt;/g,&quot;&quot;)).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.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(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each(&quot;ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend&quot;.split(&quot;,&quot;),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:&quot;GET&quot;,url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,&quot;script&quot;)},getJSON:function(E,F,G){return o.get(E,F,G,&quot;json&quot;)},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:&quot;POST&quot;,url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:&quot;GET&quot;,contentType:&quot;application/x-www-form-urlencoded&quot;,processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;):new XMLHttpRequest()},accepts:{xml:&quot;application/xml, text/xml&quot;,html:&quot;text/html&quot;,script:&quot;text/javascript, application/javascript&quot;,json:&quot;application/json, text/javascript&quot;,text:&quot;text/plain&quot;,_default:&quot;*/*&quot;}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&amp;|$)/g,R,V,G=M.type.toUpperCase();if(M.data&amp;&amp;M.processData&amp;&amp;typeof M.data!==&quot;string&quot;){M.data=o.param(M.data)}if(M.dataType==&quot;jsonp&quot;){if(G==&quot;GET&quot;){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+(M.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+&quot;&amp;&quot;:&quot;&quot;)+(M.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}M.dataType=&quot;json&quot;}if(M.dataType==&quot;json&quot;&amp;&amp;(M.data&amp;&amp;M.data.match(F)||M.url.match(F))){W=&quot;jsonp&quot;+r++;if(M.data){M.data=(M.data+&quot;&quot;).replace(F,&quot;=&quot;+W+&quot;$1&quot;)}M.url=M.url.replace(F,&quot;=&quot;+W+&quot;$1&quot;);M.dataType=&quot;script&quot;;l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType==&quot;script&quot;&amp;&amp;M.cache==null){M.cache=false}if(M.cache===false&amp;&amp;G==&quot;GET&quot;){var E=e();var U=M.url.replace(/(\?|&amp;)_=.*?(&amp;|$)/,&quot;$1_=&quot;+E+&quot;$2&quot;);M.url=U+((U==M.url)?(M.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+&quot;_=&quot;+E:&quot;&quot;)}if(M.data&amp;&amp;G==&quot;GET&quot;){M.url+=(M.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+M.data;M.data=null}if(M.global&amp;&amp;!o.active++){o.event.trigger(&quot;ajaxStart&quot;)}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType==&quot;script&quot;&amp;&amp;G==&quot;GET&quot;&amp;&amp;Q&amp;&amp;(Q[1]&amp;&amp;Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName(&quot;head&quot;)[0];var T=document.createElement(&quot;script&quot;);T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&amp;&amp;(!this.readyState||this.readyState==&quot;loaded&quot;||this.readyState==&quot;complete&quot;)){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader(&quot;Content-Type&quot;,M.contentType)}if(M.ifModified){J.setRequestHeader(&quot;If-Modified-Since&quot;,o.lastModified[M.url]||&quot;Thu, 01 Jan 1970 00:00:00 GMT&quot;)}J.setRequestHeader(&quot;X-Requested-With&quot;,&quot;XMLHttpRequest&quot;);J.setRequestHeader(&quot;Accept&quot;,M.dataType&amp;&amp;M.accepts[M.dataType]?M.accepts[M.dataType]+&quot;, */*&quot;:M.accepts._default)}catch(S){}if(M.beforeSend&amp;&amp;M.beforeSend(J,M)===false){if(M.global&amp;&amp;!--o.active){o.event.trigger(&quot;ajaxStop&quot;)}J.abort();return false}if(M.global){o.event.trigger(&quot;ajaxSend&quot;,[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&amp;&amp;!--o.active){o.event.trigger(&quot;ajaxStop&quot;)}}}else{if(!K&amp;&amp;J&amp;&amp;(J.readyState==4||X==&quot;timeout&quot;)){K=true;if(P){clearInterval(P);P=null}R=X==&quot;timeout&quot;?&quot;timeout&quot;:!o.httpSuccess(J)?&quot;error&quot;:M.ifModified&amp;&amp;o.httpNotModified(J,M.url)?&quot;notmodified&quot;:&quot;success&quot;;if(R==&quot;success&quot;){try{V=o.httpData(J,M.dataType,M)}catch(Z){R=&quot;parsererror&quot;}}if(R==&quot;success&quot;){var Y;try{Y=J.getResponseHeader(&quot;Last-Modified&quot;)}catch(Z){}if(M.ifModified&amp;&amp;Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout&gt;0){setTimeout(function(){if(J&amp;&amp;!K){N(&quot;timeout&quot;)}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger(&quot;ajaxSuccess&quot;,[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger(&quot;ajaxComplete&quot;,[J,M])}if(M.global&amp;&amp;!--o.active){o.event.trigger(&quot;ajaxStop&quot;)}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger(&quot;ajaxError&quot;,[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&amp;&amp;location.protocol==&quot;file:&quot;||(F.status&gt;=200&amp;&amp;F.status&lt;300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader(&quot;Last-Modified&quot;);return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader(&quot;content-type&quot;),E=H==&quot;xml&quot;||!H&amp;&amp;F&amp;&amp;F.indexOf(&quot;xml&quot;)&gt;=0,I=E?J.responseXML:J.responseText;if(E&amp;&amp;I.documentElement.tagName==&quot;parsererror&quot;){throw&quot;parsererror&quot;}if(G&amp;&amp;G.dataFilter){I=G.dataFilter(I,H)}if(typeof I===&quot;string&quot;){if(H==&quot;script&quot;){o.globalEval(I)}if(H==&quot;json&quot;){I=l[&quot;eval&quot;](&quot;(&quot;+I+&quot;)&quot;)}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+&quot;=&quot;+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join(&quot;&amp;&quot;).replace(/%20/g,&quot;+&quot;)}});var m={},n,d=[[&quot;height&quot;,&quot;marginTop&quot;,&quot;marginBottom&quot;,&quot;paddingTop&quot;,&quot;paddingBottom&quot;],[&quot;width&quot;,&quot;marginLeft&quot;,&quot;marginRight&quot;,&quot;paddingLeft&quot;,&quot;paddingRight&quot;],[&quot;opacity&quot;]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t(&quot;show&quot;,3),J,L)}else{for(var H=0,F=this.length;H&lt;F;H++){var E=o.data(this[H],&quot;olddisplay&quot;);this[H].style.display=E||&quot;&quot;;if(o.css(this[H],&quot;display&quot;)===&quot;none&quot;){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o(&quot;&lt;&quot;+G+&quot; /&gt;&quot;).appendTo(&quot;body&quot;);K=I.css(&quot;display&quot;);if(K===&quot;none&quot;){K=&quot;block&quot;}I.remove();m[G]=K}o.data(this[H],&quot;olddisplay&quot;,K)}}for(var H=0,F=this.length;H&lt;F;H++){this[H].style.display=o.data(this[H],&quot;olddisplay&quot;)||&quot;&quot;}return this}},hide:function(H,I){if(H){return this.animate(t(&quot;hide&quot;,3),H,I)}else{for(var G=0,F=this.length;G&lt;F;G++){var E=o.data(this[G],&quot;olddisplay&quot;);if(!E&amp;&amp;E!==&quot;none&quot;){o.data(this[G],&quot;olddisplay&quot;,o.css(this[G],&quot;display&quot;))}}for(var G=0,F=this.length;G&lt;F;G++){this[G].style.display=&quot;none&quot;}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G===&quot;boolean&quot;;return o.isFunction(G)&amp;&amp;o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(&quot;:hidden&quot;);o(this)[H?&quot;show&quot;:&quot;hide&quot;]()}):this.animate(t(&quot;toggle&quot;,3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?&quot;each&quot;:&quot;queue&quot;](function(){var K=o.extend({},E),M,L=this.nodeType==1&amp;&amp;o(this).is(&quot;:hidden&quot;),J=this;for(M in I){if(I[M]==&quot;hide&quot;&amp;&amp;L||I[M]==&quot;show&quot;&amp;&amp;!L){return K.complete.call(this)}if((M==&quot;height&quot;||M==&quot;width&quot;)&amp;&amp;this.style){K.display=o.css(this,&quot;display&quot;);K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow=&quot;hidden&quot;}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S==&quot;toggle&quot;?L?&quot;show&quot;:&quot;hide&quot;:S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||&quot;px&quot;;if(P!=&quot;px&quot;){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]==&quot;-=&quot;?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,&quot;&quot;)}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H&gt;=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t(&quot;show&quot;,1),slideUp:t(&quot;hide&quot;,1),slideToggle:t(&quot;toggle&quot;,1),fadeIn:{opacity:&quot;show&quot;},fadeOut:{opacity:&quot;hide&quot;}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G===&quot;object&quot;?G:{complete:F||!F&amp;&amp;H||o.isFunction(G)&amp;&amp;G,duration:G,easing:F&amp;&amp;H||H&amp;&amp;!o.isFunction(H)&amp;&amp;H};E.duration=o.fx.off?0:typeof E.duration===&quot;number&quot;?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop==&quot;height&quot;||this.prop==&quot;width&quot;)&amp;&amp;this.elem.style){this.elem.style.display=&quot;block&quot;}},cur:function(F){if(this.elem[this.prop]!=null&amp;&amp;(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&amp;&amp;E&gt;-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||&quot;px&quot;;this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&amp;&amp;o.timers.push(F)&amp;&amp;!n){n=setInterval(function(){var K=o.timers;for(var J=0;J&lt;K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop==&quot;width&quot;||this.prop==&quot;height&quot;?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G&gt;=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,&quot;display&quot;)==&quot;none&quot;){this.elem.style.display=&quot;block&quot;}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?&quot;swing&quot;:&quot;linear&quot;)](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,&quot;opacity&quot;,E.now)},_default:function(E){if(E.elem.style&amp;&amp;E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&amp;&amp;E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&amp;&amp;E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&amp;&amp;J!==K&amp;&amp;J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&amp;&amp;!(o.offset.doesAddBorderForTableAndCells&amp;&amp;/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&amp;&amp;M.overflow!==&quot;visible&quot;){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position===&quot;relative&quot;||E.position===&quot;static&quot;){N+=K.offsetTop,I+=K.offsetLeft}if(E.position===&quot;fixed&quot;){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement(&quot;div&quot;),H,G,N,I,M,E,J=L.style.marginTop,K='&lt;div style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;table style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';M={position:&quot;absolute&quot;,top:0,left:0,margin:0,border:0,width:&quot;1px&quot;,height:&quot;1px&quot;,visibility:&quot;hidden&quot;};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow=&quot;hidden&quot;,H.style.position=&quot;relative&quot;;this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop=&quot;1px&quot;;this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,&quot;marginTop&quot;,true),10)||0,F+=parseInt(o.curCSS(E,&quot;marginLeft&quot;,true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,&quot;marginTop&quot;);J.left-=j(this,&quot;marginLeft&quot;);E.top+=j(G,&quot;borderTopWidth&quot;);E.left+=j(G,&quot;borderLeftWidth&quot;);F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&amp;&amp;(!/^body|html$/i.test(E.tagName)&amp;&amp;o.css(E,&quot;position&quot;)==&quot;static&quot;)){E=E.offsetParent}return o(E)}});o.each([&quot;Left&quot;,&quot;Top&quot;],function(F,E){var G=&quot;scroll&quot;+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?&quot;pageYOffset&quot;:&quot;pageXOffset&quot;]||o.boxModel&amp;&amp;document.documentElement[G]||document.body[G]:this[0][G]}});o.each([&quot;Height&quot;,&quot;Width&quot;],function(I,G){var E=I?&quot;Left&quot;:&quot;Top&quot;,H=I?&quot;Right&quot;:&quot;Bottom&quot;,F=G.toLowerCase();o.fn[&quot;inner&quot;+G]=function(){return this[0]?o.css(this[0],F,false,&quot;padding&quot;):null};o.fn[&quot;outer&quot;+G]=function(K){return this[0]?o.css(this[0],F,false,K?&quot;margin&quot;:&quot;border&quot;):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode==&quot;CSS1Compat&quot;&amp;&amp;document.documentElement[&quot;client&quot;+G]||document.body[&quot;client&quot;+G]:this[0]==document?Math.max(document.documentElement[&quot;client&quot;+G],document.body[&quot;scroll&quot;+G],document.documentElement[&quot;scroll&quot;+G],document.body[&quot;offset&quot;+G],document.documentElement[&quot;offset&quot;+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K===&quot;string&quot;?K:K+&quot;px&quot;)}})})();/**
+/**
  * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
  *
  * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/,  http://www.vinterwebb.se/</diff>
      <filename>resources/public/javascripts/build/jquery.126.files.js</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-(function(){var W=this,ab,F=W.jQuery,S=W.$,T=W.jQuery=W.$=function(b,a){return new T.fn.init(b,a)},M=/^[^&lt;]*(&lt;(.|\s)+&gt;)[^&gt;]*$|^#([\w-]+)$/,ac=/^.[^:#\[\.,]*$/;T.fn=T.prototype={init:function(f,b){f=f||document;if(f.nodeType){this[0]=f;this.length=1;this.context=f;return this}if(typeof f===&quot;string&quot;){var d=M.exec(f);if(d&amp;&amp;(d[1]||!b)){if(d[1]){f=T.clean([d[1]],b)}else{var a=document.getElementById(d[3]);if(a&amp;&amp;a.id!=d[3]){return T().find(f)}var e=T(a||[]);e.context=document;e.selector=f;return e}}else{return T(b).find(f)}}else{if(T.isFunction(f)){return T(document).ready(f)}}if(f.selector&amp;&amp;f.context){this.selector=f.selector;this.context=f.context}return this.setArray(T.isArray(f)?f:T.makeArray(f))},selector:&quot;&quot;,jquery:&quot;1.3.2&quot;,size:function(){return this.length},get:function(a){return a===ab?Array.prototype.slice.call(this):this[a]},pushStack:function(d,a,e){var b=T(d);b.prevObject=this;b.context=this.context;if(a===&quot;find&quot;){b.selector=this.selector+(this.selector?&quot; &quot;:&quot;&quot;)+e}else{if(a){b.selector=this.selector+&quot;.&quot;+a+&quot;(&quot;+e+&quot;)&quot;}}return b},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this},each:function(a,b){return T.each(this,a,b)},index:function(a){return T.inArray(a&amp;&amp;a.jquery?a[0]:a,this)},attr:function(d,a,b){var e=d;if(typeof d===&quot;string&quot;){if(a===ab){return this[0]&amp;&amp;T[b||&quot;attr&quot;](this[0],d)}else{e={};e[d]=a}}return this.each(function(f){for(d in e){T.attr(b?this.style:this,d,T.prop(this,e[d],b,f,d))}})},css:function(b,a){if((b==&quot;width&quot;||b==&quot;height&quot;)&amp;&amp;parseFloat(a)&lt;0){a=ab}return this.attr(b,a,&quot;curCSS&quot;)},text:function(a){if(typeof a!==&quot;object&quot;&amp;&amp;a!=null){return this.empty().append((this[0]&amp;&amp;this[0].ownerDocument||document).createTextNode(a))}var b=&quot;&quot;;T.each(a||this,function(){T.each(this.childNodes,function(){if(this.nodeType!=8){b+=this.nodeType!=1?this.nodeValue:T.fn.text([this])}})});return b},wrapAll:function(b){if(this[0]){var a=T(b,this[0].ownerDocument).clone();if(this[0].parentNode){a.insertBefore(this[0])}a.map(function(){var d=this;while(d.firstChild){d=d.firstChild}return d}).append(this)}return this},wrapInner:function(a){return this.each(function(){T(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){T(this).wrapAll(a)})},append:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.appendChild(a)}})},prepend:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.insertBefore(a,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||T([])},push:[].push,sort:[].sort,splice:[].splice,find:function(b){if(this.length===1){var a=this.pushStack([],&quot;find&quot;,b);a.length=0;T.find(b,this[0],a);return a}else{return this.pushStack(T.unique(T.map(this,function(d){return T.find(b,d)})),&quot;find&quot;,b)}},clone:function(b){var e=this.map(function(){if(!T.support.noCloneEvent&amp;&amp;!T.isXMLDoc(this)){var g=this.outerHTML;if(!g){var f=this.ownerDocument.createElement(&quot;div&quot;);f.appendChild(this.cloneNode(true));g=f.innerHTML}return T.clean([g.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;).replace(/^\s*/,&quot;&quot;)])[0]}else{return this.cloneNode(true)}});if(b===true){var a=this.find(&quot;*&quot;).andSelf(),d=0;e.find(&quot;*&quot;).andSelf().each(function(){if(this.nodeName!==a[d].nodeName){return}var h=T.data(a[d],&quot;events&quot;);for(var f in h){for(var g in h[f]){T.event.add(this,f,h[f][g],h[f][g].data)}}d++})}return e},filter:function(a){return this.pushStack(T.isFunction(a)&amp;&amp;T.grep(this,function(b,d){return a.call(b,d)})||T.multiFilter(a,T.grep(this,function(b){return b.nodeType===1})),&quot;filter&quot;,a)},closest:function(d){var a=T.expr.match.POS.test(d)?T(d):null,b=0;return this.map(function(){var e=this;while(e&amp;&amp;e.ownerDocument){if(a?a.index(e)&gt;-1:T(e).is(d)){T.data(e,&quot;closest&quot;,b);return e}e=e.parentNode;b++}})},not:function(b){if(typeof b===&quot;string&quot;){if(ac.test(b)){return this.pushStack(T.multiFilter(b,this,true),&quot;not&quot;,b)}else{b=T.multiFilter(b,this)}}var a=b.length&amp;&amp;b[b.length-1]!==ab&amp;&amp;!b.nodeType;return this.filter(function(){return a?T.inArray(this,b)&lt;0:this!=b})},add:function(a){return this.pushStack(T.unique(T.merge(this.get(),typeof a===&quot;string&quot;?T(a):T.makeArray(a))))},is:function(a){return !!a&amp;&amp;T.multiFilter(a,this).length&gt;0},hasClass:function(a){return !!a&amp;&amp;this.is(&quot;.&quot;+a)},val:function(d){if(d===ab){var l=this[0];if(l){if(T.nodeName(l,&quot;option&quot;)){return(l.attributes.value||{}).specified?l.value:l.text}if(T.nodeName(l,&quot;select&quot;)){var f=l.selectedIndex,b=[],a=l.options,g=l.type==&quot;select-one&quot;;if(f&lt;0){return null}for(var j=g?f:0,e=g?f+1:a.length;j&lt;e;j++){var h=a[j];if(h.selected){d=T(h).val();if(g){return d}b.push(d)}}return b}return(l.value||&quot;&quot;).replace(/\r/g,&quot;&quot;)}return ab}if(typeof d===&quot;number&quot;){d+=&quot;&quot;}return this.each(function(){if(this.nodeType!=1){return}if(T.isArray(d)&amp;&amp;/radio|checkbox/.test(this.type)){this.checked=(T.inArray(this.value,d)&gt;=0||T.inArray(this.name,d)&gt;=0)}else{if(T.nodeName(this,&quot;select&quot;)){var m=T.makeArray(d);T(&quot;option&quot;,this).each(function(){this.selected=(T.inArray(this.value,m)&gt;=0||T.inArray(this.text,m)&gt;=0)});if(!m.length){this.selectedIndex=-1}}else{this.value=d}}})},html:function(a){return a===ab?(this[0]?this[0].innerHTML.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;):null):this.empty().append(a)},replaceWith:function(a){return this.after(a).remove()},eq:function(a){return this.slice(a,+a+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),&quot;slice&quot;,Array.prototype.slice.call(arguments).join(&quot;,&quot;))},map:function(a){return this.pushStack(T.map(this,function(b,d){return a.call(b,d,b)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(e,a,b){if(this[0]){var f=(this[0].ownerDocument||this[0]).createDocumentFragment(),j=T.clean(e,(this[0].ownerDocument||this[0]),f),g=f.firstChild;if(g){for(var h=0,l=this.length;h&lt;l;h++){b.call(d(this[h],g),this.length&gt;1||h&gt;0?f.cloneNode(true):f)}}if(j){T.each(j,E)}}return this;function d(n,m){return a&amp;&amp;T.nodeName(n,&quot;table&quot;)&amp;&amp;T.nodeName(m,&quot;tr&quot;)?(n.getElementsByTagName(&quot;tbody&quot;)[0]||n.appendChild(n.ownerDocument.createElement(&quot;tbody&quot;))):n}}};T.fn.init.prototype=T.fn;function E(b,a){if(a.src){T.ajax({url:a.src,async:false,dataType:&quot;script&quot;})}else{T.globalEval(a.text||a.textContent||a.innerHTML||&quot;&quot;)}if(a.parentNode){a.parentNode.removeChild(a)}}function ad(){return +new Date}T.extend=T.fn.extend=function(){var d=arguments[0]||{},f=1,e=arguments.length,j=false,g;if(typeof d===&quot;boolean&quot;){j=d;d=arguments[1]||{};f=2}if(typeof d!==&quot;object&quot;&amp;&amp;!T.isFunction(d)){d={}}if(e==f){d=this;--f}for(;f&lt;e;f++){if((g=arguments[f])!=null){for(var h in g){var b=d[h],a=g[h];if(d===a){continue}if(j&amp;&amp;a&amp;&amp;typeof a===&quot;object&quot;&amp;&amp;!a.nodeType){d[h]=T.extend(j,b||(a.length!=null?[]:{}),a)}else{if(a!==ab){d[h]=a}}}}}return d};var ag=/z-?index|font-?weight|opacity|zoom|line-?height/i,Q=document.defaultView||{},L=Object.prototype.toString;T.extend({noConflict:function(a){W.$=S;if(a){W.jQuery=F}return T},isFunction:function(a){return L.call(a)===&quot;[object Function]&quot;},isArray:function(a){return L.call(a)===&quot;[object Array]&quot;},isXMLDoc:function(a){return a.nodeType===9&amp;&amp;a.documentElement.nodeName!==&quot;HTML&quot;||!!a.ownerDocument&amp;&amp;T.isXMLDoc(a.ownerDocument)},globalEval:function(a){if(a&amp;&amp;/\S/.test(a)){var b=document.getElementsByTagName(&quot;head&quot;)[0]||document.documentElement,d=document.createElement(&quot;script&quot;);d.type=&quot;text/javascript&quot;;if(T.support.scriptEval){d.appendChild(document.createTextNode(a))}else{d.text=a}b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&amp;&amp;a.nodeName.toUpperCase()==b.toUpperCase()},each:function(f,a,g){var h,e=0,d=f.length;if(g){if(d===ab){for(h in f){if(a.apply(f[h],g)===false){break}}}else{for(;e&lt;d;){if(a.apply(f[e++],g)===false){break}}}}else{if(d===ab){for(h in f){if(a.call(f[h],h,f[h])===false){break}}}else{for(var b=f[0];e&lt;d&amp;&amp;a.call(b,e,b)!==false;b=f[++e]){}}}return f},prop:function(b,a,d,e,f){if(T.isFunction(a)){a=a.call(b,e)}return typeof a===&quot;number&quot;&amp;&amp;d==&quot;curCSS&quot;&amp;&amp;!ag.test(f)?a+&quot;px&quot;:a},className:{add:function(b,a){T.each((a||&quot;&quot;).split(/\s+/),function(e,d){if(b.nodeType==1&amp;&amp;!T.className.has(b.className,d)){b.className+=(b.className?&quot; &quot;:&quot;&quot;)+d}})},remove:function(b,a){if(b.nodeType==1){b.className=a!==ab?T.grep(b.className.split(/\s+/),function(d){return !T.className.has(a,d)}).join(&quot; &quot;):&quot;&quot;}},has:function(a,b){return a&amp;&amp;T.inArray(b,(a.className||a).toString().split(/\s+/))&gt;-1}},swap:function(b,d,a){var f={};for(var e in d){f[e]=b.style[e];b.style[e]=d[e]}a.call(b);for(var e in d){b.style[e]=f[e]}},css:function(f,h,d,j){if(h==&quot;width&quot;||h==&quot;height&quot;){var a,g={position:&quot;absolute&quot;,visibility:&quot;hidden&quot;,display:&quot;block&quot;},b=h==&quot;width&quot;?[&quot;Left&quot;,&quot;Right&quot;]:[&quot;Top&quot;,&quot;Bottom&quot;];function e(){a=h==&quot;width&quot;?f.offsetWidth:f.offsetHeight;if(j===&quot;border&quot;){return}T.each(b,function(){if(!j){a-=parseFloat(T.curCSS(f,&quot;padding&quot;+this,true))||0}if(j===&quot;margin&quot;){a+=parseFloat(T.curCSS(f,&quot;margin&quot;+this,true))||0}else{a-=parseFloat(T.curCSS(f,&quot;border&quot;+this+&quot;Width&quot;,true))||0}})}if(f.offsetWidth!==0){e()}else{T.swap(f,g,e)}return Math.max(0,Math.round(a))}return T.curCSS(f,h,d)},curCSS:function(f,j,h){var b,l=f.style;if(j==&quot;opacity&quot;&amp;&amp;!T.support.opacity){b=T.attr(l,&quot;opacity&quot;);return b==&quot;&quot;?&quot;1&quot;:b}if(j.match(/float/i)){j=H}if(!h&amp;&amp;l&amp;&amp;l[j]){b=l[j]}else{if(Q.getComputedStyle){if(j.match(/float/i)){j=&quot;float&quot;}j=j.replace(/([A-Z])/g,&quot;-$1&quot;).toLowerCase();var a=Q.getComputedStyle(f,null);if(a){b=a.getPropertyValue(j)}if(j==&quot;opacity&quot;&amp;&amp;b==&quot;&quot;){b=&quot;1&quot;}}else{if(f.currentStyle){var e=j.replace(/\-(\w)/g,function(n,m){return m.toUpperCase()});b=f.currentStyle[j]||f.currentStyle[e];if(!/^\d+(px)?$/i.test(b)&amp;&amp;/^\d/.test(b)){var g=l.left,d=f.runtimeStyle.left;f.runtimeStyle.left=f.currentStyle.left;l.left=b||0;b=l.pixelLeft+&quot;px&quot;;l.left=g;f.runtimeStyle.left=d}}}}return b},clean:function(h,b,e){b=b||document;if(typeof b.createElement===&quot;undefined&quot;){b=b.ownerDocument||b[0]&amp;&amp;b[0].ownerDocument||document}if(!e&amp;&amp;h.length===1&amp;&amp;typeof h[0]===&quot;string&quot;){var f=/^&lt;(\w+)\s*\/?&gt;$/.exec(h[0]);if(f){return[b.createElement(f[1])]}}var g=[],j=[],a=b.createElement(&quot;div&quot;);T.each(h,function(o,l){if(typeof l===&quot;number&quot;){l+=&quot;&quot;}if(!l){return}if(typeof l===&quot;string&quot;){l=l.replace(/(&lt;(\w+)[^&gt;]*?)\/&gt;/g,function(u,t,v){return v.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?u:t+&quot;&gt;&lt;/&quot;+v+&quot;&gt;&quot;});var q=l.replace(/^\s+/,&quot;&quot;).substring(0,10).toLowerCase();var n=!q.indexOf(&quot;&lt;opt&quot;)&amp;&amp;[1,&quot;&lt;select multiple='multiple'&gt;&quot;,&quot;&lt;/select&gt;&quot;]||!q.indexOf(&quot;&lt;leg&quot;)&amp;&amp;[1,&quot;&lt;fieldset&gt;&quot;,&quot;&lt;/fieldset&gt;&quot;]||q.match(/^&lt;(thead|tbody|tfoot|colg|cap)/)&amp;&amp;[1,&quot;&lt;table&gt;&quot;,&quot;&lt;/table&gt;&quot;]||!q.indexOf(&quot;&lt;tr&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&quot;,&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;]||(!q.indexOf(&quot;&lt;td&quot;)||!q.indexOf(&quot;&lt;th&quot;))&amp;&amp;[3,&quot;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&quot;,&quot;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&quot;]||!q.indexOf(&quot;&lt;col&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;colgroup&gt;&quot;,&quot;&lt;/colgroup&gt;&lt;/table&gt;&quot;]||!T.support.htmlSerialize&amp;&amp;[1,&quot;div&lt;div&gt;&quot;,&quot;&lt;/div&gt;&quot;]||[0,&quot;&quot;,&quot;&quot;];a.innerHTML=n[1]+l+n[2];while(n[0]--){a=a.lastChild}if(!T.support.tbody){var m=/&lt;tbody/i.test(l),r=!q.indexOf(&quot;&lt;table&quot;)&amp;&amp;!m?a.firstChild&amp;&amp;a.firstChild.childNodes:n[1]==&quot;&lt;table&gt;&quot;&amp;&amp;!m?a.childNodes:[];for(var s=r.length-1;s&gt;=0;--s){if(T.nodeName(r[s],&quot;tbody&quot;)&amp;&amp;!r[s].childNodes.length){r[s].parentNode.removeChild(r[s])}}}if(!T.support.leadingWhitespace&amp;&amp;/^\s/.test(l)){a.insertBefore(b.createTextNode(l.match(/^\s*/)[0]),a.firstChild)}l=T.makeArray(a.childNodes)}if(l.nodeType){g.push(l)}else{g=T.merge(g,l)}});if(e){for(var d=0;g[d];d++){if(T.nodeName(g[d],&quot;script&quot;)&amp;&amp;(!g[d].type||g[d].type.toLowerCase()===&quot;text/javascript&quot;)){j.push(g[d].parentNode?g[d].parentNode.removeChild(g[d]):g[d])}else{if(g[d].nodeType===1){g.splice.apply(g,[d+1,0].concat(T.makeArray(g[d].getElementsByTagName(&quot;script&quot;))))}e.appendChild(g[d])}}return j}return g},attr:function(d,g,b){if(!d||d.nodeType==3||d.nodeType==8){return ab}var f=!T.isXMLDoc(d),a=b!==ab;g=f&amp;&amp;T.props[g]||g;if(d.tagName){var h=/href|src|style/.test(g);if(g==&quot;selected&quot;&amp;&amp;d.parentNode){d.parentNode.selectedIndex}if(g in d&amp;&amp;f&amp;&amp;!h){if(a){if(g==&quot;type&quot;&amp;&amp;T.nodeName(d,&quot;input&quot;)&amp;&amp;d.parentNode){throw&quot;type property can't be changed&quot;}d[g]=b}if(T.nodeName(d,&quot;form&quot;)&amp;&amp;d.getAttributeNode(g)){return d.getAttributeNode(g).nodeValue}if(g==&quot;tabIndex&quot;){var e=d.getAttributeNode(&quot;tabIndex&quot;);return e&amp;&amp;e.specified?e.value:d.nodeName.match(/(button|input|object|select|textarea)/i)?0:d.nodeName.match(/^(a|area)$/i)&amp;&amp;d.href?0:ab}return d[g]}if(!T.support.style&amp;&amp;f&amp;&amp;g==&quot;style&quot;){return T.attr(d.style,&quot;cssText&quot;,b)}if(a){d.setAttribute(g,&quot;&quot;+b)}var j=!T.support.hrefNormalized&amp;&amp;f&amp;&amp;h?d.getAttribute(g,2):d.getAttribute(g);return j===null?ab:j}if(!T.support.opacity&amp;&amp;g==&quot;opacity&quot;){if(a){d.zoom=1;d.filter=(d.filter||&quot;&quot;).replace(/alpha\([^)]*\)/,&quot;&quot;)+(parseInt(b)+&quot;&quot;==&quot;NaN&quot;?&quot;&quot;:&quot;alpha(opacity=&quot;+b*100+&quot;)&quot;)}return d.filter&amp;&amp;d.filter.indexOf(&quot;opacity=&quot;)&gt;=0?(parseFloat(d.filter.match(/opacity=([^)]*)/)[1])/100)+&quot;&quot;:&quot;&quot;}g=g.replace(/-([a-z])/ig,function(m,l){return l.toUpperCase()});if(a){d[g]=b}return d[g]},trim:function(a){return(a||&quot;&quot;).replace(/^\s+|\s+$/g,&quot;&quot;)},makeArray:function(a){var d=[];if(a!=null){var b=a.length;if(b==null||typeof a===&quot;string&quot;||T.isFunction(a)||a.setInterval){d[0]=a}else{while(b){d[--b]=a[b]}}}return d},inArray:function(b,a){for(var e=0,d=a.length;e&lt;d;e++){if(a[e]===b){return e}}return -1},merge:function(b,f){var e=0,d,a=b.length;if(!T.support.getAll){while((d=f[e++])!=null){if(d.nodeType!=8){b[a++]=d}}}else{while((d=f[e++])!=null){b[a++]=d}}return b},unique:function(a){var g=[],h={};try{for(var f=0,e=a.length;f&lt;e;f++){var b=T.data(a[f]);if(!h[b]){h[b]=true;g.push(a[f])}}}catch(d){g=a}return g},grep:function(f,a,g){var e=[];for(var d=0,b=f.length;d&lt;b;d++){if(!g!=!a(f[d],d)){e.push(f[d])}}return e},map:function(g,a){var f=[];for(var e=0,d=g.length;e&lt;d;e++){var b=a(g[e],e);if(b!=null){f[f.length]=b}}return f.concat.apply([],f)}});var O=navigator.userAgent.toLowerCase();T.browser={version:(O.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,&quot;0&quot;])[1],safari:/webkit/.test(O),opera:/opera/.test(O),msie:/msie/.test(O)&amp;&amp;!/opera/.test(O),mozilla:/mozilla/.test(O)&amp;&amp;!/(compatible|webkit)/.test(O)};T.each({parent:function(a){return a.parentNode},parents:function(a){return T.dir(a,&quot;parentNode&quot;)},next:function(a){return T.nth(a,2,&quot;nextSibling&quot;)},prev:function(a){return T.nth(a,2,&quot;previousSibling&quot;)},nextAll:function(a){return T.dir(a,&quot;nextSibling&quot;)},prevAll:function(a){return T.dir(a,&quot;previousSibling&quot;)},siblings:function(a){return T.sibling(a.parentNode.firstChild,a)},children:function(a){return T.sibling(a.firstChild)},contents:function(a){return T.nodeName(a,&quot;iframe&quot;)?a.contentDocument||a.contentWindow.document:T.makeArray(a.childNodes)}},function(b,a){T.fn[b]=function(e){var d=T.map(this,a);if(e&amp;&amp;typeof e==&quot;string&quot;){d=T.multiFilter(e,d)}return this.pushStack(T.unique(d),b,e)}});T.each({appendTo:&quot;append&quot;,prependTo:&quot;prepend&quot;,insertBefore:&quot;before&quot;,insertAfter:&quot;after&quot;,replaceAll:&quot;replaceWith&quot;},function(b,a){T.fn[b]=function(j){var f=[],d=T(j);for(var e=0,h=d.length;e&lt;h;e++){var g=(e&gt;0?this.clone(true):this).get();T.fn[a].apply(T(d[e]),g);f=f.concat(g)}return this.pushStack(f,b,j)}});T.each({removeAttr:function(a){T.attr(this,a,&quot;&quot;);if(this.nodeType==1){this.removeAttribute(a)}},addClass:function(a){T.className.add(this,a)},removeClass:function(a){T.className.remove(this,a)},toggleClass:function(a,b){if(typeof b!==&quot;boolean&quot;){b=!T.className.has(this,a)}T.className[b?&quot;add&quot;:&quot;remove&quot;](this,a)},remove:function(a){if(!a||T.filter(a,[this]).length){T(&quot;*&quot;,this).add([this]).each(function(){T.event.remove(this);T.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){T(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(b,a){T.fn[b]=function(){return this.each(a,arguments)}});function Y(b,a){return b[0]&amp;&amp;parseInt(T.curCSS(b[0],a,true),10)||0}var aa=&quot;jQuery&quot;+ad(),I=0,R={};T.extend({cache:{},data:function(d,e,b){d=d==W?R:d;var a=d[aa];if(!a){a=d[aa]=++I}if(e&amp;&amp;!T.cache[a]){T.cache[a]={}}if(b!==ab){T.cache[a][e]=b}return e?T.cache[a][e]:a},removeData:function(d,e){d=d==W?R:d;var a=d[aa];if(e){if(T.cache[a]){delete T.cache[a][e];e=&quot;&quot;;for(e in T.cache[a]){break}if(!e){T.removeData(d)}}}else{try{delete d[aa]}catch(b){if(d.removeAttribute){d.removeAttribute(aa)}}delete T.cache[a]}},queue:function(d,e,a){if(d){e=(e||&quot;fx&quot;)+&quot;queue&quot;;var b=T.data(d,e);if(!b||T.isArray(a)){b=T.data(d,e,T.makeArray(a))}else{if(a){b.push(a)}}}return b},dequeue:function(a,b){var e=T.queue(a,b),d=e.shift();if(!b||b===&quot;fx&quot;){d=e[0]}if(d!==ab){d.call(a)}}});T.fn.extend({data:function(e,b){var a=e.split(&quot;.&quot;);a[1]=a[1]?&quot;.&quot;+a[1]:&quot;&quot;;if(b===ab){var d=this.triggerHandler(&quot;getData&quot;+a[1]+&quot;!&quot;,[a[0]]);if(d===ab&amp;&amp;this.length){d=T.data(this[0],e)}return d===ab&amp;&amp;a[1]?this.data(a[0]):d}else{return this.trigger(&quot;setData&quot;+a[1]+&quot;!&quot;,[a[0],b]).each(function(){T.data(this,e,b)})}},removeData:function(a){return this.each(function(){T.removeData(this,a)})},queue:function(b,a){if(typeof b!==&quot;string&quot;){a=b;b=&quot;fx&quot;}if(a===ab){return T.queue(this[0],b)}return this.each(function(){var d=T.queue(this,b,a);if(b==&quot;fx&quot;&amp;&amp;d.length==1){d[0].call(this)}})},dequeue:function(a){return this.each(function(){T.dequeue(this,a)})}});(function(){var b=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['&quot;][^'&quot;]*['&quot;]|[^[\]'&quot;]+)+\]|\\.|[^ &gt;+~,(\[\\]+)+|[&gt;+~])(\s*,\s*)?/g,j=0,o=Object.prototype.toString;var r=function(v,z,am,al){am=am||[];z=z||document;if(z.nodeType!==1&amp;&amp;z.nodeType!==9){return[]}if(!v||typeof v!==&quot;string&quot;){return am}var u=[],x,ai,B,A,ak,y,w=true;b.lastIndex=0;while((x=b.exec(v))!==null){u.push(x[1]);if(x[2]){y=RegExp.rightContext;break}}if(u.length&gt;1&amp;&amp;h.exec(v)){if(u.length===2&amp;&amp;n.relative[u[0]]){ai=m(u[0]+u[1],z)}else{ai=n.relative[u[0]]?[z]:r(u.shift(),z);while(u.length){v=u.shift();if(n.relative[v]){v+=u.shift()}ai=m(v,ai)}}}else{var aj=al?{expr:u.pop(),set:s(al)}:r.find(u.pop(),u.length===1&amp;&amp;z.parentNode?z.parentNode:z,d(z));ai=r.filter(aj.expr,aj.set);if(u.length&gt;0){B=s(ai)}else{w=false}while(u.length){var C=u.pop(),D=C;if(!n.relative[C]){C=&quot;&quot;}else{D=u.pop()}if(D==null){D=z}n.relative[C](B,D,d(z))}}if(!B){B=ai}if(!B){throw&quot;Syntax error, unrecognized expression: &quot;+(C||v)}if(o.call(B)===&quot;[object Array]&quot;){if(!w){am.push.apply(am,B)}else{if(z.nodeType===1){for(var t=0;B[t]!=null;t++){if(B[t]&amp;&amp;(B[t]===true||B[t].nodeType===1&amp;&amp;l(z,B[t]))){am.push(ai[t])}}}else{for(var t=0;B[t]!=null;t++){if(B[t]&amp;&amp;B[t].nodeType===1){am.push(ai[t])}}}}}else{s(B,am)}if(y){r(y,z,am,al);if(q){hasDuplicate=false;am.sort(q);if(hasDuplicate){for(var t=1;t&lt;am.length;t++){if(am[t]===am[t-1]){am.splice(t--,1)}}}}}return am};r.matches=function(u,t){return r(u,null,null,t)};r.find=function(t,A,B){var u,w;if(!t){return[]}for(var x=0,y=n.order.length;x&lt;y;x++){var v=n.order[x],w;if((w=n.match[v].exec(t))){var z=RegExp.leftContext;if(z.substr(z.length-1)!==&quot;\\&quot;){w[1]=(w[1]||&quot;&quot;).replace(/\\/g,&quot;&quot;);u=n.find[v](w,A,B);if(u!=null){t=t.replace(n.match[v],&quot;&quot;);break}}}}if(!u){u=A.getElementsByTagName(&quot;*&quot;)}return{set:u,expr:t}};r.filter=function(ak,al,D,x){var y=ak,B=[],t=al,v,A,u=al&amp;&amp;al[0]&amp;&amp;d(al[0]);while(ak&amp;&amp;al.length){for(var am in n.filter){if((v=n.match[am].exec(ak))!=null){var z=n.filter[am],C,ai;A=false;if(t==B){B=[]}if(n.preFilter[am]){v=n.preFilter[am](v,t,D,B,x,u);if(!v){A=C=true}else{if(v===true){continue}}}if(v){for(var w=0;(ai=t[w])!=null;w++){if(ai){C=z(ai,v,w,t);var aj=x^!!C;if(D&amp;&amp;C!=null){if(aj){A=true}else{t[w]=false}}else{if(aj){B.push(ai);A=true}}}}}if(C!==ab){if(!D){t=B}ak=ak.replace(n.match[am],&quot;&quot;);if(!A){return[]}break}}}if(ak==y){if(A==null){throw&quot;Syntax error, unrecognized expression: &quot;+ak}else{break}}y=ak}return t};var n=r.selectors={order:[&quot;ID&quot;,&quot;NAME&quot;,&quot;TAG&quot;],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['&quot;]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['&quot;]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['&quot;]*)(.*?)\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_-]|\\.)+)(?:\((['&quot;]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{&quot;class&quot;:&quot;className&quot;,&quot;for&quot;:&quot;htmlFor&quot;},attrHandle:{href:function(t){return t.getAttribute(&quot;href&quot;)}},relative:{&quot;+&quot;:function(t,A,u){var w=typeof A===&quot;string&quot;,B=w&amp;&amp;!/\W/.test(A),v=w&amp;&amp;!B;if(B&amp;&amp;!u){A=A.toUpperCase()}for(var x=0,y=t.length,z;x&lt;y;x++){if((z=t[x])){while((z=z.previousSibling)&amp;&amp;z.nodeType!==1){}t[x]=v||z&amp;&amp;z.nodeName===A?z||false:z===A}}if(v){r.filter(A,t,true)}},&quot;&gt;&quot;:function(y,v,x){var A=typeof v===&quot;string&quot;;if(A&amp;&amp;!/\W/.test(v)){v=x?v:v.toUpperCase();for(var u=0,w=y.length;u&lt;w;u++){var z=y[u];if(z){var t=z.parentNode;y[u]=t.nodeName===v?t:false}}}else{for(var u=0,w=y.length;u&lt;w;u++){var z=y[u];if(z){y[u]=A?z.parentNode:z.parentNode===v}}if(A){r.filter(v,y,true)}}},&quot;&quot;:function(t,v,x){var u=j++,w=a;if(!v.match(/\W/)){var y=v=x?v:v.toUpperCase();w=e}w(&quot;parentNode&quot;,v,u,t,y,x)},&quot;~&quot;:function(t,v,x){var u=j++,w=a;if(typeof v===&quot;string&quot;&amp;&amp;!v.match(/\W/)){var y=v=x?v:v.toUpperCase();w=e}w(&quot;previousSibling&quot;,v,u,t,y,x)}},find:{ID:function(v,u,t){if(typeof u.getElementById!==&quot;undefined&quot;&amp;&amp;!t){var w=u.getElementById(v[1]);return w?[w]:[]}},NAME:function(u,y,x){if(typeof y.getElementsByName!==&quot;undefined&quot;){var v=[],z=y.getElementsByName(u[1]);for(var t=0,w=z.length;t&lt;w;t++){if(z[t].getAttribute(&quot;name&quot;)===u[1]){v.push(z[t])}}return v.length===0?null:v}},TAG:function(u,t){return t.getElementsByTagName(u[1])}},preFilter:{CLASS:function(t,v,u,w,y,x){t=&quot; &quot;+t[1].replace(/\\/g,&quot;&quot;)+&quot; &quot;;if(x){return t}for(var A=0,z;(z=v[A])!=null;A++){if(z){if(y^(z.className&amp;&amp;(&quot; &quot;+z.className+&quot; &quot;).indexOf(t)&gt;=0)){if(!u){w.push(z)}}else{if(u){v[A]=false}}}}return false},ID:function(t){return t[1].replace(/\\/g,&quot;&quot;)},TAG:function(u,v){for(var t=0;v[t]===false;t++){}return v[t]&amp;&amp;d(v[t])?u[1]:u[1].toUpperCase()},CHILD:function(u){if(u[1]==&quot;nth&quot;){var t=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(u[2]==&quot;even&quot;&amp;&amp;&quot;2n&quot;||u[2]==&quot;odd&quot;&amp;&amp;&quot;2n+1&quot;||!/\D/.test(u[2])&amp;&amp;&quot;0n+&quot;+u[2]||u[2]);u[2]=(t[1]+(t[2]||1))-0;u[3]=t[3]-0}u[0]=j++;return u},ATTR:function(z,v,u,w,y,x){var t=z[1].replace(/\\/g,&quot;&quot;);if(!x&amp;&amp;n.attrMap[t]){z[1]=n.attrMap[t]}if(z[2]===&quot;~=&quot;){z[4]=&quot; &quot;+z[4]+&quot; &quot;}return z},PSEUDO:function(y,v,u,w,x){if(y[1]===&quot;not&quot;){if(y[3].match(b).length&gt;1||/^\w/.test(y[3])){y[3]=r(y[3],null,null,v)}else{var t=r.filter(y[3],v,u,true^x);if(!u){w.push.apply(w,t)}return false}}else{if(n.match.POS.test(y[0])||n.match.CHILD.test(y[0])){return true}}return y},POS:function(t){t.unshift(true);return t}},filters:{enabled:function(t){return t.disabled===false&amp;&amp;t.type!==&quot;hidden&quot;},disabled:function(t){return t.disabled===true},checked:function(t){return t.checked===true},selected:function(t){t.parentNode.selectedIndex;return t.selected===true},parent:function(t){return !!t.firstChild},empty:function(t){return !t.firstChild},has:function(t,u,v){return !!r(v[3],t).length},header:function(t){return/h\d/i.test(t.nodeName)},text:function(t){return&quot;text&quot;===t.type},radio:function(t){return&quot;radio&quot;===t.type},checkbox:function(t){return&quot;checkbox&quot;===t.type},file:function(t){return&quot;file&quot;===t.type},password:function(t){return&quot;password&quot;===t.type},submit:function(t){return&quot;submit&quot;===t.type},image:function(t){return&quot;image&quot;===t.type},reset:function(t){return&quot;reset&quot;===t.type},button:function(t){return&quot;button&quot;===t.type||t.nodeName.toUpperCase()===&quot;BUTTON&quot;},input:function(t){return/input|select|textarea|button/i.test(t.nodeName)}},setFilters:{first:function(t,u){return u===0},last:function(u,v,w,t){return v===t.length-1},even:function(t,u){return u%2===0},odd:function(t,u){return u%2===1},lt:function(t,u,v){return u&lt;v[3]-0},gt:function(t,u,v){return u&gt;v[3]-0},nth:function(t,u,v){return v[3]-0==u},eq:function(t,u,v){return v[3]-0==u}},filter:{PSEUDO:function(y,u,t,x){var v=u[1],A=n.filters[v];if(A){return A(y,t,u,x)}else{if(v===&quot;contains&quot;){return(y.textContent||y.innerText||&quot;&quot;).indexOf(u[3])&gt;=0}else{if(v===&quot;not&quot;){var z=u[3];for(var t=0,w=z.length;t&lt;w;t++){if(z[t]===y){return false}}return true}}}},CHILD:function(A,x){var u=x[1],z=A;switch(u){case&quot;only&quot;:case&quot;first&quot;:while(z=z.previousSibling){if(z.nodeType===1){return false}}if(u==&quot;first&quot;){return true}z=A;case&quot;last&quot;:while(z=z.nextSibling){if(z.nodeType===1){return false}}return true;case&quot;nth&quot;:var y=x[2],B=x[3];if(y==1&amp;&amp;B==0){return true}var v=x[0],C=A.parentNode;if(C&amp;&amp;(C.sizcache!==v||!A.nodeIndex)){var w=0;for(z=C.firstChild;z;z=z.nextSibling){if(z.nodeType===1){z.nodeIndex=++w}}C.sizcache=v}var t=A.nodeIndex-B;if(y==0){return t==0}else{return(t%y==0&amp;&amp;t/y&gt;=0)}}},ID:function(t,u){return t.nodeType===1&amp;&amp;t.getAttribute(&quot;id&quot;)===u},TAG:function(t,u){return(u===&quot;*&quot;&amp;&amp;t.nodeType===1)||t.nodeName===u},CLASS:function(t,u){return(&quot; &quot;+(t.className||t.getAttribute(&quot;class&quot;))+&quot; &quot;).indexOf(u)&gt;-1},ATTR:function(y,t){var u=t[1],w=n.attrHandle[u]?n.attrHandle[u](y):y[u]!=null?y[u]:y.getAttribute(u),x=w+&quot;&quot;,z=t[2],v=t[4];return w==null?z===&quot;!=&quot;:z===&quot;=&quot;?x===v:z===&quot;*=&quot;?x.indexOf(v)&gt;=0:z===&quot;~=&quot;?(&quot; &quot;+x+&quot; &quot;).indexOf(v)&gt;=0:!v?x&amp;&amp;w!==false:z===&quot;!=&quot;?x!=v:z===&quot;^=&quot;?x.indexOf(v)===0:z===&quot;$=&quot;?x.substr(x.length-v.length)===v:z===&quot;|=&quot;?x===v||x.substr(0,v.length+1)===v+&quot;-&quot;:false},POS:function(y,v,u,x){var w=v[2],t=n.setFilters[w];if(t){return t(y,u,v,x)}}}};var h=n.match.POS;for(var f in n.match){n.match[f]=RegExp(n.match[f].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var s=function(t,u){t=Array.prototype.slice.call(t);if(u){u.push.apply(u,t);return u}return t};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(g){s=function(x,t){var v=t||[];if(o.call(x)===&quot;[object Array]&quot;){Array.prototype.push.apply(v,x)}else{if(typeof x.length===&quot;number&quot;){for(var u=0,w=x.length;u&lt;w;u++){v.push(x[u])}}else{for(var u=0;x[u];u++){v.push(x[u])}}}return v}}var q;if(document.documentElement.compareDocumentPosition){q=function(u,v){var t=u.compareDocumentPosition(v)&amp;4?-1:u===v?0:1;if(t===0){hasDuplicate=true}return t}}else{if(&quot;sourceIndex&quot; in document.documentElement){q=function(u,v){var t=u.sourceIndex-v.sourceIndex;if(t===0){hasDuplicate=true}return t}}else{if(document.createRange){q=function(t,v){var u=t.ownerDocument.createRange(),w=v.ownerDocument.createRange();u.selectNode(t);u.collapse(true);w.selectNode(v);w.collapse(true);var x=u.compareBoundaryPoints(Range.START_TO_END,w);if(x===0){hasDuplicate=true}return x}}}}(function(){var u=document.createElement(&quot;form&quot;),t=&quot;script&quot;+(new Date).getTime();u.innerHTML=&quot;&lt;input name='&quot;+t+&quot;'/&gt;&quot;;var v=document.documentElement;v.insertBefore(u,v.firstChild);if(!!document.getElementById(t)){n.find.ID=function(z,y,x){if(typeof y.getElementById!==&quot;undefined&quot;&amp;&amp;!x){var w=y.getElementById(z[1]);return w?w.id===z[1]||typeof w.getAttributeNode!==&quot;undefined&quot;&amp;&amp;w.getAttributeNode(&quot;id&quot;).nodeValue===z[1]?[w]:ab:[]}};n.filter.ID=function(x,w){var y=typeof x.getAttributeNode!==&quot;undefined&quot;&amp;&amp;x.getAttributeNode(&quot;id&quot;);return x.nodeType===1&amp;&amp;y&amp;&amp;y.nodeValue===w}}v.removeChild(u)})();(function(){var t=document.createElement(&quot;div&quot;);t.appendChild(document.createComment(&quot;&quot;));if(t.getElementsByTagName(&quot;*&quot;).length&gt;0){n.find.TAG=function(w,x){var y=x.getElementsByTagName(w[1]);if(w[1]===&quot;*&quot;){var u=[];for(var v=0;y[v];v++){if(y[v].nodeType===1){u.push(y[v])}}y=u}return y}}t.innerHTML=&quot;&lt;a href='#'&gt;&lt;/a&gt;&quot;;if(t.firstChild&amp;&amp;typeof t.firstChild.getAttribute!==&quot;undefined&quot;&amp;&amp;t.firstChild.getAttribute(&quot;href&quot;)!==&quot;#&quot;){n.attrHandle.href=function(u){return u.getAttribute(&quot;href&quot;,2)}}})();if(document.querySelectorAll){(function(){var u=r,t=document.createElement(&quot;div&quot;);t.innerHTML=&quot;&lt;p class='TEST'&gt;&lt;/p&gt;&quot;;if(t.querySelectorAll&amp;&amp;t.querySelectorAll(&quot;.TEST&quot;).length===0){return}r=function(y,z,w,v){z=z||document;if(!v&amp;&amp;z.nodeType===9&amp;&amp;!d(z)){try{return s(z.querySelectorAll(y),w)}catch(x){}}return u(y,z,w,v)};r.find=u.find;r.filter=u.filter;r.selectors=u.selectors;r.matches=u.matches})()}if(document.getElementsByClassName&amp;&amp;document.documentElement.getElementsByClassName){(function(){var t=document.createElement(&quot;div&quot;);t.innerHTML=&quot;&lt;div class='test e'&gt;&lt;/div&gt;&lt;div class='test'&gt;&lt;/div&gt;&quot;;if(t.getElementsByClassName(&quot;e&quot;).length===0){return}t.lastChild.className=&quot;e&quot;;if(t.getElementsByClassName(&quot;e&quot;).length===1){return}n.order.splice(1,0,&quot;CLASS&quot;);n.find.CLASS=function(w,v,u){if(typeof v.getElementsByClassName!==&quot;undefined&quot;&amp;&amp;!u){return v.getElementsByClassName(w[1])}}})()}function e(z,u,v,B,t,C){var D=z==&quot;previousSibling&quot;&amp;&amp;!C;for(var x=0,y=B.length;x&lt;y;x++){var A=B[x];if(A){if(D&amp;&amp;A.nodeType===1){A.sizcache=v;A.sizset=x}A=A[z];var w=false;while(A){if(A.sizcache===v){w=B[A.sizset];break}if(A.nodeType===1&amp;&amp;!C){A.sizcache=v;A.sizset=x}if(A.nodeName===u){w=A;break}A=A[z]}B[x]=w}}}function a(z,u,v,B,t,C){var D=z==&quot;previousSibling&quot;&amp;&amp;!C;for(var x=0,y=B.length;x&lt;y;x++){var A=B[x];if(A){if(D&amp;&amp;A.nodeType===1){A.sizcache=v;A.sizset=x}A=A[z];var w=false;while(A){if(A.sizcache===v){w=B[A.sizset];break}if(A.nodeType===1){if(!C){A.sizcache=v;A.sizset=x}if(typeof u!==&quot;string&quot;){if(A===u){w=true;break}}else{if(r.filter(u,[A]).length&gt;0){w=A;break}}}A=A[z]}B[x]=w}}}var l=document.compareDocumentPosition?function(t,u){return t.compareDocumentPosition(u)&amp;16}:function(t,u){return t!==u&amp;&amp;(t.contains?t.contains(u):true)};var d=function(t){return t.nodeType===9&amp;&amp;t.documentElement.nodeName!==&quot;HTML&quot;||!!t.ownerDocument&amp;&amp;d(t.ownerDocument)};var m=function(w,y){var t=[],A=&quot;&quot;,z,u=y.nodeType?[y]:y;while((z=n.match.PSEUDO.exec(w))){A+=z[0];w=w.replace(n.match.PSEUDO,&quot;&quot;)}w=n.relative[w]?w+&quot;*&quot;:w;for(var x=0,v=u.length;x&lt;v;x++){r(w,u[x],t)}return r.filter(A,t)};T.find=r;T.filter=r.filter;T.expr=r.selectors;T.expr[&quot;:&quot;]=T.expr.filters;r.selectors.filters.hidden=function(t){return t.offsetWidth===0||t.offsetHeight===0};r.selectors.filters.visible=function(t){return t.offsetWidth&gt;0||t.offsetHeight&gt;0};r.selectors.filters.animated=function(t){return T.grep(T.timers,function(u){return t===u.elem}).length};T.multiFilter=function(t,v,u){if(u){t=&quot;:not(&quot;+t+&quot;)&quot;}return r.matches(t,v)};T.dir=function(u,v){var w=[],t=u[v];while(t&amp;&amp;t!=document){if(t.nodeType==1){w.push(t)}t=t[v]}return w};T.nth=function(x,w,u,t){w=w||1;var v=0;for(;x;x=x[u]){if(x.nodeType==1&amp;&amp;++v==w){break}}return x};T.sibling=function(t,u){var v=[];for(;t;t=t.nextSibling){if(t.nodeType==1&amp;&amp;t!=u){v.push(t)}}return v};return;W.Sizzle=r})();T.event={add:function(d,g,e,a){if(d.nodeType==3||d.nodeType==8){return}if(d.setInterval&amp;&amp;d!=W){d=W}if(!e.guid){e.guid=this.guid++}if(a!==ab){var f=e;e=this.proxy(f);e.data=a}var h=T.data(d,&quot;events&quot;)||T.data(d,&quot;events&quot;,{}),b=T.data(d,&quot;handle&quot;)||T.data(d,&quot;handle&quot;,function(){return typeof T!==&quot;undefined&quot;&amp;&amp;!T.event.triggered?T.event.handle.apply(arguments.callee.elem,arguments):ab});b.elem=d;T.each(g.split(/\s+/),function(n,m){var l=m.split(&quot;.&quot;);m=l.shift();e.type=l.slice().sort().join(&quot;.&quot;);var j=h[m];if(T.event.specialAll[m]){T.event.specialAll[m].setup.call(d,a,l)}if(!j){j=h[m]={};if(!T.event.special[m]||T.event.special[m].setup.call(d,a,l)===false){if(d.addEventListener){d.addEventListener(m,b,false)}else{if(d.attachEvent){d.attachEvent(&quot;on&quot;+m,b)}}}}j[e.guid]=e;T.event.global[m]=true});d=null},guid:1,global:{},remove:function(b,f,d){if(b.nodeType==3||b.nodeType==8){return}var g=T.data(b,&quot;events&quot;),h,j;if(g){if(f===ab||(typeof f===&quot;string&quot;&amp;&amp;f.charAt(0)==&quot;.&quot;)){for(var e in g){this.remove(b,e+(f||&quot;&quot;))}}else{if(f.type){d=f.handler;f=f.type}T.each(f.split(/\s+/),function(q,n){var l=n.split(&quot;.&quot;);n=l.shift();var o=RegExp(&quot;(^|\\.)&quot;+l.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);if(g[n]){if(d){delete g[n][d.guid]}else{for(var m in g[n]){if(o.test(g[n][m].type)){delete g[n][m]}}}if(T.event.specialAll[n]){T.event.specialAll[n].teardown.call(b,l)}for(h in g[n]){break}if(!h){if(!T.event.special[n]||T.event.special[n].teardown.call(b,l)===false){if(b.removeEventListener){b.removeEventListener(n,T.data(b,&quot;handle&quot;),false)}else{if(b.detachEvent){b.detachEvent(&quot;on&quot;+n,T.data(b,&quot;handle&quot;))}}}h=null;delete g[n]}}})}for(h in g){break}if(!h){var a=T.data(b,&quot;handle&quot;);if(a){a.elem=null}T.removeData(b,&quot;events&quot;);T.removeData(b,&quot;handle&quot;)}}},trigger:function(e,b,f,j){var g=e.type||e;if(!j){e=typeof e===&quot;object&quot;?e[aa]?e:T.extend(T.Event(g),e):T.Event(g);if(g.indexOf(&quot;!&quot;)&gt;=0){e.type=g=g.slice(0,-1);e.exclusive=true}if(!f){e.stopPropagation();if(this.global[g]){T.each(T.cache,function(){if(this.events&amp;&amp;this.events[g]){T.event.trigger(e,b,this.handle.elem)}})}}if(!f||f.nodeType==3||f.nodeType==8){return ab}e.result=ab;e.target=f;b=T.makeArray(b);b.unshift(e)}e.currentTarget=f;var d=T.data(f,&quot;handle&quot;);if(d){d.apply(f,b)}if((!f[g]||(T.nodeName(f,&quot;a&quot;)&amp;&amp;g==&quot;click&quot;))&amp;&amp;f[&quot;on&quot;+g]&amp;&amp;f[&quot;on&quot;+g].apply(f,b)===false){e.result=false}if(!j&amp;&amp;f[g]&amp;&amp;!e.isDefaultPrevented()&amp;&amp;!(T.nodeName(f,&quot;a&quot;)&amp;&amp;g==&quot;click&quot;)){this.triggered=true;try{f[g]()}catch(a){}}this.triggered=false;if(!e.isPropagationStopped()){var h=f.parentNode||f.ownerDocument;if(h){T.event.trigger(e,b,h,true)}}},handle:function(b){var d,j;b=arguments[0]=T.event.fix(b||W.event);b.currentTarget=this;var a=b.type.split(&quot;.&quot;);b.type=a.shift();d=!a.length&amp;&amp;!b.exclusive;var e=RegExp(&quot;(^|\\.)&quot;+a.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);j=(T.data(this,&quot;events&quot;)||{})[b.type];for(var g in j){var f=j[g];if(d||e.test(f.type)){b.handler=f;b.data=f.data;var h=f.apply(this,arguments);if(h!==ab){b.result=h;if(h===false){b.preventDefault();b.stopPropagation()}}if(b.isImmediatePropagationStopped()){break}}}},props:&quot;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&quot;.split(&quot; &quot;),fix:function(d){if(d[aa]){return d}var f=d;d=T.Event(f);for(var e=this.props.length,a;e;){a=this.props[--e];d[a]=f[a]}if(!d.target){d.target=d.srcElement||document}if(d.target.nodeType==3){d.target=d.target.parentNode}if(!d.relatedTarget&amp;&amp;d.fromElement){d.relatedTarget=d.fromElement==d.target?d.toElement:d.fromElement}if(d.pageX==null&amp;&amp;d.clientX!=null){var b=document.documentElement,g=document.body;d.pageX=d.clientX+(b&amp;&amp;b.scrollLeft||g&amp;&amp;g.scrollLeft||0)-(b.clientLeft||0);d.pageY=d.clientY+(b&amp;&amp;b.scrollTop||g&amp;&amp;g.scrollTop||0)-(b.clientTop||0)}if(!d.which&amp;&amp;((d.charCode||d.charCode===0)?d.charCode:d.keyCode)){d.which=d.charCode||d.keyCode}if(!d.metaKey&amp;&amp;d.ctrlKey){d.metaKey=d.ctrlKey}if(!d.which&amp;&amp;d.button){d.which=(d.button&amp;1?1:(d.button&amp;2?3:(d.button&amp;4?2:0)))}return d},proxy:function(a,b){b=b||function(){return a.apply(this,arguments)};b.guid=a.guid=a.guid||b.guid||this.guid++;return b},special:{ready:{setup:P,teardown:function(){}}},specialAll:{live:{setup:function(b,a){T.event.add(this,a[0],af)},teardown:function(a){if(a.length){var d=0,b=RegExp(&quot;(^|\\.)&quot;+a[0]+&quot;(\\.|$)&quot;);T.each((T.data(this,&quot;events&quot;).live||{}),function(){if(b.test(this.type)){d++}});if(d&lt;1){T.event.remove(this,a[0],af)}}}}}};T.Event=function(a){if(!this.preventDefault){return new T.Event(a)}if(a&amp;&amp;a.type){this.originalEvent=a;this.type=a.type}else{this.type=a}this.timeStamp=ad();this[aa]=true};function X(){return false}function J(){return true}T.Event.prototype={preventDefault:function(){this.isDefaultPrevented=J;var a=this.originalEvent;if(!a){return}if(a.preventDefault){a.preventDefault()}a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=J;var a=this.originalEvent;if(!a){return}if(a.stopPropagation){a.stopPropagation()}a.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=J;this.stopPropagation()},isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X};var ah=function(b){var d=b.relatedTarget;while(d&amp;&amp;d!=this){try{d=d.parentNode}catch(a){d=this}}if(d!=this){b.type=b.data;T.event.handle.apply(this,arguments)}};T.each({mouseover:&quot;mouseenter&quot;,mouseout:&quot;mouseleave&quot;},function(a,b){T.event.special[b]={setup:function(){T.event.add(this,a,ah,b)},teardown:function(){T.event.remove(this,a,ah)}}});T.fn.extend({bind:function(b,a,d){return b==&quot;unload&quot;?this.one(b,a,d):this.each(function(){T.event.add(this,b,d||a,d&amp;&amp;a)})},one:function(b,a,d){var e=T.event.proxy(d||a,function(f){T(this).unbind(f,e);return(d||a).apply(this,arguments)});return this.each(function(){T.event.add(this,b,e,d&amp;&amp;a)})},unbind:function(a,b){return this.each(function(){T.event.remove(this,a,b)})},trigger:function(b,a){return this.each(function(){T.event.trigger(b,a,this)})},triggerHandler:function(d,a){if(this[0]){var b=T.Event(d);b.preventDefault();b.stopPropagation();T.event.trigger(b,a,this[0]);return b.result}},toggle:function(a){var d=arguments,b=1;while(b&lt;d.length){T.event.proxy(a,d[b++])}return this.click(T.event.proxy(a,function(e){this.lastToggle=(this.lastToggle||0)%b;e.preventDefault();return d[this.lastToggle++].apply(this,arguments)||false}))},hover:function(b,a){return this.mouseenter(b).mouseleave(a)},ready:function(a){P();if(T.isReady){a.call(document,T)}else{T.readyList.push(a)}return this},live:function(a,b){var d=T.event.proxy(b);d.guid+=this.selector+a;T(document).bind(Z(a,this.selector),this.selector,d);return this},die:function(a,b){T(document).unbind(Z(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});function af(a){var e=RegExp(&quot;(^|\\.)&quot;+a.type+&quot;(\\.|$)&quot;),b=true,d=[];T.each(T.data(this,&quot;events&quot;).live||[],function(h,g){if(e.test(g.type)){var f=T(a.target).closest(g.data)[0];if(f){d.push({elem:f,fn:g})}}});d.sort(function(f,g){return T.data(f.elem,&quot;closest&quot;)-T.data(g.elem,&quot;closest&quot;)});T.each(d,function(){if(this.fn.call(this.elem,a,this.fn.data)===false){return(b=false)}});return b}function Z(a,b){return[&quot;live&quot;,a,b.replace(/\./g,&quot;`&quot;).replace(/ /g,&quot;|&quot;)].join(&quot;.&quot;)}T.extend({isReady:false,readyList:[],ready:function(){if(!T.isReady){T.isReady=true;if(T.readyList){T.each(T.readyList,function(){this.call(document,T)});T.readyList=null}T(document).triggerHandler(&quot;ready&quot;)}}});var G=false;function P(){if(G){return}G=true;if(document.addEventListener){document.addEventListener(&quot;DOMContentLoaded&quot;,function(){document.removeEventListener(&quot;DOMContentLoaded&quot;,arguments.callee,false);T.ready()},false)}else{if(document.attachEvent){document.attachEvent(&quot;onreadystatechange&quot;,function(){if(document.readyState===&quot;complete&quot;){document.detachEvent(&quot;onreadystatechange&quot;,arguments.callee);T.ready()}});if(document.documentElement.doScroll&amp;&amp;W==W.top){(function(){if(T.isReady){return}try{document.documentElement.doScroll(&quot;left&quot;)}catch(a){setTimeout(arguments.callee,0);return}T.ready()})()}}}T.event.add(W,&quot;load&quot;,T.ready)}T.each((&quot;blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error&quot;).split(&quot;,&quot;),function(a,b){T.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)}});T(W).bind(&quot;unload&quot;,function(){for(var a in T.cache){if(a!=1&amp;&amp;T.cache[a].handle){T.event.remove(T.cache[a].handle.elem)}}});(function(){T.support={};var g=document.documentElement,f=document.createElement(&quot;script&quot;),a=document.createElement(&quot;div&quot;),b=&quot;script&quot;+(new Date).getTime();a.style.display=&quot;none&quot;;a.innerHTML='   &lt;link/&gt;&lt;table&gt;&lt;/table&gt;&lt;a href=&quot;/a&quot; style=&quot;color:red;float:left;opacity:.5;&quot;&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 e=a.getElementsByTagName(&quot;*&quot;),h=a.getElementsByTagName(&quot;a&quot;)[0];if(!e||!e.length||!h){return}T.support={leadingWhitespace:a.firstChild.nodeType==3,tbody:!a.getElementsByTagName(&quot;tbody&quot;).length,objectAll:!!a.getElementsByTagName(&quot;object&quot;)[0].getElementsByTagName(&quot;*&quot;).length,htmlSerialize:!!a.getElementsByTagName(&quot;link&quot;).length,style:/red/.test(h.getAttribute(&quot;style&quot;)),hrefNormalized:h.getAttribute(&quot;href&quot;)===&quot;/a&quot;,opacity:h.style.opacity===&quot;0.5&quot;,cssFloat:!!h.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};f.type=&quot;text/javascript&quot;;try{f.appendChild(document.createTextNode(&quot;window.&quot;+b+&quot;=1;&quot;))}catch(d){}g.insertBefore(f,g.firstChild);if(W[b]){T.support.scriptEval=true;delete W[b]}g.removeChild(f);if(a.attachEvent&amp;&amp;a.fireEvent){a.attachEvent(&quot;onclick&quot;,function(){T.support.noCloneEvent=false;a.detachEvent(&quot;onclick&quot;,arguments.callee)});a.cloneNode(true).fireEvent(&quot;onclick&quot;)}T(function(){var j=document.createElement(&quot;div&quot;);j.style.width=j.style.paddingLeft=&quot;1px&quot;;document.body.appendChild(j);T.boxModel=T.support.boxModel=j.offsetWidth===2;document.body.removeChild(j).style.display=&quot;none&quot;})})();var H=T.support.cssFloat?&quot;cssFloat&quot;:&quot;styleFloat&quot;;T.props={&quot;for&quot;:&quot;htmlFor&quot;,&quot;class&quot;:&quot;className&quot;,&quot;float&quot;:H,cssFloat:H,styleFloat:H,readonly:&quot;readOnly&quot;,maxlength:&quot;maxLength&quot;,cellspacing:&quot;cellSpacing&quot;,rowspan:&quot;rowSpan&quot;,tabindex:&quot;tabIndex&quot;};T.fn.extend({_load:T.fn.load,load:function(f,b,a){if(typeof f!==&quot;string&quot;){return this._load(f)}var d=f.indexOf(&quot; &quot;);if(d&gt;=0){var h=f.slice(d,f.length);f=f.slice(0,d)}var e=&quot;GET&quot;;if(b){if(T.isFunction(b)){a=b;b=null}else{if(typeof b===&quot;object&quot;){b=T.param(b);e=&quot;POST&quot;}}}var g=this;T.ajax({url:f,type:e,dataType:&quot;html&quot;,data:b,complete:function(l,j){if(j==&quot;success&quot;||j==&quot;notmodified&quot;){g.html(h?T(&quot;&lt;div/&gt;&quot;).append(l.responseText.replace(/&lt;script(.|\s)*?\/script&gt;/g,&quot;&quot;)).find(h):l.responseText)}if(a){g.each(a,[l.responseText,j,l])}}});return this},serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?T.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(d,b){var a=T(this).val();return a==null?null:T.isArray(a)?T.map(a,function(e,f){return{name:b.name,value:e}}):{name:b.name,value:a}}).get()}});T.each(&quot;ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend&quot;.split(&quot;,&quot;),function(b,a){T.fn[a]=function(d){return this.bind(a,d)}});var N=ad();T.extend({get:function(e,b,a,d){if(T.isFunction(b)){a=b;b=null}return T.ajax({type:&quot;GET&quot;,url:e,data:b,success:a,dataType:d})},getScript:function(b,a){return T.get(b,null,a,&quot;script&quot;)},getJSON:function(d,b,a){return T.get(d,b,a,&quot;json&quot;)},post:function(e,b,a,d){if(T.isFunction(b)){a=b;b={}}return T.ajax({type:&quot;POST&quot;,url:e,data:b,success:a,dataType:d})},ajaxSetup:function(a){T.extend(T.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:&quot;GET&quot;,contentType:&quot;application/x-www-form-urlencoded&quot;,processData:true,async:true,xhr:function(){return W.ActiveXObject?new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;):new XMLHttpRequest()},accepts:{xml:&quot;application/xml, text/xml&quot;,html:&quot;text/html&quot;,script:&quot;text/javascript, application/javascript&quot;,json:&quot;application/json, text/javascript&quot;,text:&quot;text/plain&quot;,_default:&quot;*/*&quot;}},lastModified:{},ajax:function(n){n=T.extend(true,n,T.extend(true,{},T.ajaxSettings,n));var a,v=/=\?(&amp;|$)/g,g,b,u=n.type.toUpperCase();if(n.data&amp;&amp;n.processData&amp;&amp;typeof n.data!==&quot;string&quot;){n.data=T.param(n.data)}if(n.dataType==&quot;jsonp&quot;){if(u==&quot;GET&quot;){if(!n.url.match(v)){n.url+=(n.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+(n.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}else{if(!n.data||!n.data.match(v)){n.data=(n.data?n.data+&quot;&amp;&quot;:&quot;&quot;)+(n.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}n.dataType=&quot;json&quot;}if(n.dataType==&quot;json&quot;&amp;&amp;(n.data&amp;&amp;n.data.match(v)||n.url.match(v))){a=&quot;jsonp&quot;+N++;if(n.data){n.data=(n.data+&quot;&quot;).replace(v,&quot;=&quot;+a+&quot;$1&quot;)}n.url=n.url.replace(v,&quot;=&quot;+a+&quot;$1&quot;);n.dataType=&quot;script&quot;;W[a]=function(y){b=y;s();o();W[a]=ab;try{delete W[a]}catch(x){}if(t){t.removeChild(e)}}}if(n.dataType==&quot;script&quot;&amp;&amp;n.cache==null){n.cache=false}if(n.cache===false&amp;&amp;u==&quot;GET&quot;){var w=ad();var d=n.url.replace(/(\?|&amp;)_=.*?(&amp;|$)/,&quot;$1_=&quot;+w+&quot;$2&quot;);n.url=d+((d==n.url)?(n.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+&quot;_=&quot;+w:&quot;&quot;)}if(n.data&amp;&amp;u==&quot;GET&quot;){n.url+=(n.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+n.data;n.data=null}if(n.global&amp;&amp;!T.active++){T.event.trigger(&quot;ajaxStart&quot;)}var h=/^(\w+:)?\/\/([^\/?#]+)/.exec(n.url);if(n.dataType==&quot;script&quot;&amp;&amp;u==&quot;GET&quot;&amp;&amp;h&amp;&amp;(h[1]&amp;&amp;h[1]!=location.protocol||h[2]!=location.host)){var t=document.getElementsByTagName(&quot;head&quot;)[0];var e=document.createElement(&quot;script&quot;);e.src=n.url;if(n.scriptCharset){e.charset=n.scriptCharset}if(!a){var l=false;e.onload=e.onreadystatechange=function(){if(!l&amp;&amp;(!this.readyState||this.readyState==&quot;loaded&quot;||this.readyState==&quot;complete&quot;)){l=true;s();o();e.onload=e.onreadystatechange=null;t.removeChild(e)}}}t.appendChild(e);return ab}var q=false;var r=n.xhr();if(n.username){r.open(u,n.url,n.async,n.username,n.password)}else{r.open(u,n.url,n.async)}try{if(n.data){r.setRequestHeader(&quot;Content-Type&quot;,n.contentType)}if(n.ifModified){r.setRequestHeader(&quot;If-Modified-Since&quot;,T.lastModified[n.url]||&quot;Thu, 01 Jan 1970 00:00:00 GMT&quot;)}r.setRequestHeader(&quot;X-Requested-With&quot;,&quot;XMLHttpRequest&quot;);r.setRequestHeader(&quot;Accept&quot;,n.dataType&amp;&amp;n.accepts[n.dataType]?n.accepts[n.dataType]+&quot;, */*&quot;:n.accepts._default)}catch(f){}if(n.beforeSend&amp;&amp;n.beforeSend(r,n)===false){if(n.global&amp;&amp;!--T.active){T.event.trigger(&quot;ajaxStop&quot;)}r.abort();return false}if(n.global){T.event.trigger(&quot;ajaxSend&quot;,[r,n])}var m=function(z){if(r.readyState==0){if(j){clearInterval(j);j=null;if(n.global&amp;&amp;!--T.active){T.event.trigger(&quot;ajaxStop&quot;)}}}else{if(!q&amp;&amp;r&amp;&amp;(r.readyState==4||z==&quot;timeout&quot;)){q=true;if(j){clearInterval(j);j=null}g=z==&quot;timeout&quot;?&quot;timeout&quot;:!T.httpSuccess(r)?&quot;error&quot;:n.ifModified&amp;&amp;T.httpNotModified(r,n.url)?&quot;notmodified&quot;:&quot;success&quot;;if(g==&quot;success&quot;){try{b=T.httpData(r,n.dataType,n)}catch(x){g=&quot;parsererror&quot;}}if(g==&quot;success&quot;){var y;try{y=r.getResponseHeader(&quot;Last-Modified&quot;)}catch(x){}if(n.ifModified&amp;&amp;y){T.lastModified[n.url]=y}if(!a){s()}}else{T.handleError(n,r,g)}o();if(z){r.abort()}if(n.async){r=null}}}};if(n.async){var j=setInterval(m,13);if(n.timeout&gt;0){setTimeout(function(){if(r&amp;&amp;!q){m(&quot;timeout&quot;)}},n.timeout)}}try{r.send(n.data)}catch(f){T.handleError(n,r,null,f)}if(!n.async){m()}function s(){if(n.success){n.success(b,g)}if(n.global){T.event.trigger(&quot;ajaxSuccess&quot;,[r,n])}}function o(){if(n.complete){n.complete(r,g)}if(n.global){T.event.trigger(&quot;ajaxComplete&quot;,[r,n])}if(n.global&amp;&amp;!--T.active){T.event.trigger(&quot;ajaxStop&quot;)}}return r},handleError:function(d,a,e,b){if(d.error){d.error(a,e,b)}if(d.global){T.event.trigger(&quot;ajaxError&quot;,[a,d,b])}},active:0,httpSuccess:function(a){try{return !a.status&amp;&amp;location.protocol==&quot;file:&quot;||(a.status&gt;=200&amp;&amp;a.status&lt;300)||a.status==304||a.status==1223}catch(b){}return false},httpNotModified:function(b,e){try{var a=b.getResponseHeader(&quot;Last-Modified&quot;);return b.status==304||a==T.lastModified[e]}catch(d){}return false},httpData:function(a,d,e){var f=a.getResponseHeader(&quot;content-type&quot;),g=d==&quot;xml&quot;||!d&amp;&amp;f&amp;&amp;f.indexOf(&quot;xml&quot;)&gt;=0,b=g?a.responseXML:a.responseText;if(g&amp;&amp;b.documentElement.tagName==&quot;parsererror&quot;){throw&quot;parsererror&quot;}if(e&amp;&amp;e.dataFilter){b=e.dataFilter(b,d)}if(typeof b===&quot;string&quot;){if(d==&quot;script&quot;){T.globalEval(b)}if(d==&quot;json&quot;){b=W[&quot;eval&quot;](&quot;(&quot;+b+&quot;)&quot;)}}return b},param:function(e){var b=[];function a(g,f){b[b.length]=encodeURIComponent(g)+&quot;=&quot;+encodeURIComponent(f)}if(T.isArray(e)||e.jquery){T.each(e,function(){a(this.name,this.value)})}else{for(var d in e){if(T.isArray(e[d])){T.each(e[d],function(){a(d,this)})}else{a(d,T.isFunction(e[d])?e[d]():e[d])}}}return b.join(&quot;&amp;&quot;).replace(/%20/g,&quot;+&quot;)}});var V={},U,ae=[[&quot;height&quot;,&quot;marginTop&quot;,&quot;marginBottom&quot;,&quot;paddingTop&quot;,&quot;paddingBottom&quot;],[&quot;width&quot;,&quot;marginLeft&quot;,&quot;marginRight&quot;,&quot;paddingLeft&quot;,&quot;paddingRight&quot;],[&quot;opacity&quot;]];function K(b,d){var a={};T.each(ae.concat.apply([],ae.slice(0,d)),function(){a[this]=b});return a}T.fn.extend({show:function(d,a){if(d){return this.animate(K(&quot;show&quot;,3),d,a)}else{for(var f=0,h=this.length;f&lt;h;f++){var j=T.data(this[f],&quot;olddisplay&quot;);this[f].style.display=j||&quot;&quot;;if(T.css(this[f],&quot;display&quot;)===&quot;none&quot;){var g=this[f].tagName,b;if(V[g]){b=V[g]}else{var e=T(&quot;&lt;&quot;+g+&quot; /&gt;&quot;).appendTo(&quot;body&quot;);b=e.css(&quot;display&quot;);if(b===&quot;none&quot;){b=&quot;block&quot;}e.remove();V[g]=b}T.data(this[f],&quot;olddisplay&quot;,b)}}for(var f=0,h=this.length;f&lt;h;f++){this[f].style.display=T.data(this[f],&quot;olddisplay&quot;)||&quot;&quot;}return this}},hide:function(b,a){if(b){return this.animate(K(&quot;hide&quot;,3),b,a)}else{for(var d=0,e=this.length;d&lt;e;d++){var f=T.data(this[d],&quot;olddisplay&quot;);if(!f&amp;&amp;f!==&quot;none&quot;){T.data(this[d],&quot;olddisplay&quot;,T.css(this[d],&quot;display&quot;))}}for(var d=0,e=this.length;d&lt;e;d++){this[d].style.display=&quot;none&quot;}return this}},_toggle:T.fn.toggle,toggle:function(a,b){var d=typeof a===&quot;boolean&quot;;return T.isFunction(a)&amp;&amp;T.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var e=d?a:T(this).is(&quot;:hidden&quot;);T(this)[e?&quot;show&quot;:&quot;hide&quot;]()}):this.animate(K(&quot;toggle&quot;,3),a,b)},fadeTo:function(d,a,b){return this.animate({opacity:a},d,b)},animate:function(a,e,b,d){var f=T.speed(e,b,d);return this[f.queue===false?&quot;each&quot;:&quot;queue&quot;](function(){var h=T.extend({},f),l,g=this.nodeType==1&amp;&amp;T(this).is(&quot;:hidden&quot;),j=this;for(l in a){if(a[l]==&quot;hide&quot;&amp;&amp;g||a[l]==&quot;show&quot;&amp;&amp;!g){return h.complete.call(this)}if((l==&quot;height&quot;||l==&quot;width&quot;)&amp;&amp;this.style){h.display=T.css(this,&quot;display&quot;);h.overflow=this.style.overflow}}if(h.overflow!=null){this.style.overflow=&quot;hidden&quot;}h.curAnim=T.extend({},a);T.each(a,function(s,n){var o=new T.fx(j,h,s);if(/toggle|show|hide/.test(n)){o[n==&quot;toggle&quot;?g?&quot;show&quot;:&quot;hide&quot;:n](a)}else{var q=n.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),m=o.cur(true)||0;if(q){var t=parseFloat(q[2]),r=q[3]||&quot;px&quot;;if(r!=&quot;px&quot;){j.style[s]=(t||1)+r;m=((t||1)/o.cur(true))*m;j.style[s]=m+r}if(q[1]){t=((q[1]==&quot;-=&quot;?-1:1)*t)+m}o.custom(m,t,r)}else{o.custom(m,n,&quot;&quot;)}}});return true})},stop:function(b,d){var a=T.timers;if(b){this.queue([])}this.each(function(){for(var e=a.length-1;e&gt;=0;e--){if(a[e].elem==this){if(d){a[e](true)}a.splice(e,1)}}});if(!d){this.dequeue()}return this}});T.each({slideDown:K(&quot;show&quot;,1),slideUp:K(&quot;hide&quot;,1),slideToggle:K(&quot;toggle&quot;,1),fadeIn:{opacity:&quot;show&quot;},fadeOut:{opacity:&quot;hide&quot;}},function(b,a){T.fn[b]=function(e,d){return this.animate(a,e,d)}});T.extend({speed:function(b,a,d){var e=typeof b===&quot;object&quot;?b:{complete:d||!d&amp;&amp;a||T.isFunction(b)&amp;&amp;b,duration:b,easing:d&amp;&amp;a||a&amp;&amp;!T.isFunction(a)&amp;&amp;a};e.duration=T.fx.off?0:typeof e.duration===&quot;number&quot;?e.duration:T.fx.speeds[e.duration]||T.fx.speeds._default;e.old=e.complete;e.complete=function(){if(e.queue!==false){T(this).dequeue()}if(T.isFunction(e.old)){e.old.call(this)}};return e},easing:{linear:function(b,a,e,d){return e+d*b},swing:function(b,a,e,d){return((-Math.cos(b*Math.PI)/2)+0.5)*d+e}},timers:[],fx:function(b,d,a){this.options=d;this.elem=b;this.prop=a;if(!d.orig){d.orig={}}}});T.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(T.fx.step[this.prop]||T.fx.step._default)(this);if((this.prop==&quot;height&quot;||this.prop==&quot;width&quot;)&amp;&amp;this.elem.style){this.elem.style.display=&quot;block&quot;}},cur:function(a){if(this.elem[this.prop]!=null&amp;&amp;(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var b=parseFloat(T.css(this.elem,this.prop,a));return b&amp;&amp;b&gt;-10000?b:parseFloat(T.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){this.startTime=ad();this.start=a;this.end=b;this.unit=d||this.unit||&quot;px&quot;;this.now=this.start;this.pos=this.state=0;var f=this;function e(g){return f.step(g)}e.elem=this.elem;if(e()&amp;&amp;T.timers.push(e)&amp;&amp;!U){U=setInterval(function(){var g=T.timers;for(var h=0;h&lt;g.length;h++){if(!g[h]()){g.splice(h--,1)}}if(!g.length){clearInterval(U);U=ab}},13)}},show:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop==&quot;width&quot;||this.prop==&quot;height&quot;?1:0,this.cur());T(this.elem).show()},hide:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(d){var e=ad();if(d||e&gt;=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var g=true;for(var f in this.options.curAnim){if(this.options.curAnim[f]!==true){g=false}}if(g){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(T.css(this.elem,&quot;display&quot;)==&quot;none&quot;){this.elem.style.display=&quot;block&quot;}}if(this.options.hide){T(this.elem).hide()}if(this.options.hide||this.options.show){for(var b in this.options.curAnim){T.attr(this.elem.style,b,this.options.orig[b])}}this.options.complete.call(this.elem)}return false}else{var a=e-this.startTime;this.state=a/this.options.duration;this.pos=T.easing[this.options.easing||(T.easing.swing?&quot;swing&quot;:&quot;linear&quot;)](this.state,a,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};T.extend(T.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){T.attr(a.elem.style,&quot;opacity&quot;,a.now)},_default:function(a){if(a.elem.style&amp;&amp;a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit}else{a.elem[a.prop]=a.now}}}});if(document.documentElement.getBoundingClientRect){T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}var g=this[0].getBoundingClientRect(),d=this[0].ownerDocument,h=d.body,j=d.documentElement,a=j.clientTop||h.clientTop||0,b=j.clientLeft||h.clientLeft||0,e=g.top+(self.pageYOffset||T.boxModel&amp;&amp;j.scrollTop||h.scrollTop)-a,f=g.left+(self.pageXOffset||T.boxModel&amp;&amp;j.scrollLeft||h.scrollLeft)-b;return{top:e,left:f}}}else{T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}T.offset.initialized||T.offset.initialize();var g=this[0],l=g.offsetParent,m=g,a=g.ownerDocument,d,j=a.documentElement,f=a.body,e=a.defaultView,n=e.getComputedStyle(g,null),b=g.offsetTop,h=g.offsetLeft;while((g=g.parentNode)&amp;&amp;g!==f&amp;&amp;g!==j){d=e.getComputedStyle(g,null);b-=g.scrollTop,h-=g.scrollLeft;if(g===l){b+=g.offsetTop,h+=g.offsetLeft;if(T.offset.doesNotAddBorder&amp;&amp;!(T.offset.doesAddBorderForTableAndCells&amp;&amp;/^t(able|d|h)$/i.test(g.tagName))){b+=parseInt(d.borderTopWidth,10)||0,h+=parseInt(d.borderLeftWidth,10)||0}m=l,l=g.offsetParent}if(T.offset.subtractsBorderForOverflowNotVisible&amp;&amp;d.overflow!==&quot;visible&quot;){b+=parseInt(d.borderTopWidth,10)||0,h+=parseInt(d.borderLeftWidth,10)||0}n=d}if(n.position===&quot;relative&quot;||n.position===&quot;static&quot;){b+=f.offsetTop,h+=f.offsetLeft}if(n.position===&quot;fixed&quot;){b+=Math.max(j.scrollTop,f.scrollTop),h+=Math.max(j.scrollLeft,f.scrollLeft)}return{top:b,left:h}}}T.offset={initialize:function(){if(this.initialized){return}var d=document.body,l=document.createElement(&quot;div&quot;),h,j,a,g,b,m,f=d.style.marginTop,e='&lt;div style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;table style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';b={position:&quot;absolute&quot;,top:0,left:0,margin:0,border:0,width:&quot;1px&quot;,height:&quot;1px&quot;,visibility:&quot;hidden&quot;};for(m in b){l.style[m]=b[m]}l.innerHTML=e;d.insertBefore(l,d.firstChild);h=l.firstChild,j=h.firstChild,g=h.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(j.offsetTop!==5);this.doesAddBorderForTableAndCells=(g.offsetTop===5);h.style.overflow=&quot;hidden&quot;,h.style.position=&quot;relative&quot;;this.subtractsBorderForOverflowNotVisible=(j.offsetTop===-5);d.style.marginTop=&quot;1px&quot;;this.doesNotIncludeMarginInBodyOffset=(d.offsetTop===0);d.style.marginTop=f;d.removeChild(l);this.initialized=true},bodyOffset:function(d){T.offset.initialized||T.offset.initialize();var a=d.offsetTop,b=d.offsetLeft;if(T.offset.doesNotIncludeMarginInBodyOffset){a+=parseInt(T.curCSS(d,&quot;marginTop&quot;,true),10)||0,b+=parseInt(T.curCSS(d,&quot;marginLeft&quot;,true),10)||0}return{top:a,left:b}}};T.fn.extend({position:function(){var b=0,d=0,f;if(this[0]){var e=this.offsetParent(),a=this.offset(),g=/^body|html$/i.test(e[0].tagName)?{top:0,left:0}:e.offset();a.top-=Y(this,&quot;marginTop&quot;);a.left-=Y(this,&quot;marginLeft&quot;);g.top+=Y(e,&quot;borderTopWidth&quot;);g.left+=Y(e,&quot;borderLeftWidth&quot;);f={top:a.top-g.top,left:a.left-g.left}}return f},offsetParent:function(){var a=this[0].offsetParent||document.body;while(a&amp;&amp;(!/^body|html$/i.test(a.tagName)&amp;&amp;T.css(a,&quot;position&quot;)==&quot;static&quot;)){a=a.offsetParent}return T(a)}});T.each([&quot;Left&quot;,&quot;Top&quot;],function(b,d){var a=&quot;scroll&quot;+d;T.fn[a]=function(e){if(!this[0]){return null}return e!==ab?this.each(function(){this==W||this==document?W.scrollTo(!b?e:T(W).scrollLeft(),b?e:T(W).scrollTop()):this[a]=e}):this[0]==W||this[0]==document?self[b?&quot;pageYOffset&quot;:&quot;pageXOffset&quot;]||T.boxModel&amp;&amp;document.documentElement[a]||document.body[a]:this[0][a]}});T.each([&quot;Height&quot;,&quot;Width&quot;],function(b,e){var g=b?&quot;Left&quot;:&quot;Top&quot;,d=b?&quot;Right&quot;:&quot;Bottom&quot;,f=e.toLowerCase();T.fn[&quot;inner&quot;+e]=function(){return this[0]?T.css(this[0],f,false,&quot;padding&quot;):null};T.fn[&quot;outer&quot;+e]=function(h){return this[0]?T.css(this[0],f,false,h?&quot;margin&quot;:&quot;border&quot;):null};var a=e.toLowerCase();T.fn[a]=function(h){return this[0]==W?document.compatMode==&quot;CSS1Compat&quot;&amp;&amp;document.documentElement[&quot;client&quot;+e]||document.body[&quot;client&quot;+e]:this[0]==document?Math.max(document.documentElement[&quot;client&quot;+e],document.body[&quot;scroll&quot;+e],document.documentElement[&quot;scroll&quot;+e],document.body[&quot;offset&quot;+e],document.documentElement[&quot;offset&quot;+e]):h===ab?(this.length?T.css(this[0],a):null):this.css(a,typeof h===&quot;string&quot;?h:h+&quot;px&quot;)}})})();var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(a){this.initSWFUpload(a)}}SWFUpload.prototype.initSWFUpload=function(b){try{this.customSettings={};this.settings=b;this.eventQueue=[];this.movieName=&quot;SWFUpload_&quot;+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(a){delete SWFUpload.instances[this.movieName];throw a}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version=&quot;2.2.0 2009-03-25&quot;;SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:&quot;window&quot;,TRANSPARENT:&quot;transparent&quot;,OPAQUE:&quot;opaque&quot;};SWFUpload.completeURL=function(a){if(typeof(a)!==&quot;string&quot;||a.match(/^https?:\/\//i)||a.match(/^\//)){return a}var d=window.location.protocol+&quot;//&quot;+window.location.hostname+(window.location.port?&quot;:&quot;+window.location.port:&quot;&quot;);var b=window.location.pathname.lastIndexOf(&quot;/&quot;);if(b&lt;=0){path=&quot;/&quot;}else{path=window.location.pathname.substr(0,b)+&quot;/&quot;}return path+a};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(b,a){this.settings[b]=(this.settings[b]==undefined)?a:this.settings[b]};this.ensureDefault(&quot;upload_url&quot;,&quot;&quot;);this.ensureDefault(&quot;preserve_relative_urls&quot;,false);this.ensureDefault(&quot;file_post_name&quot;,&quot;Filedata&quot;);this.ensureDefault(&quot;post_params&quot;,{});this.ensureDefault(&quot;use_query_string&quot;,false);this.ensureDefault(&quot;requeue_on_error&quot;,false);this.ensureDefault(&quot;http_success&quot;,[]);this.ensureDefault(&quot;assume_success_timeout&quot;,0);this.ensureDefault(&quot;file_types&quot;,&quot;*.*&quot;);this.ensureDefault(&quot;file_types_description&quot;,&quot;All Files&quot;);this.ensureDefault(&quot;file_size_limit&quot;,0);this.ensureDefault(&quot;file_upload_limit&quot;,0);this.ensureDefault(&quot;file_queue_limit&quot;,0);this.ensureDefault(&quot;flash_url&quot;,&quot;swfupload.swf&quot;);this.ensureDefault(&quot;prevent_swf_caching&quot;,true);this.ensureDefault(&quot;button_image_url&quot;,&quot;&quot;);this.ensureDefault(&quot;button_width&quot;,1);this.ensureDefault(&quot;button_height&quot;,1);this.ensureDefault(&quot;button_text&quot;,&quot;&quot;);this.ensureDefault(&quot;button_text_style&quot;,&quot;color: #000000; font-size: 16pt;&quot;);this.ensureDefault(&quot;button_text_top_padding&quot;,0);this.ensureDefault(&quot;button_text_left_padding&quot;,0);this.ensureDefault(&quot;button_action&quot;,SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault(&quot;button_disabled&quot;,false);this.ensureDefault(&quot;button_placeholder_id&quot;,&quot;&quot;);this.ensureDefault(&quot;button_placeholder&quot;,null);this.ensureDefault(&quot;button_cursor&quot;,SWFUpload.CURSOR.ARROW);this.ensureDefault(&quot;button_window_mode&quot;,SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault(&quot;debug&quot;,false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault(&quot;swfupload_loaded_handler&quot;,null);this.ensureDefault(&quot;file_dialog_start_handler&quot;,null);this.ensureDefault(&quot;file_queued_handler&quot;,null);this.ensureDefault(&quot;file_queue_error_handler&quot;,null);this.ensureDefault(&quot;file_dialog_complete_handler&quot;,null);this.ensureDefault(&quot;upload_start_handler&quot;,null);this.ensureDefault(&quot;upload_progress_handler&quot;,null);this.ensureDefault(&quot;upload_error_handler&quot;,null);this.ensureDefault(&quot;upload_success_handler&quot;,null);this.ensureDefault(&quot;upload_complete_handler&quot;,null);this.ensureDefault(&quot;debug_handler&quot;,this.debugMessage);this.ensureDefault(&quot;custom_settings&quot;,{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf(&quot;?&quot;)&lt;0?&quot;?&quot;:&quot;&amp;&quot;)+&quot;preventswfcaching=&quot;+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var a,b;if(document.getElementById(this.movieName)!==null){throw&quot;ID &quot;+this.movieName+&quot; is already in use. The Flash Object could not be added&quot;}a=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(a==undefined){throw&quot;Could not find the placeholder element: &quot;+this.settings.button_placeholder_id}b=document.createElement(&quot;div&quot;);b.innerHTML=this.getFlashHTML();a.parentNode.replaceChild(b.firstChild,a);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['&lt;object id=&quot;',this.movieName,'&quot; type=&quot;application/x-shockwave-flash&quot; data=&quot;',this.settings.flash_url,'&quot; width=&quot;',this.settings.button_width,'&quot; height=&quot;',this.settings.button_height,'&quot; class=&quot;swfupload&quot;&gt;','&lt;param name=&quot;wmode&quot; value=&quot;',this.settings.button_window_mode,'&quot; /&gt;','&lt;param name=&quot;movie&quot; value=&quot;',this.settings.flash_url,'&quot; /&gt;','&lt;param name=&quot;quality&quot; value=&quot;high&quot; /&gt;','&lt;param name=&quot;menu&quot; value=&quot;false&quot; /&gt;','&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;','&lt;param name=&quot;flashvars&quot; value=&quot;'+this.getFlashVars()+'&quot; /&gt;',&quot;&lt;/object&gt;&quot;].join(&quot;&quot;)};SWFUpload.prototype.getFlashVars=function(){var b=this.buildParamString();var a=this.settings.http_success.join(&quot;,&quot;);return[&quot;movieName=&quot;,encodeURIComponent(this.movieName),&quot;&amp;amp;uploadURL=&quot;,encodeURIComponent(this.settings.upload_url),&quot;&amp;amp;useQueryString=&quot;,encodeURIComponent(this.settings.use_query_string),&quot;&amp;amp;requeueOnError=&quot;,encodeURIComponent(this.settings.requeue_on_error),&quot;&amp;amp;httpSuccess=&quot;,encodeURIComponent(a),&quot;&amp;amp;assumeSuccessTimeout=&quot;,encodeURIComponent(this.settings.assume_success_timeout),&quot;&amp;amp;params=&quot;,encodeURIComponent(b),&quot;&amp;amp;filePostName=&quot;,encodeURIComponent(this.settings.file_post_name),&quot;&amp;amp;fileTypes=&quot;,encodeURIComponent(this.settings.file_types),&quot;&amp;amp;fileTypesDescription=&quot;,encodeURIComponent(this.settings.file_types_description),&quot;&amp;amp;fileSizeLimit=&quot;,encodeURIComponent(this.settings.file_size_limit),&quot;&amp;amp;fileUploadLimit=&quot;,encodeURIComponent(this.settings.file_upload_limit),&quot;&amp;amp;fileQueueLimit=&quot;,encodeURIComponent(this.settings.file_queue_limit),&quot;&amp;amp;debugEnabled=&quot;,encodeURIComponent(this.settings.debug_enabled),&quot;&amp;amp;buttonImageURL=&quot;,encodeURIComponent(this.settings.button_image_url),&quot;&amp;amp;buttonWidth=&quot;,encodeURIComponent(this.settings.button_width),&quot;&amp;amp;buttonHeight=&quot;,encodeURIComponent(this.settings.button_height),&quot;&amp;amp;buttonText=&quot;,encodeURIComponent(this.settings.button_text),&quot;&amp;amp;buttonTextTopPadding=&quot;,encodeURIComponent(this.settings.button_text_top_padding),&quot;&amp;amp;buttonTextLeftPadding=&quot;,encodeURIComponent(this.settings.button_text_left_padding),&quot;&amp;amp;buttonTextStyle=&quot;,encodeURIComponent(this.settings.button_text_style),&quot;&amp;amp;buttonAction=&quot;,encodeURIComponent(this.settings.button_action),&quot;&amp;amp;buttonDisabled=&quot;,encodeURIComponent(this.settings.button_disabled),&quot;&amp;amp;buttonCursor=&quot;,encodeURIComponent(this.settings.button_cursor)].join(&quot;&quot;)};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw&quot;Could not find Flash element&quot;}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var d=this.settings.post_params;var b=[];if(typeof(d)===&quot;object&quot;){for(var a in d){if(d.hasOwnProperty(a)){b.push(encodeURIComponent(a.toString())+&quot;=&quot;+encodeURIComponent(d[a].toString()))}}}return b.join(&quot;&amp;amp;&quot;)};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var a=null;a=this.getMovieElement();if(a&amp;&amp;typeof(a.CallFunction)===&quot;unknown&quot;){for(var d in a){try{if(typeof(a[d])===&quot;function&quot;){a[d]=null}}catch(f){}}try{a.parentNode.removeChild(a)}catch(b){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(e){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug([&quot;---SWFUpload Instance Info---\n&quot;,&quot;Version: &quot;,SWFUpload.version,&quot;\n&quot;,&quot;Movie Name: &quot;,this.movieName,&quot;\n&quot;,&quot;Settings:\n&quot;,&quot;\t&quot;,&quot;upload_url:               &quot;,this.settings.upload_url,&quot;\n&quot;,&quot;\t&quot;,&quot;flash_url:                &quot;,this.settings.flash_url,&quot;\n&quot;,&quot;\t&quot;,&quot;use_query_string:         &quot;,this.settings.use_query_string.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;requeue_on_error:         &quot;,this.settings.requeue_on_error.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;http_success:             &quot;,this.settings.http_success.join(&quot;, &quot;),&quot;\n&quot;,&quot;\t&quot;,&quot;assume_success_timeout:   &quot;,this.settings.assume_success_timeout,&quot;\n&quot;,&quot;\t&quot;,&quot;file_post_name:           &quot;,this.settings.file_post_name,&quot;\n&quot;,&quot;\t&quot;,&quot;post_params:              &quot;,this.settings.post_params.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_types:               &quot;,this.settings.file_types,&quot;\n&quot;,&quot;\t&quot;,&quot;file_types_description:   &quot;,this.settings.file_types_description,&quot;\n&quot;,&quot;\t&quot;,&quot;file_size_limit:          &quot;,this.settings.file_size_limit,&quot;\n&quot;,&quot;\t&quot;,&quot;file_upload_limit:        &quot;,this.settings.file_upload_limit,&quot;\n&quot;,&quot;\t&quot;,&quot;file_queue_limit:         &quot;,this.settings.file_queue_limit,&quot;\n&quot;,&quot;\t&quot;,&quot;debug:                    &quot;,this.settings.debug.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;prevent_swf_caching:      &quot;,this.settings.prevent_swf_caching.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_placeholder_id:    &quot;,this.settings.button_placeholder_id.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_placeholder:       &quot;,(this.settings.button_placeholder?&quot;Set&quot;:&quot;Not Set&quot;),&quot;\n&quot;,&quot;\t&quot;,&quot;button_image_url:         &quot;,this.settings.button_image_url.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_width:             &quot;,this.settings.button_width.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_height:            &quot;,this.settings.button_height.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text:              &quot;,this.settings.button_text.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text_style:        &quot;,this.settings.button_text_style.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text_top_padding:  &quot;,this.settings.button_text_top_padding.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text_left_padding: &quot;,this.settings.button_text_left_padding.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_action:            &quot;,this.settings.button_action.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_disabled:          &quot;,this.settings.button_disabled.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;custom_settings:          &quot;,this.settings.custom_settings.toString(),&quot;\n&quot;,&quot;Event Handlers:\n&quot;,&quot;\t&quot;,&quot;swfupload_loaded_handler assigned:  &quot;,(typeof this.settings.swfupload_loaded_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_dialog_start_handler assigned: &quot;,(typeof this.settings.file_dialog_start_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_queued_handler assigned:       &quot;,(typeof this.settings.file_queued_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_queue_error_handler assigned:  &quot;,(typeof this.settings.file_queue_error_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_start_handler assigned:      &quot;,(typeof this.settings.upload_start_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_progress_handler assigned:   &quot;,(typeof this.settings.upload_progress_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_error_handler assigned:      &quot;,(typeof this.settings.upload_error_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_success_handler assigned:    &quot;,(typeof this.settings.upload_success_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_complete_handler assigned:   &quot;,(typeof this.settings.upload_complete_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;debug_handler assigned:             &quot;,(typeof this.settings.debug_handler===&quot;function&quot;).toString(),&quot;\n&quot;].join(&quot;&quot;))};SWFUpload.prototype.addSetting=function(b,d,a){if(d==undefined){return(this.settings[b]=a)}else{return(this.settings[b]=d)}};SWFUpload.prototype.getSetting=function(a){if(this.settings[a]!=undefined){return this.settings[a]}return&quot;&quot;};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('&lt;invoke name=&quot;'+functionName+'&quot; returntype=&quot;javascript&quot;&gt;'+__flash__argumentsToXML(argumentArray,0)+&quot;&lt;/invoke&gt;&quot;);returnValue=eval(returnString)}catch(ex){throw&quot;Call to &quot;+functionName+&quot; failed&quot;}if(returnValue!=undefined&amp;&amp;typeof returnValue.post===&quot;object&quot;){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash(&quot;SelectFile&quot;)};SWFUpload.prototype.selectFiles=function(){this.callFlash(&quot;SelectFiles&quot;)};SWFUpload.prototype.startUpload=function(a){this.callFlash(&quot;StartUpload&quot;,[a])};SWFUpload.prototype.cancelUpload=function(a,b){if(b!==false){b=true}this.callFlash(&quot;CancelUpload&quot;,[a,b])};SWFUpload.prototype.stopUpload=function(){this.callFlash(&quot;StopUpload&quot;)};SWFUpload.prototype.getStats=function(){return this.callFlash(&quot;GetStats&quot;)};SWFUpload.prototype.setStats=function(a){this.callFlash(&quot;SetStats&quot;,[a])};SWFUpload.prototype.getFile=function(a){if(typeof(a)===&quot;number&quot;){return this.callFlash(&quot;GetFileByIndex&quot;,[a])}else{return this.callFlash(&quot;GetFile&quot;,[a])}};SWFUpload.prototype.addFileParam=function(a,b,d){return this.callFlash(&quot;AddFileParam&quot;,[a,b,d])};SWFUpload.prototype.removeFileParam=function(a,b){this.callFlash(&quot;RemoveFileParam&quot;,[a,b])};SWFUpload.prototype.setUploadURL=function(a){this.settings.upload_url=a.toString();this.callFlash(&quot;SetUploadURL&quot;,[a])};SWFUpload.prototype.setPostParams=function(a){this.settings.post_params=a;this.callFlash(&quot;SetPostParams&quot;,[a])};SWFUpload.prototype.addPostParam=function(a,b){this.settings.post_params[a]=b;this.callFlash(&quot;SetPostParams&quot;,[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(a){delete this.settings.post_params[a];this.callFlash(&quot;SetPostParams&quot;,[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(a,b){this.settings.file_types=a;this.settings.file_types_description=b;this.callFlash(&quot;SetFileTypes&quot;,[a,b])};SWFUpload.prototype.setFileSizeLimit=function(a){this.settings.file_size_limit=a;this.callFlash(&quot;SetFileSizeLimit&quot;,[a])};SWFUpload.prototype.setFileUploadLimit=function(a){this.settings.file_upload_limit=a;this.callFlash(&quot;SetFileUploadLimit&quot;,[a])};SWFUpload.prototype.setFileQueueLimit=function(a){this.settings.file_queue_limit=a;this.callFlash(&quot;SetFileQueueLimit&quot;,[a])};SWFUpload.prototype.setFilePostName=function(a){this.settings.file_post_name=a;this.callFlash(&quot;SetFilePostName&quot;,[a])};SWFUpload.prototype.setUseQueryString=function(a){this.settings.use_query_string=a;this.callFlash(&quot;SetUseQueryString&quot;,[a])};SWFUpload.prototype.setRequeueOnError=function(a){this.settings.requeue_on_error=a;this.callFlash(&quot;SetRequeueOnError&quot;,[a])};SWFUpload.prototype.setHTTPSuccess=function(a){if(typeof a===&quot;string&quot;){a=a.replace(&quot; &quot;,&quot;&quot;).split(&quot;,&quot;)}this.settings.http_success=a;this.callFlash(&quot;SetHTTPSuccess&quot;,[a])};SWFUpload.prototype.setAssumeSuccessTimeout=function(a){this.settings.assume_success_timeout=a;this.callFlash(&quot;SetAssumeSuccessTimeout&quot;,[a])};SWFUpload.prototype.setDebugEnabled=function(a){this.settings.debug_enabled=a;this.callFlash(&quot;SetDebugEnabled&quot;,[a])};SWFUpload.prototype.setButtonImageURL=function(a){if(a==undefined){a=&quot;&quot;}this.settings.button_image_url=a;this.callFlash(&quot;SetButtonImageURL&quot;,[a])};SWFUpload.prototype.setButtonDimensions=function(d,a){this.settings.button_width=d;this.settings.button_height=a;var b=this.getMovieElement();if(b!=undefined){b.style.width=d+&quot;px&quot;;b.style.height=a+&quot;px&quot;}this.callFlash(&quot;SetButtonDimensions&quot;,[d,a])};SWFUpload.prototype.setButtonText=function(a){this.settings.button_text=a;this.callFlash(&quot;SetButtonText&quot;,[a])};SWFUpload.prototype.setButtonTextPadding=function(b,a){this.settings.button_text_top_padding=a;this.settings.button_text_left_padding=b;this.callFlash(&quot;SetButtonTextPadding&quot;,[b,a])};SWFUpload.prototype.setButtonTextStyle=function(a){this.settings.button_text_style=a;this.callFlash(&quot;SetButtonTextStyle&quot;,[a])};SWFUpload.prototype.setButtonDisabled=function(a){this.settings.button_disabled=a;this.callFlash(&quot;SetButtonDisabled&quot;,[a])};SWFUpload.prototype.setButtonAction=function(a){this.settings.button_action=a;this.callFlash(&quot;SetButtonAction&quot;,[a])};SWFUpload.prototype.setButtonCursor=function(a){this.settings.button_cursor=a;this.callFlash(&quot;SetButtonCursor&quot;,[a])};SWFUpload.prototype.queueEvent=function(b,d){if(d==undefined){d=[]}else{if(!(d instanceof Array)){d=[d]}}var a=this;if(typeof this.settings[b]===&quot;function&quot;){this.eventQueue.push(function(){this.settings[b].apply(this,d)});setTimeout(function(){a.executeNextEvent()},0)}else{if(this.settings[b]!==null){throw&quot;Event handler &quot;+b+&quot; is unknown or is not a function&quot;}}};SWFUpload.prototype.executeNextEvent=function(){var a=this.eventQueue?this.eventQueue.shift():null;if(typeof(a)===&quot;function&quot;){a.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(d){var f=/[$]([0-9a-f]{4})/i;var g={};var e;if(d!=undefined){for(var a in d.post){if(d.post.hasOwnProperty(a)){e=a;var b;while((b=f.exec(e))!==null){e=e.replace(b[0],String.fromCharCode(parseInt(&quot;0x&quot;+b[1],16)))}g[e]=d.post[a]}}d.post=g}return d};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash(&quot;TestExternalInterface&quot;)}catch(a){return false}};SWFUpload.prototype.flashReady=function(){var a=this.getMovieElement();if(!a){this.debug(&quot;Flash called back ready but the flash movie can't be found.&quot;);return}this.cleanUp(a);this.queueEvent(&quot;swfupload_loaded_handler&quot;)};SWFUpload.prototype.cleanUp=function(a){try{if(this.movieElement&amp;&amp;typeof(a.CallFunction)===&quot;unknown&quot;){this.debug(&quot;Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)&quot;);for(var d in a){try{if(typeof(a[d])===&quot;function&quot;){a[d]=null}}catch(b){}}}}catch(e){}window.__flash__removeCallback=function(f,g){try{if(f){f[g]=null}}catch(h){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent(&quot;file_dialog_start_handler&quot;)};SWFUpload.prototype.fileQueued=function(a){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;file_queued_handler&quot;,a)};SWFUpload.prototype.fileQueueError=function(a,d,b){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;file_queue_error_handler&quot;,[a,d,b])};SWFUpload.prototype.fileDialogComplete=function(b,d,a){this.queueEvent(&quot;file_dialog_complete_handler&quot;,[b,d,a])};SWFUpload.prototype.uploadStart=function(a){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;return_upload_start_handler&quot;,a)};SWFUpload.prototype.returnUploadStart=function(a){var b;if(typeof this.settings.upload_start_handler===&quot;function&quot;){a=this.unescapeFilePostParams(a);b=this.settings.upload_start_handler.call(this,a)}else{if(this.settings.upload_start_handler!=undefined){throw&quot;upload_start_handler must be a function&quot;}}if(b===undefined){b=true}b=!!b;this.callFlash(&quot;ReturnUploadStart&quot;,[b])};SWFUpload.prototype.uploadProgress=function(a,d,b){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;upload_progress_handler&quot;,[a,d,b])};SWFUpload.prototype.uploadError=function(a,d,b){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;upload_error_handler&quot;,[a,d,b])};SWFUpload.prototype.uploadSuccess=function(b,a,d){b=this.unescapeFilePostParams(b);this.queueEvent(&quot;upload_success_handler&quot;,[b,a,d])};SWFUpload.prototype.uploadComplete=function(a){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;upload_complete_handler&quot;,a)};SWFUpload.prototype.debug=function(a){this.queueEvent(&quot;debug_handler&quot;,a)};SWFUpload.prototype.debugMessage=function(d){if(this.settings.debug){var a,e=[];if(typeof d===&quot;object&quot;&amp;&amp;typeof d.name===&quot;string&quot;&amp;&amp;typeof d.message===&quot;string&quot;){for(var b in d){if(d.hasOwnProperty(b)){e.push(b+&quot;: &quot;+d[b])}}a=e.join(&quot;\n&quot;)||&quot;&quot;;e=a.split(&quot;\n&quot;);a=&quot;EXCEPTION: &quot;+e.join(&quot;\nEXCEPTION: &quot;);SWFUpload.Console.writeLine(a)}else{SWFUpload.Console.writeLine(d)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(e){var b,a;try{b=document.getElementById(&quot;SWFUpload_Console&quot;);if(!b){a=document.createElement(&quot;form&quot;);document.getElementsByTagName(&quot;body&quot;)[0].appendChild(a);b=document.createElement(&quot;textarea&quot;);b.id=&quot;SWFUpload_Console&quot;;b.style.fontFamily=&quot;monospace&quot;;b.setAttribute(&quot;wrap&quot;,&quot;off&quot;);b.wrap=&quot;off&quot;;b.style.overflow=&quot;auto&quot;;b.style.width=&quot;700px&quot;;b.style.height=&quot;350px&quot;;b.style.margin=&quot;5px&quot;;a.appendChild(b)}b.value+=e+&quot;\n&quot;;b.scrollTop=b.scrollHeight-b.clientHeight}catch(d){alert(&quot;Exception: &quot;+d.name+&quot; Message: &quot;+d.message)}};var SWFUpload;if(typeof(SWFUpload)===&quot;function&quot;){SWFUpload.queue={};SWFUpload.prototype.initSettings=(function(a){return function(){if(typeof(a)===&quot;function&quot;){a.call(this)}this.customSettings.queue_cancelled_flag=false;this.customSettings.queue_upload_count=0;this.settings.user_upload_complete_handler=this.settings.upload_complete_handler;this.settings.upload_complete_handler=SWFUpload.queue.uploadCompleteHandler;this.settings.queue_complete_handler=this.settings.queue_complete_handler||null}})(SWFUpload.prototype.initSettings);SWFUpload.prototype.startUpload=function(a){this.customSettings.queue_cancelled_flag=false;this.callFlash(&quot;StartUpload&quot;,false,[a])};SWFUpload.prototype.cancelQueue=function(){this.customSettings.queue_cancelled_flag=true;this.stopUpload();var a=this.getStats();while(a.files_queued&gt;0){this.cancelUpload();a=this.getStats()}};SWFUpload.queue.uploadCompleteHandler=function(b){var d=this.settings.user_upload_complete_handler;var e;if(b.filestatus===SWFUpload.FILE_STATUS.COMPLETE){this.customSettings.queue_upload_count++}if(typeof(d)===&quot;function&quot;){e=(d.call(this,b)===false)?false:true}else{e=true}if(e){var a=this.getStats();if(a.files_queued&gt;0&amp;&amp;this.customSettings.queue_cancelled_flag===false){this.startUpload()}else{if(this.customSettings.queue_cancelled_flag===false){this.queueEvent(&quot;queue_complete_handler&quot;,[this.customSettings.queue_upload_count]);this.customSettings.queue_upload_count=0}else{this.customSettings.queue_cancelled_flag=false;this.customSettings.queue_upload_count=0}}}}}function FileProgress(d,a){this.fileProgressID=d.id;this.opacity=100;this.height=0;this.fileProgressWrapper=document.getElementById(this.fileProgressID);if(!this.fileProgressWrapper){this.fileProgressWrapper=document.createElement(&quot;div&quot;);this.fileProgressWrapper.className=&quot;progressWrapper&quot;;this.fileProgressWrapper.id=this.fileProgressID;this.fileProgressElement=document.createElement(&quot;div&quot;);this.fileProgressElement.className=&quot;progressContainer&quot;;var g=document.createElement(&quot;a&quot;);g.className=&quot;progressCancel&quot;;g.href=&quot;#&quot;;g.style.visibility=&quot;hidden&quot;;g.appendChild(document.createTextNode(&quot; &quot;));var b=document.createElement(&quot;div&quot;);b.className=&quot;progressName&quot;;b.appendChild(document.createTextNode(d.name));var f=document.createElement(&quot;div&quot;);f.className=&quot;progressBarInProgress&quot;;var e=document.createElement(&quot;div&quot;);e.className=&quot;progressBarStatus&quot;;e.innerHTML=&quot;&amp;nbsp;&quot;;this.fileProgressElement.appendChild(g);this.fileProgressElement.appendChild(b);this.fileProgressElement.appendChild(e);this.fileProgressElement.appendChild(f);this.fileProgressWrapper.appendChild(this.fileProgressElement);document.getElementById(a).appendChild(this.fileProgressWrapper)}else{this.fileProgressElement=this.fileProgressWrapper.firstChild}this.height=this.fileProgressWrapper.offsetHeight}FileProgress.prototype.setProgress=function(a){this.fileProgressElement.className=&quot;progressContainer green&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarInProgress&quot;;this.fileProgressElement.childNodes[3].style.width=a+&quot;%&quot;};FileProgress.prototype.setComplete=function(){this.fileProgressElement.className=&quot;progressContainer blue&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarComplete&quot;;this.fileProgressElement.childNodes[3].style.width=&quot;&quot;;var a=this;setTimeout(function(){a.disappear()},10000)};FileProgress.prototype.setError=function(){this.fileProgressElement.className=&quot;progressContainer red&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarError&quot;;this.fileProgressElement.childNodes[3].style.width=&quot;&quot;;var a=this;setTimeout(function(){a.disappear()},5000)};FileProgress.prototype.setCancelled=function(){this.fileProgressElement.className=&quot;progressContainer&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarError&quot;;this.fileProgressElement.childNodes[3].style.width=&quot;&quot;;var a=this;setTimeout(function(){a.disappear()},2000)};FileProgress.prototype.setStatus=function(a){this.fileProgressElement.childNodes[2].innerHTML=a};FileProgress.prototype.toggleCancel=function(b,d){this.fileProgressElement.childNodes[0].style.visibility=b?&quot;visible&quot;:&quot;hidden&quot;;if(d){var a=this.fileProgressID;this.fileProgressElement.childNodes[0].onclick=function(){d.cancelUpload(a);return false}}};FileProgress.prototype.disappear=function(){var g=15;var d=4;var b=30;if(this.opacity&gt;0){this.opacity-=g;if(this.opacity&lt;0){this.opacity=0}if(this.fileProgressWrapper.filters){try{this.fileProgressWrapper.filters.item(&quot;DXImageTransform.Microsoft.Alpha&quot;).opacity=this.opacity}catch(f){this.fileProgressWrapper.style.filter=&quot;progid:DXImageTransform.Microsoft.Alpha(opacity=&quot;+this.opacity+&quot;)&quot;}}else{this.fileProgressWrapper.style.opacity=this.opacity/100}}if(this.height&gt;0){this.height-=d;if(this.height&lt;0){this.height=0}this.fileProgressWrapper.style.height=this.height+&quot;px&quot;}if(this.height&gt;0||this.opacity&gt;0){var a=this;setTimeout(function(){a.disappear()},b)}else{this.fileProgressWrapper.style.display=&quot;none&quot;}};function fileQueued(d){try{var a=new FileProgress(d,this.customSettings.progressTarget);a.setStatus(&quot;Pending...&quot;);a.toggleCancel(true,this)}catch(b){this.debug(b)}}function fileQueueError(d,f,e){try{if(f===SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){alert(&quot;You have attempted to queue too many files.\n&quot;+(e===0?&quot;You have reached the upload limit.&quot;:&quot;You may select &quot;+(e&gt;1?&quot;up to &quot;+e+&quot; files.&quot;:&quot;one file.&quot;)));return}var a=new FileProgress(d,this.customSettings.progressTarget);a.setError();a.toggleCancel(false);switch(f){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:a.setStatus(&quot;File is too big.&quot;);this.debug(&quot;Error Code: File too big, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:a.setStatus(&quot;Cannot upload Zero Byte files.&quot;);this.debug(&quot;Error Code: Zero byte file, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:a.setStatus(&quot;Invalid File Type.&quot;);this.debug(&quot;Error Code: Invalid File Type, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;default:if(d!==null){a.setStatus(&quot;Unhandled Error&quot;)}this.debug(&quot;Error Code: &quot;+f+&quot;, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break}}catch(b){this.debug(b)}}function fileDialogComplete(a,d){try{if(a&gt;0){document.getElementById(this.customSettings.cancelButtonId).disabled=false}}catch(b){this.debug(b)}}function uploadStart(d){try{var a=new FileProgress(d,this.customSettings.progressTarget);a.setStatus(&quot;Uploading...&quot;);a.toggleCancel(true,this)}catch(b){}return true}function uploadProgress(d,g,f){try{var e=Math.ceil((g/f)*100);var a=new FileProgress(d,this.customSettings.progressTarget);a.setProgress(e);a.setStatus(&quot;Uploading...&quot;)}catch(b){this.debug(b)}}function uploadSuccess(e,b){try{var a=new FileProgress(e,this.customSettings.progressTarget);a.setComplete();a.setStatus(&quot;Complete.&quot;);a.toggleCancel(false)}catch(d){this.debug(d)}}function uploadError(d,f,e){try{var a=new FileProgress(d,this.customSettings.progressTarget);a.setError();a.toggleCancel(false);switch(f){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:a.setStatus(&quot;Upload Error: &quot;+e);this.debug(&quot;Error Code: HTTP Error, File name: &quot;+d.name+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:a.setStatus(&quot;Upload Failed.&quot;);this.debug(&quot;Error Code: Upload Failed, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:a.setStatus(&quot;Server (IO) Error&quot;);this.debug(&quot;Error Code: IO Error, File name: &quot;+d.name+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:a.setStatus(&quot;Security Error&quot;);this.debug(&quot;Error Code: Security Error, File name: &quot;+d.name+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:a.setStatus(&quot;Upload limit exceeded.&quot;);this.debug(&quot;Error Code: Upload Limit Exceeded, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:a.setStatus(&quot;Failed Validation.  Upload skipped.&quot;);this.debug(&quot;Error Code: File Validation Failed, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:if(this.getStats().files_queued===0){document.getElementById(this.customSettings.cancelButtonId).disabled=true}a.setStatus(&quot;Cancelled&quot;);a.setCancelled();break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:a.setStatus(&quot;Stopped&quot;);break;default:a.setStatus(&quot;Unhandled Error: &quot;+f);this.debug(&quot;Error Code: &quot;+f+&quot;, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break}}catch(b){this.debug(b)}jQuery(&quot;#start_button&quot;).fadeTo(&quot;fast&quot;,1)}function uploadComplete(a){if(this.getStats().files_queued===0){document.getElementById(this.customSettings.cancelButtonId).disabled=true}jQuery(&quot;#start_button&quot;).fadeTo(&quot;fast&quot;,1);if(typeof(reload_images)!=&quot;undefined&quot;){reload_images()}if(typeof updateAll!=&quot;undefined&quot;){updateAll(root)}}function queueComplete(b){var a=document.getElementById(&quot;divStatus&quot;);a.innerHTML=b+&quot; file&quot;+(b===1?&quot;&quot;:&quot;s&quot;)+&quot; uploaded.&quot;}function init_upload(){if(jQuery(&quot;#content_page_id&quot;).val()){var b={content_id:jQuery(&quot;#content_page_id&quot;).val(),model_string:jQuery(&quot;#content_page_type&quot;).val(),join_field:jQuery(&quot;#join_field&quot;).val()}}else{var b={}}var a={flash_url:&quot;/images/swfupload.swf&quot;,upload_url:&quot;/file_upload.php&quot;,post_params:b,file_size_limit:&quot;100 MB&quot;,file_types:&quot;*.*&quot;,file_types_description:&quot;All Files&quot;,file_upload_limit:100,file_queue_limit:100,custom_settings:{progressTarget:&quot;fsUploadProgress&quot;,cancelButtonId:&quot;btnCancel&quot;},debug:false,button_image_url:&quot;/images/cms/add_files_button.png&quot;,button_width:&quot;254&quot;,button_height:&quot;27&quot;,button_placeholder_id:&quot;spanButtonPlaceHolder&quot;,button_window_mode:SWFUpload.WINDOW_MODE.TRANSPARENT,button_cursor:SWFUpload.CURSOR.HAND,file_queued_handler:fileQueued,file_queue_error_handler:fileQueueError,file_dialog_complete_handler:fileDialogComplete,upload_start_handler:uploadStart,upload_progress_handler:uploadProgress,upload_error_handler:uploadError,upload_success_handler:uploadSuccess,upload_complete_handler:uploadComplete,queue_complete_handler:queueComplete};swfu=new SWFUpload(a)}var swfu;function set_post_params(){var a=jQuery(&quot;#dest&quot;).html();if(a==&quot;select a folder&quot;){alert(&quot;You must choose a folder first&quot;);return false}if(!a){var a=jQuery(&quot;#wildfire_file_folder&quot;).val()}if(jQuery(&quot;#upload_from&quot;).length&amp;&amp;jQuery(&quot;#upload_from&quot;).val().length&gt;1){jQuery.post(&quot;/file_upload.php?&quot;,{wildfire_file_folder:a,wildfire_file_description:jQuery(&quot;#wildfire_file_description&quot;).val(),upload_from_url:jQuery(&quot;#upload_from&quot;).val(),wildfire_file_filename:jQuery(&quot;#wildfire_file_filename&quot;).val(),content_id:jQuery(&quot;#url_content_page_id&quot;).val(),model_string:jQuery(&quot;#url_content_page_type&quot;).val(),join_field:jQuery(&quot;#url_join_field&quot;).val()},function(){jQuery(&quot;#start_button&quot;).fadeTo(&quot;fast&quot;,1);alert(&quot;Image Successfully Retrieved&quot;);if(typeof(reload_images)!=&quot;undefined&quot;){reload_images()}});return true}swfu.addPostParam(&quot;wildfire_file_folder&quot;,a);swfu.addPostParam(&quot;wildfire_file_description&quot;,jQuery(&quot;#wildfire_file_description&quot;).val());swfu.startUpload()}jQuery(document).scroll(function(){jQuery(&quot;#informationcart&quot;).verticalCenter()});jQuery.fn.verticalCenter=function(a){var b=this;if(!a){b.css(&quot;top&quot;,jQuery(window).height()/2-this.height()/2);jQuery(window).resize(function(){b.centerScreen(!a)})}else{b.stop();b.animate({top:jQuery(window).height()/2-this.height()/2},200,&quot;linear&quot;)}};jQuery.noConflict();var Prototype={Version:&quot;1.4.0&quot;,ScriptFragment:&quot;(?:&lt;script.*?&gt;)((\n|\r|.)*?)(?:&lt;\/script&gt;)&quot;,emptyFunction:function(){},K:function(a){return a}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(a,b){for(property in b){a[property]=b[property]}return a};Object.inspect=function(a){try{if(a==undefined){return&quot;undefined&quot;}if(a==null){return&quot;null&quot;}return a.inspect?a.inspect():a.toString()}catch(b){if(b instanceof RangeError){return&quot;...&quot;}throw b}};Function.prototype.bind=function(){var a=this,d=$A(arguments),b=d.shift();return function(){return a.apply(b,d.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(b){var a=this;return function(d){return a.call(b,d||window.event)}};Object.extend(Number.prototype,{toColorPart:function(){var a=this.toString(16);if(this&lt;16){return&quot;0&quot;+a}return a},succ:function(){return this+1},times:function(a){$R(0,this,true).each(a);return this}});var Try={these:function(){var d;for(var b=0;b&lt;arguments.length;b++){var a=arguments[b];try{d=a();break}catch(f){}}return d}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(b,a){this.callback=b;this.frequency=a;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback()}finally{this.currentlyExecuting=false}}}};function $(){var d=new Array();for(var b=0;b&lt;arguments.length;b++){var a=arguments[b];if(typeof a==&quot;string&quot;){a=document.getElementById(a)}if(arguments.length==1){return a}d.push(a)}return d}Object.extend(String.prototype,{stripTags:function(){return this.replace(/&lt;\/?[^&gt;]+&gt;/gi,&quot;&quot;)},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,&quot;img&quot;),&quot;&quot;)},extractScripts:function(){var b=new RegExp(Prototype.ScriptFragment,&quot;img&quot;);var a=new RegExp(Prototype.ScriptFragment,&quot;im&quot;);return(this.match(b)||[]).map(function(d){return(d.match(a)||[&quot;&quot;,&quot;&quot;])[1]})},evalScripts:function(){return this.extractScripts().map(eval)},escapeHTML:function(){var b=document.createElement(&quot;div&quot;);var a=document.createTextNode(this);b.appendChild(a);return b.innerHTML},unescapeHTML:function(){var a=document.createElement(&quot;div&quot;);a.innerHTML=this.stripTags();return a.childNodes[0]?a.childNodes[0].nodeValue:&quot;&quot;},toQueryParams:function(){var a=this.match(/^\??(.*)$/)[1].split(&quot;&amp;&quot;);return a.inject({},function(e,b){var d=b.split(&quot;=&quot;);e[d[0]]=d[1];return e})},toArray:function(){return this.split(&quot;&quot;)},camelize:function(){var e=this.split(&quot;-&quot;);if(e.length==1){return e[0]}var b=this.indexOf(&quot;-&quot;)==0?e[0].charAt(0).toUpperCase()+e[0].substring(1):e[0];for(var d=1,a=e.length;d&lt;a;d++){var f=e[d];b+=f.charAt(0).toUpperCase()+f.substring(1)}return b},inspect:function(){return&quot;'&quot;+this.replace(&quot;\\&quot;,&quot;\\\\&quot;).replace(&quot;'&quot;,&quot;\\'&quot;)+&quot;'&quot;}});String.prototype.parseQuery=String.prototype.toQueryParams;var $break=new Object();var $continue=new Object();var Enumerable={each:function(b){var a=0;try{this._each(function(f){try{b(f,a++)}catch(g){if(g!=$continue){throw g}}})}catch(d){if(d!=$break){throw d}}},all:function(b){var a=true;this.each(function(e,d){a=a&amp;&amp;!!(b||Prototype.K)(e,d);if(!a){throw $break}});return a},any:function(b){var a=true;this.each(function(e,d){if(a=!!(b||Prototype.K)(e,d)){throw $break}});return a},collect:function(b){var a=[];this.each(function(e,d){a.push(b(e,d))});return a},detect:function(b){var a;this.each(function(e,d){if(b(e,d)){a=e;throw $break}});return a},findAll:function(b){var a=[];this.each(function(e,d){if(b(e,d)){a.push(e)}});return a},grep:function(d,b){var a=[];this.each(function(g,f){var e=g.toString();if(e.match(d)){a.push((b||Prototype.K)(g,f))}});return a},include:function(a){var b=false;this.each(function(d){if(d==a){b=true;throw $break}});return b},inject:function(a,b){this.each(function(e,d){a=b(a,e,d)});return a},invoke:function(b){var a=$A(arguments).slice(1);return this.collect(function(d){return d[b].apply(d,a)})},max:function(b){var a;this.each(function(e,d){e=(b||Prototype.K)(e,d);if(e&gt;=(a||e)){a=e}});return a},min:function(b){var a;this.each(function(e,d){e=(b||Prototype.K)(e,d);if(e&lt;=(a||e)){a=e}});return a},partition:function(d){var b=[],a=[];this.each(function(f,e){((d||Prototype.K)(f,e)?b:a).push(f)});return[b,a]},pluck:function(b){var a=[];this.each(function(e,d){a.push(e[b])});return a},reject:function(b){var a=[];this.each(function(e,d){if(!b(e,d)){a.push(e)}});return a},sortBy:function(a){return this.collect(function(d,b){return{value:d,criteria:a(d,b)}}).sort(function(g,f){var e=g.criteria,d=f.criteria;return e&lt;d?-1:e&gt;d?1:0}).pluck(&quot;value&quot;)},toArray:function(){return this.collect(Prototype.K)},zip:function(){var b=Prototype.K,a=$A(arguments);if(typeof a.last()==&quot;function&quot;){b=a.pop()}var d=[this].concat(a).map($A);return this.map(function(f,e){b(f=d.pluck(e));return f})},inspect:function(){return&quot;#&lt;Enumerable:&quot;+this.toArray().inspect()+&quot;&gt;&quot;}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(d){if(!d){return[]}if(d.toArray){return d.toArray()}else{var b=[];for(var a=0;a&lt;d.length;a++){b.push(d[a])}return b}};Object.extend(Array.prototype,Enumerable);Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(b){for(var a=0;a&lt;this.length;a++){b(this[a])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=undefined||a!=null})},flatten:function(){return this.inject([],function(b,a){return b.concat(a.constructor==Array?a.flatten():[a])})},without:function(){var a=$A(arguments);return this.select(function(b){return !a.include(b)})},indexOf:function(a){for(var b=0;b&lt;this.length;b++){if(this[b]==a){return b}}return -1},reverse:function(a){return(a!==false?this:this.toArray())._reverse()},shift:function(){var a=this[0];for(var b=0;b&lt;this.length-1;b++){this[b]=this[b+1]}this.length--;return a},inspect:function(){return&quot;[&quot;+this.map(Object.inspect).join(&quot;, &quot;)+&quot;]&quot;}});var Hash={_each:function(a){for(key in this){var b=this[key];if(typeof b==&quot;function&quot;){continue}var d=[key,b];d.key=key;d.value=b;a(d)}},keys:function(){return this.pluck(&quot;key&quot;)},values:function(){return this.pluck(&quot;value&quot;)},merge:function(a){return $H(a).inject($H(this),function(b,d){b[d.key]=d.value;return b})},toQueryString:function(){return this.map(function(a){return a.map(encodeURIComponent).join(&quot;=&quot;)}).join(&quot;&amp;&quot;)},inspect:function(){return&quot;#&lt;Hash:{&quot;+this.map(function(a){return a.map(Object.inspect).join(&quot;: &quot;)}).join(&quot;, &quot;)+&quot;}&gt;&quot;}};function $H(a){var b=Object.extend({},a||{});Object.extend(b,Enumerable);Object.extend(b,Hash);return b}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(d,a,b){this.start=d;this.end=a;this.exclusive=b},_each:function(a){var b=this.start;do{a(b);b=b.succ()}while(this.include(b))},include:function(a){if(a&lt;this.start){return false}if(this.exclusive){return a&lt;this.end}return a&lt;=this.end}});var $R=function(d,a,b){return new ObjectRange(d,a,b)};var Ajax={getTransport:function(){return Try.these(function(){return new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;)},function(){return new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;)},function(){return new XMLHttpRequest()})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){if(!this.include(a)){this.responders.push(a)}},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(e,b,d,a){this.each(function(f){if(f[e]&amp;&amp;typeof f[e]==&quot;function&quot;){try{f[e].apply(f,[b,d,a])}catch(g){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(a){this.options={method:&quot;post&quot;,asynchronous:true,parameters:&quot;&quot;};Object.extend(this.options,a||{})},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status&gt;=200&amp;&amp;this.transport.status&lt;300)},responseIsFailure:function(){return !this.responseIsSuccess()}};Ajax.Request=Class.create();Ajax.Request.Events=[&quot;Uninitialized&quot;,&quot;Loading&quot;,&quot;Loaded&quot;,&quot;Interactive&quot;,&quot;Complete&quot;];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(b,a){this.transport=Ajax.getTransport();this.setOptions(a);this.request(b)},request:function(b){var d=this.options.parameters||&quot;&quot;;if(d.length&gt;0){d+=&quot;&amp;_=&quot;}try{this.url=b;if(this.options.method==&quot;get&quot;&amp;&amp;d.length&gt;0){this.url+=(this.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+d}Ajax.Responders.dispatch(&quot;onCreate&quot;,this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10)}this.setRequestHeaders();var a=this.options.postBody?this.options.postBody:d;this.transport.send(this.options.method==&quot;post&quot;?a:null)}catch(f){this.dispatchException(f)}},setRequestHeaders:function(){var b=[&quot;X-Requested-With&quot;,&quot;XMLHttpRequest&quot;,&quot;X-Prototype-Version&quot;,Prototype.Version];if(this.options.method==&quot;post&quot;){b.push(&quot;Content-type&quot;,&quot;application/x-www-form-urlencoded&quot;);if(this.transport.overrideMimeType){b.push(&quot;Connection&quot;,&quot;close&quot;)}}if(this.options.requestHeaders){b.push.apply(b,this.options.requestHeaders)}for(var a=0;a&lt;b.length;a+=2){this.transport.setRequestHeader(b[a],b[a+1])}},onStateChange:function(){var a=this.transport.readyState;if(a!=1){this.respondToReadyState(this.transport.readyState)}},header:function(a){try{return this.transport.getResponseHeader(a)}catch(b){}},evalJSON:function(){try{return eval(this.header(&quot;X-JSON&quot;))}catch(e){}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(e){this.dispatchException(e)}},respondToReadyState:function(a){var d=Ajax.Request.Events[a];var g=this.transport,b=this.evalJSON();if(d==&quot;Complete&quot;){try{(this.options[&quot;on&quot;+this.transport.status]||this.options[&quot;on&quot;+(this.responseIsSuccess()?&quot;Success&quot;:&quot;Failure&quot;)]||Prototype.emptyFunction)(g,b)}catch(f){this.dispatchException(f)}if((this.header(&quot;Content-type&quot;)||&quot;&quot;).match(/^text\/javascript/i)){this.evalResponse()}}try{(this.options[&quot;on&quot;+d]||Prototype.emptyFunction)(g,b);Ajax.Responders.dispatch(&quot;on&quot;+d,this,g,b)}catch(f){this.dispatchException(f)}if(d==&quot;Complete&quot;){this.transport.onreadystatechange=Prototype.emptyFunction}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch(&quot;onException&quot;,this,a)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(a,d,b){this.containers={success:a.success?$(a.success):$(a),failure:a.failure?$(a.failure):(a.success?null:$(a))};this.transport=Ajax.getTransport();this.setOptions(b);var e=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(g,f){this.updateContent();e(g,f)}).bind(this);this.request(d)},updateContent:function(){var b=this.responseIsSuccess()?this.containers.success:this.containers.failure;var a=this.transport.responseText;if(!this.options.evalScripts){a=a.stripScripts()}if(b){if(this.options.insertion){new this.options.insertion(b,a)}else{Element.update(b,a)}}if(this.responseIsSuccess()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(a,d,b){this.setOptions(b);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=a;this.url=d;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(a){if(this.options.decay){this.decay=(a.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=a.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});document.getElementsByClassName=function(d,a){var b=($(a)||document.body).getElementsByTagName(&quot;*&quot;);return $A(b).inject([],function(e,f){if(f.className.match(new RegExp(&quot;(^|\\s)&quot;+d+&quot;(\\s|$)&quot;))){e.push(f)}return e})};if(!window.Element){var Element=new Object()}Object.extend(Element,{visible:function(a){return $(a).style.display!=&quot;none&quot;},toggle:function(){for(var b=0;b&lt;arguments.length;b++){var a=$(arguments[b]);Element[Element.visible(a)?&quot;hide&quot;:&quot;show&quot;](a)}},hide:function(){for(var b=0;b&lt;arguments.length;b++){var a=$(arguments[b]);a.style.display=&quot;none&quot;}},show:function(){for(var b=0;b&lt;arguments.length;b++){var a=$(arguments[b]);a.style.display=&quot;&quot;}},remove:function(a){a=$(a);a.parentNode.removeChild(a)},update:function(b,a){$(b).innerHTML=a.stripScripts();setTimeout(function(){a.evalScripts()},10)},getHeight:function(a){a=$(a);return a.offsetHeight},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(!(a=$(a))){return}return Element.classNames(a).include(b)},addClassName:function(a,b){if(!(a=$(a))){return}return Element.classNames(a).add(b)},removeClassName:function(a,b){if(!(a=$(a))){return}return Element.classNames(a).remove(b)},cleanWhitespace:function(b){b=$(b);for(var a=0;a&lt;b.childNodes.length;a++){var d=b.childNodes[a];if(d.nodeType==3&amp;&amp;!/\S/.test(d.nodeValue)){Element.remove(d)}}},empty:function(a){return $(a).innerHTML.match(/^\s*$/)},scrollTo:function(b){b=$(b);var a=b.x?b.x:b.offsetLeft,d=b.y?b.y:b.offsetTop;window.scrollTo(a,d)},getStyle:function(b,d){b=$(b);var e=b.style[d.camelize()];if(!e){if(document.defaultView&amp;&amp;document.defaultView.getComputedStyle){var a=document.defaultView.getComputedStyle(b,null);e=a?a.getPropertyValue(d):null}else{if(b.currentStyle){e=b.currentStyle[d.camelize()]}}}if(window.opera&amp;&amp;[&quot;left&quot;,&quot;top&quot;,&quot;right&quot;,&quot;bottom&quot;].include(d)){if(Element.getStyle(b,&quot;position&quot;)==&quot;static&quot;){e=&quot;auto&quot;}}return e==&quot;auto&quot;?null:e},setStyle:function(a,b){a=$(a);for(name in b){a.style[name.camelize()]=b[name]}},getDimensions:function(b){b=$(b);if(Element.getStyle(b,&quot;display&quot;)!=&quot;none&quot;){return{width:b.offsetWidth,height:b.offsetHeight}}var a=b.style;var f=a.visibility;var d=a.position;a.visibility=&quot;hidden&quot;;a.position=&quot;absolute&quot;;a.display=&quot;&quot;;var g=b.clientWidth;var e=b.clientHeight;a.display=&quot;none&quot;;a.position=d;a.visibility=f;return{width:g,height:e}},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,&quot;position&quot;);if(b==&quot;static&quot;||!b){a._madePositioned=true;a.style.position=&quot;relative&quot;;if(window.opera){a.style.top=0;a.style.left=0}}},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=&quot;&quot;}},makeClipping:function(a){a=$(a);if(a._overflow){return}a._overflow=a.style.overflow;if((Element.getStyle(a,&quot;overflow&quot;)||&quot;visible&quot;)!=&quot;hidden&quot;){a.style.overflow=&quot;hidden&quot;}},undoClipping:function(a){a=$(a);if(a._overflow){return}a.style.overflow=a._overflow;a._overflow=undefined}});var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(a){this.adjacency=a};Abstract.Insertion.prototype={initialize:function(a,b){this.element=$(a);this.content=b.stripScripts();if(this.adjacency&amp;&amp;this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(d){if(this.element.tagName.toLowerCase()==&quot;tbody&quot;){this.insertContent(this.contentFromAnonymousTable())}else{throw d}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){b.evalScripts()},10)},contentFromAnonymousTable:function(){var a=document.createElement(&quot;div&quot;);a.innerHTML=&quot;&lt;table&gt;&lt;tbody&gt;&quot;+this.content+&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;;return $A(a.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion(&quot;beforeBegin&quot;),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(a){a.each((function(b){this.element.parentNode.insertBefore(b,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion(&quot;afterBegin&quot;),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(a){a.reverse(false).each((function(b){this.element.insertBefore(b,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion(&quot;beforeEnd&quot;),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(a){a.each((function(b){this.element.appendChild(b)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion(&quot;afterEnd&quot;),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(a){a.each((function(b){this.element.parentNode.insertBefore(b,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(b){return b.length&gt;0})._each(a)},set:function(a){this.element.className=a},add:function(a){if(this.include(a)){return}this.set(this.toArray().concat(a).join(&quot; &quot;))},remove:function(a){if(!this.include(a)){return}this.set(this.select(function(b){return b!=a}).join(&quot; &quot;))},toString:function(){return this.toArray().join(&quot; &quot;)}};Object.extend(Element.ClassNames.prototype,Enumerable);var Field={clear:function(){for(var a=0;a&lt;arguments.length;a++){$(arguments[a]).value=&quot;&quot;}},focus:function(a){$(a).focus()},present:function(){for(var a=0;a&lt;arguments.length;a++){if($(arguments[a]).value==&quot;&quot;){return false}}return true},select:function(a){$(a).select()},activate:function(a){a=$(a);a.focus();if(a.select){a.select()}}};var Form={serialize:function(e){var f=Form.getElements($(e));var d=new Array();for(var b=0;b&lt;f.length;b++){var a=Form.Element.serialize(f[b]);if(a){d.push(a)}}return d.join(&quot;&amp;&quot;)},getElements:function(b){b=$(b);var d=new Array();for(tagName in Form.Element.Serializers){var e=b.getElementsByTagName(tagName);for(var a=0;a&lt;e.length;a++){d.push(e[a])}}return d},getInputs:function(g,d,e){g=$(g);var a=g.getElementsByTagName(&quot;input&quot;);if(!d&amp;&amp;!e){return a}var h=new Array();for(var f=0;f&lt;a.length;f++){var b=a[f];if((d&amp;&amp;b.type!=d)||(e&amp;&amp;b.name!=e)){continue}h.push(b)}return h},disable:function(d){var e=Form.getElements(d);for(var b=0;b&lt;e.length;b++){var a=e[b];a.blur();a.disabled=&quot;true&quot;}},enable:function(d){var e=Form.getElements(d);for(var b=0;b&lt;e.length;b++){var a=e[b];a.disabled=&quot;&quot;}},findFirstElement:function(a){return Form.getElements(a).find(function(b){return b.type!=&quot;hidden&quot;&amp;&amp;!b.disabled&amp;&amp;[&quot;input&quot;,&quot;select&quot;,&quot;textarea&quot;].include(b.tagName.toLowerCase())})},focusFirstElement:function(a){Field.activate(Form.findFirstElement(a))},reset:function(a){$(a).reset()}};Form.Element={serialize:function(b){b=$(b);var e=b.tagName.toLowerCase();var d=Form.Element.Serializers[e](b);if(d){var a=encodeURIComponent(d[0]);if(a.length==0){return}if(d[1].constructor!=Array){d[1]=[d[1]]}return d[1].map(function(f){return a+&quot;=&quot;+encodeURIComponent(f)}).join(&quot;&amp;&quot;)}},getValue:function(a){a=$(a);var d=a.tagName.toLowerCase();var b=Form.Element.Serializers[d](a);if(b){return b[1]}}};Form.Element.Serializers={input:function(a){switch(a.type.toLowerCase()){case&quot;submit&quot;:case&quot;hidden&quot;:case&quot;password&quot;:case&quot;text&quot;:return Form.Element.Serializers.textarea(a);case&quot;checkbox&quot;:case&quot;radio&quot;:return Form.Element.Serializers.inputSelector(a)}return false},inputSelector:function(a){if(a.checked){return[a.name,a.value]}},textarea:function(a){return[a.name,a.value]},select:function(a){return Form.Element.Serializers[a.type==&quot;select-one&quot;?&quot;selectOne&quot;:&quot;selectMany&quot;](a)},selectOne:function(d){var e=&quot;&quot;,b,a=d.selectedIndex;if(a&gt;=0){b=d.options[a];e=b.value;if(!e&amp;&amp;!(&quot;value&quot; in b)){e=b.text}}return[d.name,e]},selectMany:function(d){var e=new Array();for(var b=0;b&lt;d.length;b++){var a=d.options[b];if(a.selected){var f=a.value;if(!f&amp;&amp;!(&quot;value&quot; in a)){f=a.text}e.push(f)}}return[d.name,e]}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(a,b,d){this.frequency=b;this.element=$(a);this.callback=d;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()==&quot;form&quot;){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){var b=Form.getElements(this.element);for(var a=0;a&lt;b.length;a++){this.registerCallback(b[a])}},registerCallback:function(a){if(a.type){switch(a.type.toLowerCase()){case&quot;checkbox&quot;:case&quot;radio&quot;:Event.observe(a,&quot;click&quot;,this.onElementEvent.bind(this));break;case&quot;password&quot;:case&quot;text&quot;:case&quot;textarea&quot;:case&quot;select-one&quot;:case&quot;select-multiple&quot;:Event.observe(a,&quot;change&quot;,this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(a){return a.target||a.srcElement},isLeftClick:function(a){return(((a.which)&amp;&amp;(a.which==1))||((a.button)&amp;&amp;(a.button==1)))},pointerX:function(a){return a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(a){return a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(a){if(a.preventDefault){a.preventDefault();a.stopPropagation()}else{a.returnValue=false;a.cancelBubble=true}},findElement:function(d,b){var a=Event.element(d);while(a.parentNode&amp;&amp;(!a.tagName||(a.tagName.toUpperCase()!=b.toUpperCase()))){a=a.parentNode}return a},observers:false,_observeAndCache:function(e,d,b,a){if(!this.observers){this.observers=[]}if(e.addEventListener){this.observers.push([e,d,b,a]);e.addEventListener(d,b,a)}else{if(e.attachEvent){this.observers.push([e,d,b,a]);e.attachEvent(&quot;on&quot;+d,b)}}},unloadCache:function(){if(!Event.observers){return}for(var a=0;a&lt;Event.observers.length;a++){Event.stopObserving.apply(this,Event.observers[a]);Event.observers[a][0]=null}Event.observers=false},observe:function(e,d,b,a){var e=$(e);a=a||false;if(d==&quot;keypress&quot;&amp;&amp;(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||e.attachEvent)){d=&quot;keydown&quot;}this._observeAndCache(e,d,b,a)},stopObserving:function(e,d,b,a){var e=$(e);a=a||false;if(d==&quot;keypress&quot;&amp;&amp;(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||e.detachEvent)){d=&quot;keydown&quot;}if(e.removeEventListener){e.removeEventListener(d,b,a)}else{if(e.detachEvent){e.detachEvent(&quot;on&quot;+d,b)}}}});Event.observe(window,&quot;unload&quot;,Event.unloadCache,false);var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(b){var a=0,d=0;do{a+=b.scrollTop||0;d+=b.scrollLeft||0;b=b.parentNode}while(b);return[d,a]},cumulativeOffset:function(b){var a=0,d=0;do{if(b.style.position==&quot;fixed&quot;){a+=window.pageYOffset+b.offsetTop;d+=window.pageXOffset+b.offsetLeft;b=null}else{a+=b.offsetTop||0;d+=b.offsetLeft||0;b=b.offsetParent}}while(b);return[d,a]},positionedOffset:function(b){var a=0,d=0;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;b=b.offsetParent;if(b){p=Element.getStyle(b,&quot;position&quot;);if(p==&quot;relative&quot;||p==&quot;absolute&quot;){break}}}while(b);return[d,a]},offsetParent:function(a){if(a.offsetParent){return a.offsetParent}if(a==document.body){return a}while((a=a.parentNode)&amp;&amp;a!=document.body){if(Element.getStyle(a,&quot;position&quot;)!=&quot;static&quot;){return a}}return document.body},within:function(b,a,d){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(b,a,d)}this.xcomp=a;this.ycomp=d;this.offset=this.cumulativeOffset(b);return(d&gt;=this.offset[1]&amp;&amp;d&lt;this.offset[1]+b.offsetHeight&amp;&amp;a&gt;=this.offset[0]&amp;&amp;a&lt;this.offset[0]+b.offsetWidth)},withinIncludingScrolloffsets:function(b,a,e){var d=this.realOffset(b);this.xcomp=a+d[0]-this.deltaX;this.ycomp=e+d[1]-this.deltaY;this.offset=this.cumulativeOffset(b);return(this.ycomp&gt;=this.offset[1]&amp;&amp;this.ycomp&lt;this.offset[1]+b.offsetHeight&amp;&amp;this.xcomp&gt;=this.offset[0]&amp;&amp;this.xcomp&lt;this.offset[0]+b.offsetWidth)},overlap:function(b,a){if(!b){return 0}if(b==&quot;vertical&quot;){return((this.offset[1]+a.offsetHeight)-this.ycomp)/a.offsetHeight}if(b==&quot;horizontal&quot;){return((this.offset[0]+a.offsetWidth)-this.xcomp)/a.offsetWidth}},clone:function(b,d){b=$(b);d=$(d);d.style.position=&quot;absolute&quot;;var a=this.cumulativeOffset(b);d.style.top=a[1]+&quot;px&quot;;d.style.left=a[0]+&quot;px&quot;;d.style.width=b.offsetWidth+&quot;px&quot;;d.style.height=b.offsetHeight+&quot;px&quot;},page:function(e){var a=0,d=0;var b=e;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;if(b.offsetParent==document.body){if(Element.getStyle(b,&quot;position&quot;)==&quot;absolute&quot;){break}}}while(b=b.offsetParent);b=e;do{a-=b.scrollTop||0;d-=b.scrollLeft||0}while(b=b.parentNode);return[d,a]},clone:function(d,f){var a=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});d=$(d);var e=Position.page(d);f=$(f);var g=[0,0];var b=null;if(Element.getStyle(f,&quot;position&quot;)==&quot;absolute&quot;){b=Position.offsetParent(f);g=Position.page(b)}if(b==document.body){g[0]-=document.body.offsetLeft;g[1]-=document.body.offsetTop}if(a.setLeft){f.style.left=(e[0]-g[0]+a.offsetLeft)+&quot;px&quot;}if(a.setTop){f.style.top=(e[1]-g[1]+a.offsetTop)+&quot;px&quot;}if(a.setWidth){f.style.width=d.offsetWidth+&quot;px&quot;}if(a.setHeight){f.style.height=d.offsetHeight+&quot;px&quot;}},absolutize:function(b){b=$(b);if(b.style.position==&quot;absolute&quot;){return}Position.prepare();var e=Position.positionedOffset(b);var g=e[1];var f=e[0];var d=b.clientWidth;var a=b.clientHeight;b._originalLeft=f-parseFloat(b.style.left||0);b._originalTop=g-parseFloat(b.style.top||0);b._originalWidth=b.style.width;b._originalHeight=b.style.height;b.style.position=&quot;absolute&quot;;b.style.top=g+&quot;px&quot;;b.style.left=f+&quot;px&quot;;b.style.width=d+&quot;px&quot;;b.style.height=a+&quot;px&quot;},relativize:function(a){a=$(a);if(a.style.position==&quot;relative&quot;){return}Position.prepare();a.style.position=&quot;relative&quot;;var d=parseFloat(a.style.top||0)-(a._originalTop||0);var b=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=d+&quot;px&quot;;a.style.left=b+&quot;px&quot;;a.style.height=a._originalHeight;a.style.width=a._originalWidth}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(b){var a=0,d=0;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;if(b.offsetParent==document.body){if(Element.getStyle(b,&quot;position&quot;)==&quot;absolute&quot;){break}}b=b.offsetParent}while(b);return[d,a]}}dropList=new Array();var Droppables={drops:[],remove:function(a){this.drops=this.drops.reject(function(b){return b.element==$(a)})},add:function(b){b=$(b);var a=Object.extend({greedy:true,hoverclass:null},arguments[1]||{});if(a.containment){a._containers=[];var d=a.containment;if((typeof d==&quot;object&quot;)&amp;&amp;(d.constructor==Array)){d.each(function(e){a._containers.push($(e))})}else{a._containers.push($(d))}}if(a.accept){a.accept=[a.accept].flatten()}Element.makePositioned(b);a.element=b;this.drops.push(a);dropList[b.id]=this.drops.length-1},isContained:function(d,b){var a=d.parentNode;return b._containers.detect(function(e){return a==e})},isAffected:function(a,d,b){return((b.element!=d)&amp;&amp;((!b._containers)||this.isContained(d,b))&amp;&amp;((!b.accept)||(Element.classNames(d).detect(function(e){return b.accept.include(e)})))&amp;&amp;Position.within(b.element,a[0],a[1]))},deactivate:function(a){if(a.hoverclass){Element.removeClassName(a.element,a.hoverclass)}this.last_active=null},activate:function(a){if(a.hoverclass){Element.addClassName(a.element,a.hoverclass)}this.last_active=a},show:function(a,b){if(!this.drops.length){return}if(this.last_active){this.deactivate(this.last_active)}this.drops.each(function(d){if(Droppables.isAffected(a,b,d)){if(d.onHover){d.onHover(b,d.element,Position.overlap(d.overlap,d.element))}if(d.greedy){Droppables.activate(d);throw $break}}})},fire:function(b,a){if(!this.last_active){return}Position.prepare();if(this.isAffected([Event.pointerX(b),Event.pointerY(b)],a,this.last_active)){if(this.last_active.onDrop){this.last_active.onDrop(a,this.last_active.element,b)}}},reset:function(){if(this.last_active){this.deactivate(this.last_active)}}};var Draggables={drags:[],observers:[],register:function(a){if(this.drags.length==0){this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.updateDrag.bindAsEventListener(this);this.eventKeypress=this.keyPress.bindAsEventListener(this);Event.observe(document,&quot;mouseup&quot;,this.eventMouseUp);Event.observe(document,&quot;mousemove&quot;,this.eventMouseMove);Event.observe(document,&quot;keypress&quot;,this.eventKeypress)}this.drags.push(a)},unregister:function(a){this.drags=this.drags.reject(function(b){return b==a});if(this.drags.length==0){Event.stopObserving(document,&quot;mouseup&quot;,this.eventMouseUp);Event.stopObserving(document,&quot;mousemove&quot;,this.eventMouseMove);Event.stopObserving(document,&quot;keypress&quot;,this.eventKeypress)}},activate:function(a){window.focus();this.activeDraggable=a},deactivate:function(a){this.activeDraggable=null},updateDrag:function(a){if(!this.activeDraggable){return}var b=[Event.pointerX(a),Event.pointerY(a)];if(this._lastPointer&amp;&amp;(this._lastPointer.inspect()==b.inspect())){return}this._lastPointer=b;this.activeDraggable.updateDrag(a,b)},endDrag:function(a){if(!this.activeDraggable){return}this._lastPointer=null;this.activeDraggable.endDrag(a);this.activeDraggable=null},keyPress:function(a){if(this.activeDraggable){this.activeDraggable.keyPress(a)}},addObserver:function(a){this.observers.push(a);this._cacheObserverCallbacks()},removeObserver:function(a){this.observers=this.observers.reject(function(b){return b.element==a});this._cacheObserverCallbacks()},notify:function(b,a,d){if(this[b+&quot;Count&quot;]&gt;0){this.observers.each(function(e){if(e[b]){e[b](b,a,d)}})}},_cacheObserverCallbacks:function(){[&quot;onStart&quot;,&quot;onEnd&quot;,&quot;onDrag&quot;].each(function(a){Draggables[a+&quot;Count&quot;]=Draggables.observers.select(function(b){return b[a]}).length})}};var Draggable=Class.create();Draggable.prototype={initialize:function(b){var a=Object.extend({handle:false,starteffect:function(d){Element.addClassName(d,&quot;dragging&quot;);new Effect.Opacity(d,{duration:0.2,from:1,to:0.7})},reverteffect:function(f,e,d){var g=Math.sqrt(Math.abs(e^2)+Math.abs(d^2))*0.02;f._revert=new Effect.Move(f,{x:-d,y:-e,duration:g})},endeffect:function(d){new Effect.Opacity(d,{duration:0.2,from:0.7,to:1});Element.removeClassName(d,&quot;dragging&quot;)},zindex:1000,revert:false,snap:false},arguments[1]||{});this.element=$(b);if(a.handle&amp;&amp;(typeof a.handle==&quot;string&quot;)){this.handle=Element.childrenWithClassName(this.element,a.handle)[0]}if(!this.handle){this.handle=$(a.handle)}if(!this.handle){this.handle=this.element}Element.makePositioned(this.element);this.delta=this.currentDelta();this.options=a;this.dragging=false;this.eventMouseDown=this.initDrag.bindAsEventListener(this);Event.observe(this.handle,&quot;mousedown&quot;,this.eventMouseDown);Draggables.register(this)},destroy:function(){Event.stopObserving(this.handle,&quot;mousedown&quot;,this.eventMouseDown);Draggables.unregister(this)},currentDelta:function(){return([parseInt(Element.getStyle(this.element,&quot;left&quot;)||&quot;0&quot;),parseInt(Element.getStyle(this.element,&quot;top&quot;)||&quot;0&quot;)])},initDrag:function(a){if(Event.isLeftClick(a)){var d=Event.element(a);if(d.tagName&amp;&amp;(d.tagName==&quot;INPUT&quot;||d.tagName==&quot;SELECT&quot;||d.tagName==&quot;BUTTON&quot;||d.tagName==&quot;TEXTAREA&quot;)){return}if(this.element._revert){this.element._revert.cancel();this.element._revert=null}var b=[Event.pointerX(a),Event.pointerY(a)];var e=Position.cumulativeOffset(this.element);this.offset=[0,1].map(function(f){return(b[f]-e[f])});Draggables.activate(this);Event.stop(a)}},startDrag:function(a){this.dragging=true;if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,&quot;z-index&quot;)||0);this.element.style.zIndex=this.options.zindex}if(this.options.ghosting){this._clone=this.element.cloneNode(true);Position.absolutize(this.element);this.element.parentNode.insertBefore(this._clone,this.element)}Draggables.notify(&quot;onStart&quot;,this,a);if(this.options.starteffect){this.options.starteffect(this.element)}},updateDrag:function(a,b){if(!this.dragging){this.startDrag(a)}Position.prepare();Droppables.show(b,this.element);Draggables.notify(&quot;onDrag&quot;,this,a);this.draw(b);if(this.options.change){this.options.change(this)}if(navigator.appVersion.indexOf(&quot;AppleWebKit&quot;)&gt;0){window.scrollBy(0,0)}Event.stop(a)},finishDrag:function(b,f){this.dragging=false;if(this.options.ghosting){Position.relativize(this.element);Element.remove(this._clone);this._clone=null}if(f){Droppables.fire(b,this.element)}Draggables.notify(&quot;onEnd&quot;,this,b);var a=this.options.revert;if(a&amp;&amp;typeof a==&quot;function&quot;){a=a(this.element)}var e=this.currentDelta();if(a&amp;&amp;this.options.reverteffect){this.options.reverteffect(this.element,e[1]-this.delta[1],e[0]-this.delta[0])}else{this.delta=e}if(this.options.zindex){this.element.style.zIndex=this.originalZ}if(this.options.endeffect){this.options.endeffect(this.element)}Draggables.deactivate(this);Droppables.reset()},keyPress:function(a){if(!a.keyCode==Event.KEY_ESC){return}this.finishDrag(a,false);Event.stop(a)},endDrag:function(a){if(!this.dragging){return}this.finishDrag(a,true);Event.stop(a)},draw:function(a){var g=Position.cumulativeOffset(this.element);var f=this.currentDelta();g[0]-=f[0];g[1]-=f[1];var e=[0,1].map(function(d){return(a[d]-g[d]-this.offset[d])}.bind(this));if(this.options.snap){if(typeof this.options.snap==&quot;function&quot;){e=this.options.snap(e[0],e[1])}else{if(this.options.snap instanceof Array){e=e.map(function(d,h){return Math.round(d/this.options.snap[h])*this.options.snap[h]}.bind(this))}else{e=e.map(function(d){return Math.round(d/this.options.snap)*this.options.snap}.bind(this))}}}var b=this.element.style;if((!this.options.constraint)||(this.options.constraint==&quot;horizontal&quot;)){b.left=e[0]+&quot;px&quot;}if((!this.options.constraint)||(this.options.constraint==&quot;vertical&quot;)){b.top=e[1]+&quot;px&quot;}if(b.visibility==&quot;hidden&quot;){b.visibility=&quot;&quot;}}};var SortableObserver=Class.create();SortableObserver.prototype={initialize:function(b,a){this.element=$(b);this.observer=a;this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark();if(this.lastValue!=Sortable.serialize(this.element)){this.observer(this.element)}}};var Sortable={sortables:new Array(),options:function(a){a=$(a);return this.sortables.detect(function(b){return b.element==a})},destroy:function(a){a=$(a);this.sortables.findAll(function(b){return b.element==a}).each(function(b){Draggables.removeObserver(b.element);b.droppables.each(function(e){Droppables.remove(e)});b.draggables.invoke(&quot;destroy&quot;)});this.sortables=this.sortables.reject(function(b){return b.element==a})},create:function(d){d=$(d);var b=Object.extend({element:d,tag:&quot;li&quot;,dropOnEmpty:false,tree:false,overlap:&quot;vertical&quot;,constraint:&quot;vertical&quot;,containment:d,handle:false,only:false,hoverclass:null,ghosting:false,format:null,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(d);var a={revert:true,ghosting:b.ghosting,constraint:b.constraint,handle:b.handle};if(b.starteffect){a.starteffect=b.starteffect}if(b.reverteffect){a.reverteffect=b.reverteffect}else{if(b.ghosting){a.reverteffect=function(f){f.style.top=0;f.style.left=0}}}if(b.endeffect){a.endeffect=b.endeffect}if(b.zindex){a.zindex=b.zindex}var e={overlap:b.overlap,containment:b.containment,hoverclass:b.hoverclass,onHover:Sortable.onHover,greedy:!b.dropOnEmpty};Element.cleanWhitespace(d);b.draggables=[];b.droppables=[];if(b.dropOnEmpty){Droppables.add(d,{containment:b.containment,onHover:Sortable.onEmptyHover,greedy:false});b.droppables.push(d)}(this.findElements(d,b)||[]).each(function(g){var f=b.handle?Element.childrenWithClassName(g,b.handle)[0]:g;b.draggables.push(new Draggable(g,Object.extend(a,{handle:f})));Droppables.add(g,e);b.droppables.push(g)});this.sortables.push(b);Draggables.addObserver(new SortableObserver(d,b.onUpdate))},findElements:function(b,a){if(!b.hasChildNodes()){return null}var d=[];$A(b.childNodes).each(function(g){if(g.tagName&amp;&amp;g.tagName.toUpperCase()==a.tag.toUpperCase()&amp;&amp;(!a.only||(Element.hasClassName(g,a.only)))){d.push(g)}if(a.tree){var f=this.findElements(g,a);if(f){d.push(f)}}});return(d.length&gt;0?d.flatten():null)},onHover:function(f,e,a){if(a&gt;0.5){Sortable.mark(e,&quot;before&quot;);if(e.previousSibling!=f){var b=f.parentNode;f.style.visibility=&quot;hidden&quot;;e.parentNode.insertBefore(f,e);if(e.parentNode!=b){Sortable.options(b).onChange(f)}Sortable.options(e.parentNode).onChange(f)}}else{Sortable.mark(e,&quot;after&quot;);var d=e.nextSibling||null;if(d!=f){var b=f.parentNode;f.style.visibility=&quot;hidden&quot;;e.parentNode.insertBefore(f,d);if(e.parentNode!=b){Sortable.options(b).onChange(f)}Sortable.options(e.parentNode).onChange(f)}}},onEmptyHover:function(d,b){if(d.parentNode!=b){var a=d.parentNode;b.appendChild(d);Sortable.options(a).onChange(d);Sortable.options(b).onChange(d)}},unmark:function(){if(Sortable._marker){Element.hide(Sortable._marker)}},mark:function(b,a){var e=Sortable.options(b.parentNode);if(e&amp;&amp;!e.ghosting){return}if(!Sortable._marker){Sortable._marker=$(&quot;dropmarker&quot;)||document.createElement(&quot;DIV&quot;);Element.hide(Sortable._marker);Element.addClassName(Sortable._marker,&quot;dropmarker&quot;);Sortable._marker.style.position=&quot;absolute&quot;;document.getElementsByTagName(&quot;body&quot;).item(0).appendChild(Sortable._marker)}var d=Position.cumulativeOffset(b);Sortable._marker.style.left=d[0]+&quot;px&quot;;Sortable._marker.style.top=d[1]+&quot;px&quot;;if(a==&quot;after&quot;){if(e.overlap==&quot;horizontal&quot;){Sortable._marker.style.left=(d[0]+b.clientWidth)+&quot;px&quot;}else{Sortable._marker.style.top=(d[1]+b.clientHeight)+&quot;px&quot;}}Element.show(Sortable._marker)},serialize:function(d){d=$(d);var b=this.options(d);var a=Object.extend({tag:b.tag,only:b.only,name:d.id,format:b.format||/^[^_]*_(.*)$/},arguments[1]||{});return $(this.findElements(d,a)||[]).map(function(e){return(encodeURIComponent(a.name)+&quot;[]=&quot;+encodeURIComponent(e.id.match(a.format)?e.id.match(a.format)[1]:&quot;&quot;))}).join(&quot;&amp;&quot;)}};String.prototype.parseColor=function(){var a=&quot;#&quot;;if(this.slice(0,4)==&quot;rgb(&quot;){var d=this.slice(4,this.length-1).split(&quot;,&quot;);var b=0;do{a+=parseInt(d[b]).toColorPart()}while(++b&lt;3)}else{if(this.slice(0,1)==&quot;#&quot;){if(this.length==4){for(var b=1;b&lt;4;b++){a+=(this.charAt(b)+this.charAt(b)).toLowerCase()}}if(this.length==7){a=this.toLowerCase()}}}return(a.length==7?a:(arguments[0]||this))};Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(b){return(b.nodeType==3?b.nodeValue:(b.hasChildNodes()?Element.collectTextNodes(b):&quot;&quot;))}).flatten().join(&quot;&quot;)};Element.collectTextNodesIgnoreClass=function(a,b){return $A($(a).childNodes).collect(function(d){return(d.nodeType==3?d.nodeValue:((d.hasChildNodes()&amp;&amp;!Element.hasClassName(d,b))?Element.collectTextNodes(d):&quot;&quot;))}).flatten().join(&quot;&quot;)};Element.setStyle=function(a,b){a=$(a);for(k in b){a.style[k.camelize()]=b[k]}};Element.setContentZoom=function(a,b){Element.setStyle(a,{fontSize:(b/100)+&quot;em&quot;});if(navigator.appVersion.indexOf(&quot;AppleWebKit&quot;)&gt;0){window.scrollBy(0,0)}};Element.getOpacity=function(b){var a;if(a=Element.getStyle(b,&quot;opacity&quot;)){return parseFloat(a)}if(a=(Element.getStyle(b,&quot;filter&quot;)||&quot;&quot;).match(/alpha\(opacity=(.*)\)/)){if(a[1]){return parseFloat(a[1])/100}}return 1};Element.setOpacity=function(a,b){a=$(a);if(b==1){Element.setStyle(a,{opacity:(/Gecko/.test(navigator.userAgent)&amp;&amp;!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:null});if(/MSIE/.test(navigator.userAgent)){Element.setStyle(a,{filter:Element.getStyle(a,&quot;filter&quot;).replace(/alpha\([^\)]*\)/gi,&quot;&quot;)})}}else{if(b&lt;0.00001){b=0}Element.setStyle(a,{opacity:b});if(/MSIE/.test(navigator.userAgent)){Element.setStyle(a,{filter:Element.getStyle(a,&quot;filter&quot;).replace(/alpha\([^\)]*\)/gi,&quot;&quot;)+&quot;alpha(opacity=&quot;+b*100+&quot;)&quot;})}}};Element.getInlineOpacity=function(a){return $(a).style.opacity||&quot;&quot;};Element.childrenWithClassName=function(a,b){return $A($(a).getElementsByTagName(&quot;*&quot;)).select(function(d){return Element.hasClassName(d,b)})};Array.prototype.call=function(){var a=arguments;this.each(function(b){b.apply(this,a)})};var Effect={tagifyText:function(a){var b=&quot;position:relative&quot;;if(/MSIE/.test(navigator.userAgent)){b+=&quot;;zoom:1&quot;}a=$(a);$A(a.childNodes).each(function(d){if(d.nodeType==3){d.nodeValue.toArray().each(function(e){a.insertBefore(Builder.node(&quot;span&quot;,{style:b},e==&quot; &quot;?String.fromCharCode(160):e),d)});Element.remove(d)}})},multiple:function(b,d){var f;if(((typeof b==&quot;object&quot;)||(typeof b==&quot;function&quot;))&amp;&amp;(b.length)){f=b}else{f=$(b).childNodes}var a=Object.extend({speed:0.1,delay:0},arguments[2]||{});var e=a.delay;$A(f).each(function(h,g){new d(h,Object.extend(a,{delay:g*a.speed+e}))})},PAIRS:{slide:[&quot;SlideDown&quot;,&quot;SlideUp&quot;],blind:[&quot;BlindDown&quot;,&quot;BlindUp&quot;],appear:[&quot;Appear&quot;,&quot;Fade&quot;]},toggle:function(b,d){b=$(b);d=(d||&quot;appear&quot;).toLowerCase();var a=Object.extend({queue:{position:&quot;end&quot;,scope:(b.id||&quot;global&quot;)}},arguments[2]||{});Effect[Element.visible(b)?Effect.PAIRS[d][1]:Effect.PAIRS[d][0]](b,a)}};var Effect2=Effect;Effect.Transitions={};Effect.Transitions.linear=function(a){return a};Effect.Transitions.sinoidal=function(a){return(-Math.cos(a*Math.PI)/2)+0.5};Effect.Transitions.reverse=function(a){return 1-a};Effect.Transitions.flicker=function(a){return((-Math.cos(a*Math.PI)/4)+0.75)+Math.random()/4};Effect.Transitions.wobble=function(a){return(-Math.cos(a*Math.PI*(9*a))/2)+0.5};Effect.Transitions.pulse=function(a){return(Math.floor(a*10)%2==0?(a*10-Math.floor(a*10)):1-(a*10-Math.floor(a*10)))};Effect.Transitions.none=function(a){return 0};Effect.Transitions.full=function(a){return 1};Effect.ScopedQueue=Class.create();Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(b){var d=new Date().getTime();var a=(typeof b.options.queue==&quot;string&quot;)?b.options.queue:b.options.queue.position;switch(a){case&quot;front&quot;:this.effects.findAll(function(f){return f.state==&quot;idle&quot;}).each(function(f){f.startOn+=b.finishOn;f.finishOn+=b.finishOn});break;case&quot;end&quot;:d=this.effects.pluck(&quot;finishOn&quot;).max()||d;break}b.startOn+=d;b.finishOn+=d;this.effects.push(b);if(!this.interval){this.interval=setInterval(this.loop.bind(this),40)}},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var a=new Date().getTime();this.effects.invoke(&quot;loop&quot;,a)}});Effect.Queues={instances:$H(),get:function(a){if(typeof a!=&quot;string&quot;){return a}if(!this.instances[a]){this.instances[a]=new Effect.ScopedQueue()}return this.instances[a]}};Effect.Queue=Effect.Queues.get(&quot;global&quot;);Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1,fps:25,sync:false,from:0,to:1,delay:0,queue:&quot;parallel&quot;};Effect.Base=function(){};Effect.Base.prototype={position:null,start:function(a){this.options=Object.extend(Object.extend({},Effect.DefaultOptions),a||{});this.currentFrame=0;this.state=&quot;idle&quot;;this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.event(&quot;beforeStart&quot;);if(!this.options.sync){Effect.Queues.get(typeof this.options.queue==&quot;string&quot;?&quot;global&quot;:this.options.queue.scope).add(this)}},loop:function(d){if(d&gt;=this.startOn){if(d&gt;=this.finishOn){this.render(1);this.cancel();this.event(&quot;beforeFinish&quot;);if(this.finish){this.finish()}this.event(&quot;afterFinish&quot;);return}var b=(d-this.startOn)/(this.finishOn-this.startOn);var a=Math.round(b*this.options.fps*this.options.duration);if(a&gt;this.currentFrame){this.render(b);this.currentFrame=a}}},render:function(a){if(this.state==&quot;idle&quot;){this.state=&quot;running&quot;;this.event(&quot;beforeSetup&quot;);if(this.setup){this.setup()}this.event(&quot;afterSetup&quot;)}if(this.state==&quot;running&quot;){if(this.options.transition){a=this.options.transition(a)}a*=(this.options.to-this.options.from);a+=this.options.from;this.position=a;this.event(&quot;beforeUpdate&quot;);if(this.update){this.update(a)}this.event(&quot;afterUpdate&quot;)}},cancel:function(){if(!this.options.sync){Effect.Queues.get(typeof this.options.queue==&quot;string&quot;?&quot;global&quot;:this.options.queue.scope).remove(this)}this.state=&quot;finished&quot;},event:function(a){if(this.options[a+&quot;Internal&quot;]){this.options[a+&quot;Internal&quot;](this)}if(this.options[a]){this.options[a](this)}},inspect:function(){return&quot;#&lt;Effect:&quot;+$H(this).inspect()+&quot;,options:&quot;+$H(this.options).inspect()+&quot;&gt;&quot;}};Effect.Parallel=Class.create();Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(a){this.effects=a||[];this.start(arguments[1])},update:function(a){this.effects.invoke(&quot;render&quot;,a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event(&quot;beforeFinish&quot;);if(b.finish){b.finish(a)}b.event(&quot;afterFinish&quot;)})}});Effect.Opacity=Class.create();Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(b){this.element=$(b);if(/MSIE/.test(navigator.userAgent)&amp;&amp;(!this.element.hasLayout)){Element.setStyle(this.element,{zoom:1})}var a=Object.extend({from:Element.getOpacity(this.element)||0,to:1},arguments[1]||{});this.start(a)},update:function(a){Element.setOpacity(this.element,a)}});Effect.Move=Class.create();Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(b){this.element=$(b);var a=Object.extend({x:0,y:0,mode:&quot;relative&quot;},arguments[1]||{});this.start(a)},setup:function(){Element.makePositioned(this.element);this.originalLeft=parseFloat(Element.getStyle(this.element,&quot;left&quot;)||&quot;0&quot;);this.originalTop=parseFloat(Element.getStyle(this.element,&quot;top&quot;)||&quot;0&quot;);if(this.options.mode==&quot;absolute&quot;){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(a){Element.setStyle(this.element,{left:this.options.x*a+this.originalLeft+&quot;px&quot;,top:this.options.y*a+this.originalTop+&quot;px&quot;})}});Effect.MoveBy=function(b,a,d){return new Effect.Move(b,Object.extend({x:d,y:a},arguments[3]||{}))};Effect.Scale=Class.create();Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(b,d){this.element=$(b);var a=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:&quot;box&quot;,scaleFrom:100,scaleTo:d},arguments[2]||{});this.start(a)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=Element.getStyle(this.element,&quot;position&quot;);this.originalStyle={};[&quot;top&quot;,&quot;left&quot;,&quot;width&quot;,&quot;height&quot;,&quot;fontSize&quot;].each(function(b){this.originalStyle[b]=this.element.style[b]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=Element.getStyle(this.element,&quot;font-size&quot;)||&quot;100%&quot;;[&quot;em&quot;,&quot;px&quot;,&quot;%&quot;].each(function(b){if(a.indexOf(b)&gt;0){this.fontSize=parseFloat(a);this.fontSizeType=b}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode==&quot;box&quot;){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(a){var b=(this.options.scaleFrom/100)+(this.factor*a);if(this.options.scaleContent&amp;&amp;this.fontSize){Element.setStyle(this.element,{fontSize:this.fontSize*b+this.fontSizeType})}this.setDimensions(this.dims[0]*b,this.dims[1]*b)},finish:function(a){if(this.restoreAfterFinish){Element.setStyle(this.element,this.originalStyle)}},setDimensions:function(a,f){var g={};if(this.options.scaleX){g.width=f+&quot;px&quot;}if(this.options.scaleY){g.height=a+&quot;px&quot;}if(this.options.scaleFromCenter){var e=(a-this.dims[0])/2;var b=(f-this.dims[1])/2;if(this.elementPositioning==&quot;absolute&quot;){if(this.options.scaleY){g.top=this.originalTop-e+&quot;px&quot;}if(this.options.scaleX){g.left=this.originalLeft-b+&quot;px&quot;}}else{if(this.options.scaleY){g.top=-e+&quot;px&quot;}if(this.options.scaleX){g.left=-b+&quot;px&quot;}}}Element.setStyle(this.element,g)}});Effect.Highlight=Class.create();Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(b){this.element=$(b);var a=Object.extend({startcolor:&quot;#ffff99&quot;},arguments[1]||{});this.start(a)},setup:function(){if(Element.getStyle(this.element,&quot;display&quot;)==&quot;none&quot;){this.cancel();return}this.oldStyle={backgroundImage:Element.getStyle(this.element,&quot;background-image&quot;)};Element.setStyle(this.element,{backgroundImage:&quot;none&quot;});if(!this.options.endcolor){this.options.endcolor=Element.getStyle(this.element,&quot;background-color&quot;).parseColor(&quot;#ffffff&quot;)}if(!this.options.restorecolor){this.options.restorecolor=Element.getStyle(this.element,&quot;background-color&quot;)}this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))},update:function(a){Element.setStyle(this.element,{backgroundColor:$R(0,2).inject(&quot;#&quot;,function(b,d,e){return b+(Math.round(this._base[e]+(this._delta[e]*a)).toColorPart())}.bind(this))})},finish:function(){Element.setStyle(this.element,Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=Class.create();Object.extend(Object.extend(Effect.ScrollTo.prototype,Effect.Base.prototype),{initialize:function(a){this.element=$(a);this.start(arguments[1]||{})},setup:function(){Position.prepare();var b=Position.cumulativeOffset(this.element);if(this.options.offset){b[1]+=this.options.offset}var a=window.innerHeight?window.height-window.innerHeight:document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);this.scrollStart=Position.deltaY;this.delta=(b[1]&gt;a?a:b[1])-this.scrollStart},update:function(a){Position.prepare();window.scrollTo(Position.deltaX,this.scrollStart+(a*this.delta))}});Effect.Fade=function(element){var oldOpacity=Element.getInlineOpacity(element);var options=Object.extend({from:Element.getOpacity(element)||1,to:0,afterFinishInternal:function(effect){with(Element){if(effect.options.to!=0){return}hide(effect.element);setStyle(effect.element,{opacity:oldOpacity})}}},arguments[1]||{});return new Effect.Opacity(element,options)};Effect.Appear=function(element){var options=Object.extend({from:(Element.getStyle(element,&quot;display&quot;)==&quot;none&quot;?0:Element.getOpacity(element)||0),to:1,beforeSetup:function(effect){with(Element){setOpacity(effect.element,effect.options.from);show(effect.element)}}},arguments[1]||{});return new Effect.Opacity(element,options)};Effect.Puff=function(element){element=$(element);var oldStyle={opacity:Element.getInlineOpacity(element),position:Element.getStyle(element,&quot;position&quot;)};return new Effect.Parallel([new Effect.Scale(element,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(element,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(effect){with(Element){setStyle(effect.effects[0].element,{position:&quot;absolute&quot;})}},afterFinishInternal:function(effect){with(Element){hide(effect.effects[0].element);setStyle(effect.effects[0].element,oldStyle)}}},arguments[1]||{}))};Effect.BlindUp=function(element){element=$(element);Element.makeClipping(element);return new Effect.Scale(element,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(effect){with(Element){[hide,undoClipping].call(effect.element)}}},arguments[1]||{}))};Effect.BlindDown=function(element){element=$(element);var oldHeight=Element.getStyle(element,&quot;height&quot;);var elementDimensions=Element.getDimensions(element);return new Effect.Scale(element,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:elementDimensions.height,originalWidth:elementDimensions.width},restoreAfterFinish:true,afterSetup:function(effect){with(Element){makeClipping(effect.element);setStyle(effect.element,{height:&quot;0px&quot;});show(effect.element)}},afterFinishInternal:function(effect){with(Element){undoClipping(effect.element);setStyle(effect.element,{height:oldHeight})}}},arguments[1]||{}))};Effect.SwitchOff=function(element){element=$(element);var oldOpacity=Element.getInlineOpacity(element);return new Effect.Appear(element,{duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(effect){new Effect.Scale(effect.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(effect){with(Element){[makePositioned,makeClipping].call(effect.element)}},afterFinishInternal:function(effect){with(Element){[hide,undoClipping,undoPositioned].call(effect.element);setStyle(effect.element,{opacity:oldOpacity})}}})}})};Effect.DropOut=function(element){element=$(element);var oldStyle={top:Element.getStyle(element,&quot;top&quot;),left:Element.getStyle(element,&quot;left&quot;),opacity:Element.getInlineOpacity(element)};return new Effect.Parallel([new Effect.Move(element,{x:0,y:100,sync:true}),new Effect.Opacity(element,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(effect){with(Element){makePositioned(effect.effects[0].element)}},afterFinishInternal:function(effect){with(Element){[hide,undoPositioned].call(effect.effects[0].element);setStyle(effect.effects[0].element,oldStyle)}}},arguments[1]||{}))};Effect.Shake=function(element){element=$(element);var oldStyle={top:Element.getStyle(element,&quot;top&quot;),left:Element.getStyle(element,&quot;left&quot;)};return new Effect.Move(element,{x:20,y:0,duration:0.05,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:-20,y:0,duration:0.05,afterFinishInternal:function(effect){with(Element){undoPositioned(effect.element);setStyle(effect.element,oldStyle)}}})}})}})}})}})}})};Effect.SlideDown=function(element){element=$(element);Element.cleanWhitespace(element);var oldInnerBottom=Element.getStyle(element.firstChild,&quot;bottom&quot;);var elementDimensions=Element.getDimensions(element);return new Effect.Scale(element,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:elementDimensions.height,originalWidth:elementDimensions.width},restoreAfterFinish:true,afterSetup:function(effect){with(Element){makePositioned(effect.element);makePositioned(effect.element.firstChild);if(window.opera){setStyle(effect.element,{top:&quot;&quot;})}makeClipping(effect.element);setStyle(effect.element,{height:&quot;0px&quot;});show(element)}},afterUpdateInternal:function(effect){with(Element){setStyle(effect.element.firstChild,{bottom:(effect.dims[0]-effect.element.clientHeight)+&quot;px&quot;})}},afterFinishInternal:function(effect){with(Element){undoClipping(effect.element);undoPositioned(effect.element.firstChild);undoPositioned(effect.element);setStyle(effect.element.firstChild,{bottom:oldInnerBottom})}}},arguments[1]||{}))};Effect.SlideUp=function(element){element=$(element);Element.cleanWhitespace(element);var oldInnerBottom=Element.getStyle(element.firstChild,&quot;bottom&quot;);return new Effect.Scale(element,0,Object.extend({scaleContent:false,scaleX:false,scaleMode:&quot;box&quot;,scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(effect){with(Element){makePositioned(effect.element);makePositioned(effect.element.firstChild);if(window.opera){setStyle(effect.element,{top:&quot;&quot;})}makeClipping(effect.element);show(element)}},afterUpdateInternal:function(effect){with(Element){setStyle(effect.element.firstChild,{bottom:(effect.dims[0]-effect.element.clientHeight)+&quot;px&quot;})}},afterFinishInternal:function(effect){with(Element){[hide,undoClipping].call(effect.element);undoPositioned(effect.element.firstChild);undoPositioned(effect.element);setStyle(effect.element.firstChild,{bottom:oldInnerBottom})}}},arguments[1]||{}))};Effect.Squish=function(element){return new Effect.Scale(element,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(effect){with(Element){makeClipping(effect.element)}},afterFinishInternal:function(effect){with(Element){hide(effect.element);undoClipping(effect.element)}}})};Effect.Grow=function(element){element=$(element);var options=Object.extend({direction:&quot;center&quot;,moveTransistion:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var oldStyle={top:element.style.top,left:element.style.left,height:element.style.height,width:element.style.width,opacity:Element.getInlineOpacity(element)};var dims=Element.getDimensions(element);var initialMoveX,initialMoveY;var moveX,moveY;switch(options.direction){case&quot;top-left&quot;:initialMoveX=initialMoveY=moveX=moveY=0;break;case&quot;top-right&quot;:initialMoveX=dims.width;initialMoveY=moveY=0;moveX=-dims.width;break;case&quot;bottom-left&quot;:initialMoveX=moveX=0;initialMoveY=dims.height;moveY=-dims.height;break;case&quot;bottom-right&quot;:initialMoveX=dims.width;initialMoveY=dims.height;moveX=-dims.width;moveY=-dims.height;break;case&quot;center&quot;:initialMoveX=dims.width/2;initialMoveY=dims.height/2;moveX=-dims.width/2;moveY=-dims.height/2;break}return new Effect.Move(element,{x:initialMoveX,y:initialMoveY,duration:0.01,beforeSetup:function(effect){with(Element){hide(effect.element);makeClipping(effect.element);makePositioned(effect.element)}},afterFinishInternal:function(effect){new Effect.Parallel([new Effect.Opacity(effect.element,{sync:true,to:1,from:0,transition:options.opacityTransition}),new Effect.Move(effect.element,{x:moveX,y:moveY,sync:true,transition:options.moveTransition}),new Effect.Scale(effect.element,100,{scaleMode:{originalHeight:dims.height,originalWidth:dims.width},sync:true,scaleFrom:window.opera?1:0,transition:options.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(effect){with(Element){setStyle(effect.effects[0].element,{height:&quot;0px&quot;});show(effect.effects[0].element)}},afterFinishInternal:function(effect){with(Element){[undoClipping,undoPositioned].call(effect.effects[0].element);setStyle(effect.effects[0].element,oldStyle)}}},options))}})};Effect.Shrink=function(element){element=$(element);var options=Object.extend({direction:&quot;center&quot;,moveTransistion:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var oldStyle={top:element.style.top,left:element.style.left,height:element.style.height,width:element.style.width,opacity:Element.getInlineOpacity(element)};var dims=Element.getDimensions(element);var moveX,moveY;switch(options.direction){case&quot;top-left&quot;:moveX=moveY=0;break;case&quot;top-right&quot;:moveX=dims.width;moveY=0;break;case&quot;bottom-left&quot;:moveX=0;moveY=dims.height;break;case&quot;bottom-right&quot;:moveX=dims.width;moveY=dims.height;break;case&quot;center&quot;:moveX=dims.width/2;moveY=dims.height/2;break}return new Effect.Parallel([new Effect.Opacity(element,{sync:true,to:0,from:1,transition:options.opacityTransition}),new Effect.Scale(element,window.opera?1:0,{sync:true,transition:options.scaleTransition,restoreAfterFinish:true}),new Effect.Move(element,{x:moveX,y:moveY,sync:true,transition:options.moveTransition})],Object.extend({beforeStartInternal:function(effect){with(Element){[makePositioned,makeClipping].call(effect.effects[0].element)}},afterFinishInternal:function(effect){with(Element){[hide,undoClipping,undoPositioned].call(effect.effects[0].element);setStyle(effect.effects[0].element,oldStyle)}}},options))};Effect.Pulsate=function(d){d=$(d);var b=arguments[1]||{};var a=Element.getInlineOpacity(d);var f=b.transition||Effect.Transitions.sinoidal;var e=function(g){return f(1-Effect.Transitions.pulse(g))};e.bind(f);return new Effect.Opacity(d,Object.extend(Object.extend({duration:3,from:0,afterFinishInternal:function(g){Element.setStyle(g.element,{opacity:a})}},b),{transition:e}))};Effect.Fold=function(element){element=$(element);var oldStyle={top:element.style.top,left:element.style.left,width:element.style.width,height:element.style.height};Element.makeClipping(element);return new Effect.Scale(element,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(effect){new Effect.Scale(element,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(effect){with(Element){[hide,undoClipping].call(effect.element);setStyle(effect.element,oldStyle)}}})}},arguments[1]||{}))};var Search=Class.create();Search.prototype={initialize:function(a){this.parentElement=$(a);this.name=&quot;Search Results:&quot;;this.children=new Array();this.readonly=false;this.open=false;this.createSearch()},createSearch:function(){this.element=document.createElement(&quot;div&quot;);this.span=document.createElement(&quot;span&quot;);this.link=document.createElement(&quot;a&quot;);Element.addClassName(this.element,&quot;directory&quot;);Element.addClassName(this.element,&quot;search&quot;);Element.addClassName(this.span,&quot;search&quot;);this.spinner=document.createElement(&quot;img&quot;);this.spinner.src=spinnerIcon;this.spinner.style.display=&quot;none&quot;;Element.addClassName(this.spinner,&quot;spinner&quot;);this.mark=document.createElement(&quot;img&quot;);this.mark.src=vcollapsed;Element.addClassName(this.mark,&quot;mark&quot;);this.link.href=&quot;javascript:go();&quot;;this.link.innerHTML=this.name;this.display?this.link.innerHTML=this.display:null;Element.addClassName(this.link,&quot;link&quot;);this.del=document.createElement(&quot;a&quot;);this.del.href=&quot;javascript:go()&quot;;this.del.innerHTML=&quot;close&quot;;Element.addClassName(this.del,&quot;del&quot;);this.mark.onclick=this.openOrClose.bind(this);this.span.ondblclick=this.openOrClose.bind(this);this.del.onclick=this.hide.bind(this);this.link.onselectstart=function(){return false};this.span.appendChild(this.link);this.span.appendChild(this.mark);this.span.appendChild(this.del);this.span.appendChild(this.spinner);this.element.appendChild(this.span);this.element.id=&quot;searchresults&quot;;this.element.object=this;this.element.style.display=&quot;none&quot;;this.parentElement.appendChild(this.element)},openOrClose:function(){if(this.open){this.element.style.height=&quot;20px&quot;;this.element.style.overflow=&quot;hidden&quot;;this.mark.src=vcollapsed;this.open=false}else{this.open=true;this.element.style.height=&quot;auto&quot;;this.mark.src=vexpanded}},show:function(){this.element.style.display=&quot;block&quot;},hide:function(){this.open=false;Effect.Fade(this.element.id)},start:function(a){this.clearContents();this.show();this.element.style.height=&quot;auto&quot;;this.mark.src=vexpanded;var b=$(&quot;searchbar&quot;).value||a;this.link.innerHTML=this.name+&quot; &lt;em&gt;&quot;+b+&quot;&lt;/em&gt;&quot;;this.spinner.style.display=&quot;block&quot;;var e=$H({relay:&quot;search&quot;,terms:b});var d=new Ajax.Request(FC.URL,{onSuccess:this.start_handler.bind(this),method:&quot;post&quot;,parameters:e.toQueryString(),onFailusre:function(){showError(ER.ajax)}})},start_handler:function(response){this.open=true;this.spinner.style.display=&quot;none&quot;;this.mark.src=vexpanded;var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);for(var i=0;i&lt;jsonObject.bindings.length;i++){var newFile=new File(jsonObject.bindings[i].id,jsonObject.bindings[i].name,jsonObject.bindings[i].flags,$(&quot;searchresults&quot;),jsonObject.bindings[i].date);this.children.push(newFile)}},clearContents:function(){this.open=false;while(this.children.length&gt;0){this.removeChild(this.children[0],0)}},removeChild:function(d,a){if(!a){for(var b=0;b&lt;this.children.length;b++){if(this.children[b]==d){var a=b;break}}}this.children.splice(a,1);Element.remove(d.element);delete d}};function monitorSearch(b){alert(b);var a=(b.charCode)?b.charCode:((b.which)?b.which:b.keyCode);switch(a){case Event.KEY_RETURN:doSearch();break}}var FC={URL:&quot;/admin/files/fs&quot;,TYPES:new Array(&quot;file&quot;,&quot;directory&quot;),SELECTEDOBJECT:null,SHOWALL:false,SCRIPTSRC:location.href,SEARCHOBJ:null,NEXTPATH:null,AJAXCALL:0,UPLOADURL:&quot;/upload.pl&quot;,DEBUG:false};var Directory=Class.create();Directory.prototype={initialize:function(h,e,b,a,g,d,f){this.path=h;this.type=&quot;directory&quot;;this.name=e;this.id=this.path;this.flag=b;this.virtual=g||false;this.open=false;this.selected=false;this.changed=false;this.timer=null;this.interval=1000;this.children=new Array();this.path==&quot;&quot;?this.isRoot=true:this.isRoot=false;this.parentElement=a;this.parentElement.object?this.parentObject=this.parentElement.object:null;if(d){this.readonly=(d==&quot;read&quot;)}else{if(this.parentObject){this.readonly=this.parentObject.readonly}else{this.readonly=true}}f?this.display=f:null;this.createDirectory();FC.SHOWALL||this.virtual==&quot;true&quot;?this.getContents():this.virtual==&quot;closed&quot;?this.virtual=true:null},createDirectory:function(){this.element=document.createElement(&quot;div&quot;);this.link=document.createElement(&quot;a&quot;);this.icon=document.createElement(&quot;img&quot;);this.handle=document.createElement(&quot;div&quot;);Element.addClassName(this.handle,&quot;handle&quot;);this.spinner=document.createElement(&quot;img&quot;);this.spinner.src=spinnerIcon;this.spinner.style.display=&quot;none&quot;;Element.addClassName(this.spinner,&quot;spinner&quot;);this.span=document.createElement(&quot;span&quot;);this.icon.src=folderIcon;Element.addClassName(this.icon,&quot;icon&quot;);this.mark=document.createElement(&quot;img&quot;);this.virtual?this.mark.src=vcollapsed:this.mark.src=collapsed;Element.addClassName(this.mark,&quot;mark&quot;);this.link.href=&quot;javascript:go();&quot;;this.link.title=this.id;this.link.innerHTML=this.name;this.display?this.link.innerHTML=this.display:null;Element.addClassName(this.link,this.flag);Element.addClassName(this.link,&quot;link&quot;);this.del=document.createElement(&quot;a&quot;);this.del.href=&quot;javascript:go()&quot;;this.del.innerHTML=&quot;delete&quot;;this.del.style.display=&quot;none&quot;;Element.addClassName(this.del,&quot;del&quot;);this.note=document.createElement(&quot;span&quot;);this.note.innerHTML=&quot;(read-only)&quot;;Element.addClassName(this.note,&quot;note&quot;);this.mark.onclick=this.openOrClose.bindAsEventListener(this);this.icon.onmousedown=this.select.bindAsEventListener(this);this.icon.ondblclick=this.openOrClose.bindAsEventListener(this);this.span.onmousedown=this.select.bindAsEventListener(this);this.link.onmousedown=this.select.bindAsEventListener(this);this.span.ondblclick=this.openOrClose.bindAsEventListener(this);!this.readonly?this.del.onclick=this.unlink.bindAsEventListener(this):null;this.link.onselectstart=function(){return false};this.handle.appendChild(this.icon);this.handle.appendChild(this.link);this.span.appendChild(this.mark);this.span.appendChild(this.handle);if(this.readonly){this.span.appendChild(this.note)}if(!this.virtual&amp;&amp;!this.readonly){this.span.appendChild(this.del)}this.span.appendChild(this.spinner);this.element.appendChild(this.span);if(this.isRoot){this.span.style.display=&quot;none&quot;}this.element.id=&quot;root&quot;+this.id;this.element.object=this;Element.addClassName(this.element,this.type);if(this.virtual){Element.addClassName(this.element,&quot;virtual&quot;);Element.addClassName(this.span,&quot;virtual&quot;)}if(this.readonly){Element.addClassName(this.element,&quot;read&quot;);Element.addClassName(this.span,&quot;read&quot;)}this.parentElement.appendChild(this.element);if(!this.isRoot&amp;&amp;!this.readonly){if(!this.virtual){new Draggable(this.element.id,{revert:true,handle:&quot;handle&quot;,scroll:&quot;fileList&quot;})}Droppables.add(this.element.id,{accept:FC.TYPES,hoverclass:&quot;hover&quot;,onDrop:this.moveTo.bind(this)});this.resetHierarchy()}},getContents:function(){if(this.opening){return false}this.opening=true;var a=new Date();var d=$H({relay:&quot;getFolder&quot;,path:this.path,rand:a.getTime()});this.showActivity();var b=new Ajax.Request(FC.URL,{onSuccess:this.getContents_handler.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})},getContents_handler:function(response){this.open=true;Element.addClassName(this.span,&quot;open&quot;);this.opening=false;this.virtual?this.mark.src=vexpanded:this.mark.src=expanded;this.hideActivity();var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);if(jsonObject.bindings.length==0){this.addBlank();return true}if(jsonObject.bindings[0].error){this.parentObject.update()}for(var i=0;i&lt;jsonObject.bindings.length;i++){this.addChild(jsonObject.bindings[i])}if(this.andPick&amp;&amp;i&gt;0){this.children[this.andPick].select()}if(FC.NEXTPATH&amp;&amp;!this.isRoot){parsePath(FC.NEXTPATH)}},update:function(){if(this.open){var a=new Date();var d=$H({relay:&quot;getFolder&quot;,path:this.path,random:a.getTime()});this.showActivity();var b=new Ajax.Request(FC.URL,{onSuccess:this.update_handler.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})}else{this.getContents()}},update_handler:function(response){this.hideActivity();this.open=true;var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);if(jsonObject.bindings.length&gt;0){this.removeBlank()}else{this.addBlank()}for(var i=0;i&lt;this.children.length;i++){var found=false;for(var j=0;j&lt;jsonObject.bindings.length;j++){if(this.children[i].id==jsonObject.bindings[j].id||this.children[i].id==jsonObject.bindings[j].path){found=true;break}}if(found){if(this.children[i].name!=jsonObject.bindings[j].name||this.children[i].flag!=jsonObject.bindings[j].flags&amp;&amp;this.children[i].type==&quot;file&quot;){this.children[i].name=jsonObject.bindings[j].name;this.children[i].flag=jsonObject.bindings[j].flags;this.children[i].refresh()}jsonObject.bindings.splice(j,1)}else{this.removeChild(this.children[i],i);i--}}for(var k=0;k&lt;jsonObject.bindings.length;k++){this.addChild(jsonObject.bindings[k])}if(this.andPick&amp;&amp;i&gt;0){this.children[this.andPick].select()}if(FC.NEXTPATH){parsePath(FC.NEXTPATH)}},openOrClose:function(){this.open?this.clearContents():this.getContents()},resetHierarchy:function(){if(this.parentObject.type==&quot;directory&quot;&amp;&amp;this.parentObject.isRoot==false){Droppables.remove(this.parentElement);Droppables.add(this.parentElement.id,{accept:FC.TYPES,hoverclass:&quot;hover&quot;,onDrop:this.parentObject.moveTo.bind(this.parentObject)});this.parentObject.resetHierarchy()}},clearContents:function(){this.removeBlank();while(this.children.length&gt;0){(this.children[0].type==&quot;directory&quot;&amp;&amp;this.children[0].hasChildren())?this.children[0].clearContents():this.removeChild(this.children[0],0)}this.open=false;Element.removeClassName(this.span,&quot;open&quot;);this.virtual?this.mark.src=vcollapsed:this.mark.src=collapsed},removeChild:function(d,a){if(!a){for(var b=0;b&lt;this.children.length;b++){if(this.children[b]==d){var a=b;break}}}this.children.splice(a,1);if(d.type==&quot;directory&quot;){Droppables.remove(d.id)}Element.remove(d.element)},clear:function(){this.parentObject.removeChild(this)},addChild:function(d){if(d.type==&quot;file&quot;){var a=new File(d.id,d.name,d.flags,this.element,d.date);this.children.push(a)}else{if(d.type==&quot;directory&quot;){var b=new Directory(d.path,d.name,d.flags,this.element,d.virtual,d.scheme,d.displayname);this.children.push(b)}else{return 0}}},moveTo:function(b){Element.removeClassName(this.element,&quot;hover&quot;);if(b.object.parentObject==this){return false}var a=new Date();if(b.object.type==&quot;directory&quot;){var e=$H({relay:&quot;folderMove&quot;,name:b.object.name,path:b.object.parentObject.path,newpath:this.path,random:a.getTime()});FC.SEARCHOBJ=this;FC.NEXTPATH=&quot;/&quot;+b.object.name;b.object.clearContents();b.object.clear();var d=new Ajax.Request(FC.URL,{onSuccess:this.update.bind(this),method:&quot;get&quot;,parameters:e.toQueryString(),onFailure:function(){showError(ER.ajax)}})}else{var e=$H({relay:&quot;fileMove&quot;,fileid:b.object.id,path:this.path,random:a.getTime()});FC.SEARCHOBJ=this;FC.NEXTPATH=&quot;/&quot;+b.object.name;if(!b.object.search){b.object.clear()}var d=new Ajax.Request(FC.URL,{onSuccess:this.update.bind(this),method:&quot;get&quot;,parameters:e.toQueryString(),onFailure:function(){showError(ER.ajax)}})}},select:function(a){$(&quot;uploadPath&quot;).value=this.path;$(&quot;uploadstatus&quot;).innerHTML=&quot;&lt;em&gt;Destination&lt;/em&gt; &lt;span id='dest'&gt;&quot;+this.path+&quot;&lt;/span&gt;&quot;;this.del.style.display=&quot;block&quot;;if(FC.SELECTEDOBJECT!=null&amp;&amp;FC.SELECTEDOBJECT!=this){FC.SELECTEDOBJECT.deselect()}window.onkeypress=this.select_handler.bindAsEventListener(this);FC.SELECTEDOBJECT=this;Element.addClassName(this.span,&quot;selected&quot;);if($(&quot;meta&quot;).prevElement!=this.path){this.getMeta()}return false},select_handler:function(b){var a=(b.charCode)?b.charCode:((b.which)?b.which:b.keyCode);switch(a){case Event.KEY_DOWN:this.parentObject.nextChild(this);break;case Event.KEY_UP:this.parentObject.prevChild(this);break;case Event.KEY_RIGHT:if(this.open){this.children[0].select()}else{this.openOrClose();this.andPick=&quot;0&quot;}break;case Event.KEY_LEFT:this.parentObject.select(this);break}},deselect:function(){this.timer=null;window.onkeypress=null;this.del.style.display=&quot;none&quot;;Element.removeClassName(this.span,&quot;selected&quot;);this.selected=false;this.clearRename()},getMeta:function(){$(&quot;meta&quot;).prevElement=this.path;var a=new Date();var d=$H({relay:&quot;getFolderMeta&quot;,path:this.path,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onLoading:showMetaSpinner(),onSuccess:this.getMeta_handler.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})},getMeta_handler:function(response){var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);if(jsonObject.bindings.length&gt;=1){var meta={name:jsonObject.bindings[0].name,size:jsonObject.bindings[0].size,path:this.path};updateMeta(meta)}else{updateMeta({&quot; &quot;:&quot;No Info to display&quot;})}},nextChild:function(b){var a=this.checkIfChild(b);if(a!=this.children.length-1){this.children[a+1].select()}else{if(!this.isRoot){this.parentObject.nextChild(this)}}},prevChild:function(b){var a=this.checkIfChild(b);if(a!=0){this.children[a-1].select()}else{if(a==0&amp;&amp;!this.isRoot){this.select()}}},checkIfChild:function(b){if(this.hasChildren()){for(var a=0;a&lt;this.children.length;a++){if(this.children[a].id==b.id){return a}}return false}else{return false}},clearRename:function(){if(this.renameIsOpen){Element.remove(this.newName);this.link.style.display=&quot;block&quot;;this.renameIsOpen=false}},rename_handler:function(b,f){if(!f){var a=(b.charCode)?b.charCode:((b.which)?b.which:b.keyCode);if(a==Event.KEY_ESC){this.clearRename()}}if(a==Event.KEY_RETURN||f){rand_date=new Date();var e=$H({relay:&quot;folderRename&quot;,path:this.parentObject.path,name:this.name,newname:f||this.newName.value,random:rand_date.getTime()});this.link.innerHTML=e.newname;this.clearRename();var d=new Ajax.Request(FC.URL,{onComplete:this.select.bind(this),onSuccess:this.parentObject.update.bind(this.parentObject),method:&quot;get&quot;,parameters:e.toQueryString(),onFailure:function(){showError(ER.ajax)}})}},showRename:function(){if(this.readonly){return false}if(this.virtual){return false}this.renameIsOpen=true;this.newName=document.createElement(&quot;input&quot;);this.newName.type=&quot;text&quot;;this.newName.name=this.id;this.newName.value=this.name;window.onkeypress=this.rename_handler.bindAsEventListener(this);Element.addClassName(this.newName,&quot;renamefield&quot;);this.link.style.display=&quot;none&quot;;this.span.appendChild(this.newName);Field.select(this.newName)},showActivity:function(){this.spinner.style.display=&quot;block&quot;},hideActivity:function(){this.spinner.style.display=&quot;none&quot;},hasChildren:function(){if(this.children.length&gt;0){return true}else{return false}},unlink:function(){if(this.readonly){return false}if(this.virtual){return false}if(confirm(&quot;delete the folder &quot;+this.name+&quot;?&quot;)){var a=new Date();var d=$H({relay:&quot;folderDelete&quot;,folder:this.path,random:a.getTime()});this.parentObject.prevChild(this);var b=new Ajax.Request(FC.URL,{onComplete:this.parentObject.nextChild(this),onSuccess:this.clear.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})}},addBlank:function(){if(this.blankisshowing){return false}this.blankisshowing=true;this.blank=document.createElement(&quot;div&quot;);this.blank.innerHTML=&quot;This folder is empty&quot;;Element.addClassName(this.blank,&quot;blank&quot;);this.element.appendChild(this.blank)},removeBlank:function(){if(this.blankisshowing){Element.remove(this.blank);this.blankisshowing=false}}};var File=Class.create();File.prototype={initialize:function(f,e,b,a,d){this.type=&quot;file&quot;;this.fileDate=d;this.name=e;this.id=f;this.flag=b;this.selected=false;this.timer=null;this.interval=1000;this.parentElement=a;this.parentObject=a.object;this.readonly=this.parentObject.readonly;this.parentElement.id==&quot;searchresults&quot;?this.search=true:this.search=false;this.createFile()},createFile:function(){this.element=document.createElement(&quot;div&quot;);this.span=document.createElement(&quot;span&quot;);this.link=document.createElement(&quot;a&quot;);this.icon=document.createElement(&quot;img&quot;);this.handle=document.createElement(&quot;div&quot;);Element.addClassName(this.handle,&quot;handle&quot;);this.flag!=&quot;normal&quot;?this.icon.src=&quot;/images/fs/&quot;+this.flag+&quot;.png&quot;:this.icon.src=fileIcon;Element.addClassName(this.icon,&quot;icon&quot;);this.link.title=this.id;this.link.innerHTML=this.name;Element.addClassName(this.link,this.flag);Element.addClassName(this.link,&quot;link&quot;);this.date=document.createElement(&quot;span&quot;);this.date.innerHTML=this.fileDate;Element.addClassName(this.date,&quot;date&quot;);this.dl=document.createElement(&quot;a&quot;);this.dl.href=&quot;javascript:go()&quot;;this.dl.style.display=&quot;none&quot;;this.dl.title=&quot;Add &quot;+this.name+&quot; to the download queue&quot;;Element.addClassName(this.dl,&quot;add&quot;);this.del=document.createElement(&quot;a&quot;);this.del.href=&quot;javascript:go()&quot;;this.del.style.display=&quot;none&quot;;this.del.title=&quot;Delete &quot;+this.name;this.del.innerHTML=&quot;&amp;nbsp;&amp;nbsp;delete&quot;;Element.addClassName(this.del,&quot;del&quot;);this.span.onmousedown=this.select.bind(this);this.link.onmousedown=this.select.bindAsEventListener(this);this.icon.onmousedown=this.select.bind(this);this.link.ondblclick=this.download.bindAsEventListener(this);this.icon.ondblclick=this.download.bindAsEventListener(this);this.dl.onclick=this.addDl.bind(this);this.del.onclick=this.unlink.bind(this);this.handle.appendChild(this.icon);this.handle.appendChild(this.link);this.span.appendChild(this.handle);this.span.appendChild(this.date);if(!this.readonly){this.span.appendChild(this.del)}this.span.appendChild(this.dl);this.element.appendChild(this.span);this.search?this.element.id=&quot;sid&quot;+this.id:this.element.id=&quot;fid&quot;+this.id;this.element.object=this;Element.addClassName(this.element,&quot;file&quot;);this.parentElement.appendChild(this.element);!this.readonly?new Draggable(this.element.id,{revert:true,handle:&quot;handle&quot;}):null},appearTools:function(){Effect.Appear(this.del.id)},fadeTools:function(){this.del.style.display=&quot;none&quot;},addDl:function(){cart.add(this.element)},download:function(){location.href=FC.URL+&quot;?relay=getFile&amp;fileid=&quot;+this.id},refresh:function(){this.link.className=&quot;link&quot;;this.link.innerHTML=this.name;this.flag!=&quot;normal&quot;?this.icon.src=&quot;/images/fs/&quot;+this.flag+&quot;.png&quot;:this.icon.src=fileIcon;Element.addClassName(this.link,this.flag)},select:function(a){$(&quot;uploadPath&quot;).value=this.parentObject.path;$(&quot;uploadstatus&quot;).innerHTML=&quot;&lt;em&gt;Destination&lt;/em&gt; &lt;span id='dest'&gt;&quot;+this.parentObject.path+&quot;&lt;/span&gt;&quot;;this.del.style.display=this.dl.style.display=&quot;block&quot;;if(FC.SELECTEDOBJECT!=null&amp;&amp;FC.SELECTEDOBJECT!=this){FC.SELECTEDOBJECT.deselect()}window.onkeypress=this.select_handler.bindAsEventListener(this);FC.SELECTEDOBJECT=this;Element.addClassName(this.span,&quot;selected&quot;);if($(&quot;meta&quot;).prevElement!=this.id){this.getMeta()}return false},select_handler:function(b){var a=(b.charCode)?b.charCode:((b.which)?b.which:b.keyCode);if(a==Event.KEY_DOWN){this.parentObject.nextChild(this)}else{if(a==Event.KEY_UP){this.parentObject.prevChild(this)}else{if(a==Event.KEY_LEFT){this.parentObject.select(this)}}}},deselect:function(){this.timer=null;window.onkeypress=null;this.del.style.display=this.dl.style.display=&quot;none&quot;;Element.removeClassName(this.span,&quot;selected&quot;);this.selected=false;this.clearRename()},getMeta:function(){$(&quot;meta&quot;).prevElement=this.id;var a=new Date();var d=$H({relay:&quot;getMeta&quot;,fileid:this.id,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onLoading:showMetaSpinner(),onSuccess:this.getMeta_handler.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})},getMeta_handler:function(response){var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);var meta={edit:jsonObject.bindings[0].edit,filename:jsonObject.bindings[1].filename,date:jsonObject.bindings[1].date,downloads:jsonObject.bindings[1].downloads,flag:jsonObject.bindings[1].flags,type:jsonObject.bindings[1].type||&quot;Document&quot;,description:jsonObject.bindings[1].description,size:jsonObject.bindings[1].size,file:true,id:this.id,image:jsonObject.bindings[1].image,path:jsonObject.bindings[1].path,resolution:jsonObject.bindings[1].resolution};updateMeta(meta)},clear:function(){for(var a=0;a&lt;this.parentObject.children.length;a++){if(this.parentObject.children[a]==this){this.parentObject.children.splice(a,1);break}}Element.remove(this.element)},unlink:function(){if(this.readonly){return false}var a=new Date();var d=$H({relay:&quot;fileDelete&quot;,fileid:this.id,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onComplete:this.parentObject.nextChild(this),onSuccess:this.clear.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})},clearRename:function(){if(this.renameIsOpen){this.newName.style.display=&quot;none&quot;;Element.remove(this.newName);this.link.style.display=&quot;block&quot;;this.renameIsOpen=false;this.getMeta()}},rename_handler:function(d){var b=(d.charCode)?d.charCode:((d.which)?d.which:d.keyCode);if(b==Event.KEY_ESC){this.clearRename()}if(b==Event.KEY_RETURN){var a=new Date();var f=$H({relay:&quot;fileRename&quot;,fileid:this.id,filename:this.newName.value,random:a.getTime()});this.link.innerHTML=this.newName.value;this.name=this.newName.value;var e=new Ajax.Request(FC.URL,{onComplete:this.clearRename.bind(this),onSuccess:this.refresh.bind(this),method:&quot;get&quot;,parameters:f.toQueryString(),onFailure:function(){showError(ER.ajax)}})}},showRename:function(){if(this.readonly){return false}this.renameIsOpen=true;this.newName=document.createElement(&quot;input&quot;);this.newName.type=&quot;text&quot;;this.newName.size=&quot;40&quot;;this.newName.name=this.id;this.newName.value=this.name;window.onkeypress=this.rename_handler.bindAsEventListener(this);Element.addClassName(this.newName,&quot;renamefield&quot;);this.link.style.display=&quot;none&quot;;this.span.appendChild(this.newName);this.newName.focus();this.newName.select()},update:function(){this.parentObject.update()}};updateMeta=function(e){e=$H(e);$(&quot;meta&quot;).innerHTML=&quot;&quot;;var d=e.path.replace(&quot;/&quot;,&quot; /&quot;);if(e.file){var b=hotflag=emergencyflag=&quot;&quot;;switch(e.flag){case&quot;normal&quot;:b=&quot;selected&quot;;break;case&quot;hot&quot;:hotflag=&quot;selected&quot;;break;case&quot;emergency&quot;:emergencyflag=&quot;selected&quot;;break}var a='&lt;option label=&quot;Normal&quot; value=&quot;normal&quot; '+b+' &gt;Normal&lt;/option&gt;&lt;option label=&quot;Hot&quot; value=&quot;hot&quot; '+hotflag+' &gt;Hot&lt;/option&gt;&lt;option label=&quot;Emergency&quot; value=&quot;emergency&quot; '+emergencyflag+&quot;&gt;Emergency&lt;/option&gt;&quot;;if(e.image==&quot;1&quot;){$(&quot;meta&quot;).innerHTML+='&lt;div class=&quot;thumbbox&quot;&gt;&lt;a href=&quot;'+FC.URL+&quot;?relay=getFile&amp;fileid=&quot;+e.id+&quot;&amp;rand=&quot;+Math.random()+'&quot; &gt;&lt;img src=&quot;'+FC.URL+&quot;?relay=getThumb&amp;fileid=&quot;+e.id+&quot;&amp;rand=&quot;+Math.random()+'&quot; class=&quot;metaThumbnail&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;/admin/files/edit/'+e.id+'&quot; class=&quot;edit_me_img&quot;&gt;Edit Image&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align:center; padding:2px;&quot;&gt;'+e.resolution+&quot;&lt;/div&gt;&quot;}$(&quot;meta&quot;).innerHTML+=' &lt;table&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Name&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;filename&quot; onfocus=&quot;window.onkeypress=\'null\'&quot;; id=&quot;metaFilename&quot; value=&quot;'+e.filename+'&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Kind&lt;/td&gt;&lt;td&gt;'+e.type+'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Size&lt;/td&gt;&lt;td&gt;'+e.size+'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Date&lt;/td&gt;&lt;td&gt;'+e.date+'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Where&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;width:115px; overflow:hidden&quot;&gt;&lt;a href=&quot;/'+e.path+&quot;/&quot;+e.filename+'&quot;&gt;'+d+&quot; /&quot;+e.filename+'&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Flag&lt;/td&gt;&lt;td&gt;&lt;select id=&quot;metaFlag&quot; name=&quot;metaFlag&quot; id=&quot;metaFlag&quot;&gt;'+a+'&lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;textarea name=&quot;description&quot; onfocus=&quot;window.onkeypress=\'null\'&quot;; id=&quot;metaDesc&quot;&gt;'+e.description+'&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td class=&quot;l&quot;&gt;&lt;a href=&quot;#&quot; onclick=&quot;saveMeta(); return false&quot;&gt;&lt;img src=&quot;'+saveIcon+'&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;'}else{if(FC.SELECTEDOBJECT.virtual){$(&quot;meta&quot;).innerHTML='&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Name&lt;/td&gt;&lt;td&gt;'+e.name+'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Size&lt;/td&gt;&lt;td&gt;'+e.size+&quot;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;}else{$(&quot;meta&quot;).innerHTML='&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Name&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; id=&quot;folderMeta&quot; name=&quot;folderMeta&quot; value=&quot;'+e.name+'&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Kind&lt;/td&gt;&lt;td&gt;Folder&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Size&lt;/td&gt;&lt;td&gt;'+e.size+'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Location&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;width:115px; overflow:hidden&quot;&gt;'+d+'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Label&lt;/td&gt;&lt;td&gt;Normal&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;#&quot; onclick=&quot;saveMeta(); return false&quot;&gt;&lt;img src=&quot;'+saveIcon+'&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;'}}};rotate_image=function(e,d){var a=new Date();href=&quot;/admin/files/rotate/&quot;+e+&quot;?angle=&quot;+d+&quot;&amp;random_time=&quot;+a.getTime();var b=new Ajax.Request(href,{onComplete:FC.SELECTEDOBJECT.getMeta()});return false};resize_image=function(e,d){var a=new Date();href=&quot;/admin/files/resize/&quot;+e+&quot;?percent=&quot;+d+&quot;&amp;random_time=&quot;+a.getTime();var b=new Ajax.Request(href,{onComplete:FC.SELECTEDOBJECT.getMeta()});return false};saveMeta=function(){if(FC.SELECTEDOBJECT.type==&quot;directory&quot;){FC.SELECTEDOBJECT.rename_handler(&quot;&quot;,$(&quot;folderMeta&quot;).value);return false}var d=$(&quot;metaFilename&quot;).value;var e=$(&quot;metaFlag&quot;).options[$(&quot;metaFlag&quot;).selectedIndex].value;var b=$(&quot;metaDesc&quot;).value;FC.SELECTEDOBJECT.name=d;FC.SELECTEDOBJECT.flag=e;var a=new Date();var g=$H({relay:&quot;setMeta&quot;,fileid:FC.SELECTEDOBJECT.id,filename:d,description:b,flags:e,random:a.getTime()});var f=new Ajax.Request(FC.URL,{onComplete:function(){$(&quot;metaSave&quot;).style.display=&quot;block&quot;;Effect.Fade(&quot;metaSave&quot;,{duration:3})},onSuccess:FC.SELECTEDOBJECT.refresh.bind(FC.SELECTEDOBJECT),method:&quot;get&quot;,parameters:g.toQueryString(),onFailure:function(){showError(ER.ajax)}})};function showMetaSpinner(){$(&quot;meta&quot;).innerHTML='&lt;div style=&quot;border-bottom:0;&quot; class=&quot;thumbbox&quot;&gt;&lt;img src=&quot;'+spinnerIcon+'&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;'}function parsePath(d){var e=d.split(&quot;/&quot;);var b=$A(FC.SEARCHOBJ.children);var a=b.detect(function(g,f){if(g.name==e[1]){return true}else{return false}});if(e[2]){FC.NEXTPATH=d.replace(&quot;/&quot;+e[1],&quot;&quot;);if(a){if(a.open){FC.SEARCHOBJ.hideActivity();FC.SEARCHOBJ=a;parsePath(FC.NEXTPATH)}else{FC.SEARCHOBJ.hideActivity();a.update();FC.SEARCHOBJ=a}}else{FC.NEXTPATH=null;return showError(ER.parsePath)}}else{FC.SEARCHOBJ=null;FC.NEXTPATH=null;a.select()}}function getQuery(a){var b=window.location.search.substring(1);b=b.toQueryParams();if(b[a]){FC.NEXTPATH=decodeURIComponent(b[a]);FC.SEARCHOBJ=root}return true}function jumpTo(a){a=decodeURI(a);FC.SEARCHOBJ=root;FC.NEXTPATH=a;parsePath(a)}function go(){}function newFolder(){if(FC.SELECTEDOBJECT==null){return false}if(FC.SELECTEDOBJECT.type==&quot;file&quot;){c=FC.SELECTEDOBJECT.parentObject}else{c=FC.SELECTEDOBJECT}var e=&quot;Untitled Folder&quot;;FC.NEXTPATH=&quot;/&quot;+e;FC.SEARCHOBJ=c;var a=new Date();var d=$H({relay:&quot;newFolder&quot;,name:e,path:c.path,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onSuccess:setTimeout(&quot;c.update()&quot;,100),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})}uploadDestination=null;function uploadAuth(){if(QFiles.length==0){return false}if(!FC.SELECTEDOBJECT){return false}if(FC.SELECTEDOBJECT.type==&quot;file&quot;){uploadDestination=FC.SELECTEDOBJECT.parentObject}else{uploadDestination=FC.SELECTEDOBJECT}var a=new Date();var d=$H({relay:&quot;uploadAuth&quot;,path:uploadDestination.path,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onSuccess:uploadAuth_handler,method:&quot;post&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})}function uploadAuth_handler(response){var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);var auth=jsonObject.bindings[0];if(auth.auth==&quot;true&quot;){sendUpload(auth.sessionid)}else{showError(ER.upload)}}function sendUpload(b){var a=FC.UPLOADURL+&quot;?&quot;+b;$(&quot;uploadForm&quot;).action=a;$(&quot;uploadForm&quot;).submit();$(&quot;uploadSubmit&quot;).src=uploadCancel;$(&quot;uploadSubmit&quot;).onclick=uploadStop;Element.toggle(&quot;uploadAdd&quot;);$(&quot;pgfg&quot;).style.width=&quot;1px&quot;;Effect.Appear(&quot;progress&quot;);window.setTimeout(&quot;uploadStatus()&quot;,500)}function uploadStatus(){var a=new Date();var d=$H({relay:&quot;uploadSmart&quot;,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onSuccess:uploadStatus_handler,method:&quot;post&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})}uc=0;change=0;currentsize=0;destination=0;pginterval=2000;refresh=20;pgwidth=180;function uploadStatus_handler(response){var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);var progress=jsonObject.bindings[0];if(progress.done==&quot;false&quot;){window.setTimeout(&quot;uploadStatus()&quot;,1800);if(FC.PG){clearInterval(FC.PG)}var p=pgwidth*progress.percent;$(&quot;pgfg&quot;).style.width=p+&quot;px&quot;;currentsize=p;var pixels=progress.percentSec*pgwidth;change=pixels/refresh;destination=currentsize+pixels;FC.PG=setInterval(&quot;updatePgFg()&quot;,pginterval/refresh);$(&quot;pgsp&quot;).innerHTML=progress.speed;$(&quot;pgeta&quot;).innerHTML=progress.secondsLeft}else{uploadFinish()}}function updatePgFg(){if(currentsize&lt;destination){uc++;currentsize=currentsize+change;if(currentsize&lt;pgwidth){$(&quot;pgpc&quot;).innerHTML=parseInt((currentsize/pgwidth)*100)+&quot;%&quot;;$(&quot;pgfg&quot;).style.width=currentsize+&quot;px&quot;}}}function uploadFinish(a){change=0;currentsize=0;destination=0;clearInterval(FC.PG);if(a){$(&quot;pgpc&quot;).innerHTML=&quot;Canceled&quot;}else{$(&quot;pgpc&quot;).innerHTML=&quot;100%&quot;}$(&quot;uploadSubmit&quot;).src=uploadBtn;$(&quot;uploadSubmit&quot;).onclick=uploadAuth;Element.toggle(&quot;uploadAdd&quot;);$(&quot;pgfg&quot;).style.width=pgwidth+&quot;px&quot;;Effect.Fade(&quot;progress&quot;);uploadDestination.update();clearQ()}function uploadStop(){$(&quot;uploadiframe&quot;).src=&quot;about:blank&quot;;uploadFinish(true)}function unlink(){FC.SELECTEDOBJECT?FC.SELECTEDOBJECT.unlink():null}function download(){FC.SELECTEDOBJECT?(FC.SELECTEDOBJECT.type==&quot;file&quot;?FC.SELECTEDOBJECT.download():null):null}function updateAll(a){if(a.open&amp;&amp;a.type==&quot;directory&quot;){for(i in a.children){updateAll(a.children[i])}a.update()}}function openAll(){FC.SHOWALL=true;root.clearContents();root.getContents();return false}function closeAll(){FC.SHOWALL=false;root.clearContents();root.getContents();return false}QFiles=new Array();function getRandom(){return Math.round(Math.random()*1000)}function clearQ(){for(var a=0;a&lt;QFiles.length;a++){QFiles[a].remove()}Effect.Fade(&quot;uploadSubmit&quot;);$(&quot;uploadQ&quot;).style.height=&quot;28px&quot;;QFiles=new Array()}var Cart=Class.create();Cart.prototype={initialize:function(){this.element=$(&quot;cart&quot;);this.children=new Array();this.confirm=$(&quot;emailconfirm&quot;);Droppables.add(&quot;cart&quot;,{accept:&quot;file&quot;,hoverclass:&quot;hover&quot;,onDrop:this.add.bind(this)})},add:function(d){var a=d.object.name;var e=d.object.id;for(var b=0;b&lt;this.children.length;b++){if(e==this.children[b]){return false}}row=document.createElement(&quot;div&quot;);row.id=&quot;c&quot;+e;row.innerHTML=&quot;&lt;div&gt;&quot;+a+&quot;&lt;/div&gt;&quot;;row.innerHTML+='&lt;a href=&quot;#&quot; onclick=&quot;cart.remove(\''+e+'\'); return false&quot; class=&quot;remove&quot;&gt;&lt;/a&gt;';this.element.appendChild(row);this.children[this.children.length]=e},addSpecial:function(b,d){var a={object:{name:d,id:b}};cart.add(a)},remove:function(b){for(var a=0;a&lt;this.children.length;a++){if(b==this.children[a]){this.children.splice(a,1);Element.remove(&quot;c&quot;+b);break}}},download:function(){if(this.children.length==0&amp;&amp;FC.SELECTEDOBJECT==null){return false}if(this.children.length==0&amp;&amp;FC.SELECTEDOBJECT){FC.SELECTEDOBJECT.download();return false}var b=&quot;&quot;;for(var a=0;a&lt;this.children.length;a++){if(this.children[a]!=&quot;&quot;){b+=this.children[a];if(a!=this.children.length-1){b+=&quot;,&quot;}}}for(var a=0;a&lt;this.children.length;a++){Element.remove(&quot;c&quot;+this.children[a])}this.children=new Array();if($(&quot;emailFormTo&quot;).value!=&quot;&quot;&amp;&amp;$(&quot;emailFormTo&quot;).value!=&quot;Type email address&quot;){this.email(b)}else{location.href=FC.URL+&quot;?relay=getFilePackage&amp;fileid=&quot;+b}},email:function(d){var a=new Date();var e=$H({relay:&quot;emailFilePackage&quot;,to:$(&quot;emailFormTo&quot;).value,from:$(&quot;emailFormFrom&quot;).value,message:$(&quot;emailFormMessage&quot;).value,fileid:d,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onSuccess:this.email_handler.bind(this),method:&quot;get&quot;,parameters:e.toQueryString()})},email_handler:function(){this.hideEmail();Effect.Appear(this.confirm);setTimeout(&quot;Effect.Fade('emailconfirm');&quot;,2000)},showEmail:function(){Effect.Appear(&quot;emailform&quot;)},hideEmail:function(){Effect.Fade(&quot;emailform&quot;)}};var ER={auth:'You don\'t have authorization to use this app. Please try &lt;a href=&quot;login.htm&quot;&gt;logging in&lt;/a&gt; again',ajax:&quot;Unable to make a connection to the server&quot;,upload:&quot;Can't upload to this folder. You may not have write privileges&quot;,download:&quot;Your download cart is empty&quot;,parsePath:&quot;The file you are looking for is not there&quot;};showError=function(a){$(&quot;error&quot;).innerHTML=&quot;&lt;p&gt;&quot;+a+'&lt;/p&gt;&lt;a href=&quot;#&quot; class=&quot;close&quot; onclick=&quot;Effect.toggle(\'error\', \'appear\'); return false&quot; /&gt;close&lt;/a&gt;';Effect.Appear(&quot;error&quot;);return false};showLogin=function(){$(&quot;login&quot;).style.display=&quot;block&quot;};function submitenter(d,b){var a;if(window.event){a=window.event.keyCode}else{if(b){a=b.which}else{return true}}if(a==13){userLogin();return false}else{return true}}search=null;cart=null;root=null;windowLoader=function(){search=new Search(&quot;searcharea&quot;);root=new Directory(&quot;&quot;,&quot;&quot;,false,$(&quot;fileList&quot;));root.getContents();getQuery(&quot;path&quot;);setInterval(&quot;updateAll(root)&quot;,60000)};window.onload=windowLoader;
\ No newline at end of file
+var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(a){this.initSWFUpload(a)}}SWFUpload.prototype.initSWFUpload=function(b){try{this.customSettings={};this.settings=b;this.eventQueue=[];this.movieName=&quot;SWFUpload_&quot;+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(a){delete SWFUpload.instances[this.movieName];throw a}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version=&quot;2.2.0 2009-03-25&quot;;SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:&quot;window&quot;,TRANSPARENT:&quot;transparent&quot;,OPAQUE:&quot;opaque&quot;};SWFUpload.completeURL=function(a){if(typeof(a)!==&quot;string&quot;||a.match(/^https?:\/\//i)||a.match(/^\//)){return a}var d=window.location.protocol+&quot;//&quot;+window.location.hostname+(window.location.port?&quot;:&quot;+window.location.port:&quot;&quot;);var b=window.location.pathname.lastIndexOf(&quot;/&quot;);if(b&lt;=0){path=&quot;/&quot;}else{path=window.location.pathname.substr(0,b)+&quot;/&quot;}return path+a};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(b,a){this.settings[b]=(this.settings[b]==undefined)?a:this.settings[b]};this.ensureDefault(&quot;upload_url&quot;,&quot;&quot;);this.ensureDefault(&quot;preserve_relative_urls&quot;,false);this.ensureDefault(&quot;file_post_name&quot;,&quot;Filedata&quot;);this.ensureDefault(&quot;post_params&quot;,{});this.ensureDefault(&quot;use_query_string&quot;,false);this.ensureDefault(&quot;requeue_on_error&quot;,false);this.ensureDefault(&quot;http_success&quot;,[]);this.ensureDefault(&quot;assume_success_timeout&quot;,0);this.ensureDefault(&quot;file_types&quot;,&quot;*.*&quot;);this.ensureDefault(&quot;file_types_description&quot;,&quot;All Files&quot;);this.ensureDefault(&quot;file_size_limit&quot;,0);this.ensureDefault(&quot;file_upload_limit&quot;,0);this.ensureDefault(&quot;file_queue_limit&quot;,0);this.ensureDefault(&quot;flash_url&quot;,&quot;swfupload.swf&quot;);this.ensureDefault(&quot;prevent_swf_caching&quot;,true);this.ensureDefault(&quot;button_image_url&quot;,&quot;&quot;);this.ensureDefault(&quot;button_width&quot;,1);this.ensureDefault(&quot;button_height&quot;,1);this.ensureDefault(&quot;button_text&quot;,&quot;&quot;);this.ensureDefault(&quot;button_text_style&quot;,&quot;color: #000000; font-size: 16pt;&quot;);this.ensureDefault(&quot;button_text_top_padding&quot;,0);this.ensureDefault(&quot;button_text_left_padding&quot;,0);this.ensureDefault(&quot;button_action&quot;,SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault(&quot;button_disabled&quot;,false);this.ensureDefault(&quot;button_placeholder_id&quot;,&quot;&quot;);this.ensureDefault(&quot;button_placeholder&quot;,null);this.ensureDefault(&quot;button_cursor&quot;,SWFUpload.CURSOR.ARROW);this.ensureDefault(&quot;button_window_mode&quot;,SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault(&quot;debug&quot;,false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault(&quot;swfupload_loaded_handler&quot;,null);this.ensureDefault(&quot;file_dialog_start_handler&quot;,null);this.ensureDefault(&quot;file_queued_handler&quot;,null);this.ensureDefault(&quot;file_queue_error_handler&quot;,null);this.ensureDefault(&quot;file_dialog_complete_handler&quot;,null);this.ensureDefault(&quot;upload_start_handler&quot;,null);this.ensureDefault(&quot;upload_progress_handler&quot;,null);this.ensureDefault(&quot;upload_error_handler&quot;,null);this.ensureDefault(&quot;upload_success_handler&quot;,null);this.ensureDefault(&quot;upload_complete_handler&quot;,null);this.ensureDefault(&quot;debug_handler&quot;,this.debugMessage);this.ensureDefault(&quot;custom_settings&quot;,{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf(&quot;?&quot;)&lt;0?&quot;?&quot;:&quot;&amp;&quot;)+&quot;preventswfcaching=&quot;+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var a,b;if(document.getElementById(this.movieName)!==null){throw&quot;ID &quot;+this.movieName+&quot; is already in use. The Flash Object could not be added&quot;}a=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(a==undefined){throw&quot;Could not find the placeholder element: &quot;+this.settings.button_placeholder_id}b=document.createElement(&quot;div&quot;);b.innerHTML=this.getFlashHTML();a.parentNode.replaceChild(b.firstChild,a);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['&lt;object id=&quot;',this.movieName,'&quot; type=&quot;application/x-shockwave-flash&quot; data=&quot;',this.settings.flash_url,'&quot; width=&quot;',this.settings.button_width,'&quot; height=&quot;',this.settings.button_height,'&quot; class=&quot;swfupload&quot;&gt;','&lt;param name=&quot;wmode&quot; value=&quot;',this.settings.button_window_mode,'&quot; /&gt;','&lt;param name=&quot;movie&quot; value=&quot;',this.settings.flash_url,'&quot; /&gt;','&lt;param name=&quot;quality&quot; value=&quot;high&quot; /&gt;','&lt;param name=&quot;menu&quot; value=&quot;false&quot; /&gt;','&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;','&lt;param name=&quot;flashvars&quot; value=&quot;'+this.getFlashVars()+'&quot; /&gt;',&quot;&lt;/object&gt;&quot;].join(&quot;&quot;)};SWFUpload.prototype.getFlashVars=function(){var b=this.buildParamString();var a=this.settings.http_success.join(&quot;,&quot;);return[&quot;movieName=&quot;,encodeURIComponent(this.movieName),&quot;&amp;amp;uploadURL=&quot;,encodeURIComponent(this.settings.upload_url),&quot;&amp;amp;useQueryString=&quot;,encodeURIComponent(this.settings.use_query_string),&quot;&amp;amp;requeueOnError=&quot;,encodeURIComponent(this.settings.requeue_on_error),&quot;&amp;amp;httpSuccess=&quot;,encodeURIComponent(a),&quot;&amp;amp;assumeSuccessTimeout=&quot;,encodeURIComponent(this.settings.assume_success_timeout),&quot;&amp;amp;params=&quot;,encodeURIComponent(b),&quot;&amp;amp;filePostName=&quot;,encodeURIComponent(this.settings.file_post_name),&quot;&amp;amp;fileTypes=&quot;,encodeURIComponent(this.settings.file_types),&quot;&amp;amp;fileTypesDescription=&quot;,encodeURIComponent(this.settings.file_types_description),&quot;&amp;amp;fileSizeLimit=&quot;,encodeURIComponent(this.settings.file_size_limit),&quot;&amp;amp;fileUploadLimit=&quot;,encodeURIComponent(this.settings.file_upload_limit),&quot;&amp;amp;fileQueueLimit=&quot;,encodeURIComponent(this.settings.file_queue_limit),&quot;&amp;amp;debugEnabled=&quot;,encodeURIComponent(this.settings.debug_enabled),&quot;&amp;amp;buttonImageURL=&quot;,encodeURIComponent(this.settings.button_image_url),&quot;&amp;amp;buttonWidth=&quot;,encodeURIComponent(this.settings.button_width),&quot;&amp;amp;buttonHeight=&quot;,encodeURIComponent(this.settings.button_height),&quot;&amp;amp;buttonText=&quot;,encodeURIComponent(this.settings.button_text),&quot;&amp;amp;buttonTextTopPadding=&quot;,encodeURIComponent(this.settings.button_text_top_padding),&quot;&amp;amp;buttonTextLeftPadding=&quot;,encodeURIComponent(this.settings.button_text_left_padding),&quot;&amp;amp;buttonTextStyle=&quot;,encodeURIComponent(this.settings.button_text_style),&quot;&amp;amp;buttonAction=&quot;,encodeURIComponent(this.settings.button_action),&quot;&amp;amp;buttonDisabled=&quot;,encodeURIComponent(this.settings.button_disabled),&quot;&amp;amp;buttonCursor=&quot;,encodeURIComponent(this.settings.button_cursor)].join(&quot;&quot;)};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw&quot;Could not find Flash element&quot;}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var d=this.settings.post_params;var b=[];if(typeof(d)===&quot;object&quot;){for(var a in d){if(d.hasOwnProperty(a)){b.push(encodeURIComponent(a.toString())+&quot;=&quot;+encodeURIComponent(d[a].toString()))}}}return b.join(&quot;&amp;amp;&quot;)};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var a=null;a=this.getMovieElement();if(a&amp;&amp;typeof(a.CallFunction)===&quot;unknown&quot;){for(var d in a){try{if(typeof(a[d])===&quot;function&quot;){a[d]=null}}catch(f){}}try{a.parentNode.removeChild(a)}catch(b){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(e){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug([&quot;---SWFUpload Instance Info---\n&quot;,&quot;Version: &quot;,SWFUpload.version,&quot;\n&quot;,&quot;Movie Name: &quot;,this.movieName,&quot;\n&quot;,&quot;Settings:\n&quot;,&quot;\t&quot;,&quot;upload_url:               &quot;,this.settings.upload_url,&quot;\n&quot;,&quot;\t&quot;,&quot;flash_url:                &quot;,this.settings.flash_url,&quot;\n&quot;,&quot;\t&quot;,&quot;use_query_string:         &quot;,this.settings.use_query_string.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;requeue_on_error:         &quot;,this.settings.requeue_on_error.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;http_success:             &quot;,this.settings.http_success.join(&quot;, &quot;),&quot;\n&quot;,&quot;\t&quot;,&quot;assume_success_timeout:   &quot;,this.settings.assume_success_timeout,&quot;\n&quot;,&quot;\t&quot;,&quot;file_post_name:           &quot;,this.settings.file_post_name,&quot;\n&quot;,&quot;\t&quot;,&quot;post_params:              &quot;,this.settings.post_params.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_types:               &quot;,this.settings.file_types,&quot;\n&quot;,&quot;\t&quot;,&quot;file_types_description:   &quot;,this.settings.file_types_description,&quot;\n&quot;,&quot;\t&quot;,&quot;file_size_limit:          &quot;,this.settings.file_size_limit,&quot;\n&quot;,&quot;\t&quot;,&quot;file_upload_limit:        &quot;,this.settings.file_upload_limit,&quot;\n&quot;,&quot;\t&quot;,&quot;file_queue_limit:         &quot;,this.settings.file_queue_limit,&quot;\n&quot;,&quot;\t&quot;,&quot;debug:                    &quot;,this.settings.debug.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;prevent_swf_caching:      &quot;,this.settings.prevent_swf_caching.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_placeholder_id:    &quot;,this.settings.button_placeholder_id.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_placeholder:       &quot;,(this.settings.button_placeholder?&quot;Set&quot;:&quot;Not Set&quot;),&quot;\n&quot;,&quot;\t&quot;,&quot;button_image_url:         &quot;,this.settings.button_image_url.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_width:             &quot;,this.settings.button_width.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_height:            &quot;,this.settings.button_height.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text:              &quot;,this.settings.button_text.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text_style:        &quot;,this.settings.button_text_style.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text_top_padding:  &quot;,this.settings.button_text_top_padding.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text_left_padding: &quot;,this.settings.button_text_left_padding.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_action:            &quot;,this.settings.button_action.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_disabled:          &quot;,this.settings.button_disabled.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;custom_settings:          &quot;,this.settings.custom_settings.toString(),&quot;\n&quot;,&quot;Event Handlers:\n&quot;,&quot;\t&quot;,&quot;swfupload_loaded_handler assigned:  &quot;,(typeof this.settings.swfupload_loaded_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_dialog_start_handler assigned: &quot;,(typeof this.settings.file_dialog_start_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_queued_handler assigned:       &quot;,(typeof this.settings.file_queued_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_queue_error_handler assigned:  &quot;,(typeof this.settings.file_queue_error_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_start_handler assigned:      &quot;,(typeof this.settings.upload_start_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_progress_handler assigned:   &quot;,(typeof this.settings.upload_progress_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_error_handler assigned:      &quot;,(typeof this.settings.upload_error_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_success_handler assigned:    &quot;,(typeof this.settings.upload_success_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_complete_handler assigned:   &quot;,(typeof this.settings.upload_complete_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;debug_handler assigned:             &quot;,(typeof this.settings.debug_handler===&quot;function&quot;).toString(),&quot;\n&quot;].join(&quot;&quot;))};SWFUpload.prototype.addSetting=function(b,d,a){if(d==undefined){return(this.settings[b]=a)}else{return(this.settings[b]=d)}};SWFUpload.prototype.getSetting=function(a){if(this.settings[a]!=undefined){return this.settings[a]}return&quot;&quot;};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('&lt;invoke name=&quot;'+functionName+'&quot; returntype=&quot;javascript&quot;&gt;'+__flash__argumentsToXML(argumentArray,0)+&quot;&lt;/invoke&gt;&quot;);returnValue=eval(returnString)}catch(ex){throw&quot;Call to &quot;+functionName+&quot; failed&quot;}if(returnValue!=undefined&amp;&amp;typeof returnValue.post===&quot;object&quot;){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash(&quot;SelectFile&quot;)};SWFUpload.prototype.selectFiles=function(){this.callFlash(&quot;SelectFiles&quot;)};SWFUpload.prototype.startUpload=function(a){this.callFlash(&quot;StartUpload&quot;,[a])};SWFUpload.prototype.cancelUpload=function(a,b){if(b!==false){b=true}this.callFlash(&quot;CancelUpload&quot;,[a,b])};SWFUpload.prototype.stopUpload=function(){this.callFlash(&quot;StopUpload&quot;)};SWFUpload.prototype.getStats=function(){return this.callFlash(&quot;GetStats&quot;)};SWFUpload.prototype.setStats=function(a){this.callFlash(&quot;SetStats&quot;,[a])};SWFUpload.prototype.getFile=function(a){if(typeof(a)===&quot;number&quot;){return this.callFlash(&quot;GetFileByIndex&quot;,[a])}else{return this.callFlash(&quot;GetFile&quot;,[a])}};SWFUpload.prototype.addFileParam=function(a,b,d){return this.callFlash(&quot;AddFileParam&quot;,[a,b,d])};SWFUpload.prototype.removeFileParam=function(a,b){this.callFlash(&quot;RemoveFileParam&quot;,[a,b])};SWFUpload.prototype.setUploadURL=function(a){this.settings.upload_url=a.toString();this.callFlash(&quot;SetUploadURL&quot;,[a])};SWFUpload.prototype.setPostParams=function(a){this.settings.post_params=a;this.callFlash(&quot;SetPostParams&quot;,[a])};SWFUpload.prototype.addPostParam=function(a,b){this.settings.post_params[a]=b;this.callFlash(&quot;SetPostParams&quot;,[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(a){delete this.settings.post_params[a];this.callFlash(&quot;SetPostParams&quot;,[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(a,b){this.settings.file_types=a;this.settings.file_types_description=b;this.callFlash(&quot;SetFileTypes&quot;,[a,b])};SWFUpload.prototype.setFileSizeLimit=function(a){this.settings.file_size_limit=a;this.callFlash(&quot;SetFileSizeLimit&quot;,[a])};SWFUpload.prototype.setFileUploadLimit=function(a){this.settings.file_upload_limit=a;this.callFlash(&quot;SetFileUploadLimit&quot;,[a])};SWFUpload.prototype.setFileQueueLimit=function(a){this.settings.file_queue_limit=a;this.callFlash(&quot;SetFileQueueLimit&quot;,[a])};SWFUpload.prototype.setFilePostName=function(a){this.settings.file_post_name=a;this.callFlash(&quot;SetFilePostName&quot;,[a])};SWFUpload.prototype.setUseQueryString=function(a){this.settings.use_query_string=a;this.callFlash(&quot;SetUseQueryString&quot;,[a])};SWFUpload.prototype.setRequeueOnError=function(a){this.settings.requeue_on_error=a;this.callFlash(&quot;SetRequeueOnError&quot;,[a])};SWFUpload.prototype.setHTTPSuccess=function(a){if(typeof a===&quot;string&quot;){a=a.replace(&quot; &quot;,&quot;&quot;).split(&quot;,&quot;)}this.settings.http_success=a;this.callFlash(&quot;SetHTTPSuccess&quot;,[a])};SWFUpload.prototype.setAssumeSuccessTimeout=function(a){this.settings.assume_success_timeout=a;this.callFlash(&quot;SetAssumeSuccessTimeout&quot;,[a])};SWFUpload.prototype.setDebugEnabled=function(a){this.settings.debug_enabled=a;this.callFlash(&quot;SetDebugEnabled&quot;,[a])};SWFUpload.prototype.setButtonImageURL=function(a){if(a==undefined){a=&quot;&quot;}this.settings.button_image_url=a;this.callFlash(&quot;SetButtonImageURL&quot;,[a])};SWFUpload.prototype.setButtonDimensions=function(d,a){this.settings.button_width=d;this.settings.button_height=a;var b=this.getMovieElement();if(b!=undefined){b.style.width=d+&quot;px&quot;;b.style.height=a+&quot;px&quot;}this.callFlash(&quot;SetButtonDimensions&quot;,[d,a])};SWFUpload.prototype.setButtonText=function(a){this.settings.button_text=a;this.callFlash(&quot;SetButtonText&quot;,[a])};SWFUpload.prototype.setButtonTextPadding=function(b,a){this.settings.button_text_top_padding=a;this.settings.button_text_left_padding=b;this.callFlash(&quot;SetButtonTextPadding&quot;,[b,a])};SWFUpload.prototype.setButtonTextStyle=function(a){this.settings.button_text_style=a;this.callFlash(&quot;SetButtonTextStyle&quot;,[a])};SWFUpload.prototype.setButtonDisabled=function(a){this.settings.button_disabled=a;this.callFlash(&quot;SetButtonDisabled&quot;,[a])};SWFUpload.prototype.setButtonAction=function(a){this.settings.button_action=a;this.callFlash(&quot;SetButtonAction&quot;,[a])};SWFUpload.prototype.setButtonCursor=function(a){this.settings.button_cursor=a;this.callFlash(&quot;SetButtonCursor&quot;,[a])};SWFUpload.prototype.queueEvent=function(b,d){if(d==undefined){d=[]}else{if(!(d instanceof Array)){d=[d]}}var a=this;if(typeof this.settings[b]===&quot;function&quot;){this.eventQueue.push(function(){this.settings[b].apply(this,d)});setTimeout(function(){a.executeNextEvent()},0)}else{if(this.settings[b]!==null){throw&quot;Event handler &quot;+b+&quot; is unknown or is not a function&quot;}}};SWFUpload.prototype.executeNextEvent=function(){var a=this.eventQueue?this.eventQueue.shift():null;if(typeof(a)===&quot;function&quot;){a.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(d){var f=/[$]([0-9a-f]{4})/i;var g={};var e;if(d!=undefined){for(var a in d.post){if(d.post.hasOwnProperty(a)){e=a;var b;while((b=f.exec(e))!==null){e=e.replace(b[0],String.fromCharCode(parseInt(&quot;0x&quot;+b[1],16)))}g[e]=d.post[a]}}d.post=g}return d};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash(&quot;TestExternalInterface&quot;)}catch(a){return false}};SWFUpload.prototype.flashReady=function(){var a=this.getMovieElement();if(!a){this.debug(&quot;Flash called back ready but the flash movie can't be found.&quot;);return}this.cleanUp(a);this.queueEvent(&quot;swfupload_loaded_handler&quot;)};SWFUpload.prototype.cleanUp=function(a){try{if(this.movieElement&amp;&amp;typeof(a.CallFunction)===&quot;unknown&quot;){this.debug(&quot;Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)&quot;);for(var d in a){try{if(typeof(a[d])===&quot;function&quot;){a[d]=null}}catch(b){}}}}catch(e){}window.__flash__removeCallback=function(f,g){try{if(f){f[g]=null}}catch(h){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent(&quot;file_dialog_start_handler&quot;)};SWFUpload.prototype.fileQueued=function(a){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;file_queued_handler&quot;,a)};SWFUpload.prototype.fileQueueError=function(a,d,b){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;file_queue_error_handler&quot;,[a,d,b])};SWFUpload.prototype.fileDialogComplete=function(b,d,a){this.queueEvent(&quot;file_dialog_complete_handler&quot;,[b,d,a])};SWFUpload.prototype.uploadStart=function(a){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;return_upload_start_handler&quot;,a)};SWFUpload.prototype.returnUploadStart=function(a){var b;if(typeof this.settings.upload_start_handler===&quot;function&quot;){a=this.unescapeFilePostParams(a);b=this.settings.upload_start_handler.call(this,a)}else{if(this.settings.upload_start_handler!=undefined){throw&quot;upload_start_handler must be a function&quot;}}if(b===undefined){b=true}b=!!b;this.callFlash(&quot;ReturnUploadStart&quot;,[b])};SWFUpload.prototype.uploadProgress=function(a,d,b){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;upload_progress_handler&quot;,[a,d,b])};SWFUpload.prototype.uploadError=function(a,d,b){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;upload_error_handler&quot;,[a,d,b])};SWFUpload.prototype.uploadSuccess=function(b,a,d){b=this.unescapeFilePostParams(b);this.queueEvent(&quot;upload_success_handler&quot;,[b,a,d])};SWFUpload.prototype.uploadComplete=function(a){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;upload_complete_handler&quot;,a)};SWFUpload.prototype.debug=function(a){this.queueEvent(&quot;debug_handler&quot;,a)};SWFUpload.prototype.debugMessage=function(d){if(this.settings.debug){var a,e=[];if(typeof d===&quot;object&quot;&amp;&amp;typeof d.name===&quot;string&quot;&amp;&amp;typeof d.message===&quot;string&quot;){for(var b in d){if(d.hasOwnProperty(b)){e.push(b+&quot;: &quot;+d[b])}}a=e.join(&quot;\n&quot;)||&quot;&quot;;e=a.split(&quot;\n&quot;);a=&quot;EXCEPTION: &quot;+e.join(&quot;\nEXCEPTION: &quot;);SWFUpload.Console.writeLine(a)}else{SWFUpload.Console.writeLine(d)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(e){var b,a;try{b=document.getElementById(&quot;SWFUpload_Console&quot;);if(!b){a=document.createElement(&quot;form&quot;);document.getElementsByTagName(&quot;body&quot;)[0].appendChild(a);b=document.createElement(&quot;textarea&quot;);b.id=&quot;SWFUpload_Console&quot;;b.style.fontFamily=&quot;monospace&quot;;b.setAttribute(&quot;wrap&quot;,&quot;off&quot;);b.wrap=&quot;off&quot;;b.style.overflow=&quot;auto&quot;;b.style.width=&quot;700px&quot;;b.style.height=&quot;350px&quot;;b.style.margin=&quot;5px&quot;;a.appendChild(b)}b.value+=e+&quot;\n&quot;;b.scrollTop=b.scrollHeight-b.clientHeight}catch(d){alert(&quot;Exception: &quot;+d.name+&quot; Message: &quot;+d.message)}};var SWFUpload;if(typeof(SWFUpload)===&quot;function&quot;){SWFUpload.queue={};SWFUpload.prototype.initSettings=(function(a){return function(){if(typeof(a)===&quot;function&quot;){a.call(this)}this.customSettings.queue_cancelled_flag=false;this.customSettings.queue_upload_count=0;this.settings.user_upload_complete_handler=this.settings.upload_complete_handler;this.settings.upload_complete_handler=SWFUpload.queue.uploadCompleteHandler;this.settings.queue_complete_handler=this.settings.queue_complete_handler||null}})(SWFUpload.prototype.initSettings);SWFUpload.prototype.startUpload=function(a){this.customSettings.queue_cancelled_flag=false;this.callFlash(&quot;StartUpload&quot;,false,[a])};SWFUpload.prototype.cancelQueue=function(){this.customSettings.queue_cancelled_flag=true;this.stopUpload();var a=this.getStats();while(a.files_queued&gt;0){this.cancelUpload();a=this.getStats()}};SWFUpload.queue.uploadCompleteHandler=function(b){var d=this.settings.user_upload_complete_handler;var e;if(b.filestatus===SWFUpload.FILE_STATUS.COMPLETE){this.customSettings.queue_upload_count++}if(typeof(d)===&quot;function&quot;){e=(d.call(this,b)===false)?false:true}else{e=true}if(e){var a=this.getStats();if(a.files_queued&gt;0&amp;&amp;this.customSettings.queue_cancelled_flag===false){this.startUpload()}else{if(this.customSettings.queue_cancelled_flag===false){this.queueEvent(&quot;queue_complete_handler&quot;,[this.customSettings.queue_upload_count]);this.customSettings.queue_upload_count=0}else{this.customSettings.queue_cancelled_flag=false;this.customSettings.queue_upload_count=0}}}}}function FileProgress(d,a){this.fileProgressID=d.id;this.opacity=100;this.height=0;this.fileProgressWrapper=document.getElementById(this.fileProgressID);if(!this.fileProgressWrapper){this.fileProgressWrapper=document.createElement(&quot;div&quot;);this.fileProgressWrapper.className=&quot;progressWrapper&quot;;this.fileProgressWrapper.id=this.fileProgressID;this.fileProgressElement=document.createElement(&quot;div&quot;);this.fileProgressElement.className=&quot;progressContainer&quot;;var g=document.createElement(&quot;a&quot;);g.className=&quot;progressCancel&quot;;g.href=&quot;#&quot;;g.style.visibility=&quot;hidden&quot;;g.appendChild(document.createTextNode(&quot; &quot;));var b=document.createElement(&quot;div&quot;);b.className=&quot;progressName&quot;;b.appendChild(document.createTextNode(d.name));var f=document.createElement(&quot;div&quot;);f.className=&quot;progressBarInProgress&quot;;var e=document.createElement(&quot;div&quot;);e.className=&quot;progressBarStatus&quot;;e.innerHTML=&quot;&amp;nbsp;&quot;;this.fileProgressElement.appendChild(g);this.fileProgressElement.appendChild(b);this.fileProgressElement.appendChild(e);this.fileProgressElement.appendChild(f);this.fileProgressWrapper.appendChild(this.fileProgressElement);document.getElementById(a).appendChild(this.fileProgressWrapper)}else{this.fileProgressElement=this.fileProgressWrapper.firstChild}this.height=this.fileProgressWrapper.offsetHeight}FileProgress.prototype.setProgress=function(a){this.fileProgressElement.className=&quot;progressContainer green&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarInProgress&quot;;this.fileProgressElement.childNodes[3].style.width=a+&quot;%&quot;};FileProgress.prototype.setComplete=function(){this.fileProgressElement.className=&quot;progressContainer blue&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarComplete&quot;;this.fileProgressElement.childNodes[3].style.width=&quot;&quot;;var a=this;setTimeout(function(){a.disappear()},10000)};FileProgress.prototype.setError=function(){this.fileProgressElement.className=&quot;progressContainer red&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarError&quot;;this.fileProgressElement.childNodes[3].style.width=&quot;&quot;;var a=this;setTimeout(function(){a.disappear()},5000)};FileProgress.prototype.setCancelled=function(){this.fileProgressElement.className=&quot;progressContainer&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarError&quot;;this.fileProgressElement.childNodes[3].style.width=&quot;&quot;;var a=this;setTimeout(function(){a.disappear()},2000)};FileProgress.prototype.setStatus=function(a){this.fileProgressElement.childNodes[2].innerHTML=a};FileProgress.prototype.toggleCancel=function(b,d){this.fileProgressElement.childNodes[0].style.visibility=b?&quot;visible&quot;:&quot;hidden&quot;;if(d){var a=this.fileProgressID;this.fileProgressElement.childNodes[0].onclick=function(){d.cancelUpload(a);return false}}};FileProgress.prototype.disappear=function(){var g=15;var d=4;var b=30;if(this.opacity&gt;0){this.opacity-=g;if(this.opacity&lt;0){this.opacity=0}if(this.fileProgressWrapper.filters){try{this.fileProgressWrapper.filters.item(&quot;DXImageTransform.Microsoft.Alpha&quot;).opacity=this.opacity}catch(f){this.fileProgressWrapper.style.filter=&quot;progid:DXImageTransform.Microsoft.Alpha(opacity=&quot;+this.opacity+&quot;)&quot;}}else{this.fileProgressWrapper.style.opacity=this.opacity/100}}if(this.height&gt;0){this.height-=d;if(this.height&lt;0){this.height=0}this.fileProgressWrapper.style.height=this.height+&quot;px&quot;}if(this.height&gt;0||this.opacity&gt;0){var a=this;setTimeout(function(){a.disappear()},b)}else{this.fileProgressWrapper.style.display=&quot;none&quot;}};function fileQueued(d){try{var a=new FileProgress(d,this.customSettings.progressTarget);a.setStatus(&quot;Pending...&quot;);a.toggleCancel(true,this)}catch(b){this.debug(b)}}function fileQueueError(d,f,e){try{if(f===SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){alert(&quot;You have attempted to queue too many files.\n&quot;+(e===0?&quot;You have reached the upload limit.&quot;:&quot;You may select &quot;+(e&gt;1?&quot;up to &quot;+e+&quot; files.&quot;:&quot;one file.&quot;)));return}var a=new FileProgress(d,this.customSettings.progressTarget);a.setError();a.toggleCancel(false);switch(f){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:a.setStatus(&quot;File is too big.&quot;);this.debug(&quot;Error Code: File too big, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:a.setStatus(&quot;Cannot upload Zero Byte files.&quot;);this.debug(&quot;Error Code: Zero byte file, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:a.setStatus(&quot;Invalid File Type.&quot;);this.debug(&quot;Error Code: Invalid File Type, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;default:if(d!==null){a.setStatus(&quot;Unhandled Error&quot;)}this.debug(&quot;Error Code: &quot;+f+&quot;, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break}}catch(b){this.debug(b)}}function fileDialogComplete(a,d){try{if(a&gt;0){document.getElementById(this.customSettings.cancelButtonId).disabled=false}}catch(b){this.debug(b)}}function uploadStart(d){try{var a=new FileProgress(d,this.customSettings.progressTarget);a.setStatus(&quot;Uploading...&quot;);a.toggleCancel(true,this)}catch(b){}return true}function uploadProgress(d,g,f){try{var e=Math.ceil((g/f)*100);var a=new FileProgress(d,this.customSettings.progressTarget);a.setProgress(e);a.setStatus(&quot;Uploading...&quot;)}catch(b){this.debug(b)}}function uploadSuccess(e,b){try{var a=new FileProgress(e,this.customSettings.progressTarget);a.setComplete();a.setStatus(&quot;Complete.&quot;);a.toggleCancel(false)}catch(d){this.debug(d)}}function uploadError(d,f,e){try{var a=new FileProgress(d,this.customSettings.progressTarget);a.setError();a.toggleCancel(false);switch(f){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:a.setStatus(&quot;Upload Error: &quot;+e);this.debug(&quot;Error Code: HTTP Error, File name: &quot;+d.name+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:a.setStatus(&quot;Upload Failed.&quot;);this.debug(&quot;Error Code: Upload Failed, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:a.setStatus(&quot;Server (IO) Error&quot;);this.debug(&quot;Error Code: IO Error, File name: &quot;+d.name+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:a.setStatus(&quot;Security Error&quot;);this.debug(&quot;Error Code: Security Error, File name: &quot;+d.name+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:a.setStatus(&quot;Upload limit exceeded.&quot;);this.debug(&quot;Error Code: Upload Limit Exceeded, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:a.setStatus(&quot;Failed Validation.  Upload skipped.&quot;);this.debug(&quot;Error Code: File Validation Failed, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:if(this.getStats().files_queued===0){document.getElementById(this.customSettings.cancelButtonId).disabled=true}a.setStatus(&quot;Cancelled&quot;);a.setCancelled();break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:a.setStatus(&quot;Stopped&quot;);break;default:a.setStatus(&quot;Unhandled Error: &quot;+f);this.debug(&quot;Error Code: &quot;+f+&quot;, File name: &quot;+d.name+&quot;, File size: &quot;+d.size+&quot;, Message: &quot;+e);break}}catch(b){this.debug(b)}jQuery(&quot;#start_button&quot;).fadeTo(&quot;fast&quot;,1)}function uploadComplete(a){if(this.getStats().files_queued===0){document.getElementById(this.customSettings.cancelButtonId).disabled=true}jQuery(&quot;#start_button&quot;).fadeTo(&quot;fast&quot;,1);if(typeof(reload_images)!=&quot;undefined&quot;){reload_images()}if(typeof updateAll!=&quot;undefined&quot;){updateAll(root)}}function queueComplete(b){var a=document.getElementById(&quot;divStatus&quot;);a.innerHTML=b+&quot; file&quot;+(b===1?&quot;&quot;:&quot;s&quot;)+&quot; uploaded.&quot;}function init_upload(){if(jQuery(&quot;#content_page_id&quot;).val()){var b={content_id:jQuery(&quot;#content_page_id&quot;).val(),model_string:jQuery(&quot;#content_page_type&quot;).val(),join_field:jQuery(&quot;#join_field&quot;).val()}}else{var b={}}var a={flash_url:&quot;/images/swfupload.swf&quot;,upload_url:&quot;/file_upload.php&quot;,post_params:b,file_size_limit:&quot;100 MB&quot;,file_types:&quot;*.*&quot;,file_types_description:&quot;All Files&quot;,file_upload_limit:100,file_queue_limit:100,custom_settings:{progressTarget:&quot;fsUploadProgress&quot;,cancelButtonId:&quot;btnCancel&quot;},debug:false,button_image_url:&quot;/images/cms/add_files_button.png&quot;,button_width:&quot;254&quot;,button_height:&quot;27&quot;,button_placeholder_id:&quot;spanButtonPlaceHolder&quot;,button_window_mode:SWFUpload.WINDOW_MODE.TRANSPARENT,button_cursor:SWFUpload.CURSOR.HAND,file_queued_handler:fileQueued,file_queue_error_handler:fileQueueError,file_dialog_complete_handler:fileDialogComplete,upload_start_handler:uploadStart,upload_progress_handler:uploadProgress,upload_error_handler:uploadError,upload_success_handler:uploadSuccess,upload_complete_handler:uploadComplete,queue_complete_handler:queueComplete};swfu=new SWFUpload(a)}var swfu;function set_post_params(){var a=jQuery(&quot;#dest&quot;).html();if(a==&quot;select a folder&quot;){alert(&quot;You must choose a folder first&quot;);return false}if(!a){var a=jQuery(&quot;#wildfire_file_folder&quot;).val()}if(jQuery(&quot;#upload_from&quot;).length&amp;&amp;jQuery(&quot;#upload_from&quot;).val().length&gt;1){jQuery.post(&quot;/file_upload.php?&quot;,{wildfire_file_folder:a,wildfire_file_description:jQuery(&quot;#wildfire_file_description&quot;).val(),upload_from_url:jQuery(&quot;#upload_from&quot;).val(),wildfire_file_filename:jQuery(&quot;#wildfire_file_filename&quot;).val(),content_id:jQuery(&quot;#url_content_page_id&quot;).val(),model_string:jQuery(&quot;#url_content_page_type&quot;).val(),join_field:jQuery(&quot;#url_join_field&quot;).val()},function(){jQuery(&quot;#start_button&quot;).fadeTo(&quot;fast&quot;,1);alert(&quot;Image Successfully Retrieved&quot;);if(typeof(reload_images)!=&quot;undefined&quot;){reload_images()}});return true}swfu.addPostParam(&quot;wildfire_file_folder&quot;,a);swfu.addPostParam(&quot;wildfire_file_description&quot;,jQuery(&quot;#wildfire_file_description&quot;).val());swfu.startUpload()}jQuery(document).scroll(function(){jQuery(&quot;#informationcart&quot;).verticalCenter()});jQuery.fn.verticalCenter=function(a){var b=this;if(!a){b.css(&quot;top&quot;,jQuery(window).height()/2-this.height()/2);jQuery(window).resize(function(){b.centerScreen(!a)})}else{b.stop();b.animate({top:jQuery(window).height()/2-this.height()/2},200,&quot;linear&quot;)}};jQuery.noConflict();var Prototype={Version:&quot;1.4.0&quot;,ScriptFragment:&quot;(?:&lt;script.*?&gt;)((\n|\r|.)*?)(?:&lt;\/script&gt;)&quot;,emptyFunction:function(){},K:function(a){return a}};var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}};var Abstract=new Object();Object.extend=function(a,b){for(property in b){a[property]=b[property]}return a};Object.inspect=function(a){try{if(a==undefined){return&quot;undefined&quot;}if(a==null){return&quot;null&quot;}return a.inspect?a.inspect():a.toString()}catch(b){if(b instanceof RangeError){return&quot;...&quot;}throw b}};Function.prototype.bind=function(){var a=this,d=$A(arguments),b=d.shift();return function(){return a.apply(b,d.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(b){var a=this;return function(d){return a.call(b,d||window.event)}};Object.extend(Number.prototype,{toColorPart:function(){var a=this.toString(16);if(this&lt;16){return&quot;0&quot;+a}return a},succ:function(){return this+1},times:function(a){$R(0,this,true).each(a);return this}});var Try={these:function(){var d;for(var b=0;b&lt;arguments.length;b++){var a=arguments[b];try{d=a();break}catch(f){}}return d}};var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(b,a){this.callback=b;this.frequency=a;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback()}finally{this.currentlyExecuting=false}}}};function $(){var d=new Array();for(var b=0;b&lt;arguments.length;b++){var a=arguments[b];if(typeof a==&quot;string&quot;){a=document.getElementById(a)}if(arguments.length==1){return a}d.push(a)}return d}Object.extend(String.prototype,{stripTags:function(){return this.replace(/&lt;\/?[^&gt;]+&gt;/gi,&quot;&quot;)},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,&quot;img&quot;),&quot;&quot;)},extractScripts:function(){var b=new RegExp(Prototype.ScriptFragment,&quot;img&quot;);var a=new RegExp(Prototype.ScriptFragment,&quot;im&quot;);return(this.match(b)||[]).map(function(d){return(d.match(a)||[&quot;&quot;,&quot;&quot;])[1]})},evalScripts:function(){return this.extractScripts().map(eval)},escapeHTML:function(){var b=document.createElement(&quot;div&quot;);var a=document.createTextNode(this);b.appendChild(a);return b.innerHTML},unescapeHTML:function(){var a=document.createElement(&quot;div&quot;);a.innerHTML=this.stripTags();return a.childNodes[0]?a.childNodes[0].nodeValue:&quot;&quot;},toQueryParams:function(){var a=this.match(/^\??(.*)$/)[1].split(&quot;&amp;&quot;);return a.inject({},function(e,b){var d=b.split(&quot;=&quot;);e[d[0]]=d[1];return e})},toArray:function(){return this.split(&quot;&quot;)},camelize:function(){var e=this.split(&quot;-&quot;);if(e.length==1){return e[0]}var b=this.indexOf(&quot;-&quot;)==0?e[0].charAt(0).toUpperCase()+e[0].substring(1):e[0];for(var d=1,a=e.length;d&lt;a;d++){var f=e[d];b+=f.charAt(0).toUpperCase()+f.substring(1)}return b},inspect:function(){return&quot;'&quot;+this.replace(&quot;\\&quot;,&quot;\\\\&quot;).replace(&quot;'&quot;,&quot;\\'&quot;)+&quot;'&quot;}});String.prototype.parseQuery=String.prototype.toQueryParams;var $break=new Object();var $continue=new Object();var Enumerable={each:function(b){var a=0;try{this._each(function(f){try{b(f,a++)}catch(g){if(g!=$continue){throw g}}})}catch(d){if(d!=$break){throw d}}},all:function(b){var a=true;this.each(function(e,d){a=a&amp;&amp;!!(b||Prototype.K)(e,d);if(!a){throw $break}});return a},any:function(b){var a=true;this.each(function(e,d){if(a=!!(b||Prototype.K)(e,d)){throw $break}});return a},collect:function(b){var a=[];this.each(function(e,d){a.push(b(e,d))});return a},detect:function(b){var a;this.each(function(e,d){if(b(e,d)){a=e;throw $break}});return a},findAll:function(b){var a=[];this.each(function(e,d){if(b(e,d)){a.push(e)}});return a},grep:function(d,b){var a=[];this.each(function(g,f){var e=g.toString();if(e.match(d)){a.push((b||Prototype.K)(g,f))}});return a},include:function(a){var b=false;this.each(function(d){if(d==a){b=true;throw $break}});return b},inject:function(a,b){this.each(function(e,d){a=b(a,e,d)});return a},invoke:function(b){var a=$A(arguments).slice(1);return this.collect(function(d){return d[b].apply(d,a)})},max:function(b){var a;this.each(function(e,d){e=(b||Prototype.K)(e,d);if(e&gt;=(a||e)){a=e}});return a},min:function(b){var a;this.each(function(e,d){e=(b||Prototype.K)(e,d);if(e&lt;=(a||e)){a=e}});return a},partition:function(d){var b=[],a=[];this.each(function(f,e){((d||Prototype.K)(f,e)?b:a).push(f)});return[b,a]},pluck:function(b){var a=[];this.each(function(e,d){a.push(e[b])});return a},reject:function(b){var a=[];this.each(function(e,d){if(!b(e,d)){a.push(e)}});return a},sortBy:function(a){return this.collect(function(d,b){return{value:d,criteria:a(d,b)}}).sort(function(g,f){var e=g.criteria,d=f.criteria;return e&lt;d?-1:e&gt;d?1:0}).pluck(&quot;value&quot;)},toArray:function(){return this.collect(Prototype.K)},zip:function(){var b=Prototype.K,a=$A(arguments);if(typeof a.last()==&quot;function&quot;){b=a.pop()}var d=[this].concat(a).map($A);return this.map(function(f,e){b(f=d.pluck(e));return f})},inspect:function(){return&quot;#&lt;Enumerable:&quot;+this.toArray().inspect()+&quot;&gt;&quot;}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray});var $A=Array.from=function(d){if(!d){return[]}if(d.toArray){return d.toArray()}else{var b=[];for(var a=0;a&lt;d.length;a++){b.push(d[a])}return b}};Object.extend(Array.prototype,Enumerable);Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(b){for(var a=0;a&lt;this.length;a++){b(this[a])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=undefined||a!=null})},flatten:function(){return this.inject([],function(b,a){return b.concat(a.constructor==Array?a.flatten():[a])})},without:function(){var a=$A(arguments);return this.select(function(b){return !a.include(b)})},indexOf:function(a){for(var b=0;b&lt;this.length;b++){if(this[b]==a){return b}}return -1},reverse:function(a){return(a!==false?this:this.toArray())._reverse()},shift:function(){var a=this[0];for(var b=0;b&lt;this.length-1;b++){this[b]=this[b+1]}this.length--;return a},inspect:function(){return&quot;[&quot;+this.map(Object.inspect).join(&quot;, &quot;)+&quot;]&quot;}});var Hash={_each:function(a){for(key in this){var b=this[key];if(typeof b==&quot;function&quot;){continue}var d=[key,b];d.key=key;d.value=b;a(d)}},keys:function(){return this.pluck(&quot;key&quot;)},values:function(){return this.pluck(&quot;value&quot;)},merge:function(a){return $H(a).inject($H(this),function(b,d){b[d.key]=d.value;return b})},toQueryString:function(){return this.map(function(a){return a.map(encodeURIComponent).join(&quot;=&quot;)}).join(&quot;&amp;&quot;)},inspect:function(){return&quot;#&lt;Hash:{&quot;+this.map(function(a){return a.map(Object.inspect).join(&quot;: &quot;)}).join(&quot;, &quot;)+&quot;}&gt;&quot;}};function $H(a){var b=Object.extend({},a||{});Object.extend(b,Enumerable);Object.extend(b,Hash);return b}ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(d,a,b){this.start=d;this.end=a;this.exclusive=b},_each:function(a){var b=this.start;do{a(b);b=b.succ()}while(this.include(b))},include:function(a){if(a&lt;this.start){return false}if(this.exclusive){return a&lt;this.end}return a&lt;=this.end}});var $R=function(d,a,b){return new ObjectRange(d,a,b)};var Ajax={getTransport:function(){return Try.these(function(){return new ActiveXObject(&quot;Msxml2.XMLHTTP&quot;)},function(){return new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;)},function(){return new XMLHttpRequest()})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){if(!this.include(a)){this.responders.push(a)}},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(e,b,d,a){this.each(function(f){if(f[e]&amp;&amp;typeof f[e]==&quot;function&quot;){try{f[e].apply(f,[b,d,a])}catch(g){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(a){this.options={method:&quot;post&quot;,asynchronous:true,parameters:&quot;&quot;};Object.extend(this.options,a||{})},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status&gt;=200&amp;&amp;this.transport.status&lt;300)},responseIsFailure:function(){return !this.responseIsSuccess()}};Ajax.Request=Class.create();Ajax.Request.Events=[&quot;Uninitialized&quot;,&quot;Loading&quot;,&quot;Loaded&quot;,&quot;Interactive&quot;,&quot;Complete&quot;];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(b,a){this.transport=Ajax.getTransport();this.setOptions(a);this.request(b)},request:function(b){var d=this.options.parameters||&quot;&quot;;if(d.length&gt;0){d+=&quot;&amp;_=&quot;}try{this.url=b;if(this.options.method==&quot;get&quot;&amp;&amp;d.length&gt;0){this.url+=(this.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+d}Ajax.Responders.dispatch(&quot;onCreate&quot;,this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10)}this.setRequestHeaders();var a=this.options.postBody?this.options.postBody:d;this.transport.send(this.options.method==&quot;post&quot;?a:null)}catch(f){this.dispatchException(f)}},setRequestHeaders:function(){var b=[&quot;X-Requested-With&quot;,&quot;XMLHttpRequest&quot;,&quot;X-Prototype-Version&quot;,Prototype.Version];if(this.options.method==&quot;post&quot;){b.push(&quot;Content-type&quot;,&quot;application/x-www-form-urlencoded&quot;);if(this.transport.overrideMimeType){b.push(&quot;Connection&quot;,&quot;close&quot;)}}if(this.options.requestHeaders){b.push.apply(b,this.options.requestHeaders)}for(var a=0;a&lt;b.length;a+=2){this.transport.setRequestHeader(b[a],b[a+1])}},onStateChange:function(){var a=this.transport.readyState;if(a!=1){this.respondToReadyState(this.transport.readyState)}},header:function(a){try{return this.transport.getResponseHeader(a)}catch(b){}},evalJSON:function(){try{return eval(this.header(&quot;X-JSON&quot;))}catch(e){}},evalResponse:function(){try{return eval(this.transport.responseText)}catch(e){this.dispatchException(e)}},respondToReadyState:function(a){var d=Ajax.Request.Events[a];var g=this.transport,b=this.evalJSON();if(d==&quot;Complete&quot;){try{(this.options[&quot;on&quot;+this.transport.status]||this.options[&quot;on&quot;+(this.responseIsSuccess()?&quot;Success&quot;:&quot;Failure&quot;)]||Prototype.emptyFunction)(g,b)}catch(f){this.dispatchException(f)}if((this.header(&quot;Content-type&quot;)||&quot;&quot;).match(/^text\/javascript/i)){this.evalResponse()}}try{(this.options[&quot;on&quot;+d]||Prototype.emptyFunction)(g,b);Ajax.Responders.dispatch(&quot;on&quot;+d,this,g,b)}catch(f){this.dispatchException(f)}if(d==&quot;Complete&quot;){this.transport.onreadystatechange=Prototype.emptyFunction}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch(&quot;onException&quot;,this,a)}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(a,d,b){this.containers={success:a.success?$(a.success):$(a),failure:a.failure?$(a.failure):(a.success?null:$(a))};this.transport=Ajax.getTransport();this.setOptions(b);var e=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(g,f){this.updateContent();e(g,f)}).bind(this);this.request(d)},updateContent:function(){var b=this.responseIsSuccess()?this.containers.success:this.containers.failure;var a=this.transport.responseText;if(!this.options.evalScripts){a=a.stripScripts()}if(b){if(this.options.insertion){new this.options.insertion(b,a)}else{Element.update(b,a)}}if(this.responseIsSuccess()){if(this.onComplete){setTimeout(this.onComplete.bind(this),10)}}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(a,d,b){this.setOptions(b);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=a;this.url=d;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(a){if(this.options.decay){this.decay=(a.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=a.responseText}this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});document.getElementsByClassName=function(d,a){var b=($(a)||document.body).getElementsByTagName(&quot;*&quot;);return $A(b).inject([],function(e,f){if(f.className.match(new RegExp(&quot;(^|\\s)&quot;+d+&quot;(\\s|$)&quot;))){e.push(f)}return e})};if(!window.Element){var Element=new Object()}Object.extend(Element,{visible:function(a){return $(a).style.display!=&quot;none&quot;},toggle:function(){for(var b=0;b&lt;arguments.length;b++){var a=$(arguments[b]);Element[Element.visible(a)?&quot;hide&quot;:&quot;show&quot;](a)}},hide:function(){for(var b=0;b&lt;arguments.length;b++){var a=$(arguments[b]);a.style.display=&quot;none&quot;}},show:function(){for(var b=0;b&lt;arguments.length;b++){var a=$(arguments[b]);a.style.display=&quot;&quot;}},remove:function(a){a=$(a);a.parentNode.removeChild(a)},update:function(b,a){$(b).innerHTML=a.stripScripts();setTimeout(function(){a.evalScripts()},10)},getHeight:function(a){a=$(a);return a.offsetHeight},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(!(a=$(a))){return}return Element.classNames(a).include(b)},addClassName:function(a,b){if(!(a=$(a))){return}return Element.classNames(a).add(b)},removeClassName:function(a,b){if(!(a=$(a))){return}return Element.classNames(a).remove(b)},cleanWhitespace:function(b){b=$(b);for(var a=0;a&lt;b.childNodes.length;a++){var d=b.childNodes[a];if(d.nodeType==3&amp;&amp;!/\S/.test(d.nodeValue)){Element.remove(d)}}},empty:function(a){return $(a).innerHTML.match(/^\s*$/)},scrollTo:function(b){b=$(b);var a=b.x?b.x:b.offsetLeft,d=b.y?b.y:b.offsetTop;window.scrollTo(a,d)},getStyle:function(b,d){b=$(b);var e=b.style[d.camelize()];if(!e){if(document.defaultView&amp;&amp;document.defaultView.getComputedStyle){var a=document.defaultView.getComputedStyle(b,null);e=a?a.getPropertyValue(d):null}else{if(b.currentStyle){e=b.currentStyle[d.camelize()]}}}if(window.opera&amp;&amp;[&quot;left&quot;,&quot;top&quot;,&quot;right&quot;,&quot;bottom&quot;].include(d)){if(Element.getStyle(b,&quot;position&quot;)==&quot;static&quot;){e=&quot;auto&quot;}}return e==&quot;auto&quot;?null:e},setStyle:function(a,b){a=$(a);for(name in b){a.style[name.camelize()]=b[name]}},getDimensions:function(b){b=$(b);if(Element.getStyle(b,&quot;display&quot;)!=&quot;none&quot;){return{width:b.offsetWidth,height:b.offsetHeight}}var a=b.style;var f=a.visibility;var d=a.position;a.visibility=&quot;hidden&quot;;a.position=&quot;absolute&quot;;a.display=&quot;&quot;;var g=b.clientWidth;var e=b.clientHeight;a.display=&quot;none&quot;;a.position=d;a.visibility=f;return{width:g,height:e}},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,&quot;position&quot;);if(b==&quot;static&quot;||!b){a._madePositioned=true;a.style.position=&quot;relative&quot;;if(window.opera){a.style.top=0;a.style.left=0}}},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=&quot;&quot;}},makeClipping:function(a){a=$(a);if(a._overflow){return}a._overflow=a.style.overflow;if((Element.getStyle(a,&quot;overflow&quot;)||&quot;visible&quot;)!=&quot;hidden&quot;){a.style.overflow=&quot;hidden&quot;}},undoClipping:function(a){a=$(a);if(a._overflow){return}a.style.overflow=a._overflow;a._overflow=undefined}});var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(a){this.adjacency=a};Abstract.Insertion.prototype={initialize:function(a,b){this.element=$(a);this.content=b.stripScripts();if(this.adjacency&amp;&amp;this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content)}catch(d){if(this.element.tagName.toLowerCase()==&quot;tbody&quot;){this.insertContent(this.contentFromAnonymousTable())}else{throw d}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange){this.initializeRange()}this.insertContent([this.range.createContextualFragment(this.content)])}setTimeout(function(){b.evalScripts()},10)},contentFromAnonymousTable:function(){var a=document.createElement(&quot;div&quot;);a.innerHTML=&quot;&lt;table&gt;&lt;tbody&gt;&quot;+this.content+&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;;return $A(a.childNodes[0].childNodes[0].childNodes)}};var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion(&quot;beforeBegin&quot;),{initializeRange:function(){this.range.setStartBefore(this.element)},insertContent:function(a){a.each((function(b){this.element.parentNode.insertBefore(b,this.element)}).bind(this))}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion(&quot;afterBegin&quot;),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true)},insertContent:function(a){a.reverse(false).each((function(b){this.element.insertBefore(b,this.element.firstChild)}).bind(this))}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion(&quot;beforeEnd&quot;),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element)},insertContent:function(a){a.each((function(b){this.element.appendChild(b)}).bind(this))}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion(&quot;afterEnd&quot;),{initializeRange:function(){this.range.setStartAfter(this.element)},insertContent:function(a){a.each((function(b){this.element.parentNode.insertBefore(b,this.element.nextSibling)}).bind(this))}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(b){return b.length&gt;0})._each(a)},set:function(a){this.element.className=a},add:function(a){if(this.include(a)){return}this.set(this.toArray().concat(a).join(&quot; &quot;))},remove:function(a){if(!this.include(a)){return}this.set(this.select(function(b){return b!=a}).join(&quot; &quot;))},toString:function(){return this.toArray().join(&quot; &quot;)}};Object.extend(Element.ClassNames.prototype,Enumerable);var Field={clear:function(){for(var a=0;a&lt;arguments.length;a++){$(arguments[a]).value=&quot;&quot;}},focus:function(a){$(a).focus()},present:function(){for(var a=0;a&lt;arguments.length;a++){if($(arguments[a]).value==&quot;&quot;){return false}}return true},select:function(a){$(a).select()},activate:function(a){a=$(a);a.focus();if(a.select){a.select()}}};var Form={serialize:function(e){var f=Form.getElements($(e));var d=new Array();for(var b=0;b&lt;f.length;b++){var a=Form.Element.serialize(f[b]);if(a){d.push(a)}}return d.join(&quot;&amp;&quot;)},getElements:function(b){b=$(b);var d=new Array();for(tagName in Form.Element.Serializers){var e=b.getElementsByTagName(tagName);for(var a=0;a&lt;e.length;a++){d.push(e[a])}}return d},getInputs:function(g,d,e){g=$(g);var a=g.getElementsByTagName(&quot;input&quot;);if(!d&amp;&amp;!e){return a}var h=new Array();for(var f=0;f&lt;a.length;f++){var b=a[f];if((d&amp;&amp;b.type!=d)||(e&amp;&amp;b.name!=e)){continue}h.push(b)}return h},disable:function(d){var e=Form.getElements(d);for(var b=0;b&lt;e.length;b++){var a=e[b];a.blur();a.disabled=&quot;true&quot;}},enable:function(d){var e=Form.getElements(d);for(var b=0;b&lt;e.length;b++){var a=e[b];a.disabled=&quot;&quot;}},findFirstElement:function(a){return Form.getElements(a).find(function(b){return b.type!=&quot;hidden&quot;&amp;&amp;!b.disabled&amp;&amp;[&quot;input&quot;,&quot;select&quot;,&quot;textarea&quot;].include(b.tagName.toLowerCase())})},focusFirstElement:function(a){Field.activate(Form.findFirstElement(a))},reset:function(a){$(a).reset()}};Form.Element={serialize:function(b){b=$(b);var e=b.tagName.toLowerCase();var d=Form.Element.Serializers[e](b);if(d){var a=encodeURIComponent(d[0]);if(a.length==0){return}if(d[1].constructor!=Array){d[1]=[d[1]]}return d[1].map(function(f){return a+&quot;=&quot;+encodeURIComponent(f)}).join(&quot;&amp;&quot;)}},getValue:function(a){a=$(a);var d=a.tagName.toLowerCase();var b=Form.Element.Serializers[d](a);if(b){return b[1]}}};Form.Element.Serializers={input:function(a){switch(a.type.toLowerCase()){case&quot;submit&quot;:case&quot;hidden&quot;:case&quot;password&quot;:case&quot;text&quot;:return Form.Element.Serializers.textarea(a);case&quot;checkbox&quot;:case&quot;radio&quot;:return Form.Element.Serializers.inputSelector(a)}return false},inputSelector:function(a){if(a.checked){return[a.name,a.value]}},textarea:function(a){return[a.name,a.value]},select:function(a){return Form.Element.Serializers[a.type==&quot;select-one&quot;?&quot;selectOne&quot;:&quot;selectMany&quot;](a)},selectOne:function(d){var e=&quot;&quot;,b,a=d.selectedIndex;if(a&gt;=0){b=d.options[a];e=b.value;if(!e&amp;&amp;!(&quot;value&quot; in b)){e=b.text}}return[d.name,e]},selectMany:function(d){var e=new Array();for(var b=0;b&lt;d.length;b++){var a=d.options[b];if(a.selected){var f=a.value;if(!f&amp;&amp;!(&quot;value&quot; in a)){f=a.text}e.push(f)}}return[d.name,e]}};var $F=Form.Element.getValue;Abstract.TimedObserver=function(){};Abstract.TimedObserver.prototype={initialize:function(a,b,d){this.frequency=b;this.element=$(a);this.callback=d;this.lastValue=this.getValue();this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},onTimerEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}}};Form.Element.Observer=Class.create();Form.Element.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create();Form.Observer.prototype=Object.extend(new Abstract.TimedObserver(),{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=function(){};Abstract.EventObserver.prototype={initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()==&quot;form&quot;){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){var b=Form.getElements(this.element);for(var a=0;a&lt;b.length;a++){this.registerCallback(b[a])}},registerCallback:function(a){if(a.type){switch(a.type.toLowerCase()){case&quot;checkbox&quot;:case&quot;radio&quot;:Event.observe(a,&quot;click&quot;,this.onElementEvent.bind(this));break;case&quot;password&quot;:case&quot;text&quot;:case&quot;textarea&quot;:case&quot;select-one&quot;:case&quot;select-multiple&quot;:Event.observe(a,&quot;change&quot;,this.onElementEvent.bind(this));break}}}};Form.Element.EventObserver=Class.create();Form.Element.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create();Form.EventObserver.prototype=Object.extend(new Abstract.EventObserver(),{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event=new Object()}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(a){return a.target||a.srcElement},isLeftClick:function(a){return(((a.which)&amp;&amp;(a.which==1))||((a.button)&amp;&amp;(a.button==1)))},pointerX:function(a){return a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(a){return a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(a){if(a.preventDefault){a.preventDefault();a.stopPropagation()}else{a.returnValue=false;a.cancelBubble=true}},findElement:function(d,b){var a=Event.element(d);while(a.parentNode&amp;&amp;(!a.tagName||(a.tagName.toUpperCase()!=b.toUpperCase()))){a=a.parentNode}return a},observers:false,_observeAndCache:function(e,d,b,a){if(!this.observers){this.observers=[]}if(e.addEventListener){this.observers.push([e,d,b,a]);e.addEventListener(d,b,a)}else{if(e.attachEvent){this.observers.push([e,d,b,a]);e.attachEvent(&quot;on&quot;+d,b)}}},unloadCache:function(){if(!Event.observers){return}for(var a=0;a&lt;Event.observers.length;a++){Event.stopObserving.apply(this,Event.observers[a]);Event.observers[a][0]=null}Event.observers=false},observe:function(e,d,b,a){var e=$(e);a=a||false;if(d==&quot;keypress&quot;&amp;&amp;(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||e.attachEvent)){d=&quot;keydown&quot;}this._observeAndCache(e,d,b,a)},stopObserving:function(e,d,b,a){var e=$(e);a=a||false;if(d==&quot;keypress&quot;&amp;&amp;(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||e.detachEvent)){d=&quot;keydown&quot;}if(e.removeEventListener){e.removeEventListener(d,b,a)}else{if(e.detachEvent){e.detachEvent(&quot;on&quot;+d,b)}}}});Event.observe(window,&quot;unload&quot;,Event.unloadCache,false);var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},realOffset:function(b){var a=0,d=0;do{a+=b.scrollTop||0;d+=b.scrollLeft||0;b=b.parentNode}while(b);return[d,a]},cumulativeOffset:function(b){var a=0,d=0;do{if(b.style.position==&quot;fixed&quot;){a+=window.pageYOffset+b.offsetTop;d+=window.pageXOffset+b.offsetLeft;b=null}else{a+=b.offsetTop||0;d+=b.offsetLeft||0;b=b.offsetParent}}while(b);return[d,a]},positionedOffset:function(b){var a=0,d=0;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;b=b.offsetParent;if(b){p=Element.getStyle(b,&quot;position&quot;);if(p==&quot;relative&quot;||p==&quot;absolute&quot;){break}}}while(b);return[d,a]},offsetParent:function(a){if(a.offsetParent){return a.offsetParent}if(a==document.body){return a}while((a=a.parentNode)&amp;&amp;a!=document.body){if(Element.getStyle(a,&quot;position&quot;)!=&quot;static&quot;){return a}}return document.body},within:function(b,a,d){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(b,a,d)}this.xcomp=a;this.ycomp=d;this.offset=this.cumulativeOffset(b);return(d&gt;=this.offset[1]&amp;&amp;d&lt;this.offset[1]+b.offsetHeight&amp;&amp;a&gt;=this.offset[0]&amp;&amp;a&lt;this.offset[0]+b.offsetWidth)},withinIncludingScrolloffsets:function(b,a,e){var d=this.realOffset(b);this.xcomp=a+d[0]-this.deltaX;this.ycomp=e+d[1]-this.deltaY;this.offset=this.cumulativeOffset(b);return(this.ycomp&gt;=this.offset[1]&amp;&amp;this.ycomp&lt;this.offset[1]+b.offsetHeight&amp;&amp;this.xcomp&gt;=this.offset[0]&amp;&amp;this.xcomp&lt;this.offset[0]+b.offsetWidth)},overlap:function(b,a){if(!b){return 0}if(b==&quot;vertical&quot;){return((this.offset[1]+a.offsetHeight)-this.ycomp)/a.offsetHeight}if(b==&quot;horizontal&quot;){return((this.offset[0]+a.offsetWidth)-this.xcomp)/a.offsetWidth}},clone:function(b,d){b=$(b);d=$(d);d.style.position=&quot;absolute&quot;;var a=this.cumulativeOffset(b);d.style.top=a[1]+&quot;px&quot;;d.style.left=a[0]+&quot;px&quot;;d.style.width=b.offsetWidth+&quot;px&quot;;d.style.height=b.offsetHeight+&quot;px&quot;},page:function(e){var a=0,d=0;var b=e;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;if(b.offsetParent==document.body){if(Element.getStyle(b,&quot;position&quot;)==&quot;absolute&quot;){break}}}while(b=b.offsetParent);b=e;do{a-=b.scrollTop||0;d-=b.scrollLeft||0}while(b=b.parentNode);return[d,a]},clone:function(d,f){var a=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});d=$(d);var e=Position.page(d);f=$(f);var g=[0,0];var b=null;if(Element.getStyle(f,&quot;position&quot;)==&quot;absolute&quot;){b=Position.offsetParent(f);g=Position.page(b)}if(b==document.body){g[0]-=document.body.offsetLeft;g[1]-=document.body.offsetTop}if(a.setLeft){f.style.left=(e[0]-g[0]+a.offsetLeft)+&quot;px&quot;}if(a.setTop){f.style.top=(e[1]-g[1]+a.offsetTop)+&quot;px&quot;}if(a.setWidth){f.style.width=d.offsetWidth+&quot;px&quot;}if(a.setHeight){f.style.height=d.offsetHeight+&quot;px&quot;}},absolutize:function(b){b=$(b);if(b.style.position==&quot;absolute&quot;){return}Position.prepare();var e=Position.positionedOffset(b);var g=e[1];var f=e[0];var d=b.clientWidth;var a=b.clientHeight;b._originalLeft=f-parseFloat(b.style.left||0);b._originalTop=g-parseFloat(b.style.top||0);b._originalWidth=b.style.width;b._originalHeight=b.style.height;b.style.position=&quot;absolute&quot;;b.style.top=g+&quot;px&quot;;b.style.left=f+&quot;px&quot;;b.style.width=d+&quot;px&quot;;b.style.height=a+&quot;px&quot;},relativize:function(a){a=$(a);if(a.style.position==&quot;relative&quot;){return}Position.prepare();a.style.position=&quot;relative&quot;;var d=parseFloat(a.style.top||0)-(a._originalTop||0);var b=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=d+&quot;px&quot;;a.style.left=b+&quot;px&quot;;a.style.height=a._originalHeight;a.style.width=a._originalWidth}};if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){Position.cumulativeOffset=function(b){var a=0,d=0;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;if(b.offsetParent==document.body){if(Element.getStyle(b,&quot;position&quot;)==&quot;absolute&quot;){break}}b=b.offsetParent}while(b);return[d,a]}}dropList=new Array();var Droppables={drops:[],remove:function(a){this.drops=this.drops.reject(function(b){return b.element==$(a)})},add:function(b){b=$(b);var a=Object.extend({greedy:true,hoverclass:null},arguments[1]||{});if(a.containment){a._containers=[];var d=a.containment;if((typeof d==&quot;object&quot;)&amp;&amp;(d.constructor==Array)){d.each(function(e){a._containers.push($(e))})}else{a._containers.push($(d))}}if(a.accept){a.accept=[a.accept].flatten()}Element.makePositioned(b);a.element=b;this.drops.push(a);dropList[b.id]=this.drops.length-1},isContained:function(d,b){var a=d.parentNode;return b._containers.detect(function(e){return a==e})},isAffected:function(a,d,b){return((b.element!=d)&amp;&amp;((!b._containers)||this.isContained(d,b))&amp;&amp;((!b.accept)||(Element.classNames(d).detect(function(e){return b.accept.include(e)})))&amp;&amp;Position.within(b.element,a[0],a[1]))},deactivate:function(a){if(a.hoverclass){Element.removeClassName(a.element,a.hoverclass)}this.last_active=null},activate:function(a){if(a.hoverclass){Element.addClassName(a.element,a.hoverclass)}this.last_active=a},show:function(a,b){if(!this.drops.length){return}if(this.last_active){this.deactivate(this.last_active)}this.drops.each(function(d){if(Droppables.isAffected(a,b,d)){if(d.onHover){d.onHover(b,d.element,Position.overlap(d.overlap,d.element))}if(d.greedy){Droppables.activate(d);throw $break}}})},fire:function(b,a){if(!this.last_active){return}Position.prepare();if(this.isAffected([Event.pointerX(b),Event.pointerY(b)],a,this.last_active)){if(this.last_active.onDrop){this.last_active.onDrop(a,this.last_active.element,b)}}},reset:function(){if(this.last_active){this.deactivate(this.last_active)}}};var Draggables={drags:[],observers:[],register:function(a){if(this.drags.length==0){this.eventMouseUp=this.endDrag.bindAsEventListener(this);this.eventMouseMove=this.updateDrag.bindAsEventListener(this);this.eventKeypress=this.keyPress.bindAsEventListener(this);Event.observe(document,&quot;mouseup&quot;,this.eventMouseUp);Event.observe(document,&quot;mousemove&quot;,this.eventMouseMove);Event.observe(document,&quot;keypress&quot;,this.eventKeypress)}this.drags.push(a)},unregister:function(a){this.drags=this.drags.reject(function(b){return b==a});if(this.drags.length==0){Event.stopObserving(document,&quot;mouseup&quot;,this.eventMouseUp);Event.stopObserving(document,&quot;mousemove&quot;,this.eventMouseMove);Event.stopObserving(document,&quot;keypress&quot;,this.eventKeypress)}},activate:function(a){window.focus();this.activeDraggable=a},deactivate:function(a){this.activeDraggable=null},updateDrag:function(a){if(!this.activeDraggable){return}var b=[Event.pointerX(a),Event.pointerY(a)];if(this._lastPointer&amp;&amp;(this._lastPointer.inspect()==b.inspect())){return}this._lastPointer=b;this.activeDraggable.updateDrag(a,b)},endDrag:function(a){if(!this.activeDraggable){return}this._lastPointer=null;this.activeDraggable.endDrag(a);this.activeDraggable=null},keyPress:function(a){if(this.activeDraggable){this.activeDraggable.keyPress(a)}},addObserver:function(a){this.observers.push(a);this._cacheObserverCallbacks()},removeObserver:function(a){this.observers=this.observers.reject(function(b){return b.element==a});this._cacheObserverCallbacks()},notify:function(b,a,d){if(this[b+&quot;Count&quot;]&gt;0){this.observers.each(function(e){if(e[b]){e[b](b,a,d)}})}},_cacheObserverCallbacks:function(){[&quot;onStart&quot;,&quot;onEnd&quot;,&quot;onDrag&quot;].each(function(a){Draggables[a+&quot;Count&quot;]=Draggables.observers.select(function(b){return b[a]}).length})}};var Draggable=Class.create();Draggable.prototype={initialize:function(b){var a=Object.extend({handle:false,starteffect:function(d){Element.addClassName(d,&quot;dragging&quot;);new Effect.Opacity(d,{duration:0.2,from:1,to:0.7})},reverteffect:function(f,e,d){var g=Math.sqrt(Math.abs(e^2)+Math.abs(d^2))*0.02;f._revert=new Effect.Move(f,{x:-d,y:-e,duration:g})},endeffect:function(d){new Effect.Opacity(d,{duration:0.2,from:0.7,to:1});Element.removeClassName(d,&quot;dragging&quot;)},zindex:1000,revert:false,snap:false},arguments[1]||{});this.element=$(b);if(a.handle&amp;&amp;(typeof a.handle==&quot;string&quot;)){this.handle=Element.childrenWithClassName(this.element,a.handle)[0]}if(!this.handle){this.handle=$(a.handle)}if(!this.handle){this.handle=this.element}Element.makePositioned(this.element);this.delta=this.currentDelta();this.options=a;this.dragging=false;this.eventMouseDown=this.initDrag.bindAsEventListener(this);Event.observe(this.handle,&quot;mousedown&quot;,this.eventMouseDown);Draggables.register(this)},destroy:function(){Event.stopObserving(this.handle,&quot;mousedown&quot;,this.eventMouseDown);Draggables.unregister(this)},currentDelta:function(){return([parseInt(Element.getStyle(this.element,&quot;left&quot;)||&quot;0&quot;),parseInt(Element.getStyle(this.element,&quot;top&quot;)||&quot;0&quot;)])},initDrag:function(a){if(Event.isLeftClick(a)){var d=Event.element(a);if(d.tagName&amp;&amp;(d.tagName==&quot;INPUT&quot;||d.tagName==&quot;SELECT&quot;||d.tagName==&quot;BUTTON&quot;||d.tagName==&quot;TEXTAREA&quot;)){return}if(this.element._revert){this.element._revert.cancel();this.element._revert=null}var b=[Event.pointerX(a),Event.pointerY(a)];var e=Position.cumulativeOffset(this.element);this.offset=[0,1].map(function(f){return(b[f]-e[f])});Draggables.activate(this);Event.stop(a)}},startDrag:function(a){this.dragging=true;if(this.options.zindex){this.originalZ=parseInt(Element.getStyle(this.element,&quot;z-index&quot;)||0);this.element.style.zIndex=this.options.zindex}if(this.options.ghosting){this._clone=this.element.cloneNode(true);Position.absolutize(this.element);this.element.parentNode.insertBefore(this._clone,this.element)}Draggables.notify(&quot;onStart&quot;,this,a);if(this.options.starteffect){this.options.starteffect(this.element)}},updateDrag:function(a,b){if(!this.dragging){this.startDrag(a)}Position.prepare();Droppables.show(b,this.element);Draggables.notify(&quot;onDrag&quot;,this,a);this.draw(b);if(this.options.change){this.options.change(this)}if(navigator.appVersion.indexOf(&quot;AppleWebKit&quot;)&gt;0){window.scrollBy(0,0)}Event.stop(a)},finishDrag:function(b,f){this.dragging=false;if(this.options.ghosting){Position.relativize(this.element);Element.remove(this._clone);this._clone=null}if(f){Droppables.fire(b,this.element)}Draggables.notify(&quot;onEnd&quot;,this,b);var a=this.options.revert;if(a&amp;&amp;typeof a==&quot;function&quot;){a=a(this.element)}var e=this.currentDelta();if(a&amp;&amp;this.options.reverteffect){this.options.reverteffect(this.element,e[1]-this.delta[1],e[0]-this.delta[0])}else{this.delta=e}if(this.options.zindex){this.element.style.zIndex=this.originalZ}if(this.options.endeffect){this.options.endeffect(this.element)}Draggables.deactivate(this);Droppables.reset()},keyPress:function(a){if(!a.keyCode==Event.KEY_ESC){return}this.finishDrag(a,false);Event.stop(a)},endDrag:function(a){if(!this.dragging){return}this.finishDrag(a,true);Event.stop(a)},draw:function(a){var g=Position.cumulativeOffset(this.element);var f=this.currentDelta();g[0]-=f[0];g[1]-=f[1];var e=[0,1].map(function(d){return(a[d]-g[d]-this.offset[d])}.bind(this));if(this.options.snap){if(typeof this.options.snap==&quot;function&quot;){e=this.options.snap(e[0],e[1])}else{if(this.options.snap instanceof Array){e=e.map(function(d,h){return Math.round(d/this.options.snap[h])*this.options.snap[h]}.bind(this))}else{e=e.map(function(d){return Math.round(d/this.options.snap)*this.options.snap}.bind(this))}}}var b=this.element.style;if((!this.options.constraint)||(this.options.constraint==&quot;horizontal&quot;)){b.left=e[0]+&quot;px&quot;}if((!this.options.constraint)||(this.options.constraint==&quot;vertical&quot;)){b.top=e[1]+&quot;px&quot;}if(b.visibility==&quot;hidden&quot;){b.visibility=&quot;&quot;}}};var SortableObserver=Class.create();SortableObserver.prototype={initialize:function(b,a){this.element=$(b);this.observer=a;this.lastValue=Sortable.serialize(this.element)},onStart:function(){this.lastValue=Sortable.serialize(this.element)},onEnd:function(){Sortable.unmark();if(this.lastValue!=Sortable.serialize(this.element)){this.observer(this.element)}}};var Sortable={sortables:new Array(),options:function(a){a=$(a);return this.sortables.detect(function(b){return b.element==a})},destroy:function(a){a=$(a);this.sortables.findAll(function(b){return b.element==a}).each(function(b){Draggables.removeObserver(b.element);b.droppables.each(function(e){Droppables.remove(e)});b.draggables.invoke(&quot;destroy&quot;)});this.sortables=this.sortables.reject(function(b){return b.element==a})},create:function(d){d=$(d);var b=Object.extend({element:d,tag:&quot;li&quot;,dropOnEmpty:false,tree:false,overlap:&quot;vertical&quot;,constraint:&quot;vertical&quot;,containment:d,handle:false,only:false,hoverclass:null,ghosting:false,format:null,onChange:Prototype.emptyFunction,onUpdate:Prototype.emptyFunction},arguments[1]||{});this.destroy(d);var a={revert:true,ghosting:b.ghosting,constraint:b.constraint,handle:b.handle};if(b.starteffect){a.starteffect=b.starteffect}if(b.reverteffect){a.reverteffect=b.reverteffect}else{if(b.ghosting){a.reverteffect=function(f){f.style.top=0;f.style.left=0}}}if(b.endeffect){a.endeffect=b.endeffect}if(b.zindex){a.zindex=b.zindex}var e={overlap:b.overlap,containment:b.containment,hoverclass:b.hoverclass,onHover:Sortable.onHover,greedy:!b.dropOnEmpty};Element.cleanWhitespace(d);b.draggables=[];b.droppables=[];if(b.dropOnEmpty){Droppables.add(d,{containment:b.containment,onHover:Sortable.onEmptyHover,greedy:false});b.droppables.push(d)}(this.findElements(d,b)||[]).each(function(g){var f=b.handle?Element.childrenWithClassName(g,b.handle)[0]:g;b.draggables.push(new Draggable(g,Object.extend(a,{handle:f})));Droppables.add(g,e);b.droppables.push(g)});this.sortables.push(b);Draggables.addObserver(new SortableObserver(d,b.onUpdate))},findElements:function(b,a){if(!b.hasChildNodes()){return null}var d=[];$A(b.childNodes).each(function(g){if(g.tagName&amp;&amp;g.tagName.toUpperCase()==a.tag.toUpperCase()&amp;&amp;(!a.only||(Element.hasClassName(g,a.only)))){d.push(g)}if(a.tree){var f=this.findElements(g,a);if(f){d.push(f)}}});return(d.length&gt;0?d.flatten():null)},onHover:function(f,e,a){if(a&gt;0.5){Sortable.mark(e,&quot;before&quot;);if(e.previousSibling!=f){var b=f.parentNode;f.style.visibility=&quot;hidden&quot;;e.parentNode.insertBefore(f,e);if(e.parentNode!=b){Sortable.options(b).onChange(f)}Sortable.options(e.parentNode).onChange(f)}}else{Sortable.mark(e,&quot;after&quot;);var d=e.nextSibling||null;if(d!=f){var b=f.parentNode;f.style.visibility=&quot;hidden&quot;;e.parentNode.insertBefore(f,d);if(e.parentNode!=b){Sortable.options(b).onChange(f)}Sortable.options(e.parentNode).onChange(f)}}},onEmptyHover:function(d,b){if(d.parentNode!=b){var a=d.parentNode;b.appendChild(d);Sortable.options(a).onChange(d);Sortable.options(b).onChange(d)}},unmark:function(){if(Sortable._marker){Element.hide(Sortable._marker)}},mark:function(b,a){var e=Sortable.options(b.parentNode);if(e&amp;&amp;!e.ghosting){return}if(!Sortable._marker){Sortable._marker=$(&quot;dropmarker&quot;)||document.createElement(&quot;DIV&quot;);Element.hide(Sortable._marker);Element.addClassName(Sortable._marker,&quot;dropmarker&quot;);Sortable._marker.style.position=&quot;absolute&quot;;document.getElementsByTagName(&quot;body&quot;).item(0).appendChild(Sortable._marker)}var d=Position.cumulativeOffset(b);Sortable._marker.style.left=d[0]+&quot;px&quot;;Sortable._marker.style.top=d[1]+&quot;px&quot;;if(a==&quot;after&quot;){if(e.overlap==&quot;horizontal&quot;){Sortable._marker.style.left=(d[0]+b.clientWidth)+&quot;px&quot;}else{Sortable._marker.style.top=(d[1]+b.clientHeight)+&quot;px&quot;}}Element.show(Sortable._marker)},serialize:function(d){d=$(d);var b=this.options(d);var a=Object.extend({tag:b.tag,only:b.only,name:d.id,format:b.format||/^[^_]*_(.*)$/},arguments[1]||{});return $(this.findElements(d,a)||[]).map(function(e){return(encodeURIComponent(a.name)+&quot;[]=&quot;+encodeURIComponent(e.id.match(a.format)?e.id.match(a.format)[1]:&quot;&quot;))}).join(&quot;&amp;&quot;)}};String.prototype.parseColor=function(){var a=&quot;#&quot;;if(this.slice(0,4)==&quot;rgb(&quot;){var d=this.slice(4,this.length-1).split(&quot;,&quot;);var b=0;do{a+=parseInt(d[b]).toColorPart()}while(++b&lt;3)}else{if(this.slice(0,1)==&quot;#&quot;){if(this.length==4){for(var b=1;b&lt;4;b++){a+=(this.charAt(b)+this.charAt(b)).toLowerCase()}}if(this.length==7){a=this.toLowerCase()}}}return(a.length==7?a:(arguments[0]||this))};Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(b){return(b.nodeType==3?b.nodeValue:(b.hasChildNodes()?Element.collectTextNodes(b):&quot;&quot;))}).flatten().join(&quot;&quot;)};Element.collectTextNodesIgnoreClass=function(a,b){return $A($(a).childNodes).collect(function(d){return(d.nodeType==3?d.nodeValue:((d.hasChildNodes()&amp;&amp;!Element.hasClassName(d,b))?Element.collectTextNodes(d):&quot;&quot;))}).flatten().join(&quot;&quot;)};Element.setStyle=function(a,b){a=$(a);for(k in b){a.style[k.camelize()]=b[k]}};Element.setContentZoom=function(a,b){Element.setStyle(a,{fontSize:(b/100)+&quot;em&quot;});if(navigator.appVersion.indexOf(&quot;AppleWebKit&quot;)&gt;0){window.scrollBy(0,0)}};Element.getOpacity=function(b){var a;if(a=Element.getStyle(b,&quot;opacity&quot;)){return parseFloat(a)}if(a=(Element.getStyle(b,&quot;filter&quot;)||&quot;&quot;).match(/alpha\(opacity=(.*)\)/)){if(a[1]){return parseFloat(a[1])/100}}return 1};Element.setOpacity=function(a,b){a=$(a);if(b==1){Element.setStyle(a,{opacity:(/Gecko/.test(navigator.userAgent)&amp;&amp;!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:null});if(/MSIE/.test(navigator.userAgent)){Element.setStyle(a,{filter:Element.getStyle(a,&quot;filter&quot;).replace(/alpha\([^\)]*\)/gi,&quot;&quot;)})}}else{if(b&lt;0.00001){b=0}Element.setStyle(a,{opacity:b});if(/MSIE/.test(navigator.userAgent)){Element.setStyle(a,{filter:Element.getStyle(a,&quot;filter&quot;).replace(/alpha\([^\)]*\)/gi,&quot;&quot;)+&quot;alpha(opacity=&quot;+b*100+&quot;)&quot;})}}};Element.getInlineOpacity=function(a){return $(a).style.opacity||&quot;&quot;};Element.childrenWithClassName=function(a,b){return $A($(a).getElementsByTagName(&quot;*&quot;)).select(function(d){return Element.hasClassName(d,b)})};Array.prototype.call=function(){var a=arguments;this.each(function(b){b.apply(this,a)})};var Effect={tagifyText:function(a){var b=&quot;position:relative&quot;;if(/MSIE/.test(navigator.userAgent)){b+=&quot;;zoom:1&quot;}a=$(a);$A(a.childNodes).each(function(d){if(d.nodeType==3){d.nodeValue.toArray().each(function(e){a.insertBefore(Builder.node(&quot;span&quot;,{style:b},e==&quot; &quot;?String.fromCharCode(160):e),d)});Element.remove(d)}})},multiple:function(b,d){var f;if(((typeof b==&quot;object&quot;)||(typeof b==&quot;function&quot;))&amp;&amp;(b.length)){f=b}else{f=$(b).childNodes}var a=Object.extend({speed:0.1,delay:0},arguments[2]||{});var e=a.delay;$A(f).each(function(h,g){new d(h,Object.extend(a,{delay:g*a.speed+e}))})},PAIRS:{slide:[&quot;SlideDown&quot;,&quot;SlideUp&quot;],blind:[&quot;BlindDown&quot;,&quot;BlindUp&quot;],appear:[&quot;Appear&quot;,&quot;Fade&quot;]},toggle:function(b,d){b=$(b);d=(d||&quot;appear&quot;).toLowerCase();var a=Object.extend({queue:{position:&quot;end&quot;,scope:(b.id||&quot;global&quot;)}},arguments[2]||{});Effect[Element.visible(b)?Effect.PAIRS[d][1]:Effect.PAIRS[d][0]](b,a)}};var Effect2=Effect;Effect.Transitions={};Effect.Transitions.linear=function(a){return a};Effect.Transitions.sinoidal=function(a){return(-Math.cos(a*Math.PI)/2)+0.5};Effect.Transitions.reverse=function(a){return 1-a};Effect.Transitions.flicker=function(a){return((-Math.cos(a*Math.PI)/4)+0.75)+Math.random()/4};Effect.Transitions.wobble=function(a){return(-Math.cos(a*Math.PI*(9*a))/2)+0.5};Effect.Transitions.pulse=function(a){return(Math.floor(a*10)%2==0?(a*10-Math.floor(a*10)):1-(a*10-Math.floor(a*10)))};Effect.Transitions.none=function(a){return 0};Effect.Transitions.full=function(a){return 1};Effect.ScopedQueue=Class.create();Object.extend(Object.extend(Effect.ScopedQueue.prototype,Enumerable),{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(b){var d=new Date().getTime();var a=(typeof b.options.queue==&quot;string&quot;)?b.options.queue:b.options.queue.position;switch(a){case&quot;front&quot;:this.effects.findAll(function(f){return f.state==&quot;idle&quot;}).each(function(f){f.startOn+=b.finishOn;f.finishOn+=b.finishOn});break;case&quot;end&quot;:d=this.effects.pluck(&quot;finishOn&quot;).max()||d;break}b.startOn+=d;b.finishOn+=d;this.effects.push(b);if(!this.interval){this.interval=setInterval(this.loop.bind(this),40)}},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){var a=new Date().getTime();this.effects.invoke(&quot;loop&quot;,a)}});Effect.Queues={instances:$H(),get:function(a){if(typeof a!=&quot;string&quot;){return a}if(!this.instances[a]){this.instances[a]=new Effect.ScopedQueue()}return this.instances[a]}};Effect.Queue=Effect.Queues.get(&quot;global&quot;);Effect.DefaultOptions={transition:Effect.Transitions.sinoidal,duration:1,fps:25,sync:false,from:0,to:1,delay:0,queue:&quot;parallel&quot;};Effect.Base=function(){};Effect.Base.prototype={position:null,start:function(a){this.options=Object.extend(Object.extend({},Effect.DefaultOptions),a||{});this.currentFrame=0;this.state=&quot;idle&quot;;this.startOn=this.options.delay*1000;this.finishOn=this.startOn+(this.options.duration*1000);this.event(&quot;beforeStart&quot;);if(!this.options.sync){Effect.Queues.get(typeof this.options.queue==&quot;string&quot;?&quot;global&quot;:this.options.queue.scope).add(this)}},loop:function(d){if(d&gt;=this.startOn){if(d&gt;=this.finishOn){this.render(1);this.cancel();this.event(&quot;beforeFinish&quot;);if(this.finish){this.finish()}this.event(&quot;afterFinish&quot;);return}var b=(d-this.startOn)/(this.finishOn-this.startOn);var a=Math.round(b*this.options.fps*this.options.duration);if(a&gt;this.currentFrame){this.render(b);this.currentFrame=a}}},render:function(a){if(this.state==&quot;idle&quot;){this.state=&quot;running&quot;;this.event(&quot;beforeSetup&quot;);if(this.setup){this.setup()}this.event(&quot;afterSetup&quot;)}if(this.state==&quot;running&quot;){if(this.options.transition){a=this.options.transition(a)}a*=(this.options.to-this.options.from);a+=this.options.from;this.position=a;this.event(&quot;beforeUpdate&quot;);if(this.update){this.update(a)}this.event(&quot;afterUpdate&quot;)}},cancel:function(){if(!this.options.sync){Effect.Queues.get(typeof this.options.queue==&quot;string&quot;?&quot;global&quot;:this.options.queue.scope).remove(this)}this.state=&quot;finished&quot;},event:function(a){if(this.options[a+&quot;Internal&quot;]){this.options[a+&quot;Internal&quot;](this)}if(this.options[a]){this.options[a](this)}},inspect:function(){return&quot;#&lt;Effect:&quot;+$H(this).inspect()+&quot;,options:&quot;+$H(this.options).inspect()+&quot;&gt;&quot;}};Effect.Parallel=Class.create();Object.extend(Object.extend(Effect.Parallel.prototype,Effect.Base.prototype),{initialize:function(a){this.effects=a||[];this.start(arguments[1])},update:function(a){this.effects.invoke(&quot;render&quot;,a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event(&quot;beforeFinish&quot;);if(b.finish){b.finish(a)}b.event(&quot;afterFinish&quot;)})}});Effect.Opacity=Class.create();Object.extend(Object.extend(Effect.Opacity.prototype,Effect.Base.prototype),{initialize:function(b){this.element=$(b);if(/MSIE/.test(navigator.userAgent)&amp;&amp;(!this.element.hasLayout)){Element.setStyle(this.element,{zoom:1})}var a=Object.extend({from:Element.getOpacity(this.element)||0,to:1},arguments[1]||{});this.start(a)},update:function(a){Element.setOpacity(this.element,a)}});Effect.Move=Class.create();Object.extend(Object.extend(Effect.Move.prototype,Effect.Base.prototype),{initialize:function(b){this.element=$(b);var a=Object.extend({x:0,y:0,mode:&quot;relative&quot;},arguments[1]||{});this.start(a)},setup:function(){Element.makePositioned(this.element);this.originalLeft=parseFloat(Element.getStyle(this.element,&quot;left&quot;)||&quot;0&quot;);this.originalTop=parseFloat(Element.getStyle(this.element,&quot;top&quot;)||&quot;0&quot;);if(this.options.mode==&quot;absolute&quot;){this.options.x=this.options.x-this.originalLeft;this.options.y=this.options.y-this.originalTop}},update:function(a){Element.setStyle(this.element,{left:this.options.x*a+this.originalLeft+&quot;px&quot;,top:this.options.y*a+this.originalTop+&quot;px&quot;})}});Effect.MoveBy=function(b,a,d){return new Effect.Move(b,Object.extend({x:d,y:a},arguments[3]||{}))};Effect.Scale=Class.create();Object.extend(Object.extend(Effect.Scale.prototype,Effect.Base.prototype),{initialize:function(b,d){this.element=$(b);var a=Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:&quot;box&quot;,scaleFrom:100,scaleTo:d},arguments[2]||{});this.start(a)},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=Element.getStyle(this.element,&quot;position&quot;);this.originalStyle={};[&quot;top&quot;,&quot;left&quot;,&quot;width&quot;,&quot;height&quot;,&quot;fontSize&quot;].each(function(b){this.originalStyle[b]=this.element.style[b]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=Element.getStyle(this.element,&quot;font-size&quot;)||&quot;100%&quot;;[&quot;em&quot;,&quot;px&quot;,&quot;%&quot;].each(function(b){if(a.indexOf(b)&gt;0){this.fontSize=parseFloat(a);this.fontSizeType=b}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode==&quot;box&quot;){this.dims=[this.element.offsetHeight,this.element.offsetWidth]}if(/^content/.test(this.options.scaleMode)){this.dims=[this.element.scrollHeight,this.element.scrollWidth]}if(!this.dims){this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]}},update:function(a){var b=(this.options.scaleFrom/100)+(this.factor*a);if(this.options.scaleContent&amp;&amp;this.fontSize){Element.setStyle(this.element,{fontSize:this.fontSize*b+this.fontSizeType})}this.setDimensions(this.dims[0]*b,this.dims[1]*b)},finish:function(a){if(this.restoreAfterFinish){Element.setStyle(this.element,this.originalStyle)}},setDimensions:function(a,f){var g={};if(this.options.scaleX){g.width=f+&quot;px&quot;}if(this.options.scaleY){g.height=a+&quot;px&quot;}if(this.options.scaleFromCenter){var e=(a-this.dims[0])/2;var b=(f-this.dims[1])/2;if(this.elementPositioning==&quot;absolute&quot;){if(this.options.scaleY){g.top=this.originalTop-e+&quot;px&quot;}if(this.options.scaleX){g.left=this.originalLeft-b+&quot;px&quot;}}else{if(this.options.scaleY){g.top=-e+&quot;px&quot;}if(this.options.scaleX){g.left=-b+&quot;px&quot;}}}Element.setStyle(this.element,g)}});Effect.Highlight=Class.create();Object.extend(Object.extend(Effect.Highlight.prototype,Effect.Base.prototype),{initialize:function(b){this.element=$(b);var a=Object.extend({startcolor:&quot;#ffff99&quot;},arguments[1]||{});this.start(a)},setup:function(){if(Element.getStyle(this.element,&quot;display&quot;)==&quot;none&quot;){this.cancel();return}this.oldStyle={backgroundImage:Element.getStyle(this.element,&quot;background-image&quot;)};Element.setStyle(this.element,{backgroundImage:&quot;none&quot;});if(!this.options.endcolor){this.options.endcolor=Element.getStyle(this.element,&quot;background-color&quot;).parseColor(&quot;#ffffff&quot;)}if(!this.options.restorecolor){this.options.restorecolor=Element.getStyle(this.element,&quot;background-color&quot;)}this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))},update:function(a){Element.setStyle(this.element,{backgroundColor:$R(0,2).inject(&quot;#&quot;,function(b,d,e){return b+(Math.round(this._base[e]+(this._delta[e]*a)).toColorPart())}.bind(this))})},finish:function(){Element.setStyle(this.element,Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=Class.create();Object.extend(Object.extend(Effect.ScrollTo.prototype,Effect.Base.prototype),{initialize:function(a){this.element=$(a);this.start(arguments[1]||{})},setup:function(){Position.prepare();var b=Position.cumulativeOffset(this.element);if(this.options.offset){b[1]+=this.options.offset}var a=window.innerHeight?window.height-window.innerHeight:document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight);this.scrollStart=Position.deltaY;this.delta=(b[1]&gt;a?a:b[1])-this.scrollStart},update:function(a){Position.prepare();window.scrollTo(Position.deltaX,this.scrollStart+(a*this.delta))}});Effect.Fade=function(element){var oldOpacity=Element.getInlineOpacity(element);var options=Object.extend({from:Element.getOpacity(element)||1,to:0,afterFinishInternal:function(effect){with(Element){if(effect.options.to!=0){return}hide(effect.element);setStyle(effect.element,{opacity:oldOpacity})}}},arguments[1]||{});return new Effect.Opacity(element,options)};Effect.Appear=function(element){var options=Object.extend({from:(Element.getStyle(element,&quot;display&quot;)==&quot;none&quot;?0:Element.getOpacity(element)||0),to:1,beforeSetup:function(effect){with(Element){setOpacity(effect.element,effect.options.from);show(effect.element)}}},arguments[1]||{});return new Effect.Opacity(element,options)};Effect.Puff=function(element){element=$(element);var oldStyle={opacity:Element.getInlineOpacity(element),position:Element.getStyle(element,&quot;position&quot;)};return new Effect.Parallel([new Effect.Scale(element,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(element,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(effect){with(Element){setStyle(effect.effects[0].element,{position:&quot;absolute&quot;})}},afterFinishInternal:function(effect){with(Element){hide(effect.effects[0].element);setStyle(effect.effects[0].element,oldStyle)}}},arguments[1]||{}))};Effect.BlindUp=function(element){element=$(element);Element.makeClipping(element);return new Effect.Scale(element,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(effect){with(Element){[hide,undoClipping].call(effect.element)}}},arguments[1]||{}))};Effect.BlindDown=function(element){element=$(element);var oldHeight=Element.getStyle(element,&quot;height&quot;);var elementDimensions=Element.getDimensions(element);return new Effect.Scale(element,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:elementDimensions.height,originalWidth:elementDimensions.width},restoreAfterFinish:true,afterSetup:function(effect){with(Element){makeClipping(effect.element);setStyle(effect.element,{height:&quot;0px&quot;});show(effect.element)}},afterFinishInternal:function(effect){with(Element){undoClipping(effect.element);setStyle(effect.element,{height:oldHeight})}}},arguments[1]||{}))};Effect.SwitchOff=function(element){element=$(element);var oldOpacity=Element.getInlineOpacity(element);return new Effect.Appear(element,{duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(effect){new Effect.Scale(effect.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(effect){with(Element){[makePositioned,makeClipping].call(effect.element)}},afterFinishInternal:function(effect){with(Element){[hide,undoClipping,undoPositioned].call(effect.element);setStyle(effect.element,{opacity:oldOpacity})}}})}})};Effect.DropOut=function(element){element=$(element);var oldStyle={top:Element.getStyle(element,&quot;top&quot;),left:Element.getStyle(element,&quot;left&quot;),opacity:Element.getInlineOpacity(element)};return new Effect.Parallel([new Effect.Move(element,{x:0,y:100,sync:true}),new Effect.Opacity(element,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(effect){with(Element){makePositioned(effect.effects[0].element)}},afterFinishInternal:function(effect){with(Element){[hide,undoPositioned].call(effect.effects[0].element);setStyle(effect.effects[0].element,oldStyle)}}},arguments[1]||{}))};Effect.Shake=function(element){element=$(element);var oldStyle={top:Element.getStyle(element,&quot;top&quot;),left:Element.getStyle(element,&quot;left&quot;)};return new Effect.Move(element,{x:20,y:0,duration:0.05,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:-40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:40,y:0,duration:0.1,afterFinishInternal:function(effect){new Effect.Move(effect.element,{x:-20,y:0,duration:0.05,afterFinishInternal:function(effect){with(Element){undoPositioned(effect.element);setStyle(effect.element,oldStyle)}}})}})}})}})}})}})};Effect.SlideDown=function(element){element=$(element);Element.cleanWhitespace(element);var oldInnerBottom=Element.getStyle(element.firstChild,&quot;bottom&quot;);var elementDimensions=Element.getDimensions(element);return new Effect.Scale(element,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:elementDimensions.height,originalWidth:elementDimensions.width},restoreAfterFinish:true,afterSetup:function(effect){with(Element){makePositioned(effect.element);makePositioned(effect.element.firstChild);if(window.opera){setStyle(effect.element,{top:&quot;&quot;})}makeClipping(effect.element);setStyle(effect.element,{height:&quot;0px&quot;});show(element)}},afterUpdateInternal:function(effect){with(Element){setStyle(effect.element.firstChild,{bottom:(effect.dims[0]-effect.element.clientHeight)+&quot;px&quot;})}},afterFinishInternal:function(effect){with(Element){undoClipping(effect.element);undoPositioned(effect.element.firstChild);undoPositioned(effect.element);setStyle(effect.element.firstChild,{bottom:oldInnerBottom})}}},arguments[1]||{}))};Effect.SlideUp=function(element){element=$(element);Element.cleanWhitespace(element);var oldInnerBottom=Element.getStyle(element.firstChild,&quot;bottom&quot;);return new Effect.Scale(element,0,Object.extend({scaleContent:false,scaleX:false,scaleMode:&quot;box&quot;,scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(effect){with(Element){makePositioned(effect.element);makePositioned(effect.element.firstChild);if(window.opera){setStyle(effect.element,{top:&quot;&quot;})}makeClipping(effect.element);show(element)}},afterUpdateInternal:function(effect){with(Element){setStyle(effect.element.firstChild,{bottom:(effect.dims[0]-effect.element.clientHeight)+&quot;px&quot;})}},afterFinishInternal:function(effect){with(Element){[hide,undoClipping].call(effect.element);undoPositioned(effect.element.firstChild);undoPositioned(effect.element);setStyle(effect.element.firstChild,{bottom:oldInnerBottom})}}},arguments[1]||{}))};Effect.Squish=function(element){return new Effect.Scale(element,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(effect){with(Element){makeClipping(effect.element)}},afterFinishInternal:function(effect){with(Element){hide(effect.element);undoClipping(effect.element)}}})};Effect.Grow=function(element){element=$(element);var options=Object.extend({direction:&quot;center&quot;,moveTransistion:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},arguments[1]||{});var oldStyle={top:element.style.top,left:element.style.left,height:element.style.height,width:element.style.width,opacity:Element.getInlineOpacity(element)};var dims=Element.getDimensions(element);var initialMoveX,initialMoveY;var moveX,moveY;switch(options.direction){case&quot;top-left&quot;:initialMoveX=initialMoveY=moveX=moveY=0;break;case&quot;top-right&quot;:initialMoveX=dims.width;initialMoveY=moveY=0;moveX=-dims.width;break;case&quot;bottom-left&quot;:initialMoveX=moveX=0;initialMoveY=dims.height;moveY=-dims.height;break;case&quot;bottom-right&quot;:initialMoveX=dims.width;initialMoveY=dims.height;moveX=-dims.width;moveY=-dims.height;break;case&quot;center&quot;:initialMoveX=dims.width/2;initialMoveY=dims.height/2;moveX=-dims.width/2;moveY=-dims.height/2;break}return new Effect.Move(element,{x:initialMoveX,y:initialMoveY,duration:0.01,beforeSetup:function(effect){with(Element){hide(effect.element);makeClipping(effect.element);makePositioned(effect.element)}},afterFinishInternal:function(effect){new Effect.Parallel([new Effect.Opacity(effect.element,{sync:true,to:1,from:0,transition:options.opacityTransition}),new Effect.Move(effect.element,{x:moveX,y:moveY,sync:true,transition:options.moveTransition}),new Effect.Scale(effect.element,100,{scaleMode:{originalHeight:dims.height,originalWidth:dims.width},sync:true,scaleFrom:window.opera?1:0,transition:options.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(effect){with(Element){setStyle(effect.effects[0].element,{height:&quot;0px&quot;});show(effect.effects[0].element)}},afterFinishInternal:function(effect){with(Element){[undoClipping,undoPositioned].call(effect.effects[0].element);setStyle(effect.effects[0].element,oldStyle)}}},options))}})};Effect.Shrink=function(element){element=$(element);var options=Object.extend({direction:&quot;center&quot;,moveTransistion:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},arguments[1]||{});var oldStyle={top:element.style.top,left:element.style.left,height:element.style.height,width:element.style.width,opacity:Element.getInlineOpacity(element)};var dims=Element.getDimensions(element);var moveX,moveY;switch(options.direction){case&quot;top-left&quot;:moveX=moveY=0;break;case&quot;top-right&quot;:moveX=dims.width;moveY=0;break;case&quot;bottom-left&quot;:moveX=0;moveY=dims.height;break;case&quot;bottom-right&quot;:moveX=dims.width;moveY=dims.height;break;case&quot;center&quot;:moveX=dims.width/2;moveY=dims.height/2;break}return new Effect.Parallel([new Effect.Opacity(element,{sync:true,to:0,from:1,transition:options.opacityTransition}),new Effect.Scale(element,window.opera?1:0,{sync:true,transition:options.scaleTransition,restoreAfterFinish:true}),new Effect.Move(element,{x:moveX,y:moveY,sync:true,transition:options.moveTransition})],Object.extend({beforeStartInternal:function(effect){with(Element){[makePositioned,makeClipping].call(effect.effects[0].element)}},afterFinishInternal:function(effect){with(Element){[hide,undoClipping,undoPositioned].call(effect.effects[0].element);setStyle(effect.effects[0].element,oldStyle)}}},options))};Effect.Pulsate=function(d){d=$(d);var b=arguments[1]||{};var a=Element.getInlineOpacity(d);var f=b.transition||Effect.Transitions.sinoidal;var e=function(g){return f(1-Effect.Transitions.pulse(g))};e.bind(f);return new Effect.Opacity(d,Object.extend(Object.extend({duration:3,from:0,afterFinishInternal:function(g){Element.setStyle(g.element,{opacity:a})}},b),{transition:e}))};Effect.Fold=function(element){element=$(element);var oldStyle={top:element.style.top,left:element.style.left,width:element.style.width,height:element.style.height};Element.makeClipping(element);return new Effect.Scale(element,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(effect){new Effect.Scale(element,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(effect){with(Element){[hide,undoClipping].call(effect.element);setStyle(effect.element,oldStyle)}}})}},arguments[1]||{}))};var Search=Class.create();Search.prototype={initialize:function(a){this.parentElement=$(a);this.name=&quot;Search Results:&quot;;this.children=new Array();this.readonly=false;this.open=false;this.createSearch()},createSearch:function(){this.element=document.createElement(&quot;div&quot;);this.span=document.createElement(&quot;span&quot;);this.link=document.createElement(&quot;a&quot;);Element.addClassName(this.element,&quot;directory&quot;);Element.addClassName(this.element,&quot;search&quot;);Element.addClassName(this.span,&quot;search&quot;);this.spinner=document.createElement(&quot;img&quot;);this.spinner.src=spinnerIcon;this.spinner.style.display=&quot;none&quot;;Element.addClassName(this.spinner,&quot;spinner&quot;);this.mark=document.createElement(&quot;img&quot;);this.mark.src=vcollapsed;Element.addClassName(this.mark,&quot;mark&quot;);this.link.href=&quot;javascript:go();&quot;;this.link.innerHTML=this.name;this.display?this.link.innerHTML=this.display:null;Element.addClassName(this.link,&quot;link&quot;);this.del=document.createElement(&quot;a&quot;);this.del.href=&quot;javascript:go()&quot;;this.del.innerHTML=&quot;close&quot;;Element.addClassName(this.del,&quot;del&quot;);this.mark.onclick=this.openOrClose.bind(this);this.span.ondblclick=this.openOrClose.bind(this);this.del.onclick=this.hide.bind(this);this.link.onselectstart=function(){return false};this.span.appendChild(this.link);this.span.appendChild(this.mark);this.span.appendChild(this.del);this.span.appendChild(this.spinner);this.element.appendChild(this.span);this.element.id=&quot;searchresults&quot;;this.element.object=this;this.element.style.display=&quot;none&quot;;this.parentElement.appendChild(this.element)},openOrClose:function(){if(this.open){this.element.style.height=&quot;20px&quot;;this.element.style.overflow=&quot;hidden&quot;;this.mark.src=vcollapsed;this.open=false}else{this.open=true;this.element.style.height=&quot;auto&quot;;this.mark.src=vexpanded}},show:function(){this.element.style.display=&quot;block&quot;},hide:function(){this.open=false;Effect.Fade(this.element.id)},start:function(a){this.clearContents();this.show();this.element.style.height=&quot;auto&quot;;this.mark.src=vexpanded;var b=$(&quot;searchbar&quot;).value||a;this.link.innerHTML=this.name+&quot; &lt;em&gt;&quot;+b+&quot;&lt;/em&gt;&quot;;this.spinner.style.display=&quot;block&quot;;var e=$H({relay:&quot;search&quot;,terms:b});var d=new Ajax.Request(FC.URL,{onSuccess:this.start_handler.bind(this),method:&quot;post&quot;,parameters:e.toQueryString(),onFailusre:function(){showError(ER.ajax)}})},start_handler:function(response){this.open=true;this.spinner.style.display=&quot;none&quot;;this.mark.src=vexpanded;var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);for(var i=0;i&lt;jsonObject.bindings.length;i++){var newFile=new File(jsonObject.bindings[i].id,jsonObject.bindings[i].name,jsonObject.bindings[i].flags,$(&quot;searchresults&quot;),jsonObject.bindings[i].date);this.children.push(newFile)}},clearContents:function(){this.open=false;while(this.children.length&gt;0){this.removeChild(this.children[0],0)}},removeChild:function(d,a){if(!a){for(var b=0;b&lt;this.children.length;b++){if(this.children[b]==d){var a=b;break}}}this.children.splice(a,1);Element.remove(d.element);delete d}};function monitorSearch(b){alert(b);var a=(b.charCode)?b.charCode:((b.which)?b.which:b.keyCode);switch(a){case Event.KEY_RETURN:doSearch();break}}var FC={URL:&quot;/admin/files/fs&quot;,TYPES:new Array(&quot;file&quot;,&quot;directory&quot;),SELECTEDOBJECT:null,SHOWALL:false,SCRIPTSRC:location.href,SEARCHOBJ:null,NEXTPATH:null,AJAXCALL:0,UPLOADURL:&quot;/upload.pl&quot;,DEBUG:false};var Directory=Class.create();Directory.prototype={initialize:function(h,e,b,a,g,d,f){this.path=h;this.type=&quot;directory&quot;;this.name=e;this.id=this.path;this.flag=b;this.virtual=g||false;this.open=false;this.selected=false;this.changed=false;this.timer=null;this.interval=1000;this.children=new Array();this.path==&quot;&quot;?this.isRoot=true:this.isRoot=false;this.parentElement=a;this.parentElement.object?this.parentObject=this.parentElement.object:null;if(d){this.readonly=(d==&quot;read&quot;)}else{if(this.parentObject){this.readonly=this.parentObject.readonly}else{this.readonly=true}}f?this.display=f:null;this.createDirectory();FC.SHOWALL||this.virtual==&quot;true&quot;?this.getContents():this.virtual==&quot;closed&quot;?this.virtual=true:null},createDirectory:function(){this.element=document.createElement(&quot;div&quot;);this.link=document.createElement(&quot;a&quot;);this.icon=document.createElement(&quot;img&quot;);this.handle=document.createElement(&quot;div&quot;);Element.addClassName(this.handle,&quot;handle&quot;);this.spinner=document.createElement(&quot;img&quot;);this.spinner.src=spinnerIcon;this.spinner.style.display=&quot;none&quot;;Element.addClassName(this.spinner,&quot;spinner&quot;);this.span=document.createElement(&quot;span&quot;);this.icon.src=folderIcon;Element.addClassName(this.icon,&quot;icon&quot;);this.mark=document.createElement(&quot;img&quot;);this.virtual?this.mark.src=vcollapsed:this.mark.src=collapsed;Element.addClassName(this.mark,&quot;mark&quot;);this.link.href=&quot;javascript:go();&quot;;this.link.title=this.id;this.link.innerHTML=this.name;this.display?this.link.innerHTML=this.display:null;Element.addClassName(this.link,this.flag);Element.addClassName(this.link,&quot;link&quot;);this.del=document.createElement(&quot;a&quot;);this.del.href=&quot;javascript:go()&quot;;this.del.innerHTML=&quot;delete&quot;;this.del.style.display=&quot;none&quot;;Element.addClassName(this.del,&quot;del&quot;);this.note=document.createElement(&quot;span&quot;);this.note.innerHTML=&quot;(read-only)&quot;;Element.addClassName(this.note,&quot;note&quot;);this.mark.onclick=this.openOrClose.bindAsEventListener(this);this.icon.onmousedown=this.select.bindAsEventListener(this);this.icon.ondblclick=this.openOrClose.bindAsEventListener(this);this.span.onmousedown=this.select.bindAsEventListener(this);this.link.onmousedown=this.select.bindAsEventListener(this);this.span.ondblclick=this.openOrClose.bindAsEventListener(this);!this.readonly?this.del.onclick=this.unlink.bindAsEventListener(this):null;this.link.onselectstart=function(){return false};this.handle.appendChild(this.icon);this.handle.appendChild(this.link);this.span.appendChild(this.mark);this.span.appendChild(this.handle);if(this.readonly){this.span.appendChild(this.note)}if(!this.virtual&amp;&amp;!this.readonly){this.span.appendChild(this.del)}this.span.appendChild(this.spinner);this.element.appendChild(this.span);if(this.isRoot){this.span.style.display=&quot;none&quot;}this.element.id=&quot;root&quot;+this.id;this.element.object=this;Element.addClassName(this.element,this.type);if(this.virtual){Element.addClassName(this.element,&quot;virtual&quot;);Element.addClassName(this.span,&quot;virtual&quot;)}if(this.readonly){Element.addClassName(this.element,&quot;read&quot;);Element.addClassName(this.span,&quot;read&quot;)}this.parentElement.appendChild(this.element);if(!this.isRoot&amp;&amp;!this.readonly){if(!this.virtual){new Draggable(this.element.id,{revert:true,handle:&quot;handle&quot;,scroll:&quot;fileList&quot;})}Droppables.add(this.element.id,{accept:FC.TYPES,hoverclass:&quot;hover&quot;,onDrop:this.moveTo.bind(this)});this.resetHierarchy()}},getContents:function(){if(this.opening){return false}this.opening=true;var a=new Date();var d=$H({relay:&quot;getFolder&quot;,path:this.path,rand:a.getTime()});this.showActivity();var b=new Ajax.Request(FC.URL,{onSuccess:this.getContents_handler.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})},getContents_handler:function(response){this.open=true;Element.addClassName(this.span,&quot;open&quot;);this.opening=false;this.virtual?this.mark.src=vexpanded:this.mark.src=expanded;this.hideActivity();var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);if(jsonObject.bindings.length==0){this.addBlank();return true}if(jsonObject.bindings[0].error){this.parentObject.update()}for(var i=0;i&lt;jsonObject.bindings.length;i++){this.addChild(jsonObject.bindings[i])}if(this.andPick&amp;&amp;i&gt;0){this.children[this.andPick].select()}if(FC.NEXTPATH&amp;&amp;!this.isRoot){parsePath(FC.NEXTPATH)}},update:function(){if(this.open){var a=new Date();var d=$H({relay:&quot;getFolder&quot;,path:this.path,random:a.getTime()});this.showActivity();var b=new Ajax.Request(FC.URL,{onSuccess:this.update_handler.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})}else{this.getContents()}},update_handler:function(response){this.hideActivity();this.open=true;var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);if(jsonObject.bindings.length&gt;0){this.removeBlank()}else{this.addBlank()}for(var i=0;i&lt;this.children.length;i++){var found=false;for(var j=0;j&lt;jsonObject.bindings.length;j++){if(this.children[i].id==jsonObject.bindings[j].id||this.children[i].id==jsonObject.bindings[j].path){found=true;break}}if(found){if(this.children[i].name!=jsonObject.bindings[j].name||this.children[i].flag!=jsonObject.bindings[j].flags&amp;&amp;this.children[i].type==&quot;file&quot;){this.children[i].name=jsonObject.bindings[j].name;this.children[i].flag=jsonObject.bindings[j].flags;this.children[i].refresh()}jsonObject.bindings.splice(j,1)}else{this.removeChild(this.children[i],i);i--}}for(var k=0;k&lt;jsonObject.bindings.length;k++){this.addChild(jsonObject.bindings[k])}if(this.andPick&amp;&amp;i&gt;0){this.children[this.andPick].select()}if(FC.NEXTPATH){parsePath(FC.NEXTPATH)}},openOrClose:function(){this.open?this.clearContents():this.getContents()},resetHierarchy:function(){if(this.parentObject.type==&quot;directory&quot;&amp;&amp;this.parentObject.isRoot==false){Droppables.remove(this.parentElement);Droppables.add(this.parentElement.id,{accept:FC.TYPES,hoverclass:&quot;hover&quot;,onDrop:this.parentObject.moveTo.bind(this.parentObject)});this.parentObject.resetHierarchy()}},clearContents:function(){this.removeBlank();while(this.children.length&gt;0){(this.children[0].type==&quot;directory&quot;&amp;&amp;this.children[0].hasChildren())?this.children[0].clearContents():this.removeChild(this.children[0],0)}this.open=false;Element.removeClassName(this.span,&quot;open&quot;);this.virtual?this.mark.src=vcollapsed:this.mark.src=collapsed},removeChild:function(d,a){if(!a){for(var b=0;b&lt;this.children.length;b++){if(this.children[b]==d){var a=b;break}}}this.children.splice(a,1);if(d.type==&quot;directory&quot;){Droppables.remove(d.id)}Element.remove(d.element)},clear:function(){this.parentObject.removeChild(this)},addChild:function(d){if(d.type==&quot;file&quot;){var a=new File(d.id,d.name,d.flags,this.element,d.date);this.children.push(a)}else{if(d.type==&quot;directory&quot;){var b=new Directory(d.path,d.name,d.flags,this.element,d.virtual,d.scheme,d.displayname);this.children.push(b)}else{return 0}}},moveTo:function(b){Element.removeClassName(this.element,&quot;hover&quot;);if(b.object.parentObject==this){return false}var a=new Date();if(b.object.type==&quot;directory&quot;){var e=$H({relay:&quot;folderMove&quot;,name:b.object.name,path:b.object.parentObject.path,newpath:this.path,random:a.getTime()});FC.SEARCHOBJ=this;FC.NEXTPATH=&quot;/&quot;+b.object.name;b.object.clearContents();b.object.clear();var d=new Ajax.Request(FC.URL,{onSuccess:this.update.bind(this),method:&quot;get&quot;,parameters:e.toQueryString(),onFailure:function(){showError(ER.ajax)}})}else{var e=$H({relay:&quot;fileMove&quot;,fileid:b.object.id,path:this.path,random:a.getTime()});FC.SEARCHOBJ=this;FC.NEXTPATH=&quot;/&quot;+b.object.name;if(!b.object.search){b.object.clear()}var d=new Ajax.Request(FC.URL,{onSuccess:this.update.bind(this),method:&quot;get&quot;,parameters:e.toQueryString(),onFailure:function(){showError(ER.ajax)}})}},select:function(a){$(&quot;uploadPath&quot;).value=this.path;$(&quot;uploadstatus&quot;).innerHTML=&quot;&lt;em&gt;Destination&lt;/em&gt; &lt;span id='dest'&gt;&quot;+this.path+&quot;&lt;/span&gt;&quot;;this.del.style.display=&quot;block&quot;;if(FC.SELECTEDOBJECT!=null&amp;&amp;FC.SELECTEDOBJECT!=this){FC.SELECTEDOBJECT.deselect()}window.onkeypress=this.select_handler.bindAsEventListener(this);FC.SELECTEDOBJECT=this;Element.addClassName(this.span,&quot;selected&quot;);if($(&quot;meta&quot;).prevElement!=this.path){this.getMeta()}return false},select_handler:function(b){var a=(b.charCode)?b.charCode:((b.which)?b.which:b.keyCode);switch(a){case Event.KEY_DOWN:this.parentObject.nextChild(this);break;case Event.KEY_UP:this.parentObject.prevChild(this);break;case Event.KEY_RIGHT:if(this.open){this.children[0].select()}else{this.openOrClose();this.andPick=&quot;0&quot;}break;case Event.KEY_LEFT:this.parentObject.select(this);break}},deselect:function(){this.timer=null;window.onkeypress=null;this.del.style.display=&quot;none&quot;;Element.removeClassName(this.span,&quot;selected&quot;);this.selected=false;this.clearRename()},getMeta:function(){$(&quot;meta&quot;).prevElement=this.path;var a=new Date();var d=$H({relay:&quot;getFolderMeta&quot;,path:this.path,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onLoading:showMetaSpinner(),onSuccess:this.getMeta_handler.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})},getMeta_handler:function(response){var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);if(jsonObject.bindings.length&gt;=1){var meta={name:jsonObject.bindings[0].name,size:jsonObject.bindings[0].size,path:this.path};updateMeta(meta)}else{updateMeta({&quot; &quot;:&quot;No Info to display&quot;})}},nextChild:function(b){var a=this.checkIfChild(b);if(a!=this.children.length-1){this.children[a+1].select()}else{if(!this.isRoot){this.parentObject.nextChild(this)}}},prevChild:function(b){var a=this.checkIfChild(b);if(a!=0){this.children[a-1].select()}else{if(a==0&amp;&amp;!this.isRoot){this.select()}}},checkIfChild:function(b){if(this.hasChildren()){for(var a=0;a&lt;this.children.length;a++){if(this.children[a].id==b.id){return a}}return false}else{return false}},clearRename:function(){if(this.renameIsOpen){Element.remove(this.newName);this.link.style.display=&quot;block&quot;;this.renameIsOpen=false}},rename_handler:function(b,f){if(!f){var a=(b.charCode)?b.charCode:((b.which)?b.which:b.keyCode);if(a==Event.KEY_ESC){this.clearRename()}}if(a==Event.KEY_RETURN||f){rand_date=new Date();var e=$H({relay:&quot;folderRename&quot;,path:this.parentObject.path,name:this.name,newname:f||this.newName.value,random:rand_date.getTime()});this.link.innerHTML=e.newname;this.clearRename();var d=new Ajax.Request(FC.URL,{onComplete:this.select.bind(this),onSuccess:this.parentObject.update.bind(this.parentObject),method:&quot;get&quot;,parameters:e.toQueryString(),onFailure:function(){showError(ER.ajax)}})}},showRename:function(){if(this.readonly){return false}if(this.virtual){return false}this.renameIsOpen=true;this.newName=document.createElement(&quot;input&quot;);this.newName.type=&quot;text&quot;;this.newName.name=this.id;this.newName.value=this.name;window.onkeypress=this.rename_handler.bindAsEventListener(this);Element.addClassName(this.newName,&quot;renamefield&quot;);this.link.style.display=&quot;none&quot;;this.span.appendChild(this.newName);Field.select(this.newName)},showActivity:function(){this.spinner.style.display=&quot;block&quot;},hideActivity:function(){this.spinner.style.display=&quot;none&quot;},hasChildren:function(){if(this.children.length&gt;0){return true}else{return false}},unlink:function(){if(this.readonly){return false}if(this.virtual){return false}if(confirm(&quot;delete the folder &quot;+this.name+&quot;?&quot;)){var a=new Date();var d=$H({relay:&quot;folderDelete&quot;,folder:this.path,random:a.getTime()});this.parentObject.prevChild(this);var b=new Ajax.Request(FC.URL,{onComplete:this.parentObject.nextChild(this),onSuccess:this.clear.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})}},addBlank:function(){if(this.blankisshowing){return false}this.blankisshowing=true;this.blank=document.createElement(&quot;div&quot;);this.blank.innerHTML=&quot;This folder is empty&quot;;Element.addClassName(this.blank,&quot;blank&quot;);this.element.appendChild(this.blank)},removeBlank:function(){if(this.blankisshowing){Element.remove(this.blank);this.blankisshowing=false}}};var File=Class.create();File.prototype={initialize:function(f,e,b,a,d){this.type=&quot;file&quot;;this.fileDate=d;this.name=e;this.id=f;this.flag=b;this.selected=false;this.timer=null;this.interval=1000;this.parentElement=a;this.parentObject=a.object;this.readonly=this.parentObject.readonly;this.parentElement.id==&quot;searchresults&quot;?this.search=true:this.search=false;this.createFile()},createFile:function(){this.element=document.createElement(&quot;div&quot;);this.span=document.createElement(&quot;span&quot;);this.link=document.createElement(&quot;a&quot;);this.icon=document.createElement(&quot;img&quot;);this.handle=document.createElement(&quot;div&quot;);Element.addClassName(this.handle,&quot;handle&quot;);this.flag!=&quot;normal&quot;?this.icon.src=&quot;/images/fs/&quot;+this.flag+&quot;.png&quot;:this.icon.src=fileIcon;Element.addClassName(this.icon,&quot;icon&quot;);this.link.title=this.id;this.link.innerHTML=this.name;Element.addClassName(this.link,this.flag);Element.addClassName(this.link,&quot;link&quot;);this.date=document.createElement(&quot;span&quot;);this.date.innerHTML=this.fileDate;Element.addClassName(this.date,&quot;date&quot;);this.dl=document.createElement(&quot;a&quot;);this.dl.href=&quot;javascript:go()&quot;;this.dl.style.display=&quot;none&quot;;this.dl.title=&quot;Add &quot;+this.name+&quot; to the download queue&quot;;Element.addClassName(this.dl,&quot;add&quot;);this.del=document.createElement(&quot;a&quot;);this.del.href=&quot;javascript:go()&quot;;this.del.style.display=&quot;none&quot;;this.del.title=&quot;Delete &quot;+this.name;this.del.innerHTML=&quot;&amp;nbsp;&amp;nbsp;delete&quot;;Element.addClassName(this.del,&quot;del&quot;);this.span.onmousedown=this.select.bind(this);this.link.onmousedown=this.select.bindAsEventListener(this);this.icon.onmousedown=this.select.bind(this);this.link.ondblclick=this.download.bindAsEventListener(this);this.icon.ondblclick=this.download.bindAsEventListener(this);this.dl.onclick=this.addDl.bind(this);this.del.onclick=this.unlink.bind(this);this.handle.appendChild(this.icon);this.handle.appendChild(this.link);this.span.appendChild(this.handle);this.span.appendChild(this.date);if(!this.readonly){this.span.appendChild(this.del)}this.span.appendChild(this.dl);this.element.appendChild(this.span);this.search?this.element.id=&quot;sid&quot;+this.id:this.element.id=&quot;fid&quot;+this.id;this.element.object=this;Element.addClassName(this.element,&quot;file&quot;);this.parentElement.appendChild(this.element);!this.readonly?new Draggable(this.element.id,{revert:true,handle:&quot;handle&quot;}):null},appearTools:function(){Effect.Appear(this.del.id)},fadeTools:function(){this.del.style.display=&quot;none&quot;},addDl:function(){cart.add(this.element)},download:function(){location.href=FC.URL+&quot;?relay=getFile&amp;fileid=&quot;+this.id},refresh:function(){this.link.className=&quot;link&quot;;this.link.innerHTML=this.name;this.flag!=&quot;normal&quot;?this.icon.src=&quot;/images/fs/&quot;+this.flag+&quot;.png&quot;:this.icon.src=fileIcon;Element.addClassName(this.link,this.flag)},select:function(a){$(&quot;uploadPath&quot;).value=this.parentObject.path;$(&quot;uploadstatus&quot;).innerHTML=&quot;&lt;em&gt;Destination&lt;/em&gt; &lt;span id='dest'&gt;&quot;+this.parentObject.path+&quot;&lt;/span&gt;&quot;;this.del.style.display=this.dl.style.display=&quot;block&quot;;if(FC.SELECTEDOBJECT!=null&amp;&amp;FC.SELECTEDOBJECT!=this){FC.SELECTEDOBJECT.deselect()}window.onkeypress=this.select_handler.bindAsEventListener(this);FC.SELECTEDOBJECT=this;Element.addClassName(this.span,&quot;selected&quot;);if($(&quot;meta&quot;).prevElement!=this.id){this.getMeta()}return false},select_handler:function(b){var a=(b.charCode)?b.charCode:((b.which)?b.which:b.keyCode);if(a==Event.KEY_DOWN){this.parentObject.nextChild(this)}else{if(a==Event.KEY_UP){this.parentObject.prevChild(this)}else{if(a==Event.KEY_LEFT){this.parentObject.select(this)}}}},deselect:function(){this.timer=null;window.onkeypress=null;this.del.style.display=this.dl.style.display=&quot;none&quot;;Element.removeClassName(this.span,&quot;selected&quot;);this.selected=false;this.clearRename()},getMeta:function(){$(&quot;meta&quot;).prevElement=this.id;var a=new Date();var d=$H({relay:&quot;getMeta&quot;,fileid:this.id,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onLoading:showMetaSpinner(),onSuccess:this.getMeta_handler.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})},getMeta_handler:function(response){var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);var meta={edit:jsonObject.bindings[0].edit,filename:jsonObject.bindings[1].filename,date:jsonObject.bindings[1].date,downloads:jsonObject.bindings[1].downloads,flag:jsonObject.bindings[1].flags,type:jsonObject.bindings[1].type||&quot;Document&quot;,description:jsonObject.bindings[1].description,size:jsonObject.bindings[1].size,file:true,id:this.id,image:jsonObject.bindings[1].image,path:jsonObject.bindings[1].path,resolution:jsonObject.bindings[1].resolution};updateMeta(meta)},clear:function(){for(var a=0;a&lt;this.parentObject.children.length;a++){if(this.parentObject.children[a]==this){this.parentObject.children.splice(a,1);break}}Element.remove(this.element)},unlink:function(){if(this.readonly){return false}var a=new Date();var d=$H({relay:&quot;fileDelete&quot;,fileid:this.id,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onComplete:this.parentObject.nextChild(this),onSuccess:this.clear.bind(this),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})},clearRename:function(){if(this.renameIsOpen){this.newName.style.display=&quot;none&quot;;Element.remove(this.newName);this.link.style.display=&quot;block&quot;;this.renameIsOpen=false;this.getMeta()}},rename_handler:function(d){var b=(d.charCode)?d.charCode:((d.which)?d.which:d.keyCode);if(b==Event.KEY_ESC){this.clearRename()}if(b==Event.KEY_RETURN){var a=new Date();var f=$H({relay:&quot;fileRename&quot;,fileid:this.id,filename:this.newName.value,random:a.getTime()});this.link.innerHTML=this.newName.value;this.name=this.newName.value;var e=new Ajax.Request(FC.URL,{onComplete:this.clearRename.bind(this),onSuccess:this.refresh.bind(this),method:&quot;get&quot;,parameters:f.toQueryString(),onFailure:function(){showError(ER.ajax)}})}},showRename:function(){if(this.readonly){return false}this.renameIsOpen=true;this.newName=document.createElement(&quot;input&quot;);this.newName.type=&quot;text&quot;;this.newName.size=&quot;40&quot;;this.newName.name=this.id;this.newName.value=this.name;window.onkeypress=this.rename_handler.bindAsEventListener(this);Element.addClassName(this.newName,&quot;renamefield&quot;);this.link.style.display=&quot;none&quot;;this.span.appendChild(this.newName);this.newName.focus();this.newName.select()},update:function(){this.parentObject.update()}};updateMeta=function(e){e=$H(e);$(&quot;meta&quot;).innerHTML=&quot;&quot;;var d=e.path.replace(&quot;/&quot;,&quot; /&quot;);if(e.file){var b=hotflag=emergencyflag=&quot;&quot;;switch(e.flag){case&quot;normal&quot;:b=&quot;selected&quot;;break;case&quot;hot&quot;:hotflag=&quot;selected&quot;;break;case&quot;emergency&quot;:emergencyflag=&quot;selected&quot;;break}var a='&lt;option label=&quot;Normal&quot; value=&quot;normal&quot; '+b+' &gt;Normal&lt;/option&gt;&lt;option label=&quot;Hot&quot; value=&quot;hot&quot; '+hotflag+' &gt;Hot&lt;/option&gt;&lt;option label=&quot;Emergency&quot; value=&quot;emergency&quot; '+emergencyflag+&quot;&gt;Emergency&lt;/option&gt;&quot;;if(e.image==&quot;1&quot;){$(&quot;meta&quot;).innerHTML+='&lt;div class=&quot;thumbbox&quot;&gt;&lt;a href=&quot;'+FC.URL+&quot;?relay=getFile&amp;fileid=&quot;+e.id+&quot;&amp;rand=&quot;+Math.random()+'&quot; &gt;&lt;img src=&quot;'+FC.URL+&quot;?relay=getThumb&amp;fileid=&quot;+e.id+&quot;&amp;rand=&quot;+Math.random()+'&quot; class=&quot;metaThumbnail&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;/admin/files/edit/'+e.id+'&quot; class=&quot;edit_me_img&quot;&gt;Edit Image&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align:center; padding:2px;&quot;&gt;'+e.resolution+&quot;&lt;/div&gt;&quot;}$(&quot;meta&quot;).innerHTML+=' &lt;table&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Name&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;filename&quot; onfocus=&quot;window.onkeypress=\'null\'&quot;; id=&quot;metaFilename&quot; value=&quot;'+e.filename+'&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Kind&lt;/td&gt;&lt;td&gt;'+e.type+'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Size&lt;/td&gt;&lt;td&gt;'+e.size+'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Date&lt;/td&gt;&lt;td&gt;'+e.date+'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Where&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;width:115px; overflow:hidden&quot;&gt;&lt;a href=&quot;/'+e.path+&quot;/&quot;+e.filename+'&quot;&gt;'+d+&quot; /&quot;+e.filename+'&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Flag&lt;/td&gt;&lt;td&gt;&lt;select id=&quot;metaFlag&quot; name=&quot;metaFlag&quot; id=&quot;metaFlag&quot;&gt;'+a+'&lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;textarea name=&quot;description&quot; onfocus=&quot;window.onkeypress=\'null\'&quot;; id=&quot;metaDesc&quot;&gt;'+e.description+'&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td class=&quot;l&quot;&gt;&lt;a href=&quot;#&quot; onclick=&quot;saveMeta(); return false&quot;&gt;&lt;img src=&quot;'+saveIcon+'&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;'}else{if(FC.SELECTEDOBJECT.virtual){$(&quot;meta&quot;).innerHTML='&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Name&lt;/td&gt;&lt;td&gt;'+e.name+'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Size&lt;/td&gt;&lt;td&gt;'+e.size+&quot;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&quot;}else{$(&quot;meta&quot;).innerHTML='&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Name&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; id=&quot;folderMeta&quot; name=&quot;folderMeta&quot; value=&quot;'+e.name+'&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Kind&lt;/td&gt;&lt;td&gt;Folder&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Size&lt;/td&gt;&lt;td&gt;'+e.size+'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Location&lt;/td&gt;&lt;td&gt;&lt;div style=&quot;width:115px; overflow:hidden&quot;&gt;'+d+'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;l&quot;&gt;Label&lt;/td&gt;&lt;td&gt;Normal&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;#&quot; onclick=&quot;saveMeta(); return false&quot;&gt;&lt;img src=&quot;'+saveIcon+'&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;'}}};rotate_image=function(e,d){var a=new Date();href=&quot;/admin/files/rotate/&quot;+e+&quot;?angle=&quot;+d+&quot;&amp;random_time=&quot;+a.getTime();var b=new Ajax.Request(href,{onComplete:FC.SELECTEDOBJECT.getMeta()});return false};resize_image=function(e,d){var a=new Date();href=&quot;/admin/files/resize/&quot;+e+&quot;?percent=&quot;+d+&quot;&amp;random_time=&quot;+a.getTime();var b=new Ajax.Request(href,{onComplete:FC.SELECTEDOBJECT.getMeta()});return false};saveMeta=function(){if(FC.SELECTEDOBJECT.type==&quot;directory&quot;){FC.SELECTEDOBJECT.rename_handler(&quot;&quot;,$(&quot;folderMeta&quot;).value);return false}var d=$(&quot;metaFilename&quot;).value;var e=$(&quot;metaFlag&quot;).options[$(&quot;metaFlag&quot;).selectedIndex].value;var b=$(&quot;metaDesc&quot;).value;FC.SELECTEDOBJECT.name=d;FC.SELECTEDOBJECT.flag=e;var a=new Date();var g=$H({relay:&quot;setMeta&quot;,fileid:FC.SELECTEDOBJECT.id,filename:d,description:b,flags:e,random:a.getTime()});var f=new Ajax.Request(FC.URL,{onComplete:function(){$(&quot;metaSave&quot;).style.display=&quot;block&quot;;Effect.Fade(&quot;metaSave&quot;,{duration:3})},onSuccess:FC.SELECTEDOBJECT.refresh.bind(FC.SELECTEDOBJECT),method:&quot;get&quot;,parameters:g.toQueryString(),onFailure:function(){showError(ER.ajax)}})};function showMetaSpinner(){$(&quot;meta&quot;).innerHTML='&lt;div style=&quot;border-bottom:0;&quot; class=&quot;thumbbox&quot;&gt;&lt;img src=&quot;'+spinnerIcon+'&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;'}function parsePath(d){var e=d.split(&quot;/&quot;);var b=$A(FC.SEARCHOBJ.children);var a=b.detect(function(g,f){if(g.name==e[1]){return true}else{return false}});if(e[2]){FC.NEXTPATH=d.replace(&quot;/&quot;+e[1],&quot;&quot;);if(a){if(a.open){FC.SEARCHOBJ.hideActivity();FC.SEARCHOBJ=a;parsePath(FC.NEXTPATH)}else{FC.SEARCHOBJ.hideActivity();a.update();FC.SEARCHOBJ=a}}else{FC.NEXTPATH=null;return showError(ER.parsePath)}}else{FC.SEARCHOBJ=null;FC.NEXTPATH=null;a.select()}}function getQuery(a){var b=window.location.search.substring(1);b=b.toQueryParams();if(b[a]){FC.NEXTPATH=decodeURIComponent(b[a]);FC.SEARCHOBJ=root}return true}function jumpTo(a){a=decodeURI(a);FC.SEARCHOBJ=root;FC.NEXTPATH=a;parsePath(a)}function go(){}function newFolder(){if(FC.SELECTEDOBJECT==null){return false}if(FC.SELECTEDOBJECT.type==&quot;file&quot;){c=FC.SELECTEDOBJECT.parentObject}else{c=FC.SELECTEDOBJECT}var e=&quot;Untitled Folder&quot;;FC.NEXTPATH=&quot;/&quot;+e;FC.SEARCHOBJ=c;var a=new Date();var d=$H({relay:&quot;newFolder&quot;,name:e,path:c.path,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onSuccess:setTimeout(&quot;c.update()&quot;,100),method:&quot;get&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})}uploadDestination=null;function uploadAuth(){if(QFiles.length==0){return false}if(!FC.SELECTEDOBJECT){return false}if(FC.SELECTEDOBJECT.type==&quot;file&quot;){uploadDestination=FC.SELECTEDOBJECT.parentObject}else{uploadDestination=FC.SELECTEDOBJECT}var a=new Date();var d=$H({relay:&quot;uploadAuth&quot;,path:uploadDestination.path,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onSuccess:uploadAuth_handler,method:&quot;post&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})}function uploadAuth_handler(response){var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);var auth=jsonObject.bindings[0];if(auth.auth==&quot;true&quot;){sendUpload(auth.sessionid)}else{showError(ER.upload)}}function sendUpload(b){var a=FC.UPLOADURL+&quot;?&quot;+b;$(&quot;uploadForm&quot;).action=a;$(&quot;uploadForm&quot;).submit();$(&quot;uploadSubmit&quot;).src=uploadCancel;$(&quot;uploadSubmit&quot;).onclick=uploadStop;Element.toggle(&quot;uploadAdd&quot;);$(&quot;pgfg&quot;).style.width=&quot;1px&quot;;Effect.Appear(&quot;progress&quot;);window.setTimeout(&quot;uploadStatus()&quot;,500)}function uploadStatus(){var a=new Date();var d=$H({relay:&quot;uploadSmart&quot;,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onSuccess:uploadStatus_handler,method:&quot;post&quot;,parameters:d.toQueryString(),onFailure:function(){showError(ER.ajax)}})}uc=0;change=0;currentsize=0;destination=0;pginterval=2000;refresh=20;pgwidth=180;function uploadStatus_handler(response){var json_data=response.responseText;eval(&quot;var jsonObject = (&quot;+json_data+&quot;)&quot;);var progress=jsonObject.bindings[0];if(progress.done==&quot;false&quot;){window.setTimeout(&quot;uploadStatus()&quot;,1800);if(FC.PG){clearInterval(FC.PG)}var p=pgwidth*progress.percent;$(&quot;pgfg&quot;).style.width=p+&quot;px&quot;;currentsize=p;var pixels=progress.percentSec*pgwidth;change=pixels/refresh;destination=currentsize+pixels;FC.PG=setInterval(&quot;updatePgFg()&quot;,pginterval/refresh);$(&quot;pgsp&quot;).innerHTML=progress.speed;$(&quot;pgeta&quot;).innerHTML=progress.secondsLeft}else{uploadFinish()}}function updatePgFg(){if(currentsize&lt;destination){uc++;currentsize=currentsize+change;if(currentsize&lt;pgwidth){$(&quot;pgpc&quot;).innerHTML=parseInt((currentsize/pgwidth)*100)+&quot;%&quot;;$(&quot;pgfg&quot;).style.width=currentsize+&quot;px&quot;}}}function uploadFinish(a){change=0;currentsize=0;destination=0;clearInterval(FC.PG);if(a){$(&quot;pgpc&quot;).innerHTML=&quot;Canceled&quot;}else{$(&quot;pgpc&quot;).innerHTML=&quot;100%&quot;}$(&quot;uploadSubmit&quot;).src=uploadBtn;$(&quot;uploadSubmit&quot;).onclick=uploadAuth;Element.toggle(&quot;uploadAdd&quot;);$(&quot;pgfg&quot;).style.width=pgwidth+&quot;px&quot;;Effect.Fade(&quot;progress&quot;);uploadDestination.update();clearQ()}function uploadStop(){$(&quot;uploadiframe&quot;).src=&quot;about:blank&quot;;uploadFinish(true)}function unlink(){FC.SELECTEDOBJECT?FC.SELECTEDOBJECT.unlink():null}function download(){FC.SELECTEDOBJECT?(FC.SELECTEDOBJECT.type==&quot;file&quot;?FC.SELECTEDOBJECT.download():null):null}function updateAll(a){if(a.open&amp;&amp;a.type==&quot;directory&quot;){for(i in a.children){updateAll(a.children[i])}a.update()}}function openAll(){FC.SHOWALL=true;root.clearContents();root.getContents();return false}function closeAll(){FC.SHOWALL=false;root.clearContents();root.getContents();return false}QFiles=new Array();function getRandom(){return Math.round(Math.random()*1000)}function clearQ(){for(var a=0;a&lt;QFiles.length;a++){QFiles[a].remove()}Effect.Fade(&quot;uploadSubmit&quot;);$(&quot;uploadQ&quot;).style.height=&quot;28px&quot;;QFiles=new Array()}var Cart=Class.create();Cart.prototype={initialize:function(){this.element=$(&quot;cart&quot;);this.children=new Array();this.confirm=$(&quot;emailconfirm&quot;);Droppables.add(&quot;cart&quot;,{accept:&quot;file&quot;,hoverclass:&quot;hover&quot;,onDrop:this.add.bind(this)})},add:function(d){var a=d.object.name;var e=d.object.id;for(var b=0;b&lt;this.children.length;b++){if(e==this.children[b]){return false}}row=document.createElement(&quot;div&quot;);row.id=&quot;c&quot;+e;row.innerHTML=&quot;&lt;div&gt;&quot;+a+&quot;&lt;/div&gt;&quot;;row.innerHTML+='&lt;a href=&quot;#&quot; onclick=&quot;cart.remove(\''+e+'\'); return false&quot; class=&quot;remove&quot;&gt;&lt;/a&gt;';this.element.appendChild(row);this.children[this.children.length]=e},addSpecial:function(b,d){var a={object:{name:d,id:b}};cart.add(a)},remove:function(b){for(var a=0;a&lt;this.children.length;a++){if(b==this.children[a]){this.children.splice(a,1);Element.remove(&quot;c&quot;+b);break}}},download:function(){if(this.children.length==0&amp;&amp;FC.SELECTEDOBJECT==null){return false}if(this.children.length==0&amp;&amp;FC.SELECTEDOBJECT){FC.SELECTEDOBJECT.download();return false}var b=&quot;&quot;;for(var a=0;a&lt;this.children.length;a++){if(this.children[a]!=&quot;&quot;){b+=this.children[a];if(a!=this.children.length-1){b+=&quot;,&quot;}}}for(var a=0;a&lt;this.children.length;a++){Element.remove(&quot;c&quot;+this.children[a])}this.children=new Array();if($(&quot;emailFormTo&quot;).value!=&quot;&quot;&amp;&amp;$(&quot;emailFormTo&quot;).value!=&quot;Type email address&quot;){this.email(b)}else{location.href=FC.URL+&quot;?relay=getFilePackage&amp;fileid=&quot;+b}},email:function(d){var a=new Date();var e=$H({relay:&quot;emailFilePackage&quot;,to:$(&quot;emailFormTo&quot;).value,from:$(&quot;emailFormFrom&quot;).value,message:$(&quot;emailFormMessage&quot;).value,fileid:d,random:a.getTime()});var b=new Ajax.Request(FC.URL,{onSuccess:this.email_handler.bind(this),method:&quot;get&quot;,parameters:e.toQueryString()})},email_handler:function(){this.hideEmail();Effect.Appear(this.confirm);setTimeout(&quot;Effect.Fade('emailconfirm');&quot;,2000)},showEmail:function(){Effect.Appear(&quot;emailform&quot;)},hideEmail:function(){Effect.Fade(&quot;emailform&quot;)}};var ER={auth:'You don\'t have authorization to use this app. Please try &lt;a href=&quot;login.htm&quot;&gt;logging in&lt;/a&gt; again',ajax:&quot;Unable to make a connection to the server&quot;,upload:&quot;Can't upload to this folder. You may not have write privileges&quot;,download:&quot;Your download cart is empty&quot;,parsePath:&quot;The file you are looking for is not there&quot;};showError=function(a){$(&quot;error&quot;).innerHTML=&quot;&lt;p&gt;&quot;+a+'&lt;/p&gt;&lt;a href=&quot;#&quot; class=&quot;close&quot; onclick=&quot;Effect.toggle(\'error\', \'appear\'); return false&quot; /&gt;close&lt;/a&gt;';Effect.Appear(&quot;error&quot;);return false};showLogin=function(){$(&quot;login&quot;).style.display=&quot;block&quot;};function submitenter(d,b){var a;if(window.event){a=window.event.keyCode}else{if(b){a=b.which}else{return true}}if(a==13){userLogin();return false}else{return true}}search=null;cart=null;root=null;windowLoader=function(){search=new Search(&quot;searcharea&quot;);root=new Directory(&quot;&quot;,&quot;&quot;,false,$(&quot;fileList&quot;));root.getContents();getQuery(&quot;path&quot;);setInterval(&quot;updateAll(root)&quot;,60000)};window.onload=windowLoader;
\ No newline at end of file</diff>
      <filename>resources/public/javascripts/build/jquery.126.files.min.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,4 @@
-/*
- * 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 l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^&lt;]*(&lt;(.|\s)+&gt;)[^&gt;]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E===&quot;string&quot;){var G=D.exec(E);if(G&amp;&amp;(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&amp;&amp;I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&amp;&amp;E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:&quot;&quot;,jquery:&quot;1.3.2&quot;,size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H===&quot;find&quot;){G.selector=this.selector+(this.selector?&quot; &quot;:&quot;&quot;)+E}else{if(H){G.selector=this.selector+&quot;.&quot;+H+&quot;(&quot;+E+&quot;)&quot;}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&amp;&amp;E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F===&quot;string&quot;){if(H===g){return this[0]&amp;&amp;o[G||&quot;attr&quot;](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E==&quot;width&quot;||E==&quot;height&quot;)&amp;&amp;parseFloat(F)&lt;0){F=g}return this.attr(E,F,&quot;curCSS&quot;)},text:function(F){if(typeof F!==&quot;object&quot;&amp;&amp;F!=null){return this.empty().append((this[0]&amp;&amp;this[0].ownerDocument||document).createTextNode(F))}var E=&quot;&quot;;o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],&quot;find&quot;,E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),&quot;find&quot;,E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&amp;&amp;!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement(&quot;div&quot;);J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;).replace(/^\s*/,&quot;&quot;)])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find(&quot;*&quot;).andSelf(),F=0;E.find(&quot;*&quot;).andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],&quot;events&quot;);for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&amp;&amp;o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),&quot;filter&quot;,E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&amp;&amp;H.ownerDocument){if(G?G.index(H)&gt;-1:o(H).is(E)){o.data(H,&quot;closest&quot;,F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E===&quot;string&quot;){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),&quot;not&quot;,E)}else{E=o.multiFilter(E,this)}}var F=E.length&amp;&amp;E[E.length-1]!==g&amp;&amp;!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)&lt;0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E===&quot;string&quot;?o(E):o.makeArray(E))))},is:function(E){return !!E&amp;&amp;o.multiFilter(E,this).length&gt;0},hasClass:function(E){return !!E&amp;&amp;this.is(&quot;.&quot;+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,&quot;option&quot;)){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,&quot;select&quot;)){var I=E.selectedIndex,L=[],M=E.options,H=E.type==&quot;select-one&quot;;if(I&lt;0){return null}for(var F=H?I:0,J=H?I+1:M.length;F&lt;J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||&quot;&quot;).replace(/\r/g,&quot;&quot;)}return g}if(typeof K===&quot;number&quot;){K+=&quot;&quot;}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&amp;&amp;/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)&gt;=0||o.inArray(this.name,K)&gt;=0)}else{if(o.nodeName(this,&quot;select&quot;)){var N=o.makeArray(K);o(&quot;option&quot;,this).each(function(){this.selected=(o.inArray(this.value,N)&gt;=0||o.inArray(this.text,N)&gt;=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),&quot;slice&quot;,Array.prototype.slice.call(arguments).join(&quot;,&quot;))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G&lt;E;G++){L.call(K(this[G],H),this.length&gt;1||G&gt;0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&amp;&amp;o.nodeName(N,&quot;table&quot;)&amp;&amp;o.nodeName(O,&quot;tr&quot;)?(N.getElementsByTagName(&quot;tbody&quot;)[0]||N.appendChild(N.ownerDocument.createElement(&quot;tbody&quot;))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:&quot;script&quot;})}else{o.globalEval(F.text||F.textContent||F.innerHTML||&quot;&quot;)}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J===&quot;boolean&quot;){E=J;J=arguments[1]||{};H=2}if(typeof J!==&quot;object&quot;&amp;&amp;!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H&lt;I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&amp;&amp;L&amp;&amp;typeof L===&quot;object&quot;&amp;&amp;!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)===&quot;[object Function]&quot;},isArray:function(E){return s.call(E)===&quot;[object Array]&quot;},isXMLDoc:function(E){return E.nodeType===9&amp;&amp;E.documentElement.nodeName!==&quot;HTML&quot;||!!E.ownerDocument&amp;&amp;o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&amp;&amp;/\S/.test(G)){var F=document.getElementsByTagName(&quot;head&quot;)[0]||document.documentElement,E=document.createElement(&quot;script&quot;);E.type=&quot;text/javascript&quot;;if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&amp;&amp;F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H&lt;I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H&lt;I&amp;&amp;K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I===&quot;number&quot;&amp;&amp;G==&quot;curCSS&quot;&amp;&amp;!b.test(E)?I+&quot;px&quot;:I},className:{add:function(E,F){o.each((F||&quot;&quot;).split(/\s+/),function(G,H){if(E.nodeType==1&amp;&amp;!o.className.has(E.className,H)){E.className+=(E.className?&quot; &quot;:&quot;&quot;)+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(&quot; &quot;):&quot;&quot;}},has:function(F,E){return F&amp;&amp;o.inArray(E,(F.className||F).toString().split(/\s+/))&gt;-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F==&quot;width&quot;||F==&quot;height&quot;){var L,G={position:&quot;absolute&quot;,visibility:&quot;hidden&quot;,display:&quot;block&quot;},K=F==&quot;width&quot;?[&quot;Left&quot;,&quot;Right&quot;]:[&quot;Top&quot;,&quot;Bottom&quot;];function I(){L=F==&quot;width&quot;?H.offsetWidth:H.offsetHeight;if(E===&quot;border&quot;){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,&quot;padding&quot;+this,true))||0}if(E===&quot;margin&quot;){L+=parseFloat(o.curCSS(H,&quot;margin&quot;+this,true))||0}else{L-=parseFloat(o.curCSS(H,&quot;border&quot;+this+&quot;Width&quot;,true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F==&quot;opacity&quot;&amp;&amp;!o.support.opacity){L=o.attr(E,&quot;opacity&quot;);return L==&quot;&quot;?&quot;1&quot;:L}if(F.match(/float/i)){F=w}if(!G&amp;&amp;E&amp;&amp;E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F=&quot;float&quot;}F=F.replace(/([A-Z])/g,&quot;-$1&quot;).toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F==&quot;opacity&quot;&amp;&amp;L==&quot;&quot;){L=&quot;1&quot;}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&amp;&amp;/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+&quot;px&quot;;E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement===&quot;undefined&quot;){K=K.ownerDocument||K[0]&amp;&amp;K[0].ownerDocument||document}if(!I&amp;&amp;F.length===1&amp;&amp;typeof F[0]===&quot;string&quot;){var H=/^&lt;(\w+)\s*\/?&gt;$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement(&quot;div&quot;);o.each(F,function(P,S){if(typeof S===&quot;number&quot;){S+=&quot;&quot;}if(!S){return}if(typeof S===&quot;string&quot;){S=S.replace(/(&lt;(\w+)[^&gt;]*?)\/&gt;/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+&quot;&gt;&lt;/&quot;+T+&quot;&gt;&quot;});var O=S.replace(/^\s+/,&quot;&quot;).substring(0,10).toLowerCase();var Q=!O.indexOf(&quot;&lt;opt&quot;)&amp;&amp;[1,&quot;&lt;select multiple='multiple'&gt;&quot;,&quot;&lt;/select&gt;&quot;]||!O.indexOf(&quot;&lt;leg&quot;)&amp;&amp;[1,&quot;&lt;fieldset&gt;&quot;,&quot;&lt;/fieldset&gt;&quot;]||O.match(/^&lt;(thead|tbody|tfoot|colg|cap)/)&amp;&amp;[1,&quot;&lt;table&gt;&quot;,&quot;&lt;/table&gt;&quot;]||!O.indexOf(&quot;&lt;tr&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&quot;,&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;]||(!O.indexOf(&quot;&lt;td&quot;)||!O.indexOf(&quot;&lt;th&quot;))&amp;&amp;[3,&quot;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&quot;,&quot;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&quot;]||!O.indexOf(&quot;&lt;col&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;colgroup&gt;&quot;,&quot;&lt;/colgroup&gt;&lt;/table&gt;&quot;]||!o.support.htmlSerialize&amp;&amp;[1,&quot;div&lt;div&gt;&quot;,&quot;&lt;/div&gt;&quot;]||[0,&quot;&quot;,&quot;&quot;];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/&lt;tbody/i.test(S),N=!O.indexOf(&quot;&lt;table&quot;)&amp;&amp;!R?L.firstChild&amp;&amp;L.firstChild.childNodes:Q[1]==&quot;&lt;table&gt;&quot;&amp;&amp;!R?L.childNodes:[];for(var M=N.length-1;M&gt;=0;--M){if(o.nodeName(N[M],&quot;tbody&quot;)&amp;&amp;!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&amp;&amp;/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],&quot;script&quot;)&amp;&amp;(!G[J].type||G[J].type.toLowerCase()===&quot;text/javascript&quot;)){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName(&quot;script&quot;))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&amp;&amp;o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G==&quot;selected&quot;&amp;&amp;J.parentNode){J.parentNode.selectedIndex}if(G in J&amp;&amp;H&amp;&amp;!F){if(L){if(G==&quot;type&quot;&amp;&amp;o.nodeName(J,&quot;input&quot;)&amp;&amp;J.parentNode){throw&quot;type property can't be changed&quot;}J[G]=K}if(o.nodeName(J,&quot;form&quot;)&amp;&amp;J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G==&quot;tabIndex&quot;){var I=J.getAttributeNode(&quot;tabIndex&quot;);return I&amp;&amp;I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&amp;&amp;J.href?0:g}return J[G]}if(!o.support.style&amp;&amp;H&amp;&amp;G==&quot;style&quot;){return o.attr(J.style,&quot;cssText&quot;,K)}if(L){J.setAttribute(G,&quot;&quot;+K)}var E=!o.support.hrefNormalized&amp;&amp;H&amp;&amp;F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&amp;&amp;G==&quot;opacity&quot;){if(L){J.zoom=1;J.filter=(J.filter||&quot;&quot;).replace(/alpha\([^)]*\)/,&quot;&quot;)+(parseInt(K)+&quot;&quot;==&quot;NaN&quot;?&quot;&quot;:&quot;alpha(opacity=&quot;+K*100+&quot;)&quot;)}return J.filter&amp;&amp;J.filter.indexOf(&quot;opacity=&quot;)&gt;=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+&quot;&quot;:&quot;&quot;}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||&quot;&quot;).replace(/^\s+|\s+$/g,&quot;&quot;)},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G===&quot;string&quot;||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E&lt;F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G&lt;H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H&lt;I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G&lt;H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,&quot;0&quot;])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&amp;&amp;!/opera/.test(C),mozilla:/mozilla/.test(C)&amp;&amp;!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,&quot;parentNode&quot;)},next:function(E){return o.nth(E,2,&quot;nextSibling&quot;)},prev:function(E){return o.nth(E,2,&quot;previousSibling&quot;)},nextAll:function(E){return o.dir(E,&quot;nextSibling&quot;)},prevAll:function(E){return o.dir(E,&quot;previousSibling&quot;)},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,&quot;iframe&quot;)?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&amp;&amp;typeof G==&quot;string&quot;){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:&quot;append&quot;,prependTo:&quot;prepend&quot;,insertBefore:&quot;before&quot;,insertAfter:&quot;after&quot;,replaceAll:&quot;replaceWith&quot;},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K&lt;H;K++){var I=(K&gt;0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,&quot;&quot;);if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!==&quot;boolean&quot;){E=!o.className.has(this,F)}o.className[E?&quot;add&quot;:&quot;remove&quot;](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o(&quot;*&quot;,this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&amp;&amp;parseInt(o.curCSS(E[0],F,true),10)||0}var h=&quot;jQuery&quot;+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&amp;&amp;!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E=&quot;&quot;;for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||&quot;fx&quot;)+&quot;queue&quot;;var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G===&quot;fx&quot;){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(&quot;.&quot;);H[1]=H[1]?&quot;.&quot;+H[1]:&quot;&quot;;if(G===g){var F=this.triggerHandler(&quot;getData&quot;+H[1]+&quot;!&quot;,[H[0]]);if(F===g&amp;&amp;this.length){F=o.data(this[0],E)}return F===g&amp;&amp;H[1]?this.data(H[0]):F}else{return this.trigger(&quot;setData&quot;+H[1]+&quot;!&quot;,[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!==&quot;string&quot;){F=E;E=&quot;fx&quot;}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E==&quot;fx&quot;&amp;&amp;G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
-/*
- * 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 R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['&quot;][^'&quot;]*['&quot;]|[^[\]'&quot;]+)+\]|\\.|[^ &gt;+~,(\[\\]+)+|[&gt;+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&amp;&amp;U.nodeType!==9){return[]}if(!Y||typeof Y!==&quot;string&quot;){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length&gt;1&amp;&amp;M.exec(Y)){if(Z.length===2&amp;&amp;I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&amp;&amp;U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length&gt;0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=&quot;&quot;}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw&quot;Syntax error, unrecognized expression: &quot;+(ah||Y)}if(H.call(ai)===&quot;[object Array]&quot;){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&amp;&amp;(ai[aa]===true||ai[aa].nodeType===1&amp;&amp;K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&amp;&amp;ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa&lt;ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W&lt;V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!==&quot;\\&quot;){X[1]=(X[1]||&quot;&quot;).replace(/\\/g,&quot;&quot;);Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],&quot;&quot;);break}}}}if(!Z){Z=T.getElementsByTagName(&quot;*&quot;)}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&amp;&amp;ac[0]&amp;&amp;Q(ac[0]);while(ad&amp;&amp;ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&amp;&amp;ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],&quot;&quot;);if(!T){return[]}break}}}if(ad==V){if(T==null){throw&quot;Syntax error, unrecognized expression: &quot;+ad}else{break}}V=ad}return aa};var I=F.selectors={order:[&quot;ID&quot;,&quot;NAME&quot;,&quot;TAG&quot;],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['&quot;]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['&quot;]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['&quot;]*)(.*?)\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_-]|\\.)+)(?:\((['&quot;]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{&quot;class&quot;:&quot;className&quot;,&quot;for&quot;:&quot;htmlFor&quot;},attrHandle:{href:function(T){return T.getAttribute(&quot;href&quot;)}},relative:{&quot;+&quot;:function(aa,T,Z){var X=typeof T===&quot;string&quot;,ab=X&amp;&amp;!/\W/.test(T),Y=X&amp;&amp;!ab;if(ab&amp;&amp;!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W&lt;V;W++){if((U=aa[W])){while((U=U.previousSibling)&amp;&amp;U.nodeType!==1){}aa[W]=Y||U&amp;&amp;U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},&quot;&gt;&quot;:function(Z,U,aa){var X=typeof U===&quot;string&quot;;if(X&amp;&amp;!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V&lt;T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V&lt;T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},&quot;&quot;:function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T(&quot;parentNode&quot;,U,V,W,X,Y)},&quot;~&quot;:function(W,U,Y){var V=L++,T=S;if(typeof U===&quot;string&quot;&amp;&amp;!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T(&quot;previousSibling&quot;,U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!==&quot;undefined&quot;&amp;&amp;!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!==&quot;undefined&quot;){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W&lt;T;W++){if(X[W].getAttribute(&quot;name&quot;)===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=&quot; &quot;+W[1].replace(/\\/g,&quot;&quot;)+&quot; &quot;;if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&amp;&amp;(&quot; &quot;+Y.className+&quot; &quot;).indexOf(W)&gt;=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,&quot;&quot;)},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&amp;&amp;Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]==&quot;nth&quot;){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]==&quot;even&quot;&amp;&amp;&quot;2n&quot;||T[2]==&quot;odd&quot;&amp;&amp;&quot;2n+1&quot;||!/\D/.test(T[2])&amp;&amp;&quot;0n+&quot;+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,&quot;&quot;);if(!Z&amp;&amp;I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]===&quot;~=&quot;){X[4]=&quot; &quot;+X[4]+&quot; &quot;}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]===&quot;not&quot;){if(X[3].match(R).length&gt;1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&amp;&amp;T.type!==&quot;hidden&quot;},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return&quot;text&quot;===T.type},radio:function(T){return&quot;radio&quot;===T.type},checkbox:function(T){return&quot;checkbox&quot;===T.type},file:function(T){return&quot;file&quot;===T.type},password:function(T){return&quot;password&quot;===T.type},submit:function(T){return&quot;submit&quot;===T.type},image:function(T){return&quot;image&quot;===T.type},reset:function(T){return&quot;reset&quot;===T.type},button:function(T){return&quot;button&quot;===T.type||T.nodeName.toUpperCase()===&quot;BUTTON&quot;},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U&lt;T[3]-0},gt:function(V,U,T){return U&gt;T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U===&quot;contains&quot;){return(Z.textContent||Z.innerText||&quot;&quot;).indexOf(V[3])&gt;=0}else{if(U===&quot;not&quot;){var Y=V[3];for(var W=0,T=Y.length;W&lt;T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case&quot;only&quot;:case&quot;first&quot;:while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z==&quot;first&quot;){return true}U=T;case&quot;last&quot;:while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case&quot;nth&quot;:var V=W[2],ac=W[3];if(V==1&amp;&amp;ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&amp;&amp;(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&amp;&amp;aa/V&gt;=0)}}},ID:function(U,T){return U.nodeType===1&amp;&amp;U.getAttribute(&quot;id&quot;)===T},TAG:function(U,T){return(T===&quot;*&quot;&amp;&amp;U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(&quot; &quot;+(U.className||U.getAttribute(&quot;class&quot;))+&quot; &quot;).indexOf(T)&gt;-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+&quot;&quot;,X=W[2],U=W[4];return T==null?X===&quot;!=&quot;:X===&quot;=&quot;?Z===U:X===&quot;*=&quot;?Z.indexOf(U)&gt;=0:X===&quot;~=&quot;?(&quot; &quot;+Z+&quot; &quot;).indexOf(U)&gt;=0:!U?Z&amp;&amp;T!==false:X===&quot;!=&quot;?Z!=U:X===&quot;^=&quot;?Z.indexOf(U)===0:X===&quot;$=&quot;?Z.substr(Z.length-U.length)===U:X===&quot;|=&quot;?Z===U||Z.substr(0,U.length+1)===U+&quot;-&quot;:false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)===&quot;[object Array]&quot;){Array.prototype.push.apply(U,X)}else{if(typeof X.length===&quot;number&quot;){for(var V=0,T=X.length;V&lt;T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&amp;4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if(&quot;sourceIndex&quot; in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement(&quot;form&quot;),V=&quot;script&quot;+(new Date).getTime();U.innerHTML=&quot;&lt;input name='&quot;+V+&quot;'/&gt;&quot;;var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!==&quot;undefined&quot;&amp;&amp;!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!==&quot;undefined&quot;&amp;&amp;W.getAttributeNode(&quot;id&quot;).nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!==&quot;undefined&quot;&amp;&amp;Y.getAttributeNode(&quot;id&quot;);return Y.nodeType===1&amp;&amp;X&amp;&amp;X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement(&quot;div&quot;);T.appendChild(document.createComment(&quot;&quot;));if(T.getElementsByTagName(&quot;*&quot;).length&gt;0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]===&quot;*&quot;){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML=&quot;&lt;a href='#'&gt;&lt;/a&gt;&quot;;if(T.firstChild&amp;&amp;typeof T.firstChild.getAttribute!==&quot;undefined&quot;&amp;&amp;T.firstChild.getAttribute(&quot;href&quot;)!==&quot;#&quot;){I.attrHandle.href=function(U){return U.getAttribute(&quot;href&quot;,2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement(&quot;div&quot;);U.innerHTML=&quot;&lt;p class='TEST'&gt;&lt;/p&gt;&quot;;if(U.querySelectorAll&amp;&amp;U.querySelectorAll(&quot;.TEST&quot;).length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&amp;&amp;X.nodeType===9&amp;&amp;!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&amp;&amp;document.documentElement.getElementsByClassName){(function(){var T=document.createElement(&quot;div&quot;);T.innerHTML=&quot;&lt;div class='test e'&gt;&lt;/div&gt;&lt;div class='test'&gt;&lt;/div&gt;&quot;;if(T.getElementsByClassName(&quot;e&quot;).length===0){return}T.lastChild.className=&quot;e&quot;;if(T.getElementsByClassName(&quot;e&quot;).length===1){return}I.order.splice(1,0,&quot;CLASS&quot;);I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!==&quot;undefined&quot;&amp;&amp;!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U==&quot;previousSibling&quot;&amp;&amp;!ac;for(var W=0,V=ad.length;W&lt;V;W++){var T=ad[W];if(T){if(ab&amp;&amp;T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&amp;&amp;!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U==&quot;previousSibling&quot;&amp;&amp;!ac;for(var W=0,V=ad.length;W&lt;V;W++){var T=ad[W];if(T){if(ab&amp;&amp;T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!==&quot;string&quot;){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length&gt;0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&amp;16}:function(U,T){return U!==T&amp;&amp;(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&amp;&amp;T.documentElement.nodeName!==&quot;HTML&quot;||!!T.ownerDocument&amp;&amp;Q(T.ownerDocument)};var J=function(T,aa){var W=[],X=&quot;&quot;,Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,&quot;&quot;)}T=I.relative[T]?T+&quot;*&quot;:T;for(var Z=0,U=V.length;Z&lt;U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[&quot;:&quot;]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth&gt;0||T.offsetHeight&gt;0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=&quot;:not(&quot;+V+&quot;)&quot;}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&amp;&amp;W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&amp;&amp;++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&amp;&amp;V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&amp;&amp;I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,&quot;events&quot;)||o.data(I,&quot;events&quot;,{}),J=o.data(I,&quot;handle&quot;)||o.data(I,&quot;handle&quot;,function(){return typeof o!==&quot;undefined&quot;&amp;&amp;!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(&quot;.&quot;);N=O.shift();H.type=O.slice().sort().join(&quot;.&quot;);var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent(&quot;on&quot;+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,&quot;events&quot;),F,E;if(G){if(H===g||(typeof H===&quot;string&quot;&amp;&amp;H.charAt(0)==&quot;.&quot;)){for(var I in G){this.remove(K,I+(H||&quot;&quot;))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(&quot;.&quot;);O=Q.shift();var N=RegExp(&quot;(^|\\.)&quot;+Q.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,&quot;handle&quot;),false)}else{if(K.detachEvent){K.detachEvent(&quot;on&quot;+O,o.data(K,&quot;handle&quot;))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,&quot;handle&quot;);if(L){L.elem=null}o.removeData(K,&quot;events&quot;);o.removeData(K,&quot;handle&quot;)}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I===&quot;object&quot;?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf(&quot;!&quot;)&gt;=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&amp;&amp;this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,&quot;handle&quot;);if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,&quot;a&quot;)&amp;&amp;G==&quot;click&quot;))&amp;&amp;H[&quot;on&quot;+G]&amp;&amp;H[&quot;on&quot;+G].apply(H,K)===false){I.result=false}if(!E&amp;&amp;H[G]&amp;&amp;!I.isDefaultPrevented()&amp;&amp;!(o.nodeName(H,&quot;a&quot;)&amp;&amp;G==&quot;click&quot;)){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(&quot;.&quot;);K.type=L.shift();J=!L.length&amp;&amp;!K.exclusive;var I=RegExp(&quot;(^|\\.)&quot;+L.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);E=(o.data(this,&quot;events&quot;)||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:&quot;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&quot;.split(&quot; &quot;),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&amp;&amp;H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&amp;&amp;H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&amp;&amp;I.scrollLeft||E&amp;&amp;E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&amp;&amp;I.scrollTop||E&amp;&amp;E.scrollTop||0)-(I.clientTop||0)}if(!H.which&amp;&amp;((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&amp;&amp;H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&amp;&amp;H.button){H.which=(H.button&amp;1?1:(H.button&amp;2?3:(H.button&amp;4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp(&quot;(^|\\.)&quot;+G[0]+&quot;(\\.|$)&quot;);o.each((o.data(this,&quot;events&quot;).live||{}),function(){if(F.test(this.type)){E++}});if(E&lt;1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&amp;&amp;E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&amp;&amp;E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:&quot;mouseenter&quot;,mouseout:&quot;mouseleave&quot;},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F==&quot;unload&quot;?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&amp;&amp;G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&amp;&amp;H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F&lt;E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp(&quot;(^|\\.)&quot;+H.type+&quot;(\\.|$)&quot;),G=true,F=[];o.each(o.data(this,&quot;events&quot;).live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,&quot;closest&quot;)-o.data(I.elem,&quot;closest&quot;)});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return[&quot;live&quot;,F,E.replace(/\./g,&quot;`&quot;).replace(/ /g,&quot;|&quot;)].join(&quot;.&quot;)}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler(&quot;ready&quot;)}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener(&quot;DOMContentLoaded&quot;,function(){document.removeEventListener(&quot;DOMContentLoaded&quot;,arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent(&quot;onreadystatechange&quot;,function(){if(document.readyState===&quot;complete&quot;){document.detachEvent(&quot;onreadystatechange&quot;,arguments.callee);o.ready()}});if(document.documentElement.doScroll&amp;&amp;l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll(&quot;left&quot;)}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,&quot;load&quot;,o.ready)}o.each((&quot;blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error&quot;).split(&quot;,&quot;),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind(&quot;unload&quot;,function(){for(var E in o.cache){if(E!=1&amp;&amp;o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement(&quot;script&quot;),K=document.createElement(&quot;div&quot;),J=&quot;script&quot;+(new Date).getTime();K.style.display=&quot;none&quot;;K.innerHTML='   &lt;link/&gt;&lt;table&gt;&lt;/table&gt;&lt;a href=&quot;/a&quot; style=&quot;color:red;float:left;opacity:.5;&quot;&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 H=K.getElementsByTagName(&quot;*&quot;),E=K.getElementsByTagName(&quot;a&quot;)[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName(&quot;tbody&quot;).length,objectAll:!!K.getElementsByTagName(&quot;object&quot;)[0].getElementsByTagName(&quot;*&quot;).length,htmlSerialize:!!K.getElementsByTagName(&quot;link&quot;).length,style:/red/.test(E.getAttribute(&quot;style&quot;)),hrefNormalized:E.getAttribute(&quot;href&quot;)===&quot;/a&quot;,opacity:E.style.opacity===&quot;0.5&quot;,cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type=&quot;text/javascript&quot;;try{G.appendChild(document.createTextNode(&quot;window.&quot;+J+&quot;=1;&quot;))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&amp;&amp;K.fireEvent){K.attachEvent(&quot;onclick&quot;,function(){o.support.noCloneEvent=false;K.detachEvent(&quot;onclick&quot;,arguments.callee)});K.cloneNode(true).fireEvent(&quot;onclick&quot;)}o(function(){var L=document.createElement(&quot;div&quot;);L.style.width=L.style.paddingLeft=&quot;1px&quot;;document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display=&quot;none&quot;})})();var w=o.support.cssFloat?&quot;cssFloat&quot;:&quot;styleFloat&quot;;o.props={&quot;for&quot;:&quot;htmlFor&quot;,&quot;class&quot;:&quot;className&quot;,&quot;float&quot;:w,cssFloat:w,styleFloat:w,readonly:&quot;readOnly&quot;,maxlength:&quot;maxLength&quot;,cellspacing:&quot;cellSpacing&quot;,rowspan:&quot;rowSpan&quot;,tabindex:&quot;tabIndex&quot;};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!==&quot;string&quot;){return this._load(G)}var I=G.indexOf(&quot; &quot;);if(I&gt;=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H=&quot;GET&quot;;if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J===&quot;object&quot;){J=o.param(J);H=&quot;POST&quot;}}}var F=this;o.ajax({url:G,type:H,dataType:&quot;html&quot;,data:J,complete:function(M,L){if(L==&quot;success&quot;||L==&quot;notmodified&quot;){F.html(E?o(&quot;&lt;div/&gt;&quot;).append(M.responseText.replace(/&lt;script(.|\s)*?\/script&gt;/g,&quot;&quot;)).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.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(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each(&quot;ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend&quot;.split(&quot;,&quot;),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:&quot;GET&quot;,url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,&quot;script&quot;)},getJSON:function(E,F,G){return o.get(E,F,G,&quot;json&quot;)},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:&quot;POST&quot;,url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:&quot;GET&quot;,contentType:&quot;application/x-www-form-urlencoded&quot;,processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;):new XMLHttpRequest()},accepts:{xml:&quot;application/xml, text/xml&quot;,html:&quot;text/html&quot;,script:&quot;text/javascript, application/javascript&quot;,json:&quot;application/json, text/javascript&quot;,text:&quot;text/plain&quot;,_default:&quot;*/*&quot;}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&amp;|$)/g,R,V,G=M.type.toUpperCase();if(M.data&amp;&amp;M.processData&amp;&amp;typeof M.data!==&quot;string&quot;){M.data=o.param(M.data)}if(M.dataType==&quot;jsonp&quot;){if(G==&quot;GET&quot;){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+(M.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+&quot;&amp;&quot;:&quot;&quot;)+(M.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}M.dataType=&quot;json&quot;}if(M.dataType==&quot;json&quot;&amp;&amp;(M.data&amp;&amp;M.data.match(F)||M.url.match(F))){W=&quot;jsonp&quot;+r++;if(M.data){M.data=(M.data+&quot;&quot;).replace(F,&quot;=&quot;+W+&quot;$1&quot;)}M.url=M.url.replace(F,&quot;=&quot;+W+&quot;$1&quot;);M.dataType=&quot;script&quot;;l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType==&quot;script&quot;&amp;&amp;M.cache==null){M.cache=false}if(M.cache===false&amp;&amp;G==&quot;GET&quot;){var E=e();var U=M.url.replace(/(\?|&amp;)_=.*?(&amp;|$)/,&quot;$1_=&quot;+E+&quot;$2&quot;);M.url=U+((U==M.url)?(M.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+&quot;_=&quot;+E:&quot;&quot;)}if(M.data&amp;&amp;G==&quot;GET&quot;){M.url+=(M.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+M.data;M.data=null}if(M.global&amp;&amp;!o.active++){o.event.trigger(&quot;ajaxStart&quot;)}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType==&quot;script&quot;&amp;&amp;G==&quot;GET&quot;&amp;&amp;Q&amp;&amp;(Q[1]&amp;&amp;Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName(&quot;head&quot;)[0];var T=document.createElement(&quot;script&quot;);T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&amp;&amp;(!this.readyState||this.readyState==&quot;loaded&quot;||this.readyState==&quot;complete&quot;)){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader(&quot;Content-Type&quot;,M.contentType)}if(M.ifModified){J.setRequestHeader(&quot;If-Modified-Since&quot;,o.lastModified[M.url]||&quot;Thu, 01 Jan 1970 00:00:00 GMT&quot;)}J.setRequestHeader(&quot;X-Requested-With&quot;,&quot;XMLHttpRequest&quot;);J.setRequestHeader(&quot;Accept&quot;,M.dataType&amp;&amp;M.accepts[M.dataType]?M.accepts[M.dataType]+&quot;, */*&quot;:M.accepts._default)}catch(S){}if(M.beforeSend&amp;&amp;M.beforeSend(J,M)===false){if(M.global&amp;&amp;!--o.active){o.event.trigger(&quot;ajaxStop&quot;)}J.abort();return false}if(M.global){o.event.trigger(&quot;ajaxSend&quot;,[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&amp;&amp;!--o.active){o.event.trigger(&quot;ajaxStop&quot;)}}}else{if(!K&amp;&amp;J&amp;&amp;(J.readyState==4||X==&quot;timeout&quot;)){K=true;if(P){clearInterval(P);P=null}R=X==&quot;timeout&quot;?&quot;timeout&quot;:!o.httpSuccess(J)?&quot;error&quot;:M.ifModified&amp;&amp;o.httpNotModified(J,M.url)?&quot;notmodified&quot;:&quot;success&quot;;if(R==&quot;success&quot;){try{V=o.httpData(J,M.dataType,M)}catch(Z){R=&quot;parsererror&quot;}}if(R==&quot;success&quot;){var Y;try{Y=J.getResponseHeader(&quot;Last-Modified&quot;)}catch(Z){}if(M.ifModified&amp;&amp;Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout&gt;0){setTimeout(function(){if(J&amp;&amp;!K){N(&quot;timeout&quot;)}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger(&quot;ajaxSuccess&quot;,[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger(&quot;ajaxComplete&quot;,[J,M])}if(M.global&amp;&amp;!--o.active){o.event.trigger(&quot;ajaxStop&quot;)}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger(&quot;ajaxError&quot;,[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&amp;&amp;location.protocol==&quot;file:&quot;||(F.status&gt;=200&amp;&amp;F.status&lt;300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader(&quot;Last-Modified&quot;);return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader(&quot;content-type&quot;),E=H==&quot;xml&quot;||!H&amp;&amp;F&amp;&amp;F.indexOf(&quot;xml&quot;)&gt;=0,I=E?J.responseXML:J.responseText;if(E&amp;&amp;I.documentElement.tagName==&quot;parsererror&quot;){throw&quot;parsererror&quot;}if(G&amp;&amp;G.dataFilter){I=G.dataFilter(I,H)}if(typeof I===&quot;string&quot;){if(H==&quot;script&quot;){o.globalEval(I)}if(H==&quot;json&quot;){I=l[&quot;eval&quot;](&quot;(&quot;+I+&quot;)&quot;)}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+&quot;=&quot;+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join(&quot;&amp;&quot;).replace(/%20/g,&quot;+&quot;)}});var m={},n,d=[[&quot;height&quot;,&quot;marginTop&quot;,&quot;marginBottom&quot;,&quot;paddingTop&quot;,&quot;paddingBottom&quot;],[&quot;width&quot;,&quot;marginLeft&quot;,&quot;marginRight&quot;,&quot;paddingLeft&quot;,&quot;paddingRight&quot;],[&quot;opacity&quot;]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t(&quot;show&quot;,3),J,L)}else{for(var H=0,F=this.length;H&lt;F;H++){var E=o.data(this[H],&quot;olddisplay&quot;);this[H].style.display=E||&quot;&quot;;if(o.css(this[H],&quot;display&quot;)===&quot;none&quot;){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o(&quot;&lt;&quot;+G+&quot; /&gt;&quot;).appendTo(&quot;body&quot;);K=I.css(&quot;display&quot;);if(K===&quot;none&quot;){K=&quot;block&quot;}I.remove();m[G]=K}o.data(this[H],&quot;olddisplay&quot;,K)}}for(var H=0,F=this.length;H&lt;F;H++){this[H].style.display=o.data(this[H],&quot;olddisplay&quot;)||&quot;&quot;}return this}},hide:function(H,I){if(H){return this.animate(t(&quot;hide&quot;,3),H,I)}else{for(var G=0,F=this.length;G&lt;F;G++){var E=o.data(this[G],&quot;olddisplay&quot;);if(!E&amp;&amp;E!==&quot;none&quot;){o.data(this[G],&quot;olddisplay&quot;,o.css(this[G],&quot;display&quot;))}}for(var G=0,F=this.length;G&lt;F;G++){this[G].style.display=&quot;none&quot;}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G===&quot;boolean&quot;;return o.isFunction(G)&amp;&amp;o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(&quot;:hidden&quot;);o(this)[H?&quot;show&quot;:&quot;hide&quot;]()}):this.animate(t(&quot;toggle&quot;,3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?&quot;each&quot;:&quot;queue&quot;](function(){var K=o.extend({},E),M,L=this.nodeType==1&amp;&amp;o(this).is(&quot;:hidden&quot;),J=this;for(M in I){if(I[M]==&quot;hide&quot;&amp;&amp;L||I[M]==&quot;show&quot;&amp;&amp;!L){return K.complete.call(this)}if((M==&quot;height&quot;||M==&quot;width&quot;)&amp;&amp;this.style){K.display=o.css(this,&quot;display&quot;);K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow=&quot;hidden&quot;}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S==&quot;toggle&quot;?L?&quot;show&quot;:&quot;hide&quot;:S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||&quot;px&quot;;if(P!=&quot;px&quot;){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]==&quot;-=&quot;?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,&quot;&quot;)}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H&gt;=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t(&quot;show&quot;,1),slideUp:t(&quot;hide&quot;,1),slideToggle:t(&quot;toggle&quot;,1),fadeIn:{opacity:&quot;show&quot;},fadeOut:{opacity:&quot;hide&quot;}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G===&quot;object&quot;?G:{complete:F||!F&amp;&amp;H||o.isFunction(G)&amp;&amp;G,duration:G,easing:F&amp;&amp;H||H&amp;&amp;!o.isFunction(H)&amp;&amp;H};E.duration=o.fx.off?0:typeof E.duration===&quot;number&quot;?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop==&quot;height&quot;||this.prop==&quot;width&quot;)&amp;&amp;this.elem.style){this.elem.style.display=&quot;block&quot;}},cur:function(F){if(this.elem[this.prop]!=null&amp;&amp;(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&amp;&amp;E&gt;-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||&quot;px&quot;;this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&amp;&amp;o.timers.push(F)&amp;&amp;!n){n=setInterval(function(){var K=o.timers;for(var J=0;J&lt;K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop==&quot;width&quot;||this.prop==&quot;height&quot;?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G&gt;=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,&quot;display&quot;)==&quot;none&quot;){this.elem.style.display=&quot;block&quot;}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?&quot;swing&quot;:&quot;linear&quot;)](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,&quot;opacity&quot;,E.now)},_default:function(E){if(E.elem.style&amp;&amp;E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&amp;&amp;E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&amp;&amp;E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&amp;&amp;J!==K&amp;&amp;J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&amp;&amp;!(o.offset.doesAddBorderForTableAndCells&amp;&amp;/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&amp;&amp;M.overflow!==&quot;visible&quot;){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position===&quot;relative&quot;||E.position===&quot;static&quot;){N+=K.offsetTop,I+=K.offsetLeft}if(E.position===&quot;fixed&quot;){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement(&quot;div&quot;),H,G,N,I,M,E,J=L.style.marginTop,K='&lt;div style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;table style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';M={position:&quot;absolute&quot;,top:0,left:0,margin:0,border:0,width:&quot;1px&quot;,height:&quot;1px&quot;,visibility:&quot;hidden&quot;};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow=&quot;hidden&quot;,H.style.position=&quot;relative&quot;;this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop=&quot;1px&quot;;this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,&quot;marginTop&quot;,true),10)||0,F+=parseInt(o.curCSS(E,&quot;marginLeft&quot;,true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,&quot;marginTop&quot;);J.left-=j(this,&quot;marginLeft&quot;);E.top+=j(G,&quot;borderTopWidth&quot;);E.left+=j(G,&quot;borderLeftWidth&quot;);F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&amp;&amp;(!/^body|html$/i.test(E.tagName)&amp;&amp;o.css(E,&quot;position&quot;)==&quot;static&quot;)){E=E.offsetParent}return o(E)}});o.each([&quot;Left&quot;,&quot;Top&quot;],function(F,E){var G=&quot;scroll&quot;+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?&quot;pageYOffset&quot;:&quot;pageXOffset&quot;]||o.boxModel&amp;&amp;document.documentElement[G]||document.body[G]:this[0][G]}});o.each([&quot;Height&quot;,&quot;Width&quot;],function(I,G){var E=I?&quot;Left&quot;:&quot;Top&quot;,H=I?&quot;Right&quot;:&quot;Bottom&quot;,F=G.toLowerCase();o.fn[&quot;inner&quot;+G]=function(){return this[0]?o.css(this[0],F,false,&quot;padding&quot;):null};o.fn[&quot;outer&quot;+G]=function(K){return this[0]?o.css(this[0],F,false,K?&quot;margin&quot;:&quot;border&quot;):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode==&quot;CSS1Compat&quot;&amp;&amp;document.documentElement[&quot;client&quot;+G]||document.body[&quot;client&quot;+G]:this[0]==document?Math.max(document.documentElement[&quot;client&quot;+G],document.body[&quot;scroll&quot;+G],document.documentElement[&quot;scroll&quot;+G],document.body[&quot;offset&quot;+G],document.documentElement[&quot;offset&quot;+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K===&quot;string&quot;?K:K+&quot;px&quot;)}})})();
+
 (function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:&quot;header&quot;,cssAsc:&quot;headerSortUp&quot;,cssDesc:&quot;headerSortDown&quot;,sortInitialOrder:&quot;asc&quot;,sortMultiSortKey:&quot;shiftKey&quot;,sortForce:null,sortAppend:null,textExtraction:&quot;simple&quot;,parsers:{},widgets:[],widgetZebra:{css:[&quot;even&quot;,&quot;odd&quot;]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:&quot;us&quot;,decimal:'.',debug:false};function benchmark(s,d){log(s+&quot;,&quot;+(new Date().getTime()-d.getTime())+&quot;ms&quot;);}this.benchmark=benchmark;function log(s){if(typeof console!=&quot;undefined&quot;&amp;&amp;typeof console.debug!=&quot;undefined&quot;){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug=&quot;&quot;;}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i&lt;l;i++){var p=false;if($.metadata&amp;&amp;($($headers[i]).metadata()&amp;&amp;$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&amp;&amp;table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+=&quot;column:&quot;+i+&quot; parser:&quot;+p.id+&quot;\n&quot;;}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i&lt;l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i&lt;l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&amp;&amp;table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&amp;&amp;table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i&lt;totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j&lt;totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark(&quot;Building cache for &quot;+totalRows+&quot; rows:&quot;,cacheTime);}return cache;};function getElementText(config,node){if(!node)return&quot;&quot;;var t=&quot;&quot;;if(config.textExtraction==&quot;simple&quot;){if(node.childNodes[0]&amp;&amp;node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)==&quot;function&quot;){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i&lt;totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j&lt;l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark(&quot;Rebuilt table:&quot;,appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger(&quot;sortEnd&quot;);},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i&lt;table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$(&quot;thead th&quot;,table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark(&quot;Built headers:&quot;,time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i&lt;c.length;i++){var cell=c[i];if(cell.colSpan&gt;1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan&gt;1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&amp;&amp;($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&amp;&amp;(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i&lt;l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i&lt;l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!=&quot;Number&quot;){i=(v.toLowerCase()==&quot;desc&quot;)?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i&lt;l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i&lt;l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('&lt;colgroup&gt;');$(&quot;tr:first td&quot;,table.tBodies[0]).each(function(){colgroup.append($('&lt;col&gt;').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i&lt;l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp=&quot;var sortWrapper = function(a,b) {&quot;,l=sortList.length;for(var i=0;i&lt;l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)==&quot;text&quot;)?((order==0)?&quot;sortText&quot;:&quot;sortTextDesc&quot;):((order==0)?&quot;sortNumeric&quot;:&quot;sortNumericDesc&quot;);var e=&quot;e&quot;+i;dynamicExp+=&quot;var &quot;+e+&quot; = &quot;+s+&quot;(a[&quot;+c+&quot;],b[&quot;+c+&quot;]); &quot;;dynamicExp+=&quot;if(&quot;+e+&quot;) { return &quot;+e+&quot;; } &quot;;dynamicExp+=&quot;else { &quot;;}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+=&quot;return a[&quot;+orgOrderCol+&quot;]-b[&quot;+orgOrderCol+&quot;];&quot;;for(var i=0;i&lt;l;i++){dynamicExp+=&quot;}; &quot;;}dynamicExp+=&quot;return 0; &quot;;dynamicExp+=&quot;}; &quot;;eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark(&quot;Sorting on &quot;+sortList.toString()+&quot; and dir &quot;+order+&quot; time:&quot;,sortTime);}return cache;};function sortText(a,b){return((a&lt;b)?-1:((a&gt;b)?1:0));};function sortTextDesc(a,b){return((b&lt;a)?-1:((b&gt;a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger(&quot;sortStart&quot;);var totalRows=($this[0].tBodies[0]&amp;&amp;$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&amp;&amp;totalRows&gt;0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j&lt;a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j&lt;config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind(&quot;update&quot;,function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind(&quot;sorton&quot;,function(e,list){$(this).trigger(&quot;sortStart&quot;);config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind(&quot;appendCache&quot;,function(){appendToTable(this,cache);}).bind(&quot;applyWidgetId&quot;,function(e,id){getWidgetById(id).format(this);}).bind(&quot;applyWidgets&quot;,function(){applyWidget(this);});if($.metadata&amp;&amp;($(this).metadata()&amp;&amp;$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length&gt;0){$this.trigger(&quot;sorton&quot;,[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i&lt;l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML=&quot;&quot;;}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:&quot;text&quot;,is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:&quot;text&quot;});ts.addParser({id:&quot;digit&quot;,is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:&quot;numeric&quot;});ts.addParser({id:&quot;currency&quot;,is:function(s){return/^[&#194;&#163;$&#226;&#8218;&#172;?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),&quot;&quot;));},type:&quot;numeric&quot;});ts.addParser({id:&quot;ipAddress&quot;,is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split(&quot;.&quot;),r=&quot;&quot;,l=a.length;for(var i=0;i&lt;l;i++){var item=a[i];if(item.length==2){r+=&quot;0&quot;+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:&quot;numeric&quot;});ts.addParser({id:&quot;url&quot;,is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:&quot;text&quot;});ts.addParser({id:&quot;isoDate&quot;,is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!=&quot;&quot;)?new Date(s.replace(new RegExp(/-/g),&quot;/&quot;)).getTime():&quot;0&quot;);},type:&quot;numeric&quot;});ts.addParser({id:&quot;percent&quot;,is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),&quot;&quot;));},type:&quot;numeric&quot;});ts.addParser({id:&quot;usLongDate&quot;,is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:&quot;numeric&quot;});ts.addParser({id:&quot;shortDate&quot;,is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,&quot;/&quot;);if(c.dateFormat==&quot;us&quot;){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,&quot;$3/$1/$2&quot;);}else if(c.dateFormat==&quot;uk&quot;){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,&quot;$3/$2/$1&quot;);}else if(c.dateFormat==&quot;dd/mm/yy&quot;||c.dateFormat==&quot;dd-mm-yy&quot;){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,&quot;$1/$2/$3&quot;);}return $.tablesorter.formatFloat(new Date(s).getTime());},type:&quot;numeric&quot;});ts.addParser({id:&quot;time&quot;,is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date(&quot;2000/01/01 &quot;+s).getTime());},type:&quot;numeric&quot;});ts.addParser({id:&quot;metadata&quot;,is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:&quot;numeric&quot;});ts.addWidget({id:&quot;zebra&quot;,format:function(table){if(table.config.debug){var time=new Date();}$(&quot;tr:visible&quot;,table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark(&quot;Applying Zebra widget&quot;,time);}}});})(jQuery);/*
  * jQuery UI 1.7.1
  *
@@ -314,10 +296,10 @@
 		return this.each(function() {
 			// unbind everything if we're destroying, and stop executing the script
 			if(destroy) {
-			  $(this).unbind(&quot;focus.hint&quot;).unbind(&quot;blur.hint&quot;).removeData(&quot;defText&quot;);
+			  jQ(this).unbind(&quot;focus.hint&quot;).unbind(&quot;blur.hint&quot;).removeData(&quot;defText&quot;);
 				return false;
 			}
-		  hint_setup($(this));
+		  hint_setup(jQ(this));
 		});
 	  function hint_setup(ele){ 
 	    // define our variables
@@ -330,7 +312,7 @@
 					ele.val(defText);
 					break;
 				case &quot;label&quot;:
-					defText = $(&quot;label[for='&quot; + ele.attr(&quot;id&quot;) + &quot;']&quot;).text();
+					defText = jQ(&quot;label[for='&quot; + ele.attr(&quot;id&quot;) + &quot;']&quot;).text();
 					ele.val(defText);
 					break;
 				case &quot;custom&quot;:
@@ -346,12 +328,12 @@
 			ele.addClass(&quot;hint&quot;).data(&quot;defText&quot;, defText);
 
 			// now that fields are populated, let's remove the labels if applicable
-			if(defaults.remove_labels == true) { $(&quot;label[for='&quot; + ele.attr(&quot;id&quot;) + &quot;']&quot;).remove(); }
+			if(defaults.remove_labels == true) { jQ(&quot;label[for='&quot; + ele.attr(&quot;id&quot;) + &quot;']&quot;).remove(); }
 			
 			// Handles password fields by creating a clone that's a text field.
 			if(ele.attr(&quot;type&quot;)==&quot;password&quot;) {
 			  var eledef = ele.data(&quot;defText&quot;);
-        var el = $('&lt;input type=&quot;text&quot;/&gt;');
+        var el = jQ('&lt;input type=&quot;text&quot;/&gt;');
         el.attr( 'name', ele.attr('name') );
         el.attr( 'size', ele.attr('size') );
         el.attr( 'class', ele.attr('class') );
@@ -365,13 +347,13 @@
 	  };
 	  function hint_focus(ele){ 
 	    ele.bind(&quot;focus.hint&quot;,function(ele){
-        var ele = $(this);
+        var ele = jQ(this);
 	      if(ele.val() == ele.data(&quot;defText&quot;)) { ele.val(&quot;&quot;); }
 				// add the focus class, remove changed_class
 				ele.addClass(defaults.focus_class).removeClass(defaults.changed_class);
 	      if(ele.data(&quot;defType&quot;)==&quot;password&quot;) {
   			  var eledef = ele.data(&quot;defText&quot;);
-          var el = $('&lt;input type=&quot;password&quot;/&gt;');
+          var el = jQ('&lt;input type=&quot;password&quot;/&gt;');
           el.attr( 'name', ele.attr('name') );
           el.attr( 'size', ele.attr('size') );
           el.attr( 'class', ele.attr('class') );
@@ -386,7 +368,7 @@
 	  };
 	  function hint_blur(ele){ 
 	    ele.bind(&quot;blur.hint&quot;,function(){
-        var ele = $(this);
+        var ele = jQ(this);
 	      if(ele.val() == &quot;&quot;) { ele.val(ele.data(&quot;defText&quot;)); }
 				// remove focus_class, add changed_class.
 				ele.removeClass(defaults.focus_class);
@@ -394,7 +376,7 @@
 					else { ele.removeClass(defaults.changed_class); }
 				if(ele.data(&quot;defType&quot;)==&quot;password&quot; &amp;&amp; ele.val()==ele.data(&quot;defText&quot;)) {
 				  var eledef = ele.data(&quot;defText&quot;);
-          var el = $('&lt;input type=&quot;text&quot;/&gt;');
+          var el = jQ('&lt;input type=&quot;text&quot;/&gt;');
           el.attr( 'name', ele.attr('name') );
           el.attr( 'size', ele.attr('size') );
           el.attr( 'class', ele.attr('class') );
@@ -407,31 +389,127 @@
 	    });
 	  };
 	};
-})(jQuery);jQuery.imgAreaSelect=function(img,options){var $area=jQuery('&lt;div&gt;&lt;/div&gt;'),$border1=jQuery('&lt;div&gt;&lt;/div&gt;'),$border2=jQuery('&lt;div&gt;&lt;/div&gt;'),$outLeft=jQuery('&lt;div&gt;&lt;/div&gt;'),$outTop=jQuery('&lt;div&gt;&lt;/div&gt;'),$outRight=jQuery('&lt;div&gt;&lt;/div&gt;'),$outBottom=jQuery('&lt;div&gt;&lt;/div&gt;'),left,top,imgOfs,imgWidth,imgHeight,parent,parOfs,parScroll,adjusted,zIndex=0,fixed,$p,startX,startY,moveX,moveY,resizeMargin=10,resize=[],V=0,H=1,d,aspectRatio,x1,x2,y1,y2,x,y,selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0};var $a=$area.add($border1).add($border2);var $o=$outLeft.add($outTop).add($outRight).add($outBottom);function viewX(x){return x+imgOfs.left+parScroll.left-parOfs.left}function viewY(y){return y+imgOfs.top+parScroll.top-parOfs.top}function selX(x){return x-imgOfs.left-parScroll.left+parOfs.left}function selY(y){return y-imgOfs.top-parScroll.top+parOfs.top}function evX(event){return event.pageX+parScroll.left-parOfs.left}function evY(event){return event.pageY+parScroll.top-parOfs.top}function adjust(){imgOfs=jQuery(img).offset();imgWidth=jQuery(img).width();imgHeight=jQuery(img).height();if(jQuery(parent).is('body'))parOfs=parScroll={left:0,top:0};else{parOfs=jQuery(parent).offset();parScroll={left:parent.scrollLeft,top:parent.scrollTop}}left=viewX(0);top=viewY(0)}function update(){$a.css({left:viewX(selection.x1)+'px',top:viewY(selection.y1)+'px',width:Math.max(selection.width-options.borderWidth*2,0)+'px',height:Math.max(selection.height-options.borderWidth*2,0)+'px'});$outLeft.css({left:left+'px',top:top+'px',width:selection.x1+'px',height:imgHeight+'px'});$outTop.css({left:left+selection.x1+'px',top:top+'px',width:selection.width+'px',height:selection.y1+'px'});$outRight.css({left:left+selection.x2+'px',top:top+'px',width:imgWidth-selection.x2+'px',height:imgHeight+'px'});$outBottom.css({left:left+selection.x1+'px',top:top+selection.y2+'px',width:selection.width+'px',height:imgHeight-selection.y2+'px'})}function areaMouseMove(event){if(!adjusted){adjust();adjusted=true;$a.one('mouseout',function(){adjusted=false})}x=selX(evX(event))-selection.x1;y=selY(evY(event))-selection.y1;resize=[];if(options.resizable){if(y&lt;=resizeMargin)resize[V]='n';else if(y&gt;=selection.height-resizeMargin)resize[V]='s';if(x&lt;=resizeMargin)resize[H]='w';else if(x&gt;=selection.width-resizeMargin)resize[H]='e'}$border2.css('cursor',resize.length?resize.join('')+'-resize':options.movable?'move':'')}function areaMouseDown(event){if(event.which!=1)return false;adjust();if(options.resizable&amp;&amp;resize.length&gt;0){jQuery('body').css('cursor',resize.join('')+'-resize');x1=viewX(resize[H]=='w'?selection.x2:selection.x1);y1=viewY(resize[V]=='n'?selection.y2:selection.y1);jQuery(document).mousemove(selectingMouseMove);$border2.unbind('mousemove',areaMouseMove);jQuery(document).one('mouseup',function(){resize=[];jQuery('body').css('cursor','');if(options.autoHide)$a.add($o).hide();options.onSelectEnd(img,selection);jQuery(document).unbind('mousemove',selectingMouseMove);$border2.mousemove(areaMouseMove)})}else if(options.movable){moveX=selection.x1+left;moveY=selection.y1+top;startX=evX(event);startY=evY(event);jQuery(document).mousemove(movingMouseMove).one('mouseup',function(){options.onSelectEnd(img,selection);jQuery(document).unbind('mousemove',movingMouseMove)})}else jQuery(img).mousedown(event);return false}function aspectRatioXY(){x2=Math.max(left,Math.min(left+imgWidth,x1+Math.abs(y2-y1)*aspectRatio*(x2&gt;x1?1:-1)));y2=Math.round(Math.max(top,Math.min(top+imgHeight,y1+Math.abs(x2-x1)/aspectRatio*(y2&gt;y1?1:-1))));x2=Math.round(x2)}function aspectRatioYX(){y2=Math.max(top,Math.min(top+imgHeight,y1+Math.abs(x2-x1)/aspectRatio*(y2&gt;y1?1:-1)));x2=Math.round(Math.max(left,Math.min(left+imgWidth,x1+Math.abs(y2-y1)*aspectRatio*(x2&gt;x1?1:-1))));y2=Math.round(y2)}function selectingMouseMove(event){x2=!resize.length||resize[H]||aspectRatio?evX(event):viewX(selection.x2);y2=!resize.length||resize[V]||aspectRatio?evY(event):viewY(selection.y2);if(options.minWidth&amp;&amp;Math.abs(x2-x1)&lt;options.minWidth){x2=x1-options.minWidth*(x2&lt;x1?1:-1);if(x2&lt;left)x1=left+options.minWidth;else if(x2&gt;left+imgWidth)x1=left+imgWidth-options.minWidth}if(options.minHeight&amp;&amp;Math.abs(y2-y1)&lt;options.minHeight){y2=y1-options.minHeight*(y2&lt;y1?1:-1);if(y2&lt;top)y1=top+options.minHeight;else if(y2&gt;top+imgHeight)y1=top+imgHeight-options.minHeight}x2=Math.max(left,Math.min(x2,left+imgWidth));y2=Math.max(top,Math.min(y2,top+imgHeight));if(aspectRatio)if(Math.abs(x2-x1)/aspectRatio&gt;Math.abs(y2-y1))aspectRatioYX();else aspectRatioXY();if(options.maxWidth&amp;&amp;Math.abs(x2-x1)&gt;options.maxWidth){x2=x1-options.maxWidth*(x2&lt;x1?1:-1);if(aspectRatio)aspectRatioYX()}if(options.maxHeight&amp;&amp;Math.abs(y2-y1)&gt;options.maxHeight){y2=y1-options.maxHeight*(y2&lt;y1?1:-1);if(aspectRatio)aspectRatioXY()}selection.x1=selX(Math.min(x1,x2));selection.x2=selX(Math.max(x1,x2));selection.y1=selY(Math.min(y1,y2));selection.y2=selY(Math.max(y1,y2));selection.width=Math.abs(x2-x1);selection.height=Math.abs(y2-y1);update();options.onSelectChange(img,selection);return false}function movingMouseMove(event){x1=Math.max(left,Math.min(moveX+evX(event)-startX,left+imgWidth-selection.width));y1=Math.max(top,Math.min(moveY+evY(event)-startY,top+imgHeight-selection.height));x2=x1+selection.width;y2=y1+selection.height;selection.x1=selX(x1);selection.y1=selY(y1);selection.x2=selX(x2);selection.y2=selY(y2);update();options.onSelectChange(img,selection);event.preventDefault();return false}function imgMouseDown(event){if(event.which!=1)return false;adjust();selection.x1=selection.x2=selX(startX=x1=x2=evX(event));selection.y1=selection.y2=selY(startY=y1=y2=evY(event));selection.width=0;selection.height=0;resize=[];update();$a.add($o).show();jQuery(document).mousemove(selectingMouseMove);$border2.unbind('mousemove',areaMouseMove);options.onSelectStart(img,selection);jQuery(document).one('mouseup',function(){if(options.autoHide)$a.add($o).hide();options.onSelectEnd(img,selection);jQuery(document).unbind('mousemove',selectingMouseMove);$border2.mousemove(areaMouseMove)});return false}function windowResize(){adjust();update()}this.setOptions=function(newOptions){options=jQuery.extend(options,newOptions);if(newOptions.x1!=null){selection.x1=newOptions.x1;selection.y1=newOptions.y1;selection.x2=newOptions.x2;selection.y2=newOptions.y2;newOptions.show=true}parent=jQuery(options.parent).get(0);adjust();$p=jQuery(img);while($p.length&amp;&amp;!$p.is('body')){if(!isNaN($p.css('z-index'))&amp;&amp;$p.css('z-index')&gt;zIndex)zIndex=$p.css('z-index');if($p.css('position')=='fixed')fixed=true;$p=$p.parent()}x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2);selection.width=x2-x1;selection.height=y2-y1;update();if(newOptions.hide)$a.add($o).hide();else if(newOptions.show)$a.add($o).show();$o.addClass(options.classPrefix+'-outer');$area.addClass(options.classPrefix+'-selection');$border1.addClass(options.classPrefix+'-border1');$border2.addClass(options.classPrefix+'-border2');$a.css({borderWidth:options.borderWidth+'px'});$area.css({backgroundColor:options.selectionColor,opacity:options.selectionOpacity});$border1.css({borderStyle:'solid',borderColor:options.borderColor1});$border2.css({borderStyle:'dashed',borderColor:options.borderColor2});$o.css({opacity:options.outerOpacity,backgroundColor:options.outerColor});aspectRatio=options.aspectRatio&amp;&amp;(d=options.aspectRatio.split(/:/))?d[0]/d[1]:null;if(options.disable||options.enable===false){$a.unbind('mousemove',areaMouseMove).unbind('mousedown',areaMouseDown);jQuery(img).add($o).unbind('mousedown',imgMouseDown);jQuery(window).unbind('resize',windowResize)}else if(options.enable||options.disable===false){if(options.resizable||options.movable)$a.mousemove(areaMouseMove).mousedown(areaMouseDown);jQuery(img).add($o).mousedown(imgMouseDown);jQuery(window).resize(windowResize)}jQuery(options.parent).append($o.add($a));options.enable=options.disable=undefined};if(jQuery.browser.msie)jQuery(img).attr('unselectable','on');$a.add($o).css({display:'none',position:fixed?'fixed':'absolute',overflow:'hidden',zIndex:zIndex&gt;0?zIndex:null});$area.css({borderStyle:'solid'});initOptions={borderColor1:'#000',borderColor2:'#fff',borderWidth:1,classPrefix:'imgareaselect',movable:true,resizable:true,selectionColor:'#fff',selectionOpacity:0.2,outerColor:'#000',outerOpacity:0.2,parent:'body',onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}};options=jQuery.extend(initOptions,options);this.setOptions(options)};jQuery.fn.imgAreaSelect=function(options){options=options||{};this.each(function(){if(jQuery(this).data('imgAreaSelect'))jQuery(this).data('imgAreaSelect').setOptions(options);else{if(options.enable===undefined&amp;&amp;options.disable===undefined)options.enable=true;jQuery(this).data('imgAreaSelect',new jQuery.imgAreaSelect(this,options))}});return this};
+	var jQ = jQuery;
+})(jQuery);/**
+ * Cookie plugin
+ *
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+
+/**
+ * Create a cookie with the given name and value and other optional parameters.
+ *
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Set the value of a cookie.
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
+ * @desc Create a cookie with all available options.
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Create a session cookie.
+ * @example $.cookie('the_cookie', null);
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
+ *       used when the cookie was set.
+ *
+ * @param String name The name of the cookie.
+ * @param String value The value of the cookie.
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
+ *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
+ *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
+ *                             when the the browser exits.
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
+ *                        require a secure protocol (like HTTPS).
+ * @type undefined
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+
+/**
+ * Get the value of a cookie with the given name.
+ *
+ * @example $.cookie('the_cookie');
+ * @desc Get the value of a cookie.
+ *
+ * @param String name The name of the cookie.
+ * @return The value of the cookie.
+ * @type String
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+jQuery.cookie = function(name, value, options) {
+    if (typeof value != 'undefined') { // name and value given, set cookie
+        options = options || {};
+        if (value === null) {
+            value = '';
+            options.expires = -1;
+        }
+        var expires = '';
+        if (options.expires &amp;&amp; (typeof options.expires == 'number' || options.expires.toUTCString)) {
+            var date;
+            if (typeof options.expires == 'number') {
+                date = new Date();
+                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+            } else {
+                date = options.expires;
+            }
+            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+        }
+        // CAUTION: Needed to parenthesize options.path and options.domain
+        // in the following expressions, otherwise they evaluate to undefined
+        // in the packed version for some reason...
+        var path = options.path ? '; path=' + (options.path) : '';
+        var domain = options.domain ? '; domain=' + (options.domain) : '';
+        var secure = options.secure ? '; secure' : '';
+        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+    } else { // only name given, get cookie
+        var cookieValue = null;
+        if (document.cookie &amp;&amp; document.cookie != '') {
+            var cookies = document.cookie.split(';');
+            for (var i = 0; i &lt; cookies.length; i++) {
+                var cookie = jQuery.trim(cookies[i]);
+                // Does this cookie string begin with the name we want?
+                if (cookie.substring(0, name.length + 1) == (name + '=')) {
+                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+                    break;
+                }
+            }
+        }
+        return cookieValue;
+    }
+};jQuery.imgAreaSelect=function(img,options){var $area=jQuery('&lt;div&gt;&lt;/div&gt;'),$border1=jQuery('&lt;div&gt;&lt;/div&gt;'),$border2=jQuery('&lt;div&gt;&lt;/div&gt;'),$outLeft=jQuery('&lt;div&gt;&lt;/div&gt;'),$outTop=jQuery('&lt;div&gt;&lt;/div&gt;'),$outRight=jQuery('&lt;div&gt;&lt;/div&gt;'),$outBottom=jQuery('&lt;div&gt;&lt;/div&gt;'),left,top,imgOfs,imgWidth,imgHeight,parent,parOfs,parScroll,adjusted,zIndex=0,fixed,$p,startX,startY,moveX,moveY,resizeMargin=10,resize=[],V=0,H=1,d,aspectRatio,x1,x2,y1,y2,x,y,selection={x1:0,y1:0,x2:0,y2:0,width:0,height:0};var $a=$area.add($border1).add($border2);var $o=$outLeft.add($outTop).add($outRight).add($outBottom);function viewX(x){return x+imgOfs.left+parScroll.left-parOfs.left}function viewY(y){return y+imgOfs.top+parScroll.top-parOfs.top}function selX(x){return x-imgOfs.left-parScroll.left+parOfs.left}function selY(y){return y-imgOfs.top-parScroll.top+parOfs.top}function evX(event){return event.pageX+parScroll.left-parOfs.left}function evY(event){return event.pageY+parScroll.top-parOfs.top}function adjust(){imgOfs=jQuery(img).offset();imgWidth=jQuery(img).width();imgHeight=jQuery(img).height();if(jQuery(parent).is('body'))parOfs=parScroll={left:0,top:0};else{parOfs=jQuery(parent).offset();parScroll={left:parent.scrollLeft,top:parent.scrollTop}}left=viewX(0);top=viewY(0)}function update(){$a.css({left:viewX(selection.x1)+'px',top:viewY(selection.y1)+'px',width:Math.max(selection.width-options.borderWidth*2,0)+'px',height:Math.max(selection.height-options.borderWidth*2,0)+'px'});$outLeft.css({left:left+'px',top:top+'px',width:selection.x1+'px',height:imgHeight+'px'});$outTop.css({left:left+selection.x1+'px',top:top+'px',width:selection.width+'px',height:selection.y1+'px'});$outRight.css({left:left+selection.x2+'px',top:top+'px',width:imgWidth-selection.x2+'px',height:imgHeight+'px'});$outBottom.css({left:left+selection.x1+'px',top:top+selection.y2+'px',width:selection.width+'px',height:imgHeight-selection.y2+'px'})}function areaMouseMove(event){if(!adjusted){adjust();adjusted=true;$a.one('mouseout',function(){adjusted=false})}x=selX(evX(event))-selection.x1;y=selY(evY(event))-selection.y1;resize=[];if(options.resizable){if(y&lt;=resizeMargin)resize[V]='n';else if(y&gt;=selection.height-resizeMargin)resize[V]='s';if(x&lt;=resizeMargin)resize[H]='w';else if(x&gt;=selection.width-resizeMargin)resize[H]='e'}$border2.css('cursor',resize.length?resize.join('')+'-resize':options.movable?'move':'')}function areaMouseDown(event){if(event.which!=1)return false;adjust();if(options.resizable&amp;&amp;resize.length&gt;0){jQuery('body').css('cursor',resize.join('')+'-resize');x1=viewX(resize[H]=='w'?selection.x2:selection.x1);y1=viewY(resize[V]=='n'?selection.y2:selection.y1);jQuery(document).mousemove(selectingMouseMove);$border2.unbind('mousemove',areaMouseMove);jQuery(document).one('mouseup',function(){resize=[];jQuery('body').css('cursor','');if(options.autoHide)$a.add($o).hide();options.onSelectEnd(img,selection);jQuery(document).unbind('mousemove',selectingMouseMove);$border2.mousemove(areaMouseMove)})}else if(options.movable){moveX=selection.x1+left;moveY=selection.y1+top;startX=evX(event);startY=evY(event);jQuery(document).mousemove(movingMouseMove).one('mouseup',function(){options.onSelectEnd(img,selection);jQuery(document).unbind('mousemove',movingMouseMove)})}else jQuery(img).mousedown(event);return false}function aspectRatioXY(){x2=Math.max(left,Math.min(left+imgWidth,x1+Math.abs(y2-y1)*aspectRatio*(x2&gt;x1?1:-1)));y2=Math.round(Math.max(top,Math.min(top+imgHeight,y1+Math.abs(x2-x1)/aspectRatio*(y2&gt;y1?1:-1))));x2=Math.round(x2)}function aspectRatioYX(){y2=Math.max(top,Math.min(top+imgHeight,y1+Math.abs(x2-x1)/aspectRatio*(y2&gt;y1?1:-1)));x2=Math.round(Math.max(left,Math.min(left+imgWidth,x1+Math.abs(y2-y1)*aspectRatio*(x2&gt;x1?1:-1))));y2=Math.round(y2)}function selectingMouseMove(event){x2=!resize.length||resize[H]||aspectRatio?evX(event):viewX(selection.x2);y2=!resize.length||resize[V]||aspectRatio?evY(event):viewY(selection.y2);if(options.minWidth&amp;&amp;Math.abs(x2-x1)&lt;options.minWidth){x2=x1-options.minWidth*(x2&lt;x1?1:-1);if(x2&lt;left)x1=left+options.minWidth;else if(x2&gt;left+imgWidth)x1=left+imgWidth-options.minWidth}if(options.minHeight&amp;&amp;Math.abs(y2-y1)&lt;options.minHeight){y2=y1-options.minHeight*(y2&lt;y1?1:-1);if(y2&lt;top)y1=top+options.minHeight;else if(y2&gt;top+imgHeight)y1=top+imgHeight-options.minHeight}x2=Math.max(left,Math.min(x2,left+imgWidth));y2=Math.max(top,Math.min(y2,top+imgHeight));if(aspectRatio)if(Math.abs(x2-x1)/aspectRatio&gt;Math.abs(y2-y1))aspectRatioYX();else aspectRatioXY();if(options.maxWidth&amp;&amp;Math.abs(x2-x1)&gt;options.maxWidth){x2=x1-options.maxWidth*(x2&lt;x1?1:-1);if(aspectRatio)aspectRatioYX()}if(options.maxHeight&amp;&amp;Math.abs(y2-y1)&gt;options.maxHeight){y2=y1-options.maxHeight*(y2&lt;y1?1:-1);if(aspectRatio)aspectRatioXY()}selection.x1=selX(Math.min(x1,x2));selection.x2=selX(Math.max(x1,x2));selection.y1=selY(Math.min(y1,y2));selection.y2=selY(Math.max(y1,y2));selection.width=Math.abs(x2-x1);selection.height=Math.abs(y2-y1);update();options.onSelectChange(img,selection);return false}function movingMouseMove(event){x1=Math.max(left,Math.min(moveX+evX(event)-startX,left+imgWidth-selection.width));y1=Math.max(top,Math.min(moveY+evY(event)-startY,top+imgHeight-selection.height));x2=x1+selection.width;y2=y1+selection.height;selection.x1=selX(x1);selection.y1=selY(y1);selection.x2=selX(x2);selection.y2=selY(y2);update();options.onSelectChange(img,selection);event.preventDefault();return false}function imgMouseDown(event){if(event.which!=1)return false;adjust();selection.x1=selection.x2=selX(startX=x1=x2=evX(event));selection.y1=selection.y2=selY(startY=y1=y2=evY(event));selection.width=0;selection.height=0;resize=[];update();$a.add($o).show();jQuery(document).mousemove(selectingMouseMove);$border2.unbind('mousemove',areaMouseMove);options.onSelectStart(img,selection);jQuery(document).one('mouseup',function(){if(options.autoHide)$a.add($o).hide();options.onSelectEnd(img,selection);jQuery(document).unbind('mousemove',selectingMouseMove);$border2.mousemove(areaMouseMove)});return false}function windowResize(){adjust();update()}this.setOptions=function(newOptions){options=jQuery.extend(options,newOptions);if(newOptions.x1!=null){selection.x1=newOptions.x1;selection.y1=newOptions.y1;selection.x2=newOptions.x2;selection.y2=newOptions.y2;newOptions.show=true}parent=jQuery(options.parent).get(0);adjust();$p=jQuery(img);while($p.length&amp;&amp;!$p.is('body')){if(!isNaN($p.css('z-index'))&amp;&amp;$p.css('z-index')&gt;zIndex)zIndex=$p.css('z-index');if($p.css('position')=='fixed')fixed=true;$p=$p.parent()}x1=viewX(selection.x1);y1=viewY(selection.y1);x2=viewX(selection.x2);y2=viewY(selection.y2);selection.width=x2-x1;selection.height=y2-y1;update();if(newOptions.hide)$a.add($o).hide();else if(newOptions.show)$a.add($o).show();$o.addClass(options.classPrefix+'-outer');$area.addClass(options.classPrefix+'-selection');$border1.addClass(options.classPrefix+'-border1');$border2.addClass(options.classPrefix+'-border2');$a.css({borderWidth:options.borderWidth+'px'});$area.css({backgroundColor:options.selectionColor,opacity:options.selectionOpacity});$border1.css({borderStyle:'solid',borderColor:options.borderColor1});$border2.css({borderStyle:'dashed',borderColor:options.borderColor2});$o.css({opacity:options.outerOpacity,backgroundColor:options.outerColor});aspectRatio=options.aspectRatio&amp;&amp;(d=options.aspectRatio.split(/:/))?d[0]/d[1]:null;if(options.disable||options.enable===false){$a.unbind('mousemove',areaMouseMove).unbind('mousedown',areaMouseDown);jQuery(img).add($o).unbind('mousedown',imgMouseDown);jQuery(window).unbind('resize',windowResize)}else if(options.enable||options.disable===false){if(options.resizable||options.movable)$a.mousemove(areaMouseMove).mousedown(areaMouseDown);jQuery(img).add($o).mousedown(imgMouseDown);jQuery(window).resize(windowResize)}jQuery(options.parent).append($o.add($a));options.enable=options.disable=undefined};if(jQuery.browser.msie)jQuery(img).attr('unselectable','on');$a.add($o).css({display:'none',position:fixed?'fixed':'absolute',overflow:'hidden',zIndex:zIndex&gt;0?zIndex:null});$area.css({borderStyle:'solid'});initOptions={borderColor1:'#000',borderColor2:'#fff',borderWidth:1,classPrefix:'imgareaselect',movable:true,resizable:true,selectionColor:'#fff',selectionOpacity:0.2,outerColor:'#000',outerOpacity:0.2,parent:'body',onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}};options=jQuery.extend(initOptions,options);this.setOptions(options)};jQuery.fn.imgAreaSelect=function(options){options=options||{};this.each(function(){if(jQuery(this).data('imgAreaSelect'))jQuery(this).data('imgAreaSelect').setOptions(options);else{if(options.enable===undefined&amp;&amp;options.disable===undefined)options.enable=true;jQuery(this).data('imgAreaSelect',new jQuery.imgAreaSelect(this,options))}});return this};
 /* JS Table initialisation for index.html */
-$(document).ready(function() {
-  if($(&quot;#item_list_container&quot;)) {
-    $(&quot;#item_list_container&quot;).tablesorter({dateFormat: 'dd/mm/yyyy', highlightClass: 'highlight_col',
+jQuery(document).ready(function() {
+  if(jQuery(&quot;#item_list_container&quot;)) {
+    jQuery(&quot;#item_list_container&quot;).tablesorter({dateFormat: 'dd/mm/yyyy', highlightClass: 'highlight_col',
       stripingRowClass: ['item_row1','item_row0'],stripeRowsOnStartUp: true});
   }
-  if($(&quot;.form_datepicker&quot;)) $(&quot;.form_datepicker&quot;).datepicker({changeMonth: true, changeYear: true});
+  if(jQuery(&quot;.form_datepicker&quot;)) jQuery(&quot;.form_datepicker&quot;).datepicker({changeMonth: true, changeYear: true});
 });
 
 
-$(document).ready(function() {
+jQuery(document).ready(function() {
 	inline_status_change();	
 });
 
 
 function inline_status_change(){
-	if($('.status_change')){	
-		$('.status_change').click(function(){
-			current_status = $(this).attr('rel');
-			dest = $(this).attr('href');
+	if(jQuery('.status_change')){	
+		jQuery('.status_change').click(function(){
+			current_status = jQuery(this).attr('rel');
+			dest = jQuery(this).attr('href');
 			dest = dest.replace('?status=0', '').replace('?status=1', '');
 			replace = &quot;#&quot;+this.id;
-			$.get(dest, {status: current_status, ajax:'yes'}, function(response){				
-				$(replace).replaceWith(response);
+			jQuery.get(dest, {status: current_status, ajax:'yes'}, function(response){				
+				jQuery(replace).replaceWith(response);
 				inline_status_change();
 			});
 			return false;
@@ -443,162 +521,165 @@ function inline_status_change(){
 jQuery.fn.centerScreen = function(loaded) { 
   var obj = this; 
   if(!loaded) { 
-    obj.css('top', $(window).height()/2-this.height()/2); 
-    obj.css('left', $(window).width()/2-this.width()/2); 
-    $(window).resize(function() { obj.centerScreen(!loaded); }); 
+    obj.css('top', jQuery(window).height()/2-this.height()/2); 
+    obj.css('left', jQuery(window).width()/2-this.width()/2); 
+    jQuery(window).resize(function() { obj.centerScreen(!loaded); }); 
   } else { 
     obj.stop(); 
     obj.animate({ 
-      top: $(window).height()/2-this.height()/2, 
-      left: $(window).width()/2-this.width()/2}, 200, 'linear'); 
+      top: jQuery(window).height()/2-this.height()/2, 
+      left: jQuery(window).width()/2-this.width()/2}, 200, 'linear'); 
   } 
 };
 var content_page_id;
 var model_string;
 var init_upload;
 var autosaver;
-var wym_editors = [];
+wym_editors = [];
 if(typeof(file_browser_location) == &quot;undefined&quot;) var file_browser_location = &quot;/admin/files/browse_images&quot;;
-$(document).ready(function() {
-    $(&quot;#container&quot;).tabs();
+var file_mime_type = &quot;image&quot;;
+jQuery(document).ready(function() {
+    jQuery(&quot;#container&quot;).tabs();
     
-    $(&quot;#page_tab_title&quot;).html($(&quot;#cms_content_title&quot;).val());
-    $(&quot;#cms_content_title&quot;).keyup(function() {
-      $(&quot;#page_tab_title&quot;).html($(&quot;#cms_content_title&quot;).val());
+    jQuery(&quot;#page_tab_title&quot;).html(jQuery(&quot;#cms_content_title&quot;).val());
+    jQuery(&quot;#cms_content_title&quot;).keyup(function() {
+      jQuery(&quot;#page_tab_title&quot;).html(jQuery(&quot;#cms_content_title&quot;).val());
     });
-    $(&quot;#new_cat_create&quot;).click(function() {
-      $.ajax({ url: &quot;../../new_category/?cat=&quot;+$(&quot;#new_cat&quot;).val(), 
-        complete: function(response){$(&quot;#category_list&quot;).html(response.responseText); initialise_draggables();}
+    jQuery(&quot;#new_cat_create&quot;).click(function() {
+      jQuery.ajax({ url: &quot;../../new_category/?cat=&quot;+jQuery(&quot;#new_cat&quot;).val(), 
+        complete: function(response){jQuery(&quot;#category_list&quot;).html(response.responseText); initialise_draggables();}
       });
       return false;
     });   
     initialise_draggables();
-    if($(&quot;#copy_permissions_from&quot;).length &gt; 0) $(&quot;#copy_permissions_from&quot;).change(function(){
-      $.get(&quot;../../copy_permissions_from/&quot;+content_page_id+&quot;?copy_from=&quot;+$(this).val(),function(response){
-        $(&quot;#cat_dropzone&quot;).html(response); init_deletes();
+    if(jQuery(&quot;#copy_permissions_from&quot;).length &gt; 0) jQuery(&quot;#copy_permissions_from&quot;).change(function(){
+      jQuery.get(&quot;../../copy_permissions_from/&quot;+content_page_id+&quot;?copy_from=&quot;+jQuery(this).val(),function(response){
+        jQuery(&quot;#cat_dropzone&quot;).html(response); init_deletes();
       });
       return false;
     });
-    $(&quot;#link_dialog&quot;).dialog({autoOpen:false, width:&quot;auto&quot;, height:&quot;auto&quot;});
-    $(&quot;#table_dialog&quot;).dialog({autoOpen:false, title:&quot;Insert a Table&quot;, width:700, height:500});
-    $(&quot;#video_dialog&quot;).dialog({autoOpen:false, title:&quot;Insert a Video&quot;, width:700, height:500});
-    $(&quot;#quick_upload_pane&quot;).dialog({autoOpen:false, title:&quot;Upload an Image&quot;, width:700,height:500});
-    $(&quot;#upload_url_pane&quot;).dialog({autoOpen:false, title:&quot;Get Image From URL&quot;, width:700,height:500});
+    jQuery(&quot;#link_dialog&quot;).dialog({autoOpen:false, width:&quot;auto&quot;, height:&quot;auto&quot;});
+    jQuery(&quot;#table_dialog&quot;).dialog({autoOpen:false, title:&quot;Insert a Table&quot;, width:700, height:500});
+    jQuery(&quot;#video_dialog&quot;).dialog({autoOpen:false, title:&quot;Insert a Video&quot;, width:700, height:500});
+    jQuery(&quot;#quick_upload_pane&quot;).dialog({autoOpen:false, title:&quot;Upload an Image&quot;, width:700,height:500});
+    jQuery(&quot;#upload_url_pane&quot;).dialog({autoOpen:false, title:&quot;Get Image From URL&quot;, width:700,height:500});
     
-    $(&quot;#quick_upload_button&quot;).click(function(){
-      $(&quot;#quick_upload_pane&quot;).dialog(&quot;open&quot;);
-      $.ajax({
+    jQuery(&quot;#quick_upload_button&quot;).click(function(){
+      jQuery(&quot;#quick_upload_pane&quot;).dialog(&quot;open&quot;);
+      jQuery.ajax({
         url: &quot;/admin/files/quickupload/&quot;+content_page_id+&quot;?model=&quot;+model_string+&quot;&amp;join_field=&quot;+join_field, 
         complete: function(response){
-          $(&quot;#quick_upload_pane&quot;).html(response.responseText); 
+          jQuery(&quot;#quick_upload_pane&quot;).html(response.responseText); 
           init_upload();
         }
       });
+      return false;
     });
-    $(&quot;#upload_url_button&quot;).click(function(){
-      $(&quot;#upload_url_pane&quot;).dialog(&quot;open&quot;);
-      $.ajax({
+    jQuery(&quot;#upload_url_button&quot;).click(function(){
+      jQuery(&quot;#upload_url_pane&quot;).dialog(&quot;open&quot;);
+      jQuery.ajax({
         url: &quot;/admin/files/upload_url/&quot;+content_page_id+&quot;?model=&quot;+model_string+&quot;&amp;join_field=&quot;+join_field, 
         complete: function(response){
-          $(&quot;#upload_url_pane&quot;).html(response.responseText); 
+          jQuery(&quot;#upload_url_pane&quot;).html(response.responseText); 
           init_upload();
         }
       });
+      return false;
     });
     
   
 });
 
 function initialise_draggables() {
-  $(&quot;#category_list .category_tag, #permission_list .permission_tag&quot;).draggable({opacity:0.5, revert:true, scroll:false, containment:'window', helper:'clone'});
-  $(&quot;#cat_dropzone&quot;).droppable(
+  jQuery(&quot;#category_list .category_tag, #permission_list .permission_tag&quot;).draggable({opacity:0.5, revert:true, scroll:false, containment:'window', helper:'clone'});
+  jQuery(&quot;#cat_dropzone&quot;).droppable(
   	{ accept: '.category_tag, .permission_tag', hoverClass:	'dropzone_active', tolerance:	'pointer',
   		drop:	function(event, ui) {
   		  if(ui.draggable.hasClass('permission_tag')) var end_url = &quot;../../add_permission/&quot;;
   		  else var end_url = &quot;../../add_category/&quot;;
-  		  $.post(end_url+content_page_id,{tagid: ui.draggable.attr(&quot;id&quot;), id:ui.draggable.attr(&quot;id&quot;)},
-  		  function(response){  $(&quot;#cat_dropzone&quot;).html(response);  init_deletes(); });
+  		  jQuery.post(end_url+content_page_id,{tagid: ui.draggable.attr(&quot;id&quot;), id:ui.draggable.attr(&quot;id&quot;)},
+  		  function(response){  jQuery(&quot;#cat_dropzone&quot;).html(response);  init_deletes(); });
   	}
   });
-  $(&quot;#category_list .category_tag, #permission_list .permission_tag&quot;).dblclick(function(){
-    if($(this).hasClass('permission_tag')) var end_url = &quot;../../add_permission/&quot;;
+  jQuery(&quot;#category_list .category_tag, #permission_list .permission_tag&quot;).dblclick(function(){
+    if(jQuery(this).hasClass('permission_tag')) var end_url = &quot;../../add_permission/&quot;;
   	else var end_url = &quot;../../add_category/&quot;;
-    $.post(end_url+content_page_id,{tagid: this.id, id:this.id},
-	  function(response){  $(&quot;#cat_dropzone&quot;).html(response); init_deletes(); });
+    jQuery.post(end_url+content_page_id,{tagid: this.id, id:this.id},
+	  function(response){  jQuery(&quot;#cat_dropzone&quot;).html(response); init_deletes(); });
   });
   init_deletes();
 }
 
 function init_deletes(){
-  $(&quot;.category_trash_button, .permission_trash_button&quot;).click(function(){
-    if($(this).hasClass('permission_trash_button')){
+  jQuery(&quot;.category_trash_button, .permission_trash_button&quot;).click(function(){
+    if(jQuery(this).hasClass('permission_trash_button')){
       var end_url = &quot;../../remove_permission/&quot;;
       var rid = this.id.replace(&quot;delete_permission_button_&quot;, &quot;&quot;);
   	}else{
   	  var end_url = &quot;../../remove_category/&quot;;
   	  var rid = this.id.substr(22);
 	  }
-    $.get(end_url+content_page_id+&quot;?cat=&quot;+rid,function(response){
-      $(&quot;#cat_dropzone&quot;).html(response); init_deletes();
+    jQuery.get(end_url+content_page_id+&quot;?cat=&quot;+rid,function(response){
+      jQuery(&quot;#cat_dropzone&quot;).html(response); init_deletes();
     });
   });
 }
 
 function delayed_cat_filter(filter) {
-  $(&quot;#category_filter&quot;).css(&quot;background&quot;, &quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);
-  $.ajax({type: &quot;post&quot;, url: &quot;/admin/categories/filters&quot;, data: &quot;filter=&quot;+filter, 
+  jQuery(&quot;#category_filter&quot;).css(&quot;background&quot;, &quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);
+  jQuery.ajax({type: &quot;post&quot;, url: &quot;/admin/categories/filters&quot;, data: &quot;filter=&quot;+filter, 
     complete: function(response){ 
-      $(&quot;#category_list&quot;).html(response.responseText); 
+      jQuery(&quot;#category_list&quot;).html(response.responseText); 
       initialise_draggables();
       if(typeof(t) != &quot;undefined&quot; ) clearTimeout(t); 
-      $(&quot;#category_filter&quot;).css(&quot;background&quot;, &quot;white&quot;);
+      jQuery(&quot;#category_filter&quot;).css(&quot;background&quot;, &quot;white&quot;);
     }
   });
 }
 
 function delayed_image_filter(filter) {
-  $(&quot;#image_filter&quot;).css(&quot;background&quot;, &quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);
-  $.ajax({type: &quot;post&quot;, url: &quot;/admin/files/image_filter&quot;, data: &quot;filter=&quot;+$(&quot;#image_filter&quot;).val(), 
+  jQuery(&quot;#image_filter&quot;).css(&quot;background&quot;, &quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);
+  jQuery.ajax({type: &quot;post&quot;, url: &quot;/admin/files/image_filter&quot;, data: &quot;mime_type=&quot;+file_mime_type+&quot;&amp;filter=&quot;+jQuery(&quot;#image_filter&quot;).val(), 
     complete: function(response){ 
-      $(&quot;#image_list&quot;).html(response.responseText); 
+      jQuery(&quot;#image_list&quot;).html(response.responseText); 
       initialise_images();  
       if(typeof(t) != &quot;undefined&quot; ) clearTimeout(t); 
-      $(&quot;#image_filter&quot;).css(&quot;background&quot;, &quot;white&quot;);
+      jQuery(&quot;#image_filter&quot;).css(&quot;background&quot;, &quot;white&quot;);
     }
   });
 }
 
 
 /**** Setup for image drag and drop ******/
-$(document).ready(function(event) {
+jQuery(document).ready(function(event) {
 	
-  $(&quot;#image_filter&quot;).keyup(function() {
+  jQuery(&quot;#image_filter&quot;).keyup(function() {
     if(typeof(t) != &quot;undefined&quot; ) clearTimeout(t);
-    t = setTimeout('delayed_image_filter($(&quot;#image_filter&quot;).val())', 400);
+    t = setTimeout('delayed_image_filter(jQuery(&quot;#image_filter&quot;).val())', 400);
   });
   
-  $(&quot;#category_filter&quot;).keyup(function() {
+  jQuery(&quot;#category_filter&quot;).keyup(function() {
     if(typeof(t) != &quot;undefined&quot; ) clearTimeout(t);
-    t = setTimeout('delayed_cat_filter($(&quot;#category_filter&quot;).val())', 400);
+    t = setTimeout('delayed_cat_filter(jQuery(&quot;#category_filter&quot;).val())', 400);
   });
 
-  $(&quot;#image_filter&quot;).focus(function(){if($(this).val() ==&quot;Filter&quot;) {$(this).val('');}; });
-  $(&quot;#category_filter&quot;).focus(function(){
-    if($(this).val() ==&quot;Filter&quot;) {$(this).val('');} 
+  jQuery(&quot;#image_filter&quot;).focus(function(){if(jQuery(this).val() ==&quot;Filter&quot;) {jQuery(this).val('');}; });
+  jQuery(&quot;#category_filter&quot;).focus(function(){
+    if(jQuery(this).val() ==&quot;Filter&quot;) {jQuery(this).val('');} 
   });
-  $(&quot;#category_filter&quot;).blur(function(){if($(this).val() ==&quot;&quot;) {$(this).val('Filter');} });
-  $(&quot;#wildfire_file_new_folder&quot;).change(function(t){
-    $.post(file_browser_location,{filterfolder:$(this).val()},
+  jQuery(&quot;#category_filter&quot;).blur(function(){if(jQuery(this).val() ==&quot;&quot;) {jQuery(this).val('Filter');} });
+  jQuery(&quot;#wildfire_file_new_folder&quot;).change(function(t){
+    jQuery.post(file_browser_location,{filterfolder:jQuery(this).val(), mime_type:file_mime_type},
       function(response) { 
-        $(&quot;#image_list&quot;).html(response); 
+        jQuery(&quot;#image_list&quot;).html(response); 
         initialise_images(); 
       }
     );
   });
-  $(&quot;#view_all_button&quot;).click(function(){
-    $.post(file_browser_location,{},
+  jQuery(&quot;#view_all_button&quot;).click(function(){
+    jQuery.post(file_browser_location,{mime_type:file_mime_type},
       function(response) { 
-        $(&quot;#image_list&quot;).html(response); 
+        jQuery(&quot;#image_list&quot;).html(response); 
         initialise_images(); 
       }
     );
@@ -608,29 +689,29 @@ $(document).ready(function(event) {
   
   
   /*** Load in the first page of images via ajax ***/
-  $.get(file_browser_location+&quot;/1/&quot;, function(response){
-    $(&quot;#image_list&quot;).html(response);
+  jQuery.get(file_browser_location+&quot;/1/?mime_type=&quot;+file_mime_type, function(response){
+    jQuery(&quot;#image_list&quot;).html(response);
     initialise_images();
   });
-  $('.jqwysi').wymeditor({
+  jQuery('.jqwysi').wymeditor({
     skin: 'wildfire',
     stylesheet: '/stylesheets/cms/wysiwyg_styles.css',
     postInit: function(wym) {
       wym.wildfire(wym);
       wym_editors.push(wym);
-      var handlesel = $(&quot;.ui-resizable-handle&quot;);
-      $(&quot;.wym_box&quot;).resizable({
+      var handlesel = jQuery(&quot;.ui-resizable-handle&quot;);
+      jQuery(&quot;.wym_box&quot;).resizable({
         handles: &quot;s&quot;
       });
-      $(&quot;.wym_box&quot;).css(&quot;height&quot;, &quot;250px&quot;);
-      $(&quot;.wym_area_main, .wym_iframe, iframe&quot;).css(&quot;height&quot;,&quot;100%&quot;); 
-      $(&quot;.wym_iframe&quot;).css(&quot;height&quot;,&quot;91%&quot;); 
+      jQuery(&quot;.wym_box&quot;).css(&quot;height&quot;, &quot;250px&quot;);
+      jQuery(&quot;.wym_area_main, .wym_iframe, iframe&quot;).css(&quot;height&quot;,&quot;100%&quot;); 
+      jQuery(&quot;.wym_iframe&quot;).css(&quot;height&quot;,&quot;91%&quot;); 
     }
   });              
   
-  if($('#quicksave').length){
+  if(jQuery('#quicksave').length){
 		autosaver = setInterval(function(){autosave_content(wym_editors);},40000);
-  	$(&quot;#autosave&quot;).click(function(){autosave_content(wym_editors);});
+  	jQuery(&quot;#autosave&quot;).click(function(){autosave_content(wym_editors);});
 	}
 });
 
@@ -644,37 +725,37 @@ function wym_button(name, title) {
 
 
 function initialise_images() {
-  $(&quot;.drag_image&quot;).draggable({opacity:0.5, revert:true, scroll:true, containment:'window', helper:'clone'});
-  $(&quot;.remove_image&quot;).click(function(){
-    $.get(&quot;../../remove_image/&quot;+content_page_id+&quot;?image=&quot;+this.id.substr(13)+&quot;&amp;order=&quot;+this.parentNode.id.substr(8),function(response){
-      $(&quot;#drop_zones&quot;).html(response);
+  jQuery(&quot;.drag_image&quot;).draggable({opacity:0.5, revert:true, scroll:true, containment:'window', helper:'clone'});
+  jQuery(&quot;.remove_image&quot;).click(function(){
+    jQuery.get(&quot;../../remove_image/&quot;+content_page_id+&quot;?image=&quot;+this.id.substr(13)+&quot;&amp;order=&quot;+this.parentNode.id.substr(8),function(response){
+      jQuery(&quot;#drop_zones&quot;).html(response);
       initialise_images();
     });
     return false;
   });
-  $(&quot;#drop_zones&quot;).sortable({
+  jQuery(&quot;#drop_zones&quot;).sortable({
     update: function(event, ui) {
-      alert($(&quot;#drop_zones&quot;).sortable(&quot;serialize&quot;));
+      alert(jQuery(&quot;#drop_zones&quot;).sortable(&quot;serialize&quot;));
     }
   });
   
   /*** Setup image pagination ***/
   
-  $(&quot;.paginate_images&quot;).click(function(){
-    $.get(file_browser_location+&quot;/&quot;+this.id.substr(12),{},function(response){
-      $(&quot;#image_list&quot;).html(response);
+  jQuery(&quot;.paginate_images&quot;).click(function(){
+    jQuery.get(file_browser_location+&quot;/&quot;+this.id.substr(12)+'?mime_type='+file_mime_type,{},function(response){
+      jQuery(&quot;#image_list&quot;).html(response);
       initialise_images();
     });
   });
 
-	$(&quot;#drop_zones&quot;).droppable(
+	jQuery(&quot;#drop_zones&quot;).droppable(
   	{
   	  accept: '.drag_image', hoverClass:'dropzone_active', tolerance: 'pointer',
   		drop:	function (event, ui) {
-  			$.post(&quot;../../add_image/&quot;+content_page_id, 
-				  {id: ui.draggable.attr(&quot;id&quot;), order: $('.dropped_image').size()},
+  			jQuery.post(&quot;../../add_image/&quot;+content_page_id, 
+				  {id: ui.draggable.attr(&quot;id&quot;), order: jQuery('.dropped_image').size()},
           function(response) {
-            $(&quot;#drop_zones&quot;).html(response);
+            jQuery(&quot;#drop_zones&quot;).html(response);
             initialise_images();
             return true;
           }
@@ -682,19 +763,19 @@ function initialise_images() {
   		}
   });
   
-  $(&quot;.url_image&quot;).click(function(){
-    $.get(&quot;/admin/files/image_urls/&quot;+$(this).attr(&quot;id&quot;).replace(&quot;url_image_&quot;, &quot;&quot;), function(response){
-      $(&quot;&lt;div&gt;&quot;+response+&quot;&lt;/div&gt;&quot;).dialog({title:&quot;Image URL&quot;,width:700}).dialog(&quot;open&quot;);
+  jQuery(&quot;.url_image&quot;).click(function(){
+    jQuery.get(&quot;/admin/files/image_urls/&quot;+jQuery(this).attr(&quot;id&quot;).replace(&quot;url_image_&quot;, &quot;&quot;), function(response){
+      jQuery(&quot;&lt;div&gt;&quot;+response+&quot;&lt;/div&gt;&quot;).dialog({title:&quot;Image URL&quot;,width:700}).dialog(&quot;open&quot;);
       
     });
   });
   
-  $(&quot;.add_image&quot;).unbind(&quot;click&quot;);
-  $(&quot;.add_image&quot;).click(function(){
-    $.post(&quot;../../add_image/&quot;+content_page_id, 
-		  {id: $(this).attr(&quot;id&quot;).replace(&quot;add_image_&quot;, &quot;&quot;), order: $('.dropped_image').size()},
+  jQuery(&quot;.add_image&quot;).unbind(&quot;click&quot;);
+  jQuery(&quot;.add_image&quot;).click(function(){
+    jQuery.post(&quot;../../add_image/&quot;+content_page_id, 
+		  {id: jQuery(this).attr(&quot;id&quot;).replace(&quot;add_image_&quot;, &quot;&quot;), order: jQuery('.dropped_image').size()},
       function(response) {
-        $(&quot;#drop_zones&quot;).html(response);
+        jQuery(&quot;#drop_zones&quot;).html(response);
         initialise_images();        
     }); 
     return false;
@@ -716,20 +797,20 @@ function get_query_var(query, variable) {
 
 /******* Setup for the link modal window and quick upload window *******/
 													
-$(document).ready(function() {	
+jQuery(document).ready(function() {	
 	if(!join_field) var join_field=&quot;images&quot;;
 });
 
 function reload_images(){
-	$.post(file_browser_location,{filterfolder:$(this).val()},
+	jQuery.post(file_browser_location,{filterfolder:jQuery(&quot;#wildfire_file_new_folder&quot;).val(), mime_type:file_mime_type},
     function(response) { 
-      $(&quot;#image_list&quot;).html(response); 
+      jQuery(&quot;#image_list&quot;).html(response); 
       initialise_images(); 
     }
   );
-	$.get(&quot;../../attached_images/&quot;+content_page_id,
+	jQuery.get(&quot;../../attached_images/&quot;+content_page_id,
     function(response) { 
-      $(&quot;#drop_zones&quot;).html(response); 
+      jQuery(&quot;#drop_zones&quot;).html(response); 
       initialise_images(); 
     }
   );
@@ -760,61 +841,60 @@ function cms_insert_video(url, width, height, local) {
 }
 
 /**** Auto Save Makes Sure Content Doesn't Get Lost *******/
-$(document).ready(function() {
-  $(&quot;#autosave_disable&quot;).click(function(){ 
+jQuery(document).ready(function() {
+  jQuery(&quot;#autosave_disable&quot;).click(function(){ 
     clearInterval(autosaver); 
-    $(&quot;#autosave_status&quot;).html(&quot;Autosave Disabled&quot;);
+    jQuery(&quot;#autosave_status&quot;).html(&quot;Autosave Disabled&quot;);
   });
 });
 
 function autosave_content(wyms, after_save) {
-  for(var i in wyms)
-		wyms[i].update();
-  $('#ajaxBusy').css({opacity:0});
-  $.ajax({ 
+  for(var i in wyms) wyms[i].update();
+  jQuery('#ajaxBusy').hide();
+  jQuery.ajax({ 
 	  url: &quot;/admin/content/autosave/&quot;+content_page_id, 
-	  beforeSend: function(){$(&quot;#quicksave&quot;).effect(&quot;pulsate&quot;, { times: 3 }, 1000);},
+	  beforeSend: function(){jQuery(&quot;#quicksave&quot;).effect(&quot;pulsate&quot;, { times: 3 }, 1000);},
 	  type: &quot;POST&quot;,
     processData: false,
-    data: $('#content_edit_form').serialize(),
+    data: jQuery('#content_edit_form').serialize(),
     success: function(response){
-      $(&quot;#autosave_status&quot;).html(&quot;Saved at &quot;+response);
-      $('#ajaxBusy').css({opacity:1});
+      jQuery(&quot;#autosave_status&quot;).html(&quot;Saved at &quot;+response);
+      jQuery('#ajaxBusy').hide();
       if(typeof(after_save) == &quot;function&quot;) after_save();
 	  }
 	});
 }
 
 function open_modal_preview(url){
-	$('body').append('&lt;div id=&quot;modal_preview_window&quot;&gt;&lt;iframe src=&quot;&quot; /&gt;&lt;/div&gt;');
-	$('#modal_preview_window').dialog({
+	jQuery('body').append('&lt;div id=&quot;modal_preview_window&quot;&gt;&lt;iframe src=&quot;&quot; /&gt;&lt;/div&gt;');
+	jQuery('#modal_preview_window').dialog({
 	  autoOpen:false,
-	  width:(0.9 * $(window).width()),
-	  height:(0.9 * $(window).height()),
+	  width:(0.9 * jQuery(window).width()),
+	  height:(0.9 * jQuery(window).height()),
 	  modal:true,
 	  close: function(event, ui){
-	    $(this).remove();
+	    jQuery(this).remove();
 	  }
 	});
 
-	$('#modal_preview_window iframe').attr('src', '').attr('src', url).load(function(){
-		$('#modal_preview_window').dialog('open');
-		$('#modal_preview_window iframe').css({'width':'100%','height':'98%','border':'none'});
+	jQuery('#modal_preview_window iframe').attr('src', '').attr('src', url).load(function(){
+		jQuery('#modal_preview_window').dialog('open');
+		jQuery('#modal_preview_window iframe').css({'width':'100%','height':'98%','border':'none'});
 	});
 }
 
 /** list view content preview modals **/
-$(document).ready(function(){
-  $('a.modal_preview').click(function(){
-    open_modal_preview($(this).attr(&quot;href&quot;));
+jQuery(document).ready(function(){
+  jQuery('a.modal_preview').click(function(){
+    open_modal_preview(jQuery(this).attr(&quot;href&quot;));
     return false;
   });
 });
 
 /** save before preview **/
-$(document).ready(function(){
-  $('#preview_link').unbind(&quot;click&quot;).click(function(){
-    var preview_but = $(this);
+jQuery(document).ready(function(){
+  jQuery('#preview_link').unbind(&quot;click&quot;).click(function(){
+    var preview_but = jQuery(this);
     autosave_content(wym_editors, function(){ //do an autosave before a preview
       if(preview_but.hasClass(&quot;modal_preview&quot;)){
         open_modal_preview(preview_but.attr(&quot;href&quot;));
@@ -827,52 +907,52 @@ $(document).ready(function(){
 });
 
 /****** Inline Edit for content title **************/
-$(document).ready(function() {
-  $(&quot;#content_title_edit&quot;).hover(
+jQuery(document).ready(function() {
+  jQuery(&quot;#content_title_edit&quot;).hover(
     function(){
-      var target = $(this).parent();
+      var target = jQuery(this).parent();
       target.css(&quot;background-color&quot;, &quot;#fbf485&quot;);
-      $(this).bind(&quot;click.editable&quot;, function(){
-        $(this).unbind(&quot;click.editable&quot;);
-        el = '&lt;input type=&quot;text&quot; value=&quot;'+$(&quot;#content_title_label&quot;).text()+'&quot; id=&quot;content_title_editing&quot; /&gt;';
-        elsave = $(&quot;&lt;a href='#' id='content_edit_save'&gt;&lt;img src='/images/cms/cms_quick_save.gif'&lt;/a&gt;&quot;);
+      jQuery(this).bind(&quot;click.editable&quot;, function(){
+        jQuery(this).unbind(&quot;click.editable&quot;);
+        el = '&lt;input type=&quot;text&quot; value=&quot;'+jQuery(&quot;#content_title_label&quot;).text()+'&quot; id=&quot;content_title_editing&quot; /&gt;';
+        elsave = jQuery(&quot;&lt;a href='#' id='content_edit_save'&gt;&lt;img src='/images/cms/cms_quick_save.gif'&lt;/a&gt;&quot;);
         target.parent().after(el);
-        $(&quot;#content_title_editing&quot;).before(elsave);
-        $(&quot;#content_edit_save&quot;).css({position:&quot;relative&quot;,left:&quot;255px&quot;,top:&quot;10px&quot;,width:&quot;0px&quot;,cursor:&quot;pointer&quot;});
+        jQuery(&quot;#content_title_editing&quot;).before(elsave);
+        jQuery(&quot;#content_edit_save&quot;).css({position:&quot;relative&quot;,left:&quot;255px&quot;,top:&quot;10px&quot;,width:&quot;0px&quot;,cursor:&quot;pointer&quot;});
         elsave.click(function(){
-          $(&quot;#content_title&quot;).show();
-          $(&quot;#content_title_label&quot;).html($(&quot;#content_title_editing&quot;).val());
-          $(&quot;#content_title_editing&quot;).remove();
-          $(this).remove();
+          jQuery(&quot;#content_title&quot;).show();
+          jQuery(&quot;#content_title_label&quot;).html(jQuery(&quot;#content_title_editing&quot;).val());
+          jQuery(&quot;#content_title_editing&quot;).remove();
+          jQuery(this).remove();
         });
-        $(&quot;#content_title&quot;).hide();
-        $(&quot;#content_title_editing&quot;).change(function(){
-					var form_field_id = $('#content_title').attr('rel');
-          $(&quot;#&quot;+form_field_id).val($(this).val());
+        jQuery(&quot;#content_title&quot;).hide();
+        jQuery(&quot;#content_title_editing&quot;).change(function(){
+					var form_field_id = jQuery('#content_title').attr('rel');
+          jQuery(&quot;#&quot;+form_field_id).val(jQuery(this).val());
         });
-        $(&quot;#content_title_editing&quot;).blur(function(){
-          $(&quot;#content_title&quot;).show();
-          $(&quot;#content_title_label&quot;).html($(&quot;#content_title_editing&quot;).val());
-          $(&quot;#content_title_editing&quot;).remove();
-          $(&quot;#content_edit_save&quot;).remove();
+        jQuery(&quot;#content_title_editing&quot;).blur(function(){
+          jQuery(&quot;#content_title&quot;).show();
+          jQuery(&quot;#content_title_label&quot;).html(jQuery(&quot;#content_title_editing&quot;).val());
+          jQuery(&quot;#content_title_editing&quot;).remove();
+          jQuery(&quot;#content_edit_save&quot;).remove();
         });
-        $(&quot;#content_title_editing&quot;).get(0).focus();
+        jQuery(&quot;#content_title_editing&quot;).get(0).focus();
       });
     },
     function(){
-      var target = $(this).parent();
+      var target = jQuery(this).parent();
       target.css(&quot;background-color&quot;, &quot;transparent&quot;);
-      $(this).unbind(&quot;click.editable&quot;);
+      jQuery(this).unbind(&quot;click.editable&quot;);
     });
 });
 
 /***************************************************/
 /*     Ajax Progress Indication                    */
 /***************************************************/
-$(document).ready(function() { 
+jQuery(document).ready(function() { 
 	// Setup the ajax indicator
-	$(&quot;body&quot;).append('&lt;div id=&quot;ajaxBusy&quot;&gt;&lt;p&gt;Loading&lt;br /&gt;&lt;img src=&quot;/images/cms/indicator_dark.gif&quot;&gt;&lt;/p&gt;&lt;/div&gt;');
-	$('#ajaxBusy').css({
+	jQuery(&quot;body&quot;).append('&lt;div id=&quot;ajaxBusy&quot;&gt;&lt;p&gt;Loading&lt;br /&gt;&lt;img src=&quot;/images/cms/indicator_dark.gif&quot;&gt;&lt;/p&gt;&lt;/div&gt;');
+	jQuery('#ajaxBusy').css({
 		display:&quot;none&quot;,
 		margin:&quot;0&quot;,
 		position:&quot;absolute&quot;,
@@ -894,57 +974,61 @@ $(document).ready(function() {
 
 	// Ajax activity indicator bound 
 	// to ajax start/stop document events
-	$(document).ajaxStart(function(ajaxevent){ 
-		$('#ajaxBusy').show().centerScreen(); 
+	jQuery(document).ajaxStart(function(ajaxevent){ 
+	  if(jQuery('#ajaxBusy') &amp;&amp; jQuery('#ajaxBusy').length)	jQuery('#ajaxBusy').show().centerScreen(); 
 	});
-	$(document).ajaxStop(function(){ 
-		$('#ajaxBusy').hide();
+	jQuery(document).ajaxStop(function(){
+		if(jQuery('#ajaxBusy') &amp;&amp; jQuery('#ajaxBusy').length) jQuery('#ajaxBusy').hide();
 	});
-	$(document).ajaxError(function(){ 
-  	$('#ajaxBusy').hide();
+	jQuery(document).ajaxError(function(){ 
+  	if(jQuery('#ajaxBusy') &amp;&amp; jQuery('#ajaxBusy').length) jQuery('#ajaxBusy').hide();
   });
+  
+  
 	
 });
 
+
 /** langauge dropdown **/
-$(document).ready(function(){
-  $('#cms_content_language').change(function(){
+jQuery(document).ready(function(){
+  jQuery('#cms_content_language').change(function(){
     var orig = window.location.href.split(&quot;?&quot;);
-    window.location.replace(orig[0]+&quot;?lang=&quot;+$(this).val());
+    window.location.replace(orig[0]+&quot;?lang=&quot;+jQuery(this).val());
   });
-});$(document).ready(function() {
-  $(&quot;#dashboard #sub-navigation-container #quick_search&quot;).remove();
-  $(&quot;#quick_search form input, #quick_create form input&quot;).hint();
-  $(&quot;#live_search_field&quot;).keyup(function() {
+});
+jQuery(document).ready(function() {
+  jQuery(&quot;#dashboard #sub-navigation-container #quick_search&quot;).remove();
+  jQuery(&quot;#quick_search form input, #quick_create form input&quot;).hint();
+  jQuery(&quot;#live_search_field&quot;).keyup(function() {
     if(typeof(t) != &quot;undefined&quot; ) clearTimeout(t);
-    t = setTimeout(function(){live_search($(&quot;#live_search_field&quot;).val());}, 400);
+    t = setTimeout(function(){live_search(jQuery(&quot;#live_search_field&quot;).val());}, 400);
   });
-  $(&quot;.live_search_results&quot;).hover(function(){}, function(){
+  jQuery(&quot;.live_search_results&quot;).hover(function(){}, function(){
     s = setTimeout('live_search_close()', 800);
   });
   
-  if($(&quot;#statistics&quot;).length){
-    $(&quot;#statistics&quot;).load(&quot;/admin/home/stats&quot;, false, function(){
-      $(this).css(&quot;background-image&quot;,&quot;none&quot;);
+  if(jQuery(&quot;#statistics&quot;).length){
+    jQuery(&quot;#statistics&quot;).load(&quot;/admin/home/stats&quot;, false, function(){
+      jQuery(this).css(&quot;background-image&quot;,&quot;none&quot;);
     });
   }
 });
 
 function live_search(filter) {
-  $(&quot;#live_search_field&quot;).css(&quot;background&quot;, &quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);
-  $.ajax({type: &quot;post&quot;, url: &quot;/admin/content/search&quot;, data: &quot;input=&quot;+filter, 
+  jQuery(&quot;#live_search_field&quot;).css(&quot;background&quot;, &quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);
+  jQuery.ajax({type: &quot;post&quot;, url: &quot;/admin/content/search&quot;, data: &quot;input=&quot;+filter, 
     complete: function(response){ 
-      $(&quot;#live_search_field&quot;).parent().find(&quot;.live_search_results&quot;).html(response.responseText).show(); 
+      jQuery(&quot;#live_search_field&quot;).parent().find(&quot;.live_search_results&quot;).html(response.responseText).show(); 
       if(typeof(t) != &quot;undefined&quot; ) clearTimeout(t); 
-      $(&quot;#live_search_field&quot;).css(&quot;background&quot;, &quot;white&quot;);
+      jQuery(&quot;#live_search_field&quot;).css(&quot;background&quot;, &quot;white&quot;);
     }
   });
 }
 
 function live_search_close() {
   if(typeof(s) != &quot;undefined&quot; ) clearTimeout(s);
-  $(&quot;.live_search_results&quot;).empty();
-  $(&quot;.live_search_results&quot;).hide();
+  jQuery(&quot;.live_search_results&quot;).empty();
+  jQuery(&quot;.live_search_results&quot;).hide();
 }/**
  * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com
  *
@@ -2429,40 +2513,40 @@ jQuery.fn.verticalCenter = function(loaded) {
       top: jQuery(window).height()/2-this.height()/2}, 200, 'linear'); 
   } 
 };
-$(document).ready(function(){
-  $('#cms_users .tabs-nav').tabs();
+jQuery(document).ready(function(){
+  jQuery('#cms_users .tabs-nav').tabs();
   initialise_user_draggables();
 
-  $(&quot;#cms_users #section_browser_filter&quot;).keyup(function() {
+  jQuery(&quot;#cms_users #section_browser_filter&quot;).keyup(function() {
     if(typeof(t) != &quot;undefined&quot; ) clearTimeout(t);
-    t = setTimeout('delayed_sect_filter($(&quot;#section_browser_filter&quot;).val())', 400);
+    t = setTimeout('delayed_sect_filter(jQuery(&quot;#section_browser_filter&quot;).val())', 400);
   });
 });
 
 function initialise_user_draggables() {
-  $(&quot;#cms_users .section_tag&quot;).draggable({ containment:'window', ghosting: true, opacity: 0.4, revert: true, scroll: false, helper: &quot;clone&quot; });
-  $(&quot;#cms_users #sect_dropzone&quot;).droppable(
+  jQuery(&quot;#cms_users .section_tag&quot;).draggable({ containment:'window', ghosting: true, opacity: 0.4, revert: true, scroll: false, helper: &quot;clone&quot; });
+  jQuery(&quot;#cms_users #sect_dropzone&quot;).droppable(
   	{ accept: '.section_tag', hoverClass: 'dropzone_active', tolerance: 'pointer',
   		drop:	function(event, ui) {
-  		  $.post(&quot;../../add_section/&quot;+content_page_id,{id: ui.draggable.attr(&quot;id&quot;)},
-  		  function(response){ $(&quot;#sect_dropzone&quot;).html(response); initialise_user_draggables(); });
+  		  jQuery.post(&quot;../../add_section/&quot;+content_page_id,{id: ui.draggable.attr(&quot;id&quot;)},
+  		  function(response){ jQuery(&quot;#sect_dropzone&quot;).html(response); initialise_user_draggables(); });
   	}
   });
-  $(&quot;#cms_users .section_trash_button&quot;).click(function(){
-    $.get(&quot;../../remove_section/&quot;+content_page_id+&quot;?sect=&quot;+this.id.substr(21),function(response){
-      $(&quot;#sect_dropzone&quot;).html(response); initialise_user_draggables();
+  jQuery(&quot;#cms_users .section_trash_button&quot;).click(function(){
+    jQuery.get(&quot;../../remove_section/&quot;+content_page_id+&quot;?sect=&quot;+this.id.substr(21),function(response){
+      jQuery(&quot;#sect_dropzone&quot;).html(response); initialise_user_draggables();
     });
   });
 }
 
 function delayed_sect_filter(filter) {
-  $(&quot;#cms_users #section_browser_filter&quot;).css(&quot;background&quot;, &quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);
-  $.ajax({type: &quot;post&quot;, url: &quot;/admin/sections/filters&quot;, data: &quot;filter=&quot;+filter,
+  jQuery(&quot;#cms_users #section_browser_filter&quot;).css(&quot;background&quot;, &quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);
+  jQuery.ajax({type: &quot;post&quot;, url: &quot;/admin/sections/filters&quot;, data: &quot;filter=&quot;+filter,
     complete: function(response){
-      $(&quot;#section_list&quot;).html(response.responseText);
+      jQuery(&quot;#section_list&quot;).html(response.responseText);
       initialise_user_draggables();
       if(typeof(t) != &quot;undefined&quot; ) clearTimeout(t);
-      $(&quot;#section_browser_filter&quot;).css(&quot;background&quot;, &quot;white&quot;);
+      jQuery(&quot;#section_browser_filter&quot;).css(&quot;background&quot;, &quot;white&quot;);
     }
   });
 }
\ No newline at end of file</diff>
      <filename>resources/public/javascripts/build/jquery.132.combined.js</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-(function(){var W=this,ab,F=W.jQuery,S=W.$,T=W.jQuery=W.$=function(b,a){return new T.fn.init(b,a)},M=/^[^&lt;]*(&lt;(.|\s)+&gt;)[^&gt;]*$|^#([\w-]+)$/,ac=/^.[^:#\[\.,]*$/;T.fn=T.prototype={init:function(e,b){e=e||document;if(e.nodeType){this[0]=e;this.length=1;this.context=e;return this}if(typeof e===&quot;string&quot;){var c=M.exec(e);if(c&amp;&amp;(c[1]||!b)){if(c[1]){e=T.clean([c[1]],b)}else{var a=document.getElementById(c[3]);if(a&amp;&amp;a.id!=c[3]){return T().find(e)}var d=T(a||[]);d.context=document;d.selector=e;return d}}else{return T(b).find(e)}}else{if(T.isFunction(e)){return T(document).ready(e)}}if(e.selector&amp;&amp;e.context){this.selector=e.selector;this.context=e.context}return this.setArray(T.isArray(e)?e:T.makeArray(e))},selector:&quot;&quot;,jquery:&quot;1.3.2&quot;,size:function(){return this.length},get:function(a){return a===ab?Array.prototype.slice.call(this):this[a]},pushStack:function(c,a,d){var b=T(c);b.prevObject=this;b.context=this.context;if(a===&quot;find&quot;){b.selector=this.selector+(this.selector?&quot; &quot;:&quot;&quot;)+d}else{if(a){b.selector=this.selector+&quot;.&quot;+a+&quot;(&quot;+d+&quot;)&quot;}}return b},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this},each:function(a,b){return T.each(this,a,b)},index:function(a){return T.inArray(a&amp;&amp;a.jquery?a[0]:a,this)},attr:function(c,a,b){var d=c;if(typeof c===&quot;string&quot;){if(a===ab){return this[0]&amp;&amp;T[b||&quot;attr&quot;](this[0],c)}else{d={};d[c]=a}}return this.each(function(e){for(c in d){T.attr(b?this.style:this,c,T.prop(this,d[c],b,e,c))}})},css:function(b,a){if((b==&quot;width&quot;||b==&quot;height&quot;)&amp;&amp;parseFloat(a)&lt;0){a=ab}return this.attr(b,a,&quot;curCSS&quot;)},text:function(a){if(typeof a!==&quot;object&quot;&amp;&amp;a!=null){return this.empty().append((this[0]&amp;&amp;this[0].ownerDocument||document).createTextNode(a))}var b=&quot;&quot;;T.each(a||this,function(){T.each(this.childNodes,function(){if(this.nodeType!=8){b+=this.nodeType!=1?this.nodeValue:T.fn.text([this])}})});return b},wrapAll:function(b){if(this[0]){var a=T(b,this[0].ownerDocument).clone();if(this[0].parentNode){a.insertBefore(this[0])}a.map(function(){var c=this;while(c.firstChild){c=c.firstChild}return c}).append(this)}return this},wrapInner:function(a){return this.each(function(){T(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){T(this).wrapAll(a)})},append:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.appendChild(a)}})},prepend:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.insertBefore(a,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||T([])},push:[].push,sort:[].sort,splice:[].splice,find:function(b){if(this.length===1){var a=this.pushStack([],&quot;find&quot;,b);a.length=0;T.find(b,this[0],a);return a}else{return this.pushStack(T.unique(T.map(this,function(c){return T.find(b,c)})),&quot;find&quot;,b)}},clone:function(b){var d=this.map(function(){if(!T.support.noCloneEvent&amp;&amp;!T.isXMLDoc(this)){var f=this.outerHTML;if(!f){var e=this.ownerDocument.createElement(&quot;div&quot;);e.appendChild(this.cloneNode(true));f=e.innerHTML}return T.clean([f.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;).replace(/^\s*/,&quot;&quot;)])[0]}else{return this.cloneNode(true)}});if(b===true){var a=this.find(&quot;*&quot;).andSelf(),c=0;d.find(&quot;*&quot;).andSelf().each(function(){if(this.nodeName!==a[c].nodeName){return}var g=T.data(a[c],&quot;events&quot;);for(var e in g){for(var f in g[e]){T.event.add(this,e,g[e][f],g[e][f].data)}}c++})}return d},filter:function(a){return this.pushStack(T.isFunction(a)&amp;&amp;T.grep(this,function(b,c){return a.call(b,c)})||T.multiFilter(a,T.grep(this,function(b){return b.nodeType===1})),&quot;filter&quot;,a)},closest:function(c){var a=T.expr.match.POS.test(c)?T(c):null,b=0;return this.map(function(){var d=this;while(d&amp;&amp;d.ownerDocument){if(a?a.index(d)&gt;-1:T(d).is(c)){T.data(d,&quot;closest&quot;,b);return d}d=d.parentNode;b++}})},not:function(b){if(typeof b===&quot;string&quot;){if(ac.test(b)){return this.pushStack(T.multiFilter(b,this,true),&quot;not&quot;,b)}else{b=T.multiFilter(b,this)}}var a=b.length&amp;&amp;b[b.length-1]!==ab&amp;&amp;!b.nodeType;return this.filter(function(){return a?T.inArray(this,b)&lt;0:this!=b})},add:function(a){return this.pushStack(T.unique(T.merge(this.get(),typeof a===&quot;string&quot;?T(a):T.makeArray(a))))},is:function(a){return !!a&amp;&amp;T.multiFilter(a,this).length&gt;0},hasClass:function(a){return !!a&amp;&amp;this.is(&quot;.&quot;+a)},val:function(c){if(c===ab){var j=this[0];if(j){if(T.nodeName(j,&quot;option&quot;)){return(j.attributes.value||{}).specified?j.value:j.text}if(T.nodeName(j,&quot;select&quot;)){var e=j.selectedIndex,b=[],a=j.options,f=j.type==&quot;select-one&quot;;if(e&lt;0){return null}for(var h=f?e:0,d=f?e+1:a.length;h&lt;d;h++){var g=a[h];if(g.selected){c=T(g).val();if(f){return c}b.push(c)}}return b}return(j.value||&quot;&quot;).replace(/\r/g,&quot;&quot;)}return ab}if(typeof c===&quot;number&quot;){c+=&quot;&quot;}return this.each(function(){if(this.nodeType!=1){return}if(T.isArray(c)&amp;&amp;/radio|checkbox/.test(this.type)){this.checked=(T.inArray(this.value,c)&gt;=0||T.inArray(this.name,c)&gt;=0)}else{if(T.nodeName(this,&quot;select&quot;)){var k=T.makeArray(c);T(&quot;option&quot;,this).each(function(){this.selected=(T.inArray(this.value,k)&gt;=0||T.inArray(this.text,k)&gt;=0)});if(!k.length){this.selectedIndex=-1}}else{this.value=c}}})},html:function(a){return a===ab?(this[0]?this[0].innerHTML.replace(/ jQuery\d+=&quot;(?:\d+|null)&quot;/g,&quot;&quot;):null):this.empty().append(a)},replaceWith:function(a){return this.after(a).remove()},eq:function(a){return this.slice(a,+a+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),&quot;slice&quot;,Array.prototype.slice.call(arguments).join(&quot;,&quot;))},map:function(a){return this.pushStack(T.map(this,function(b,c){return a.call(b,c,b)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(d,a,b){if(this[0]){var e=(this[0].ownerDocument||this[0]).createDocumentFragment(),h=T.clean(d,(this[0].ownerDocument||this[0]),e),f=e.firstChild;if(f){for(var g=0,j=this.length;g&lt;j;g++){b.call(c(this[g],f),this.length&gt;1||g&gt;0?e.cloneNode(true):e)}}if(h){T.each(h,E)}}return this;function c(l,k){return a&amp;&amp;T.nodeName(l,&quot;table&quot;)&amp;&amp;T.nodeName(k,&quot;tr&quot;)?(l.getElementsByTagName(&quot;tbody&quot;)[0]||l.appendChild(l.ownerDocument.createElement(&quot;tbody&quot;))):l}}};T.fn.init.prototype=T.fn;function E(b,a){if(a.src){T.ajax({url:a.src,async:false,dataType:&quot;script&quot;})}else{T.globalEval(a.text||a.textContent||a.innerHTML||&quot;&quot;)}if(a.parentNode){a.parentNode.removeChild(a)}}function ad(){return +new Date}T.extend=T.fn.extend=function(){var c=arguments[0]||{},e=1,d=arguments.length,h=false,f;if(typeof c===&quot;boolean&quot;){h=c;c=arguments[1]||{};e=2}if(typeof c!==&quot;object&quot;&amp;&amp;!T.isFunction(c)){c={}}if(d==e){c=this;--e}for(;e&lt;d;e++){if((f=arguments[e])!=null){for(var g in f){var b=c[g],a=f[g];if(c===a){continue}if(h&amp;&amp;a&amp;&amp;typeof a===&quot;object&quot;&amp;&amp;!a.nodeType){c[g]=T.extend(h,b||(a.length!=null?[]:{}),a)}else{if(a!==ab){c[g]=a}}}}}return c};var ag=/z-?index|font-?weight|opacity|zoom|line-?height/i,Q=document.defaultView||{},L=Object.prototype.toString;T.extend({noConflict:function(a){W.$=S;if(a){W.jQuery=F}return T},isFunction:function(a){return L.call(a)===&quot;[object Function]&quot;},isArray:function(a){return L.call(a)===&quot;[object Array]&quot;},isXMLDoc:function(a){return a.nodeType===9&amp;&amp;a.documentElement.nodeName!==&quot;HTML&quot;||!!a.ownerDocument&amp;&amp;T.isXMLDoc(a.ownerDocument)},globalEval:function(a){if(a&amp;&amp;/\S/.test(a)){var b=document.getElementsByTagName(&quot;head&quot;)[0]||document.documentElement,c=document.createElement(&quot;script&quot;);c.type=&quot;text/javascript&quot;;if(T.support.scriptEval){c.appendChild(document.createTextNode(a))}else{c.text=a}b.insertBefore(c,b.firstChild);b.removeChild(c)}},nodeName:function(a,b){return a.nodeName&amp;&amp;a.nodeName.toUpperCase()==b.toUpperCase()},each:function(e,a,f){var g,d=0,c=e.length;if(f){if(c===ab){for(g in e){if(a.apply(e[g],f)===false){break}}}else{for(;d&lt;c;){if(a.apply(e[d++],f)===false){break}}}}else{if(c===ab){for(g in e){if(a.call(e[g],g,e[g])===false){break}}}else{for(var b=e[0];d&lt;c&amp;&amp;a.call(b,d,b)!==false;b=e[++d]){}}}return e},prop:function(b,a,c,d,e){if(T.isFunction(a)){a=a.call(b,d)}return typeof a===&quot;number&quot;&amp;&amp;c==&quot;curCSS&quot;&amp;&amp;!ag.test(e)?a+&quot;px&quot;:a},className:{add:function(b,a){T.each((a||&quot;&quot;).split(/\s+/),function(d,c){if(b.nodeType==1&amp;&amp;!T.className.has(b.className,c)){b.className+=(b.className?&quot; &quot;:&quot;&quot;)+c}})},remove:function(b,a){if(b.nodeType==1){b.className=a!==ab?T.grep(b.className.split(/\s+/),function(c){return !T.className.has(a,c)}).join(&quot; &quot;):&quot;&quot;}},has:function(a,b){return a&amp;&amp;T.inArray(b,(a.className||a).toString().split(/\s+/))&gt;-1}},swap:function(b,c,a){var e={};for(var d in c){e[d]=b.style[d];b.style[d]=c[d]}a.call(b);for(var d in c){b.style[d]=e[d]}},css:function(e,g,c,h){if(g==&quot;width&quot;||g==&quot;height&quot;){var a,f={position:&quot;absolute&quot;,visibility:&quot;hidden&quot;,display:&quot;block&quot;},b=g==&quot;width&quot;?[&quot;Left&quot;,&quot;Right&quot;]:[&quot;Top&quot;,&quot;Bottom&quot;];function d(){a=g==&quot;width&quot;?e.offsetWidth:e.offsetHeight;if(h===&quot;border&quot;){return}T.each(b,function(){if(!h){a-=parseFloat(T.curCSS(e,&quot;padding&quot;+this,true))||0}if(h===&quot;margin&quot;){a+=parseFloat(T.curCSS(e,&quot;margin&quot;+this,true))||0}else{a-=parseFloat(T.curCSS(e,&quot;border&quot;+this+&quot;Width&quot;,true))||0}})}if(e.offsetWidth!==0){d()}else{T.swap(e,f,d)}return Math.max(0,Math.round(a))}return T.curCSS(e,g,c)},curCSS:function(e,h,g){var b,j=e.style;if(h==&quot;opacity&quot;&amp;&amp;!T.support.opacity){b=T.attr(j,&quot;opacity&quot;);return b==&quot;&quot;?&quot;1&quot;:b}if(h.match(/float/i)){h=H}if(!g&amp;&amp;j&amp;&amp;j[h]){b=j[h]}else{if(Q.getComputedStyle){if(h.match(/float/i)){h=&quot;float&quot;}h=h.replace(/([A-Z])/g,&quot;-$1&quot;).toLowerCase();var a=Q.getComputedStyle(e,null);if(a){b=a.getPropertyValue(h)}if(h==&quot;opacity&quot;&amp;&amp;b==&quot;&quot;){b=&quot;1&quot;}}else{if(e.currentStyle){var d=h.replace(/\-(\w)/g,function(l,k){return k.toUpperCase()});b=e.currentStyle[h]||e.currentStyle[d];if(!/^\d+(px)?$/i.test(b)&amp;&amp;/^\d/.test(b)){var f=j.left,c=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left;j.left=b||0;b=j.pixelLeft+&quot;px&quot;;j.left=f;e.runtimeStyle.left=c}}}}return b},clean:function(g,b,d){b=b||document;if(typeof b.createElement===&quot;undefined&quot;){b=b.ownerDocument||b[0]&amp;&amp;b[0].ownerDocument||document}if(!d&amp;&amp;g.length===1&amp;&amp;typeof g[0]===&quot;string&quot;){var e=/^&lt;(\w+)\s*\/?&gt;$/.exec(g[0]);if(e){return[b.createElement(e[1])]}}var f=[],h=[],a=b.createElement(&quot;div&quot;);T.each(g,function(m,j){if(typeof j===&quot;number&quot;){j+=&quot;&quot;}if(!j){return}if(typeof j===&quot;string&quot;){j=j.replace(/(&lt;(\w+)[^&gt;]*?)\/&gt;/g,function(r,q,u){return u.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?r:q+&quot;&gt;&lt;/&quot;+u+&quot;&gt;&quot;});var n=j.replace(/^\s+/,&quot;&quot;).substring(0,10).toLowerCase();var l=!n.indexOf(&quot;&lt;opt&quot;)&amp;&amp;[1,&quot;&lt;select multiple='multiple'&gt;&quot;,&quot;&lt;/select&gt;&quot;]||!n.indexOf(&quot;&lt;leg&quot;)&amp;&amp;[1,&quot;&lt;fieldset&gt;&quot;,&quot;&lt;/fieldset&gt;&quot;]||n.match(/^&lt;(thead|tbody|tfoot|colg|cap)/)&amp;&amp;[1,&quot;&lt;table&gt;&quot;,&quot;&lt;/table&gt;&quot;]||!n.indexOf(&quot;&lt;tr&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&quot;,&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;]||(!n.indexOf(&quot;&lt;td&quot;)||!n.indexOf(&quot;&lt;th&quot;))&amp;&amp;[3,&quot;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&quot;,&quot;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&quot;]||!n.indexOf(&quot;&lt;col&quot;)&amp;&amp;[2,&quot;&lt;table&gt;&lt;tbody&gt;&lt;/tbody&gt;&lt;colgroup&gt;&quot;,&quot;&lt;/colgroup&gt;&lt;/table&gt;&quot;]||!T.support.htmlSerialize&amp;&amp;[1,&quot;div&lt;div&gt;&quot;,&quot;&lt;/div&gt;&quot;]||[0,&quot;&quot;,&quot;&quot;];a.innerHTML=l[1]+j+l[2];while(l[0]--){a=a.lastChild}if(!T.support.tbody){var k=/&lt;tbody/i.test(j),o=!n.indexOf(&quot;&lt;table&quot;)&amp;&amp;!k?a.firstChild&amp;&amp;a.firstChild.childNodes:l[1]==&quot;&lt;table&gt;&quot;&amp;&amp;!k?a.childNodes:[];for(var p=o.length-1;p&gt;=0;--p){if(T.nodeName(o[p],&quot;tbody&quot;)&amp;&amp;!o[p].childNodes.length){o[p].parentNode.removeChild(o[p])}}}if(!T.support.leadingWhitespace&amp;&amp;/^\s/.test(j)){a.insertBefore(b.createTextNode(j.match(/^\s*/)[0]),a.firstChild)}j=T.makeArray(a.childNodes)}if(j.nodeType){f.push(j)}else{f=T.merge(f,j)}});if(d){for(var c=0;f[c];c++){if(T.nodeName(f[c],&quot;script&quot;)&amp;&amp;(!f[c].type||f[c].type.toLowerCase()===&quot;text/javascript&quot;)){h.push(f[c].parentNode?f[c].parentNode.removeChild(f[c]):f[c])}else{if(f[c].nodeType===1){f.splice.apply(f,[c+1,0].concat(T.makeArray(f[c].getElementsByTagName(&quot;script&quot;))))}d.appendChild(f[c])}}return h}return f},attr:function(c,f,b){if(!c||c.nodeType==3||c.nodeType==8){return ab}var e=!T.isXMLDoc(c),a=b!==ab;f=e&amp;&amp;T.props[f]||f;if(c.tagName){var g=/href|src|style/.test(f);if(f==&quot;selected&quot;&amp;&amp;c.parentNode){c.parentNode.selectedIndex}if(f in c&amp;&amp;e&amp;&amp;!g){if(a){if(f==&quot;type&quot;&amp;&amp;T.nodeName(c,&quot;input&quot;)&amp;&amp;c.parentNode){throw&quot;type property can't be changed&quot;}c[f]=b}if(T.nodeName(c,&quot;form&quot;)&amp;&amp;c.getAttributeNode(f)){return c.getAttributeNode(f).nodeValue}if(f==&quot;tabIndex&quot;){var d=c.getAttributeNode(&quot;tabIndex&quot;);return d&amp;&amp;d.specified?d.value:c.nodeName.match(/(button|input|object|select|textarea)/i)?0:c.nodeName.match(/^(a|area)$/i)&amp;&amp;c.href?0:ab}return c[f]}if(!T.support.style&amp;&amp;e&amp;&amp;f==&quot;style&quot;){return T.attr(c.style,&quot;cssText&quot;,b)}if(a){c.setAttribute(f,&quot;&quot;+b)}var h=!T.support.hrefNormalized&amp;&amp;e&amp;&amp;g?c.getAttribute(f,2):c.getAttribute(f);return h===null?ab:h}if(!T.support.opacity&amp;&amp;f==&quot;opacity&quot;){if(a){c.zoom=1;c.filter=(c.filter||&quot;&quot;).replace(/alpha\([^)]*\)/,&quot;&quot;)+(parseInt(b)+&quot;&quot;==&quot;NaN&quot;?&quot;&quot;:&quot;alpha(opacity=&quot;+b*100+&quot;)&quot;)}return c.filter&amp;&amp;c.filter.indexOf(&quot;opacity=&quot;)&gt;=0?(parseFloat(c.filter.match(/opacity=([^)]*)/)[1])/100)+&quot;&quot;:&quot;&quot;}f=f.replace(/-([a-z])/ig,function(k,j){return j.toUpperCase()});if(a){c[f]=b}return c[f]},trim:function(a){return(a||&quot;&quot;).replace(/^\s+|\s+$/g,&quot;&quot;)},makeArray:function(a){var c=[];if(a!=null){var b=a.length;if(b==null||typeof a===&quot;string&quot;||T.isFunction(a)||a.setInterval){c[0]=a}else{while(b){c[--b]=a[b]}}}return c},inArray:function(b,a){for(var d=0,c=a.length;d&lt;c;d++){if(a[d]===b){return d}}return -1},merge:function(b,e){var d=0,c,a=b.length;if(!T.support.getAll){while((c=e[d++])!=null){if(c.nodeType!=8){b[a++]=c}}}else{while((c=e[d++])!=null){b[a++]=c}}return b},unique:function(a){var f=[],g={};try{for(var e=0,d=a.length;e&lt;d;e++){var b=T.data(a[e]);if(!g[b]){g[b]=true;f.push(a[e])}}}catch(c){f=a}return f},grep:function(e,a,f){var d=[];for(var c=0,b=e.length;c&lt;b;c++){if(!f!=!a(e[c],c)){d.push(e[c])}}return d},map:function(f,a){var e=[];for(var d=0,c=f.length;d&lt;c;d++){var b=a(f[d],d);if(b!=null){e[e.length]=b}}return e.concat.apply([],e)}});var O=navigator.userAgent.toLowerCase();T.browser={version:(O.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,&quot;0&quot;])[1],safari:/webkit/.test(O),opera:/opera/.test(O),msie:/msie/.test(O)&amp;&amp;!/opera/.test(O),mozilla:/mozilla/.test(O)&amp;&amp;!/(compatible|webkit)/.test(O)};T.each({parent:function(a){return a.parentNode},parents:function(a){return T.dir(a,&quot;parentNode&quot;)},next:function(a){return T.nth(a,2,&quot;nextSibling&quot;)},prev:function(a){return T.nth(a,2,&quot;previousSibling&quot;)},nextAll:function(a){return T.dir(a,&quot;nextSibling&quot;)},prevAll:function(a){return T.dir(a,&quot;previousSibling&quot;)},siblings:function(a){return T.sibling(a.parentNode.firstChild,a)},children:function(a){return T.sibling(a.firstChild)},contents:function(a){return T.nodeName(a,&quot;iframe&quot;)?a.contentDocument||a.contentWindow.document:T.makeArray(a.childNodes)}},function(b,a){T.fn[b]=function(d){var c=T.map(this,a);if(d&amp;&amp;typeof d==&quot;string&quot;){c=T.multiFilter(d,c)}return this.pushStack(T.unique(c),b,d)}});T.each({appendTo:&quot;append&quot;,prependTo:&quot;prepend&quot;,insertBefore:&quot;before&quot;,insertAfter:&quot;after&quot;,replaceAll:&quot;replaceWith&quot;},function(b,a){T.fn[b]=function(h){var e=[],c=T(h);for(var d=0,g=c.length;d&lt;g;d++){var f=(d&gt;0?this.clone(true):this).get();T.fn[a].apply(T(c[d]),f);e=e.concat(f)}return this.pushStack(e,b,h)}});T.each({removeAttr:function(a){T.attr(this,a,&quot;&quot;);if(this.nodeType==1){this.removeAttribute(a)}},addClass:function(a){T.className.add(this,a)},removeClass:function(a){T.className.remove(this,a)},toggleClass:function(a,b){if(typeof b!==&quot;boolean&quot;){b=!T.className.has(this,a)}T.className[b?&quot;add&quot;:&quot;remove&quot;](this,a)},remove:function(a){if(!a||T.filter(a,[this]).length){T(&quot;*&quot;,this).add([this]).each(function(){T.event.remove(this);T.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){T(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(b,a){T.fn[b]=function(){return this.each(a,arguments)}});function Y(b,a){return b[0]&amp;&amp;parseInt(T.curCSS(b[0],a,true),10)||0}var aa=&quot;jQuery&quot;+ad(),I=0,R={};T.extend({cache:{},data:function(c,d,b){c=c==W?R:c;var a=c[aa];if(!a){a=c[aa]=++I}if(d&amp;&amp;!T.cache[a]){T.cache[a]={}}if(b!==ab){T.cache[a][d]=b}return d?T.cache[a][d]:a},removeData:function(c,d){c=c==W?R:c;var a=c[aa];if(d){if(T.cache[a]){delete T.cache[a][d];d=&quot;&quot;;for(d in T.cache[a]){break}if(!d){T.removeData(c)}}}else{try{delete c[aa]}catch(b){if(c.removeAttribute){c.removeAttribute(aa)}}delete T.cache[a]}},queue:function(c,d,a){if(c){d=(d||&quot;fx&quot;)+&quot;queue&quot;;var b=T.data(c,d);if(!b||T.isArray(a)){b=T.data(c,d,T.makeArray(a))}else{if(a){b.push(a)}}}return b},dequeue:function(a,b){var d=T.queue(a,b),c=d.shift();if(!b||b===&quot;fx&quot;){c=d[0]}if(c!==ab){c.call(a)}}});T.fn.extend({data:function(d,b){var a=d.split(&quot;.&quot;);a[1]=a[1]?&quot;.&quot;+a[1]:&quot;&quot;;if(b===ab){var c=this.triggerHandler(&quot;getData&quot;+a[1]+&quot;!&quot;,[a[0]]);if(c===ab&amp;&amp;this.length){c=T.data(this[0],d)}return c===ab&amp;&amp;a[1]?this.data(a[0]):c}else{return this.trigger(&quot;setData&quot;+a[1]+&quot;!&quot;,[a[0],b]).each(function(){T.data(this,d,b)})}},removeData:function(a){return this.each(function(){T.removeData(this,a)})},queue:function(b,a){if(typeof b!==&quot;string&quot;){a=b;b=&quot;fx&quot;}if(a===ab){return T.queue(this[0],b)}return this.each(function(){var c=T.queue(this,b,a);if(b==&quot;fx&quot;&amp;&amp;c.length==1){c[0].call(this)}})},dequeue:function(a){return this.each(function(){T.dequeue(this,a)})}});(function(){var b=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['&quot;][^'&quot;]*['&quot;]|[^[\]'&quot;]+)+\]|\\.|[^ &gt;+~,(\[\\]+)+|[&gt;+~])(\s*,\s*)?/g,h=0,m=Object.prototype.toString;var o=function(u,y,al,ak){al=al||[];y=y||document;if(y.nodeType!==1&amp;&amp;y.nodeType!==9){return[]}if(!u||typeof u!==&quot;string&quot;){return al}var r=[],w,D,A,z,aj,x,v=true;b.lastIndex=0;while((w=b.exec(u))!==null){r.push(w[1]);if(w[2]){x=RegExp.rightContext;break}}if(r.length&gt;1&amp;&amp;g.exec(u)){if(r.length===2&amp;&amp;l.relative[r[0]]){D=k(r[0]+r[1],y)}else{D=l.relative[r[0]]?[y]:o(r.shift(),y);while(r.length){u=r.shift();if(l.relative[u]){u+=r.shift()}D=k(u,D)}}}else{var ai=ak?{expr:r.pop(),set:p(ak)}:o.find(r.pop(),r.length===1&amp;&amp;y.parentNode?y.parentNode:y,c(y));D=o.filter(ai.expr,ai.set);if(r.length&gt;0){A=p(D)}else{v=false}while(r.length){var B=r.pop(),C=B;if(!l.relative[B]){B=&quot;&quot;}else{C=r.pop()}if(C==null){C=y}l.relative[B](A,C,c(y))}}if(!A){A=D}if(!A){throw&quot;Syntax error, unrecognized expression: &quot;+(B||u)}if(m.call(A)===&quot;[object Array]&quot;){if(!v){al.push.apply(al,A)}else{if(y.nodeType===1){for(var q=0;A[q]!=null;q++){if(A[q]&amp;&amp;(A[q]===true||A[q].nodeType===1&amp;&amp;j(y,A[q]))){al.push(D[q])}}}else{for(var q=0;A[q]!=null;q++){if(A[q]&amp;&amp;A[q].nodeType===1){al.push(D[q])}}}}}else{p(A,al)}if(x){o(x,y,al,ak);if(n){hasDuplicate=false;al.sort(n);if(hasDuplicate){for(var q=1;q&lt;al.length;q++){if(al[q]===al[q-1]){al.splice(q--,1)}}}}}return al};o.matches=function(r,q){return o(r,null,null,q)};o.find=function(q,z,A){var r,v;if(!q){return[]}for(var w=0,x=l.order.length;w&lt;x;w++){var u=l.order[w],v;if((v=l.match[u].exec(q))){var y=RegExp.leftContext;if(y.substr(y.length-1)!==&quot;\\&quot;){v[1]=(v[1]||&quot;&quot;).replace(/\\/g,&quot;&quot;);r=l.find[u](v,z,A);if(r!=null){q=q.replace(l.match[u],&quot;&quot;);break}}}}if(!r){r=z.getElementsByTagName(&quot;*&quot;)}return{set:r,expr:q}};o.filter=function(aj,ak,C,w){var x=aj,A=[],q=ak,u,z,r=ak&amp;&amp;ak[0]&amp;&amp;c(ak[0]);while(aj&amp;&amp;ak.length){for(var al in l.filter){if((u=l.match[al].exec(aj))!=null){var y=l.filter[al],B,D;z=false;if(q==A){A=[]}if(l.preFilter[al]){u=l.preFilter[al](u,q,C,A,w,r);if(!u){z=B=true}else{if(u===true){continue}}}if(u){for(var v=0;(D=q[v])!=null;v++){if(D){B=y(D,u,v,q);var ai=w^!!B;if(C&amp;&amp;B!=null){if(ai){z=true}else{q[v]=false}}else{if(ai){A.push(D);z=true}}}}}if(B!==ab){if(!C){q=A}aj=aj.replace(l.match[al],&quot;&quot;);if(!z){return[]}break}}}if(aj==x){if(z==null){throw&quot;Syntax error, unrecognized expression: &quot;+aj}else{break}}x=aj}return q};var l=o.selectors={order:[&quot;ID&quot;,&quot;NAME&quot;,&quot;TAG&quot;],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['&quot;]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['&quot;]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['&quot;]*)(.*?)\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_-]|\\.)+)(?:\((['&quot;]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{&quot;class&quot;:&quot;className&quot;,&quot;for&quot;:&quot;htmlFor&quot;},attrHandle:{href:function(q){return q.getAttribute(&quot;href&quot;)}},relative:{&quot;+&quot;:function(q,z,r){var v=typeof z===&quot;string&quot;,A=v&amp;&amp;!/\W/.test(z),u=v&amp;&amp;!A;if(A&amp;&amp;!r){z=z.toUpperCase()}for(var w=0,x=q.length,y;w&lt;x;w++){if((y=q[w])){while((y=y.previousSibling)&amp;&amp;y.nodeType!==1){}q[w]=u||y&amp;&amp;y.nodeName===z?y||false:y===z}}if(u){o.filter(z,q,true)}},&quot;&gt;&quot;:function(x,u,w){var z=typeof u===&quot;string&quot;;if(z&amp;&amp;!/\W/.test(u)){u=w?u:u.toUpperCase();for(var r=0,v=x.length;r&lt;v;r++){var y=x[r];if(y){var q=y.parentNode;x[r]=q.nodeName===u?q:false}}}else{for(var r=0,v=x.length;r&lt;v;r++){var y=x[r];if(y){x[r]=z?y.parentNode:y.parentNode===u}}if(z){o.filter(u,x,true)}}},&quot;&quot;:function(q,u,w){var r=h++,v=a;if(!u.match(/\W/)){var x=u=w?u:u.toUpperCase();v=d}v(&quot;parentNode&quot;,u,r,q,x,w)},&quot;~&quot;:function(q,u,w){var r=h++,v=a;if(typeof u===&quot;string&quot;&amp;&amp;!u.match(/\W/)){var x=u=w?u:u.toUpperCase();v=d}v(&quot;previousSibling&quot;,u,r,q,x,w)}},find:{ID:function(u,r,q){if(typeof r.getElementById!==&quot;undefined&quot;&amp;&amp;!q){var v=r.getElementById(u[1]);return v?[v]:[]}},NAME:function(r,x,w){if(typeof x.getElementsByName!==&quot;undefined&quot;){var u=[],y=x.getElementsByName(r[1]);for(var q=0,v=y.length;q&lt;v;q++){if(y[q].getAttribute(&quot;name&quot;)===r[1]){u.push(y[q])}}return u.length===0?null:u}},TAG:function(r,q){return q.getElementsByTagName(r[1])}},preFilter:{CLASS:function(q,u,r,v,x,w){q=&quot; &quot;+q[1].replace(/\\/g,&quot;&quot;)+&quot; &quot;;if(w){return q}for(var z=0,y;(y=u[z])!=null;z++){if(y){if(x^(y.className&amp;&amp;(&quot; &quot;+y.className+&quot; &quot;).indexOf(q)&gt;=0)){if(!r){v.push(y)}}else{if(r){u[z]=false}}}}return false},ID:function(q){return q[1].replace(/\\/g,&quot;&quot;)},TAG:function(r,u){for(var q=0;u[q]===false;q++){}return u[q]&amp;&amp;c(u[q])?r[1]:r[1].toUpperCase()},CHILD:function(r){if(r[1]==&quot;nth&quot;){var q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(r[2]==&quot;even&quot;&amp;&amp;&quot;2n&quot;||r[2]==&quot;odd&quot;&amp;&amp;&quot;2n+1&quot;||!/\D/.test(r[2])&amp;&amp;&quot;0n+&quot;+r[2]||r[2]);r[2]=(q[1]+(q[2]||1))-0;r[3]=q[3]-0}r[0]=h++;return r},ATTR:function(y,u,r,v,x,w){var q=y[1].replace(/\\/g,&quot;&quot;);if(!w&amp;&amp;l.attrMap[q]){y[1]=l.attrMap[q]}if(y[2]===&quot;~=&quot;){y[4]=&quot; &quot;+y[4]+&quot; &quot;}return y},PSEUDO:function(x,u,r,v,w){if(x[1]===&quot;not&quot;){if(x[3].match(b).length&gt;1||/^\w/.test(x[3])){x[3]=o(x[3],null,null,u)}else{var q=o.filter(x[3],u,r,true^w);if(!r){v.push.apply(v,q)}return false}}else{if(l.match.POS.test(x[0])||l.match.CHILD.test(x[0])){return true}}return x},POS:function(q){q.unshift(true);return q}},filters:{enabled:function(q){return q.disabled===false&amp;&amp;q.type!==&quot;hidden&quot;},disabled:function(q){return q.disabled===true},checked:function(q){return q.checked===true},selected:function(q){q.parentNode.selectedIndex;return q.selected===true},parent:function(q){return !!q.firstChild},empty:function(q){return !q.firstChild},has:function(q,r,u){return !!o(u[3],q).length},header:function(q){return/h\d/i.test(q.nodeName)},text:function(q){return&quot;text&quot;===q.type},radio:function(q){return&quot;radio&quot;===q.type},checkbox:function(q){return&quot;checkbox&quot;===q.type},file:function(q){return&quot;file&quot;===q.type},password:function(q){return&quot;password&quot;===q.type},submit:function(q){return&quot;submit&quot;===q.type},image:function(q){return&quot;image&quot;===q.type},reset:function(q){return&quot;reset&quot;===q.type},button:function(q){return&quot;button&quot;===q.type||q.nodeName.toUpperCase()===&quot;BUTTON&quot;},input:function(q){return/input|select|textarea|button/i.test(q.nodeName)}},setFilters:{first:function(q,r){return r===0},last:function(r,u,v,q){return u===q.length-1},even:function(q,r){return r%2===0},odd:function(q,r){return r%2===1},lt:function(q,r,u){return r&lt;u[3]-0},gt:function(q,r,u){return r&gt;u[3]-0},nth:function(q,r,u){return u[3]-0==r},eq:function(q,r,u){return u[3]-0==r}},filter:{PSEUDO:function(x,r,q,w){var u=r[1],z=l.filters[u];if(z){return z(x,q,r,w)}else{if(u===&quot;contains&quot;){return(x.textContent||x.innerText||&quot;&quot;).indexOf(r[3])&gt;=0}else{if(u===&quot;not&quot;){var y=r[3];for(var q=0,v=y.length;q&lt;v;q++){if(y[q]===x){return false}}return true}}}},CHILD:function(z,w){var r=w[1],y=z;switch(r){case&quot;only&quot;:case&quot;first&quot;:while(y=y.previousSibling){if(y.nodeType===1){return false}}if(r==&quot;first&quot;){return true}y=z;case&quot;last&quot;:while(y=y.nextSibling){if(y.nodeType===1){return false}}return true;case&quot;nth&quot;:var x=w[2],A=w[3];if(x==1&amp;&amp;A==0){return true}var u=w[0],B=z.parentNode;if(B&amp;&amp;(B.sizcache!==u||!z.nodeIndex)){var v=0;for(y=B.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++v}}B.sizcache=u}var q=z.nodeIndex-A;if(x==0){return q==0}else{return(q%x==0&amp;&amp;q/x&gt;=0)}}},ID:function(q,r){return q.nodeType===1&amp;&amp;q.getAttribute(&quot;id&quot;)===r},TAG:function(q,r){return(r===&quot;*&quot;&amp;&amp;q.nodeType===1)||q.nodeName===r},CLASS:function(q,r){return(&quot; &quot;+(q.className||q.getAttribute(&quot;class&quot;))+&quot; &quot;).indexOf(r)&gt;-1},ATTR:function(x,q){var r=q[1],v=l.attrHandle[r]?l.attrHandle[r](x):x[r]!=null?x[r]:x.getAttribute(r),w=v+&quot;&quot;,y=q[2],u=q[4];return v==null?y===&quot;!=&quot;:y===&quot;=&quot;?w===u:y===&quot;*=&quot;?w.indexOf(u)&gt;=0:y===&quot;~=&quot;?(&quot; &quot;+w+&quot; &quot;).indexOf(u)&gt;=0:!u?w&amp;&amp;v!==false:y===&quot;!=&quot;?w!=u:y===&quot;^=&quot;?w.indexOf(u)===0:y===&quot;$=&quot;?w.substr(w.length-u.length)===u:y===&quot;|=&quot;?w===u||w.substr(0,u.length+1)===u+&quot;-&quot;:false},POS:function(x,u,r,w){var v=u[2],q=l.setFilters[v];if(q){return q(x,r,u,w)}}}};var g=l.match.POS;for(var e in l.match){l.match[e]=RegExp(l.match[e].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var p=function(q,r){q=Array.prototype.slice.call(q);if(r){r.push.apply(r,q);return r}return q};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(f){p=function(w,q){var u=q||[];if(m.call(w)===&quot;[object Array]&quot;){Array.prototype.push.apply(u,w)}else{if(typeof w.length===&quot;number&quot;){for(var r=0,v=w.length;r&lt;v;r++){u.push(w[r])}}else{for(var r=0;w[r];r++){u.push(w[r])}}}return u}}var n;if(document.documentElement.compareDocumentPosition){n=function(r,u){var q=r.compareDocumentPosition(u)&amp;4?-1:r===u?0:1;if(q===0){hasDuplicate=true}return q}}else{if(&quot;sourceIndex&quot; in document.documentElement){n=function(r,u){var q=r.sourceIndex-u.sourceIndex;if(q===0){hasDuplicate=true}return q}}else{if(document.createRange){n=function(q,u){var r=q.ownerDocument.createRange(),v=u.ownerDocument.createRange();r.selectNode(q);r.collapse(true);v.selectNode(u);v.collapse(true);var w=r.compareBoundaryPoints(Range.START_TO_END,v);if(w===0){hasDuplicate=true}return w}}}}(function(){var r=document.createElement(&quot;form&quot;),q=&quot;script&quot;+(new Date).getTime();r.innerHTML=&quot;&lt;input name='&quot;+q+&quot;'/&gt;&quot;;var u=document.documentElement;u.insertBefore(r,u.firstChild);if(!!document.getElementById(q)){l.find.ID=function(y,x,w){if(typeof x.getElementById!==&quot;undefined&quot;&amp;&amp;!w){var v=x.getElementById(y[1]);return v?v.id===y[1]||typeof v.getAttributeNode!==&quot;undefined&quot;&amp;&amp;v.getAttributeNode(&quot;id&quot;).nodeValue===y[1]?[v]:ab:[]}};l.filter.ID=function(w,v){var x=typeof w.getAttributeNode!==&quot;undefined&quot;&amp;&amp;w.getAttributeNode(&quot;id&quot;);return w.nodeType===1&amp;&amp;x&amp;&amp;x.nodeValue===v}}u.removeChild(r)})();(function(){var q=document.createElement(&quot;div&quot;);q.appendChild(document.createComment(&quot;&quot;));if(q.getElementsByTagName(&quot;*&quot;).length&gt;0){l.find.TAG=function(v,w){var x=w.getElementsByTagName(v[1]);if(v[1]===&quot;*&quot;){var r=[];for(var u=0;x[u];u++){if(x[u].nodeType===1){r.push(x[u])}}x=r}return x}}q.innerHTML=&quot;&lt;a href='#'&gt;&lt;/a&gt;&quot;;if(q.firstChild&amp;&amp;typeof q.firstChild.getAttribute!==&quot;undefined&quot;&amp;&amp;q.firstChild.getAttribute(&quot;href&quot;)!==&quot;#&quot;){l.attrHandle.href=function(r){return r.getAttribute(&quot;href&quot;,2)}}})();if(document.querySelectorAll){(function(){var r=o,q=document.createElement(&quot;div&quot;);q.innerHTML=&quot;&lt;p class='TEST'&gt;&lt;/p&gt;&quot;;if(q.querySelectorAll&amp;&amp;q.querySelectorAll(&quot;.TEST&quot;).length===0){return}o=function(x,y,v,u){y=y||document;if(!u&amp;&amp;y.nodeType===9&amp;&amp;!c(y)){try{return p(y.querySelectorAll(x),v)}catch(w){}}return r(x,y,v,u)};o.find=r.find;o.filter=r.filter;o.selectors=r.selectors;o.matches=r.matches})()}if(document.getElementsByClassName&amp;&amp;document.documentElement.getElementsByClassName){(function(){var q=document.createElement(&quot;div&quot;);q.innerHTML=&quot;&lt;div class='test e'&gt;&lt;/div&gt;&lt;div class='test'&gt;&lt;/div&gt;&quot;;if(q.getElementsByClassName(&quot;e&quot;).length===0){return}q.lastChild.className=&quot;e&quot;;if(q.getElementsByClassName(&quot;e&quot;).length===1){return}l.order.splice(1,0,&quot;CLASS&quot;);l.find.CLASS=function(v,u,r){if(typeof u.getElementsByClassName!==&quot;undefined&quot;&amp;&amp;!r){return u.getElementsByClassName(v[1])}}})()}function d(y,r,u,A,q,B){var C=y==&quot;previousSibling&quot;&amp;&amp;!B;for(var w=0,x=A.length;w&lt;x;w++){var z=A[w];if(z){if(C&amp;&amp;z.nodeType===1){z.sizcache=u;z.sizset=w}z=z[y];var v=false;while(z){if(z.sizcache===u){v=A[z.sizset];break}if(z.nodeType===1&amp;&amp;!B){z.sizcache=u;z.sizset=w}if(z.nodeName===r){v=z;break}z=z[y]}A[w]=v}}}function a(y,r,u,A,q,B){var C=y==&quot;previousSibling&quot;&amp;&amp;!B;for(var w=0,x=A.length;w&lt;x;w++){var z=A[w];if(z){if(C&amp;&amp;z.nodeType===1){z.sizcache=u;z.sizset=w}z=z[y];var v=false;while(z){if(z.sizcache===u){v=A[z.sizset];break}if(z.nodeType===1){if(!B){z.sizcache=u;z.sizset=w}if(typeof r!==&quot;string&quot;){if(z===r){v=true;break}}else{if(o.filter(r,[z]).length&gt;0){v=z;break}}}z=z[y]}A[w]=v}}}var j=document.compareDocumentPosition?function(q,r){return q.compareDocumentPosition(r)&amp;16}:function(q,r){return q!==r&amp;&amp;(q.contains?q.contains(r):true)};var c=function(q){return q.nodeType===9&amp;&amp;q.documentElement.nodeName!==&quot;HTML&quot;||!!q.ownerDocument&amp;&amp;c(q.ownerDocument)};var k=function(v,x){var q=[],z=&quot;&quot;,y,r=x.nodeType?[x]:x;while((y=l.match.PSEUDO.exec(v))){z+=y[0];v=v.replace(l.match.PSEUDO,&quot;&quot;)}v=l.relative[v]?v+&quot;*&quot;:v;for(var w=0,u=r.length;w&lt;u;w++){o(v,r[w],q)}return o.filter(z,q)};T.find=o;T.filter=o.filter;T.expr=o.selectors;T.expr[&quot;:&quot;]=T.expr.filters;o.selectors.filters.hidden=function(q){return q.offsetWidth===0||q.offsetHeight===0};o.selectors.filters.visible=function(q){return q.offsetWidth&gt;0||q.offsetHeight&gt;0};o.selectors.filters.animated=function(q){return T.grep(T.timers,function(r){return q===r.elem}).length};T.multiFilter=function(q,u,r){if(r){q=&quot;:not(&quot;+q+&quot;)&quot;}return o.matches(q,u)};T.dir=function(r,u){var v=[],q=r[u];while(q&amp;&amp;q!=document){if(q.nodeType==1){v.push(q)}q=q[u]}return v};T.nth=function(w,v,r,q){v=v||1;var u=0;for(;w;w=w[r]){if(w.nodeType==1&amp;&amp;++u==v){break}}return w};T.sibling=function(q,r){var u=[];for(;q;q=q.nextSibling){if(q.nodeType==1&amp;&amp;q!=r){u.push(q)}}return u};return;W.Sizzle=o})();T.event={add:function(c,f,d,a){if(c.nodeType==3||c.nodeType==8){return}if(c.setInterval&amp;&amp;c!=W){c=W}if(!d.guid){d.guid=this.guid++}if(a!==ab){var e=d;d=this.proxy(e);d.data=a}var g=T.data(c,&quot;events&quot;)||T.data(c,&quot;events&quot;,{}),b=T.data(c,&quot;handle&quot;)||T.data(c,&quot;handle&quot;,function(){return typeof T!==&quot;undefined&quot;&amp;&amp;!T.event.triggered?T.event.handle.apply(arguments.callee.elem,arguments):ab});b.elem=c;T.each(f.split(/\s+/),function(l,k){var j=k.split(&quot;.&quot;);k=j.shift();d.type=j.slice().sort().join(&quot;.&quot;);var h=g[k];if(T.event.specialAll[k]){T.event.specialAll[k].setup.call(c,a,j)}if(!h){h=g[k]={};if(!T.event.special[k]||T.event.special[k].setup.call(c,a,j)===false){if(c.addEventListener){c.addEventListener(k,b,false)}else{if(c.attachEvent){c.attachEvent(&quot;on&quot;+k,b)}}}}h[d.guid]=d;T.event.global[k]=true});c=null},guid:1,global:{},remove:function(b,e,c){if(b.nodeType==3||b.nodeType==8){return}var f=T.data(b,&quot;events&quot;),g,h;if(f){if(e===ab||(typeof e===&quot;string&quot;&amp;&amp;e.charAt(0)==&quot;.&quot;)){for(var d in f){this.remove(b,d+(e||&quot;&quot;))}}else{if(e.type){c=e.handler;e=e.type}T.each(e.split(/\s+/),function(n,l){var j=l.split(&quot;.&quot;);l=j.shift();var m=RegExp(&quot;(^|\\.)&quot;+j.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);if(f[l]){if(c){delete f[l][c.guid]}else{for(var k in f[l]){if(m.test(f[l][k].type)){delete f[l][k]}}}if(T.event.specialAll[l]){T.event.specialAll[l].teardown.call(b,j)}for(g in f[l]){break}if(!g){if(!T.event.special[l]||T.event.special[l].teardown.call(b,j)===false){if(b.removeEventListener){b.removeEventListener(l,T.data(b,&quot;handle&quot;),false)}else{if(b.detachEvent){b.detachEvent(&quot;on&quot;+l,T.data(b,&quot;handle&quot;))}}}g=null;delete f[l]}}})}for(g in f){break}if(!g){var a=T.data(b,&quot;handle&quot;);if(a){a.elem=null}T.removeData(b,&quot;events&quot;);T.removeData(b,&quot;handle&quot;)}}},trigger:function(d,b,e,h){var f=d.type||d;if(!h){d=typeof d===&quot;object&quot;?d[aa]?d:T.extend(T.Event(f),d):T.Event(f);if(f.indexOf(&quot;!&quot;)&gt;=0){d.type=f=f.slice(0,-1);d.exclusive=true}if(!e){d.stopPropagation();if(this.global[f]){T.each(T.cache,function(){if(this.events&amp;&amp;this.events[f]){T.event.trigger(d,b,this.handle.elem)}})}}if(!e||e.nodeType==3||e.nodeType==8){return ab}d.result=ab;d.target=e;b=T.makeArray(b);b.unshift(d)}d.currentTarget=e;var c=T.data(e,&quot;handle&quot;);if(c){c.apply(e,b)}if((!e[f]||(T.nodeName(e,&quot;a&quot;)&amp;&amp;f==&quot;click&quot;))&amp;&amp;e[&quot;on&quot;+f]&amp;&amp;e[&quot;on&quot;+f].apply(e,b)===false){d.result=false}if(!h&amp;&amp;e[f]&amp;&amp;!d.isDefaultPrevented()&amp;&amp;!(T.nodeName(e,&quot;a&quot;)&amp;&amp;f==&quot;click&quot;)){this.triggered=true;try{e[f]()}catch(a){}}this.triggered=false;if(!d.isPropagationStopped()){var g=e.parentNode||e.ownerDocument;if(g){T.event.trigger(d,b,g,true)}}},handle:function(b){var c,h;b=arguments[0]=T.event.fix(b||W.event);b.currentTarget=this;var a=b.type.split(&quot;.&quot;);b.type=a.shift();c=!a.length&amp;&amp;!b.exclusive;var d=RegExp(&quot;(^|\\.)&quot;+a.slice().sort().join(&quot;.*\\.&quot;)+&quot;(\\.|$)&quot;);h=(T.data(this,&quot;events&quot;)||{})[b.type];for(var f in h){var e=h[f];if(c||d.test(e.type)){b.handler=e;b.data=e.data;var g=e.apply(this,arguments);if(g!==ab){b.result=g;if(g===false){b.preventDefault();b.stopPropagation()}}if(b.isImmediatePropagationStopped()){break}}}},props:&quot;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&quot;.split(&quot; &quot;),fix:function(c){if(c[aa]){return c}var e=c;c=T.Event(e);for(var d=this.props.length,a;d;){a=this.props[--d];c[a]=e[a]}if(!c.target){c.target=c.srcElement||document}if(c.target.nodeType==3){c.target=c.target.parentNode}if(!c.relatedTarget&amp;&amp;c.fromElement){c.relatedTarget=c.fromElement==c.target?c.toElement:c.fromElement}if(c.pageX==null&amp;&amp;c.clientX!=null){var b=document.documentElement,f=document.body;c.pageX=c.clientX+(b&amp;&amp;b.scrollLeft||f&amp;&amp;f.scrollLeft||0)-(b.clientLeft||0);c.pageY=c.clientY+(b&amp;&amp;b.scrollTop||f&amp;&amp;f.scrollTop||0)-(b.clientTop||0)}if(!c.which&amp;&amp;((c.charCode||c.charCode===0)?c.charCode:c.keyCode)){c.which=c.charCode||c.keyCode}if(!c.metaKey&amp;&amp;c.ctrlKey){c.metaKey=c.ctrlKey}if(!c.which&amp;&amp;c.button){c.which=(c.button&amp;1?1:(c.button&amp;2?3:(c.button&amp;4?2:0)))}return c},proxy:function(a,b){b=b||function(){return a.apply(this,arguments)};b.guid=a.guid=a.guid||b.guid||this.guid++;return b},special:{ready:{setup:P,teardown:function(){}}},specialAll:{live:{setup:function(b,a){T.event.add(this,a[0],af)},teardown:function(a){if(a.length){var c=0,b=RegExp(&quot;(^|\\.)&quot;+a[0]+&quot;(\\.|$)&quot;);T.each((T.data(this,&quot;events&quot;).live||{}),function(){if(b.test(this.type)){c++}});if(c&lt;1){T.event.remove(this,a[0],af)}}}}}};T.Event=function(a){if(!this.preventDefault){return new T.Event(a)}if(a&amp;&amp;a.type){this.originalEvent=a;this.type=a.type}else{this.type=a}this.timeStamp=ad();this[aa]=true};function X(){return false}function J(){return true}T.Event.prototype={preventDefault:function(){this.isDefaultPrevented=J;var a=this.originalEvent;if(!a){return}if(a.preventDefault){a.preventDefault()}a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=J;var a=this.originalEvent;if(!a){return}if(a.stopPropagation){a.stopPropagation()}a.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=J;this.stopPropagation()},isDefaultPrevented:X,isPropagationStopped:X,isImmediatePropagationStopped:X};var ah=function(b){var c=b.relatedTarget;while(c&amp;&amp;c!=this){try{c=c.parentNode}catch(a){c=this}}if(c!=this){b.type=b.data;T.event.handle.apply(this,arguments)}};T.each({mouseover:&quot;mouseenter&quot;,mouseout:&quot;mouseleave&quot;},function(a,b){T.event.special[b]={setup:function(){T.event.add(this,a,ah,b)},teardown:function(){T.event.remove(this,a,ah)}}});T.fn.extend({bind:function(b,a,c){return b==&quot;unload&quot;?this.one(b,a,c):this.each(function(){T.event.add(this,b,c||a,c&amp;&amp;a)})},one:function(b,a,c){var d=T.event.proxy(c||a,function(e){T(this).unbind(e,d);return(c||a).apply(this,arguments)});return this.each(function(){T.event.add(this,b,d,c&amp;&amp;a)})},unbind:function(a,b){return this.each(function(){T.event.remove(this,a,b)})},trigger:function(b,a){return this.each(function(){T.event.trigger(b,a,this)})},triggerHandler:function(c,a){if(this[0]){var b=T.Event(c);b.preventDefault();b.stopPropagation();T.event.trigger(b,a,this[0]);return b.result}},toggle:function(a){var c=arguments,b=1;while(b&lt;c.length){T.event.proxy(a,c[b++])}return this.click(T.event.proxy(a,function(d){this.lastToggle=(this.lastToggle||0)%b;d.preventDefault();return c[this.lastToggle++].apply(this,arguments)||false}))},hover:function(b,a){return this.mouseenter(b).mouseleave(a)},ready:function(a){P();if(T.isReady){a.call(document,T)}else{T.readyList.push(a)}return this},live:function(a,b){var c=T.event.proxy(b);c.guid+=this.selector+a;T(document).bind(Z(a,this.selector),this.selector,c);return this},die:function(a,b){T(document).unbind(Z(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});function af(a){var d=RegExp(&quot;(^|\\.)&quot;+a.type+&quot;(\\.|$)&quot;),b=true,c=[];T.each(T.data(this,&quot;events&quot;).live||[],function(g,f){if(d.test(f.type)){var e=T(a.target).closest(f.data)[0];if(e){c.push({elem:e,fn:f})}}});c.sort(function(e,f){return T.data(e.elem,&quot;closest&quot;)-T.data(f.elem,&quot;closest&quot;)});T.each(c,function(){if(this.fn.call(this.elem,a,this.fn.data)===false){return(b=false)}});return b}function Z(a,b){return[&quot;live&quot;,a,b.replace(/\./g,&quot;`&quot;).replace(/ /g,&quot;|&quot;)].join(&quot;.&quot;)}T.extend({isReady:false,readyList:[],ready:function(){if(!T.isReady){T.isReady=true;if(T.readyList){T.each(T.readyList,function(){this.call(document,T)});T.readyList=null}T(document).triggerHandler(&quot;ready&quot;)}}});var G=false;function P(){if(G){return}G=true;if(document.addEventListener){document.addEventListener(&quot;DOMContentLoaded&quot;,function(){document.removeEventListener(&quot;DOMContentLoaded&quot;,arguments.callee,false);T.ready()},false)}else{if(document.attachEvent){document.attachEvent(&quot;onreadystatechange&quot;,function(){if(document.readyState===&quot;complete&quot;){document.detachEvent(&quot;onreadystatechange&quot;,arguments.callee);T.ready()}});if(document.documentElement.doScroll&amp;&amp;W==W.top){(function(){if(T.isReady){return}try{document.documentElement.doScroll(&quot;left&quot;)}catch(a){setTimeout(arguments.callee,0);return}T.ready()})()}}}T.event.add(W,&quot;load&quot;,T.ready)}T.each((&quot;blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error&quot;).split(&quot;,&quot;),function(a,b){T.fn[b]=function(c){return c?this.bind(b,c):this.trigger(b)}});T(W).bind(&quot;unload&quot;,function(){for(var a in T.cache){if(a!=1&amp;&amp;T.cache[a].handle){T.event.remove(T.cache[a].handle.elem)}}});(function(){T.support={};var f=document.documentElement,e=document.createElement(&quot;script&quot;),a=document.createElement(&quot;div&quot;),b=&quot;script&quot;+(new Date).getTime();a.style.display=&quot;none&quot;;a.innerHTML='   &lt;link/&gt;&lt;table&gt;&lt;/table&gt;&lt;a href=&quot;/a&quot; style=&quot;color:red;float:left;opacity:.5;&quot;&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 d=a.getElementsByTagName(&quot;*&quot;),g=a.getElementsByTagName(&quot;a&quot;)[0];if(!d||!d.length||!g){return}T.support={leadingWhitespace:a.firstChild.nodeType==3,tbody:!a.getElementsByTagName(&quot;tbody&quot;).length,objectAll:!!a.getElementsByTagName(&quot;object&quot;)[0].getElementsByTagName(&quot;*&quot;).length,htmlSerialize:!!a.getElementsByTagName(&quot;link&quot;).length,style:/red/.test(g.getAttribute(&quot;style&quot;)),hrefNormalized:g.getAttribute(&quot;href&quot;)===&quot;/a&quot;,opacity:g.style.opacity===&quot;0.5&quot;,cssFloat:!!g.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};e.type=&quot;text/javascript&quot;;try{e.appendChild(document.createTextNode(&quot;window.&quot;+b+&quot;=1;&quot;))}catch(c){}f.insertBefore(e,f.firstChild);if(W[b]){T.support.scriptEval=true;delete W[b]}f.removeChild(e);if(a.attachEvent&amp;&amp;a.fireEvent){a.attachEvent(&quot;onclick&quot;,function(){T.support.noCloneEvent=false;a.detachEvent(&quot;onclick&quot;,arguments.callee)});a.cloneNode(true).fireEvent(&quot;onclick&quot;)}T(function(){var h=document.createElement(&quot;div&quot;);h.style.width=h.style.paddingLeft=&quot;1px&quot;;document.body.appendChild(h);T.boxModel=T.support.boxModel=h.offsetWidth===2;document.body.removeChild(h).style.display=&quot;none&quot;})})();var H=T.support.cssFloat?&quot;cssFloat&quot;:&quot;styleFloat&quot;;T.props={&quot;for&quot;:&quot;htmlFor&quot;,&quot;class&quot;:&quot;className&quot;,&quot;float&quot;:H,cssFloat:H,styleFloat:H,readonly:&quot;readOnly&quot;,maxlength:&quot;maxLength&quot;,cellspacing:&quot;cellSpacing&quot;,rowspan:&quot;rowSpan&quot;,tabindex:&quot;tabIndex&quot;};T.fn.extend({_load:T.fn.load,load:function(e,b,a){if(typeof e!==&quot;string&quot;){return this._load(e)}var c=e.indexOf(&quot; &quot;);if(c&gt;=0){var g=e.slice(c,e.length);e=e.slice(0,c)}var d=&quot;GET&quot;;if(b){if(T.isFunction(b)){a=b;b=null}else{if(typeof b===&quot;object&quot;){b=T.param(b);d=&quot;POST&quot;}}}var f=this;T.ajax({url:e,type:d,dataType:&quot;html&quot;,data:b,complete:function(j,h){if(h==&quot;success&quot;||h==&quot;notmodified&quot;){f.html(g?T(&quot;&lt;div/&gt;&quot;).append(j.responseText.replace(/&lt;script(.|\s)*?\/script&gt;/g,&quot;&quot;)).find(g):j.responseText)}if(a){f.each(a,[j.responseText,h,j])}}});return this},serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?T.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(c,b){var a=T(this).val();return a==null?null:T.isArray(a)?T.map(a,function(d,e){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});T.each(&quot;ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend&quot;.split(&quot;,&quot;),function(b,a){T.fn[a]=function(c){return this.bind(a,c)}});var N=ad();T.extend({get:function(d,b,a,c){if(T.isFunction(b)){a=b;b=null}return T.ajax({type:&quot;GET&quot;,url:d,data:b,success:a,dataType:c})},getScript:function(b,a){return T.get(b,null,a,&quot;script&quot;)},getJSON:function(c,b,a){return T.get(c,b,a,&quot;json&quot;)},post:function(d,b,a,c){if(T.isFunction(b)){a=b;b={}}return T.ajax({type:&quot;POST&quot;,url:d,data:b,success:a,dataType:c})},ajaxSetup:function(a){T.extend(T.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:&quot;GET&quot;,contentType:&quot;application/x-www-form-urlencoded&quot;,processData:true,async:true,xhr:function(){return W.ActiveXObject?new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;):new XMLHttpRequest()},accepts:{xml:&quot;application/xml, text/xml&quot;,html:&quot;text/html&quot;,script:&quot;text/javascript, application/javascript&quot;,json:&quot;application/json, text/javascript&quot;,text:&quot;text/plain&quot;,_default:&quot;*/*&quot;}},lastModified:{},ajax:function(l){l=T.extend(true,l,T.extend(true,{},T.ajaxSettings,l));var a,u=/=\?(&amp;|$)/g,f,b,r=l.type.toUpperCase();if(l.data&amp;&amp;l.processData&amp;&amp;typeof l.data!==&quot;string&quot;){l.data=T.param(l.data)}if(l.dataType==&quot;jsonp&quot;){if(r==&quot;GET&quot;){if(!l.url.match(u)){l.url+=(l.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+(l.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}else{if(!l.data||!l.data.match(u)){l.data=(l.data?l.data+&quot;&amp;&quot;:&quot;&quot;)+(l.jsonp||&quot;callback&quot;)+&quot;=?&quot;}}l.dataType=&quot;json&quot;}if(l.dataType==&quot;json&quot;&amp;&amp;(l.data&amp;&amp;l.data.match(u)||l.url.match(u))){a=&quot;jsonp&quot;+N++;if(l.data){l.data=(l.data+&quot;&quot;).replace(u,&quot;=&quot;+a+&quot;$1&quot;)}l.url=l.url.replace(u,&quot;=&quot;+a+&quot;$1&quot;);l.dataType=&quot;script&quot;;W[a]=function(x){b=x;p();m();W[a]=ab;try{delete W[a]}catch(w){}if(q){q.removeChild(d)}}}if(l.dataType==&quot;script&quot;&amp;&amp;l.cache==null){l.cache=false}if(l.cache===false&amp;&amp;r==&quot;GET&quot;){var v=ad();var c=l.url.replace(/(\?|&amp;)_=.*?(&amp;|$)/,&quot;$1_=&quot;+v+&quot;$2&quot;);l.url=c+((c==l.url)?(l.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+&quot;_=&quot;+v:&quot;&quot;)}if(l.data&amp;&amp;r==&quot;GET&quot;){l.url+=(l.url.match(/\?/)?&quot;&amp;&quot;:&quot;?&quot;)+l.data;l.data=null}if(l.global&amp;&amp;!T.active++){T.event.trigger(&quot;ajaxStart&quot;)}var g=/^(\w+:)?\/\/([^\/?#]+)/.exec(l.url);if(l.dataType==&quot;script&quot;&amp;&amp;r==&quot;GET&quot;&amp;&amp;g&amp;&amp;(g[1]&amp;&amp;g[1]!=location.protocol||g[2]!=location.host)){var q=document.getElementsByTagName(&quot;head&quot;)[0];var d=document.createElement(&quot;script&quot;);d.src=l.url;if(l.scriptCharset){d.charset=l.scriptCharset}if(!a){var j=false;d.onload=d.onreadystatechange=function(){if(!j&amp;&amp;(!this.readyState||this.readyState==&quot;loaded&quot;||this.readyState==&quot;complete&quot;)){j=true;p();m();d.onload=d.onreadystatechange=null;q.removeChild(d)}}}q.appendChild(d);return ab}var n=false;var o=l.xhr();if(l.username){o.open(r,l.url,l.async,l.username,l.password)}else{o.open(r,l.url,l.async)}try{if(l.data){o.setRequestHeader(&quot;Content-Type&quot;,l.contentType)}if(l.ifModified){o.setRequestHeader(&quot;If-Modified-Since&quot;,T.lastModified[l.url]||&quot;Thu, 01 Jan 1970 00:00:00 GMT&quot;)}o.setRequestHeader(&quot;X-Requested-With&quot;,&quot;XMLHttpRequest&quot;);o.setRequestHeader(&quot;Accept&quot;,l.dataType&amp;&amp;l.accepts[l.dataType]?l.accepts[l.dataType]+&quot;, */*&quot;:l.accepts._default)}catch(e){}if(l.beforeSend&amp;&amp;l.beforeSend(o,l)===false){if(l.global&amp;&amp;!--T.active){T.event.trigger(&quot;ajaxStop&quot;)}o.abort();return false}if(l.global){T.event.trigger(&quot;ajaxSend&quot;,[o,l])}var k=function(y){if(o.readyState==0){if(h){clearInterval(h);h=null;if(l.global&amp;&amp;!--T.active){T.event.trigger(&quot;ajaxStop&quot;)}}}else{if(!n&amp;&amp;o&amp;&amp;(o.readyState==4||y==&quot;timeout&quot;)){n=true;if(h){clearInterval(h);h=null}f=y==&quot;timeout&quot;?&quot;timeout&quot;:!T.httpSuccess(o)?&quot;error&quot;:l.ifModified&amp;&amp;T.httpNotModified(o,l.url)?&quot;notmodified&quot;:&quot;success&quot;;if(f==&quot;success&quot;){try{b=T.httpData(o,l.dataType,l)}catch(w){f=&quot;parsererror&quot;}}if(f==&quot;success&quot;){var x;try{x=o.getResponseHeader(&quot;Last-Modified&quot;)}catch(w){}if(l.ifModified&amp;&amp;x){T.lastModified[l.url]=x}if(!a){p()}}else{T.handleError(l,o,f)}m();if(y){o.abort()}if(l.async){o=null}}}};if(l.async){var h=setInterval(k,13);if(l.timeout&gt;0){setTimeout(function(){if(o&amp;&amp;!n){k(&quot;timeout&quot;)}},l.timeout)}}try{o.send(l.data)}catch(e){T.handleError(l,o,null,e)}if(!l.async){k()}function p(){if(l.success){l.success(b,f)}if(l.global){T.event.trigger(&quot;ajaxSuccess&quot;,[o,l])}}function m(){if(l.complete){l.complete(o,f)}if(l.global){T.event.trigger(&quot;ajaxComplete&quot;,[o,l])}if(l.global&amp;&amp;!--T.active){T.event.trigger(&quot;ajaxStop&quot;)}}return o},handleError:function(c,a,d,b){if(c.error){c.error(a,d,b)}if(c.global){T.event.trigger(&quot;ajaxError&quot;,[a,c,b])}},active:0,httpSuccess:function(a){try{return !a.status&amp;&amp;location.protocol==&quot;file:&quot;||(a.status&gt;=200&amp;&amp;a.status&lt;300)||a.status==304||a.status==1223}catch(b){}return false},httpNotModified:function(b,d){try{var a=b.getResponseHeader(&quot;Last-Modified&quot;);return b.status==304||a==T.lastModified[d]}catch(c){}return false},httpData:function(a,c,d){var e=a.getResponseHeader(&quot;content-type&quot;),f=c==&quot;xml&quot;||!c&amp;&amp;e&amp;&amp;e.indexOf(&quot;xml&quot;)&gt;=0,b=f?a.responseXML:a.responseText;if(f&amp;&amp;b.documentElement.tagName==&quot;parsererror&quot;){throw&quot;parsererror&quot;}if(d&amp;&amp;d.dataFilter){b=d.dataFilter(b,c)}if(typeof b===&quot;string&quot;){if(c==&quot;script&quot;){T.globalEval(b)}if(c==&quot;json&quot;){b=W[&quot;eval&quot;](&quot;(&quot;+b+&quot;)&quot;)}}return b},param:function(d){var b=[];function a(f,e){b[b.length]=encodeURIComponent(f)+&quot;=&quot;+encodeURIComponent(e)}if(T.isArray(d)||d.jquery){T.each(d,function(){a(this.name,this.value)})}else{for(var c in d){if(T.isArray(d[c])){T.each(d[c],function(){a(c,this)})}else{a(c,T.isFunction(d[c])?d[c]():d[c])}}}return b.join(&quot;&amp;&quot;).replace(/%20/g,&quot;+&quot;)}});var V={},U,ae=[[&quot;height&quot;,&quot;marginTop&quot;,&quot;marginBottom&quot;,&quot;paddingTop&quot;,&quot;paddingBottom&quot;],[&quot;width&quot;,&quot;marginLeft&quot;,&quot;marginRight&quot;,&quot;paddingLeft&quot;,&quot;paddingRight&quot;],[&quot;opacity&quot;]];function K(b,c){var a={};T.each(ae.concat.apply([],ae.slice(0,c)),function(){a[this]=b});return a}T.fn.extend({show:function(c,a){if(c){return this.animate(K(&quot;show&quot;,3),c,a)}else{for(var e=0,g=this.length;e&lt;g;e++){var h=T.data(this[e],&quot;olddisplay&quot;);this[e].style.display=h||&quot;&quot;;if(T.css(this[e],&quot;display&quot;)===&quot;none&quot;){var f=this[e].tagName,b;if(V[f]){b=V[f]}else{var d=T(&quot;&lt;&quot;+f+&quot; /&gt;&quot;).appendTo(&quot;body&quot;);b=d.css(&quot;display&quot;);if(b===&quot;none&quot;){b=&quot;block&quot;}d.remove();V[f]=b}T.data(this[e],&quot;olddisplay&quot;,b)}}for(var e=0,g=this.length;e&lt;g;e++){this[e].style.display=T.data(this[e],&quot;olddisplay&quot;)||&quot;&quot;}return this}},hide:function(b,a){if(b){return this.animate(K(&quot;hide&quot;,3),b,a)}else{for(var c=0,d=this.length;c&lt;d;c++){var e=T.data(this[c],&quot;olddisplay&quot;);if(!e&amp;&amp;e!==&quot;none&quot;){T.data(this[c],&quot;olddisplay&quot;,T.css(this[c],&quot;display&quot;))}}for(var c=0,d=this.length;c&lt;d;c++){this[c].style.display=&quot;none&quot;}return this}},_toggle:T.fn.toggle,toggle:function(a,b){var c=typeof a===&quot;boolean&quot;;return T.isFunction(a)&amp;&amp;T.isFunction(b)?this._toggle.apply(this,arguments):a==null||c?this.each(function(){var d=c?a:T(this).is(&quot;:hidden&quot;);T(this)[d?&quot;show&quot;:&quot;hide&quot;]()}):this.animate(K(&quot;toggle&quot;,3),a,b)},fadeTo:function(c,a,b){return this.animate({opacity:a},c,b)},animate:function(a,d,b,c){var e=T.speed(d,b,c);return this[e.queue===false?&quot;each&quot;:&quot;queue&quot;](function(){var g=T.extend({},e),j,f=this.nodeType==1&amp;&amp;T(this).is(&quot;:hidden&quot;),h=this;for(j in a){if(a[j]==&quot;hide&quot;&amp;&amp;f||a[j]==&quot;show&quot;&amp;&amp;!f){return g.complete.call(this)}if((j==&quot;height&quot;||j==&quot;width&quot;)&amp;&amp;this.style){g.display=T.css(this,&quot;display&quot;);g.overflow=this.style.overflow}}if(g.overflow!=null){this.style.overflow=&quot;hidden&quot;}g.curAnim=T.extend({},a);T.each(a,function(p,l){var m=new T.fx(h,g,p);if(/toggle|show|hide/.test(l)){m[l==&quot;toggle&quot;?f?&quot;show&quot;:&quot;hide&quot;:l](a)}else{var n=l.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),k=m.cur(true)||0;if(n){var q=parseFloat(n[2]),o=n[3]||&quot;px&quot;;if(o!=&quot;px&quot;){h.style[p]=(q||1)+o;k=((q||1)/m.cur(true))*k;h.style[p]=k+o}if(n[1]){q=((n[1]==&quot;-=&quot;?-1:1)*q)+k}m.custom(k,q,o)}else{m.custom(k,l,&quot;&quot;)}}});return true})},stop:function(b,c){var a=T.timers;if(b){this.queue([])}this.each(function(){for(var d=a.length-1;d&gt;=0;d--){if(a[d].elem==this){if(c){a[d](true)}a.splice(d,1)}}});if(!c){this.dequeue()}return this}});T.each({slideDown:K(&quot;show&quot;,1),slideUp:K(&quot;hide&quot;,1),slideToggle:K(&quot;toggle&quot;,1),fadeIn:{opacity:&quot;show&quot;},fadeOut:{opacity:&quot;hide&quot;}},function(b,a){T.fn[b]=function(d,c){return this.animate(a,d,c)}});T.extend({speed:function(b,a,c){var d=typeof b===&quot;object&quot;?b:{complete:c||!c&amp;&amp;a||T.isFunction(b)&amp;&amp;b,duration:b,easing:c&amp;&amp;a||a&amp;&amp;!T.isFunction(a)&amp;&amp;a};d.duration=T.fx.off?0:typeof d.duration===&quot;number&quot;?d.duration:T.fx.speeds[d.duration]||T.fx.speeds._default;d.old=d.complete;d.complete=function(){if(d.queue!==false){T(this).dequeue()}if(T.isFunction(d.old)){d.old.call(this)}};return d},easing:{linear:function(b,a,d,c){return d+c*b},swing:function(b,a,d,c){return((-Math.cos(b*Math.PI)/2)+0.5)*c+d}},timers:[],fx:function(b,c,a){this.options=c;this.elem=b;this.prop=a;if(!c.orig){c.orig={}}}});T.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(T.fx.step[this.prop]||T.fx.step._default)(this);if((this.prop==&quot;height&quot;||this.prop==&quot;width&quot;)&amp;&amp;this.elem.style){this.elem.style.display=&quot;block&quot;}},cur:function(a){if(this.elem[this.prop]!=null&amp;&amp;(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var b=parseFloat(T.css(this.elem,this.prop,a));return b&amp;&amp;b&gt;-10000?b:parseFloat(T.curCSS(this.elem,this.prop))||0},custom:function(a,b,c){this.startTime=ad();this.start=a;this.end=b;this.unit=c||this.unit||&quot;px&quot;;this.now=this.start;this.pos=this.state=0;var e=this;function d(f){return e.step(f)}d.elem=this.elem;if(d()&amp;&amp;T.timers.push(d)&amp;&amp;!U){U=setInterval(function(){var f=T.timers;for(var g=0;g&lt;f.length;g++){if(!f[g]()){f.splice(g--,1)}}if(!f.length){clearInterval(U);U=ab}},13)}},show:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop==&quot;width&quot;||this.prop==&quot;height&quot;?1:0,this.cur());T(this.elem).show()},hide:function(){this.options.orig[this.prop]=T.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(c){var d=ad();if(c||d&gt;=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var f=true;for(var e in this.options.curAnim){if(this.options.curAnim[e]!==true){f=false}}if(f){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(T.css(this.elem,&quot;display&quot;)==&quot;none&quot;){this.elem.style.display=&quot;block&quot;}}if(this.options.hide){T(this.elem).hide()}if(this.options.hide||this.options.show){for(var b in this.options.curAnim){T.attr(this.elem.style,b,this.options.orig[b])}}this.options.complete.call(this.elem)}return false}else{var a=d-this.startTime;this.state=a/this.options.duration;this.pos=T.easing[this.options.easing||(T.easing.swing?&quot;swing&quot;:&quot;linear&quot;)](this.state,a,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};T.extend(T.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){T.attr(a.elem.style,&quot;opacity&quot;,a.now)},_default:function(a){if(a.elem.style&amp;&amp;a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit}else{a.elem[a.prop]=a.now}}}});if(document.documentElement.getBoundingClientRect){T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}var f=this[0].getBoundingClientRect(),c=this[0].ownerDocument,g=c.body,h=c.documentElement,a=h.clientTop||g.clientTop||0,b=h.clientLeft||g.clientLeft||0,d=f.top+(self.pageYOffset||T.boxModel&amp;&amp;h.scrollTop||g.scrollTop)-a,e=f.left+(self.pageXOffset||T.boxModel&amp;&amp;h.scrollLeft||g.scrollLeft)-b;return{top:d,left:e}}}else{T.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return T.offset.bodyOffset(this[0])}T.offset.initialized||T.offset.initialize();var f=this[0],j=f.offsetParent,k=f,a=f.ownerDocument,c,h=a.documentElement,e=a.body,d=a.defaultView,l=d.getComputedStyle(f,null),b=f.offsetTop,g=f.offsetLeft;while((f=f.parentNode)&amp;&amp;f!==e&amp;&amp;f!==h){c=d.getComputedStyle(f,null);b-=f.scrollTop,g-=f.scrollLeft;if(f===j){b+=f.offsetTop,g+=f.offsetLeft;if(T.offset.doesNotAddBorder&amp;&amp;!(T.offset.doesAddBorderForTableAndCells&amp;&amp;/^t(able|d|h)$/i.test(f.tagName))){b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0}k=j,j=f.offsetParent}if(T.offset.subtractsBorderForOverflowNotVisible&amp;&amp;c.overflow!==&quot;visible&quot;){b+=parseInt(c.borderTopWidth,10)||0,g+=parseInt(c.borderLeftWidth,10)||0}l=c}if(l.position===&quot;relative&quot;||l.position===&quot;static&quot;){b+=e.offsetTop,g+=e.offsetLeft}if(l.position===&quot;fixed&quot;){b+=Math.max(h.scrollTop,e.scrollTop),g+=Math.max(h.scrollLeft,e.scrollLeft)}return{top:b,left:g}}}T.offset={initialize:function(){if(this.initialized){return}var c=document.body,j=document.createElement(&quot;div&quot;),g,h,a,f,b,k,e=c.style.marginTop,d='&lt;div style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;table style=&quot;position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';b={position:&quot;absolute&quot;,top:0,left:0,margin:0,border:0,width:&quot;1px&quot;,height:&quot;1px&quot;,visibility:&quot;hidden&quot;};for(k in b){j.style[k]=b[k]}j.innerHTML=d;c.insertBefore(j,c.firstChild);g=j.firstChild,h=g.firstChild,f=g.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(h.offsetTop!==5);this.doesAddBorderForTableAndCells=(f.offsetTop===5);g.style.overflow=&quot;hidden&quot;,g.style.position=&quot;relative&quot;;this.subtractsBorderForOverflowNotVisible=(h.offsetTop===-5);c.style.marginTop=&quot;1px&quot;;this.doesNotIncludeMarginInBodyOffset=(c.offsetTop===0);c.style.marginTop=e;c.removeChild(j);this.initialized=true},bodyOffset:function(c){T.offset.initialized||T.offset.initialize();var a=c.offsetTop,b=c.offsetLeft;if(T.offset.doesNotIncludeMarginInBodyOffset){a+=parseInt(T.curCSS(c,&quot;marginTop&quot;,true),10)||0,b+=parseInt(T.curCSS(c,&quot;marginLeft&quot;,true),10)||0}return{top:a,left:b}}};T.fn.extend({position:function(){var b=0,c=0,e;if(this[0]){var d=this.offsetParent(),a=this.offset(),f=/^body|html$/i.test(d[0].tagName)?{top:0,left:0}:d.offset();a.top-=Y(this,&quot;marginTop&quot;);a.left-=Y(this,&quot;marginLeft&quot;);f.top+=Y(d,&quot;borderTopWidth&quot;);f.left+=Y(d,&quot;borderLeftWidth&quot;);e={top:a.top-f.top,left:a.left-f.left}}return e},offsetParent:function(){var a=this[0].offsetParent||document.body;while(a&amp;&amp;(!/^body|html$/i.test(a.tagName)&amp;&amp;T.css(a,&quot;position&quot;)==&quot;static&quot;)){a=a.offsetParent}return T(a)}});T.each([&quot;Left&quot;,&quot;Top&quot;],function(b,c){var a=&quot;scroll&quot;+c;T.fn[a]=function(d){if(!this[0]){return null}return d!==ab?this.each(function(){this==W||this==document?W.scrollTo(!b?d:T(W).scrollLeft(),b?d:T(W).scrollTop()):this[a]=d}):this[0]==W||this[0]==document?self[b?&quot;pageYOffset&quot;:&quot;pageXOffset&quot;]||T.boxModel&amp;&amp;document.documentElement[a]||document.body[a]:this[0][a]}});T.each([&quot;Height&quot;,&quot;Width&quot;],function(b,d){var f=b?&quot;Left&quot;:&quot;Top&quot;,c=b?&quot;Right&quot;:&quot;Bottom&quot;,e=d.toLowerCase();T.fn[&quot;inner&quot;+d]=function(){return this[0]?T.css(this[0],e,false,&quot;padding&quot;):null};T.fn[&quot;outer&quot;+d]=function(g){return this[0]?T.css(this[0],e,false,g?&quot;margin&quot;:&quot;border&quot;):null};var a=d.toLowerCase();T.fn[a]=function(g){return this[0]==W?document.compatMode==&quot;CSS1Compat&quot;&amp;&amp;document.documentElement[&quot;client&quot;+d]||document.body[&quot;client&quot;+d]:this[0]==document?Math.max(document.documentElement[&quot;client&quot;+d],document.body[&quot;scroll&quot;+d],document.documentElement[&quot;scroll&quot;+d],document.body[&quot;offset&quot;+d],document.documentElement[&quot;offset&quot;+d]):g===ab?(this.length?T.css(this[0],a):null):this.css(a,typeof g===&quot;string&quot;?g:g+&quot;px&quot;)}})})();(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:&quot;header&quot;,cssAsc:&quot;headerSortUp&quot;,cssDesc:&quot;headerSortDown&quot;,sortInitialOrder:&quot;asc&quot;,sortMultiSortKey:&quot;shiftKey&quot;,sortForce:null,sortAppend:null,textExtraction:&quot;simple&quot;,parsers:{},widgets:[],widgetZebra:{css:[&quot;even&quot;,&quot;odd&quot;]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:&quot;us&quot;,decimal:&quot;.&quot;,debug:false};function benchmark(s,d){log(s+&quot;,&quot;+(new Date().getTime()-d.getTime())+&quot;ms&quot;)}this.benchmark=benchmark;function log(s){if(typeof console!=&quot;undefined&quot;&amp;&amp;typeof console.debug!=&quot;undefined&quot;){console.log(s)}else{alert(s)}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug=&quot;&quot;}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i&lt;l;i++){var p=false;if($.metadata&amp;&amp;($($headers[i]).metadata()&amp;&amp;$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter)}else{if((table.config.headers[i]&amp;&amp;table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter)}}if(!p){p=detectParserForColumn(table,cells[i])}if(table.config.debug){parsersDebug+=&quot;column:&quot;+i+&quot; parser:&quot;+p.id+&quot;\n&quot;}list.push(p)}}if(table.config.debug){log(parsersDebug)}return list}function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i&lt;l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i]}}return parsers[0]}function getParserById(name){var l=parsers.length;for(var i=0;i&lt;l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i]}}return false}function buildCache(table){if(table.config.debug){var cacheTime=new Date()}var totalRows=(table.tBodies[0]&amp;&amp;table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&amp;&amp;table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i&lt;totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j&lt;totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]))}cols.push(i);cache.normalized.push(cols);cols=null}if(table.config.debug){benchmark(&quot;Building cache for &quot;+totalRows+&quot; rows:&quot;,cacheTime)}return cache}function getElementText(config,node){if(!node){return&quot;&quot;}var t=&quot;&quot;;if(config.textExtraction==&quot;simple&quot;){if(node.childNodes[0]&amp;&amp;node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML}else{t=node.innerHTML}}else{if(typeof(config.textExtraction)==&quot;function&quot;){t=config.textExtraction(node)}else{t=$(node).text()}}return t}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i&lt;totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j&lt;l;j++){tableBody[0].appendChild(o[j])}}}if(table.config.appender){table.config.appender(table,rows)}rows=null;if(table.config.debug){benchmark(&quot;Rebuilt table:&quot;,appendTime)}applyWidget(table);setTimeout(function(){$(table).trigger(&quot;sortEnd&quot;)},0)}function buildHeaders(table){if(table.config.debug){var time=new Date()}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i&lt;table.tHead.rows.length;i++){tableHeadersRows[i]=0}$tableHeaders=$(&quot;thead th&quot;,table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index)){this.sortDisabled=true}if(!this.sortDisabled){$(this).addClass(table.config.cssHeader)}table.config.headerList[index]=this});if(table.config.debug){benchmark(&quot;Built headers:&quot;,time);log($tableHeaders)}return $tableHeaders}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i&lt;c.length;i++){var cell=c[i];if(cell.colSpan&gt;1){arr=arr.concat(checkCellColSpan(table,headerArr,row++))}else{if(table.tHead.length==1||(cell.rowSpan&gt;1||!r[row+1])){arr.push(cell)}}}return arr}function checkHeaderMetadata(cell){if(($.metadata)&amp;&amp;($(cell).metadata().sorter===false)){return true}return false}function checkHeaderOptions(table,i){if((table.config.headers[i])&amp;&amp;(table.config.headers[i].sorter===false)){return true}return false}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i&lt;l;i++){getWidgetById(c[i]).format(table)}}function getWidgetById(name){var l=widgets.length;for(var i=0;i&lt;l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i]}}}function formatSortingOrder(v){if(typeof(v)!=&quot;Number&quot;){i=(v.toLowerCase()==&quot;desc&quot;)?1:0}else{i=(v==(0||1))?v:0}return i}function isValueInArray(v,a){var l=a.length;for(var i=0;i&lt;l;i++){if(a[i][0]==v){return true}}return false}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this)}});var l=list.length;for(var i=0;i&lt;l;i++){h[list[i][0]].addClass(css[list[i][1]])}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$(&quot;&lt;colgroup&gt;&quot;);$(&quot;tr:first td&quot;,table.tBodies[0]).each(function(){colgroup.append($(&quot;&lt;col&gt;&quot;).css(&quot;width&quot;,$(this).width()))});$(table).prepend(colgroup)}}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i&lt;l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date()}var dynamicExp=&quot;var sortWrapper = function(a,b) {&quot;,l=sortList.length;for(var i=0;i&lt;l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)==&quot;text&quot;)?((order==0)?&quot;sortText&quot;:&quot;sortTextDesc&quot;):((order==0)?&quot;sortNumeric&quot;:&quot;sortNumericDesc&quot;);var e=&quot;e&quot;+i;dynamicExp+=&quot;var &quot;+e+&quot; = &quot;+s+&quot;(a[&quot;+c+&quot;],b[&quot;+c+&quot;]); &quot;;dynamicExp+=&quot;if(&quot;+e+&quot;) { return &quot;+e+&quot;; } &quot;;dynamicExp+=&quot;else { &quot;}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+=&quot;return a[&quot;+orgOrderCol+&quot;]-b[&quot;+orgOrderCol+&quot;];&quot;;for(var i=0;i&lt;l;i++){dynamicExp+=&quot;}; &quot;}dynamicExp+=&quot;return 0; &quot;;dynamicExp+=&quot;}; &quot;;eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark(&quot;Sorting on &quot;+sortList.toString()+&quot; and dir &quot;+order+&quot; time:&quot;,sortTime)}return cache}function sortText(a,b){return((a&lt;b)?-1:((a&gt;b)?1:0))}function sortTextDesc(a,b){return((b&lt;a)?-1:((b&gt;a)?1:0))}function sortNumeric(a,b){return a-b}function sortNumericDesc(a,b){return b-a}function getCachedSortType(parsers,i){return parsers[i].type}this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies){return}var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger(&quot;sortStart&quot;);var totalRows=($this[0].tBodies[0]&amp;&amp;$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&amp;&amp;totalRows&gt;0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j&lt;a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j])}}}config.sortList.push([i,this.order])}else{if(isValueInArray(i,config.sortList)){for(var j=0;j&lt;config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2}}}else{config.sortList.push([i,this.order])}}setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache))},1);return false}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false}});$this.bind(&quot;update&quot;,function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this)}).bind(&quot;sorton&quot;,function(e,list){$(this).trigger(&quot;sortStart&quot;);config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache))}).bind(&quot;appendCache&quot;,function(){appendToTable(this,cache)}).bind(&quot;applyWidgetId&quot;,function(e,id){getWidgetById(id).format(this)}).bind(&quot;applyWidgets&quot;,function(){applyWidget(this)});if($.metadata&amp;&amp;($(this).metadata()&amp;&amp;$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist}if(config.sortList.length&gt;0){$this.trigger(&quot;sorton&quot;,[config.sortList])}applyWidget(this)})};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i&lt;l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false}}if(a){parsers.push(parser)}};this.addWidget=function(widget){widgets.push(widget)};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i};this.isDigit=function(s,config){var DECIMAL=&quot;\\&quot;+config.decimal;var exp=&quot;/(^[+]?0(&quot;+DECIMAL+&quot;0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)&quot;+DECIMAL+&quot;(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*&quot;+DECIMAL+&quot;0+$)/&quot;;return RegExp(exp).test($.trim(s))};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild){this.removeChild(this.firstChild)}}empty.apply(table.tBodies[0])}else{table.tBodies[0].innerHTML=&quot;&quot;}}}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:&quot;text&quot;,is:function(s){return true},format:function(s){return $.trim(s.toLowerCase())},type:&quot;text&quot;});ts.addParser({id:&quot;digit&quot;,is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c)},format:function(s){return $.tablesorter.formatFloat(s)},type:&quot;numeric&quot;});ts.addParser({id:&quot;currency&quot;,is:function(s){return/^[&#194;&#163;$&#226;&#8218;&#172;?.]/.test(s)},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),&quot;&quot;))},type:&quot;numeric&quot;});ts.addParser({id:&quot;ipAddress&quot;,is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s)},format:function(s){var a=s.split(&quot;.&quot;),r=&quot;&quot;,l=a.length;for(var i=0;i&lt;l;i++){var item=a[i];if(item.length==2){r+=&quot;0&quot;+item}else{r+=item}}return $.tablesorter.formatFloat(r)},type:&quot;numeric&quot;});ts.addParser({id:&quot;url&quot;,is:function(s){return/^(https?|ftp|file):\/\/$/.test(s)},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),&quot;&quot;))},type:&quot;text&quot;});ts.addParser({id:&quot;isoDate&quot;,is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s)},format:function(s){return $.tablesorter.formatFloat((s!=&quot;&quot;)?new Date(s.replace(new RegExp(/-/g),&quot;/&quot;)).getTime():&quot;0&quot;)},type:&quot;numeric&quot;});ts.addParser({id:&quot;percent&quot;,is:function(s){return/\%$/.test($.trim(s))},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),&quot;&quot;))},type:&quot;numeric&quot;});ts.addParser({id:&quot;usLongDate&quot;,is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/))},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime())},type:&quot;numeric&quot;});ts.addParser({id:&quot;shortDate&quot;,is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s)},format:function(s,table){var c=table.config;s=s.replace(/\-/g,&quot;/&quot;);if(c.dateFormat==&quot;us&quot;){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,&quot;$3/$1/$2&quot;)}else{if(c.dateFormat==&quot;uk&quot;){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,&quot;$3/$2/$1&quot;)}else{if(c.dateFormat==&quot;dd/mm/yy&quot;||c.dateFormat==&quot;dd-mm-yy&quot;){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,&quot;$1/$2/$3&quot;)}}}return $.tablesorter.formatFloat(new Date(s).getTime())},type:&quot;numeric&quot;});ts.addParser({id:&quot;time&quot;,is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s)},format:function(s){return $.tablesorter.formatFloat(new Date(&quot;2000/01/01 &quot;+s).getTime())},type:&quot;numeric&quot;});ts.addParser({id:&quot;metadata&quot;,is:function(s){return false},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?&quot;sortValue&quot;:c.parserMetadataName;return $(cell).metadata()[p]},type:&quot;numeric&quot;});ts.addWidget({id:&quot;zebra&quot;,format:function(table){if(table.config.debug){var time=new Date()}$(&quot;tr:visible&quot;,table.tBodies[0]).filter(&quot;:even&quot;).removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(&quot;:odd&quot;).removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark(&quot;Applying Zebra widget&quot;,time)}}})})(jQuery);jQuery.ui||(function(p){var j=p.fn.remove,o=p.browser.mozilla&amp;&amp;(parseFloat(p.browser.version)&lt;1.9);p.ui={version:&quot;1.7.1&quot;,plugin:{add:function(c,b,e){var a=p.ui[c].prototype;for(var d in e){a.plugins[d]=a.plugins[d]||[];a.plugins[d].push([b,e[d]])}},call:function(d,b,c){var e=d.plugins[b];if(!e||!d.element[0].parentNode){return}for(var a=0;a&lt;e.length;a++){if(d.options[e[a][0]]){e[a][1].apply(d.element,c)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&amp;16:a!==b&amp;&amp;a.contains(b)},hasScroll:function(a,c){if(p(a).css(&quot;overflow&quot;)==&quot;hidden&quot;){return false}var d=(c&amp;&amp;c==&quot;left&quot;)?&quot;scrollLeft&quot;:&quot;scrollTop&quot;,b=false;if(a[d]&gt;0){return true}a[d]=1;b=(a[d]&gt;0);a[d]=0;return b},isOverAxis:function(b,c,a){return(b&gt;c)&amp;&amp;(b&lt;(c+a))},isOver:function(e,c,f,a,d,b){return p.ui.isOverAxis(e,f,d)&amp;&amp;p.ui.isOverAxis(c,a,b)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,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}};if(o){var m=p.attr,n=p.fn.removeAttr,k=&quot;http://www.w3.org/2005/07/aaa&quot;,r=/^aria-/,q=/^wairole:/;p.attr=function(c,d,b){var a=b!==undefined;return(d==&quot;role&quot;?(a?m.call(this,c,d,&quot;wairole:&quot;+b):(m.apply(this,arguments)||&quot;&quot;).replace(q,&quot;&quot;)):(r.test(d)?(a?c.setAttributeNS(k,d.replace(r,&quot;aaa:&quot;),b):m.call(this,c,d.replace(r,&quot;aaa:&quot;))):m.apply(this,arguments)))};p.fn.removeAttr=function(a){return(r.test(a)?this.each(function(){this.removeAttributeNS(k,a.replace(r,&quot;&quot;))}):n.call(this,a))}}p.fn.extend({remove:function(){p(&quot;*&quot;,this).add(this).each(function(){p(this).triggerHandler(&quot;remove&quot;)});return j.apply(this,arguments)},enableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;off&quot;).css(&quot;MozUserSelect&quot;,&quot;&quot;).unbind(&quot;selectstart.ui&quot;)},disableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;on&quot;).css(&quot;MozUserSelect&quot;,&quot;none&quot;).bind(&quot;selectstart.ui&quot;,function(){return false})},scrollParent:function(){var a;if((p.browser.msie&amp;&amp;(/(static|relative)/).test(this.css(&quot;position&quot;)))||(/absolute/).test(this.css(&quot;position&quot;))){a=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(p.curCSS(this,&quot;position&quot;,1))&amp;&amp;(/(auto|scroll)/).test(p.curCSS(this,&quot;overflow&quot;,1)+p.curCSS(this,&quot;overflow-y&quot;,1)+p.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}else{a=this.parents().filter(function(){return(/(auto|scroll)/).test(p.curCSS(this,&quot;overflow&quot;,1)+p.curCSS(this,&quot;overflow-y&quot;,1)+p.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}return(/fixed/).test(this.css(&quot;position&quot;))||!a.length?p(document):a}});p.extend(p.expr[&quot;:&quot;],{data:function(a,b,c){return !!p.data(a,c[3])},focusable:function(b){var a=b.nodeName.toLowerCase(),c=p.attr(b,&quot;tabindex&quot;);return(/input|select|textarea|button|object/.test(a)?!b.disabled:&quot;a&quot;==a||&quot;area&quot;==a?b.href||!isNaN(c):!isNaN(c))&amp;&amp;!p(b)[&quot;area&quot;==a?&quot;parents&quot;:&quot;closest&quot;](&quot;:hidden&quot;).length},tabbable:function(a){var b=p.attr(a,&quot;tabindex&quot;);return(isNaN(b)||b&gt;=0)&amp;&amp;p(a).is(&quot;:focusable&quot;)}});function l(a,f,e,b){function c(g){var h=p[a][f][g]||[];return(typeof h==&quot;string&quot;?h.split(/,?\s+/):h)}var d=c(&quot;getter&quot;);if(b.length==1&amp;&amp;typeof b[0]==&quot;string&quot;){d=d.concat(c(&quot;getterSetter&quot;))}return(p.inArray(e,d)!=-1)}p.widget=function(b,c){var a=b.split(&quot;.&quot;)[0];b=b.split(&quot;.&quot;)[1];p.fn[b]=function(e){var g=(typeof e==&quot;string&quot;),f=Array.prototype.slice.call(arguments,1);if(g&amp;&amp;e.substring(0,1)==&quot;_&quot;){return this}if(g&amp;&amp;l(a,b,e,f)){var d=p.data(this[0],b);return(d?d[e].apply(d,f):undefined)}return this.each(function(){var h=p.data(this,b);(!h&amp;&amp;!g&amp;&amp;p.data(this,b,new p[a][b](this,e))._init());(h&amp;&amp;g&amp;&amp;p.isFunction(h[e])&amp;&amp;h[e].apply(h,f))})};p[a]=p[a]||{};p[a][b]=function(e,f){var d=this;this.namespace=a;this.widgetName=b;this.widgetEventPrefix=p[a][b].eventPrefix||b;this.widgetBaseClass=a+&quot;-&quot;+b;this.options=p.extend({},p.widget.defaults,p[a][b].defaults,p.metadata&amp;&amp;p.metadata.get(e)[b],f);this.element=p(e).bind(&quot;setData.&quot;+b,function(h,u,g){if(h.target==e){return d._setData(u,g)}}).bind(&quot;getData.&quot;+b,function(g,h){if(g.target==e){return d._getData(h)}}).bind(&quot;remove&quot;,function(){return d.destroy()})};p[a][b].prototype=p.extend({},p.widget.prototype,c);p[a][b].getterSetter=&quot;option&quot;};p.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).removeAttr(&quot;aria-disabled&quot;)},option:function(b,a){var c=b,d=this;if(typeof b==&quot;string&quot;){if(a===undefined){return this._getData(b)}c={};c[b]=a}p.each(c,function(f,e){d._setData(f,e)})},_getData:function(a){return this.options[a]},_setData:function(b,a){this.options[b]=a;if(b==&quot;disabled&quot;){this.element[a?&quot;addClass&quot;:&quot;removeClass&quot;](this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).attr(&quot;aria-disabled&quot;,a)}},enable:function(){this._setData(&quot;disabled&quot;,false)},disable:function(){this._setData(&quot;disabled&quot;,true)},_trigger:function(b,a,g){var e=this.options[b],d=(b==this.widgetEventPrefix?b:this.widgetEventPrefix+b);a=p.Event(a);a.type=d;if(a.originalEvent){for(var c=p.event.props.length,f;c;){f=p.event.props[--c];a[f]=a.originalEvent[f]}}this.element.trigger(a,g);return !(p.isFunction(e)&amp;&amp;e.call(this.element[0],a,g)===false||a.isDefaultPrevented())}};p.widget.defaults={disabled:false};p.ui.mouse={_mouseInit:function(){var a=this;this.element.bind(&quot;mousedown.&quot;+this.widgetName,function(b){return a._mouseDown(b)}).bind(&quot;click.&quot;+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});if(p.browser.msie){this._mouseUnselectable=this.element.attr(&quot;unselectable&quot;);this.element.attr(&quot;unselectable&quot;,&quot;on&quot;)}this.started=false},_mouseDestroy:function(){this.element.unbind(&quot;.&quot;+this.widgetName);(p.browser.msie&amp;&amp;this.element.attr(&quot;unselectable&quot;,this._mouseUnselectable))},_mouseDown:function(b){b.originalEvent=b.originalEvent||{};if(b.originalEvent.mouseHandled){return}(this._mouseStarted&amp;&amp;this._mouseUp(b));this._mouseDownEvent=b;var c=this,a=(b.which==1),d=(typeof this.options.cancel==&quot;string&quot;?p(b.target).parents().add(b.target).filter(this.options.cancel).length:false);if(!a||d||!this._mouseCapture(b)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(b)&amp;&amp;this._mouseDelayMet(b)){this._mouseStarted=(this._mouseStart(b)!==false);if(!this._mouseStarted){b.preventDefault();return true}}this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};p(document).bind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).bind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);(p.browser.safari||b.preventDefault());b.originalEvent.mouseHandled=true;return true},_mouseMove:function(a){if(p.browser.msie&amp;&amp;!a.button){return this._mouseUp(a)}if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&amp;&amp;this._mouseDelayMet(a)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,a)!==false);(this._mouseStarted?this._mouseDrag(a):this._mouseUp(a))}return !this._mouseStarted},_mouseUp:function(a){p(document).unbind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).unbind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(a.target==this._mouseDownEvent.target);this._mouseStop(a)}return false},_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 true}};p.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(b){b.widget(&quot;ui.draggable&quot;,b.extend({},b.ui.mouse,{_init:function(){if(this.options.helper==&quot;original&quot;&amp;&amp;!(/^(?:r|a|f)/).test(this.element.css(&quot;position&quot;))){this.element[0].style.position=&quot;relative&quot;}(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-draggable&quot;));(this.options.disabled&amp;&amp;this.element.addClass(&quot;ui-draggable-disabled&quot;));this._mouseInit()},destroy:function(){if(!this.element.data(&quot;draggable&quot;)){return}this.element.removeData(&quot;draggable&quot;).unbind(&quot;.draggable&quot;).removeClass(&quot;ui-draggable ui-draggable-dragging ui-draggable-disabled&quot;);this._mouseDestroy()},_mouseCapture:function(a){var d=this.options;if(this.helper||d.disabled||b(a.target).is(&quot;.ui-resizable-handle&quot;)){return false}this.handle=this._getHandle(a);if(!this.handle){return false}return true},_mouseStart:function(a){var d=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(b.ui.ddmanager){b.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css(&quot;position&quot;);this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};b.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;if(d.cursorAt){this._adjustOffsetFromHelper(d.cursorAt)}if(d.containment){this._setContainment()}this._trigger(&quot;start&quot;,a);this._cacheHelperProportions();if(b.ui.ddmanager&amp;&amp;!d.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,a)}this.helper.addClass(&quot;ui-draggable-dragging&quot;);this._mouseDrag(a,true);return true},_mouseDrag:function(a,e){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!e){var f=this._uiHash();this._trigger(&quot;drag&quot;,a,f);this.position=f.position}if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}if(b.ui.ddmanager){b.ui.ddmanager.drag(this,a)}return false},_mouseStop:function(f){var e=false;if(b.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){e=b.ui.ddmanager.drop(this,f)}if(this.dropped){e=this.dropped;this.dropped=false}if((this.options.revert==&quot;invalid&quot;&amp;&amp;!e)||(this.options.revert==&quot;valid&quot;&amp;&amp;e)||this.options.revert===true||(b.isFunction(this.options.revert)&amp;&amp;this.options.revert.call(this.element,e))){var a=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){a._trigger(&quot;stop&quot;,f);a._clear()})}else{this._trigger(&quot;stop&quot;,f);this._clear()}return false},_getHandle:function(a){var d=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find(&quot;*&quot;).andSelf().each(function(){if(this==a.target){d=true}});return d},_createHelper:function(f){var e=this.options;var a=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f])):(e.helper==&quot;clone&quot;?this.element.clone():this.element);if(!a.parents(&quot;body&quot;).length){a.appendTo((e.appendTo==&quot;parent&quot;?this.element[0].parentNode:e.appendTo))}if(a[0]!=this.element[0]&amp;&amp;!(/(fixed|absolute)/).test(a.css(&quot;position&quot;))){a.css(&quot;position&quot;,&quot;absolute&quot;)}return a},_adjustOffsetFromHelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;b.browser.msie)){a={top:0,left:0}}return{top:a.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:a.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.element.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment==&quot;parent&quot;){f.containment=this.helper[0].parentNode}if(f.containment==&quot;document&quot;||f.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(b(f.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)&amp;&amp;f.containment.constructor!=Array){var h=b(f.containment)[0];if(!h){return}var g=b(f.containment).offset();var a=(b(h).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[g.left+(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,g.top+(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,g.left+(a?Math.max(h.scrollWidth,h.offsetWidth):h.offsetWidth)-(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,g.top+(a?Math.max(h.scrollHeight,h.offsetHeight):h.offsetHeight)-(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}else{if(f.containment.constructor==Array){this.containment=f.containment}}},_convertPositionTo:function(k,d){if(!d){d=this.position}var m=k==&quot;absolute&quot;?1:-1;var l=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);return{top:(d.top+this.offset.relative.top*m+this.offset.parent.top*m-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop()))*m)),left:(d.left+this.offset.relative.left*m+this.offset.parent.left*m-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())*m))}},_generatePosition:function(n){var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var o=n.pageX;var p=n.pageY;if(this.originalPosition){if(this.containment){if(n.pageX-this.offset.click.left&lt;this.containment[0]){o=this.containment[0]+this.offset.click.left}if(n.pageY-this.offset.click.top&lt;this.containment[1]){p=this.containment[1]+this.offset.click.top}if(n.pageX-this.offset.click.left&gt;this.containment[2]){o=this.containment[2]+this.offset.click.left}if(n.pageY-this.offset.click.top&gt;this.containment[3]){p=this.containment[3]+this.offset.click.top}}if(k.grid){var l=this.originalPageY+Math.round((p-this.originalPageY)/k.grid[1])*k.grid[1];p=this.containment?(!(l-this.offset.click.top&lt;this.containment[1]||l-this.offset.click.top&gt;this.containment[3])?l:(!(l-this.offset.click.top&lt;this.containment[1])?l-k.grid[1]:l+k.grid[1])):l;var m=this.originalPageX+Math.round((o-this.originalPageX)/k.grid[0])*k.grid[0];o=this.containment?(!(m-this.offset.click.left&lt;this.containment[0]||m-this.offset.click.left&gt;this.containment[2])?m:(!(m-this.offset.click.left&lt;this.containment[0])?m-k.grid[0]:m+k.grid[0])):m}}return{top:(p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop())))),left:(o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())))}},_clear:function(){this.helper.removeClass(&quot;ui-draggable-dragging&quot;);if(this.helper[0]!=this.element[0]&amp;&amp;!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,f,e){e=e||this._uiHash();b.ui.plugin.call(this,a,[f,e]);if(a==&quot;drag&quot;){this.positionAbs=this._convertPositionTo(&quot;absolute&quot;)}return b.widget.prototype._trigger.call(this,a,f,e)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));b.extend(b.ui.draggable,{version:&quot;1.7.1&quot;,eventPrefix:&quot;drag&quot;,defaults:{addClasses:true,appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectToSortable:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:&quot;original&quot;,iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:&quot;default&quot;,scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:&quot;both&quot;,snapTolerance:20,stack:false,zIndex:false}});b.ui.plugin.add(&quot;draggable&quot;,&quot;connectToSortable&quot;,{start:function(k,h){var j=b(this).data(&quot;draggable&quot;),g=j.options,a=b.extend({},h,{item:j.element});j.sortables=[];b(g.connectToSortable).each(function(){var c=b.data(this,&quot;sortable&quot;);if(c&amp;&amp;!c.options.disabled){j.sortables.push({instance:c,shouldRevert:c.options.revert});c._refreshItems();c._trigger(&quot;activate&quot;,k,a)}})},stop:function(h,f){var g=b(this).data(&quot;draggable&quot;),a=b.extend({},f,{item:g.element});b.each(g.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;g.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(h);this.instance.options.helper=this.instance.options._helper;if(g.options.helper==&quot;original&quot;){this.instance.currentItem.css({top:&quot;auto&quot;,left:&quot;auto&quot;})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger(&quot;deactivate&quot;,h,a)}})},drag:function(k,g){var h=b(this).data(&quot;draggable&quot;),a=this;var j=function(r){var d=this.offset.click.top,e=this.offset.click.left;var v=this.positionAbs.top,o=this.positionAbs.left;var q=r.height,f=r.width;var c=r.top,u=r.left;return b.ui.isOver(v+d,o+e,c,u,q,f)};b.each(h.sortables,function(c){this.instance.positionAbs=h.positionAbs;this.instance.helperProportions=h.helperProportions;this.instance.offset.click=h.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=b(a).clone().appendTo(this.instance.element).data(&quot;sortable-item&quot;,true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return g.helper[0]};k.target=this.instance.currentItem[0];this.instance._mouseCapture(k,true);this.instance._mouseStart(k,true,true);this.instance.offset.click.top=h.offset.click.top;this.instance.offset.click.left=h.offset.click.left;this.instance.offset.parent.left-=h.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=h.offset.parent.top-this.instance.offset.parent.top;h._trigger(&quot;toSortable&quot;,k);h.dropped=this.instance.element;h.currentItem=h.element;this.instance.fromOutside=h}if(this.instance.currentItem){this.instance._mouseDrag(k)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger(&quot;out&quot;,k,this.instance._uiHash(this.instance));this.instance._mouseStop(k,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}h._trigger(&quot;fromSortable&quot;,k);h.dropped=false}}})}});b.ui.plugin.add(&quot;draggable&quot;,&quot;cursor&quot;,{start:function(h,g){var a=b(&quot;body&quot;),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;cursor&quot;)){f._cursor=a.css(&quot;cursor&quot;)}a.css(&quot;cursor&quot;,f.cursor)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._cursor){b(&quot;body&quot;).css(&quot;cursor&quot;,e._cursor)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;iframeFix&quot;,{start:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;b(e.iframeFix===true?&quot;iframe&quot;:e.iframeFix).each(function(){b('&lt;div class=&quot;ui-draggable-iframeFix&quot; style=&quot;background: #fff;&quot;&gt;&lt;/div&gt;').css({width:this.offsetWidth+&quot;px&quot;,height:this.offsetHeight+&quot;px&quot;,position:&quot;absolute&quot;,opacity:&quot;0.001&quot;,zIndex:1000}).css(b(this).offset()).appendTo(&quot;body&quot;)})},stop:function(a,d){b(&quot;div.ui-draggable-iframeFix&quot;).each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add(&quot;draggable&quot;,&quot;opacity&quot;,{start:function(h,g){var a=b(g.helper),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;opacity&quot;)){f._opacity=a.css(&quot;opacity&quot;)}a.css(&quot;opacity&quot;,f.opacity)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._opacity){b(f.helper).css(&quot;opacity&quot;,e._opacity)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;scroll&quot;,{start:function(f,e){var a=b(this).data(&quot;draggable&quot;);if(a.scrollParent[0]!=document&amp;&amp;a.scrollParent[0].tagName!=&quot;HTML&quot;){a.overflowOffset=a.scrollParent.offset()}},drag:function(j,h){var k=b(this).data(&quot;draggable&quot;),g=k.options,a=false;if(k.scrollParent[0]!=document&amp;&amp;k.scrollParent[0].tagName!=&quot;HTML&quot;){if(!g.axis||g.axis!=&quot;x&quot;){if((k.overflowOffset.top+k.scrollParent[0].offsetHeight)-j.pageY&lt;g.scrollSensitivity){k.scrollParent[0].scrollTop=a=k.scrollParent[0].scrollTop+g.scrollSpeed}else{if(j.pageY-k.overflowOffset.top&lt;g.scrollSensitivity){k.scrollParent[0].scrollTop=a=k.scrollParent[0].scrollTop-g.scrollSpeed}}}if(!g.axis||g.axis!=&quot;y&quot;){if((k.overflowOffset.left+k.scrollParent[0].offsetWidth)-j.pageX&lt;g.scrollSensitivity){k.scrollParent[0].scrollLeft=a=k.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(j.pageX-k.overflowOffset.left&lt;g.scrollSensitivity){k.scrollParent[0].scrollLeft=a=k.scrollParent[0].scrollLeft-g.scrollSpeed}}}}else{if(!g.axis||g.axis!=&quot;x&quot;){if(j.pageY-b(document).scrollTop()&lt;g.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()-g.scrollSpeed)}else{if(b(window).height()-(j.pageY-b(document).scrollTop())&lt;g.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()+g.scrollSpeed)}}}if(!g.axis||g.axis!=&quot;y&quot;){if(j.pageX-b(document).scrollLeft()&lt;g.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()-g.scrollSpeed)}else{if(b(window).width()-(j.pageX-b(document).scrollLeft())&lt;g.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()+g.scrollSpeed)}}}}if(a!==false&amp;&amp;b.ui.ddmanager&amp;&amp;!g.dropBehaviour){b.ui.ddmanager.prepareOffsets(k,j)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;snap&quot;,{start:function(h,g){var a=b(this).data(&quot;draggable&quot;),f=a.options;a.snapElements=[];b(f.snap.constructor!=String?(f.snap.items||&quot;:data(draggable)&quot;):f.snap).each(function(){var c=b(this);var d=c.offset();if(this!=a.element[0]){a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:d.top,left:d.left})}})},drag:function(B,F){var L=b(this).data(&quot;draggable&quot;),D=L.options;var d=D.snapTolerance;var l=F.offset.left,o=l+L.helperProportions.width,M=F.offset.top,N=M+L.helperProportions.height;for(var r=L.snapElements.length-1;r&gt;=0;r--){var C=L.snapElements[r].left,G=C+L.snapElements[r].width,H=L.snapElements[r].top,E=H+L.snapElements[r].height;if(!((C-d&lt;l&amp;&amp;l&lt;G+d&amp;&amp;H-d&lt;M&amp;&amp;M&lt;E+d)||(C-d&lt;l&amp;&amp;l&lt;G+d&amp;&amp;H-d&lt;N&amp;&amp;N&lt;E+d)||(C-d&lt;o&amp;&amp;o&lt;G+d&amp;&amp;H-d&lt;M&amp;&amp;M&lt;E+d)||(C-d&lt;o&amp;&amp;o&lt;G+d&amp;&amp;H-d&lt;N&amp;&amp;N&lt;E+d))){if(L.snapElements[r].snapping){(L.options.snap.release&amp;&amp;L.options.snap.release.call(L.element,B,b.extend(L._uiHash(),{snapItem:L.snapElements[r].item})))}L.snapElements[r].snapping=false;continue}if(D.snapMode!=&quot;inner&quot;){var O=Math.abs(H-N)&lt;=d;var a=Math.abs(E-M)&lt;=d;var J=Math.abs(C-o)&lt;=d;var I=Math.abs(G-l)&lt;=d;if(O){F.position.top=L._convertPositionTo(&quot;relative&quot;,{top:H-L.helperProportions.height,left:0}).top-L.margins.top}if(a){F.position.top=L._convertPositionTo(&quot;relative&quot;,{top:E,left:0}).top-L.margins.top}if(J){F.position.left=L._convertPositionTo(&quot;relative&quot;,{top:0,left:C-L.helperProportions.width}).left-L.margins.left}if(I){F.position.left=L._convertPositionTo(&quot;relative&quot;,{top:0,left:G}).left-L.margins.left}}var K=(O||a||J||I);if(D.snapMode!=&quot;outer&quot;){var O=Math.abs(H-M)&lt;=d;var a=Math.abs(E-N)&lt;=d;var J=Math.abs(C-l)&lt;=d;var I=Math.abs(G-o)&lt;=d;if(O){F.position.top=L._convertPositionTo(&quot;relative&quot;,{top:H,left:0}).top-L.margins.top}if(a){F.position.top=L._convertPositionTo(&quot;relative&quot;,{top:E-L.helperProportions.height,left:0}).top-L.margins.top}if(J){F.position.left=L._convertPositionTo(&quot;relative&quot;,{top:0,left:C}).left-L.margins.left}if(I){F.position.left=L._convertPositionTo(&quot;relative&quot;,{top:0,left:G-L.helperProportions.width}).left-L.margins.left}}if(!L.snapElements[r].snapping&amp;&amp;(O||a||J||I||K)){(L.options.snap.snap&amp;&amp;L.options.snap.snap.call(L.element,B,b.extend(L._uiHash(),{snapItem:L.snapElements[r].item})))}L.snapElements[r].snapping=(O||a||J||I||K)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;stack&quot;,{start:function(a,h){var f=b(this).data(&quot;draggable&quot;).options;var g=b.makeArray(b(f.stack.group)).sort(function(c,d){return(parseInt(b(c).css(&quot;zIndex&quot;),10)||f.stack.min)-(parseInt(b(d).css(&quot;zIndex&quot;),10)||f.stack.min)});b(g).each(function(c){this.style.zIndex=f.stack.min+c});this[0].style.zIndex=f.stack.min+g.length}});b.ui.plugin.add(&quot;draggable&quot;,&quot;zIndex&quot;,{start:function(h,g){var a=b(g.helper),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;zIndex&quot;)){f._zIndex=a.css(&quot;zIndex&quot;)}a.css(&quot;zIndex&quot;,f.zIndex)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._zIndex){b(f.helper).css(&quot;zIndex&quot;,e._zIndex)}}})})(jQuery);(function(b){b.widget(&quot;ui.droppable&quot;,{_init:function(){var d=this.options,a=d.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&amp;&amp;b.isFunction(this.options.accept)?this.options.accept:function(c){return c.is(a)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};b.ui.ddmanager.droppables[this.options.scope]=b.ui.ddmanager.droppables[this.options.scope]||[];b.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-droppable&quot;))},destroy:function(){var a=b.ui.ddmanager.droppables[this.options.scope];for(var d=0;d&lt;a.length;d++){if(a[d]==this){a.splice(d,1)}}this.element.removeClass(&quot;ui-droppable ui-droppable-disabled&quot;).removeData(&quot;droppable&quot;).unbind(&quot;.droppable&quot;)},_setData:function(a,d){if(a==&quot;accept&quot;){this.options.accept=d&amp;&amp;b.isFunction(d)?d:function(c){return c.is(d)}}else{b.widget.prototype._setData.apply(this,arguments)}},_activate:function(d){var a=b.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(a&amp;&amp;this._trigger(&quot;activate&quot;,d,this.ui(a)))},_deactivate:function(d){var a=b.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(a&amp;&amp;this._trigger(&quot;deactivate&quot;,d,this.ui(a)))},_over:function(d){var a=b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger(&quot;over&quot;,d,this.ui(a))}},_out:function(d){var a=b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;out&quot;,d,this.ui(a))}},_drop:function(h,g){var a=g||b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return false}var f=false;this.element.find(&quot;:data(droppable)&quot;).not(&quot;.ui-draggable-dragging&quot;).each(function(){var c=b.data(this,&quot;droppable&quot;);if(c.options.greedy&amp;&amp;b.ui.intersect(a,b.extend(c,{offset:c.element.offset()}),c.options.tolerance)){f=true;return false}});if(f){return false}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;drop&quot;,h,this.ui(a));return this.element}return false},ui:function(a){return{draggable:(a.currentItem||a.element),helper:a.helper,position:a.position,absolutePosition:a.positionAbs,offset:a.positionAbs}}});b.extend(b.ui.droppable,{version:&quot;1.7.1&quot;,eventPrefix:&quot;drop&quot;,defaults:{accept:&quot;*&quot;,activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;}});b.ui.intersect=function(a,x,r){if(!x.offset){return false}var C=(a.positionAbs||a.position.absolute).left,D=C+a.helperProportions.width,u=(a.positionAbs||a.position.absolute).top,v=u+a.helperProportions.height;var A=x.offset.left,E=A+x.proportions.width,l=x.offset.top,w=l+x.proportions.height;switch(r){case&quot;fit&quot;:return(A&lt;C&amp;&amp;D&lt;E&amp;&amp;l&lt;u&amp;&amp;v&lt;w);break;case&quot;intersect&quot;:return(A&lt;C+(a.helperProportions.width/2)&amp;&amp;D-(a.helperProportions.width/2)&lt;E&amp;&amp;l&lt;u+(a.helperProportions.height/2)&amp;&amp;v-(a.helperProportions.height/2)&lt;w);break;case&quot;pointer&quot;:var z=((a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left),y=((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top),B=b.ui.isOver(y,z,l,A,x.proportions.height,x.proportions.width);return B;break;case&quot;touch&quot;:return((u&gt;=l&amp;&amp;u&lt;=w)||(v&gt;=l&amp;&amp;v&lt;=w)||(u&lt;l&amp;&amp;v&gt;w))&amp;&amp;((C&gt;=A&amp;&amp;C&lt;=E)||(D&gt;=A&amp;&amp;D&lt;=E)||(C&lt;A&amp;&amp;D&gt;E));break;default:return false;break}};b.ui.ddmanager={current:null,droppables:{&quot;default&quot;:[]},prepareOffsets:function(m,k){var a=b.ui.ddmanager.droppables[m.options.scope];var l=k?k.type:null;var j=(m.currentItem||m.element).find(&quot;:data(droppable)&quot;).andSelf();droppablesLoop:for(var n=0;n&lt;a.length;n++){if(a[n].options.disabled||(m&amp;&amp;!a[n].options.accept.call(a[n].element[0],(m.currentItem||m.element)))){continue}for(var o=0;o&lt;j.length;o++){if(j[o]==a[n].element[0]){a[n].proportions.height=0;continue droppablesLoop}}a[n].visible=a[n].element.css(&quot;display&quot;)!=&quot;none&quot;;if(!a[n].visible){continue}a[n].offset=a[n].element.offset();a[n].proportions={width:a[n].element[0].offsetWidth,height:a[n].element[0].offsetHeight};if(l==&quot;mousedown&quot;){a[n]._activate.call(a[n],k)}}},drop:function(a,f){var e=false;b.each(b.ui.ddmanager.droppables[a.options.scope],function(){if(!this.options){return}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;b.ui.intersect(a,this,this.options.tolerance)){e=this._drop.call(this,f)}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;this.options.accept.call(this.element[0],(a.currentItem||a.element))){this.isout=1;this.isover=0;this._deactivate.call(this,f)}});return e},drag:function(a,d){if(a.options.refreshPositions){b.ui.ddmanager.prepareOffsets(a,d)}b.each(b.ui.ddmanager.droppables[a.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var j=b.ui.intersect(a,this,this.options.tolerance);var c=!j&amp;&amp;this.isover==1?&quot;isout&quot;:(j&amp;&amp;this.isover==0?&quot;isover&quot;:null);if(!c){return}var h;if(this.options.greedy){var k=this.element.parents(&quot;:data(droppable):eq(0)&quot;);if(k.length){h=b.data(k[0],&quot;droppable&quot;);h.greedyChild=(c==&quot;isover&quot;?1:0)}}if(h&amp;&amp;c==&quot;isover&quot;){h.isover=0;h.isout=1;h._out.call(h,d)}this[c]=1;this[c==&quot;isout&quot;?&quot;isover&quot;:&quot;isout&quot;]=0;this[c==&quot;isover&quot;?&quot;_over&quot;:&quot;_out&quot;].call(this,d);if(h&amp;&amp;c==&quot;isout&quot;){h.isout=0;h.isover=1;h._over.call(h,d)}})}}})(jQuery);(function(f){f.widget(&quot;ui.resizable&quot;,f.extend({},f.ui.mouse,{_init:function(){var n=this,b=this.options;this.element.addClass(&quot;ui-resizable&quot;);f.extend(this,{_aspectRatio:!!(b.aspectRatio),aspectRatio:b.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:b.helper||b.ghost||b.animate?b.helper||&quot;ui-resizable-helper&quot;:null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css(&quot;position&quot;))&amp;&amp;f.browser.opera){this.element.css({position:&quot;relative&quot;,top:&quot;auto&quot;,left:&quot;auto&quot;})}this.element.wrap(f('&lt;div class=&quot;ui-wrapper&quot; style=&quot;overflow: hidden;&quot;&gt;&lt;/div&gt;').css({position:this.element.css(&quot;position&quot;),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css(&quot;top&quot;),left:this.element.css(&quot;left&quot;)}));this.element=this.element.parent().data(&quot;resizable&quot;,this.element.data(&quot;resizable&quot;));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css(&quot;marginLeft&quot;),marginTop:this.originalElement.css(&quot;marginTop&quot;),marginRight:this.originalElement.css(&quot;marginRight&quot;),marginBottom:this.originalElement.css(&quot;marginBottom&quot;)});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css(&quot;resize&quot;);this.originalElement.css(&quot;resize&quot;,&quot;none&quot;);this._proportionallyResizeElements.push(this.originalElement.css({position:&quot;static&quot;,zoom:1,display:&quot;block&quot;}));this.originalElement.css({margin:this.originalElement.css(&quot;margin&quot;)});this._proportionallyResize()}this.handles=b.handles||(!f(&quot;.ui-resizable-handle&quot;,this.element).length?&quot;e,s,se&quot;:{n:&quot;.ui-resizable-n&quot;,e:&quot;.ui-resizable-e&quot;,s:&quot;.ui-resizable-s&quot;,w:&quot;.ui-resizable-w&quot;,se:&quot;.ui-resizable-se&quot;,sw:&quot;.ui-resizable-sw&quot;,ne:&quot;.ui-resizable-ne&quot;,nw:&quot;.ui-resizable-nw&quot;});if(this.handles.constructor==String){if(this.handles==&quot;all&quot;){this.handles=&quot;n,e,s,w,se,sw,ne,nw&quot;}var a=this.handles.split(&quot;,&quot;);this.handles={};for(var m=0;m&lt;a.length;m++){var c=f.trim(a[m]),o=&quot;ui-resizable-&quot;+c;var l=f('&lt;div class=&quot;ui-resizable-handle '+o+'&quot;&gt;&lt;/div&gt;');if(/sw|se|ne|nw/.test(c)){l.css({zIndex:++b.zIndex})}if(&quot;se&quot;==c){l.addClass(&quot;ui-icon ui-icon-gripsmall-diagonal-se&quot;)}this.handles[c]=&quot;.ui-resizable-&quot;+c;this.element.append(l)}}this._renderAxis=function(j){j=j||this.element;for(var g in this.handles){if(this.handles[g].constructor==String){this.handles[g]=f(this.handles[g],this.element).show()}if(this.elementIsWrapper&amp;&amp;this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var q=f(this.handles[g],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(g)?q.outerHeight():q.outerWidth();var h=[&quot;padding&quot;,/ne|nw|n/.test(g)?&quot;Top&quot;:/se|sw|s/.test(g)?&quot;Bottom&quot;:/^e$/.test(g)?&quot;Right&quot;:&quot;Left&quot;].join(&quot;&quot;);j.css(h,k);this._proportionallyResize()}if(!f(this.handles[g]).length){continue}}};this._renderAxis(this.element);this._handles=f(&quot;.ui-resizable-handle&quot;,this.element).disableSelection();this._handles.mouseover(function(){if(!n.resizing){if(this.className){var g=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}n.axis=g&amp;&amp;g[1]?g[1]:&quot;se&quot;}});if(b.autoHide){this._handles.hide();f(this.element).addClass(&quot;ui-resizable-autohide&quot;).hover(function(){f(this).removeClass(&quot;ui-resizable-autohide&quot;);n._handles.show()},function(){if(!n.resizing){f(this).addClass(&quot;ui-resizable-autohide&quot;);n._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){f(c).removeClass(&quot;ui-resizable ui-resizable-disabled ui-resizable-resizing&quot;).removeData(&quot;resizable&quot;).unbind(&quot;.resizable&quot;).find(&quot;.ui-resizable-handle&quot;).remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.parent().append(this.originalElement.css({position:a.css(&quot;position&quot;),width:a.outerWidth(),height:a.outerHeight(),top:a.css(&quot;top&quot;),left:a.css(&quot;left&quot;)})).end().remove()}this.originalElement.css(&quot;resize&quot;,this.originalResizeStyle);b(this.originalElement)},_mouseCapture:function(b){var a=false;for(var c in this.handles){if(f(this.handles[c])[0]==b.target){a=true}}return this.options.disabled||!!a},_mouseStart:function(l){var b=this.options,m=this.element.position(),n=this.element;this.resizing=true;this.documentScroll={top:f(document).scrollTop(),left:f(document).scrollLeft()};if(n.is(&quot;.ui-draggable&quot;)||(/absolute/).test(n.css(&quot;position&quot;))){n.css({position:&quot;absolute&quot;,top:m.top,left:m.left})}if(f.browser.opera&amp;&amp;(/relative/).test(n.css(&quot;position&quot;))){n.css({position:&quot;relative&quot;,top:&quot;auto&quot;,left:&quot;auto&quot;})}this._renderProxy();var a=d(this.helper.css(&quot;left&quot;)),k=d(this.helper.css(&quot;top&quot;));if(b.containment){a+=f(b.containment).scrollLeft()||0;k+=f(b.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:a,top:k};this.size=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()};this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()};this.originalPosition={left:a,top:k};this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()};this.originalMousePosition={left:l.pageX,top:l.pageY};this.aspectRatio=(typeof b.aspectRatio==&quot;number&quot;)?b.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var c=f(&quot;.ui-resizable-&quot;+this.axis).css(&quot;cursor&quot;);f(&quot;body&quot;).css(&quot;cursor&quot;,c==&quot;auto&quot;?this.axis+&quot;-resize&quot;:c);n.addClass(&quot;ui-resizable-resizing&quot;);this._propagate(&quot;start&quot;,l);return true},_mouseDrag:function(B){var y=this.helper,z=this.options,r={},b=this,w=this.originalMousePosition,o=this.axis;var a=(B.pageX-w.left)||0,c=(B.pageY-w.top)||0;var x=this._change[o];if(!x){return false}var u=x.apply(this,[B,a,c]),v=f.browser.msie&amp;&amp;f.browser.version&lt;7,A=this.sizeDiff;if(this._aspectRatio||B.shiftKey){u=this._updateRatio(u,B)}u=this._respectSize(u,B);this._propagate(&quot;resize&quot;,B);y.css({top:this.position.top+&quot;px&quot;,left:this.position.left+&quot;px&quot;,width:this.size.width+&quot;px&quot;,height:this.size.height+&quot;px&quot;});if(!this._helper&amp;&amp;this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(u);this._trigger(&quot;resize&quot;,B,this.ui());return false},_mouseStop:function(q){this.resizing=false;var p=this.options,b=this;if(this._helper){var r=this._proportionallyResizeElements,v=r.length&amp;&amp;(/textarea/i).test(r[0].nodeName),u=v&amp;&amp;f.ui.hasScroll(r[0],&quot;left&quot;)?0:b.sizeDiff.height,n=v?0:b.sizeDiff.width;var a={width:(b.size.width-n),height:(b.size.height-u)},o=(parseInt(b.element.css(&quot;left&quot;),10)+(b.position.left-b.originalPosition.left))||null,c=(parseInt(b.element.css(&quot;top&quot;),10)+(b.position.top-b.originalPosition.top))||null;if(!p.animate){this.element.css(f.extend(a,{top:c,left:o}))}b.helper.height(b.size.height);b.helper.width(b.size.width);if(this._helper&amp;&amp;!p.animate){this._proportionallyResize()}}f(&quot;body&quot;).css(&quot;cursor&quot;,&quot;auto&quot;);this.element.removeClass(&quot;ui-resizable-resizing&quot;);this._propagate(&quot;stop&quot;,q);if(this._helper){this.helper.remove()}return false},_updateCache:function(b){var a=this.options;this.offset=this.helper.offset();if(e(b.left)){this.position.left=b.left}if(e(b.top)){this.position.top=b.top}if(e(b.height)){this.size.height=b.height}if(e(b.width)){this.size.width=b.width}},_updateRatio:function(c,j){var b=this.options,a=this.position,k=this.size,l=this.axis;if(c.height){c.width=(k.height*this.aspectRatio)}else{if(c.width){c.height=(k.width/this.aspectRatio)}}if(l==&quot;sw&quot;){c.left=a.left+(k.width-c.width);c.top=null}if(l==&quot;nw&quot;){c.top=a.top+(k.height-c.height);c.left=a.left+(k.width-c.width)}return c},_respectSize:function(w,B){var y=this.helper,z=this.options,b=this._aspectRatio||B.shiftKey,c=this.axis,E=e(w.width)&amp;&amp;z.maxWidth&amp;&amp;(z.maxWidth&lt;w.width),v=e(w.height)&amp;&amp;z.maxHeight&amp;&amp;(z.maxHeight&lt;w.height),A=e(w.width)&amp;&amp;z.minWidth&amp;&amp;(z.minWidth&gt;w.width),a=e(w.height)&amp;&amp;z.minHeight&amp;&amp;(z.minHeight&gt;w.height);if(A){w.width=z.minWidth}if(a){w.height=z.minHeight}if(E){w.width=z.maxWidth}if(v){w.height=z.maxHeight}var C=this.originalPosition.left+this.originalSize.width,o=this.position.top+this.size.height;var x=/sw|nw|w/.test(c),D=/nw|ne|n/.test(c);if(A&amp;&amp;x){w.left=C-z.minWidth}if(E&amp;&amp;x){w.left=C-z.maxWidth}if(a&amp;&amp;D){w.top=o-z.minHeight}if(v&amp;&amp;D){w.top=o-z.maxHeight}var u=!w.width&amp;&amp;!w.height;if(u&amp;&amp;!w.left&amp;&amp;w.top){w.top=null}else{if(u&amp;&amp;!w.top&amp;&amp;w.left){w.left=null}}return w},_proportionallyResize:function(){var a=this.options;if(!this._proportionallyResizeElements.length){return}var k=this.helper||this.element;for(var l=0;l&lt;this._proportionallyResizeElements.length;l++){var c=this._proportionallyResizeElements[l];if(!this.borderDif){var m=[c.css(&quot;borderTopWidth&quot;),c.css(&quot;borderRightWidth&quot;),c.css(&quot;borderBottomWidth&quot;),c.css(&quot;borderLeftWidth&quot;)],b=[c.css(&quot;paddingTop&quot;),c.css(&quot;paddingRight&quot;),c.css(&quot;paddingBottom&quot;),c.css(&quot;paddingLeft&quot;)];this.borderDif=f.map(m,function(j,g){var h=parseInt(j,10)||0,o=parseInt(b[g],10)||0;return h+o})}if(f.browser.msie&amp;&amp;!(!(f(k).is(&quot;:hidden&quot;)||f(k).parents(&quot;:hidden&quot;).length))){continue}c.css({height:(k.height()-this.borderDif[0]-this.borderDif[2])||0,width:(k.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var j=this.element,a=this.options;this.elementOffset=j.offset();if(this._helper){this.helper=this.helper||f('&lt;div style=&quot;overflow:hidden;&quot;&gt;&lt;/div&gt;');var k=f.browser.msie&amp;&amp;f.browser.version&lt;7,c=(k?1:0),b=(k?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+b,height:this.element.outerHeight()+b,position:&quot;absolute&quot;,left:this.elementOffset.left-c+&quot;px&quot;,top:this.elementOffset.top-c+&quot;px&quot;,zIndex:++a.zIndex});this.helper.appendTo(&quot;body&quot;).disableSelection()}else{this.helper=this.element}},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(c,k,l){var a=this.options,j=this.originalSize,b=this.originalPosition;return{left:b.left+k,width:j.width-k}},n:function(c,k,l){var a=this.options,j=this.originalSize,b=this.originalPosition;return{top:b.top+l,height:j.height-l}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(a,b,c){return f.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[a,b,c]))},sw:function(a,b,c){return f.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[a,b,c]))},ne:function(a,b,c){return f.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[a,b,c]))},nw:function(a,b,c){return f.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,b,c]))}},_propagate:function(a,b){f.ui.plugin.call(this,a,[b,this.ui()]);(a!=&quot;resize&quot;&amp;&amp;this._trigger(a,b,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}}}));f.extend(f.ui.resizable,{version:&quot;1.7.1&quot;,eventPrefix:&quot;resize&quot;,defaults:{alsoResize:false,animate:false,animateDuration:&quot;slow&quot;,animateEasing:&quot;swing&quot;,aspectRatio:false,autoHide:false,cancel:&quot;:input,option&quot;,containment:false,delay:0,distance:1,ghost:false,grid:false,handles:&quot;e,s,se&quot;,helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});f.ui.plugin.add(&quot;resizable&quot;,&quot;alsoResize&quot;,{start:function(c,b){var h=f(this).data(&quot;resizable&quot;),a=h.options;_store=function(g){f(g).each(function(){f(this).data(&quot;resizable-alsoresize&quot;,{width:parseInt(f(this).width(),10),height:parseInt(f(this).height(),10),left:parseInt(f(this).css(&quot;left&quot;),10),top:parseInt(f(this).css(&quot;top&quot;),10)})})};if(typeof(a.alsoResize)==&quot;object&quot;&amp;&amp;!a.alsoResize.parentNode){if(a.alsoResize.length){a.alsoResize=a.alsoResize[0];_store(a.alsoResize)}else{f.each(a.alsoResize,function(j,g){_store(j)})}}else{_store(a.alsoResize)}},resize:function(n,l){var o=f(this).data(&quot;resizable&quot;),c=o.options,m=o.originalSize,a=o.originalPosition;var b={height:(o.size.height-m.height)||0,width:(o.size.width-m.width)||0,top:(o.position.top-a.top)||0,left:(o.position.left-a.left)||0},p=function(h,g){f(h).each(function(){var k=f(this),j=f(this).data(&quot;resizable-alsoresize&quot;),r={},u=g&amp;&amp;g.length?g:[&quot;width&quot;,&quot;height&quot;,&quot;top&quot;,&quot;left&quot;];f.each(u||[&quot;width&quot;,&quot;height&quot;,&quot;top&quot;,&quot;left&quot;],function(w,q){var v=(j[q]||0)+(b[q]||0);if(v&amp;&amp;v&gt;=0){r[q]=v||null}});if(/relative/.test(k.css(&quot;position&quot;))&amp;&amp;f.browser.opera){o._revertToRelativePosition=true;k.css({position:&quot;absolute&quot;,top:&quot;auto&quot;,left:&quot;auto&quot;})}k.css(r)})};if(typeof(c.alsoResize)==&quot;object&quot;&amp;&amp;!c.alsoResize.nodeType){f.each(c.alsoResize,function(h,g){p(h,g)})}else{p(c.alsoResize)}},stop:function(b,a){var c=f(this).data(&quot;resizable&quot;);if(c._revertToRelativePosition&amp;&amp;f.browser.opera){c._revertToRelativePosition=false;el.css({position:&quot;relative&quot;})}f(this).removeData(&quot;resizable-alsoresize-start&quot;)}});f.ui.plugin.add(&quot;resizable&quot;,&quot;animate&quot;,{stop:function(r,b){var a=f(this).data(&quot;resizable&quot;),q=a.options;var u=a._proportionallyResizeElements,x=u.length&amp;&amp;(/textarea/i).test(u[0].nodeName),w=x&amp;&amp;f.ui.hasScroll(u[0],&quot;left&quot;)?0:a.sizeDiff.height,o=x?0:a.sizeDiff.width;var v={width:(a.size.width-o),height:(a.size.height-w)},p=(parseInt(a.element.css(&quot;left&quot;),10)+(a.position.left-a.originalPosition.left))||null,c=(parseInt(a.element.css(&quot;top&quot;),10)+(a.position.top-a.originalPosition.top))||null;a.element.animate(f.extend(v,c&amp;&amp;p?{top:c,left:p}:{}),{duration:q.animateDuration,easing:q.animateEasing,step:function(){var g={width:parseInt(a.element.css(&quot;width&quot;),10),height:parseInt(a.element.css(&quot;height&quot;),10),top:parseInt(a.element.css(&quot;top&quot;),10),left:parseInt(a.element.css(&quot;left&quot;),10)};if(u&amp;&amp;u.length){f(u[0]).css({width:g.width,height:g.height})}a._updateCache(g);a._propagate(&quot;resize&quot;,r)}})}});f.ui.plugin.add(&quot;resizable&quot;,&quot;containment&quot;,{start:function(A,b){var C=f(this).data(&quot;resizable&quot;),w=C.options,u=C.element;var z=w.containment,v=(z instanceof f)?z.get(0):(/parent/.test(z))?u.parent().get(0):z;if(!v){return}C.containerElement=f(v);if(/document/.test(z)||z==document){C.containerOffset={left:0,top:0};C.containerPosition={left:0,top:0};C.parentData={element:f(document),left:0,top:0,width:f(document).width(),height:f(document).height()||document.body.parentNode.scrollHeight}}else{var o=f(v),x=[];f([&quot;Top&quot;,&quot;Right&quot;,&quot;Left&quot;,&quot;Bottom&quot;]).each(function(g,h){x[g]=d(o.css(&quot;padding&quot;+h))});C.containerOffset=o.offset();C.containerPosition=o.position();C.containerSize={height:(o.innerHeight()-x[3]),width:(o.innerWidth()-x[1])};var c=C.containerOffset,B=C.containerSize.height,p=C.containerSize.width,y=(f.ui.hasScroll(v,&quot;left&quot;)?v.scrollWidth:p),a=(f.ui.hasScroll(v)?v.scrollHeight:B);C.parentData={element:v,left:c.left,top:c.top,width:y,height:a}}},resize:function(B,c){var E=f(this).data(&quot;resizable&quot;),z=E.options,C=E.containerSize,o=E.containerOffset,v=E.size,u=E.position,b=E._aspectRatio||B.shiftKey,D={top:0,left:0},A=E.containerElement;if(A[0]!=document&amp;&amp;(/static/).test(A.css(&quot;position&quot;))){D=o}if(u.left&lt;(E._helper?o.left:0)){E.size.width=E.size.width+(E._helper?(E.position.left-o.left):(E.position.left-D.left));if(b){E.size.height=E.size.width/z.aspectRatio}E.position.left=z.helper?o.left:0}if(u.top&lt;(E._helper?o.top:0)){E.size.height=E.size.height+(E._helper?(E.position.top-o.top):E.position.top);if(b){E.size.width=E.size.height*z.aspectRatio}E.position.top=E._helper?o.top:0}E.offset.left=E.parentData.left+E.position.left;E.offset.top=E.parentData.top+E.position.top;var w=Math.abs((E._helper?E.offset.left-D.left:(E.offset.left-D.left))+E.sizeDiff.width),a=Math.abs((E._helper?E.offset.top-D.top:(E.offset.top-o.top))+E.sizeDiff.height);var x=E.containerElement.get(0)==E.element.parent().get(0),y=/relative|absolute/.test(E.containerElement.css(&quot;position&quot;));if(x&amp;&amp;y){w-=E.parentData.left}if(w+E.size.width&gt;=E.parentData.width){E.size.width=E.parentData.width-w;if(b){E.size.height=E.size.width/E.aspectRatio}}if(a+E.size.height&gt;=E.parentData.height){E.size.height=E.parentData.height-a;if(b){E.size.width=E.size.height*E.aspectRatio}}},stop:function(y,h){var b=f(this).data(&quot;resizable&quot;),x=b.options,r=b.position,o=b.containerOffset,z=b.containerPosition,w=b.containerElement;var v=f(b.helper),a=v.offset(),c=v.outerWidth()-b.sizeDiff.width,u=v.outerHeight()-b.sizeDiff.height;if(b._helper&amp;&amp;!x.animate&amp;&amp;(/relative/).test(w.css(&quot;position&quot;))){f(this).css({left:a.left-z.left-o.left,width:c,height:u})}if(b._helper&amp;&amp;!x.animate&amp;&amp;(/static/).test(w.css(&quot;position&quot;))){f(this).css({left:a.left-z.left-o.left,width:c,height:u})}}});f.ui.plugin.add(&quot;resizable&quot;,&quot;ghost&quot;,{start:function(c,b){var k=f(this).data(&quot;resizable&quot;),a=k.options,j=k.size;k.ghost=k.originalElement.clone();k.ghost.css({opacity:0.25,display:&quot;block&quot;,position:&quot;relative&quot;,height:j.height,width:j.width,margin:0,left:0,top:0}).addClass(&quot;ui-resizable-ghost&quot;).addClass(typeof a.ghost==&quot;string&quot;?a.ghost:&quot;&quot;);k.ghost.appendTo(k.helper)},resize:function(c,b){var h=f(this).data(&quot;resizable&quot;),a=h.options;if(h.ghost){h.ghost.css({position:&quot;relative&quot;,height:h.size.height,width:h.size.width})}},stop:function(c,b){var h=f(this).data(&quot;resizable&quot;),a=h.options;if(h.ghost&amp;&amp;h.helper){h.helper.get(0).removeChild(h.ghost.get(0))}}});f.ui.plugin.add(&quot;resizable&quot;,&quot;grid&quot;,{resize:function(x,c){var a=f(this).data(&quot;resizable&quot;),u=a.options,p=a.size,r=a.originalSize,q=a.originalPosition,b=a.axis,o=u._aspectRatio||x.shiftKey;u.grid=typeof u.grid==&quot;number&quot;?[u.grid,u.grid]:u.grid;var v=Math.round((p.width-r.width)/(u.grid[0]||1))*(u.grid[0]||1),w=Math.round((p.height-r.height)/(u.grid[1]||1))*(u.grid[1]||1);if(/^(se|s|e)$/.test(b)){a.size.width=r.width+v;a.size.height=r.height+w}else{if(/^(ne)$/.test(b)){a.size.width=r.width+v;a.size.height=r.height+w;a.position.top=q.top-w}else{if(/^(sw)$/.test(b)){a.size.width=r.width+v;a.size.height=r.height+w;a.position.left=q.left-v}else{a.size.width=r.width+v;a.size.height=r.height+w;a.position.top=q.top-w;a.position.left=q.left-v}}}}});var d=function(a){return parseInt(a,10)||0};var e=function(a){return !isNaN(parseInt(a,10))}})(jQuery);(function(b){b.widget(&quot;ui.selectable&quot;,b.extend({},b.ui.mouse,{_init:function(){var a=this;this.element.addClass(&quot;ui-selectable&quot;);this.dragged=false;var d;this.refresh=function(){d=b(a.options.filter,a.element[0]);d.each(function(){var f=b(this);var c=f.offset();b.data(this,&quot;selectable-item&quot;,{element:this,$element:f,left:c.left,top:c.top,right:c.left+f.outerWidth(),bottom:c.top+f.outerHeight(),startselected:false,selected:f.hasClass(&quot;ui-selected&quot;),selecting:f.hasClass(&quot;ui-selecting&quot;),unselecting:f.hasClass(&quot;ui-unselecting&quot;)})})};this.refresh();this.selectees=d.addClass(&quot;ui-selectee&quot;);this._mouseInit();this.helper=b(document.createElement(&quot;div&quot;)).css({border:&quot;1px dotted black&quot;}).addClass(&quot;ui-selectable-helper&quot;)},destroy:function(){this.element.removeClass(&quot;ui-selectable ui-selectable-disabled&quot;).removeData(&quot;selectable&quot;).unbind(&quot;.selectable&quot;);this._mouseDestroy()},_mouseStart:function(e){var a=this;this.opos=[e.pageX,e.pageY];if(this.options.disabled){return}var f=this.options;this.selectees=b(f.filter,this.element[0]);this._trigger(&quot;start&quot;,e);b(f.appendTo).append(this.helper);this.helper.css({&quot;z-index&quot;:100,position:&quot;absolute&quot;,left:e.clientX,top:e.clientY,width:0,height:0});if(f.autoRefresh){this.refresh()}this.selectees.filter(&quot;.ui-selected&quot;).each(function(){var c=b.data(this,&quot;selectable-item&quot;);c.startselected=true;if(!e.metaKey){c.$element.removeClass(&quot;ui-selected&quot;);c.selected=false;c.$element.addClass(&quot;ui-unselecting&quot;);c.unselecting=true;a._trigger(&quot;unselecting&quot;,e,{unselecting:c.element})}});b(e.target).parents().andSelf().each(function(){var c=b.data(this,&quot;selectable-item&quot;);if(c){c.$element.removeClass(&quot;ui-unselecting&quot;).addClass(&quot;ui-selecting&quot;);c.unselecting=false;c.selecting=true;c.selected=true;a._trigger(&quot;selecting&quot;,e,{selecting:c.element});return false}})},_mouseDrag:function(j){var p=this;this.dragged=true;if(this.options.disabled){return}var n=this.options;var o=this.opos[0],k=this.opos[1],a=j.pageX,l=j.pageY;if(o&gt;a){var m=a;a=o;o=m}if(k&gt;l){var m=l;l=k;k=m}this.helper.css({left:o,top:k,width:a-o,height:l-k});this.selectees.each(function(){var d=b.data(this,&quot;selectable-item&quot;);if(!d||d.element==p.element[0]){return}var c=false;if(n.tolerance==&quot;touch&quot;){c=(!(d.left&gt;a||d.right&lt;o||d.top&gt;l||d.bottom&lt;k))}else{if(n.tolerance==&quot;fit&quot;){c=(d.left&gt;o&amp;&amp;d.right&lt;a&amp;&amp;d.top&gt;k&amp;&amp;d.bottom&lt;l)}}if(c){if(d.selected){d.$element.removeClass(&quot;ui-selected&quot;);d.selected=false}if(d.unselecting){d.$element.removeClass(&quot;ui-unselecting&quot;);d.unselecting=false}if(!d.selecting){d.$element.addClass(&quot;ui-selecting&quot;);d.selecting=true;p._trigger(&quot;selecting&quot;,j,{selecting:d.element})}}else{if(d.selecting){if(j.metaKey&amp;&amp;d.startselected){d.$element.removeClass(&quot;ui-selecting&quot;);d.selecting=false;d.$element.addClass(&quot;ui-selected&quot;);d.selected=true}else{d.$element.removeClass(&quot;ui-selecting&quot;);d.selecting=false;if(d.startselected){d.$element.addClass(&quot;ui-unselecting&quot;);d.unselecting=true}p._trigger(&quot;unselecting&quot;,j,{unselecting:d.element})}}if(d.selected){if(!j.metaKey&amp;&amp;!d.startselected){d.$element.removeClass(&quot;ui-selected&quot;);d.selected=false;d.$element.addClass(&quot;ui-unselecting&quot;);d.unselecting=true;p._trigger(&quot;unselecting&quot;,j,{unselecting:d.element})}}}});return false},_mouseStop:function(e){var a=this;this.dragged=false;var f=this.options;b(&quot;.ui-unselecting&quot;,this.element[0]).each(function(){var c=b.data(this,&quot;selectable-item&quot;);c.$element.removeClass(&quot;ui-unselecting&quot;);c.unselecting=false;c.startselected=false;a._trigger(&quot;unselected&quot;,e,{unselected:c.element})});b(&quot;.ui-selecting&quot;,this.element[0]).each(function(){var c=b.data(this,&quot;selectable-item&quot;);c.$element.removeClass(&quot;ui-selecting&quot;).addClass(&quot;ui-selected&quot;);c.selecting=false;c.selected=true;c.startselected=true;a._trigger(&quot;selected&quot;,e,{selected:c.element})});this._trigger(&quot;stop&quot;,e);this.helper.remove();return false}}));b.extend(b.ui.selectable,{version:&quot;1.7.1&quot;,defaults:{appendTo:&quot;body&quot;,autoRefresh:true,cancel:&quot;:input,option&quot;,delay:0,distance:0,filter:&quot;*&quot;,tolerance:&quot;touch&quot;}})})(jQuery);(function(b){b.widget(&quot;ui.sortable&quot;,b.extend({},b.ui.mouse,{_init:function(){var a=this.options;this.containerCache={};this.element.addClass(&quot;ui-sortable&quot;);this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css(&quot;float&quot;)):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass(&quot;ui-sortable ui-sortable-disabled&quot;).removeData(&quot;sortable&quot;).unbind(&quot;.sortable&quot;);this._mouseDestroy();for(var a=this.items.length-1;a&gt;=0;a--){this.items[a].item.removeData(&quot;sortable-item&quot;)}},_mouseCapture:function(k,j){if(this.reverting){return false}if(this.options.disabled||this.options.type==&quot;static&quot;){return false}this._refreshItems(k);var l=null,m=this,a=b(k.target).parents().each(function(){if(b.data(this,&quot;sortable-item&quot;)==m){l=b(this);return false}});if(b.data(k.target,&quot;sortable-item&quot;)==m){l=b(k.target)}if(!l){return false}if(this.options.handle&amp;&amp;!j){var h=false;b(this.options.handle,l).find(&quot;*&quot;).andSelf().each(function(){if(this==k.target){h=true}});if(!h){return false}}this.currentItem=l;this._removeCurrentsFromItems();return true},_mouseStart:function(k,j,a){var h=this.options,m=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(k);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};this.helper.css(&quot;position&quot;,&quot;absolute&quot;);this.cssPosition=this.helper.css(&quot;position&quot;);b.extend(this.offset,{click:{left:k.pageX-this.offset.left,top:k.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(k);this.originalPageX=k.pageX;this.originalPageY=k.pageY;if(h.cursorAt){this._adjustOffsetFromHelper(h.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(h.containment){this._setContainment()}if(h.cursor){if(b(&quot;body&quot;).css(&quot;cursor&quot;)){this._storedCursor=b(&quot;body&quot;).css(&quot;cursor&quot;)}b(&quot;body&quot;).css(&quot;cursor&quot;,h.cursor)}if(h.opacity){if(this.helper.css(&quot;opacity&quot;)){this._storedOpacity=this.helper.css(&quot;opacity&quot;)}this.helper.css(&quot;opacity&quot;,h.opacity)}if(h.zIndex){if(this.helper.css(&quot;zIndex&quot;)){this._storedZIndex=this.helper.css(&quot;zIndex&quot;)}this.helper.css(&quot;zIndex&quot;,h.zIndex)}if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){this.overflowOffset=this.scrollParent.offset()}this._trigger(&quot;start&quot;,k,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!a){for(var l=this.containers.length-1;l&gt;=0;l--){this.containers[l]._trigger(&quot;activate&quot;,k,m._uiHash(this))}}if(b.ui.ddmanager){b.ui.ddmanager.current=this}if(b.ui.ddmanager&amp;&amp;!h.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,k)}this.dragging=true;this.helper.addClass(&quot;ui-sortable-helper&quot;);this._mouseDrag(k);return true},_mouseDrag:function(l){this.position=this._generatePosition(l);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var k=this.options,a=false;if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-l.pageY&lt;k.scrollSensitivity){this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+k.scrollSpeed}else{if(l.pageY-this.overflowOffset.top&lt;k.scrollSensitivity){this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-k.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-l.pageX&lt;k.scrollSensitivity){this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+k.scrollSpeed}else{if(l.pageX-this.overflowOffset.left&lt;k.scrollSensitivity){this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-k.scrollSpeed}}}else{if(l.pageY-b(document).scrollTop()&lt;k.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()-k.scrollSpeed)}else{if(b(window).height()-(l.pageY-b(document).scrollTop())&lt;k.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()+k.scrollSpeed)}}if(l.pageX-b(document).scrollLeft()&lt;k.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()-k.scrollSpeed)}else{if(b(window).width()-(l.pageX-b(document).scrollLeft())&lt;k.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()+k.scrollSpeed)}}}if(a!==false&amp;&amp;b.ui.ddmanager&amp;&amp;!k.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,l)}}this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}for(var n=this.items.length-1;n&gt;=0;n--){var m=this.items[n],o=m.item[0],j=this._intersectsWithPointer(m);if(!j){continue}if(o!=this.currentItem[0]&amp;&amp;this.placeholder[j==1?&quot;next&quot;:&quot;prev&quot;]()[0]!=o&amp;&amp;!b.ui.contains(this.placeholder[0],o)&amp;&amp;(this.options.type==&quot;semi-dynamic&quot;?!b.ui.contains(this.element[0],o):true)){this.direction=j==1?&quot;down&quot;:&quot;up&quot;;if(this.options.tolerance==&quot;pointer&quot;||this._intersectsWithSides(m)){this._rearrange(l,m)}else{break}this._trigger(&quot;change&quot;,l,this._uiHash());break}}this._contactContainers(l);if(b.ui.ddmanager){b.ui.ddmanager.drag(this,l)}this._trigger(&quot;sort&quot;,l,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(h,g){if(!h){return}if(b.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){b.ui.ddmanager.drop(this,h)}if(this.options.revert){var a=this;var f=a.placeholder.offset();a.reverting=true;b(this.helper).animate({left:f.left-this.offset.parent.left-a.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-a.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){a._clear(h)})}else{this._clear(h,g)}return false},cancel:function(){var a=this;if(this.dragging){this._mouseUp();if(this.options.helper==&quot;original&quot;){this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}for(var d=this.containers.length-1;d&gt;=0;d--){this.containers[d]._trigger(&quot;deactivate&quot;,null,a._uiHash(this));if(this.containers[d].containerCache.over){this.containers[d]._trigger(&quot;out&quot;,null,a._uiHash(this));this.containers[d].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=&quot;original&quot;&amp;&amp;this.helper&amp;&amp;this.helper[0].parentNode){this.helper.remove()}b.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){b(this.domPosition.prev).after(this.currentItem)}else{b(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(e){var a=this._getItemsAsjQuery(e&amp;&amp;e.connected);var f=[];e=e||{};b(a).each(function(){var c=(b(e.item||this).attr(e.attribute||&quot;id&quot;)||&quot;&quot;).match(e.expression||(/(.+)[-=_](.+)/));if(c){f.push((e.key||c[1]+&quot;[]&quot;)+&quot;=&quot;+(e.key&amp;&amp;e.expression?c[1]:c[2]))}});return f.join(&quot;&amp;&quot;)},toArray:function(e){var a=this._getItemsAsjQuery(e&amp;&amp;e.connected);var f=[];e=e||{};a.each(function(){f.push(b(e.item||this).attr(e.attribute||&quot;id&quot;)||&quot;&quot;)});return f},_intersectsWith:function(p){var y=this.positionAbs.left,z=y+this.helperProportions.width,q=this.positionAbs.top,r=q+this.helperProportions.height;var x=p.left,A=x+p.width,l=p.top,u=l+p.height;var a=this.offset.click.top,v=this.offset.click.left;var w=(q+a)&gt;l&amp;&amp;(q+a)&lt;u&amp;&amp;(y+v)&gt;x&amp;&amp;(y+v)&lt;A;if(this.options.tolerance==&quot;pointer&quot;||this.options.forcePointerForContainers||(this.options.tolerance!=&quot;pointer&quot;&amp;&amp;this.helperProportions[this.floating?&quot;width&quot;:&quot;height&quot;]&gt;p[this.floating?&quot;width&quot;:&quot;height&quot;])){return w}else{return(x&lt;y+(this.helperProportions.width/2)&amp;&amp;z-(this.helperProportions.width/2)&lt;A&amp;&amp;l&lt;q+(this.helperProportions.height/2)&amp;&amp;r-(this.helperProportions.height/2)&lt;u)}},_intersectsWithPointer:function(l){var k=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,l.top,l.height),m=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,l.left,l.width),h=k&amp;&amp;m,a=this._getDragVerticalDirection(),j=this._getDragHorizontalDirection();if(!h){return false}return this.floating?(((j&amp;&amp;j==&quot;right&quot;)||a==&quot;down&quot;)?2:1):(a&amp;&amp;(a==&quot;down&quot;?2:1))},_intersectsWithSides:function(h){var k=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,h.top+(h.height/2),h.height),j=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,h.left+(h.width/2),h.width),a=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(this.floating&amp;&amp;g){return((g==&quot;right&quot;&amp;&amp;j)||(g==&quot;left&quot;&amp;&amp;!j))}else{return a&amp;&amp;((a==&quot;down&quot;&amp;&amp;k)||(a==&quot;up&quot;&amp;&amp;!k))}},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&amp;&amp;(a&gt;0?&quot;down&quot;:&quot;up&quot;)},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&amp;&amp;(a&gt;0?&quot;right&quot;:&quot;left&quot;)},refresh:function(a){this._refreshItems(a);this.refreshPositions()},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(u){var a=this;var n=[];var p=[];var m=this._connectWith();if(m&amp;&amp;u){for(var q=m.length-1;q&gt;=0;q--){var j=b(m[q]);for(var r=j.length-1;r&gt;=0;r--){var o=b.data(j[r],&quot;sortable&quot;);if(o&amp;&amp;o!=this&amp;&amp;!o.options.disabled){p.push([b.isFunction(o.options.items)?o.options.items.call(o.element):b(o.options.items,o.element).not(&quot;.ui-sortable-helper&quot;),o])}}}}p.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not(&quot;.ui-sortable-helper&quot;),this]);for(var q=p.length-1;q&gt;=0;q--){p[q][0].each(function(){n.push(this)})}return b(n)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(&quot;:data(sortable-item)&quot;);for(var f=0;f&lt;this.items.length;f++){for(var a=0;a&lt;e.length;a++){if(e[a]==this.items[f].item[0]){this.items.splice(f,1)}}}},_refreshItems:function(C){this.items=[];this.containers=[this];var w=this.items;var a=this;var y=[[b.isFunction(this.options.items)?this.options.items.call(this.element[0],C,{item:this.currentItem}):b(this.options.items,this.element),this]];var u=this._connectWith();if(u){for(var z=u.length-1;z&gt;=0;z--){var r=b(u[z]);for(var A=r.length-1;A&gt;=0;A--){var x=b.data(r[A],&quot;sortable&quot;);if(x&amp;&amp;x!=this&amp;&amp;!x.options.disabled){y.push([b.isFunction(x.options.items)?x.options.items.call(x.element[0],C,{item:this.currentItem}):b(x.options.items,x.element),x]);this.containers.push(x)}}}}for(var z=y.length-1;z&gt;=0;z--){var v=y[z][1];var B=y[z][0];for(var A=0,q=B.length;A&lt;q;A++){var j=b(B[A]);j.data(&quot;sortable-item&quot;,v);w.push({item:j,instance:v,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&amp;&amp;this.helper){this.offset.parent=this._getParentOffset()}for(var j=this.items.length-1;j&gt;=0;j--){var h=this.items[j];if(h.instance!=this.currentContainer&amp;&amp;this.currentContainer&amp;&amp;h.item[0]!=this.currentItem[0]){continue}var k=this.options.toleranceElement?b(this.options.toleranceElement,h.item):h.item;if(!a){h.width=k.outerWidth();h.height=k.outerHeight()}var g=k.offset();h.left=g.left;h.top=g.top}if(this.options.custom&amp;&amp;this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var j=this.containers.length-1;j&gt;=0;j--){var g=this.containers[j].element.offset();this.containers[j].containerCache.left=g.left;this.containers[j].containerCache.top=g.top;this.containers[j].containerCache.width=this.containers[j].element.outerWidth();this.containers[j].containerCache.height=this.containers[j].element.outerHeight()}}},_createPlaceholder:function(g){var a=g||this,f=a.options;if(!f.placeholder||f.placeholder.constructor==String){var h=f.placeholder;f.placeholder={element:function(){var c=b(document.createElement(a.currentItem[0].nodeName)).addClass(h||a.currentItem[0].className+&quot; ui-sortable-placeholder&quot;).removeClass(&quot;ui-sortable-helper&quot;)[0];if(!h){c.style.visibility=&quot;hidden&quot;}return c},update:function(d,c){if(h&amp;&amp;!f.forcePlaceholderSize){return}if(!c.height()){c.height(a.currentItem.innerHeight()-parseInt(a.currentItem.css(&quot;paddingTop&quot;)||0,10)-parseInt(a.currentItem.css(&quot;paddingBottom&quot;)||0,10))}if(!c.width()){c.width(a.currentItem.innerWidth()-parseInt(a.currentItem.css(&quot;paddingLeft&quot;)||0,10)-parseInt(a.currentItem.css(&quot;paddingRight&quot;)||0,10))}}}}a.placeholder=b(f.placeholder.element.call(a.element,a.currentItem));a.currentItem.after(a.placeholder);f.placeholder.update(a,a.placeholder)},_contactContainers:function(n){for(var o=this.containers.length-1;o&gt;=0;o--){if(this._intersectsWith(this.containers[o].containerCache)){if(!this.containers[o].containerCache.over){if(this.currentContainer!=this.containers[o]){var j=10000;var k=null;var m=this.positionAbs[this.containers[o].floating?&quot;left&quot;:&quot;top&quot;];for(var a=this.items.length-1;a&gt;=0;a--){if(!b.ui.contains(this.containers[o].element[0],this.items[a].item[0])){continue}var l=this.items[a][this.containers[o].floating?&quot;left&quot;:&quot;top&quot;];if(Math.abs(l-m)&lt;j){j=Math.abs(l-m);k=this.items[a]}}if(!k&amp;&amp;!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[o];k?this._rearrange(n,k,null,true):this._rearrange(n,null,this.containers[o].element,true);this._trigger(&quot;change&quot;,n,this._uiHash());this.containers[o]._trigger(&quot;change&quot;,n,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[o]._trigger(&quot;over&quot;,n,this._uiHash(this));this.containers[o].containerCache.over=1}}else{if(this.containers[o].containerCache.over){this.containers[o]._trigger(&quot;out&quot;,n,this._uiHash(this));this.containers[o].containerCache.over=0}}}},_createHelper:function(f){var e=this.options;var a=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f,this.currentItem])):(e.helper==&quot;clone&quot;?this.currentItem.clone():this.currentItem);if(!a.parents(&quot;body&quot;).length){b(e.appendTo!=&quot;parent&quot;?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0])}if(a[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css(&quot;position&quot;),top:this.currentItem.css(&quot;top&quot;),left:this.currentItem.css(&quot;left&quot;)}}if(a[0].style.width==&quot;&quot;||e.forceHelperSize){a.width(this.currentItem.width())}if(a[0].style.height==&quot;&quot;||e.forceHelperSize){a.height(this.currentItem.height())}return a},_adjustOffsetFromHelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;b.browser.msie)){a={top:0,left:0}}return{top:a.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:a.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.currentItem.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment==&quot;parent&quot;){f.containment=this.helper[0].parentNode}if(f.containment==&quot;document&quot;||f.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(b(f.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)){var h=b(f.containment)[0];var g=b(f.containment).offset();var a=(b(h).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[g.left+(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,g.top+(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,g.left+(a?Math.max(h.scrollWidth,h.offsetWidth):h.offsetWidth)-(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,g.top+(a?Math.max(h.scrollHeight,h.offsetHeight):h.offsetHeight)-(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(k,d){if(!d){d=this.position}var m=k==&quot;absolute&quot;?1:-1;var l=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);return{top:(d.top+this.offset.relative.top*m+this.offset.parent.top*m-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop()))*m)),left:(d.left+this.offset.relative.left*m+this.offset.parent.left*m-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())*m))}},_generatePosition:function(n){var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var o=n.pageX;var p=n.pageY;if(this.originalPosition){if(this.containment){if(n.pageX-this.offset.click.left&lt;this.containment[0]){o=this.containment[0]+this.offset.click.left}if(n.pageY-this.offset.click.top&lt;this.containment[1]){p=this.containment[1]+this.offset.click.top}if(n.pageX-this.offset.click.left&gt;this.containment[2]){o=this.containment[2]+this.offset.click.left}if(n.pageY-this.offset.click.top&gt;this.containment[3]){p=this.containment[3]+this.offset.click.top}}if(k.grid){var l=this.originalPageY+Math.round((p-this.originalPageY)/k.grid[1])*k.grid[1];p=this.containment?(!(l-this.offset.click.top&lt;this.containment[1]||l-this.offset.click.top&gt;this.containment[3])?l:(!(l-this.offset.click.top&lt;this.containment[1])?l-k.grid[1]:l+k.grid[1])):l;var m=this.originalPageX+Math.round((o-this.originalPageX)/k.grid[0])*k.grid[0];o=this.containment?(!(m-this.offset.click.left&lt;this.containment[0]||m-this.offset.click.left&gt;this.containment[2])?m:(!(m-this.offset.click.left&lt;this.containment[0])?m-k.grid[0]:m+k.grid[0])):m}}return{top:(p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop())))),left:(o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())))}},_rearrange:function(h,j,m,k){m?m[0].appendChild(this.placeholder[0]):j.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==&quot;down&quot;?j.item[0]:j.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var l=this,a=this.counter;window.setTimeout(function(){if(a==l.counter){l.refreshPositions(!k)}},0)},_clear:function(j,h){this.reverting=false;var g=[],a=this;if(!this._noFinalSort&amp;&amp;this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var k in this._storedCSS){if(this._storedCSS[k]==&quot;auto&quot;||this._storedCSS[k]==&quot;static&quot;){this._storedCSS[k]=&quot;&quot;}}this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}if(this.fromOutside&amp;&amp;!h){g.push(function(c){this._trigger(&quot;receive&quot;,c,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(&quot;.ui-sortable-helper&quot;)[0]||this.domPosition.parent!=this.currentItem.parent()[0])&amp;&amp;!h){g.push(function(c){this._trigger(&quot;update&quot;,c,this._uiHash())})}if(!b.ui.contains(this.element[0],this.currentItem[0])){if(!h){g.push(function(c){this._trigger(&quot;remove&quot;,c,this._uiHash())})}for(var k=this.containers.length-1;k&gt;=0;k--){if(b.ui.contains(this.containers[k].element[0],this.currentItem[0])&amp;&amp;!h){g.push((function(c){return function(d){c._trigger(&quot;receive&quot;,d,this._uiHash(this))}}).call(this,this.containers[k]));g.push((function(c){return function(d){c._trigger(&quot;update&quot;,d,this._uiHash(this))}}).call(this,this.containers[k]))}}}for(var k=this.containers.length-1;k&gt;=0;k--){if(!h){g.push((function(c){return function(d){c._trigger(&quot;deactivate&quot;,d,this._uiHash(this))}}).call(this,this.containers[k]))}if(this.containers[k].containerCache.over){g.push((function(c){return function(d){c._trigger(&quot;out&quot;,d,this._uiHash(this))}}).call(this,this.containers[k]));this.containers[k].containerCache.over=0}}if(this._storedCursor){b(&quot;body&quot;).css(&quot;cursor&quot;,this._storedCursor)}if(this._storedOpacity){this.helper.css(&quot;opacity&quot;,this._storedOpacity)}if(this._storedZIndex){this.helper.css(&quot;zIndex&quot;,this._storedZIndex==&quot;auto&quot;?&quot;&quot;:this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!h){this._trigger(&quot;beforeStop&quot;,j,this._uiHash());for(var k=0;k&lt;g.length;k++){g[k].call(this,j)}this._trigger(&quot;stop&quot;,j,this._uiHash())}return false}if(!h){this._trigger(&quot;beforeStop&quot;,j,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!h){for(var k=0;k&lt;g.length;k++){g[k].call(this,j)}this._trigger(&quot;stop&quot;,j,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(b.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(d){var a=d||this;return{helper:a.helper,placeholder:a.placeholder||b([]),position:a.position,absolutePosition:a.positionAbs,offset:a.positionAbs,item:a.currentItem,sender:d?d.element:null}}}));b.extend(b.ui.sortable,{getter:&quot;serialize toArray&quot;,version:&quot;1.7.1&quot;,eventPrefix:&quot;sort&quot;,defaults:{appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectWith:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:&quot;original&quot;,items:&quot;&gt; *&quot;,opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;,zIndex:1000}})})(jQuery);(function(b){b.widget(&quot;ui.accordion&quot;,{_init:function(){var e=this.options,a=this;this.running=0;if(e.collapsible==b.ui.accordion.defaults.collapsible&amp;&amp;e.alwaysOpen!=b.ui.accordion.defaults.alwaysOpen){e.collapsible=!e.alwaysOpen}if(e.navigation){var f=this.element.find(&quot;a&quot;).filter(e.navigationFilter);if(f.length){if(f.filter(e.header).length){this.active=f}else{this.active=f.parent().parent().prev();f.addClass(&quot;ui-accordion-content-active&quot;)}}}this.element.addClass(&quot;ui-accordion ui-widget ui-helper-reset&quot;);if(this.element[0].nodeName==&quot;UL&quot;){this.element.children(&quot;li&quot;).addClass(&quot;ui-accordion-li-fix&quot;)}this.headers=this.element.find(e.header).addClass(&quot;ui-accordion-header ui-helper-reset ui-state-default ui-corner-all&quot;).bind(&quot;mouseenter.accordion&quot;,function(){b(this).addClass(&quot;ui-state-hover&quot;)}).bind(&quot;mouseleave.accordion&quot;,function(){b(this).removeClass(&quot;ui-state-hover&quot;)}).bind(&quot;focus.accordion&quot;,function(){b(this).addClass(&quot;ui-state-focus&quot;)}).bind(&quot;blur.accordion&quot;,function(){b(this).removeClass(&quot;ui-state-focus&quot;)});this.headers.next().addClass(&quot;ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom&quot;);this.active=this._findActive(this.active||e.active).toggleClass(&quot;ui-state-default&quot;).toggleClass(&quot;ui-state-active&quot;).toggleClass(&quot;ui-corner-all&quot;).toggleClass(&quot;ui-corner-top&quot;);this.active.next().addClass(&quot;ui-accordion-content-active&quot;);b(&quot;&lt;span/&gt;&quot;).addClass(&quot;ui-icon &quot;+e.icons.header).prependTo(this.headers);this.active.find(&quot;.ui-icon&quot;).toggleClass(e.icons.header).toggleClass(e.icons.headerSelected);if(b.browser.msie){this.element.find(&quot;a&quot;).css(&quot;zoom&quot;,&quot;1&quot;)}this.resize();this.element.attr(&quot;role&quot;,&quot;tablist&quot;);this.headers.attr(&quot;role&quot;,&quot;tab&quot;).bind(&quot;keydown&quot;,function(c){return a._keydown(c)}).next().attr(&quot;role&quot;,&quot;tabpanel&quot;);this.headers.not(this.active||&quot;&quot;).attr(&quot;aria-expanded&quot;,&quot;false&quot;).attr(&quot;tabIndex&quot;,&quot;-1&quot;).next().hide();if(!this.active.length){this.headers.eq(0).attr(&quot;tabIndex&quot;,&quot;0&quot;)}else{this.active.attr(&quot;aria-expanded&quot;,&quot;true&quot;).attr(&quot;tabIndex&quot;,&quot;0&quot;)}if(!b.browser.safari){this.headers.find(&quot;a&quot;).attr(&quot;tabIndex&quot;,&quot;-1&quot;)}if(e.event){this.headers.bind((e.event)+&quot;.accordion&quot;,function(c){return a._clickHandler.call(a,c,this)})}},destroy:function(){var d=this.options;this.element.removeClass(&quot;ui-accordion ui-widget ui-helper-reset&quot;).removeAttr(&quot;role&quot;).unbind(&quot;.accordion&quot;).removeData(&quot;accordion&quot;);this.headers.unbind(&quot;.accordion&quot;).removeClass(&quot;ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top&quot;).removeAttr(&quot;role&quot;).removeAttr(&quot;aria-expanded&quot;).removeAttr(&quot;tabindex&quot;);this.headers.find(&quot;a&quot;).removeAttr(&quot;tabindex&quot;);this.headers.children(&quot;.ui-icon&quot;).remove();var a=this.headers.next().css(&quot;display&quot;,&quot;&quot;).removeAttr(&quot;role&quot;).removeClass(&quot;ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active&quot;);if(d.autoHeight||d.fillHeight){a.css(&quot;height&quot;,&quot;&quot;)}},_setData:function(a,d){if(a==&quot;alwaysOpen&quot;){a=&quot;collapsible&quot;;d=!d}b.widget.prototype._setData.apply(this,arguments)},_keydown:function(k){var h=this.options,j=b.ui.keyCode;if(h.disabled||k.altKey||k.ctrlKey){return}var l=this.headers.length;var a=this.headers.index(k.target);var m=false;switch(k.keyCode){case j.RIGHT:case j.DOWN:m=this.headers[(a+1)%l];break;case j.LEFT:case j.UP:m=this.headers[(a-1+l)%l];break;case j.SPACE:case j.ENTER:return this._clickHandler({target:k.target},k.target)}if(m){b(k.target).attr(&quot;tabIndex&quot;,&quot;-1&quot;);b(m).attr(&quot;tabIndex&quot;,&quot;0&quot;);m.focus();return false}return true},resize:function(){var f=this.options,g;if(f.fillSpace){if(b.browser.msie){var a=this.element.parent().css(&quot;overflow&quot;);this.element.parent().css(&quot;overflow&quot;,&quot;hidden&quot;)}g=this.element.parent().height();if(b.browser.msie){this.element.parent().css(&quot;overflow&quot;,a)}this.headers.each(function(){g-=b(this).outerHeight()});var h=0;this.headers.next().each(function(){h=Math.max(h,b(this).innerHeight()-b(this).height())}).height(Math.max(0,g-h)).css(&quot;overflow&quot;,&quot;auto&quot;)}else{if(f.autoHeight){g=0;this.headers.next().each(function(){g=Math.max(g,b(this).outerHeight())}).height(g)}}},activate:function(a){var d=this._findActive(a)[0];this._clickHandler({target:d},d)},_findActive:function(a){return a?typeof a==&quot;number&quot;?this.headers.filter(&quot;:eq(&quot;+a+&quot;)&quot;):this.headers.not(this.headers.not(a)):a===false?b([]):this.headers.filter(&quot;:eq(0)&quot;)},_clickHandler:function(r,n){var p=this.options;if(p.disabled){return false}if(!r.target&amp;&amp;p.collapsible){this.active.removeClass(&quot;ui-state-active ui-corner-top&quot;).addClass(&quot;ui-state-default ui-corner-all&quot;).find(&quot;.ui-icon&quot;).removeClass(p.icons.headerSelected).addClass(p.icons.header);this.active.next().addClass(&quot;ui-accordion-content-active&quot;);var l=this.active.next(),o={options:p,newHeader:b([]),oldHeader:p.active,newContent:b([]),oldContent:l},q=(this.active=b([]));this._toggle(q,l,o);return false}var m=b(r.currentTarget||n);var k=m[0]==this.active[0];if(this.running||(!p.collapsible&amp;&amp;k)){return false}this.active.removeClass(&quot;ui-state-active ui-corner-top&quot;).addClass(&quot;ui-state-default ui-corner-all&quot;).find(&quot;.ui-icon&quot;).removeClass(p.icons.headerSelected).addClass(p.icons.header);this.active.next().addClass(&quot;ui-accordion-content-active&quot;);if(!k){m.removeClass(&quot;ui-state-default ui-corner-all&quot;).addClass(&quot;ui-state-active ui-corner-top&quot;).find(&quot;.ui-icon&quot;).removeClass(p.icons.header).addClass(p.icons.headerSelected);m.next().addClass(&quot;ui-accordion-content-active&quot;)}var q=m.next(),l=this.active.next(),o={options:p,newHeader:k&amp;&amp;p.collapsible?b([]):m,oldHeader:this.active,newContent:k&amp;&amp;p.collapsible?b([]):q.find(&quot;&gt; *&quot;),oldContent:l.find(&quot;&gt; *&quot;)},a=this.headers.index(this.active[0])&gt;this.headers.index(m[0]);this.active=k?b([]):m;this._toggle(q,l,o,k,a);return false},_toggle:function(z,q,u,p,o){var x=this.options,a=this;this.toShow=z;this.toHide=q;this.data=u;var y=function(){if(!a){return}return a._completed.apply(a,arguments)};this._trigger(&quot;changestart&quot;,null,this.data);this.running=q.size()===0?z.size():q.size();if(x.animated){var v={};if(x.collapsible&amp;&amp;p){v={toShow:b([]),toHide:q,complete:y,down:o,autoHeight:x.autoHeight||x.fillSpace}}else{v={toShow:z,toHide:q,complete:y,down:o,autoHeight:x.autoHeight||x.fillSpace}}if(!x.proxied){x.proxied=x.animated}if(!x.proxiedDuration){x.proxiedDuration=x.duration}x.animated=b.isFunction(x.proxied)?x.proxied(v):x.proxied;x.duration=b.isFunction(x.proxiedDuration)?x.proxiedDuration(v):x.proxiedDuration;var n=b.ui.accordion.animations,w=x.duration,r=x.animated;if(!n[r]){n[r]=function(c){this.slide(c,{easing:r,duration:w||700})}}n[r](v)}else{if(x.collapsible&amp;&amp;p){z.toggle()}else{q.hide();z.show()}y(true)}q.prev().attr(&quot;aria-expanded&quot;,&quot;false&quot;).attr(&quot;tabIndex&quot;,&quot;-1&quot;).blur();z.prev().attr(&quot;aria-expanded&quot;,&quot;true&quot;).attr(&quot;tabIndex&quot;,&quot;0&quot;).focus()},_completed:function(a){var d=this.options;this.running=a?0:--this.running;if(this.running){return}if(d.clearStyle){this.toShow.add(this.toHide).css({height:&quot;&quot;,overflow:&quot;&quot;})}this._trigger(&quot;change&quot;,null,this.data)}});b.extend(b.ui.accordion,{version:&quot;1.7.1&quot;,defaults:{active:null,alwaysOpen:true,animated:&quot;slide&quot;,autoHeight:true,clearStyle:false,collapsible:false,event:&quot;click&quot;,fillSpace:false,header:&quot;&gt; li &gt; :first-child,&gt; :not(li):even&quot;,icons:{header:&quot;ui-icon-triangle-1-e&quot;,headerSelected:&quot;ui-icon-triangle-1-s&quot;},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(a,l){a=b.extend({easing:&quot;swing&quot;,duration:300},a,l);if(!a.toHide.size()){a.toShow.animate({height:&quot;show&quot;},a);return}if(!a.toShow.size()){a.toHide.animate({height:&quot;hide&quot;},a);return}var q=a.toShow.css(&quot;overflow&quot;),m,p={},n={},o=[&quot;height&quot;,&quot;paddingTop&quot;,&quot;paddingBottom&quot;],r;var k=a.toShow;r=k[0].style.width;k.width(parseInt(k.parent().width(),10)-parseInt(k.css(&quot;paddingLeft&quot;),10)-parseInt(k.css(&quot;paddingRight&quot;),10)-(parseInt(k.css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(k.css(&quot;borderRightWidth&quot;),10)||0));b.each(o,function(e,c){n[c]=&quot;hide&quot;;var d=(&quot;&quot;+b.css(a.toShow[0],c)).match(/^([\d+-.]+)(.*)$/);p[c]={value:d[1],unit:d[2]||&quot;px&quot;}});a.toShow.css({height:0,overflow:&quot;hidden&quot;}).show();a.toHide.filter(&quot;:hidden&quot;).each(a.complete).end().filter(&quot;:visible&quot;).animate(n,{step:function(d,c){if(c.prop==&quot;height&quot;){m=(c.now-c.start)/(c.end-c.start)}a.toShow[0].style[c.prop]=(m*p[c.prop].value)+p[c.prop].unit},duration:a.duration,easing:a.easing,complete:function(){if(!a.autoHeight){a.toShow.css(&quot;height&quot;,&quot;&quot;)}a.toShow.css(&quot;width&quot;,r);a.toShow.css({overflow:q});a.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?&quot;easeOutBounce&quot;:&quot;swing&quot;,duration:a.down?1000:200})},easeslide:function(a){this.slide(a,{easing:&quot;easeinout&quot;,duration:700})}}})})(jQuery);(function(f){var d={dragStart:&quot;start.draggable&quot;,drag:&quot;drag.draggable&quot;,dragStop:&quot;stop.draggable&quot;,maxHeight:&quot;maxHeight.resizable&quot;,minHeight:&quot;minHeight.resizable&quot;,maxWidth:&quot;maxWidth.resizable&quot;,minWidth:&quot;minWidth.resizable&quot;,resizeStart:&quot;start.resizable&quot;,resize:&quot;drag.resizable&quot;,resizeStop:&quot;stop.resizable&quot;},e=&quot;ui-dialog ui-widget ui-widget-content ui-corner-all &quot;;f.widget(&quot;ui.dialog&quot;,{_init:function(){this.originalTitle=this.element.attr(&quot;title&quot;);var b=this,a=this.options,n=a.title||this.originalTitle||&quot;&amp;nbsp;&quot;,u=f.ui.dialog.getTitleId(this.element),c=(this.uiDialog=f(&quot;&lt;div/&gt;&quot;)).appendTo(document.body).hide().addClass(e+a.dialogClass).css({position:&quot;absolute&quot;,overflow:&quot;hidden&quot;,zIndex:a.zIndex}).attr(&quot;tabIndex&quot;,-1).css(&quot;outline&quot;,0).keydown(function(g){(a.closeOnEscape&amp;&amp;g.keyCode&amp;&amp;g.keyCode==f.ui.keyCode.ESCAPE&amp;&amp;b.close(g))}).attr({role:&quot;dialog&quot;,&quot;aria-labelledby&quot;:u}).mousedown(function(g){b.moveToTop(false,g)}),q=this.element.show().removeAttr(&quot;title&quot;).addClass(&quot;ui-dialog-content ui-widget-content&quot;).appendTo(c),r=(this.uiDialogTitlebar=f(&quot;&lt;div&gt;&lt;/div&gt;&quot;)).addClass(&quot;ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix&quot;).prependTo(c),o=f('&lt;a href=&quot;#&quot;/&gt;').addClass(&quot;ui-dialog-titlebar-close ui-corner-all&quot;).attr(&quot;role&quot;,&quot;button&quot;).hover(function(){o.addClass(&quot;ui-state-hover&quot;)},function(){o.removeClass(&quot;ui-state-hover&quot;)}).focus(function(){o.addClass(&quot;ui-state-focus&quot;)}).blur(function(){o.removeClass(&quot;ui-state-focus&quot;)}).mousedown(function(g){g.stopPropagation()}).click(function(g){b.close(g);return false}).appendTo(r),p=(this.uiDialogTitlebarCloseText=f(&quot;&lt;span/&gt;&quot;)).addClass(&quot;ui-icon ui-icon-closethick&quot;).text(a.closeText).appendTo(o),v=f(&quot;&lt;span/&gt;&quot;).addClass(&quot;ui-dialog-title&quot;).attr(&quot;id&quot;,u).html(n).prependTo(r);r.find(&quot;*&quot;).add(r).disableSelection();(a.draggable&amp;&amp;f.fn.draggable&amp;&amp;this._makeDraggable());(a.resizable&amp;&amp;f.fn.resizable&amp;&amp;this._makeResizable());this._createButtons(a.buttons);this._isOpen=false;(a.bgiframe&amp;&amp;f.fn.bgiframe&amp;&amp;c.bgiframe());(a.autoOpen&amp;&amp;this.open())},destroy:function(){(this.overlay&amp;&amp;this.overlay.destroy());this.uiDialog.hide();this.element.unbind(&quot;.dialog&quot;).removeData(&quot;dialog&quot;).removeClass(&quot;ui-dialog-content ui-widget-content&quot;).hide().appendTo(&quot;body&quot;);this.uiDialog.remove();(this.originalTitle&amp;&amp;this.element.attr(&quot;title&quot;,this.originalTitle))},close:function(a){var b=this;if(false===b._trigger(&quot;beforeclose&quot;,a)){return}(b.overlay&amp;&amp;b.overlay.destroy());b.uiDialog.unbind(&quot;keypress.ui-dialog&quot;);(b.options.hide?b.uiDialog.hide(b.options.hide,function(){b._trigger(&quot;close&quot;,a)}):b.uiDialog.hide()&amp;&amp;b._trigger(&quot;close&quot;,a));f.ui.dialog.overlay.resize();b._isOpen=false},isOpen:function(){return this._isOpen},moveToTop:function(a,b){if((this.options.modal&amp;&amp;!a)||(!this.options.stack&amp;&amp;!this.options.modal)){return this._trigger(&quot;focus&quot;,b)}if(this.options.zIndex&gt;f.ui.dialog.maxZ){f.ui.dialog.maxZ=this.options.zIndex}(this.overlay&amp;&amp;this.overlay.$el.css(&quot;z-index&quot;,f.ui.dialog.overlay.maxZ=++f.ui.dialog.maxZ));var c={scrollTop:this.element.attr(&quot;scrollTop&quot;),scrollLeft:this.element.attr(&quot;scrollLeft&quot;)};this.uiDialog.css(&quot;z-index&quot;,++f.ui.dialog.maxZ);this.element.attr(c);this._trigger(&quot;focus&quot;,b)},open:function(){if(this._isOpen){return}var a=this.options,b=this.uiDialog;this.overlay=a.modal?new f.ui.dialog.overlay(this):null;(b.next().length&amp;&amp;b.appendTo(&quot;body&quot;));this._size();this._position(a.position);b.show(a.show);this.moveToTop(true);(a.modal&amp;&amp;b.bind(&quot;keypress.ui-dialog&quot;,function(j){if(j.keyCode!=f.ui.keyCode.TAB){return}var k=f(&quot;:tabbable&quot;,this),c=k.filter(&quot;:first&quot;)[0],l=k.filter(&quot;:last&quot;)[0];if(j.target==l&amp;&amp;!j.shiftKey){setTimeout(function(){c.focus()},1)}else{if(j.target==c&amp;&amp;j.shiftKey){setTimeout(function(){l.focus()},1)}}}));f([]).add(b.find(&quot;.ui-dialog-content :tabbable:first&quot;)).add(b.find(&quot;.ui-dialog-buttonpane :tabbable:first&quot;)).add(b).filter(&quot;:first&quot;).focus();this._trigger(&quot;open&quot;);this._isOpen=true},_createButtons:function(a){var b=this,h=false,c=f(&quot;&lt;div&gt;&lt;/div&gt;&quot;).addClass(&quot;ui-dialog-buttonpane ui-widget-content ui-helper-clearfix&quot;);this.uiDialog.find(&quot;.ui-dialog-buttonpane&quot;).remove();(typeof a==&quot;object&quot;&amp;&amp;a!==null&amp;&amp;f.each(a,function(){return !(h=true)}));if(h){f.each(a,function(j,g){f('&lt;button type=&quot;button&quot;&gt;&lt;/button&gt;').addClass(&quot;ui-state-default ui-corner-all&quot;).text(j).click(function(){g.apply(b.element[0],arguments)}).hover(function(){f(this).addClass(&quot;ui-state-hover&quot;)},function(){f(this).removeClass(&quot;ui-state-hover&quot;)}).focus(function(){f(this).addClass(&quot;ui-state-focus&quot;)}).blur(function(){f(this).removeClass(&quot;ui-state-focus&quot;)}).appendTo(c)});c.appendTo(this.uiDialog)}},_makeDraggable:function(){var c=this,a=this.options,b;this.uiDialog.draggable({cancel:&quot;.ui-dialog-content&quot;,handle:&quot;.ui-dialog-titlebar&quot;,containment:&quot;document&quot;,start:function(){b=a.height;f(this).height(f(this).height()).addClass(&quot;ui-dialog-dragging&quot;);(a.dragStart&amp;&amp;a.dragStart.apply(c.element[0],arguments))},drag:function(){(a.drag&amp;&amp;a.drag.apply(c.element[0],arguments))},stop:function(){f(this).removeClass(&quot;ui-dialog-dragging&quot;).height(b);(a.dragStop&amp;&amp;a.dragStop.apply(c.element[0],arguments));f.ui.dialog.overlay.resize()}})},_makeResizable:function(a){a=(a===undefined?this.options.resizable:a);var h=this,b=this.options,c=typeof a==&quot;string&quot;?a:&quot;n,e,s,w,se,sw,ne,nw&quot;;this.uiDialog.resizable({cancel:&quot;.ui-dialog-content&quot;,alsoResize:this.element,maxWidth:b.maxWidth,maxHeight:b.maxHeight,minWidth:b.minWidth,minHeight:b.minHeight,start:function(){f(this).addClass(&quot;ui-dialog-resizing&quot;);(b.resizeStart&amp;&amp;b.resizeStart.apply(h.element[0],arguments))},resize:function(){(b.resize&amp;&amp;b.resize.apply(h.element[0],arguments))},handles:c,stop:function(){f(this).removeClass(&quot;ui-dialog-resizing&quot;);b.height=f(this).height();b.width=f(this).width();(b.resizeStop&amp;&amp;b.resizeStop.apply(h.element[0],arguments));f.ui.dialog.overlay.resize()}}).find(&quot;.ui-resizable-se&quot;).addClass(&quot;ui-icon ui-icon-grip-diagonal-se&quot;)},_position:function(a){var k=f(window),j=f(document),c=j.scrollTop(),l=j.scrollLeft(),b=c;if(f.inArray(a,[&quot;center&quot;,&quot;top&quot;,&quot;right&quot;,&quot;bottom&quot;,&quot;left&quot;])&gt;=0){a=[a==&quot;right&quot;||a==&quot;left&quot;?a:&quot;center&quot;,a==&quot;top&quot;||a==&quot;bottom&quot;?a:&quot;middle&quot;]}if(a.constructor!=Array){a=[&quot;center&quot;,&quot;middle&quot;]}if(a[0].constructor==Number){l+=a[0]}else{switch(a[0]){case&quot;left&quot;:l+=0;break;case&quot;right&quot;:l+=k.width()-this.uiDialog.outerWidth();break;default:case&quot;center&quot;:l+=(k.width()-this.uiDialog.outerWidth())/2}}if(a[1].constructor==Number){c+=a[1]}else{switch(a[1]){case&quot;top&quot;:c+=0;break;case&quot;bottom&quot;:c+=k.height()-this.uiDialog.outerHeight();break;default:case&quot;middle&quot;:c+=(k.height()-this.uiDialog.outerHeight())/2}}c=Math.max(c,b);this.uiDialog.css({top:c,left:l})},_setData:function(c,b){(d[c]&amp;&amp;this.uiDialog.data(d[c],b));switch(c){case&quot;buttons&quot;:this._createButtons(b);break;case&quot;closeText&quot;:this.uiDialogTitlebarCloseText.text(b);break;case&quot;dialogClass&quot;:this.uiDialog.removeClass(this.options.dialogClass).addClass(e+b);break;case&quot;draggable&quot;:(b?this._makeDraggable():this.uiDialog.draggable(&quot;destroy&quot;));break;case&quot;height&quot;:this.uiDialog.height(b);break;case&quot;position&quot;:this._position(b);break;case&quot;resizable&quot;:var h=this.uiDialog,a=this.uiDialog.is(&quot;:data(resizable)&quot;);(a&amp;&amp;!b&amp;&amp;h.resizable(&quot;destroy&quot;));(a&amp;&amp;typeof b==&quot;string&quot;&amp;&amp;h.resizable(&quot;option&quot;,&quot;handles&quot;,b));(a||this._makeResizable(b));break;case&quot;title&quot;:f(&quot;.ui-dialog-title&quot;,this.uiDialogTitlebar).html(b||&quot;&amp;nbsp;&quot;);break;case&quot;width&quot;:this.uiDialog.width(b);break}f.widget.prototype._setData.apply(this,arguments)},_size:function(){var a=this.options;this.element.css({height:0,minHeight:0,width:&quot;auto&quot;});var b=this.uiDialog.css({height:&quot;auto&quot;,width:a.width}).height();this.element.css({minHeight:Math.max(a.minHeight-b,0),height:a.height==&quot;auto&quot;?&quot;auto&quot;:Math.max(a.height-b,0)})}});f.extend(f.ui.dialog,{version:&quot;1.7.1&quot;,defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:&quot;close&quot;,dialogClass:&quot;&quot;,draggable:true,hide:null,height:&quot;auto&quot;,maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:&quot;center&quot;,resizable:true,show:null,stack:true,title:&quot;&quot;,width:300,zIndex:1000},getter:&quot;isOpen&quot;,uuid:0,maxZ:0,getTitleId:function(a){return&quot;ui-dialog-title-&quot;+(a.attr(&quot;id&quot;)||++this.uuid)},overlay:function(a){this.$el=f.ui.dialog.overlay.create(a)}});f.extend(f.ui.dialog.overlay,{instances:[],maxZ:0,events:f.map(&quot;focus,mousedown,mouseup,keydown,keypress,click&quot;.split(&quot;,&quot;),function(a){return a+&quot;.dialog-overlay&quot;}).join(&quot; &quot;),create:function(a){if(this.instances.length===0){setTimeout(function(){f(document).bind(f.ui.dialog.overlay.events,function(h){var c=f(h.target).parents(&quot;.ui-dialog&quot;).css(&quot;zIndex&quot;)||0;return(c&gt;f.ui.dialog.overlay.maxZ)})},1);f(document).bind(&quot;keydown.dialog-overlay&quot;,function(c){(a.options.closeOnEscape&amp;&amp;c.keyCode&amp;&amp;c.keyCode==f.ui.keyCode.ESCAPE&amp;&amp;a.close(c))});f(window).bind(&quot;resize.dialog-overlay&quot;,f.ui.dialog.overlay.resize)}var b=f(&quot;&lt;div&gt;&lt;/div&gt;&quot;).appendTo(document.body).addClass(&quot;ui-widget-overlay&quot;).css({width:this.width(),height:this.height()});(a.options.bgiframe&amp;&amp;f.fn.bgiframe&amp;&amp;b.bgiframe());this.instances.push(b);return b},destroy:function(a){this.instances.splice(f.inArray(this.instances,a),1);if(this.instances.length===0){f([document,window]).unbind(&quot;.dialog-overlay&quot;)}a.remove()},height:function(){if(f.browser.msie&amp;&amp;f.browser.version&lt;7){var a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(a&lt;b){return f(window).height()+&quot;px&quot;}else{return a+&quot;px&quot;}}else{return f(document).height()+&quot;px&quot;}},width:function(){if(f.browser.msie&amp;&amp;f.browser.version&lt;7){var b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var a=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(b&lt;a){return f(window).width()+&quot;px&quot;}else{return b+&quot;px&quot;}}else{return f(document).width()+&quot;px&quot;}},resize:function(){var a=f([]);f.each(f.ui.dialog.overlay.instances,function(){a=a.add(this)});a.css({width:0,height:0}).css({width:f.ui.dialog.overlay.width(),height:f.ui.dialog.overlay.height()})}});f.extend(f.ui.dialog.overlay.prototype,{destroy:function(){f.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(b){b.widget(&quot;ui.slider&quot;,b.extend({},b.ui.mouse,{_init:function(){var a=this,d=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass(&quot;ui-slider ui-slider-&quot;+this.orientation+&quot; ui-widget ui-widget-content ui-corner-all&quot;);this.range=b([]);if(d.range){if(d.range===true){this.range=b(&quot;&lt;div&gt;&lt;/div&gt;&quot;);if(!d.values){d.values=[this._valueMin(),this._valueMin()]}if(d.values.length&amp;&amp;d.values.length!=2){d.values=[d.values[0],d.values[0]]}}else{this.range=b(&quot;&lt;div&gt;&lt;/div&gt;&quot;)}this.range.appendTo(this.element).addClass(&quot;ui-slider-range&quot;);if(d.range==&quot;min&quot;||d.range==&quot;max&quot;){this.range.addClass(&quot;ui-slider-range-&quot;+d.range)}this.range.addClass(&quot;ui-widget-header&quot;)}if(b(&quot;.ui-slider-handle&quot;,this.element).length==0){b('&lt;a href=&quot;#&quot;&gt;&lt;/a&gt;').appendTo(this.element).addClass(&quot;ui-slider-handle&quot;)}if(d.values&amp;&amp;d.values.length){while(b(&quot;.ui-slider-handle&quot;,this.element).length&lt;d.values.length){b('&lt;a href=&quot;#&quot;&gt;&lt;/a&gt;').appendTo(this.element).addClass(&quot;ui-slider-handle&quot;)}}this.handles=b(&quot;.ui-slider-handle&quot;,this.element).addClass(&quot;ui-state-default ui-corner-all&quot;);this.handle=this.handles.eq(0);this.handles.add(this.range).filter(&quot;a&quot;).click(function(c){c.preventDefault()}).hover(function(){b(this).addClass(&quot;ui-state-hover&quot;)},function(){b(this).removeClass(&quot;ui-state-hover&quot;)}).focus(function(){b(&quot;.ui-slider .ui-state-focus&quot;).removeClass(&quot;ui-state-focus&quot;);b(this).addClass(&quot;ui-state-focus&quot;)}).blur(function(){b(this).removeClass(&quot;ui-state-focus&quot;)});this.handles.each(function(c){b(this).data(&quot;index.ui-slider-handle&quot;,c)});this.handles.keydown(function(c){var l=true;var m=b(this).data(&quot;index.ui-slider-handle&quot;);if(a.options.disabled){return}switch(c.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:l=false;if(!a._keySliding){a._keySliding=true;b(this).addClass(&quot;ui-state-active&quot;);a._start(c,m)}break}var k,n,j=a._step();if(a.options.values&amp;&amp;a.options.values.length){k=n=a.values(m)}else{k=n=a.value()}switch(c.keyCode){case b.ui.keyCode.HOME:n=a._valueMin();break;case b.ui.keyCode.END:n=a._valueMax();break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(k==a._valueMax()){return}n=k+j;break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(k==a._valueMin()){return}n=k-j;break}a._slide(c,m,n);return l}).keyup(function(c){var f=b(this).data(&quot;index.ui-slider-handle&quot;);if(a._keySliding){a._stop(c,f);a._change(c,f);a._keySliding=false;b(this).removeClass(&quot;ui-state-active&quot;)}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass(&quot;ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all&quot;).removeData(&quot;slider&quot;).unbind(&quot;.slider&quot;);this._mouseDestroy()},_mouseCapture:function(r){var q=this.options;if(q.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var n={x:r.pageX,y:r.pageY};var l=this._normValueFromMouse(n);var u=this._valueMax()-this._valueMin()+1,p;var a=this,m;this.handles.each(function(d){var c=Math.abs(l-a.values(d));if(u&gt;c){u=c;p=b(this);m=d}});if(q.range==true&amp;&amp;this.values(1)==q.min){p=b(this.handles[++m])}this._start(r,m);a._handleIndex=m;p.addClass(&quot;ui-state-active&quot;).focus();var o=p.offset();var v=!b(r.target).parents().andSelf().is(&quot;.ui-slider-handle&quot;);this._clickOffset=v?{left:0,top:0}:{left:r.pageX-o.left-(p.width()/2),top:r.pageY-o.top-(p.height()/2)-(parseInt(p.css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(p.css(&quot;borderBottomWidth&quot;),10)||0)+(parseInt(p.css(&quot;marginTop&quot;),10)||0)};l=this._normValueFromMouse(n);this._slide(r,m,l);return true},_mouseStart:function(a){return true},_mouseDrag:function(e){var a={x:e.pageX,y:e.pageY};var f=this._normValueFromMouse(a);this._slide(e,this._handleIndex,f);return false},_mouseStop:function(a){this.handles.removeClass(&quot;ui-state-active&quot;);this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation==&quot;vertical&quot;?&quot;vertical&quot;:&quot;horizontal&quot;},_normValueFromMouse:function(o){var p,k;if(&quot;horizontal&quot;==this.orientation){p=this.elementSize.width;k=o.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{p=this.elementSize.height;k=o.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var m=(k/p);if(m&gt;1){m=1}if(m&lt;0){m=0}if(&quot;vertical&quot;==this.orientation){m=1-m}var n=this._valueMax()-this._valueMin(),j=m*n,a=j%this.options.step,l=this._valueMin()+j-a;if(a&gt;(this.options.step/2)){l+=this.options.step}return parseFloat(l.toFixed(5))},_start:function(e,f){var a={handle:this.handles[f],value:this.value()};if(this.options.values&amp;&amp;this.options.values.length){a.value=this.values(f);a.values=this.values()}this._trigger(&quot;start&quot;,e,a)},_slide:function(l,m,n){var k=this.handles[m];if(this.options.values&amp;&amp;this.options.values.length){var a=this.values(m?0:1);if((m==0&amp;&amp;n&gt;=a)||(m==1&amp;&amp;n&lt;=a)){n=a}if(n!=this.values(m)){var o=this.values();o[m]=n;var j=this._trigger(&quot;slide&quot;,l,{handle:this.handles[m],value:n,values:o});var a=this.values(m?0:1);if(j!==false){this.values(m,n,(l.type==&quot;mousedown&quot;&amp;&amp;this.options.animate),true)}}}else{if(n!=this.value()){var j=this._trigger(&quot;slide&quot;,l,{handle:this.handles[m],value:n});if(j!==false){this._setData(&quot;value&quot;,n,(l.type==&quot;mousedown&quot;&amp;&amp;this.options.animate))}}}},_stop:function(e,f){var a={handle:this.handles[f],value:this.value()};if(this.options.values&amp;&amp;this.options.values.length){a.value=this.values(f);a.values=this.values()}this._trigger(&quot;stop&quot;,e,a)},_change:function(e,f){var a={handle:this.handles[f],value:this.value()};if(this.options.values&amp;&amp;this.options.values.length){a.value=this.values(f);a.values=this.values()}this._trigger(&quot;change&quot;,e,a)},value:function(a){if(arguments.length){this._setData(&quot;value&quot;,a);this._change(null,0)}return this._value()},values:function(a,f,h,g){if(arguments.length&gt;1){this.options.values[a]=f;this._refreshValue(h);if(!g){this._change(null,a)}}if(arguments.length){if(this.options.values&amp;&amp;this.options.values.length){return this._values(a)}else{return this.value()}}else{return this._values()}},_setData:function(a,e,f){b.widget.prototype._setData.apply(this,arguments);switch(a){case&quot;orientation&quot;:this._detectOrientation();this.element.removeClass(&quot;ui-slider-horizontal ui-slider-vertical&quot;).addClass(&quot;ui-slider-&quot;+this.orientation);this._refreshValue(f);break;case&quot;value&quot;:this._refreshValue(f);break}},_step:function(){var a=this.options.step;return a},_value:function(){var a=this.options.value;if(a&lt;this._valueMin()){a=this._valueMin()}if(a&gt;this._valueMax()){a=this._valueMax()}return a},_values:function(a){if(arguments.length){var d=this.options.values[a];if(d&lt;this._valueMin()){d=this._valueMin()}if(d&gt;this._valueMax()){d=this._valueMax()}return d}else{return this.options.values}},_valueMin:function(){var a=this.options.min;return a},_valueMax:function(){var a=this.options.max;return a},_refreshValue:function(w){var r=this.options.range,v=this.options,a=this;if(this.options.values&amp;&amp;this.options.values.length){var o,p;this.handles.each(function(d,f){var e=(a.values(d)-a._valueMin())/(a._valueMax()-a._valueMin())*100;var c={};c[a.orientation==&quot;horizontal&quot;?&quot;left&quot;:&quot;bottom&quot;]=e+&quot;%&quot;;b(this).stop(1,1)[w?&quot;animate&quot;:&quot;css&quot;](c,v.animate);if(a.options.range===true){if(a.orientation==&quot;horizontal&quot;){(d==0)&amp;&amp;a.range.stop(1,1)[w?&quot;animate&quot;:&quot;css&quot;]({left:e+&quot;%&quot;},v.animate);(d==1)&amp;&amp;a.range[w?&quot;animate&quot;:&quot;css&quot;]({width:(e-lastValPercent)+&quot;%&quot;},{queue:false,duration:v.animate})}else{(d==0)&amp;&amp;a.range.stop(1,1)[w?&quot;animate&quot;:&quot;css&quot;]({bottom:(e)+&quot;%&quot;},v.animate);(d==1)&amp;&amp;a.range[w?&quot;animate&quot;:&quot;css&quot;]({height:(e-lastValPercent)+&quot;%&quot;},{queue:false,duration:v.animate})}}lastValPercent=e})}else{var n=this.value(),q=this._valueMin(),m=this._valueMax(),u=m!=q?(n-q)/(m-q)*100:0;var x={};x[a.orientation==&quot;horizontal&quot;?&quot;left&quot;:&quot;bottom&quot;]=u+&quot;%&quot;;this.handle.stop(1,1)[w?&quot;animate&quot;:&quot;css&quot;](x,v.animate);(r==&quot;min&quot;)&amp;&amp;(this.orientation==&quot;horizontal&quot;)&amp;&amp;this.range.stop(1,1)[w?&quot;animate&quot;:&quot;css&quot;]({width:u+&quot;%&quot;},v.animate);(r==&quot;max&quot;)&amp;&amp;(this.orientation==&quot;horizontal&quot;)&amp;&amp;this.range[w?&quot;animate&quot;:&quot;css&quot;]({width:(100-u)+&quot;%&quot;},{queue:false,duration:v.animate});(r==&quot;min&quot;)&amp;&amp;(this.orientation==&quot;vertical&quot;)&amp;&amp;this.range.stop(1,1)[w?&quot;animate&quot;:&quot;css&quot;]({height:u+&quot;%&quot;},v.animate);(r==&quot;max&quot;)&amp;&amp;(this.orientation==&quot;vertical&quot;)&amp;&amp;this.range[w?&quot;animate&quot;:&quot;css&quot;]({height:(100-u)+&quot;%&quot;},{queue:false,duration:v.animate})}}}));b.extend(b.ui.slider,{getter:&quot;value values&quot;,version:&quot;1.7.1&quot;,eventPrefix:&quot;slide&quot;,defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:&quot;horizontal&quot;,range:false,step:1,value:0,values:null}})})(jQuery);(function(b){b.widget(&quot;ui.tabs&quot;,{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(a,d){if(a==&quot;selected&quot;){if(this.options.collapsible&amp;&amp;d==this.options.selected){return}this.select(d)}else{this.options[a]=d;if(a==&quot;deselectable&quot;){this.options.collapsible=d}this._tabify()}},_tabId:function(a){return a.title&amp;&amp;a.title.replace(/\s/g,&quot;_&quot;).replace(/[^A-Za-z0-9\-_:\.]/g,&quot;&quot;)||this.options.idPrefix+b.data(a)},_sanitizeSelector:function(a){return a.replace(/:/g,&quot;\\:&quot;)},_cookie:function(){var a=this.cookie||(this.cookie=this.options.cookie.name||&quot;ui-tabs-&quot;+b.data(this.list[0]));return b.cookie.apply(null,[a].concat(b.makeArray(arguments)))},_ui:function(d,a){return{tab:d,panel:a,index:this.anchors.index(d)}},_cleanup:function(){this.lis.filter(&quot;.ui-state-processing&quot;).removeClass(&quot;ui-state-processing&quot;).find(&quot;span:data(label.tabs)&quot;).each(function(){var a=b(this);a.html(a.data(&quot;label.tabs&quot;)).removeData(&quot;label.tabs&quot;)})},_tabify:function(o){this.list=this.element.children(&quot;ul:first&quot;);this.lis=b(&quot;li:has(a[href])&quot;,this.list);this.anchors=this.lis.map(function(){return b(&quot;a&quot;,this)[0]});this.panels=b([]);var a=this,A=this.options;var B=/^#.+/;this.anchors.each(function(g,j){var h=b(j).attr(&quot;href&quot;);var f=h.split(&quot;#&quot;)[0],e;if(f&amp;&amp;(f===location.toString().split(&quot;#&quot;)[0]||(e=b(&quot;base&quot;)[0])&amp;&amp;f===e.href)){h=j.hash;j.href=h}if(B.test(h)){a.panels=a.panels.add(a._sanitizeSelector(h))}else{if(h!=&quot;#&quot;){b.data(j,&quot;href.tabs&quot;,h);b.data(j,&quot;load.tabs&quot;,h.replace(/#.*$/,&quot;&quot;));var c=a._tabId(j);j.href=&quot;#&quot;+c;var d=b(&quot;#&quot;+c);if(!d.length){d=b(A.panelTemplate).attr(&quot;id&quot;,c).addClass(&quot;ui-tabs-panel ui-widget-content ui-corner-bottom&quot;).insertAfter(a.panels[g-1]||a.list);d.data(&quot;destroy.tabs&quot;,true)}a.panels=a.panels.add(d)}else{A.disabled.push(g)}}});if(o){this.element.addClass(&quot;ui-tabs ui-widget ui-widget-content ui-corner-all&quot;);this.list.addClass(&quot;ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all&quot;);this.lis.addClass(&quot;ui-state-default ui-corner-top&quot;);this.panels.addClass(&quot;ui-tabs-panel ui-widget-content ui-corner-bottom&quot;);if(A.selected===undefined){if(location.hash){this.anchors.each(function(c,d){if(d.hash==location.hash){A.selected=c;return false}})}if(typeof A.selected!=&quot;number&quot;&amp;&amp;A.cookie){A.selected=parseInt(a._cookie(),10)}if(typeof A.selected!=&quot;number&quot;&amp;&amp;this.lis.filter(&quot;.ui-tabs-selected&quot;).length){A.selected=this.lis.index(this.lis.filter(&quot;.ui-tabs-selected&quot;))}A.selected=A.selected||0}else{if(A.selected===null){A.selected=-1}}A.selected=((A.selected&gt;=0&amp;&amp;this.anchors[A.selected])||A.selected&lt;0)?A.selected:0;A.disabled=b.unique(A.disabled.concat(b.map(this.lis.filter(&quot;.ui-state-disabled&quot;),function(c,d){return a.lis.index(c)}))).sort();if(b.inArray(A.selected,A.disabled)!=-1){A.disabled.splice(b.inArray(A.selected,A.disabled),1)}this.panels.addClass(&quot;ui-tabs-hide&quot;);this.lis.removeClass(&quot;ui-tabs-selected ui-state-active&quot;);if(A.selected&gt;=0&amp;&amp;this.anchors.length){this.panels.eq(A.selected).removeClass(&quot;ui-tabs-hide&quot;);this.lis.eq(A.selected).addClass(&quot;ui-tabs-selected ui-state-active&quot;);a.element.queue(&quot;tabs&quot;,function(){a._trigger(&quot;show&quot;,null,a._ui(a.anchors[A.selected],a.panels[A.selected]))});this.load(A.selected)}b(window).bind(&quot;unload&quot;,function(){a.lis.add(a.anchors).unbind(&quot;.tabs&quot;);a.lis=a.anchors=a.panels=null})}else{A.selected=this.lis.index(this.lis.filter(&quot;.ui-tabs-selected&quot;))}this.element[A.collapsible?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;ui-tabs-collapsible&quot;);if(A.cookie){this._cookie(A.selected,A.cookie)}for(var x=0,q;(q=this.lis[x]);x++){b(q)[b.inArray(x,A.disabled)!=-1&amp;&amp;!b(q).hasClass(&quot;ui-tabs-selected&quot;)?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;ui-state-disabled&quot;)}if(A.cache===false){this.anchors.removeData(&quot;cache.tabs&quot;)}this.lis.add(this.anchors).unbind(&quot;.tabs&quot;);if(A.event!=&quot;mouseover&quot;){var y=function(d,c){if(c.is(&quot;:not(.ui-state-disabled)&quot;)){c.addClass(&quot;ui-state-&quot;+d)}};var v=function(d,c){c.removeClass(&quot;ui-state-&quot;+d)};this.lis.bind(&quot;mouseover.tabs&quot;,function(){y(&quot;hover&quot;,b(this))});this.lis.bind(&quot;mouseout.tabs&quot;,function(){v(&quot;hover&quot;,b(this))});this.anchors.bind(&quot;focus.tabs&quot;,function(){y(&quot;focus&quot;,b(this).closest(&quot;li&quot;))});this.anchors.bind(&quot;blur.tabs&quot;,function(){v(&quot;focus&quot;,b(this).closest(&quot;li&quot;))})}var C,w;if(A.fx){if(b.isArray(A.fx)){C=A.fx[0];w=A.fx[1]}else{C=w=A.fx}}function z(c,d){c.css({display:&quot;&quot;});if(b.browser.msie&amp;&amp;d.opacity){c[0].style.removeAttribute(&quot;filter&quot;)}}var u=w?function(c,d){b(c).closest(&quot;li&quot;).removeClass(&quot;ui-state-default&quot;).addClass(&quot;ui-tabs-selected ui-state-active&quot;);d.hide().removeClass(&quot;ui-tabs-hide&quot;).animate(w,w.duration||&quot;normal&quot;,function(){z(d,w);a._trigger(&quot;show&quot;,null,a._ui(c,d[0]))})}:function(c,d){b(c).closest(&quot;li&quot;).removeClass(&quot;ui-state-default&quot;).addClass(&quot;ui-tabs-selected ui-state-active&quot;);d.removeClass(&quot;ui-tabs-hide&quot;);a._trigger(&quot;show&quot;,null,a._ui(c,d[0]))};var r=C?function(d,c){c.animate(C,C.duration||&quot;normal&quot;,function(){a.lis.removeClass(&quot;ui-tabs-selected ui-state-active&quot;).addClass(&quot;ui-state-default&quot;);c.addClass(&quot;ui-tabs-hide&quot;);z(c,C);a.element.dequeue(&quot;tabs&quot;)})}:function(e,c,d){a.lis.removeClass(&quot;ui-tabs-selected ui-state-active&quot;).addClass(&quot;ui-state-default&quot;);c.addClass(&quot;ui-tabs-hide&quot;);a.element.dequeue(&quot;tabs&quot;)};this.anchors.bind(A.event+&quot;.tabs&quot;,function(){var f=this,d=b(this).closest(&quot;li&quot;),c=a.panels.filter(&quot;:not(.ui-tabs-hide)&quot;),e=b(a._sanitizeSelector(this.hash));if((d.hasClass(&quot;ui-tabs-selected&quot;)&amp;&amp;!A.collapsible)||d.hasClass(&quot;ui-state-disabled&quot;)||d.hasClass(&quot;ui-state-processing&quot;)||a._trigger(&quot;select&quot;,null,a._ui(this,e[0]))===false){this.blur();return false}A.selected=a.anchors.index(this);a.abort();if(A.collapsible){if(d.hasClass(&quot;ui-tabs-selected&quot;)){A.selected=-1;if(A.cookie){a._cookie(A.selected,A.cookie)}a.element.queue(&quot;tabs&quot;,function(){r(f,c)}).dequeue(&quot;tabs&quot;);this.blur();return false}else{if(!c.length){if(A.cookie){a._cookie(A.selected,A.cookie)}a.element.queue(&quot;tabs&quot;,function(){u(f,e)});a.load(a.anchors.index(this));this.blur();return false}}}if(A.cookie){a._cookie(A.selected,A.cookie)}if(e.length){if(c.length){a.element.queue(&quot;tabs&quot;,function(){r(f,c)})}a.element.queue(&quot;tabs&quot;,function(){u(f,e)});a.load(a.anchors.index(this))}else{throw&quot;jQuery UI Tabs: Mismatching fragment identifier.&quot;}if(b.browser.msie){this.blur()}});this.anchors.bind(&quot;click.tabs&quot;,function(){return false})},destroy:function(){var a=this.options;this.abort();this.element.unbind(&quot;.tabs&quot;).removeClass(&quot;ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible&quot;).removeData(&quot;tabs&quot;);this.list.removeClass(&quot;ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all&quot;);this.anchors.each(function(){var f=b.data(this,&quot;href.tabs&quot;);if(f){this.href=f}var e=b(this).unbind(&quot;.tabs&quot;);b.each([&quot;href&quot;,&quot;load&quot;,&quot;cache&quot;],function(d,c){e.removeData(c+&quot;.tabs&quot;)})});this.lis.unbind(&quot;.tabs&quot;).add(this.panels).each(function(){if(b.data(this,&quot;destroy.tabs&quot;)){b(this).remove()}else{b(this).removeClass([&quot;ui-state-default&quot;,&quot;ui-corner-top&quot;,&quot;ui-tabs-selected&quot;,&quot;ui-state-active&quot;,&quot;ui-state-hover&quot;,&quot;ui-state-focus&quot;,&quot;ui-state-disabled&quot;,&quot;ui-tabs-panel&quot;,&quot;ui-widget-content&quot;,&quot;ui-corner-bottom&quot;,&quot;ui-tabs-hide&quot;].join(&quot; &quot;))}});if(a.cookie){this._cookie(null,a.cookie)}},add:function(n,o,p){if(p===undefined){p=this.anchors.length}var a=this,l=this.options,j=b(l.tabTemplate.replace(/#\{href\}/g,n).replace(/#\{label\}/g,o)),k=!n.indexOf(&quot;#&quot;)?n.replace(&quot;#&quot;,&quot;&quot;):this._tabId(b(&quot;a&quot;,j)[0]);j.addClass(&quot;ui-state-default ui-corner-top&quot;).data(&quot;destroy.tabs&quot;,true);var m=b(&quot;#&quot;+k);if(!m.length){m=b(l.panelTemplate).attr(&quot;id&quot;,k).data(&quot;destroy.tabs&quot;,true)}m.addClass(&quot;ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide&quot;);if(p&gt;=this.lis.length){j.appendTo(this.list);m.appendTo(this.list[0].parentNode)}else{j.insertBefore(this.lis[p]);m.insertBefore(this.panels[p])}l.disabled=b.map(l.disabled,function(c,d){return c&gt;=p?++c:c});this._tabify();if(this.anchors.length==1){j.addClass(&quot;ui-tabs-selected ui-state-active&quot;);m.removeClass(&quot;ui-tabs-hide&quot;);this.element.queue(&quot;tabs&quot;,function(){a._trigger(&quot;show&quot;,null,a._ui(a.anchors[0],a.panels[0]))});this.load(0)}this._trigger(&quot;add&quot;,null,this._ui(this.anchors[p],this.panels[p]))},remove:function(a){var g=this.options,f=this.lis.eq(a).remove(),h=this.panels.eq(a).remove();if(f.hasClass(&quot;ui-tabs-selected&quot;)&amp;&amp;this.anchors.length&gt;1){this.select(a+(a+1&lt;this.anchors.length?1:-1))}g.disabled=b.map(b.grep(g.disabled,function(c,d){return c!=a}),function(c,d){return c&gt;=a?--c:c});this._tabify();this._trigger(&quot;remove&quot;,null,this._ui(f.find(&quot;a&quot;)[0],h[0]))},enable:function(a){var d=this.options;if(b.inArray(a,d.disabled)==-1){return}this.lis.eq(a).removeClass(&quot;ui-state-disabled&quot;);d.disabled=b.grep(d.disabled,function(c,f){return c!=a});this._trigger(&quot;enable&quot;,null,this._ui(this.anchors[a],this.panels[a]))},disable:function(f){var a=this,e=this.options;if(f!=e.selected){this.lis.eq(f).addClass(&quot;ui-state-disabled&quot;);e.disabled.push(f);e.disabled.sort();this._trigger(&quot;disable&quot;,null,this._ui(this.anchors[f],this.panels[f]))}},select:function(a){if(typeof a==&quot;string&quot;){a=this.anchors.index(this.anchors.filter(&quot;[href$=&quot;+a+&quot;]&quot;))}else{if(a===null){a=-1}}if(a==-1&amp;&amp;this.options.collapsible){a=this.options.selected}this.anchors.eq(a).trigger(this.options.event+&quot;.tabs&quot;)},load:function(k){var m=this,h=this.options,a=this.anchors.eq(k)[0],l=b.data(a,&quot;load.tabs&quot;);this.abort();if(!l||this.element.queue(&quot;tabs&quot;).length!==0&amp;&amp;b.data(a,&quot;cache.tabs&quot;)){this.element.dequeue(&quot;tabs&quot;);return}this.lis.eq(k).addClass(&quot;ui-state-processing&quot;);if(h.spinner){var j=b(&quot;span&quot;,a);j.data(&quot;label.tabs&quot;,j.html()).html(h.spinner)}this.xhr=b.ajax(b.extend({},h.ajaxOptions,{url:l,success:function(d,e){b(m._sanitizeSelector(a.hash)).html(d);m._cleanup();if(h.cache){b.data(a,&quot;cache.tabs&quot;,true)}m._trigger(&quot;load&quot;,null,m._ui(m.anchors[k],m.panels[k]));try{h.ajaxOptions.success(d,e)}catch(c){}m.element.dequeue(&quot;tabs&quot;)}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(d,a){this.anchors.eq(d).removeData(&quot;cache.tabs&quot;).data(&quot;load.tabs&quot;,a)},length:function(){return this.anchors.length}});b.extend(b.ui.tabs,{version:&quot;1.7.1&quot;,getter:&quot;length&quot;,defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:&quot;click&quot;,fx:null,idPrefix:&quot;ui-tabs-&quot;,panelTemplate:&quot;&lt;div&gt;&lt;/div&gt;&quot;,spinner:&quot;&lt;em&gt;Loading&amp;#8230;&lt;/em&gt;&quot;,tabTemplate:'&lt;li&gt;&lt;a href=&quot;#{href}&quot;&gt;&lt;span&gt;#{label}&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;'}});b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(l,j){var a=this,h=this.options;var m=a._rotate||(a._rotate=function(c){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var d=h.selected;a.select(++d&lt;a.anchors.length?d:0)},l);if(c){c.stopPropagation()}});var k=a._unrotate||(a._unrotate=!j?function(c){if(c.clientX){a.rotate(null)}}:function(c){t=h.selected;m()});if(l){this.element.bind(&quot;tabsshow&quot;,m);this.anchors.bind(h.event+&quot;.tabs&quot;,k);m()}else{clearTimeout(a.rotation);this.element.unbind(&quot;tabsshow&quot;,m);this.anchors.unbind(h.event+&quot;.tabs&quot;,k);delete this._rotate;delete this._unrotate}}})})(jQuery);(function($){$.extend($.ui,{datepicker:{version:&quot;1.7.1&quot;}});var PROP_NAME=&quot;datepicker&quot;;function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId=&quot;ui-datepicker-div&quot;;this._inlineClass=&quot;ui-datepicker-inline&quot;;this._appendClass=&quot;ui-datepicker-append&quot;;this._triggerClass=&quot;ui-datepicker-trigger&quot;;this._dialogClass=&quot;ui-datepicker-dialog&quot;;this._disableClass=&quot;ui-datepicker-disabled&quot;;this._unselectableClass=&quot;ui-datepicker-unselectable&quot;;this._currentClass=&quot;ui-datepicker-current-day&quot;;this._dayOverClass=&quot;ui-datepicker-days-cell-over&quot;;this.regional=[];this.regional[&quot;&quot;]={closeText:&quot;Done&quot;,prevText:&quot;Prev&quot;,nextText:&quot;Next&quot;,currentText:&quot;Today&quot;,monthNames:[&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;],monthNamesShort:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;],dayNames:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],dayNamesShort:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;],dayNamesMin:[&quot;Su&quot;,&quot;Mo&quot;,&quot;Tu&quot;,&quot;We&quot;,&quot;Th&quot;,&quot;Fr&quot;,&quot;Sa&quot;],dateFormat:&quot;mm/dd/yy&quot;,firstDay:0,isRTL:false};this._defaults={showOn:&quot;focus&quot;,showAnim:&quot;show&quot;,showOptions:{},defaultDate:null,appendText:&quot;&quot;,buttonText:&quot;...&quot;,buttonImage:&quot;&quot;,buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:&quot;-10:+10&quot;,showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:&quot;+10&quot;,minDate:null,maxDate:null,duration:&quot;normal&quot;,beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:&quot;&quot;,altFormat:&quot;&quot;,constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[&quot;&quot;]);this.dpDiv=$('&lt;div id=&quot;'+this._mainDivId+'&quot; class=&quot;ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible&quot;&gt;&lt;/div&gt;')}$.extend(Datepicker.prototype,{markerClassName:&quot;hasDatepicker&quot;,log:function(){if(this.debug){console.log.apply(&quot;&quot;,arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute(&quot;date:&quot;+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName==&quot;div&quot;||nodeName==&quot;span&quot;);if(!target.id){target.id=&quot;dp&quot;+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName==&quot;input&quot;){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,&quot;\\\\$1&quot;);return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('&lt;div class=&quot;'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all&quot;&gt;&lt;/div&gt;'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,&quot;appendText&quot;);var isRTL=this._get(inst,&quot;isRTL&quot;);if(appendText){input[isRTL?&quot;before&quot;:&quot;after&quot;]('&lt;span class=&quot;'+this._appendClass+'&quot;&gt;'+appendText+&quot;&lt;/span&gt;&quot;)}var showOn=this._get(inst,&quot;showOn&quot;);if(showOn==&quot;focus&quot;||showOn==&quot;both&quot;){input.focus(this._showDatepicker)}if(showOn==&quot;button&quot;||showOn==&quot;both&quot;){var buttonText=this._get(inst,&quot;buttonText&quot;);var buttonImage=this._get(inst,&quot;buttonImage&quot;);inst.trigger=$(this._get(inst,&quot;buttonImageOnly&quot;)?$(&quot;&lt;img/&gt;&quot;).addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('&lt;button type=&quot;button&quot;&gt;&lt;/button&gt;').addClass(this._triggerClass).html(buttonImage==&quot;&quot;?buttonText:$(&quot;&lt;img/&gt;&quot;).attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?&quot;before&quot;:&quot;after&quot;](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&amp;&amp;$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind(&quot;setData.datepicker&quot;,function(event,key,value){inst.settings[key]=value}).bind(&quot;getData.datepicker&quot;,function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind(&quot;setData.datepicker&quot;,function(event,key,value){inst.settings[key]=value}).bind(&quot;getData.datepicker&quot;,function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id=&quot;dp&quot;+(++this.uuid);this._dialogInput=$('&lt;input type=&quot;text&quot; id=&quot;'+id+'&quot; size=&quot;1&quot; style=&quot;position: absolute; top: -100px;&quot;/&gt;');this._dialogInput.keydown(this._doKeyDown);$(&quot;body&quot;).append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css(&quot;left&quot;,this._pos[0]+&quot;px&quot;).css(&quot;top&quot;,this._pos[1]+&quot;px&quot;);inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName==&quot;input&quot;){inst.trigger.remove();$target.siblings(&quot;.&quot;+this._appendClass).remove().end().removeClass(this.markerClassName).unbind(&quot;focus&quot;,this._showDatepicker).unbind(&quot;keydown&quot;,this._doKeyDown).unbind(&quot;keypress&quot;,this._doKeyPress)}else{if(nodeName==&quot;div&quot;||nodeName==&quot;span&quot;){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName==&quot;input&quot;){target.disabled=false;inst.trigger.filter(&quot;button&quot;).each(function(){this.disabled=false}).end().filter(&quot;img&quot;).css({opacity:&quot;1.0&quot;,cursor:&quot;&quot;})}else{if(nodeName==&quot;div&quot;||nodeName==&quot;span&quot;){var inline=$target.children(&quot;.&quot;+this._inlineClass);inline.children().removeClass(&quot;ui-state-disabled&quot;)}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName==&quot;input&quot;){target.disabled=true;inst.trigger.filter(&quot;button&quot;).each(function(){this.disabled=true}).end().filter(&quot;img&quot;).css({opacity:&quot;0.5&quot;,cursor:&quot;default&quot;})}else{if(nodeName==&quot;div&quot;||nodeName==&quot;span&quot;){var inline=$target.children(&quot;.&quot;+this._inlineClass);inline.children().addClass(&quot;ui-state-disabled&quot;)}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i&lt;this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw&quot;Missing instance data for this datepicker&quot;}},_optionDatepicker:function(target,name,value){var settings=name||{};if(typeof name==&quot;string&quot;){settings={};settings[name]=value}var inst=this._getInst(target);if(inst){if(this._curInst==inst){this._hideDatepicker(null)}extendRemove(inst.settings,settings);var date=new Date();extendRemove(inst,{rangeStart:null,endDay:null,endMonth:null,endYear:null,selectedDay:date.getDate(),selectedMonth:date.getMonth(),selectedYear:date.getFullYear(),currentDay:date.getDate(),currentMonth:date.getMonth(),currentYear:date.getFullYear(),drawMonth:date.getMonth(),drawYear:date.getFullYear()});this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&amp;&amp;!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(&quot;.ui-datepicker-rtl&quot;);inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,&quot;&quot;);break;case 13:var sel=$(&quot;td.&quot;+$.datepicker._dayOverClass+&quot;, td.&quot;+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,&quot;duration&quot;))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,&quot;duration&quot;));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,&quot;stepBigMonths&quot;):-$.datepicker._get(inst,&quot;stepMonths&quot;)),&quot;M&quot;);break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,&quot;stepBigMonths&quot;):+$.datepicker._get(inst,&quot;stepMonths&quot;)),&quot;M&quot;);break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),&quot;D&quot;)}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,&quot;stepBigMonths&quot;):-$.datepicker._get(inst,&quot;stepMonths&quot;)),&quot;M&quot;)}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,&quot;D&quot;)}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),&quot;D&quot;)}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,&quot;stepBigMonths&quot;):+$.datepicker._get(inst,&quot;stepMonths&quot;)),&quot;M&quot;)}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,&quot;D&quot;)}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&amp;&amp;event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,&quot;constrainInput&quot;)){var chars=$.datepicker._possibleChars($.datepicker._get(inst,&quot;dateFormat&quot;));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr&lt;&quot; &quot;||!chars||chars.indexOf(chr)&gt;-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!=&quot;input&quot;){input=$(&quot;input&quot;,input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,&quot;beforeShow&quot;);extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,&quot;&quot;);$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=&quot;&quot;}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css(&quot;position&quot;)==&quot;fixed&quot;;return !isFixed});if(isFixed&amp;&amp;$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:&quot;absolute&quot;,display:&quot;block&quot;,top:&quot;-1000px&quot;});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&amp;&amp;$.blockUI?&quot;static&quot;:(isFixed?&quot;fixed&quot;:&quot;absolute&quot;)),display:&quot;none&quot;,left:offset.left+&quot;px&quot;,top:offset.top+&quot;px&quot;});if(!inst.inline){var showAnim=$.datepicker._get(inst,&quot;showAnim&quot;)||&quot;show&quot;;var duration=$.datepicker._get(inst,&quot;duration&quot;);var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&amp;&amp;parseInt($.browser.version,10)&lt;7){$(&quot;iframe.ui-datepicker-cover&quot;).css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&amp;&amp;$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,&quot;showOptions&quot;),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==&quot;&quot;){postProcess()}if(inst.input[0].type!=&quot;hidden&quot;){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find(&quot;iframe.ui-datepicker-cover&quot;).css({width:dims.width,height:dims.height}).end().find(&quot;button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a&quot;).bind(&quot;mouseout&quot;,function(){$(this).removeClass(&quot;ui-state-hover&quot;);if(this.className.indexOf(&quot;ui-datepicker-prev&quot;)!=-1){$(this).removeClass(&quot;ui-datepicker-prev-hover&quot;)}if(this.className.indexOf(&quot;ui-datepicker-next&quot;)!=-1){$(this).removeClass(&quot;ui-datepicker-next-hover&quot;)}}).bind(&quot;mouseover&quot;,function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(&quot;.ui-datepicker-calendar&quot;).find(&quot;a&quot;).removeClass(&quot;ui-state-hover&quot;);$(this).addClass(&quot;ui-state-hover&quot;);if(this.className.indexOf(&quot;ui-datepicker-prev&quot;)!=-1){$(this).addClass(&quot;ui-datepicker-prev-hover&quot;)}if(this.className.indexOf(&quot;ui-datepicker-next&quot;)!=-1){$(this).addClass(&quot;ui-datepicker-next-hover&quot;)}}}).end().find(&quot;.&quot;+this._dayOverClass+&quot; a&quot;).trigger(&quot;mouseover&quot;).end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols&gt;1){inst.dpDiv.addClass(&quot;ui-datepicker-multi-&quot;+cols).css(&quot;width&quot;,(width*cols)+&quot;em&quot;)}else{inst.dpDiv.removeClass(&quot;ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4&quot;).width(&quot;&quot;)}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?&quot;add&quot;:&quot;remove&quot;)+&quot;Class&quot;](&quot;ui-datepicker-multi&quot;);inst.dpDiv[(this._get(inst,&quot;isRTL&quot;)?&quot;add&quot;:&quot;remove&quot;)+&quot;Class&quot;](&quot;ui-datepicker-rtl&quot;);if(inst.input&amp;&amp;inst.input[0].type!=&quot;hidden&quot;&amp;&amp;inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,&quot;isRTL&quot;)?(dpWidth-inputWidth):0);offset.left-=(isFixed&amp;&amp;offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&amp;&amp;offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth&gt;viewWidth&amp;&amp;viewWidth&gt;dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight&gt;viewHeight&amp;&amp;viewHeight&gt;dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&amp;&amp;(obj.type==&quot;hidden&quot;||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&amp;&amp;inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate(&quot;#&quot;+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,&quot;duration&quot;));var showAnim=this._get(inst,&quot;showAnim&quot;);var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=&quot;&quot;&amp;&amp;$.effects&amp;&amp;$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,&quot;showOptions&quot;),duration,postProcess)}else{inst.dpDiv[(duration==&quot;&quot;?&quot;hide&quot;:(showAnim==&quot;slideDown&quot;?&quot;slideUp&quot;:(showAnim==&quot;fadeIn&quot;?&quot;fadeOut&quot;:&quot;hide&quot;)))](duration,postProcess)}if(duration==&quot;&quot;){this._tidyDialog(inst)}var onClose=this._get(inst,&quot;onClose&quot;);if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():&quot;&quot;),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:&quot;absolute&quot;,left:&quot;0&quot;,top:&quot;-100px&quot;});if($.blockUI){$.unblockUI();$(&quot;body&quot;).append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(&quot;.ui-datepicker-calendar&quot;)},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents(&quot;#&quot;+$.datepicker._mainDivId).length==0)&amp;&amp;!$target.hasClass($.datepicker.markerClassName)&amp;&amp;!$target.hasClass($.datepicker._triggerClass)&amp;&amp;$.datepicker._datepickerShowing&amp;&amp;!($.datepicker._inDialog&amp;&amp;$.blockUI)){$.datepicker._hideDatepicker(null,&quot;&quot;)}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period==&quot;M&quot;?this._get(inst,&quot;showCurrentAtPos&quot;):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,&quot;gotoCurrent&quot;)&amp;&amp;inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst[&quot;selected&quot;+(period==&quot;M&quot;?&quot;Month&quot;:&quot;Year&quot;)]=inst[&quot;draw&quot;+(period==&quot;M&quot;?&quot;Month&quot;:&quot;Year&quot;)]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&amp;&amp;inst._selectingMonthYear&amp;&amp;!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$(&quot;a&quot;,td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,&quot;&quot;)},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,&quot;onSelect&quot;);if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger(&quot;change&quot;)}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,&quot;duration&quot;));this._lastInput=inst.input[0];if(typeof(inst.input[0])!=&quot;object&quot;){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,&quot;altField&quot;);if(altField){var altFormat=this._get(inst,&quot;altFormat&quot;)||this._get(inst,&quot;dateFormat&quot;);var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day&gt;0&amp;&amp;day&lt;6),&quot;&quot;]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay&lt;4&amp;&amp;checkDate&lt;firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate&gt;new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay&gt;4&amp;&amp;(checkDate.getDay()||7)&lt;firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw&quot;Invalid arguments&quot;}value=(typeof value==&quot;object&quot;?value.toString():value+&quot;&quot;);if(value==&quot;&quot;){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1&lt;format.length&amp;&amp;format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match==&quot;@&quot;?14:(match==&quot;y&quot;?4:(match==&quot;o&quot;?3:2)));var size=origSize;var num=0;while(size&gt;0&amp;&amp;iValue&lt;value.length&amp;&amp;value.charAt(iValue)&gt;=&quot;0&quot;&amp;&amp;value.charAt(iValue)&lt;=&quot;9&quot;){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw&quot;Missing number at position &quot;+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j&lt;names.length;j++){size=Math.max(size,names[j].length)}var name=&quot;&quot;;var iInit=iValue;while(size&gt;0&amp;&amp;iValue&lt;value.length){name+=value.charAt(iValue++);for(var i=0;i&lt;names.length;i++){if(name==names[i]){return i+1}}size--}throw&quot;Unknown name at position &quot;+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw&quot;Unexpected literal at position &quot;+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat&lt;format.length;iFormat++){if(literal){if(format.charAt(iFormat)==&quot;'&quot;&amp;&amp;!lookAhead(&quot;'&quot;)){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case&quot;d&quot;:day=getNumber(&quot;d&quot;);break;case&quot;D&quot;:getName(&quot;D&quot;,dayNamesShort,dayNames);break;case&quot;o&quot;:doy=getNumber(&quot;o&quot;);break;case&quot;m&quot;:month=getNumber(&quot;m&quot;);break;case&quot;M&quot;:month=getName(&quot;M&quot;,monthNamesShort,monthNames);break;case&quot;y&quot;:year=getNumber(&quot;y&quot;);break;case&quot;@&quot;:var date=new Date(getNumber(&quot;@&quot;));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case&quot;'&quot;:if(lookAhead(&quot;'&quot;)){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year&lt;100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year&lt;=shortYearCutoff?0:-100)}}if(doy&gt;-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day&lt;=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw&quot;Invalid date&quot;}return date},ATOM:&quot;yy-mm-dd&quot;,COOKIE:&quot;D, dd M yy&quot;,ISO_8601:&quot;yy-mm-dd&quot;,RFC_822:&quot;D, d M y&quot;,RFC_850:&quot;DD, dd-M-y&quot;,RFC_1036:&quot;D, d M y&quot;,RFC_1123:&quot;D, d M yy&quot;,RFC_2822:&quot;D, d M yy&quot;,RSS:&quot;D, d M y&quot;,TIMESTAMP:&quot;@&quot;,W3C:&quot;yy-mm-dd&quot;,formatDate:function(format,date,settings){if(!date){return&quot;&quot;}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1&lt;format.length&amp;&amp;format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=&quot;&quot;+value;if(lookAhead(match)){while(num.length&lt;len){num=&quot;0&quot;+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output=&quot;&quot;;var literal=false;if(date){for(var iFormat=0;iFormat&lt;format.length;iFormat++){if(literal){if(format.charAt(iFormat)==&quot;'&quot;&amp;&amp;!lookAhead(&quot;'&quot;)){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case&quot;d&quot;:output+=formatNumber(&quot;d&quot;,date.getDate(),2);break;case&quot;D&quot;:output+=formatName(&quot;D&quot;,date.getDay(),dayNamesShort,dayNames);break;case&quot;o&quot;:var doy=date.getDate();for(var m=date.getMonth()-1;m&gt;=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber(&quot;o&quot;,doy,3);break;case&quot;m&quot;:output+=formatNumber(&quot;m&quot;,date.getMonth()+1,2);break;case&quot;M&quot;:output+=formatName(&quot;M&quot;,date.getMonth(),monthNamesShort,monthNames);break;case&quot;y&quot;:output+=(lookAhead(&quot;y&quot;)?date.getFullYear():(date.getYear()%100&lt;10?&quot;0&quot;:&quot;&quot;)+date.getYear()%100);break;case&quot;@&quot;:output+=date.getTime();break;case&quot;'&quot;:if(lookAhead(&quot;'&quot;)){output+=&quot;'&quot;}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars=&quot;&quot;;var literal=false;for(var iFormat=0;iFormat&lt;format.length;iFormat++){if(literal){if(format.charAt(iFormat)==&quot;'&quot;&amp;&amp;!lookAhead(&quot;'&quot;)){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case&quot;d&quot;:case&quot;m&quot;:case&quot;y&quot;:case&quot;@&quot;:chars+=&quot;0123456789&quot;;break;case&quot;D&quot;:case&quot;M&quot;:return null;case&quot;'&quot;:if(lookAhead(&quot;'&quot;)){chars+=&quot;'&quot;}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,&quot;dateFormat&quot;);var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,&quot;defaultDate&quot;),new Date());var minDate=this._getMinMaxDate(inst,&quot;min&quot;,true);var maxDate=this._getMinMaxDate(inst,&quot;max&quot;);date=(minDate&amp;&amp;date&lt;minDate?minDate:date);date=(maxDate&amp;&amp;date&gt;maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||&quot;d&quot;){case&quot;d&quot;:case&quot;D&quot;:day+=parseInt(matches[1],10);break;case&quot;w&quot;:case&quot;W&quot;:day+=parseInt(matches[1],10)*7;break;case&quot;m&quot;:case&quot;M&quot;:month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case&quot;y&quot;:case&quot;Y&quot;:year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date==&quot;string&quot;?offsetString(date,this._getDaysInMonth):(typeof date==&quot;number&quot;?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&amp;&amp;date.toString()==&quot;Invalid Date&quot;?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()&gt;12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?&quot;&quot;:this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&amp;&amp;inst.input.val()==&quot;&quot;)?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,&quot;isRTL&quot;);var showButtonPanel=this._get(inst,&quot;showButtonPanel&quot;);var hideIfNoPrevNext=this._get(inst,&quot;hideIfNoPrevNext&quot;);var navigationAsDateFormat=this._get(inst,&quot;navigationAsDateFormat&quot;);var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,&quot;showCurrentAtPos&quot;);var stepMonths=this._get(inst,&quot;stepMonths&quot;);var stepBigMonths=this._get(inst,&quot;stepBigMonths&quot;);var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,&quot;min&quot;,true);var maxDate=this._getMinMaxDate(inst,&quot;max&quot;);var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth&lt;0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&amp;&amp;maxDraw&lt;minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))&gt;maxDraw){drawMonth--;if(drawMonth&lt;0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,&quot;prevText&quot;);prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'&lt;a class=&quot;ui-datepicker-prev ui-corner-all&quot; onclick=&quot;DP_jQuery.datepicker._adjustDate(\'#'+inst.id+&quot;', -&quot;+stepMonths+&quot;, 'M');\&quot; title=\&quot;&quot;+prevText+'&quot;&gt;&lt;span class=&quot;ui-icon ui-icon-circle-triangle-'+(isRTL?&quot;e&quot;:&quot;w&quot;)+'&quot;&gt;'+prevText+&quot;&lt;/span&gt;&lt;/a&gt;&quot;:(hideIfNoPrevNext?&quot;&quot;:'&lt;a class=&quot;ui-datepicker-prev ui-corner-all ui-state-disabled&quot; title=&quot;'+prevText+'&quot;&gt;&lt;span class=&quot;ui-icon ui-icon-circle-triangle-'+(isRTL?&quot;e&quot;:&quot;w&quot;)+'&quot;&gt;'+prevText+&quot;&lt;/span&gt;&lt;/a&gt;&quot;));var nextText=this._get(inst,&quot;nextText&quot;);nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'&lt;a class=&quot;ui-datepicker-next ui-corner-all&quot; onclick=&quot;DP_jQuery.datepicker._adjustDate(\'#'+inst.id+&quot;', +&quot;+stepMonths+&quot;, 'M');\&quot; title=\&quot;&quot;+nextText+'&quot;&gt;&lt;span class=&quot;ui-icon ui-icon-circle-triangle-'+(isRTL?&quot;w&quot;:&quot;e&quot;)+'&quot;&gt;'+nextText+&quot;&lt;/span&gt;&lt;/a&gt;&quot;:(hideIfNoPrevNext?&quot;&quot;:'&lt;a class=&quot;ui-datepicker-next ui-corner-all ui-state-disabled&quot; title=&quot;'+nextText+'&quot;&gt;&lt;span class=&quot;ui-icon ui-icon-circle-triangle-'+(isRTL?&quot;w&quot;:&quot;e&quot;)+'&quot;&gt;'+nextText+&quot;&lt;/span&gt;&lt;/a&gt;&quot;));var currentText=this._get(inst,&quot;currentText&quot;);var gotoDate=(this._get(inst,&quot;gotoCurrent&quot;)&amp;&amp;inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'&lt;button type=&quot;button&quot; class=&quot;ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all&quot; onclick=&quot;DP_jQuery.datepicker._hideDatepicker();&quot;&gt;'+this._get(inst,&quot;closeText&quot;)+&quot;&lt;/button&gt;&quot;:&quot;&quot;);var buttonPanel=(showButtonPanel)?'&lt;div class=&quot;ui-datepicker-buttonpane ui-widget-content&quot;&gt;'+(isRTL?controls:&quot;&quot;)+(this._isInRange(inst,gotoDate)?'&lt;button type=&quot;button&quot; class=&quot;ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all&quot; onclick=&quot;DP_jQuery.datepicker._gotoToday(\'#'+inst.id+&quot;');\&quot;&gt;&quot;+currentText+&quot;&lt;/button&gt;&quot;:&quot;&quot;)+(isRTL?&quot;&quot;:controls)+&quot;&lt;/div&gt;&quot;:&quot;&quot;;var firstDay=parseInt(this._get(inst,&quot;firstDay&quot;),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,&quot;dayNames&quot;);var dayNamesShort=this._get(inst,&quot;dayNamesShort&quot;);var dayNamesMin=this._get(inst,&quot;dayNamesMin&quot;);var monthNames=this._get(inst,&quot;monthNames&quot;);var monthNamesShort=this._get(inst,&quot;monthNamesShort&quot;);var beforeShowDay=this._get(inst,&quot;beforeShowDay&quot;);var showOtherMonths=this._get(inst,&quot;showOtherMonths&quot;);var calculateWeek=this._get(inst,&quot;calculateWeek&quot;)||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html=&quot;&quot;;for(var row=0;row&lt;numMonths[0];row++){var group=&quot;&quot;;for(var col=0;col&lt;numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=&quot; ui-corner-all&quot;;var calender=&quot;&quot;;if(isMultiMonth){calender+='&lt;div class=&quot;ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+=&quot;first&quot;;cornerClass=&quot; ui-corner-&quot;+(isRTL?&quot;right&quot;:&quot;left&quot;);break;case numMonths[1]-1:calender+=&quot;last&quot;;cornerClass=&quot; ui-corner-&quot;+(isRTL?&quot;left&quot;:&quot;right&quot;);break;default:calender+=&quot;middle&quot;;cornerClass=&quot;&quot;;break}calender+='&quot;&gt;'}calender+='&lt;div class=&quot;ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'&quot;&gt;'+(/all|left/.test(cornerClass)&amp;&amp;row==0?(isRTL?next:prev):&quot;&quot;)+(/all|right/.test(cornerClass)&amp;&amp;row==0?(isRTL?prev:next):&quot;&quot;)+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row&gt;0||col&gt;0,monthNames,monthNamesShort)+'&lt;/div&gt;&lt;table class=&quot;ui-datepicker-calendar&quot;&gt;&lt;thead&gt;&lt;tr&gt;';var thead=&quot;&quot;;for(var dow=0;dow&lt;7;dow++){var day=(dow+firstDay)%7;thead+=&quot;&lt;th&quot;+((dow+firstDay+6)%7&gt;=5?' class=&quot;ui-datepicker-week-end&quot;':&quot;&quot;)+'&gt;&lt;span title=&quot;'+dayNames[day]+'&quot;&gt;'+dayNamesMin[day]+&quot;&lt;/span&gt;&lt;/th&gt;&quot;}calender+=thead+&quot;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&quot;;var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&amp;&amp;drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow&lt;numRows;dRow++){calender+=&quot;&lt;tr&gt;&quot;;var tbody=&quot;&quot;;for(var dow=0;dow&lt;7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,&quot;&quot;]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&amp;&amp;printDate&lt;minDate)||(maxDate&amp;&amp;printDate&gt;maxDate);tbody+='&lt;td class=&quot;'+((dow+firstDay+6)%7&gt;=5?&quot; ui-datepicker-week-end&quot;:&quot;&quot;)+(otherMonth?&quot; ui-datepicker-other-month&quot;:&quot;&quot;)+((printDate.getTime()==selectedDate.getTime()&amp;&amp;drawMonth==inst.selectedMonth&amp;&amp;inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&amp;&amp;defaultDate.getTime()==selectedDate.getTime())?&quot; &quot;+this._dayOverClass:&quot;&quot;)+(unselectable?&quot; &quot;+this._unselectableClass+&quot; ui-state-disabled&quot;:&quot;&quot;)+(otherMonth&amp;&amp;!showOtherMonths?&quot;&quot;:&quot; &quot;+daySettings[1]+(printDate.getTime()&gt;=currentDate.getTime()&amp;&amp;printDate.getTime()&lt;=endDate.getTime()?&quot; &quot;+this._currentClass:&quot;&quot;)+(printDate.getTime()==today.getTime()?&quot; ui-datepicker-today&quot;:&quot;&quot;))+'&quot;'+((!otherMonth||showOtherMonths)&amp;&amp;daySettings[2]?' title=&quot;'+daySettings[2]+'&quot;':&quot;&quot;)+(unselectable?&quot;&quot;:&quot; onclick=\&quot;DP_jQuery.datepicker._selectDay('#&quot;+inst.id+&quot;',&quot;+drawMonth+&quot;,&quot;+drawYear+', this);return false;&quot;')+&quot;&gt;&quot;+(otherMonth?(showOtherMonths?printDate.getDate():&quot;&amp;#xa0;&quot;):(unselectable?'&lt;span class=&quot;ui-state-default&quot;&gt;'+printDate.getDate()+&quot;&lt;/span&gt;&quot;:'&lt;a class=&quot;ui-state-default'+(printDate.getTime()==today.getTime()?&quot; ui-state-highlight&quot;:&quot;&quot;)+(printDate.getTime()&gt;=currentDate.getTime()&amp;&amp;printDate.getTime()&lt;=endDate.getTime()?&quot; ui-state-active&quot;:&quot;&quot;)+'&quot; href=&quot;#&quot;&gt;'+printDate.getDate()+&quot;&lt;/a&gt;&quot;))+&quot;&lt;/td&gt;&quot;;printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+&quot;&lt;/tr&gt;&quot;}drawMonth++;if(drawMonth&gt;11){drawMonth=0;drawYear++}calender+=&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;+(isMultiMonth?&quot;&lt;/div&gt;&quot;+((numMonths[0]&gt;0&amp;&amp;col==numMonths[1]-1)?'&lt;div class=&quot;ui-datepicker-row-break&quot;&gt;&lt;/div&gt;':&quot;&quot;):&quot;&quot;);group+=calender}html+=group}html+=buttonPanel+($.browser.msie&amp;&amp;parseInt($.browser.version,10)&lt;7&amp;&amp;!inst.inline?'&lt;iframe src=&quot;javascript:false;&quot; class=&quot;ui-datepicker-cover&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;':&quot;&quot;);inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&amp;&amp;minDate&amp;&amp;selectedDate&lt;minDate?selectedDate:minDate);var changeMonth=this._get(inst,&quot;changeMonth&quot;);var changeYear=this._get(inst,&quot;changeYear&quot;);var showMonthAfterYear=this._get(inst,&quot;showMonthAfterYear&quot;);var html='&lt;div class=&quot;ui-datepicker-title&quot;&gt;';var monthHtml=&quot;&quot;;if(secondary||!changeMonth){monthHtml+='&lt;span class=&quot;ui-datepicker-month&quot;&gt;'+monthNames[drawMonth]+&quot;&lt;/span&gt; &quot;}else{var inMinYear=(minDate&amp;&amp;minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&amp;&amp;maxDate.getFullYear()==drawYear);monthHtml+='&lt;select class=&quot;ui-datepicker-month&quot; onchange=&quot;DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+&quot;', this, 'M');\&quot; onclick=\&quot;DP_jQuery.datepicker._clickMonthYear('#&quot;+inst.id+&quot;');\&quot;&gt;&quot;;for(var month=0;month&lt;12;month++){if((!inMinYear||month&gt;=minDate.getMonth())&amp;&amp;(!inMaxYear||month&lt;=maxDate.getMonth())){monthHtml+='&lt;option value=&quot;'+month+'&quot;'+(month==drawMonth?' selected=&quot;selected&quot;':&quot;&quot;)+&quot;&gt;&quot;+monthNamesShort[month]+&quot;&lt;/option&gt;&quot;}}monthHtml+=&quot;&lt;/select&gt;&quot;}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&amp;&amp;(!(changeMonth&amp;&amp;changeYear))?&quot;&amp;#xa0;&quot;:&quot;&quot;)}if(secondary||!changeYear){html+='&lt;span class=&quot;ui-datepicker-year&quot;&gt;'+drawYear+&quot;&lt;/span&gt;&quot;}else{var years=this._get(inst,&quot;yearRange&quot;).split(&quot;:&quot;);var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)==&quot;+&quot;||years[0].charAt(0)==&quot;-&quot;){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='&lt;select class=&quot;ui-datepicker-year&quot; onchange=&quot;DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+&quot;', this, 'Y');\&quot; onclick=\&quot;DP_jQuery.datepicker._clickMonthYear('#&quot;+inst.id+&quot;');\&quot;&gt;&quot;;for(;year&lt;=endYear;year++){html+='&lt;option value=&quot;'+year+'&quot;'+(year==drawYear?' selected=&quot;selected&quot;':&quot;&quot;)+&quot;&gt;&quot;+year+&quot;&lt;/option&gt;&quot;}html+=&quot;&lt;/select&gt;&quot;}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?&quot;&amp;#xa0;&quot;:&quot;&quot;)+monthHtml}html+=&quot;&lt;/div&gt;&quot;;return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period==&quot;Y&quot;?offset:0);var month=inst.drawMonth+(period==&quot;M&quot;?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period==&quot;D&quot;?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,&quot;min&quot;,true);var maxDate=this._getMinMaxDate(inst,&quot;max&quot;);date=(minDate&amp;&amp;date&lt;minDate?minDate:date);date=(maxDate&amp;&amp;date&gt;maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period==&quot;M&quot;||period==&quot;Y&quot;){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,&quot;onChangeMonthYear&quot;);if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,&quot;numberOfMonths&quot;);return(numMonths==null?[1,1]:(typeof numMonths==&quot;number&quot;?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+&quot;Date&quot;),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart&gt;date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset&lt;0?offset:numMonths[1]),1));if(offset&lt;0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&amp;&amp;inst.rangeStart&lt;newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,&quot;min&quot;);var maxDate=this._getMinMaxDate(inst,&quot;max&quot;);return((!minDate||date&gt;=minDate)&amp;&amp;(!maxDate||date&lt;=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,&quot;shortYearCutoff&quot;);shortYearCutoff=(typeof shortYearCutoff!=&quot;string&quot;?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,&quot;dayNamesShort&quot;),dayNames:this._get(inst,&quot;dayNames&quot;),monthNamesShort:this._get(inst,&quot;monthNamesShort&quot;),monthNames:this._get(inst,&quot;monthNames&quot;)}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day==&quot;object&quot;?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,&quot;dateFormat&quot;),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&amp;&amp;(($.browser.safari&amp;&amp;typeof a==&quot;object&quot;&amp;&amp;a.length)||(a.constructor&amp;&amp;a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find(&quot;body&quot;).append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options==&quot;string&quot;&amp;&amp;(options==&quot;isDisabled&quot;||options==&quot;getDate&quot;)){return $.datepicker[&quot;_&quot;+options+&quot;Datepicker&quot;].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options==&quot;string&quot;?$.datepicker[&quot;_&quot;+options+&quot;Datepicker&quot;].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version=&quot;1.7.1&quot;;window.DP_jQuery=$})(jQuery);(function(b){b.widget(&quot;ui.progressbar&quot;,{_init:function(){this.element.addClass(&quot;ui-progressbar ui-widget ui-widget-content ui-corner-all&quot;).attr({role:&quot;progressbar&quot;,&quot;aria-valuemin&quot;:this._valueMin(),&quot;aria-valuemax&quot;:this._valueMax(),&quot;aria-valuenow&quot;:this._value()});this.valueDiv=b('&lt;div class=&quot;ui-progressbar-value ui-widget-header ui-corner-left&quot;&gt;&lt;/div&gt;').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass(&quot;ui-progressbar ui-widget ui-widget-content ui-corner-all&quot;).removeAttr(&quot;role&quot;).removeAttr(&quot;aria-valuemin&quot;).removeAttr(&quot;aria-valuemax&quot;).removeAttr(&quot;aria-valuenow&quot;).removeData(&quot;progressbar&quot;).unbind(&quot;.progressbar&quot;);this.valueDiv.remove();b.widget.prototype.destroy.apply(this,arguments)},value:function(a){arguments.length&amp;&amp;this._setData(&quot;value&quot;,a);return this._value()},_setData:function(a,d){switch(a){case&quot;value&quot;:this.options.value=d;this._refreshValue();this._trigger(&quot;change&quot;,null,{});break}b.widget.prototype._setData.apply(this,arguments)},_value:function(){var a=this.options.value;if(a&lt;this._valueMin()){a=this._valueMin()}if(a&gt;this._valueMax()){a=this._valueMax()}return a},_valueMin:function(){var a=0;return a},_valueMax:function(){var a=100;return a},_refreshValue:function(){var a=this.value();this.valueDiv[a==this._valueMax()?&quot;addClass&quot;:&quot;removeClass&quot;](&quot;ui-corner-right&quot;);this.valueDiv.width(a+&quot;%&quot;);this.element.attr(&quot;aria-valuenow&quot;,a)}});b.extend(b.ui.progressbar,{version:&quot;1.7.1&quot;,defaults:{value:0}})})(jQuery);jQuery.effects||(function(j){j.effects={version:&quot;1.7.1&quot;,save:function(b,a){for(var c=0;c&lt;a.length;c++){if(a[c]!==null){b.data(&quot;ec.storage.&quot;+a[c],b[0].style[a[c]])}}},restore:function(b,a){for(var c=0;c&lt;a.length;c++){if(a[c]!==null){b.css(a[c],b.data(&quot;ec.storage.&quot;+a[c]))}}},setMode:function(b,a){if(a==&quot;toggle&quot;){a=b.is(&quot;:hidden&quot;)?&quot;show&quot;:&quot;hide&quot;}return a},getBaseline:function(c,b){var a,d;switch(c[0]){case&quot;top&quot;:a=0;break;case&quot;middle&quot;:a=0.5;break;case&quot;bottom&quot;:a=1;break;default:a=c[0]/b.height}switch(c[1]){case&quot;left&quot;:d=0;break;case&quot;center&quot;:d=0.5;break;case&quot;right&quot;:d=1;break;default:d=c[1]/b.width}return{x:d,y:a}},createWrapper:function(e){if(e.parent().is(&quot;.ui-effects-wrapper&quot;)){return e.parent()}var d={width:e.outerWidth(true),height:e.outerHeight(true),&quot;float&quot;:e.css(&quot;float&quot;)};e.wrap('&lt;div class=&quot;ui-effects-wrapper&quot; style=&quot;font-size:100%;background:transparent;border:none;margin:0;padding:0&quot;&gt;&lt;/div&gt;');var a=e.parent();if(e.css(&quot;position&quot;)==&quot;static&quot;){a.css({position:&quot;relative&quot;});e.css({position:&quot;relative&quot;})}else{var b=e.css(&quot;top&quot;);if(isNaN(parseInt(b,10))){b=&quot;auto&quot;}var c=e.css(&quot;left&quot;);if(isNaN(parseInt(c,10))){c=&quot;auto&quot;}a.css({position:e.css(&quot;position&quot;),top:b,left:c,zIndex:e.css(&quot;z-index&quot;)}).show();e.css({position:&quot;relative&quot;,top:0,left:0})}a.css(d);return a},removeWrapper:function(a){if(a.parent().is(&quot;.ui-effects-wrapper&quot;)){return a.parent().replaceWith(a)}return a},setTransition:function(c,a,d,b){b=b||{};j.each(a,function(e,l){unit=c.cssUnit(l);if(unit[0]&gt;0){b[l]=unit[0]*d+unit[1]}});return b},animateClass:function(d,c,a,b){var l=(typeof a==&quot;function&quot;?a:(b?b:null));var e=(typeof a==&quot;string&quot;?a:null);return this.each(function(){var w={};var y=j(this);var x=y.attr(&quot;style&quot;)||&quot;&quot;;if(typeof x==&quot;object&quot;){x=x.cssText}if(d.toggle){y.hasClass(d.toggle)?d.remove=d.toggle:d.add=d.toggle}var u=j.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(d.add){y.addClass(d.add)}if(d.remove){y.removeClass(d.remove)}var n=j.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(d.add){y.removeClass(d.add)}if(d.remove){y.addClass(d.remove)}for(var v in n){if(typeof n[v]!=&quot;function&quot;&amp;&amp;n[v]&amp;&amp;v.indexOf(&quot;Moz&quot;)==-1&amp;&amp;v.indexOf(&quot;length&quot;)==-1&amp;&amp;n[v]!=u[v]&amp;&amp;(v.match(/color/i)||(!v.match(/color/i)&amp;&amp;!isNaN(parseInt(n[v],10))))&amp;&amp;(u.position!=&quot;static&quot;||(u.position==&quot;static&quot;&amp;&amp;!v.match(/left|top|bottom|right/)))){w[v]=n[v]}}y.animate(w,c,e,function(){if(typeof j(this).attr(&quot;style&quot;)==&quot;object&quot;){j(this).attr(&quot;style&quot;)[&quot;cssText&quot;]=&quot;&quot;;j(this).attr(&quot;style&quot;)[&quot;cssText&quot;]=x}else{j(this).attr(&quot;style&quot;,x)}if(d.add){j(this).addClass(d.add)}if(d.remove){j(this).removeClass(d.remove)}if(l){l.apply(this,arguments)}})})}};function k(d,e){var b=d[1]&amp;&amp;d[1].constructor==Object?d[1]:{};if(e){b.mode=e}var c=d[1]&amp;&amp;d[1].constructor!=Object?d[1]:(b.duration?b.duration:d[2]);c=j.fx.off?0:typeof c===&quot;number&quot;?c:j.fx.speeds[c]||j.fx.speeds._default;var a=b.callback||(j.isFunction(d[1])&amp;&amp;d[1])||(j.isFunction(d[2])&amp;&amp;d[2])||(j.isFunction(d[3])&amp;&amp;d[3]);return[d[0],b,c,a]}j.fn.extend({_show:j.fn.show,_hide:j.fn.hide,__toggle:j.fn.toggle,_addClass:j.fn.addClass,_removeClass:j.fn.removeClass,_toggleClass:j.fn.toggleClass,effect:function(c,d,b,a){return j.effects[c]?j.effects[c].call(this,{method:c,options:d||{},duration:b,callback:a}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,k(arguments,&quot;show&quot;))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,k(arguments,&quot;hide&quot;))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(arguments[0].constructor==Function)){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,k(arguments,&quot;toggle&quot;))}},addClass:function(c,d,a,b){return d?j.effects.animateClass.apply(this,[{add:c},d,a,b]):this._addClass(c)},removeClass:function(c,d,a,b){return d?j.effects.animateClass.apply(this,[{remove:c},d,a,b]):this._removeClass(c)},toggleClass:function(c,d,a,b){return((typeof d!==&quot;boolean&quot;)&amp;&amp;d)?j.effects.animateClass.apply(this,[{toggle:c},d,a,b]):this._toggleClass(c,d)},morph:function(e,c,d,a,b){return j.effects.animateClass.apply(this,[{add:c,remove:e},d,a,b])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(c){var b=this.css(c),a=[];j.each([&quot;em&quot;,&quot;px&quot;,&quot;%&quot;,&quot;pt&quot;],function(e,d){if(b.indexOf(d)&gt;0){a=[parseFloat(b),d]}});return a}});j.each([&quot;backgroundColor&quot;,&quot;borderBottomColor&quot;,&quot;borderLeftColor&quot;,&quot;borderRightColor&quot;,&quot;borderTopColor&quot;,&quot;color&quot;,&quot;outlineColor&quot;],function(a,b){j.fx.step[b]=function(c){if(c.state==0){c.start=h(c.elem,b);c.end=f(c.end)}c.elem.style[b]=&quot;rgb(&quot;+[Math.max(Math.min(parseInt((c.pos*(c.end[0]-c.start[0]))+c.start[0],10),255),0),Math.max(Math.min(parseInt((c.pos*(c.end[1]-c.start[1]))+c.start[1],10),255),0),Math.max(Math.min(parseInt((c.pos*(c.end[2]-c.start[2]))+c.start[2],10),255),0)].join(&quot;,&quot;)+&quot;)&quot;}});function f(a){var b;if(a&amp;&amp;a.constructor==Array&amp;&amp;a.length==3){return a}if(b=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a)){return[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10)]}if(b=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a)){return[parseFloat(b[1])*2.55,parseFloat(b[2])*2.55,parseFloat(b[3])*2.55]}if(b=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a)){return[parseInt(b[1],16),parseInt(b[2],16),parseInt(b[3],16)]}if(b=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a)){return[parseInt(b[1]+b[1],16),parseInt(b[2]+b[2],16),parseInt(b[3]+b[3],16)]}if(b=/rgba\(0, 0, 0, 0\)/.exec(a)){return g.transparent}return g[j.trim(a).toLowerCase()]}function h(a,c){var b;do{b=j.curCSS(a,c);if(b!=&quot;&quot;&amp;&amp;b!=&quot;transparent&quot;||j.nodeName(a,&quot;body&quot;)){break}c=&quot;backgroundColor&quot;}while(a=a.parentNode);return f(b)}var g={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]};j.easing.jswing=j.easing.swing;j.extend(j.easing,{def:&quot;easeOutQuad&quot;,swing:function(d,c,e,a,b){return j.easing[j.easing.def](d,c,e,a,b)},easeInQuad:function(d,c,e,a,b){return a*(c/=b)*c+e},easeOutQuad:function(d,c,e,a,b){return -a*(c/=b)*(c-2)+e},easeInOutQuad:function(d,c,e,a,b){if((c/=b/2)&lt;1){return a/2*c*c+e}return -a/2*((--c)*(c-2)-1)+e},easeInCubic:function(d,c,e,a,b){return a*(c/=b)*c*c+e},easeOutCubic:function(d,c,e,a,b){return a*((c=c/b-1)*c*c+1)+e},easeInOutCubic:function(d,c,e,a,b){if((c/=b/2)&lt;1){return a/2*c*c*c+e}return a/2*((c-=2)*c*c+2)+e},easeInQuart:function(d,c,e,a,b){return a*(c/=b)*c*c*c+e},easeOutQuart:function(d,c,e,a,b){return -a*((c=c/b-1)*c*c*c-1)+e},easeInOutQuart:function(d,c,e,a,b){if((c/=b/2)&lt;1){return a/2*c*c*c*c+e}return -a/2*((c-=2)*c*c*c-2)+e},easeInQuint:function(d,c,e,a,b){return a*(c/=b)*c*c*c*c+e},easeOutQuint:function(d,c,e,a,b){return a*((c=c/b-1)*c*c*c*c+1)+e},easeInOutQuint:function(d,c,e,a,b){if((c/=b/2)&lt;1){return a/2*c*c*c*c*c+e}return a/2*((c-=2)*c*c*c*c+2)+e},easeInSine:function(d,c,e,a,b){return -a*Math.cos(c/b*(Math.PI/2))+a+e},easeOutSine:function(d,c,e,a,b){return a*Math.sin(c/b*(Math.PI/2))+e},easeInOutSine:function(d,c,e,a,b){return -a/2*(Math.cos(Math.PI*c/b)-1)+e},easeInExpo:function(d,c,e,a,b){return(c==0)?e:a*Math.pow(2,10*(c/b-1))+e},easeOutExpo:function(d,c,e,a,b){return(c==b)?e+a:a*(-Math.pow(2,-10*c/b)+1)+e},easeInOutExpo:function(d,c,e,a,b){if(c==0){return e}if(c==b){return e+a}if((c/=b/2)&lt;1){return a/2*Math.pow(2,10*(c-1))+e}return a/2*(-Math.pow(2,-10*--c)+2)+e},easeInCirc:function(d,c,e,a,b){return -a*(Math.sqrt(1-(c/=b)*c)-1)+e},easeOutCirc:function(d,c,e,a,b){return a*Math.sqrt(1-(c=c/b-1)*c)+e},easeInOutCirc:function(d,c,e,a,b){if((c/=b/2)&lt;1){return -a/2*(Math.sqrt(1-c*c)-1)+e}return a/2*(Math.sqrt(1-(c-=2)*c)+1)+e},easeInElastic:function(o,e,p,a,b){var d=1.70158;var c=0;var n=a;if(e==0){return p}if((e/=b)==1){return p+a}if(!c){c=b*0.3}if(n&lt;Math.abs(a)){n=a;var d=c/4}else{var d=c/(2*Math.PI)*Math.asin(a/n)}return -(n*Math.pow(2,10*(e-=1))*Math.sin((e*b-d)*(2*Math.PI)/c))+p},easeOutElastic:function(o,e,p,a,b){var d=1.70158;var c=0;var n=a;if(e==0){return p}if((e/=b)==1){return p+a}if(!c){c=b*0.3}if(n&lt;Math.abs(a)){n=a;var d=c/4}else{var d=c/(2*Math.PI)*Math.asin(a/n)}return n*Math.pow(2,-10*e)*Math.sin((e*b-d)*(2*Math.PI)/c)+a+p},easeInOutElastic:function(o,e,p,a,b){var d=1.70158;var c=0;var n=a;if(e==0){return p}if((e/=b/2)==2){return p+a}if(!c){c=b*(0.3*1.5)}if(n&lt;Math.abs(a)){n=a;var d=c/4}else{var d=c/(2*Math.PI)*Math.asin(a/n)}if(e&lt;1){return -0.5*(n*Math.pow(2,10*(e-=1))*Math.sin((e*b-d)*(2*Math.PI)/c))+p}return n*Math.pow(2,-10*(e-=1))*Math.sin((e*b-d)*(2*Math.PI)/c)*0.5+a+p},easeInBack:function(e,d,l,a,b,c){if(c==undefined){c=1.70158}return a*(d/=b)*d*((c+1)*d-c)+l},easeOutBack:function(e,d,l,a,b,c){if(c==undefined){c=1.70158}return a*((d=d/b-1)*d*((c+1)*d+c)+1)+l},easeInOutBack:function(e,d,l,a,b,c){if(c==undefined){c=1.70158}if((d/=b/2)&lt;1){return a/2*(d*d*(((c*=(1.525))+1)*d-c))+l}return a/2*((d-=2)*d*(((c*=(1.525))+1)*d+c)+2)+l},easeInBounce:function(d,c,e,a,b){return a-j.easing.easeOutBounce(d,b-c,0,a,b)+e},easeOutBounce:function(d,c,e,a,b){if((c/=b)&lt;(1/2.75)){return a*(7.5625*c*c)+e}else{if(c&lt;(2/2.75)){return a*(7.5625*(c-=(1.5/2.75))*c+0.75)+e}else{if(c&lt;(2.5/2.75)){return a*(7.5625*(c-=(2.25/2.75))*c+0.9375)+e}else{return a*(7.5625*(c-=(2.625/2.75))*c+0.984375)+e}}}},easeInOutBounce:function(d,c,e,a,b){if(c&lt;b/2){return j.easing.easeInBounce(d,c*2,0,a,b)*0.5+e}return j.easing.easeOutBounce(d,c*2-b,0,a,b)*0.5+a*0.5+e}})})(jQuery);(function(b){b.effects.blind=function(a){return this.queue(function(){var q=b(this),r=[&quot;position&quot;,&quot;top&quot;,&quot;left&quot;];var m=b.effects.setMode(q,a.options.mode||&quot;hide&quot;);var n=a.options.direction||&quot;vertical&quot;;b.effects.save(q,r);q.show();var k=b.effects.createWrapper(q).css({overflow:&quot;hidden&quot;});var p=(n==&quot;vertical&quot;)?&quot;height&quot;:&quot;width&quot;;var l=(n==&quot;vertical&quot;)?k.height():k.width();if(m==&quot;show&quot;){k.css(p,0)}var o={};o[p]=m==&quot;show&quot;?l:0;k.animate(o,a.duration,a.options.easing,function(){if(m==&quot;hide&quot;){q.hide()}b.effects.restore(q,r);b.effects.removeWrapper(q);if(a.callback){a.callback.apply(q[0],arguments)}q.dequeue()})})}})(jQuery);(function(b){b.effects.bounce=function(a){return this.queue(function(){var C=b(this),w=[&quot;position&quot;,&quot;top&quot;,&quot;left&quot;];var x=b.effects.setMode(C,a.options.mode||&quot;effect&quot;);var u=a.options.direction||&quot;up&quot;;var E=a.options.distance||20;var D=a.options.times||5;var A=a.duration||250;if(/show|hide/.test(x)){w.push(&quot;opacity&quot;)}b.effects.save(C,w);C.show();b.effects.createWrapper(C);var B=(u==&quot;up&quot;||u==&quot;down&quot;)?&quot;top&quot;:&quot;left&quot;;var q=(u==&quot;up&quot;||u==&quot;left&quot;)?&quot;pos&quot;:&quot;neg&quot;;var E=a.options.distance||(B==&quot;top&quot;?C.outerHeight({margin:true})/3:C.outerWidth({margin:true})/3);if(x==&quot;show&quot;){C.css(&quot;opacity&quot;,0).css(B,q==&quot;pos&quot;?-E:E)}if(x==&quot;hide&quot;){E=E/(D*2)}if(x!=&quot;hide&quot;){D--}if(x==&quot;show&quot;){var z={opacity:1};z[B]=(q==&quot;pos&quot;?&quot;+=&quot;:&quot;-=&quot;)+E;C.animate(z,A/2,a.options.easing);E=E/2;D--}for(var y=0;y&lt;D;y++){var r={},v={};r[B]=(q==&quot;pos&quot;?&quot;-=&quot;:&quot;+=&quot;)+E;v[B]=(q==&quot;pos&quot;?&quot;+=&quot;:&quot;-=&quot;)+E;C.animate(r,A/2,a.options.easing).animate(v,A/2,a.options.easing);E=(x==&quot;hide&quot;)?E*2:E/2}if(x==&quot;hide&quot;){var z={opacity:0};z[B]=(q==&quot;pos&quot;?&quot;-=&quot;:&quot;+=&quot;)+E;C.animate(z,A/2,a.options.easing,function(){C.hide();b.effects.restore(C,w);b.effects.removeWrapper(C);if(a.callback){a.callback.apply(this,arguments)}})}else{var r={},v={};r[B]=(q==&quot;pos&quot;?&quot;-=&quot;:&quot;+=&quot;)+E;v[B]=(q==&quot;pos&quot;?&quot;+=&quot;:&quot;-=&quot;)+E;C.animate(r,A/2,a.options.easing).animate(v,A/2,a.options.easing,function(){b.effects.restore(C,w);b.effects.removeWrapper(C);if(a.callback){a.callback.apply(this,arguments)}})}C.queue(&quot;fx&quot;,function(){C.dequeue()});C.dequeue()})}})(jQuery);(function(b){b.effects.clip=function(a){return this.queue(function(){var q=b(this),m=[&quot;position&quot;,&quot;top&quot;,&quot;left&quot;,&quot;height&quot;,&quot;width&quot;];var n=b.effects.setMode(q,a.options.mode||&quot;hide&quot;);var l=a.options.direction||&quot;vertical&quot;;b.effects.save(q,m);q.show();var v=b.effects.createWrapper(q).css({overflow:&quot;hidden&quot;});var r=q[0].tagName==&quot;IMG&quot;?v:q;var p={size:(l==&quot;vertical&quot;)?&quot;height&quot;:&quot;width&quot;,position:(l==&quot;vertical&quot;)?&quot;top&quot;:&quot;left&quot;};var u=(l==&quot;vertical&quot;)?r.height():r.width();if(n==&quot;show&quot;){r.css(p.size,0);r.css(p.position,u/2)}var o={};o[p.size]=n==&quot;show&quot;?u:0;o[p.position]=n==&quot;show&quot;?0:u/2;r.animate(o,{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){if(n==&quot;hide&quot;){q.hide()}b.effects.restore(q,m);b.effects.removeWrapper(q);if(a.callback){a.callback.apply(q[0],arguments)}q.dequeue()}})})}})(jQuery);(function(b){b.effects.drop=function(a){return this.queue(function(){var p=b(this),q=[&quot;position&quot;,&quot;top&quot;,&quot;left&quot;,&quot;opacity&quot;];var l=b.effects.setMode(p,a.options.mode||&quot;hide&quot;);var m=a.options.direction||&quot;left&quot;;b.effects.save(p,q);p.show();b.effects.createWrapper(p);var o=(m==&quot;up&quot;||m==&quot;down&quot;)?&quot;top&quot;:&quot;left&quot;;var r=(m==&quot;up&quot;||m==&quot;left&quot;)?&quot;pos&quot;:&quot;neg&quot;;var k=a.options.distance||(o==&quot;top&quot;?p.outerHeight({margin:true})/2:p.outerWidth({margin:true})/2);if(l==&quot;show&quot;){p.css(&quot;opacity&quot;,0).css(o,r==&quot;pos&quot;?-k:k)}var n={opacity:l==&quot;show&quot;?1:0};n[o]=(l==&quot;show&quot;?(r==&quot;pos&quot;?&quot;+=&quot;:&quot;-=&quot;):(r==&quot;pos&quot;?&quot;-=&quot;:&quot;+=&quot;))+k;p.animate(n,{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){if(l==&quot;hide&quot;){p.hide()}b.effects.restore(p,q);b.effects.removeWrapper(p);if(a.callback){a.callback.apply(this,arguments)}p.dequeue()}})})}})(jQuery);(function(b){b.effects.explode=function(a){return this.queue(function(){var m=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;var q=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode==&quot;toggle&quot;?(b(this).is(&quot;:visible&quot;)?&quot;hide&quot;:&quot;show&quot;):a.options.mode;var n=b(this).show().css(&quot;visibility&quot;,&quot;hidden&quot;);var j=n.offset();j.top-=parseInt(n.css(&quot;marginTop&quot;),10)||0;j.left-=parseInt(n.css(&quot;marginLeft&quot;),10)||0;var o=n.outerWidth(true);var u=n.outerHeight(true);for(var p=0;p&lt;m;p++){for(var r=0;r&lt;q;r++){n.clone().appendTo(&quot;body&quot;).wrap(&quot;&lt;div&gt;&lt;/div&gt;&quot;).css({position:&quot;absolute&quot;,visibility:&quot;visible&quot;,left:-r*(o/q),top:-p*(u/m)}).parent().addClass(&quot;ui-effects-explode&quot;).css({position:&quot;absolute&quot;,overflow:&quot;hidden&quot;,width:o/q,height:u/m,left:j.left+r*(o/q)+(a.options.mode==&quot;show&quot;?(r-Math.floor(q/2))*(o/q):0),top:j.top+p*(u/m)+(a.options.mode==&quot;show&quot;?(p-Math.floor(m/2))*(u/m):0),opacity:a.options.mode==&quot;show&quot;?0:1}).animate({left:j.left+r*(o/q)+(a.options.mode==&quot;show&quot;?0:(r-Math.floor(q/2))*(o/q)),top:j.top+p*(u/m)+(a.options.mode==&quot;show&quot;?0:(p-Math.floor(m/2))*(u/m)),opacity:a.options.mode==&quot;show&quot;?1:0},a.duration||500)}}setTimeout(function(){a.options.mode==&quot;show&quot;?n.css({visibility:&quot;visible&quot;}):n.css({visibility:&quot;visible&quot;}).hide();if(a.callback){a.callback.apply(n[0])}n.dequeue();b(&quot;div.ui-effects-explode&quot;).remove()},a.duration||500)})}})(jQuery);(function(b){b.effects.fold=function(a){return this.queue(function(){var B=b(this),v=[&quot;position&quot;,&quot;top&quot;,&quot;left&quot;];var y=b.effects.setMode(B,a.options.mode||&quot;hide&quot;);var p=a.options.size||15;var q=!(!a.options.horizFirst);var z=a.duration?a.duration/2:b.fx.speeds._default/2;b.effects.save(B,v);B.show();var C=b.effects.createWrapper(B).css({overflow:&quot;hidden&quot;});var x=((y==&quot;show&quot;)!=q);var A=x?[&quot;width&quot;,&quot;height&quot;]:[&quot;height&quot;,&quot;width&quot;];var D=x?[C.width(),C.height()]:[C.height(),C.width()];var w=/([0-9]+)%/.exec(p);if(w){p=parseInt(w[1],10)/100*D[y==&quot;hide&quot;?0:1]}if(y==&quot;show&quot;){C.css(q?{height:0,width:p}:{height:p,width:0})}var r={},u={};r[A[0]]=y==&quot;show&quot;?D[0]:p;u[A[1]]=y==&quot;show&quot;?D[1]:0;C.animate(r,z,a.options.easing).animate(u,z,a.options.easing,function(){if(y==&quot;hide&quot;){B.hide()}b.effects.restore(B,v);b.effects.removeWrapper(B);if(a.callback){a.callback.apply(B[0],arguments)}B.dequeue()})})}})(jQuery);(function(b){b.effects.highlight=function(a){return this.queue(function(){var m=b(this),n=[&quot;backgroundImage&quot;,&quot;backgroundColor&quot;,&quot;opacity&quot;];var j=b.effects.setMode(m,a.options.mode||&quot;show&quot;);var o=a.options.color||&quot;#ffff99&quot;;var k=m.css(&quot;backgroundColor&quot;);b.effects.save(m,n);m.show();m.css({backgroundImage:&quot;none&quot;,backgroundColor:o});var l={backgroundColor:k};if(j==&quot;hide&quot;){l.opacity=0}m.animate(l,{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){if(j==&quot;hide&quot;){m.hide()}b.effects.restore(m,n);if(j==&quot;show&quot;&amp;&amp;b.browser.msie){this.style.removeAttribute(&quot;filter&quot;)}if(a.callback){a.callback.apply(this,arguments)}m.dequeue()}})})}})(jQuery);(function(b){b.effects.pulsate=function(a){return this.queue(function(){var l=b(this);var h=b.effects.setMode(l,a.options.mode||&quot;show&quot;);var j=a.options.times||5;var k=a.duration?a.duration/2:b.fx.speeds._default/2;if(h==&quot;hide&quot;){j--}if(l.is(&quot;:hidden&quot;)){l.css(&quot;opacity&quot;,0);l.show();l.animate({opacity:1},k,a.options.easing);j=j-2}for(var m=0;m&lt;j;m++){l.animate({opacity:0},k,a.options.easing).animate({opacity:1},k,a.options.easing)}if(h==&quot;hide&quot;){l.animate({opacity:0},k,a.options.easing,function(){l.hide();if(a.callback){a.callback.apply(this,arguments)}})}else{l.animate({opacity:0},k,a.options.easing).animate({opacity:1},k,a.options.easing,function(){if(a.callback){a.callback.apply(this,arguments)}})}l.queue(&quot;fx&quot;,function(){l.dequeue()});l.dequeue()})}})(jQuery);(function(b){b.effects.puff=function(a){return this.queue(function(){var l=b(this);var o=b.extend(true,{},a.options);var j=b.effects.setMode(l,a.options.mode||&quot;hide&quot;);var k=parseInt(a.options.percent,10)||150;o.fade=true;var m={height:l.height(),width:l.width()};var n=k/100;l.from=(j==&quot;hide&quot;)?m:{height:m.height*n,width:m.width*n};o.from=l.from;o.percent=(j==&quot;hide&quot;)?k:100;o.mode=j;l.effect(&quot;scale&quot;,o,a.duration,a.callback);l.dequeue()})};b.effects.scale=function(a){return this.queue(function(){var n=b(this);var q=b.extend(true,{},a.options);var k=b.effects.setMode(n,a.options.mode||&quot;effect&quot;);var m=parseInt(a.options.percent,10)||(parseInt(a.options.percent,10)==0?0:(k==&quot;hide&quot;?0:100));var l=a.options.direction||&quot;both&quot;;var r=a.options.origin;if(k!=&quot;effect&quot;){q.origin=r||[&quot;middle&quot;,&quot;center&quot;];q.restore=true}var o={height:n.height(),width:n.width()};n.from=a.options.from||(k==&quot;show&quot;?{height:0,width:0}:o);var p={y:l!=&quot;horizontal&quot;?(m/100):1,x:l!=&quot;vertical&quot;?(m/100):1};n.to={height:o.height*p.y,width:o.width*p.x};if(a.options.fade){if(k==&quot;show&quot;){n.from.opacity=0;n.to.opacity=1}if(k==&quot;hide&quot;){n.from.opacity=1;n.to.opacity=0}}q.from=n.from;q.to=n.to;q.mode=k;n.effect(&quot;size&quot;,q,a.duration,a.callback);n.dequeue()})};b.effects.size=function(a){return this.queue(function(){var F=b(this),u=[&quot;position&quot;,&quot;top&quot;,&quot;left&quot;,&quot;width&quot;,&quot;height&quot;,&quot;overflow&quot;,&quot;opacity&quot;];var v=[&quot;position&quot;,&quot;top&quot;,&quot;left&quot;,&quot;overflow&quot;,&quot;opacity&quot;];var y=[&quot;width&quot;,&quot;height&quot;,&quot;overflow&quot;];var q=[&quot;fontSize&quot;];var x=[&quot;borderTopWidth&quot;,&quot;borderBottomWidth&quot;,&quot;paddingTop&quot;,&quot;paddingBottom&quot;];var C=[&quot;borderLeftWidth&quot;,&quot;borderRightWidth&quot;,&quot;paddingLeft&quot;,&quot;paddingRight&quot;];var B=b.effects.setMode(F,a.options.mode||&quot;effect&quot;);var z=a.options.restore||false;var D=a.options.scale||&quot;both&quot;;var r=a.options.origin;var E={height:F.height(),width:F.width()};F.from=a.options.from||E;F.to=a.options.to||E;if(r){var A=b.effects.getBaseline(r,E);F.from.top=(E.height-F.from.height)*A.y;F.from.left=(E.width-F.from.width)*A.x;F.to.top=(E.height-F.to.height)*A.y;F.to.left=(E.width-F.to.width)*A.x}var w={from:{y:F.from.height/E.height,x:F.from.width/E.width},to:{y:F.to.height/E.height,x:F.to.width/E.width}};if(D==&quot;box&quot;||D==&quot;both&quot;){if(w.from.y!=w.to.y){u=u.concat(x);F.from=b.effects.setTransition(F,x,w.from.y,F.from);F.to=b.effects.setTransition(F,x,w.to.y,F.to)}if(w.from.x!=w.to.x){u=u.concat(C);F.from=b.effects.setTransition(F,C,w.from.x,F.from);F.to=b.effects.setTransition(F,C,w.to.x,F.to)}}if(D==&quot;content&quot;||D==&quot;both&quot;){if(w.from.y!=w.to.y){u=u.concat(q);F.from=b.effects.setTransition(F,q,w.from.y,F.from);F.to=b.effects.setTransition(F,q,w.to.y,F.to)}}b.effects.save(F,z?u:v);F.show();b.effects.createWrapper(F);F.css(&quot;overflow&quot;,&quot;hidden&quot;).css(F.from);if(D==&quot;content&quot;||D==&quot;both&quot;){x=x.concat([&quot;marginTop&quot;,&quot;marginBottom&quot;]).concat(q);C=C.concat([&quot;marginLeft&quot;,&quot;marginRight&quot;]);y=u.concat(x).concat(C);F.find(&quot;*[width]&quot;).each(function(){child=b(this);if(z){b.effects.save(child,y)}var c={height:child.height(),width:child.width()};child.from={height:c.height*w.from.y,width:c.width*w.from.x};child.to={height:c.height*w.to.y,width:c.width*w.to.x};if(w.from.y!=w.to.y){child.from=b.effects.setTransition(child,x,w.from.y,child.from);child.to=b.effects.setTransition(child,x,w.to.y,child.to)}if(w.from.x!=w.to.x){child.from=b.effects.setTransition(child,C,w.from.x,child.from);child.to=b.effects.setTransition(child,C,w.to.x,child.to)}child.css(child.from);child.animate(child.to,a.duration,a.options.easing,function(){if(z){b.effects.restore(child,y)}})})}F.animate(F.to,{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){if(B==&quot;hide&quot;){F.hide()}b.effects.restore(F,z?u:v);b.effects.removeWrapper(F);if(a.callback){a.callback.apply(this,arguments)}F.dequeue()}})})}})(jQuery);(function(b){b.effects.shake=function(a){return this.queue(function(){var C=b(this),w=[&quot;position&quot;,&quot;top&quot;,&quot;left&quot;];var x=b.effects.setMode(C,a.options.mode||&quot;effect&quot;);var u=a.options.direction||&quot;left&quot;;var E=a.options.distance||20;var D=a.options.times||3;var A=a.duration||a.options.duration||140;b.effects.save(C,w);C.show();b.effects.createWrapper(C);var B=(u==&quot;up&quot;||u==&quot;down&quot;)?&quot;top&quot;:&quot;left&quot;;var q=(u==&quot;up&quot;||u==&quot;left&quot;)?&quot;pos&quot;:&quot;neg&quot;;var z={},r={},v={};z[B]=(q==&quot;pos&quot;?&quot;-=&quot;:&quot;+=&quot;)+E;r[B]=(q==&quot;pos&quot;?&quot;+=&quot;:&quot;-=&quot;)+E*2;v[B]=(q==&quot;pos&quot;?&quot;-=&quot;:&quot;+=&quot;)+E*2;C.animate(z,A,a.options.easing);for(var y=1;y&lt;D;y++){C.animate(r,A,a.options.easing).animate(v,A,a.options.easing)}C.animate(r,A,a.options.easing).animate(z,A/2,a.options.easing,function(){b.effects.restore(C,w);b.effects.removeWrapper(C);if(a.callback){a.callback.apply(this,arguments)}});C.queue(&quot;fx&quot;,function(){C.dequeue()});C.dequeue()})}})(jQuery);(function(b){b.effects.slide=function(a){return this.queue(function(){var p=b(this),q=[&quot;position&quot;,&quot;top&quot;,&quot;left&quot;];var l=b.effects.setMode(p,a.options.mode||&quot;show&quot;);var m=a.options.direction||&quot;left&quot;;b.effects.save(p,q);p.show();b.effects.createWrapper(p).css({overflow:&quot;hidden&quot;});var o=(m==&quot;up&quot;||m==&quot;down&quot;)?&quot;top&quot;:&quot;left&quot;;var r=(m==&quot;up&quot;||m==&quot;left&quot;)?&quot;pos&quot;:&quot;neg&quot;;var k=a.options.distance||(o==&quot;top&quot;?p.outerHeight({margin:true}):p.outerWidth({margin:true}));if(l==&quot;show&quot;){p.css(o,r==&quot;pos&quot;?-k:k)}var n={};n[o]=(l==&quot;show&quot;?(r==&quot;pos&quot;?&quot;+=&quot;:&quot;-=&quot;):(r==&quot;pos&quot;?&quot;-=&quot;:&quot;+=&quot;))+k;p.animate(n,{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){if(l==&quot;hide&quot;){p.hide()}b.effects.restore(p,q);b.effects.removeWrapper(p);if(a.callback){a.callback.apply(this,arguments)}p.dequeue()}})})}})(jQuery);(function(b){b.effects.transfer=function(a){return this.queue(function(){var l=b(this),j=b(a.options.to),m=j.offset(),k={top:m.top,left:m.left,height:j.innerHeight(),width:j.innerWidth()},n=l.offset(),o=b('&lt;div class=&quot;ui-effects-transfer&quot;&gt;&lt;/div&gt;').appendTo(document.body).addClass(a.options.className).css({top:n.top,left:n.left,height:l.innerHeight(),width:l.innerWidth(),position:&quot;absolute&quot;}).animate(k,a.duration,a.options.easing,function(){o.remove();(a.callback&amp;&amp;a.callback.apply(l[0],arguments));l.dequeue()})})}})(jQuery);(function(a){a.fn.hint=function(e){if(!e||typeof(e)==&quot;object&quot;){e=a.extend({focus_class:&quot;hint_focus&quot;,changed_class:&quot;hint_changed&quot;,populate_from:&quot;default&quot;,text:null,remove_labels:false},e)}else{if(typeof(e)==&quot;string&quot;&amp;&amp;e.toLowerCase()==&quot;destroy&quot;){var b=true}}return this.each(function(){if(b){a(this).unbind(&quot;focus.hint&quot;).unbind(&quot;blur.hint&quot;).removeData(&quot;defText&quot;);return false}d(a(this))});function d(j){var k=&quot;&quot;;switch(e.populate_from){case&quot;alt&quot;:k=j.attr(&quot;alt&quot;);j.val(k);break;case&quot;label&quot;:k=a(&quot;label[for='&quot;+j.attr(&quot;id&quot;)+&quot;']&quot;).text();j.val(k);break;case&quot;custom&quot;:k=e.text;j.val(k);break;default:k=j.val()}j.addClass(&quot;hint&quot;).data(&quot;defText&quot;,k);if(e.remove_labels==true){a(&quot;label[for='&quot;+j.attr(&quot;id&quot;)+&quot;']&quot;).remove()}if(j.attr(&quot;type&quot;)==&quot;password&quot;){var g=j.data(&quot;defText&quot;);var h=a('&lt;input type=&quot;text&quot;/&gt;');h.attr(&quot;name&quot;,j.attr(&quot;name&quot;));h.attr(&quot;size&quot;,j.attr(&quot;size&quot;));h.attr(&quot;class&quot;,j.attr(&quot;class&quot;));h.val(j.val());h.data(&quot;defType&quot;,&quot;password&quot;).data(&quot;defText&quot;,g);j.replaceWith(h);var j=h}f(j);c(j)}function f(g){g.bind(&quot;focus.hint&quot;,function(k){var k=a(this);if(k.val()==k.data(&quot;defText&quot;)){k.val(&quot;&quot;)}k.addClass(e.focus_class).removeClass(e.changed_class);if(k.data(&quot;defType&quot;)==&quot;password&quot;){var h=k.data(&quot;defText&quot;);var j=a('&lt;input type=&quot;password&quot;/&gt;');j.attr(&quot;name&quot;,k.attr(&quot;name&quot;));j.attr(&quot;size&quot;,k.attr(&quot;size&quot;));j.attr(&quot;class&quot;,k.attr(&quot;class&quot;));j.val(k.val());j.data(&quot;defType&quot;,&quot;password&quot;).data(&quot;defText&quot;,h);k.replaceWith(j);var k=j;k.focus();c(k)}})}function c(g){g.bind(&quot;blur.hint&quot;,function(){var k=a(this);if(k.val()==&quot;&quot;){k.val(k.data(&quot;defText&quot;))}k.removeClass(e.focus_class);if(k.val()!=k.data(&quot;defText&quot;)){k.addClass(e.changed_class)}else{k.removeClass(e.changed_class)}if(k.data(&quot;defType&quot;)==&quot;password&quot;&amp;&amp;k.val()==k.data(&quot;defText&quot;)){var h=k.data(&quot;defText&quot;);var j=a('&lt;input type=&quot;text&quot;/&gt;');j.attr(&quot;name&quot;,k.attr(&quot;name&quot;));j.attr(&quot;size&quot;,k.attr(&quot;size&quot;));j.attr(&quot;class&quot;,k.attr(&quot;class&quot;));j.val(k.val());j.data(&quot;defType&quot;,&quot;password&quot;).data(&quot;defText&quot;,h);k.replaceWith(j);var k=j;f(j)}})}}})(jQuery);jQuery.imgAreaSelect=function(l,O){var aa=jQuery(&quot;&lt;div&gt;&lt;/div&gt;&quot;),ab=jQuery(&quot;&lt;div&gt;&lt;/div&gt;&quot;),Z=jQuery(&quot;&lt;div&gt;&lt;/div&gt;&quot;),T=jQuery(&quot;&lt;div&gt;&lt;/div&gt;&quot;),ac=jQuery(&quot;&lt;div&gt;&lt;/div&gt;&quot;),Y=jQuery(&quot;&lt;div&gt;&lt;/div&gt;&quot;),U=jQuery(&quot;&lt;div&gt;&lt;/div&gt;&quot;),h,j,ak,L,b,r,K,ag,z,D=0,v,c,N,M,m,k,Q=10,J=[],f=0,q=1,ai,P,B,A,al,aj,W,S,w={x1:0,y1:0,x2:0,y2:0,width:0,height:0};var p=aa.add(ab).add(Z);var e=T.add(ac).add(Y).add(U);function I(d){return d+ak.left+ag.left-K.left}function G(d){return d+ak.top+ag.top-K.top}function F(d){return d-ak.left-ag.left+K.left}function C(d){return d-ak.top-ag.top+K.top}function ae(d){return d.pageX+ag.left-K.left}function ad(d){return d.pageY+ag.top-K.top}function ah(){ak=jQuery(l).offset();L=jQuery(l).width();b=jQuery(l).height();if(jQuery(r).is(&quot;body&quot;)){K=ag={left:0,top:0}}else{K=jQuery(r).offset();ag={left:r.scrollLeft,top:r.scrollTop}}h=I(0);j=G(0)}function R(){p.css({left:I(w.x1)+&quot;px&quot;,top:G(w.y1)+&quot;px&quot;,width:Math.max(w.width-O.borderWidth*2,0)+&quot;px&quot;,height:Math.max(w.height-O.borderWidth*2,0)+&quot;px&quot;});T.css({left:h+&quot;px&quot;,top:j+&quot;px&quot;,width:w.x1+&quot;px&quot;,height:b+&quot;px&quot;});ac.css({left:h+w.x1+&quot;px&quot;,top:j+&quot;px&quot;,width:w.width+&quot;px&quot;,height:w.y1+&quot;px&quot;});Y.css({left:h+w.x2+&quot;px&quot;,top:j+&quot;px&quot;,width:L-w.x2+&quot;px&quot;,height:b+&quot;px&quot;});U.css({left:h+w.x1+&quot;px&quot;,top:j+w.y2+&quot;px&quot;,width:w.width+&quot;px&quot;,height:b-w.y2+&quot;px&quot;})}function E(d){if(!z){ah();z=true;p.one(&quot;mouseout&quot;,function(){z=false})}W=F(ae(d))-w.x1;S=C(ad(d))-w.y1;J=[];if(O.resizable){if(S&lt;=Q){J[f]=&quot;n&quot;}else{if(S&gt;=w.height-Q){J[f]=&quot;s&quot;}}if(W&lt;=Q){J[q]=&quot;w&quot;}else{if(W&gt;=w.width-Q){J[q]=&quot;e&quot;}}}Z.css(&quot;cursor&quot;,J.length?J.join(&quot;&quot;)+&quot;-resize&quot;:O.movable?&quot;move&quot;:&quot;&quot;)}function o(d){if(d.which!=1){return false}ah();if(O.resizable&amp;&amp;J.length&gt;0){jQuery(&quot;body&quot;).css(&quot;cursor&quot;,J.join(&quot;&quot;)+&quot;-resize&quot;);B=I(J[q]==&quot;w&quot;?w.x2:w.x1);al=G(J[f]==&quot;n&quot;?w.y2:w.y1);jQuery(document).mousemove(X);Z.unbind(&quot;mousemove&quot;,E);jQuery(document).one(&quot;mouseup&quot;,function(){J=[];jQuery(&quot;body&quot;).css(&quot;cursor&quot;,&quot;&quot;);if(O.autoHide){p.add(e).hide()}O.onSelectEnd(l,w);jQuery(document).unbind(&quot;mousemove&quot;,X);Z.mousemove(E)})}else{if(O.movable){m=w.x1+h;k=w.y1+j;N=ae(d);M=ad(d);jQuery(document).mousemove(a).one(&quot;mouseup&quot;,function(){O.onSelectEnd(l,w);jQuery(document).unbind(&quot;mousemove&quot;,a)})}else{jQuery(l).mousedown(d)}}return false}function n(){A=Math.max(h,Math.min(h+L,B+Math.abs(aj-al)*P*(A&gt;B?1:-1)));aj=Math.round(Math.max(j,Math.min(j+b,al+Math.abs(A-B)/P*(aj&gt;al?1:-1))));A=Math.round(A)}function af(){aj=Math.max(j,Math.min(j+b,al+Math.abs(A-B)/P*(aj&gt;al?1:-1)));A=Math.round(Math.max(h,Math.min(h+L,B+Math.abs(aj-al)*P*(A&gt;B?1:-1))));aj=Math.round(aj)}function X(d){A=!J.length||J[q]||P?ae(d):I(w.x2);aj=!J.length||J[f]||P?ad(d):G(w.y2);if(O.minWidth&amp;&amp;Math.abs(A-B)&lt;O.minWidth){A=B-O.minWidth*(A&lt;B?1:-1);if(A&lt;h){B=h+O.minWidth}else{if(A&gt;h+L){B=h+L-O.minWidth}}}if(O.minHeight&amp;&amp;Math.abs(aj-al)&lt;O.minHeight){aj=al-O.minHeight*(aj&lt;al?1:-1);if(aj&lt;j){al=j+O.minHeight}else{if(aj&gt;j+b){al=j+b-O.minHeight}}}A=Math.max(h,Math.min(A,h+L));aj=Math.max(j,Math.min(aj,j+b));if(P){if(Math.abs(A-B)/P&gt;Math.abs(aj-al)){af()}else{n()}}if(O.maxWidth&amp;&amp;Math.abs(A-B)&gt;O.maxWidth){A=B-O.maxWidth*(A&lt;B?1:-1);if(P){af()}}if(O.maxHeight&amp;&amp;Math.abs(aj-al)&gt;O.maxHeight){aj=al-O.maxHeight*(aj&lt;al?1:-1);if(P){n()}}w.x1=F(Math.min(B,A));w.x2=F(Math.max(B,A));w.y1=C(Math.min(al,aj));w.y2=C(Math.max(al,aj));w.width=Math.abs(A-B);w.height=Math.abs(aj-al);R();O.onSelectChange(l,w);return false}function a(d){B=Math.max(h,Math.min(m+ae(d)-N,h+L-w.width));al=Math.max(j,Math.min(k+ad(d)-M,j+b-w.height));A=B+w.width;aj=al+w.height;w.x1=F(B);w.y1=C(al);w.x2=F(A);w.y2=C(aj);R();O.onSelectChange(l,w);d.preventDefault();return false}function g(d){if(d.which!=1){return false}ah();w.x1=w.x2=F(N=B=A=ae(d));w.y1=w.y2=C(M=al=aj=ad(d));w.width=0;w.height=0;J=[];R();p.add(e).show();jQuery(document).mousemove(X);Z.unbind(&quot;mousemove&quot;,E);O.onSelectStart(l,w);jQuery(document).one(&quot;mouseup&quot;,function(){if(O.autoHide){p.add(e).hide()}O.onSelectEnd(l,w);jQuery(document).unbind(&quot;mousemove&quot;,X);Z.mousemove(E)});return false}function u(){ah();R()}this.setOptions=function(d){O=jQuery.extend(O,d);if(d.x1!=null){w.x1=d.x1;w.y1=d.y1;w.x2=d.x2;w.y2=d.y2;d.show=true}r=jQuery(O.parent).get(0);ah();c=jQuery(l);while(c.length&amp;&amp;!c.is(&quot;body&quot;)){if(!isNaN(c.css(&quot;z-index&quot;))&amp;&amp;c.css(&quot;z-index&quot;)&gt;D){D=c.css(&quot;z-index&quot;)}if(c.css(&quot;position&quot;)==&quot;fixed&quot;){v=true}c=c.parent()}B=I(w.x1);al=G(w.y1);A=I(w.x2);aj=G(w.y2);w.width=A-B;w.height=aj-al;R();if(d.hide){p.add(e).hide()}else{if(d.show){p.add(e).show()}}e.addClass(O.classPrefix+&quot;-outer&quot;);aa.addClass(O.classPrefix+&quot;-selection&quot;);ab.addClass(O.classPrefix+&quot;-border1&quot;);Z.addClass(O.classPrefix+&quot;-border2&quot;);p.css({borderWidth:O.borderWidth+&quot;px&quot;});aa.css({backgroundColor:O.selectionColor,opacity:O.selectionOpacity});ab.css({borderStyle:&quot;solid&quot;,borderColor:O.borderColor1});Z.css({borderStyle:&quot;dashed&quot;,borderColor:O.borderColor2});e.css({opacity:O.outerOpacity,backgroundColor:O.outerColor});P=O.aspectRatio&amp;&amp;(ai=O.aspectRatio.split(/:/))?ai[0]/ai[1]:null;if(O.disable||O.enable===false){p.unbind(&quot;mousemove&quot;,E).unbind(&quot;mousedown&quot;,o);jQuery(l).add(e).unbind(&quot;mousedown&quot;,g);jQuery(window).unbind(&quot;resize&quot;,u)}else{if(O.enable||O.disable===false){if(O.resizable||O.movable){p.mousemove(E).mousedown(o)}jQuery(l).add(e).mousedown(g);jQuery(window).resize(u)}}jQuery(O.parent).append(e.add(p));O.enable=O.disable=undefined};if(jQuery.browser.msie){jQuery(l).attr(&quot;unselectable&quot;,&quot;on&quot;)}p.add(e).css({display:&quot;none&quot;,position:v?&quot;fixed&quot;:&quot;absolute&quot;,overflow:&quot;hidden&quot;,zIndex:D&gt;0?D:null});aa.css({borderStyle:&quot;solid&quot;});initOptions={borderColor1:&quot;#000&quot;,borderColor2:&quot;#fff&quot;,borderWidth:1,classPrefix:&quot;imgareaselect&quot;,movable:true,resizable:true,selectionColor:&quot;#fff&quot;,selectionOpacity:0.2,outerColor:&quot;#000&quot;,outerOpacity:0.2,parent:&quot;body&quot;,onSelectStart:function(){},onSelectChange:function(){},onSelectEnd:function(){}};O=jQuery.extend(initOptions,O);this.setOptions(O)};jQuery.fn.imgAreaSelect=function(a){a=a||{};this.each(function(){if(jQuery(this).data(&quot;imgAreaSelect&quot;)){jQuery(this).data(&quot;imgAreaSelect&quot;).setOptions(a)}else{if(a.enable===undefined&amp;&amp;a.disable===undefined){a.enable=true}jQuery(this).data(&quot;imgAreaSelect&quot;,new jQuery.imgAreaSelect(this,a))}});return this};$(document).ready(function(){if($(&quot;#item_list_container&quot;)){$(&quot;#item_list_container&quot;).tablesorter({dateFormat:&quot;dd/mm/yyyy&quot;,highlightClass:&quot;highlight_col&quot;,stripingRowClass:[&quot;item_row1&quot;,&quot;item_row0&quot;],stripeRowsOnStartUp:true})}if($(&quot;.form_datepicker&quot;)){$(&quot;.form_datepicker&quot;).datepicker({changeMonth:true,changeYear:true})}});$(document).ready(function(){inline_status_change()});function inline_status_change(){if($(&quot;.status_change&quot;)){$(&quot;.status_change&quot;).click(function(){current_status=$(this).attr(&quot;rel&quot;);dest=$(this).attr(&quot;href&quot;);dest=dest.replace(&quot;?status=0&quot;,&quot;&quot;).replace(&quot;?status=1&quot;,&quot;&quot;);replace=&quot;#&quot;+this.id;$.get(dest,{status:current_status,ajax:&quot;yes&quot;},function(a){$(replace).replaceWith(a);inline_status_change()});return false})}}jQuery.fn.centerScreen=function(a){var b=this;if(!a){b.css(&quot;top&quot;,$(window).height()/2-this.height()/2);b.css(&quot;left&quot;,$(window).width()/2-this.width()/2);$(window).resize(function(){b.centerScreen(!a)})}else{b.stop();b.animate({top:$(window).height()/2-this.height()/2,left:$(window).width()/2-this.width()/2},200,&quot;linear&quot;)}};var content_page_id;var model_string;var init_upload;var autosaver;var wym_editors=[];if(typeof(file_browser_location)==&quot;undefined&quot;){var file_browser_location=&quot;/admin/files/browse_images&quot;}$(document).ready(function(){$(&quot;#container&quot;).tabs();$(&quot;#page_tab_title&quot;).html($(&quot;#cms_content_title&quot;).val());$(&quot;#cms_content_title&quot;).keyup(function(){$(&quot;#page_tab_title&quot;).html($(&quot;#cms_content_title&quot;).val())});$(&quot;#new_cat_create&quot;).click(function(){$.ajax({url:&quot;../../new_category/?cat=&quot;+$(&quot;#new_cat&quot;).val(),complete:function(a){$(&quot;#category_list&quot;).html(a.responseText);initialise_draggables()}});return false});initialise_draggables();if($(&quot;#copy_permissions_from&quot;).length&gt;0){$(&quot;#copy_permissions_from&quot;).change(function(){$.get(&quot;../../copy_permissions_from/&quot;+content_page_id+&quot;?copy_from=&quot;+$(this).val(),function(a){$(&quot;#cat_dropzone&quot;).html(a);init_deletes()});return false})}$(&quot;#link_dialog&quot;).dialog({autoOpen:false,width:&quot;auto&quot;,height:&quot;auto&quot;});$(&quot;#table_dialog&quot;).dialog({autoOpen:false,title:&quot;Insert a Table&quot;,width:700,height:500});$(&quot;#video_dialog&quot;).dialog({autoOpen:false,title:&quot;Insert a Video&quot;,width:700,height:500});$(&quot;#quick_upload_pane&quot;).dialog({autoOpen:false,title:&quot;Upload an Image&quot;,width:700,height:500});$(&quot;#upload_url_pane&quot;).dialog({autoOpen:false,title:&quot;Get Image From URL&quot;,width:700,height:500});$(&quot;#quick_upload_button&quot;).click(function(){$(&quot;#quick_upload_pane&quot;).dialog(&quot;open&quot;);$.ajax({url:&quot;/admin/files/quickupload/&quot;+content_page_id+&quot;?model=&quot;+model_string+&quot;&amp;join_field=&quot;+join_field,complete:function(a){$(&quot;#quick_upload_pane&quot;).html(a.responseText);init_upload()}})});$(&quot;#upload_url_button&quot;).click(function(){$(&quot;#upload_url_pane&quot;).dialog(&quot;open&quot;);$.ajax({url:&quot;/admin/files/upload_url/&quot;+content_page_id+&quot;?model=&quot;+model_string+&quot;&amp;join_field=&quot;+join_field,complete:function(a){$(&quot;#upload_url_pane&quot;).html(a.responseText);init_upload()}})})});function initialise_draggables(){$(&quot;#category_list .category_tag, #permission_list .permission_tag&quot;).draggable({opacity:0.5,revert:true,scroll:false,containment:&quot;window&quot;,helper:&quot;clone&quot;});$(&quot;#cat_dropzone&quot;).droppable({accept:&quot;.category_tag, .permission_tag&quot;,hoverClass:&quot;dropzone_active&quot;,tolerance:&quot;pointer&quot;,drop:function(b,c){if(c.draggable.hasClass(&quot;permission_tag&quot;)){var a=&quot;../../add_permission/&quot;}else{var a=&quot;../../add_category/&quot;}$.post(a+content_page_id,{tagid:c.draggable.attr(&quot;id&quot;),id:c.draggable.attr(&quot;id&quot;)},function(d){$(&quot;#cat_dropzone&quot;).html(d);init_deletes()})}});$(&quot;#category_list .category_tag, #permission_list .permission_tag&quot;).dblclick(function(){if($(this).hasClass(&quot;permission_tag&quot;)){var a=&quot;../../add_permission/&quot;}else{var a=&quot;../../add_category/&quot;}$.post(a+content_page_id,{tagid:this.id,id:this.id},function(b){$(&quot;#cat_dropzone&quot;).html(b);init_deletes()})});init_deletes()}function init_deletes(){$(&quot;.category_trash_button, .permission_trash_button&quot;).click(function(){if($(this).hasClass(&quot;permission_trash_button&quot;)){var a=&quot;../../remove_permission/&quot;;var b=this.id.replace(&quot;delete_permission_button_&quot;,&quot;&quot;)}else{var a=&quot;../../remove_category/&quot;;var b=this.id.substr(22)}$.get(a+content_page_id+&quot;?cat=&quot;+b,function(c){$(&quot;#cat_dropzone&quot;).html(c);init_deletes()})})}function delayed_cat_filter(a){$(&quot;#category_filter&quot;).css(&quot;background&quot;,&quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);$.ajax({type:&quot;post&quot;,url:&quot;/admin/categories/filters&quot;,data:&quot;filter=&quot;+a,complete:function(b){$(&quot;#category_list&quot;).html(b.responseText);initialise_draggables();if(typeof(t)!=&quot;undefined&quot;){clearTimeout(t)}$(&quot;#category_filter&quot;).css(&quot;background&quot;,&quot;white&quot;)}})}function delayed_image_filter(a){$(&quot;#image_filter&quot;).css(&quot;background&quot;,&quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);$.ajax({type:&quot;post&quot;,url:&quot;/admin/files/image_filter&quot;,data:&quot;filter=&quot;+$(&quot;#image_filter&quot;).val(),complete:function(b){$(&quot;#image_list&quot;).html(b.responseText);initialise_images();if(typeof(t)!=&quot;undefined&quot;){clearTimeout(t)}$(&quot;#image_filter&quot;).css(&quot;background&quot;,&quot;white&quot;)}})}$(document).ready(function(a){$(&quot;#image_filter&quot;).keyup(function(){if(typeof(t)!=&quot;undefined&quot;){clearTimeout(t)}t=setTimeout('delayed_image_filter($(&quot;#image_filter&quot;).val())',400)});$(&quot;#category_filter&quot;).keyup(function(){if(typeof(t)!=&quot;undefined&quot;){clearTimeout(t)}t=setTimeout('delayed_cat_filter($(&quot;#category_filter&quot;).val())',400)});$(&quot;#image_filter&quot;).focus(function(){if($(this).val()==&quot;Filter&quot;){$(this).val(&quot;&quot;)}});$(&quot;#category_filter&quot;).focus(function(){if($(this).val()==&quot;Filter&quot;){$(this).val(&quot;&quot;)}});$(&quot;#category_filter&quot;).blur(function(){if($(this).val()==&quot;&quot;){$(this).val(&quot;Filter&quot;)}});$(&quot;#wildfire_file_new_folder&quot;).change(function(b){$.post(file_browser_location,{filterfolder:$(this).val()},function(c){$(&quot;#image_list&quot;).html(c);initialise_images()})});$(&quot;#view_all_button&quot;).click(function(){$.post(file_browser_location,{},function(b){$(&quot;#image_list&quot;).html(b);initialise_images()})});$.get(file_browser_location+&quot;/1/&quot;,function(b){$(&quot;#image_list&quot;).html(b);initialise_images()});$(&quot;.jqwysi&quot;).wymeditor({skin:&quot;wildfire&quot;,stylesheet:&quot;/stylesheets/cms/wysiwyg_styles.css&quot;,postInit:function(c){c.wildfire(c);wym_editors.push(c);var b=$(&quot;.ui-resizable-handle&quot;);$(&quot;.wym_box&quot;).resizable({handles:&quot;s&quot;});$(&quot;.wym_box&quot;).css(&quot;height&quot;,&quot;250px&quot;);$(&quot;.wym_area_main, .wym_iframe, iframe&quot;).css(&quot;height&quot;,&quot;100%&quot;);$(&quot;.wym_iframe&quot;).css(&quot;height&quot;,&quot;91%&quot;)}});if($(&quot;#quicksave&quot;).length){autosaver=setInterval(function(){autosave_content(wym_editors)},40000);$(&quot;#autosave&quot;).click(function(){autosave_content(wym_editors)})}});function wym_button(a,c){var b=&quot;&lt;li class='wym_tools_&quot;+a+&quot;'&gt;&lt;a name='&quot;+a+&quot;' href='#'&quot;+c+&quot;&lt;/a&gt;&lt;/li&gt;&quot;;return b}function initialise_images(){$(&quot;.drag_image&quot;).draggable({opacity:0.5,revert:true,scroll:true,containment:&quot;window&quot;,helper:&quot;clone&quot;});$(&quot;.remove_image&quot;).click(function(){$.get(&quot;../../remove_image/&quot;+content_page_id+&quot;?image=&quot;+this.id.substr(13)+&quot;&amp;order=&quot;+this.parentNode.id.substr(8),function(a){$(&quot;#drop_zones&quot;).html(a);initialise_images()});return false});$(&quot;#drop_zones&quot;).sortable({update:function(a,b){alert($(&quot;#drop_zones&quot;).sortable(&quot;serialize&quot;))}});$(&quot;.paginate_images&quot;).click(function(){$.get(file_browser_location+&quot;/&quot;+this.id.substr(12),{},function(a){$(&quot;#image_list&quot;).html(a);initialise_images()})});$(&quot;#drop_zones&quot;).droppable({accept:&quot;.drag_image&quot;,hoverClass:&quot;dropzone_active&quot;,tolerance:&quot;pointer&quot;,drop:function(a,b){$.post(&quot;../../add_image/&quot;+content_page_id,{id:b.draggable.attr(&quot;id&quot;),order:$(&quot;.dropped_image&quot;).size()},function(c){$(&quot;#drop_zones&quot;).html(c);initialise_images();return true})}});$(&quot;.url_image&quot;).click(function(){$.get(&quot;/admin/files/image_urls/&quot;+$(this).attr(&quot;id&quot;).replace(&quot;url_image_&quot;,&quot;&quot;),function(a){$(&quot;&lt;div&gt;&quot;+a+&quot;&lt;/div&gt;&quot;).dialog({title:&quot;Image URL&quot;,width:700}).dialog(&quot;open&quot;)})});$(&quot;.add_image&quot;).unbind(&quot;click&quot;);$(&quot;.add_image&quot;).click(function(){$.post(&quot;../../add_image/&quot;+content_page_id,{id:$(this).attr(&quot;id&quot;).replace(&quot;add_image_&quot;,&quot;&quot;),order:$(&quot;.dropped_image&quot;).size()},function(a){$(&quot;#drop_zones&quot;).html(a);initialise_images()});return false})}function get_query_var(c,a){var c=c.substring((c.indexOf(&quot;?&quot;)+1));var d=c.split(&quot;&amp;&quot;);for(var b=0;b&lt;d.length;b++){var e=d[b].split(&quot;=&quot;);if(e[0]==a){return e[1]}}}$(document).ready(function(){if(!a){var a=&quot;images&quot;}});function reload_images(){$.post(file_browser_location,{filterfolder:$(this).val()},function(a){$(&quot;#image_list&quot;).html(a);initialise_images()});$.get(&quot;../../attached_images/&quot;+content_page_id,function(a){$(&quot;#drop_zones&quot;).html(a);initialise_images()})}function cms_insert_url(a){if(a==&quot;web&quot;){var b=prompt(&quot;Enter the URL for this link:&quot;,&quot;http://&quot;)}else{var b=a}if(b!=null){theIframe.contentWindow.document.execCommand(&quot;CreateLink&quot;,false,b);theWidgEditor.theToolbar.setState(&quot;Link&quot;,&quot;on&quot;)}}function cms_insert_video(b,d,a,c){if(c.length&gt;0){theIframe.contentWindow.document.execCommand(&quot;inserthtml&quot;,false,&quot;&lt;a href='&quot;+b+&quot;' rel='&quot;+d+&quot;px:&quot;+a+&quot;px'&gt;LOCAL:&quot;+c+&quot;&lt;/a&gt;&quot;)}else{theIframe.contentWindow.document.execCommand(&quot;inserthtml&quot;,false,&quot;&lt;a href='&quot;+b+&quot;' rel='&quot;+d+&quot;px:&quot;+a+&quot;px'&gt;&quot;+b+&quot;&lt;/a&gt;&quot;)}theWidgEditor.theToolbar.setState(&quot;Video&quot;,&quot;on&quot;)}$(document).ready(function(){$(&quot;#autosave_disable&quot;).click(function(){clearInterval(autosaver);$(&quot;#autosave_status&quot;).html(&quot;Autosave Disabled&quot;)})});function autosave_content(c,a){for(var b in c){c[b].update()}$(&quot;#ajaxBusy&quot;).css({opacity:0});$.ajax({url:&quot;/admin/content/autosave/&quot;+content_page_id,beforeSend:function(){$(&quot;#quicksave&quot;).effect(&quot;pulsate&quot;,{times:3},1000)},type:&quot;POST&quot;,processData:false,data:$(&quot;#content_edit_form&quot;).serialize(),success:function(d){$(&quot;#autosave_status&quot;).html(&quot;Saved at &quot;+d);$(&quot;#ajaxBusy&quot;).css({opacity:1});if(typeof(a)==&quot;function&quot;){a()}}})}function open_modal_preview(a){$(&quot;body&quot;).append('&lt;div id=&quot;modal_preview_window&quot;&gt;&lt;iframe src=&quot;&quot; /&gt;&lt;/div&gt;');$(&quot;#modal_preview_window&quot;).dialog({autoOpen:false,width:(0.9*$(window).width()),height:(0.9*$(window).height()),modal:true,close:function(b,c){$(this).remove()}});$(&quot;#modal_preview_window iframe&quot;).attr(&quot;src&quot;,&quot;&quot;).attr(&quot;src&quot;,a).load(function(){$(&quot;#modal_preview_window&quot;).dialog(&quot;open&quot;);$(&quot;#modal_preview_window iframe&quot;).css({width:&quot;100%&quot;,height:&quot;98%&quot;,border:&quot;none&quot;})})}$(document).ready(function(){$(&quot;a.modal_preview&quot;).click(function(){open_modal_preview($(this).attr(&quot;href&quot;));return false})});$(document).ready(function(){$(&quot;#preview_link&quot;).unbind(&quot;click&quot;).click(function(){var a=$(this);autosave_content(wym_editors,function(){if(a.hasClass(&quot;modal_preview&quot;)){open_modal_preview(a.attr(&quot;href&quot;))}else{window.open(a.attr(&quot;href&quot;))}});return false})});$(document).ready(function(){$(&quot;#content_title_edit&quot;).hover(function(){var a=$(this).parent();a.css(&quot;background-color&quot;,&quot;#fbf485&quot;);$(this).bind(&quot;click.editable&quot;,function(){$(this).unbind(&quot;click.editable&quot;);el='&lt;input type=&quot;text&quot; value=&quot;'+$(&quot;#content_title_label&quot;).text()+'&quot; id=&quot;content_title_editing&quot; /&gt;';elsave=$(&quot;&lt;a href='#' id='content_edit_save'&gt;&lt;img src='/images/cms/cms_quick_save.gif'&lt;/a&gt;&quot;);a.parent().after(el);$(&quot;#content_title_editing&quot;).before(elsave);$(&quot;#content_edit_save&quot;).css({position:&quot;relative&quot;,left:&quot;255px&quot;,top:&quot;10px&quot;,width:&quot;0px&quot;,cursor:&quot;pointer&quot;});elsave.click(function(){$(&quot;#content_title&quot;).show();$(&quot;#content_title_label&quot;).html($(&quot;#content_title_editing&quot;).val());$(&quot;#content_title_editing&quot;).remove();$(this).remove()});$(&quot;#content_title&quot;).hide();$(&quot;#content_title_editing&quot;).change(function(){var b=$(&quot;#content_title&quot;).attr(&quot;rel&quot;);$(&quot;#&quot;+b).val($(this).val())});$(&quot;#content_title_editing&quot;).blur(function(){$(&quot;#content_title&quot;).show();$(&quot;#content_title_label&quot;).html($(&quot;#content_title_editing&quot;).val());$(&quot;#content_title_editing&quot;).remove();$(&quot;#content_edit_save&quot;).remove()});$(&quot;#content_title_editing&quot;).get(0).focus()})},function(){var a=$(this).parent();a.css(&quot;background-color&quot;,&quot;transparent&quot;);$(this).unbind(&quot;click.editable&quot;)})});$(document).ready(function(){$(&quot;body&quot;).append('&lt;div id=&quot;ajaxBusy&quot;&gt;&lt;p&gt;Loading&lt;br /&gt;&lt;img src=&quot;/images/cms/indicator_dark.gif&quot;&gt;&lt;/p&gt;&lt;/div&gt;');$(&quot;#ajaxBusy&quot;).css({display:&quot;none&quot;,margin:&quot;0&quot;,position:&quot;absolute&quot;,background:&quot;#333&quot;,textAlign:&quot;center&quot;,fontSize:&quot;100%&quot;,color:&quot;#999&quot;,letterSpacing:&quot;5px&quot;,textTransform:&quot;uppercase&quot;,border:&quot;1px solid #c1c1c1&quot;,width:&quot;200px&quot;,height:&quot;90px&quot;,&quot;-webkit-box-shadow&quot;:&quot;5px 5px 5px #666&quot;,&quot;-moz-box-shadow&quot;:&quot;5px 5px 5px #666&quot;,lineHeight:&quot;190%&quot;,&quot;-webkit-border-radius&quot;:&quot;7px&quot;,&quot;-moz-border-radius&quot;:&quot;7px&quot;});$(document).ajaxStart(function(a){$(&quot;#ajaxBusy&quot;).show().centerScreen()});$(document).ajaxStop(function(){$(&quot;#ajaxBusy&quot;).hide()});$(document).ajaxError(function(){$(&quot;#ajaxBusy&quot;).hide()})});$(document).ready(function(){$(&quot;#cms_content_language&quot;).change(function(){var a=window.location.href.split(&quot;?&quot;);window.location.replace(a[0]+&quot;?lang=&quot;+$(this).val())})});$(document).ready(function(){$(&quot;#dashboard #sub-navigation-container #quick_search&quot;).remove();$(&quot;#quick_search form input, #quick_create form input&quot;).hint();$(&quot;#live_search_field&quot;).keyup(function(){if(typeof(t)!=&quot;undefined&quot;){clearTimeout(t)}t=setTimeout(function(){live_search($(&quot;#live_search_field&quot;).val())},400)});$(&quot;.live_search_results&quot;).hover(function(){},function(){s=setTimeout(&quot;live_search_close()&quot;,800)});if($(&quot;#statistics&quot;).length){$(&quot;#statistics&quot;).load(&quot;/admin/home/stats&quot;,false,function(){$(this).css(&quot;background-image&quot;,&quot;none&quot;)})}});function live_search(a){$(&quot;#live_search_field&quot;).css(&quot;background&quot;,&quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);$.ajax({type:&quot;post&quot;,url:&quot;/admin/content/search&quot;,data:&quot;input=&quot;+a,complete:function(b){$(&quot;#live_search_field&quot;).parent().find(&quot;.live_search_results&quot;).html(b.responseText).show();if(typeof(t)!=&quot;undefined&quot;){clearTimeout(t)}$(&quot;#live_search_field&quot;).css(&quot;background&quot;,&quot;white&quot;)}})}function live_search_close(){if(typeof(s)!=&quot;undefined&quot;){clearTimeout(s)}$(&quot;.live_search_results&quot;).empty();$(&quot;.live_search_results&quot;).hide()}var SWFUpload;if(SWFUpload==undefined){SWFUpload=function(a){this.initSWFUpload(a)}}SWFUpload.prototype.initSWFUpload=function(b){try{this.customSettings={};this.settings=b;this.eventQueue=[];this.movieName=&quot;SWFUpload_&quot;+SWFUpload.movieCount++;this.movieElement=null;SWFUpload.instances[this.movieName]=this;this.initSettings();this.loadFlash();this.displayDebugInfo()}catch(a){delete SWFUpload.instances[this.movieName];throw a}};SWFUpload.instances={};SWFUpload.movieCount=0;SWFUpload.version=&quot;2.2.0 2009-03-25&quot;;SWFUpload.QUEUE_ERROR={QUEUE_LIMIT_EXCEEDED:-100,FILE_EXCEEDS_SIZE_LIMIT:-110,ZERO_BYTE_FILE:-120,INVALID_FILETYPE:-130};SWFUpload.UPLOAD_ERROR={HTTP_ERROR:-200,MISSING_UPLOAD_URL:-210,IO_ERROR:-220,SECURITY_ERROR:-230,UPLOAD_LIMIT_EXCEEDED:-240,UPLOAD_FAILED:-250,SPECIFIED_FILE_ID_NOT_FOUND:-260,FILE_VALIDATION_FAILED:-270,FILE_CANCELLED:-280,UPLOAD_STOPPED:-290};SWFUpload.FILE_STATUS={QUEUED:-1,IN_PROGRESS:-2,ERROR:-3,COMPLETE:-4,CANCELLED:-5};SWFUpload.BUTTON_ACTION={SELECT_FILE:-100,SELECT_FILES:-110,START_UPLOAD:-120};SWFUpload.CURSOR={ARROW:-1,HAND:-2};SWFUpload.WINDOW_MODE={WINDOW:&quot;window&quot;,TRANSPARENT:&quot;transparent&quot;,OPAQUE:&quot;opaque&quot;};SWFUpload.completeURL=function(a){if(typeof(a)!==&quot;string&quot;||a.match(/^https?:\/\//i)||a.match(/^\//)){return a}var c=window.location.protocol+&quot;//&quot;+window.location.hostname+(window.location.port?&quot;:&quot;+window.location.port:&quot;&quot;);var b=window.location.pathname.lastIndexOf(&quot;/&quot;);if(b&lt;=0){path=&quot;/&quot;}else{path=window.location.pathname.substr(0,b)+&quot;/&quot;}return path+a};SWFUpload.prototype.initSettings=function(){this.ensureDefault=function(b,a){this.settings[b]=(this.settings[b]==undefined)?a:this.settings[b]};this.ensureDefault(&quot;upload_url&quot;,&quot;&quot;);this.ensureDefault(&quot;preserve_relative_urls&quot;,false);this.ensureDefault(&quot;file_post_name&quot;,&quot;Filedata&quot;);this.ensureDefault(&quot;post_params&quot;,{});this.ensureDefault(&quot;use_query_string&quot;,false);this.ensureDefault(&quot;requeue_on_error&quot;,false);this.ensureDefault(&quot;http_success&quot;,[]);this.ensureDefault(&quot;assume_success_timeout&quot;,0);this.ensureDefault(&quot;file_types&quot;,&quot;*.*&quot;);this.ensureDefault(&quot;file_types_description&quot;,&quot;All Files&quot;);this.ensureDefault(&quot;file_size_limit&quot;,0);this.ensureDefault(&quot;file_upload_limit&quot;,0);this.ensureDefault(&quot;file_queue_limit&quot;,0);this.ensureDefault(&quot;flash_url&quot;,&quot;swfupload.swf&quot;);this.ensureDefault(&quot;prevent_swf_caching&quot;,true);this.ensureDefault(&quot;button_image_url&quot;,&quot;&quot;);this.ensureDefault(&quot;button_width&quot;,1);this.ensureDefault(&quot;button_height&quot;,1);this.ensureDefault(&quot;button_text&quot;,&quot;&quot;);this.ensureDefault(&quot;button_text_style&quot;,&quot;color: #000000; font-size: 16pt;&quot;);this.ensureDefault(&quot;button_text_top_padding&quot;,0);this.ensureDefault(&quot;button_text_left_padding&quot;,0);this.ensureDefault(&quot;button_action&quot;,SWFUpload.BUTTON_ACTION.SELECT_FILES);this.ensureDefault(&quot;button_disabled&quot;,false);this.ensureDefault(&quot;button_placeholder_id&quot;,&quot;&quot;);this.ensureDefault(&quot;button_placeholder&quot;,null);this.ensureDefault(&quot;button_cursor&quot;,SWFUpload.CURSOR.ARROW);this.ensureDefault(&quot;button_window_mode&quot;,SWFUpload.WINDOW_MODE.WINDOW);this.ensureDefault(&quot;debug&quot;,false);this.settings.debug_enabled=this.settings.debug;this.settings.return_upload_start_handler=this.returnUploadStart;this.ensureDefault(&quot;swfupload_loaded_handler&quot;,null);this.ensureDefault(&quot;file_dialog_start_handler&quot;,null);this.ensureDefault(&quot;file_queued_handler&quot;,null);this.ensureDefault(&quot;file_queue_error_handler&quot;,null);this.ensureDefault(&quot;file_dialog_complete_handler&quot;,null);this.ensureDefault(&quot;upload_start_handler&quot;,null);this.ensureDefault(&quot;upload_progress_handler&quot;,null);this.ensureDefault(&quot;upload_error_handler&quot;,null);this.ensureDefault(&quot;upload_success_handler&quot;,null);this.ensureDefault(&quot;upload_complete_handler&quot;,null);this.ensureDefault(&quot;debug_handler&quot;,this.debugMessage);this.ensureDefault(&quot;custom_settings&quot;,{});this.customSettings=this.settings.custom_settings;if(!!this.settings.prevent_swf_caching){this.settings.flash_url=this.settings.flash_url+(this.settings.flash_url.indexOf(&quot;?&quot;)&lt;0?&quot;?&quot;:&quot;&amp;&quot;)+&quot;preventswfcaching=&quot;+new Date().getTime()}if(!this.settings.preserve_relative_urls){this.settings.upload_url=SWFUpload.completeURL(this.settings.upload_url);this.settings.button_image_url=SWFUpload.completeURL(this.settings.button_image_url)}delete this.ensureDefault};SWFUpload.prototype.loadFlash=function(){var a,b;if(document.getElementById(this.movieName)!==null){throw&quot;ID &quot;+this.movieName+&quot; is already in use. The Flash Object could not be added&quot;}a=document.getElementById(this.settings.button_placeholder_id)||this.settings.button_placeholder;if(a==undefined){throw&quot;Could not find the placeholder element: &quot;+this.settings.button_placeholder_id}b=document.createElement(&quot;div&quot;);b.innerHTML=this.getFlashHTML();a.parentNode.replaceChild(b.firstChild,a);if(window[this.movieName]==undefined){window[this.movieName]=this.getMovieElement()}};SWFUpload.prototype.getFlashHTML=function(){return['&lt;object id=&quot;',this.movieName,'&quot; type=&quot;application/x-shockwave-flash&quot; data=&quot;',this.settings.flash_url,'&quot; width=&quot;',this.settings.button_width,'&quot; height=&quot;',this.settings.button_height,'&quot; class=&quot;swfupload&quot;&gt;','&lt;param name=&quot;wmode&quot; value=&quot;',this.settings.button_window_mode,'&quot; /&gt;','&lt;param name=&quot;movie&quot; value=&quot;',this.settings.flash_url,'&quot; /&gt;','&lt;param name=&quot;quality&quot; value=&quot;high&quot; /&gt;','&lt;param name=&quot;menu&quot; value=&quot;false&quot; /&gt;','&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;','&lt;param name=&quot;flashvars&quot; value=&quot;'+this.getFlashVars()+'&quot; /&gt;',&quot;&lt;/object&gt;&quot;].join(&quot;&quot;)};SWFUpload.prototype.getFlashVars=function(){var b=this.buildParamString();var a=this.settings.http_success.join(&quot;,&quot;);return[&quot;movieName=&quot;,encodeURIComponent(this.movieName),&quot;&amp;amp;uploadURL=&quot;,encodeURIComponent(this.settings.upload_url),&quot;&amp;amp;useQueryString=&quot;,encodeURIComponent(this.settings.use_query_string),&quot;&amp;amp;requeueOnError=&quot;,encodeURIComponent(this.settings.requeue_on_error),&quot;&amp;amp;httpSuccess=&quot;,encodeURIComponent(a),&quot;&amp;amp;assumeSuccessTimeout=&quot;,encodeURIComponent(this.settings.assume_success_timeout),&quot;&amp;amp;params=&quot;,encodeURIComponent(b),&quot;&amp;amp;filePostName=&quot;,encodeURIComponent(this.settings.file_post_name),&quot;&amp;amp;fileTypes=&quot;,encodeURIComponent(this.settings.file_types),&quot;&amp;amp;fileTypesDescription=&quot;,encodeURIComponent(this.settings.file_types_description),&quot;&amp;amp;fileSizeLimit=&quot;,encodeURIComponent(this.settings.file_size_limit),&quot;&amp;amp;fileUploadLimit=&quot;,encodeURIComponent(this.settings.file_upload_limit),&quot;&amp;amp;fileQueueLimit=&quot;,encodeURIComponent(this.settings.file_queue_limit),&quot;&amp;amp;debugEnabled=&quot;,encodeURIComponent(this.settings.debug_enabled),&quot;&amp;amp;buttonImageURL=&quot;,encodeURIComponent(this.settings.button_image_url),&quot;&amp;amp;buttonWidth=&quot;,encodeURIComponent(this.settings.button_width),&quot;&amp;amp;buttonHeight=&quot;,encodeURIComponent(this.settings.button_height),&quot;&amp;amp;buttonText=&quot;,encodeURIComponent(this.settings.button_text),&quot;&amp;amp;buttonTextTopPadding=&quot;,encodeURIComponent(this.settings.button_text_top_padding),&quot;&amp;amp;buttonTextLeftPadding=&quot;,encodeURIComponent(this.settings.button_text_left_padding),&quot;&amp;amp;buttonTextStyle=&quot;,encodeURIComponent(this.settings.button_text_style),&quot;&amp;amp;buttonAction=&quot;,encodeURIComponent(this.settings.button_action),&quot;&amp;amp;buttonDisabled=&quot;,encodeURIComponent(this.settings.button_disabled),&quot;&amp;amp;buttonCursor=&quot;,encodeURIComponent(this.settings.button_cursor)].join(&quot;&quot;)};SWFUpload.prototype.getMovieElement=function(){if(this.movieElement==undefined){this.movieElement=document.getElementById(this.movieName)}if(this.movieElement===null){throw&quot;Could not find Flash element&quot;}return this.movieElement};SWFUpload.prototype.buildParamString=function(){var c=this.settings.post_params;var b=[];if(typeof(c)===&quot;object&quot;){for(var a in c){if(c.hasOwnProperty(a)){b.push(encodeURIComponent(a.toString())+&quot;=&quot;+encodeURIComponent(c[a].toString()))}}}return b.join(&quot;&amp;amp;&quot;)};SWFUpload.prototype.destroy=function(){try{this.cancelUpload(null,false);var a=null;a=this.getMovieElement();if(a&amp;&amp;typeof(a.CallFunction)===&quot;unknown&quot;){for(var c in a){try{if(typeof(a[c])===&quot;function&quot;){a[c]=null}}catch(e){}}try{a.parentNode.removeChild(a)}catch(b){}}window[this.movieName]=null;SWFUpload.instances[this.movieName]=null;delete SWFUpload.instances[this.movieName];this.movieElement=null;this.settings=null;this.customSettings=null;this.eventQueue=null;this.movieName=null;return true}catch(d){return false}};SWFUpload.prototype.displayDebugInfo=function(){this.debug([&quot;---SWFUpload Instance Info---\n&quot;,&quot;Version: &quot;,SWFUpload.version,&quot;\n&quot;,&quot;Movie Name: &quot;,this.movieName,&quot;\n&quot;,&quot;Settings:\n&quot;,&quot;\t&quot;,&quot;upload_url:               &quot;,this.settings.upload_url,&quot;\n&quot;,&quot;\t&quot;,&quot;flash_url:                &quot;,this.settings.flash_url,&quot;\n&quot;,&quot;\t&quot;,&quot;use_query_string:         &quot;,this.settings.use_query_string.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;requeue_on_error:         &quot;,this.settings.requeue_on_error.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;http_success:             &quot;,this.settings.http_success.join(&quot;, &quot;),&quot;\n&quot;,&quot;\t&quot;,&quot;assume_success_timeout:   &quot;,this.settings.assume_success_timeout,&quot;\n&quot;,&quot;\t&quot;,&quot;file_post_name:           &quot;,this.settings.file_post_name,&quot;\n&quot;,&quot;\t&quot;,&quot;post_params:              &quot;,this.settings.post_params.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_types:               &quot;,this.settings.file_types,&quot;\n&quot;,&quot;\t&quot;,&quot;file_types_description:   &quot;,this.settings.file_types_description,&quot;\n&quot;,&quot;\t&quot;,&quot;file_size_limit:          &quot;,this.settings.file_size_limit,&quot;\n&quot;,&quot;\t&quot;,&quot;file_upload_limit:        &quot;,this.settings.file_upload_limit,&quot;\n&quot;,&quot;\t&quot;,&quot;file_queue_limit:         &quot;,this.settings.file_queue_limit,&quot;\n&quot;,&quot;\t&quot;,&quot;debug:                    &quot;,this.settings.debug.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;prevent_swf_caching:      &quot;,this.settings.prevent_swf_caching.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_placeholder_id:    &quot;,this.settings.button_placeholder_id.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_placeholder:       &quot;,(this.settings.button_placeholder?&quot;Set&quot;:&quot;Not Set&quot;),&quot;\n&quot;,&quot;\t&quot;,&quot;button_image_url:         &quot;,this.settings.button_image_url.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_width:             &quot;,this.settings.button_width.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_height:            &quot;,this.settings.button_height.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text:              &quot;,this.settings.button_text.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text_style:        &quot;,this.settings.button_text_style.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text_top_padding:  &quot;,this.settings.button_text_top_padding.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_text_left_padding: &quot;,this.settings.button_text_left_padding.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_action:            &quot;,this.settings.button_action.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;button_disabled:          &quot;,this.settings.button_disabled.toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;custom_settings:          &quot;,this.settings.custom_settings.toString(),&quot;\n&quot;,&quot;Event Handlers:\n&quot;,&quot;\t&quot;,&quot;swfupload_loaded_handler assigned:  &quot;,(typeof this.settings.swfupload_loaded_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_dialog_start_handler assigned: &quot;,(typeof this.settings.file_dialog_start_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_queued_handler assigned:       &quot;,(typeof this.settings.file_queued_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;file_queue_error_handler assigned:  &quot;,(typeof this.settings.file_queue_error_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_start_handler assigned:      &quot;,(typeof this.settings.upload_start_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_progress_handler assigned:   &quot;,(typeof this.settings.upload_progress_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_error_handler assigned:      &quot;,(typeof this.settings.upload_error_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_success_handler assigned:    &quot;,(typeof this.settings.upload_success_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;upload_complete_handler assigned:   &quot;,(typeof this.settings.upload_complete_handler===&quot;function&quot;).toString(),&quot;\n&quot;,&quot;\t&quot;,&quot;debug_handler assigned:             &quot;,(typeof this.settings.debug_handler===&quot;function&quot;).toString(),&quot;\n&quot;].join(&quot;&quot;))};SWFUpload.prototype.addSetting=function(b,c,a){if(c==undefined){return(this.settings[b]=a)}else{return(this.settings[b]=c)}};SWFUpload.prototype.getSetting=function(a){if(this.settings[a]!=undefined){return this.settings[a]}return&quot;&quot;};SWFUpload.prototype.callFlash=function(functionName,argumentArray){argumentArray=argumentArray||[];var movieElement=this.getMovieElement();var returnValue,returnString;try{returnString=movieElement.CallFunction('&lt;invoke name=&quot;'+functionName+'&quot; returntype=&quot;javascript&quot;&gt;'+__flash__argumentsToXML(argumentArray,0)+&quot;&lt;/invoke&gt;&quot;);returnValue=eval(returnString)}catch(ex){throw&quot;Call to &quot;+functionName+&quot; failed&quot;}if(returnValue!=undefined&amp;&amp;typeof returnValue.post===&quot;object&quot;){returnValue=this.unescapeFilePostParams(returnValue)}return returnValue};SWFUpload.prototype.selectFile=function(){this.callFlash(&quot;SelectFile&quot;)};SWFUpload.prototype.selectFiles=function(){this.callFlash(&quot;SelectFiles&quot;)};SWFUpload.prototype.startUpload=function(a){this.callFlash(&quot;StartUpload&quot;,[a])};SWFUpload.prototype.cancelUpload=function(a,b){if(b!==false){b=true}this.callFlash(&quot;CancelUpload&quot;,[a,b])};SWFUpload.prototype.stopUpload=function(){this.callFlash(&quot;StopUpload&quot;)};SWFUpload.prototype.getStats=function(){return this.callFlash(&quot;GetStats&quot;)};SWFUpload.prototype.setStats=function(a){this.callFlash(&quot;SetStats&quot;,[a])};SWFUpload.prototype.getFile=function(a){if(typeof(a)===&quot;number&quot;){return this.callFlash(&quot;GetFileByIndex&quot;,[a])}else{return this.callFlash(&quot;GetFile&quot;,[a])}};SWFUpload.prototype.addFileParam=function(a,b,c){return this.callFlash(&quot;AddFileParam&quot;,[a,b,c])};SWFUpload.prototype.removeFileParam=function(a,b){this.callFlash(&quot;RemoveFileParam&quot;,[a,b])};SWFUpload.prototype.setUploadURL=function(a){this.settings.upload_url=a.toString();this.callFlash(&quot;SetUploadURL&quot;,[a])};SWFUpload.prototype.setPostParams=function(a){this.settings.post_params=a;this.callFlash(&quot;SetPostParams&quot;,[a])};SWFUpload.prototype.addPostParam=function(a,b){this.settings.post_params[a]=b;this.callFlash(&quot;SetPostParams&quot;,[this.settings.post_params])};SWFUpload.prototype.removePostParam=function(a){delete this.settings.post_params[a];this.callFlash(&quot;SetPostParams&quot;,[this.settings.post_params])};SWFUpload.prototype.setFileTypes=function(a,b){this.settings.file_types=a;this.settings.file_types_description=b;this.callFlash(&quot;SetFileTypes&quot;,[a,b])};SWFUpload.prototype.setFileSizeLimit=function(a){this.settings.file_size_limit=a;this.callFlash(&quot;SetFileSizeLimit&quot;,[a])};SWFUpload.prototype.setFileUploadLimit=function(a){this.settings.file_upload_limit=a;this.callFlash(&quot;SetFileUploadLimit&quot;,[a])};SWFUpload.prototype.setFileQueueLimit=function(a){this.settings.file_queue_limit=a;this.callFlash(&quot;SetFileQueueLimit&quot;,[a])};SWFUpload.prototype.setFilePostName=function(a){this.settings.file_post_name=a;this.callFlash(&quot;SetFilePostName&quot;,[a])};SWFUpload.prototype.setUseQueryString=function(a){this.settings.use_query_string=a;this.callFlash(&quot;SetUseQueryString&quot;,[a])};SWFUpload.prototype.setRequeueOnError=function(a){this.settings.requeue_on_error=a;this.callFlash(&quot;SetRequeueOnError&quot;,[a])};SWFUpload.prototype.setHTTPSuccess=function(a){if(typeof a===&quot;string&quot;){a=a.replace(&quot; &quot;,&quot;&quot;).split(&quot;,&quot;)}this.settings.http_success=a;this.callFlash(&quot;SetHTTPSuccess&quot;,[a])};SWFUpload.prototype.setAssumeSuccessTimeout=function(a){this.settings.assume_success_timeout=a;this.callFlash(&quot;SetAssumeSuccessTimeout&quot;,[a])};SWFUpload.prototype.setDebugEnabled=function(a){this.settings.debug_enabled=a;this.callFlash(&quot;SetDebugEnabled&quot;,[a])};SWFUpload.prototype.setButtonImageURL=function(a){if(a==undefined){a=&quot;&quot;}this.settings.button_image_url=a;this.callFlash(&quot;SetButtonImageURL&quot;,[a])};SWFUpload.prototype.setButtonDimensions=function(c,a){this.settings.button_width=c;this.settings.button_height=a;var b=this.getMovieElement();if(b!=undefined){b.style.width=c+&quot;px&quot;;b.style.height=a+&quot;px&quot;}this.callFlash(&quot;SetButtonDimensions&quot;,[c,a])};SWFUpload.prototype.setButtonText=function(a){this.settings.button_text=a;this.callFlash(&quot;SetButtonText&quot;,[a])};SWFUpload.prototype.setButtonTextPadding=function(b,a){this.settings.button_text_top_padding=a;this.settings.button_text_left_padding=b;this.callFlash(&quot;SetButtonTextPadding&quot;,[b,a])};SWFUpload.prototype.setButtonTextStyle=function(a){this.settings.button_text_style=a;this.callFlash(&quot;SetButtonTextStyle&quot;,[a])};SWFUpload.prototype.setButtonDisabled=function(a){this.settings.button_disabled=a;this.callFlash(&quot;SetButtonDisabled&quot;,[a])};SWFUpload.prototype.setButtonAction=function(a){this.settings.button_action=a;this.callFlash(&quot;SetButtonAction&quot;,[a])};SWFUpload.prototype.setButtonCursor=function(a){this.settings.button_cursor=a;this.callFlash(&quot;SetButtonCursor&quot;,[a])};SWFUpload.prototype.queueEvent=function(b,c){if(c==undefined){c=[]}else{if(!(c instanceof Array)){c=[c]}}var a=this;if(typeof this.settings[b]===&quot;function&quot;){this.eventQueue.push(function(){this.settings[b].apply(this,c)});setTimeout(function(){a.executeNextEvent()},0)}else{if(this.settings[b]!==null){throw&quot;Event handler &quot;+b+&quot; is unknown or is not a function&quot;}}};SWFUpload.prototype.executeNextEvent=function(){var a=this.eventQueue?this.eventQueue.shift():null;if(typeof(a)===&quot;function&quot;){a.apply(this)}};SWFUpload.prototype.unescapeFilePostParams=function(c){var e=/[$]([0-9a-f]{4})/i;var f={};var d;if(c!=undefined){for(var a in c.post){if(c.post.hasOwnProperty(a)){d=a;var b;while((b=e.exec(d))!==null){d=d.replace(b[0],String.fromCharCode(parseInt(&quot;0x&quot;+b[1],16)))}f[d]=c.post[a]}}c.post=f}return c};SWFUpload.prototype.testExternalInterface=function(){try{return this.callFlash(&quot;TestExternalInterface&quot;)}catch(a){return false}};SWFUpload.prototype.flashReady=function(){var a=this.getMovieElement();if(!a){this.debug(&quot;Flash called back ready but the flash movie can't be found.&quot;);return}this.cleanUp(a);this.queueEvent(&quot;swfupload_loaded_handler&quot;)};SWFUpload.prototype.cleanUp=function(a){try{if(this.movieElement&amp;&amp;typeof(a.CallFunction)===&quot;unknown&quot;){this.debug(&quot;Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)&quot;);for(var c in a){try{if(typeof(a[c])===&quot;function&quot;){a[c]=null}}catch(b){}}}}catch(d){}window.__flash__removeCallback=function(e,f){try{if(e){e[f]=null}}catch(g){}}};SWFUpload.prototype.fileDialogStart=function(){this.queueEvent(&quot;file_dialog_start_handler&quot;)};SWFUpload.prototype.fileQueued=function(a){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;file_queued_handler&quot;,a)};SWFUpload.prototype.fileQueueError=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;file_queue_error_handler&quot;,[a,c,b])};SWFUpload.prototype.fileDialogComplete=function(b,c,a){this.queueEvent(&quot;file_dialog_complete_handler&quot;,[b,c,a])};SWFUpload.prototype.uploadStart=function(a){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;return_upload_start_handler&quot;,a)};SWFUpload.prototype.returnUploadStart=function(a){var b;if(typeof this.settings.upload_start_handler===&quot;function&quot;){a=this.unescapeFilePostParams(a);b=this.settings.upload_start_handler.call(this,a)}else{if(this.settings.upload_start_handler!=undefined){throw&quot;upload_start_handler must be a function&quot;}}if(b===undefined){b=true}b=!!b;this.callFlash(&quot;ReturnUploadStart&quot;,[b])};SWFUpload.prototype.uploadProgress=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;upload_progress_handler&quot;,[a,c,b])};SWFUpload.prototype.uploadError=function(a,c,b){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;upload_error_handler&quot;,[a,c,b])};SWFUpload.prototype.uploadSuccess=function(b,a,c){b=this.unescapeFilePostParams(b);this.queueEvent(&quot;upload_success_handler&quot;,[b,a,c])};SWFUpload.prototype.uploadComplete=function(a){a=this.unescapeFilePostParams(a);this.queueEvent(&quot;upload_complete_handler&quot;,a)};SWFUpload.prototype.debug=function(a){this.queueEvent(&quot;debug_handler&quot;,a)};SWFUpload.prototype.debugMessage=function(c){if(this.settings.debug){var a,d=[];if(typeof c===&quot;object&quot;&amp;&amp;typeof c.name===&quot;string&quot;&amp;&amp;typeof c.message===&quot;string&quot;){for(var b in c){if(c.hasOwnProperty(b)){d.push(b+&quot;: &quot;+c[b])}}a=d.join(&quot;\n&quot;)||&quot;&quot;;d=a.split(&quot;\n&quot;);a=&quot;EXCEPTION: &quot;+d.join(&quot;\nEXCEPTION: &quot;);SWFUpload.Console.writeLine(a)}else{SWFUpload.Console.writeLine(c)}}};SWFUpload.Console={};SWFUpload.Console.writeLine=function(d){var b,a;try{b=document.getElementById(&quot;SWFUpload_Console&quot;);if(!b){a=document.createElement(&quot;form&quot;);document.getElementsByTagName(&quot;body&quot;)[0].appendChild(a);b=document.createElement(&quot;textarea&quot;);b.id=&quot;SWFUpload_Console&quot;;b.style.fontFamily=&quot;monospace&quot;;b.setAttribute(&quot;wrap&quot;,&quot;off&quot;);b.wrap=&quot;off&quot;;b.style.overflow=&quot;auto&quot;;b.style.width=&quot;700px&quot;;b.style.height=&quot;350px&quot;;b.style.margin=&quot;5px&quot;;a.appendChild(b)}b.value+=d+&quot;\n&quot;;b.scrollTop=b.scrollHeight-b.clientHeight}catch(c){alert(&quot;Exception: &quot;+c.name+&quot; Message: &quot;+c.message)}};var SWFUpload;if(typeof(SWFUpload)===&quot;function&quot;){SWFUpload.queue={};SWFUpload.prototype.initSettings=(function(a){return function(){if(typeof(a)===&quot;function&quot;){a.call(this)}this.customSettings.queue_cancelled_flag=false;this.customSettings.queue_upload_count=0;this.settings.user_upload_complete_handler=this.settings.upload_complete_handler;this.settings.upload_complete_handler=SWFUpload.queue.uploadCompleteHandler;this.settings.queue_complete_handler=this.settings.queue_complete_handler||null}})(SWFUpload.prototype.initSettings);SWFUpload.prototype.startUpload=function(a){this.customSettings.queue_cancelled_flag=false;this.callFlash(&quot;StartUpload&quot;,false,[a])};SWFUpload.prototype.cancelQueue=function(){this.customSettings.queue_cancelled_flag=true;this.stopUpload();var a=this.getStats();while(a.files_queued&gt;0){this.cancelUpload();a=this.getStats()}};SWFUpload.queue.uploadCompleteHandler=function(b){var c=this.settings.user_upload_complete_handler;var d;if(b.filestatus===SWFUpload.FILE_STATUS.COMPLETE){this.customSettings.queue_upload_count++}if(typeof(c)===&quot;function&quot;){d=(c.call(this,b)===false)?false:true}else{d=true}if(d){var a=this.getStats();if(a.files_queued&gt;0&amp;&amp;this.customSettings.queue_cancelled_flag===false){this.startUpload()}else{if(this.customSettings.queue_cancelled_flag===false){this.queueEvent(&quot;queue_complete_handler&quot;,[this.customSettings.queue_upload_count]);this.customSettings.queue_upload_count=0}else{this.customSettings.queue_cancelled_flag=false;this.customSettings.queue_upload_count=0}}}}}function FileProgress(c,a){this.fileProgressID=c.id;this.opacity=100;this.height=0;this.fileProgressWrapper=document.getElementById(this.fileProgressID);if(!this.fileProgressWrapper){this.fileProgressWrapper=document.createElement(&quot;div&quot;);this.fileProgressWrapper.className=&quot;progressWrapper&quot;;this.fileProgressWrapper.id=this.fileProgressID;this.fileProgressElement=document.createElement(&quot;div&quot;);this.fileProgressElement.className=&quot;progressContainer&quot;;var f=document.createElement(&quot;a&quot;);f.className=&quot;progressCancel&quot;;f.href=&quot;#&quot;;f.style.visibility=&quot;hidden&quot;;f.appendChild(document.createTextNode(&quot; &quot;));var b=document.createElement(&quot;div&quot;);b.className=&quot;progressName&quot;;b.appendChild(document.createTextNode(c.name));var e=document.createElement(&quot;div&quot;);e.className=&quot;progressBarInProgress&quot;;var d=document.createElement(&quot;div&quot;);d.className=&quot;progressBarStatus&quot;;d.innerHTML=&quot;&amp;nbsp;&quot;;this.fileProgressElement.appendChild(f);this.fileProgressElement.appendChild(b);this.fileProgressElement.appendChild(d);this.fileProgressElement.appendChild(e);this.fileProgressWrapper.appendChild(this.fileProgressElement);document.getElementById(a).appendChild(this.fileProgressWrapper)}else{this.fileProgressElement=this.fileProgressWrapper.firstChild}this.height=this.fileProgressWrapper.offsetHeight}FileProgress.prototype.setProgress=function(a){this.fileProgressElement.className=&quot;progressContainer green&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarInProgress&quot;;this.fileProgressElement.childNodes[3].style.width=a+&quot;%&quot;};FileProgress.prototype.setComplete=function(){this.fileProgressElement.className=&quot;progressContainer blue&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarComplete&quot;;this.fileProgressElement.childNodes[3].style.width=&quot;&quot;;var a=this;setTimeout(function(){a.disappear()},10000)};FileProgress.prototype.setError=function(){this.fileProgressElement.className=&quot;progressContainer red&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarError&quot;;this.fileProgressElement.childNodes[3].style.width=&quot;&quot;;var a=this;setTimeout(function(){a.disappear()},5000)};FileProgress.prototype.setCancelled=function(){this.fileProgressElement.className=&quot;progressContainer&quot;;this.fileProgressElement.childNodes[3].className=&quot;progressBarError&quot;;this.fileProgressElement.childNodes[3].style.width=&quot;&quot;;var a=this;setTimeout(function(){a.disappear()},2000)};FileProgress.prototype.setStatus=function(a){this.fileProgressElement.childNodes[2].innerHTML=a};FileProgress.prototype.toggleCancel=function(b,c){this.fileProgressElement.childNodes[0].style.visibility=b?&quot;visible&quot;:&quot;hidden&quot;;if(c){var a=this.fileProgressID;this.fileProgressElement.childNodes[0].onclick=function(){c.cancelUpload(a);return false}}};FileProgress.prototype.disappear=function(){var f=15;var c=4;var b=30;if(this.opacity&gt;0){this.opacity-=f;if(this.opacity&lt;0){this.opacity=0}if(this.fileProgressWrapper.filters){try{this.fileProgressWrapper.filters.item(&quot;DXImageTransform.Microsoft.Alpha&quot;).opacity=this.opacity}catch(d){this.fileProgressWrapper.style.filter=&quot;progid:DXImageTransform.Microsoft.Alpha(opacity=&quot;+this.opacity+&quot;)&quot;}}else{this.fileProgressWrapper.style.opacity=this.opacity/100}}if(this.height&gt;0){this.height-=c;if(this.height&lt;0){this.height=0}this.fileProgressWrapper.style.height=this.height+&quot;px&quot;}if(this.height&gt;0||this.opacity&gt;0){var a=this;setTimeout(function(){a.disappear()},b)}else{this.fileProgressWrapper.style.display=&quot;none&quot;}};function fileQueued(c){try{var a=new FileProgress(c,this.customSettings.progressTarget);a.setStatus(&quot;Pending...&quot;);a.toggleCancel(true,this)}catch(b){this.debug(b)}}function fileQueueError(c,e,d){try{if(e===SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){alert(&quot;You have attempted to queue too many files.\n&quot;+(d===0?&quot;You have reached the upload limit.&quot;:&quot;You may select &quot;+(d&gt;1?&quot;up to &quot;+d+&quot; files.&quot;:&quot;one file.&quot;)));return}var a=new FileProgress(c,this.customSettings.progressTarget);a.setError();a.toggleCancel(false);switch(e){case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:a.setStatus(&quot;File is too big.&quot;);this.debug(&quot;Error Code: File too big, File name: &quot;+c.name+&quot;, File size: &quot;+c.size+&quot;, Message: &quot;+d);break;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:a.setStatus(&quot;Cannot upload Zero Byte files.&quot;);this.debug(&quot;Error Code: Zero byte file, File name: &quot;+c.name+&quot;, File size: &quot;+c.size+&quot;, Message: &quot;+d);break;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:a.setStatus(&quot;Invalid File Type.&quot;);this.debug(&quot;Error Code: Invalid File Type, File name: &quot;+c.name+&quot;, File size: &quot;+c.size+&quot;, Message: &quot;+d);break;default:if(c!==null){a.setStatus(&quot;Unhandled Error&quot;)}this.debug(&quot;Error Code: &quot;+e+&quot;, File name: &quot;+c.name+&quot;, File size: &quot;+c.size+&quot;, Message: &quot;+d);break}}catch(b){this.debug(b)}}function fileDialogComplete(a,c){try{if(a&gt;0){document.getElementById(this.customSettings.cancelButtonId).disabled=false}}catch(b){this.debug(b)}}function uploadStart(c){try{var a=new FileProgress(c,this.customSettings.progressTarget);a.setStatus(&quot;Uploading...&quot;);a.toggleCancel(true,this)}catch(b){}return true}function uploadProgress(c,f,e){try{var d=Math.ceil((f/e)*100);var a=new FileProgress(c,this.customSettings.progressTarget);a.setProgress(d);a.setStatus(&quot;Uploading...&quot;)}catch(b){this.debug(b)}}function uploadSuccess(d,b){try{var a=new FileProgress(d,this.customSettings.progressTarget);a.setComplete();a.setStatus(&quot;Complete.&quot;);a.toggleCancel(false)}catch(c){this.debug(c)}}function uploadError(c,e,d){try{var a=new FileProgress(c,this.customSettings.progressTarget);a.setError();a.toggleCancel(false);switch(e){case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:a.setStatus(&quot;Upload Error: &quot;+d);this.debug(&quot;Error Code: HTTP Error, File name: &quot;+c.name+&quot;, Message: &quot;+d);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:a.setStatus(&quot;Upload Failed.&quot;);this.debug(&quot;Error Code: Upload Failed, File name: &quot;+c.name+&quot;, File size: &quot;+c.size+&quot;, Message: &quot;+d);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:a.setStatus(&quot;Server (IO) Error&quot;);this.debug(&quot;Error Code: IO Error, File name: &quot;+c.name+&quot;, Message: &quot;+d);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:a.setStatus(&quot;Security Error&quot;);this.debug(&quot;Error Code: Security Error, File name: &quot;+c.name+&quot;, Message: &quot;+d);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:a.setStatus(&quot;Upload limit exceeded.&quot;);this.debug(&quot;Error Code: Upload Limit Exceeded, File name: &quot;+c.name+&quot;, File size: &quot;+c.size+&quot;, Message: &quot;+d);break;case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:a.setStatus(&quot;Failed Validation.  Upload skipped.&quot;);this.debug(&quot;Error Code: File Validation Failed, File name: &quot;+c.name+&quot;, File size: &quot;+c.size+&quot;, Message: &quot;+d);break;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:if(this.getStats().files_queued===0){document.getElementById(this.customSettings.cancelButtonId).disabled=true}a.setStatus(&quot;Cancelled&quot;);a.setCancelled();break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:a.setStatus(&quot;Stopped&quot;);break;default:a.setStatus(&quot;Unhandled Error: &quot;+e);this.debug(&quot;Error Code: &quot;+e+&quot;, File name: &quot;+c.name+&quot;, File size: &quot;+c.size+&quot;, Message: &quot;+d);break}}catch(b){this.debug(b)}jQuery(&quot;#start_button&quot;).fadeTo(&quot;fast&quot;,1)}function uploadComplete(a){if(this.getStats().files_queued===0){document.getElementById(this.customSettings.cancelButtonId).disabled=true}jQuery(&quot;#start_button&quot;).fadeTo(&quot;fast&quot;,1);if(typeof(reload_images)!=&quot;undefined&quot;){reload_images()}if(typeof updateAll!=&quot;undefined&quot;){updateAll(root)}}function queueComplete(b){var a=document.getElementById(&quot;divStatus&quot;);a.innerHTML=b+&quot; file&quot;+(b===1?&quot;&quot;:&quot;s&quot;)+&quot; uploaded.&quot;}function init_upload(){if(jQuery(&quot;#content_page_id&quot;).val()){var b={content_id:jQuery(&quot;#content_page_id&quot;).val(),model_string:jQuery(&quot;#content_page_type&quot;).val(),join_field:jQuery(&quot;#join_field&quot;).val()}}else{var b={}}var a={flash_url:&quot;/images/swfupload.swf&quot;,upload_url:&quot;/file_upload.php&quot;,post_params:b,file_size_limit:&quot;100 MB&quot;,file_types:&quot;*.*&quot;,file_types_description:&quot;All Files&quot;,file_upload_limit:100,file_queue_limit:100,custom_settings:{progressTarget:&quot;fsUploadProgress&quot;,cancelButtonId:&quot;btnCancel&quot;},debug:false,button_image_url:&quot;/images/cms/add_files_button.png&quot;,button_width:&quot;254&quot;,button_height:&quot;27&quot;,button_placeholder_id:&quot;spanButtonPlaceHolder&quot;,button_window_mode:SWFUpload.WINDOW_MODE.TRANSPARENT,button_cursor:SWFUpload.CURSOR.HAND,file_queued_handler:fileQueued,file_queue_error_handler:fileQueueError,file_dialog_complete_handler:fileDialogComplete,upload_start_handler:uploadStart,upload_progress_handler:uploadProgress,upload_error_handler:uploadError,upload_success_handler:uploadSuccess,upload_complete_handler:uploadComplete,queue_complete_handler:queueComplete};swfu=new SWFUpload(a)}var swfu;function set_post_params(){var a=jQuery(&quot;#dest&quot;).html();if(a==&quot;select a folder&quot;){alert(&quot;You must choose a folder first&quot;);return false}if(!a){var a=jQuery(&quot;#wildfire_file_folder&quot;).val()}if(jQuery(&quot;#upload_from&quot;).length&amp;&amp;jQuery(&quot;#upload_from&quot;).val().length&gt;1){jQuery.post(&quot;/file_upload.php?&quot;,{wildfire_file_folder:a,wildfire_file_description:jQuery(&quot;#wildfire_file_description&quot;).val(),upload_from_url:jQuery(&quot;#upload_from&quot;).val(),wildfire_file_filename:jQuery(&quot;#wildfire_file_filename&quot;).val(),content_id:jQuery(&quot;#url_content_page_id&quot;).val(),model_string:jQuery(&quot;#url_content_page_type&quot;).val(),join_field:jQuery(&quot;#url_join_field&quot;).val()},function(){jQuery(&quot;#start_button&quot;).fadeTo(&quot;fast&quot;,1);alert(&quot;Image Successfully Retrieved&quot;);if(typeof(reload_images)!=&quot;undefined&quot;){reload_images()}});return true}swfu.addPostParam(&quot;wildfire_file_folder&quot;,a);swfu.addPostParam(&quot;wildfire_file_description&quot;,jQuery(&quot;#wildfire_file_description&quot;).val());swfu.startUpload()}jQuery(document).scroll(function(){jQuery(&quot;#informationcart&quot;).verticalCenter()});jQuery.fn.verticalCenter=function(a){var b=this;if(!a){b.css(&quot;top&quot;,jQuery(window).height()/2-this.height()/2);jQuery(window).resize(function(){b.centerScreen(!a)})}else{b.stop();b.animate({top:jQuery(window).height()/2-this.height()/2},200,&quot;linear&quot;)}};$(document).ready(function(){$(&quot;#cms_users .tabs-nav&quot;).tabs();initialise_user_draggables();$(&quot;#cms_users #section_browser_filter&quot;).keyup(function(){if(typeof(t)!=&quot;undefined&quot;){clearTimeout(t)}t=setTimeout('delayed_sect_filter($(&quot;#section_browser_filter&quot;).val())',400)})});function initialise_user_draggables(){$(&quot;#cms_users .section_tag&quot;).draggable({containment:&quot;window&quot;,ghosting:true,opacity:0.4,revert:true,scroll:false,helper:&quot;clone&quot;});$(&quot;#cms_users #sect_dropzone&quot;).droppable({accept:&quot;.section_tag&quot;,hoverClass:&quot;dropzone_active&quot;,tolerance:&quot;pointer&quot;,drop:function(a,b){$.post(&quot;../../add_section/&quot;+content_page_id,{id:b.draggable.attr(&quot;id&quot;)},function(c){$(&quot;#sect_dropzone&quot;).html(c);initialise_user_draggables()})}});$(&quot;#cms_users .section_trash_button&quot;).click(function(){$.get(&quot;../../remove_section/&quot;+content_page_id+&quot;?sect=&quot;+this.id.substr(21),function(a){$(&quot;#sect_dropzone&quot;).html(a);initialise_user_draggables()})})}function delayed_sect_filter(a){$(&quot;#cms_users #section_browser_filter&quot;).css(&quot;background&quot;,&quot;white url(/images/cms/indicator.gif) no-repeat right center&quot;);$.ajax({type:&quot;post&quot;,url:&quot;/admin/sections/filters&quot;,data:&quot;filter=&quot;+a,complete:function(b){$(&quot;#section_list&quot;).html(b.responseText);initialise_user_draggables();if(typeof(t)!=&quot;undefined&quot;){clearTimeout(t)}$(&quot;#section_browser_filter&quot;).css(&quot;background&quot;,&quot;white&quot;)}})};
\ No newline at end of file
+(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:&quot;header&quot;,cssAsc:&quot;headerSortUp&quot;,cssDesc:&quot;headerSortDown&quot;,sortInitialOrder:&quot;asc&quot;,sortMultiSortKey:&quot;shiftKey&quot;,sortForce:null,sortAppend:null,textExtraction:&quot;simple&quot;,parsers:{},widgets:[],widgetZebra:{css:[&quot;even&quot;,&quot;odd&quot;]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:&quot;us&quot;,decimal:&quot;.&quot;,debug:false};function benchmark(s,d){log(s+&quot;,&quot;+(new Date().getTime()-d.getTime())+&quot;ms&quot;)}this.benchmark=benchmark;function log(s){if(typeof console!=&quot;undefined&quot;&amp;&amp;typeof console.debug!=&quot;undefined&quot;){console.log(s)}else{alert(s)}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug=&quot;&quot;}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i&lt;l;i++){var p=false;if($.metadata&amp;&amp;($($headers[i]).metadata()&amp;&amp;$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter)}else{if((table.config.headers[i]&amp;&amp;table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter)}}if(!p){p=detectParserForColumn(table,cells[i])}if(table.config.debug){parsersDebug+=&quot;column:&quot;+i+&quot; parser:&quot;+p.id+&quot;\n&quot;}list.push(p)}}if(table.config.debug){log(parsersDebug)}return list}function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i&lt;l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i]}}return parsers[0]}function getParserById(name){var l=parsers.length;for(var i=0;i&lt;l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i]}}return false}function buildCache(table){if(table.config.debug){var cacheTime=new Date()}var totalRows=(table.tBodies[0]&amp;&amp;table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&amp;&amp;table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i&lt;totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j&lt;totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]))}cols.push(i);cache.normalized.push(cols);cols=null}if(table.config.debug){benchmark(&quot;Building cache for &quot;+totalRows+&quot; rows:&quot;,cacheTime)}return cache}function getElementText(config,node){if(!node){return&quot;&quot;}var t=&quot;&quot;;if(config.textExtraction==&quot;simple&quot;){if(node.childNodes[0]&amp;&amp;node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML}else{t=node.innerHTML}}else{if(typeof(config.textExtraction)==&quot;function&quot;){t=config.textExtraction(node)}else{t=$(node).text()}}return t}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i&lt;totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j&lt;l;j++){tableBody[0].appendChild(o[j])}}}if(table.config.appender){table.config.appender(table,rows)}rows=null;if(table.config.debug){benchmark(&quot;Rebuilt table:&quot;,appendTime)}applyWidget(table);setTimeout(function(){$(table).trigger(&quot;sortEnd&quot;)},0)}function buildHeaders(table){if(table.config.debug){var time=new Date()}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i&lt;table.tHead.rows.length;i++){tableHeadersRows[i]=0}$tableHeaders=$(&quot;thead th&quot;,table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index)){this.sortDisabled=true}if(!this.sortDisabled){$(this).addClass(table.config.cssHeader)}table.config.headerList[index]=this});if(table.config.debug){benchmark(&quot;Built headers:&quot;,time);log($tableHeaders)}return $tableHeaders}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i&lt;c.length;i++){var cell=c[i];if(cell.colSpan&gt;1){arr=arr.concat(checkCellColSpan(table,headerArr,row++))}else{if(table.tHead.length==1||(cell.rowSpan&gt;1||!r[row+1])){arr.push(cell)}}}return arr}function checkHeaderMetadata(cell){if(($.metadata)&amp;&amp;($(cell).metadata().sorter===false)){return true}return false}function checkHeaderOptions(table,i){if((table.config.headers[i])&amp;&amp;(table.config.headers[i].sorter===false)){return true}return false}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i&lt;l;i++){getWidgetById(c[i]).format(table)}}function getWidgetById(name){var l=widgets.length;for(var i=0;i&lt;l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i]}}}function formatSortingOrder(v){if(typeof(v)!=&quot;Number&quot;){i=(v.toLowerCase()==&quot;desc&quot;)?1:0}else{i=(v==(0||1))?v:0}return i}function isValueInArray(v,a){var l=a.length;for(var i=0;i&lt;l;i++){if(a[i][0]==v){return true}}return false}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this)}});var l=list.length;for(var i=0;i&lt;l;i++){h[list[i][0]].addClass(css[list[i][1]])}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$(&quot;&lt;colgroup&gt;&quot;);$(&quot;tr:first td&quot;,table.tBodies[0]).each(function(){colgroup.append($(&quot;&lt;col&gt;&quot;).css(&quot;width&quot;,$(this).width()))});$(table).prepend(colgroup)}}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i&lt;l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date()}var dynamicExp=&quot;var sortWrapper = function(a,b) {&quot;,l=sortList.length;for(var i=0;i&lt;l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)==&quot;text&quot;)?((order==0)?&quot;sortText&quot;:&quot;sortTextDesc&quot;):((order==0)?&quot;sortNumeric&quot;:&quot;sortNumericDesc&quot;);var e=&quot;e&quot;+i;dynamicExp+=&quot;var &quot;+e+&quot; = &quot;+s+&quot;(a[&quot;+c+&quot;],b[&quot;+c+&quot;]); &quot;;dynamicExp+=&quot;if(&quot;+e+&quot;) { return &quot;+e+&quot;; } &quot;;dynamicExp+=&quot;else { &quot;}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+=&quot;return a[&quot;+orgOrderCol+&quot;]-b[&quot;+orgOrderCol+&quot;];&quot;;for(var i=0;i&lt;l;i++){dynamicExp+=&quot;}; &quot;}dynamicExp+=&quot;return 0; &quot;;dynamicExp+=&quot;}; &quot;;eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark(&quot;Sorting on &quot;+sortList.toString()+&quot; and dir &quot;+order+&quot; time:&quot;,sortTime)}return cache}function sortText(a,b){return((a&lt;b)?-1:((a&gt;b)?1:0))}function sortTextDesc(a,b){return((b&lt;a)?-1:((b&gt;a)?1:0))}function sortNumeric(a,b){return a-b}function sortNumericDesc(a,b){return b-a}function getCachedSortType(parsers,i){return parsers[i].type}this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies){return}var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger(&quot;sortStart&quot;);var totalRows=($this[0].tBodies[0]&amp;&amp;$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&amp;&amp;totalRows&gt;0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j&lt;a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j])}}}config.sortList.push([i,this.order])}else{if(isValueInArray(i,config.sortList)){for(var j=0;j&lt;config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2}}}else{config.sortList.push([i,this.order])}}setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache))},1);return false}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false}});$this.bind(&quot;update&quot;,function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this)}).bind(&quot;sorton&quot;,function(e,list){$(this).trigger(&quot;sortStart&quot;);config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache))}).bind(&quot;appendCache&quot;,function(){appendToTable(this,cache)}).bind(&quot;applyWidgetId&quot;,function(e,id){getWidgetById(id).format(this)}).bind(&quot;applyWidgets&quot;,function(){applyWidget(this)});if($.metadata&amp;&amp;($(this).metadata()&amp;&amp;$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist}if(config.sortList.length&gt;0){$this.trigger(&quot;sorton&quot;,[config.sortList])}applyWidget(this)})};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i&lt;l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false}}if(a){parsers.push(parser)}};this.addWidget=function(widget){widgets.push(widget)};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i};this.isDigit=function(s,config){var DECIMAL=&quot;\\&quot;+config.decimal;var exp=&quot;/(^[+]?0(&quot;+DECIMAL+&quot;0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)&quot;+DECIMAL+&quot;(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*&quot;+DECIMAL+&quot;0+$)/&quot;;return RegExp(exp).test($.trim(s))};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild){this.removeChild(this.firstChild)}}empty.apply(table.tBodies[0])}else{table.tBodies[0].innerHTML=&quot;&quot;}}}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:&quot;text&quot;,is:function(s){return true},format:function(s){return $.trim(s.toLowerCase())},type:&quot;text&quot;});ts.addParser({id:&quot;digit&quot;,is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c)},format:function(s){return $.tablesorter.formatFloat(s)},type:&quot;numeric&quot;});ts.addParser({id:&quot;currency&quot;,is:function(s){return/^[&#194;&#163;$&#226;&#8218;&#172;?.]/.test(s)},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),&quot;&quot;))},type:&quot;numeric&quot;});ts.addParser({id:&quot;ipAddress&quot;,is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s)},format:function(s){var a=s.split(&quot;.&quot;),r=&quot;&quot;,l=a.length;for(var i=0;i&lt;l;i++){var item=a[i];if(item.length==2){r+=&quot;0&quot;+item}else{r+=item}}return $.tablesorter.formatFloat(r)},type:&quot;numeric&quot;});ts.addParser({id:&quot;url&quot;,is:function(s){return/^(https?|ftp|file):\/\/$/.test(s)},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),&quot;&quot;))},type:&quot;text&quot;});ts.addParser({id:&quot;isoDate&quot;,is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s)},format:function(s){return $.tablesorter.formatFloat((s!=&quot;&quot;)?new Date(s.replace(new RegExp(/-/g),&quot;/&quot;)).getTime():&quot;0&quot;)},type:&quot;numeric&quot;});ts.addParser({id:&quot;percent&quot;,is:function(s){return/\%$/.test($.trim(s))},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),&quot;&quot;))},type:&quot;numeric&quot;});ts.addParser({id:&quot;usLongDate&quot;,is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/))},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime())},type:&quot;numeric&quot;});ts.addParser({id:&quot;shortDate&quot;,is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s)},format:function(s,table){var c=table.config;s=s.replace(/\-/g,&quot;/&quot;);if(c.dateFormat==&quot;us&quot;){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,&quot;$3/$1/$2&quot;)}else{if(c.dateFormat==&quot;uk&quot;){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,&quot;$3/$2/$1&quot;)}else{if(c.dateFormat==&quot;dd/mm/yy&quot;||c.dateFormat==&quot;dd-mm-yy&quot;){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,&quot;$1/$2/$3&quot;)}}}return $.tablesorter.formatFloat(new Date(s).getTime())},type:&quot;numeric&quot;});ts.addParser({id:&quot;time&quot;,is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s)},format:function(s){return $.tablesorter.formatFloat(new Date(&quot;2000/01/01 &quot;+s).getTime())},type:&quot;numeric&quot;});ts.addParser({id:&quot;metadata&quot;,is:function(s){return false},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?&quot;sortValue&quot;:c.parserMetadataName;return $(cell).metadata()[p]},type:&quot;numeric&quot;});ts.addWidget({id:&quot;zebra&quot;,format:function(table){if(table.config.debug){var time=new Date()}$(&quot;tr:visible&quot;,table.tBodies[0]).filter(&quot;:even&quot;).removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(&quot;:odd&quot;).removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark(&quot;Applying Zebra widget&quot;,time)}}})})(jQuery);jQuery.ui||(function(p){var j=p.fn.remove,o=p.browser.mozilla&amp;&amp;(parseFloat(p.browser.version)&lt;1.9);p.ui={version:&quot;1.7.1&quot;,plugin:{add:function(c,b,e){var a=p.ui[c].prototype;for(var d in e){a.plugins[d]=a.plugins[d]||[];a.plugins[d].push([b,e[d]])}},call:function(d,b,c){var e=d.plugins[b];if(!e||!d.element[0].parentNode){return}for(var a=0;a&lt;e.length;a++){if(d.options[e[a][0]]){e[a][1].apply(d.element,c)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&amp;16:a!==b&amp;&amp;a.contains(b)},hasScroll:function(a,c){if(p(a).css(&quot;overflow&quot;)==&quot;hidden&quot;){return false}var d=(c&amp;&amp;c==&quot;left&quot;)?&quot;scrollLeft&quot;:&quot;scrollTop&quot;,b=false;if(a[d]&gt;0){return true}a[d]=1;b=(a[d]&gt;0);a[d]=0;return b},isOverAxis:function(b,c,a){return(b&gt;c)&amp;&amp;(b&lt;(c+a))},isOver:function(e,c,f,a,d,b){return p.ui.isOverAxis(e,f,d)&amp;&amp;p.ui.isOverAxis(c,a,b)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,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}};if(o){var m=p.attr,n=p.fn.removeAttr,k=&quot;http://www.w3.org/2005/07/aaa&quot;,r=/^aria-/,q=/^wairole:/;p.attr=function(c,d,b){var a=b!==undefined;return(d==&quot;role&quot;?(a?m.call(this,c,d,&quot;wairole:&quot;+b):(m.apply(this,arguments)||&quot;&quot;).replace(q,&quot;&quot;)):(r.test(d)?(a?c.setAttributeNS(k,d.replace(r,&quot;aaa:&quot;),b):m.call(this,c,d.replace(r,&quot;aaa:&quot;))):m.apply(this,arguments)))};p.fn.removeAttr=function(a){return(r.test(a)?this.each(function(){this.removeAttributeNS(k,a.replace(r,&quot;&quot;))}):n.call(this,a))}}p.fn.extend({remove:function(){p(&quot;*&quot;,this).add(this).each(function(){p(this).triggerHandler(&quot;remove&quot;)});return j.apply(this,arguments)},enableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;off&quot;).css(&quot;MozUserSelect&quot;,&quot;&quot;).unbind(&quot;selectstart.ui&quot;)},disableSelection:function(){return this.attr(&quot;unselectable&quot;,&quot;on&quot;).css(&quot;MozUserSelect&quot;,&quot;none&quot;).bind(&quot;selectstart.ui&quot;,function(){return false})},scrollParent:function(){var a;if((p.browser.msie&amp;&amp;(/(static|relative)/).test(this.css(&quot;position&quot;)))||(/absolute/).test(this.css(&quot;position&quot;))){a=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(p.curCSS(this,&quot;position&quot;,1))&amp;&amp;(/(auto|scroll)/).test(p.curCSS(this,&quot;overflow&quot;,1)+p.curCSS(this,&quot;overflow-y&quot;,1)+p.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}else{a=this.parents().filter(function(){return(/(auto|scroll)/).test(p.curCSS(this,&quot;overflow&quot;,1)+p.curCSS(this,&quot;overflow-y&quot;,1)+p.curCSS(this,&quot;overflow-x&quot;,1))}).eq(0)}return(/fixed/).test(this.css(&quot;position&quot;))||!a.length?p(document):a}});p.extend(p.expr[&quot;:&quot;],{data:function(a,b,c){return !!p.data(a,c[3])},focusable:function(b){var a=b.nodeName.toLowerCase(),c=p.attr(b,&quot;tabindex&quot;);return(/input|select|textarea|button|object/.test(a)?!b.disabled:&quot;a&quot;==a||&quot;area&quot;==a?b.href||!isNaN(c):!isNaN(c))&amp;&amp;!p(b)[&quot;area&quot;==a?&quot;parents&quot;:&quot;closest&quot;](&quot;:hidden&quot;).length},tabbable:function(a){var b=p.attr(a,&quot;tabindex&quot;);return(isNaN(b)||b&gt;=0)&amp;&amp;p(a).is(&quot;:focusable&quot;)}});function l(a,f,e,b){function c(g){var h=p[a][f][g]||[];return(typeof h==&quot;string&quot;?h.split(/,?\s+/):h)}var d=c(&quot;getter&quot;);if(b.length==1&amp;&amp;typeof b[0]==&quot;string&quot;){d=d.concat(c(&quot;getterSetter&quot;))}return(p.inArray(e,d)!=-1)}p.widget=function(b,c){var a=b.split(&quot;.&quot;)[0];b=b.split(&quot;.&quot;)[1];p.fn[b]=function(e){var g=(typeof e==&quot;string&quot;),f=Array.prototype.slice.call(arguments,1);if(g&amp;&amp;e.substring(0,1)==&quot;_&quot;){return this}if(g&amp;&amp;l(a,b,e,f)){var d=p.data(this[0],b);return(d?d[e].apply(d,f):undefined)}return this.each(function(){var h=p.data(this,b);(!h&amp;&amp;!g&amp;&amp;p.data(this,b,new p[a][b](this,e))._init());(h&amp;&amp;g&amp;&amp;p.isFunction(h[e])&amp;&amp;h[e].apply(h,f))})};p[a]=p[a]||{};p[a][b]=function(e,f){var d=this;this.namespace=a;this.widgetName=b;this.widgetEventPrefix=p[a][b].eventPrefix||b;this.widgetBaseClass=a+&quot;-&quot;+b;this.options=p.extend({},p.widget.defaults,p[a][b].defaults,p.metadata&amp;&amp;p.metadata.get(e)[b],f);this.element=p(e).bind(&quot;setData.&quot;+b,function(h,u,g){if(h.target==e){return d._setData(u,g)}}).bind(&quot;getData.&quot;+b,function(g,h){if(g.target==e){return d._getData(h)}}).bind(&quot;remove&quot;,function(){return d.destroy()})};p[a][b].prototype=p.extend({},p.widget.prototype,c);p[a][b].getterSetter=&quot;option&quot;};p.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).removeAttr(&quot;aria-disabled&quot;)},option:function(b,a){var c=b,d=this;if(typeof b==&quot;string&quot;){if(a===undefined){return this._getData(b)}c={};c[b]=a}p.each(c,function(f,e){d._setData(f,e)})},_getData:function(a){return this.options[a]},_setData:function(b,a){this.options[b]=a;if(b==&quot;disabled&quot;){this.element[a?&quot;addClass&quot;:&quot;removeClass&quot;](this.widgetBaseClass+&quot;-disabled &quot;+this.namespace+&quot;-state-disabled&quot;).attr(&quot;aria-disabled&quot;,a)}},enable:function(){this._setData(&quot;disabled&quot;,false)},disable:function(){this._setData(&quot;disabled&quot;,true)},_trigger:function(b,a,g){var e=this.options[b],d=(b==this.widgetEventPrefix?b:this.widgetEventPrefix+b);a=p.Event(a);a.type=d;if(a.originalEvent){for(var c=p.event.props.length,f;c;){f=p.event.props[--c];a[f]=a.originalEvent[f]}}this.element.trigger(a,g);return !(p.isFunction(e)&amp;&amp;e.call(this.element[0],a,g)===false||a.isDefaultPrevented())}};p.widget.defaults={disabled:false};p.ui.mouse={_mouseInit:function(){var a=this;this.element.bind(&quot;mousedown.&quot;+this.widgetName,function(b){return a._mouseDown(b)}).bind(&quot;click.&quot;+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});if(p.browser.msie){this._mouseUnselectable=this.element.attr(&quot;unselectable&quot;);this.element.attr(&quot;unselectable&quot;,&quot;on&quot;)}this.started=false},_mouseDestroy:function(){this.element.unbind(&quot;.&quot;+this.widgetName);(p.browser.msie&amp;&amp;this.element.attr(&quot;unselectable&quot;,this._mouseUnselectable))},_mouseDown:function(b){b.originalEvent=b.originalEvent||{};if(b.originalEvent.mouseHandled){return}(this._mouseStarted&amp;&amp;this._mouseUp(b));this._mouseDownEvent=b;var c=this,a=(b.which==1),d=(typeof this.options.cancel==&quot;string&quot;?p(b.target).parents().add(b.target).filter(this.options.cancel).length:false);if(!a||d||!this._mouseCapture(b)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(b)&amp;&amp;this._mouseDelayMet(b)){this._mouseStarted=(this._mouseStart(b)!==false);if(!this._mouseStarted){b.preventDefault();return true}}this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};p(document).bind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).bind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);(p.browser.safari||b.preventDefault());b.originalEvent.mouseHandled=true;return true},_mouseMove:function(a){if(p.browser.msie&amp;&amp;!a.button){return this._mouseUp(a)}if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&amp;&amp;this._mouseDelayMet(a)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,a)!==false);(this._mouseStarted?this._mouseDrag(a):this._mouseUp(a))}return !this._mouseStarted},_mouseUp:function(a){p(document).unbind(&quot;mousemove.&quot;+this.widgetName,this._mouseMoveDelegate).unbind(&quot;mouseup.&quot;+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(a.target==this._mouseDownEvent.target);this._mouseStop(a)}return false},_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 true}};p.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(b){b.widget(&quot;ui.draggable&quot;,b.extend({},b.ui.mouse,{_init:function(){if(this.options.helper==&quot;original&quot;&amp;&amp;!(/^(?:r|a|f)/).test(this.element.css(&quot;position&quot;))){this.element[0].style.position=&quot;relative&quot;}(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-draggable&quot;));(this.options.disabled&amp;&amp;this.element.addClass(&quot;ui-draggable-disabled&quot;));this._mouseInit()},destroy:function(){if(!this.element.data(&quot;draggable&quot;)){return}this.element.removeData(&quot;draggable&quot;).unbind(&quot;.draggable&quot;).removeClass(&quot;ui-draggable ui-draggable-dragging ui-draggable-disabled&quot;);this._mouseDestroy()},_mouseCapture:function(a){var d=this.options;if(this.helper||d.disabled||b(a.target).is(&quot;.ui-resizable-handle&quot;)){return false}this.handle=this._getHandle(a);if(!this.handle){return false}return true},_mouseStart:function(a){var d=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(b.ui.ddmanager){b.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css(&quot;position&quot;);this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};b.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;if(d.cursorAt){this._adjustOffsetFromHelper(d.cursorAt)}if(d.containment){this._setContainment()}this._trigger(&quot;start&quot;,a);this._cacheHelperProportions();if(b.ui.ddmanager&amp;&amp;!d.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,a)}this.helper.addClass(&quot;ui-draggable-dragging&quot;);this._mouseDrag(a,true);return true},_mouseDrag:function(a,e){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!e){var f=this._uiHash();this._trigger(&quot;drag&quot;,a,f);this.position=f.position}if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}if(b.ui.ddmanager){b.ui.ddmanager.drag(this,a)}return false},_mouseStop:function(f){var e=false;if(b.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){e=b.ui.ddmanager.drop(this,f)}if(this.dropped){e=this.dropped;this.dropped=false}if((this.options.revert==&quot;invalid&quot;&amp;&amp;!e)||(this.options.revert==&quot;valid&quot;&amp;&amp;e)||this.options.revert===true||(b.isFunction(this.options.revert)&amp;&amp;this.options.revert.call(this.element,e))){var a=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){a._trigger(&quot;stop&quot;,f);a._clear()})}else{this._trigger(&quot;stop&quot;,f);this._clear()}return false},_getHandle:function(a){var d=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find(&quot;*&quot;).andSelf().each(function(){if(this==a.target){d=true}});return d},_createHelper:function(f){var e=this.options;var a=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f])):(e.helper==&quot;clone&quot;?this.element.clone():this.element);if(!a.parents(&quot;body&quot;).length){a.appendTo((e.appendTo==&quot;parent&quot;?this.element[0].parentNode:e.appendTo))}if(a[0]!=this.element[0]&amp;&amp;!(/(fixed|absolute)/).test(a.css(&quot;position&quot;))){a.css(&quot;position&quot;,&quot;absolute&quot;)}return a},_adjustOffsetFromHelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;b.browser.msie)){a={top:0,left:0}}return{top:a.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:a.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.element.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment==&quot;parent&quot;){f.containment=this.helper[0].parentNode}if(f.containment==&quot;document&quot;||f.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(b(f.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)&amp;&amp;f.containment.constructor!=Array){var h=b(f.containment)[0];if(!h){return}var g=b(f.containment).offset();var a=(b(h).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[g.left+(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,g.top+(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,g.left+(a?Math.max(h.scrollWidth,h.offsetWidth):h.offsetWidth)-(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,g.top+(a?Math.max(h.scrollHeight,h.offsetHeight):h.offsetHeight)-(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}else{if(f.containment.constructor==Array){this.containment=f.containment}}},_convertPositionTo:function(k,d){if(!d){d=this.position}var m=k==&quot;absolute&quot;?1:-1;var l=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);return{top:(d.top+this.offset.relative.top*m+this.offset.parent.top*m-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop()))*m)),left:(d.left+this.offset.relative.left*m+this.offset.parent.left*m-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())*m))}},_generatePosition:function(n){var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var o=n.pageX;var p=n.pageY;if(this.originalPosition){if(this.containment){if(n.pageX-this.offset.click.left&lt;this.containment[0]){o=this.containment[0]+this.offset.click.left}if(n.pageY-this.offset.click.top&lt;this.containment[1]){p=this.containment[1]+this.offset.click.top}if(n.pageX-this.offset.click.left&gt;this.containment[2]){o=this.containment[2]+this.offset.click.left}if(n.pageY-this.offset.click.top&gt;this.containment[3]){p=this.containment[3]+this.offset.click.top}}if(k.grid){var l=this.originalPageY+Math.round((p-this.originalPageY)/k.grid[1])*k.grid[1];p=this.containment?(!(l-this.offset.click.top&lt;this.containment[1]||l-this.offset.click.top&gt;this.containment[3])?l:(!(l-this.offset.click.top&lt;this.containment[1])?l-k.grid[1]:l+k.grid[1])):l;var m=this.originalPageX+Math.round((o-this.originalPageX)/k.grid[0])*k.grid[0];o=this.containment?(!(m-this.offset.click.left&lt;this.containment[0]||m-this.offset.click.left&gt;this.containment[2])?m:(!(m-this.offset.click.left&lt;this.containment[0])?m-k.grid[0]:m+k.grid[0])):m}}return{top:(p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop())))),left:(o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())))}},_clear:function(){this.helper.removeClass(&quot;ui-draggable-dragging&quot;);if(this.helper[0]!=this.element[0]&amp;&amp;!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,f,e){e=e||this._uiHash();b.ui.plugin.call(this,a,[f,e]);if(a==&quot;drag&quot;){this.positionAbs=this._convertPositionTo(&quot;absolute&quot;)}return b.widget.prototype._trigger.call(this,a,f,e)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));b.extend(b.ui.draggable,{version:&quot;1.7.1&quot;,eventPrefix:&quot;drag&quot;,defaults:{addClasses:true,appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectToSortable:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:&quot;original&quot;,iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:&quot;default&quot;,scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:&quot;both&quot;,snapTolerance:20,stack:false,zIndex:false}});b.ui.plugin.add(&quot;draggable&quot;,&quot;connectToSortable&quot;,{start:function(k,h){var j=b(this).data(&quot;draggable&quot;),g=j.options,a=b.extend({},h,{item:j.element});j.sortables=[];b(g.connectToSortable).each(function(){var c=b.data(this,&quot;sortable&quot;);if(c&amp;&amp;!c.options.disabled){j.sortables.push({instance:c,shouldRevert:c.options.revert});c._refreshItems();c._trigger(&quot;activate&quot;,k,a)}})},stop:function(h,f){var g=b(this).data(&quot;draggable&quot;),a=b.extend({},f,{item:g.element});b.each(g.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;g.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(h);this.instance.options.helper=this.instance.options._helper;if(g.options.helper==&quot;original&quot;){this.instance.currentItem.css({top:&quot;auto&quot;,left:&quot;auto&quot;})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger(&quot;deactivate&quot;,h,a)}})},drag:function(k,g){var h=b(this).data(&quot;draggable&quot;),a=this;var j=function(r){var d=this.offset.click.top,e=this.offset.click.left;var v=this.positionAbs.top,o=this.positionAbs.left;var q=r.height,f=r.width;var c=r.top,u=r.left;return b.ui.isOver(v+d,o+e,c,u,q,f)};b.each(h.sortables,function(c){this.instance.positionAbs=h.positionAbs;this.instance.helperProportions=h.helperProportions;this.instance.offset.click=h.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=b(a).clone().appendTo(this.instance.element).data(&quot;sortable-item&quot;,true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return g.helper[0]};k.target=this.instance.currentItem[0];this.instance._mouseCapture(k,true);this.instance._mouseStart(k,true,true);this.instance.offset.click.top=h.offset.click.top;this.instance.offset.click.left=h.offset.click.left;this.instance.offset.parent.left-=h.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=h.offset.parent.top-this.instance.offset.parent.top;h._trigger(&quot;toSortable&quot;,k);h.dropped=this.instance.element;h.currentItem=h.element;this.instance.fromOutside=h}if(this.instance.currentItem){this.instance._mouseDrag(k)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger(&quot;out&quot;,k,this.instance._uiHash(this.instance));this.instance._mouseStop(k,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}h._trigger(&quot;fromSortable&quot;,k);h.dropped=false}}})}});b.ui.plugin.add(&quot;draggable&quot;,&quot;cursor&quot;,{start:function(h,g){var a=b(&quot;body&quot;),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;cursor&quot;)){f._cursor=a.css(&quot;cursor&quot;)}a.css(&quot;cursor&quot;,f.cursor)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._cursor){b(&quot;body&quot;).css(&quot;cursor&quot;,e._cursor)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;iframeFix&quot;,{start:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;b(e.iframeFix===true?&quot;iframe&quot;:e.iframeFix).each(function(){b('&lt;div class=&quot;ui-draggable-iframeFix&quot; style=&quot;background: #fff;&quot;&gt;&lt;/div&gt;').css({width:this.offsetWidth+&quot;px&quot;,height:this.offsetHeight+&quot;px&quot;,position:&quot;absolute&quot;,opacity:&quot;0.001&quot;,zIndex:1000}).css(b(this).offset()).appendTo(&quot;body&quot;)})},stop:function(a,d){b(&quot;div.ui-draggable-iframeFix&quot;).each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add(&quot;draggable&quot;,&quot;opacity&quot;,{start:function(h,g){var a=b(g.helper),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;opacity&quot;)){f._opacity=a.css(&quot;opacity&quot;)}a.css(&quot;opacity&quot;,f.opacity)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._opacity){b(f.helper).css(&quot;opacity&quot;,e._opacity)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;scroll&quot;,{start:function(f,e){var a=b(this).data(&quot;draggable&quot;);if(a.scrollParent[0]!=document&amp;&amp;a.scrollParent[0].tagName!=&quot;HTML&quot;){a.overflowOffset=a.scrollParent.offset()}},drag:function(j,h){var k=b(this).data(&quot;draggable&quot;),g=k.options,a=false;if(k.scrollParent[0]!=document&amp;&amp;k.scrollParent[0].tagName!=&quot;HTML&quot;){if(!g.axis||g.axis!=&quot;x&quot;){if((k.overflowOffset.top+k.scrollParent[0].offsetHeight)-j.pageY&lt;g.scrollSensitivity){k.scrollParent[0].scrollTop=a=k.scrollParent[0].scrollTop+g.scrollSpeed}else{if(j.pageY-k.overflowOffset.top&lt;g.scrollSensitivity){k.scrollParent[0].scrollTop=a=k.scrollParent[0].scrollTop-g.scrollSpeed}}}if(!g.axis||g.axis!=&quot;y&quot;){if((k.overflowOffset.left+k.scrollParent[0].offsetWidth)-j.pageX&lt;g.scrollSensitivity){k.scrollParent[0].scrollLeft=a=k.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(j.pageX-k.overflowOffset.left&lt;g.scrollSensitivity){k.scrollParent[0].scrollLeft=a=k.scrollParent[0].scrollLeft-g.scrollSpeed}}}}else{if(!g.axis||g.axis!=&quot;x&quot;){if(j.pageY-b(document).scrollTop()&lt;g.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()-g.scrollSpeed)}else{if(b(window).height()-(j.pageY-b(document).scrollTop())&lt;g.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()+g.scrollSpeed)}}}if(!g.axis||g.axis!=&quot;y&quot;){if(j.pageX-b(document).scrollLeft()&lt;g.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()-g.scrollSpeed)}else{if(b(window).width()-(j.pageX-b(document).scrollLeft())&lt;g.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()+g.scrollSpeed)}}}}if(a!==false&amp;&amp;b.ui.ddmanager&amp;&amp;!g.dropBehaviour){b.ui.ddmanager.prepareOffsets(k,j)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;snap&quot;,{start:function(h,g){var a=b(this).data(&quot;draggable&quot;),f=a.options;a.snapElements=[];b(f.snap.constructor!=String?(f.snap.items||&quot;:data(draggable)&quot;):f.snap).each(function(){var c=b(this);var d=c.offset();if(this!=a.element[0]){a.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:d.top,left:d.left})}})},drag:function(B,F){var L=b(this).data(&quot;draggable&quot;),D=L.options;var d=D.snapTolerance;var l=F.offset.left,o=l+L.helperProportions.width,M=F.offset.top,N=M+L.helperProportions.height;for(var r=L.snapElements.length-1;r&gt;=0;r--){var C=L.snapElements[r].left,G=C+L.snapElements[r].width,H=L.snapElements[r].top,E=H+L.snapElements[r].height;if(!((C-d&lt;l&amp;&amp;l&lt;G+d&amp;&amp;H-d&lt;M&amp;&amp;M&lt;E+d)||(C-d&lt;l&amp;&amp;l&lt;G+d&amp;&amp;H-d&lt;N&amp;&amp;N&lt;E+d)||(C-d&lt;o&amp;&amp;o&lt;G+d&amp;&amp;H-d&lt;M&amp;&amp;M&lt;E+d)||(C-d&lt;o&amp;&amp;o&lt;G+d&amp;&amp;H-d&lt;N&amp;&amp;N&lt;E+d))){if(L.snapElements[r].snapping){(L.options.snap.release&amp;&amp;L.options.snap.release.call(L.element,B,b.extend(L._uiHash(),{snapItem:L.snapElements[r].item})))}L.snapElements[r].snapping=false;continue}if(D.snapMode!=&quot;inner&quot;){var O=Math.abs(H-N)&lt;=d;var a=Math.abs(E-M)&lt;=d;var J=Math.abs(C-o)&lt;=d;var I=Math.abs(G-l)&lt;=d;if(O){F.position.top=L._convertPositionTo(&quot;relative&quot;,{top:H-L.helperProportions.height,left:0}).top-L.margins.top}if(a){F.position.top=L._convertPositionTo(&quot;relative&quot;,{top:E,left:0}).top-L.margins.top}if(J){F.position.left=L._convertPositionTo(&quot;relative&quot;,{top:0,left:C-L.helperProportions.width}).left-L.margins.left}if(I){F.position.left=L._convertPositionTo(&quot;relative&quot;,{top:0,left:G}).left-L.margins.left}}var K=(O||a||J||I);if(D.snapMode!=&quot;outer&quot;){var O=Math.abs(H-M)&lt;=d;var a=Math.abs(E-N)&lt;=d;var J=Math.abs(C-l)&lt;=d;var I=Math.abs(G-o)&lt;=d;if(O){F.position.top=L._convertPositionTo(&quot;relative&quot;,{top:H,left:0}).top-L.margins.top}if(a){F.position.top=L._convertPositionTo(&quot;relative&quot;,{top:E-L.helperProportions.height,left:0}).top-L.margins.top}if(J){F.position.left=L._convertPositionTo(&quot;relative&quot;,{top:0,left:C}).left-L.margins.left}if(I){F.position.left=L._convertPositionTo(&quot;relative&quot;,{top:0,left:G-L.helperProportions.width}).left-L.margins.left}}if(!L.snapElements[r].snapping&amp;&amp;(O||a||J||I||K)){(L.options.snap.snap&amp;&amp;L.options.snap.snap.call(L.element,B,b.extend(L._uiHash(),{snapItem:L.snapElements[r].item})))}L.snapElements[r].snapping=(O||a||J||I||K)}}});b.ui.plugin.add(&quot;draggable&quot;,&quot;stack&quot;,{start:function(a,h){var f=b(this).data(&quot;draggable&quot;).options;var g=b.makeArray(b(f.stack.group)).sort(function(c,d){return(parseInt(b(c).css(&quot;zIndex&quot;),10)||f.stack.min)-(parseInt(b(d).css(&quot;zIndex&quot;),10)||f.stack.min)});b(g).each(function(c){this.style.zIndex=f.stack.min+c});this[0].style.zIndex=f.stack.min+g.length}});b.ui.plugin.add(&quot;draggable&quot;,&quot;zIndex&quot;,{start:function(h,g){var a=b(g.helper),f=b(this).data(&quot;draggable&quot;).options;if(a.css(&quot;zIndex&quot;)){f._zIndex=a.css(&quot;zIndex&quot;)}a.css(&quot;zIndex&quot;,f.zIndex)},stop:function(a,f){var e=b(this).data(&quot;draggable&quot;).options;if(e._zIndex){b(f.helper).css(&quot;zIndex&quot;,e._zIndex)}}})})(jQuery);(function(b){b.widget(&quot;ui.droppable&quot;,{_init:function(){var d=this.options,a=d.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&amp;&amp;b.isFunction(this.options.accept)?this.options.accept:function(c){return c.is(a)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};b.ui.ddmanager.droppables[this.options.scope]=b.ui.ddmanager.droppables[this.options.scope]||[];b.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&amp;&amp;this.element.addClass(&quot;ui-droppable&quot;))},destroy:function(){var a=b.ui.ddmanager.droppables[this.options.scope];for(var d=0;d&lt;a.length;d++){if(a[d]==this){a.splice(d,1)}}this.element.removeClass(&quot;ui-droppable ui-droppable-disabled&quot;).removeData(&quot;droppable&quot;).unbind(&quot;.droppable&quot;)},_setData:function(a,d){if(a==&quot;accept&quot;){this.options.accept=d&amp;&amp;b.isFunction(d)?d:function(c){return c.is(d)}}else{b.widget.prototype._setData.apply(this,arguments)}},_activate:function(d){var a=b.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(a&amp;&amp;this._trigger(&quot;activate&quot;,d,this.ui(a)))},_deactivate:function(d){var a=b.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(a&amp;&amp;this._trigger(&quot;deactivate&quot;,d,this.ui(a)))},_over:function(d){var a=b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger(&quot;over&quot;,d,this.ui(a))}},_out:function(d){var a=b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;out&quot;,d,this.ui(a))}},_drop:function(h,g){var a=g||b.ui.ddmanager.current;if(!a||(a.currentItem||a.element)[0]==this.element[0]){return false}var f=false;this.element.find(&quot;:data(droppable)&quot;).not(&quot;.ui-draggable-dragging&quot;).each(function(){var c=b.data(this,&quot;droppable&quot;);if(c.options.greedy&amp;&amp;b.ui.intersect(a,b.extend(c,{offset:c.element.offset()}),c.options.tolerance)){f=true;return false}});if(f){return false}if(this.options.accept.call(this.element[0],(a.currentItem||a.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger(&quot;drop&quot;,h,this.ui(a));return this.element}return false},ui:function(a){return{draggable:(a.currentItem||a.element),helper:a.helper,position:a.position,absolutePosition:a.positionAbs,offset:a.positionAbs}}});b.extend(b.ui.droppable,{version:&quot;1.7.1&quot;,eventPrefix:&quot;drop&quot;,defaults:{accept:&quot;*&quot;,activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;}});b.ui.intersect=function(a,x,r){if(!x.offset){return false}var C=(a.positionAbs||a.position.absolute).left,D=C+a.helperProportions.width,u=(a.positionAbs||a.position.absolute).top,v=u+a.helperProportions.height;var A=x.offset.left,E=A+x.proportions.width,l=x.offset.top,w=l+x.proportions.height;switch(r){case&quot;fit&quot;:return(A&lt;C&amp;&amp;D&lt;E&amp;&amp;l&lt;u&amp;&amp;v&lt;w);break;case&quot;intersect&quot;:return(A&lt;C+(a.helperProportions.width/2)&amp;&amp;D-(a.helperProportions.width/2)&lt;E&amp;&amp;l&lt;u+(a.helperProportions.height/2)&amp;&amp;v-(a.helperProportions.height/2)&lt;w);break;case&quot;pointer&quot;:var z=((a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left),y=((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top),B=b.ui.isOver(y,z,l,A,x.proportions.height,x.proportions.width);return B;break;case&quot;touch&quot;:return((u&gt;=l&amp;&amp;u&lt;=w)||(v&gt;=l&amp;&amp;v&lt;=w)||(u&lt;l&amp;&amp;v&gt;w))&amp;&amp;((C&gt;=A&amp;&amp;C&lt;=E)||(D&gt;=A&amp;&amp;D&lt;=E)||(C&lt;A&amp;&amp;D&gt;E));break;default:return false;break}};b.ui.ddmanager={current:null,droppables:{&quot;default&quot;:[]},prepareOffsets:function(m,k){var a=b.ui.ddmanager.droppables[m.options.scope];var l=k?k.type:null;var j=(m.currentItem||m.element).find(&quot;:data(droppable)&quot;).andSelf();droppablesLoop:for(var n=0;n&lt;a.length;n++){if(a[n].options.disabled||(m&amp;&amp;!a[n].options.accept.call(a[n].element[0],(m.currentItem||m.element)))){continue}for(var o=0;o&lt;j.length;o++){if(j[o]==a[n].element[0]){a[n].proportions.height=0;continue droppablesLoop}}a[n].visible=a[n].element.css(&quot;display&quot;)!=&quot;none&quot;;if(!a[n].visible){continue}a[n].offset=a[n].element.offset();a[n].proportions={width:a[n].element[0].offsetWidth,height:a[n].element[0].offsetHeight};if(l==&quot;mousedown&quot;){a[n]._activate.call(a[n],k)}}},drop:function(a,f){var e=false;b.each(b.ui.ddmanager.droppables[a.options.scope],function(){if(!this.options){return}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;b.ui.intersect(a,this,this.options.tolerance)){e=this._drop.call(this,f)}if(!this.options.disabled&amp;&amp;this.visible&amp;&amp;this.options.accept.call(this.element[0],(a.currentItem||a.element))){this.isout=1;this.isover=0;this._deactivate.call(this,f)}});return e},drag:function(a,d){if(a.options.refreshPositions){b.ui.ddmanager.prepareOffsets(a,d)}b.each(b.ui.ddmanager.droppables[a.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var j=b.ui.intersect(a,this,this.options.tolerance);var c=!j&amp;&amp;this.isover==1?&quot;isout&quot;:(j&amp;&amp;this.isover==0?&quot;isover&quot;:null);if(!c){return}var h;if(this.options.greedy){var k=this.element.parents(&quot;:data(droppable):eq(0)&quot;);if(k.length){h=b.data(k[0],&quot;droppable&quot;);h.greedyChild=(c==&quot;isover&quot;?1:0)}}if(h&amp;&amp;c==&quot;isover&quot;){h.isover=0;h.isout=1;h._out.call(h,d)}this[c]=1;this[c==&quot;isout&quot;?&quot;isover&quot;:&quot;isout&quot;]=0;this[c==&quot;isover&quot;?&quot;_over&quot;:&quot;_out&quot;].call(this,d);if(h&amp;&amp;c==&quot;isout&quot;){h.isout=0;h.isover=1;h._over.call(h,d)}})}}})(jQuery);(function(f){f.widget(&quot;ui.resizable&quot;,f.extend({},f.ui.mouse,{_init:function(){var n=this,b=this.options;this.element.addClass(&quot;ui-resizable&quot;);f.extend(this,{_aspectRatio:!!(b.aspectRatio),aspectRatio:b.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:b.helper||b.ghost||b.animate?b.helper||&quot;ui-resizable-helper&quot;:null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css(&quot;position&quot;))&amp;&amp;f.browser.opera){this.element.css({position:&quot;relative&quot;,top:&quot;auto&quot;,left:&quot;auto&quot;})}this.element.wrap(f('&lt;div class=&quot;ui-wrapper&quot; style=&quot;overflow: hidden;&quot;&gt;&lt;/div&gt;').css({position:this.element.css(&quot;position&quot;),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css(&quot;top&quot;),left:this.element.css(&quot;left&quot;)}));this.element=this.element.parent().data(&quot;resizable&quot;,this.element.data(&quot;resizable&quot;));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css(&quot;marginLeft&quot;),marginTop:this.originalElement.css(&quot;marginTop&quot;),marginRight:this.originalElement.css(&quot;marginRight&quot;),marginBottom:this.originalElement.css(&quot;marginBottom&quot;)});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css(&quot;resize&quot;);this.originalElement.css(&quot;resize&quot;,&quot;none&quot;);this._proportionallyResizeElements.push(this.originalElement.css({position:&quot;static&quot;,zoom:1,display:&quot;block&quot;}));this.originalElement.css({margin:this.originalElement.css(&quot;margin&quot;)});this._proportionallyResize()}this.handles=b.handles||(!f(&quot;.ui-resizable-handle&quot;,this.element).length?&quot;e,s,se&quot;:{n:&quot;.ui-resizable-n&quot;,e:&quot;.ui-resizable-e&quot;,s:&quot;.ui-resizable-s&quot;,w:&quot;.ui-resizable-w&quot;,se:&quot;.ui-resizable-se&quot;,sw:&quot;.ui-resizable-sw&quot;,ne:&quot;.ui-resizable-ne&quot;,nw:&quot;.ui-resizable-nw&quot;});if(this.handles.constructor==String){if(this.handles==&quot;all&quot;){this.handles=&quot;n,e,s,w,se,sw,ne,nw&quot;}var a=this.handles.split(&quot;,&quot;);this.handles={};for(var m=0;m&lt;a.length;m++){var c=f.trim(a[m]),o=&quot;ui-resizable-&quot;+c;var l=f('&lt;div class=&quot;ui-resizable-handle '+o+'&quot;&gt;&lt;/div&gt;');if(/sw|se|ne|nw/.test(c)){l.css({zIndex:++b.zIndex})}if(&quot;se&quot;==c){l.addClass(&quot;ui-icon ui-icon-gripsmall-diagonal-se&quot;)}this.handles[c]=&quot;.ui-resizable-&quot;+c;this.element.append(l)}}this._renderAxis=function(j){j=j||this.element;for(var g in this.handles){if(this.handles[g].constructor==String){this.handles[g]=f(this.handles[g],this.element).show()}if(this.elementIsWrapper&amp;&amp;this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var q=f(this.handles[g],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(g)?q.outerHeight():q.outerWidth();var h=[&quot;padding&quot;,/ne|nw|n/.test(g)?&quot;Top&quot;:/se|sw|s/.test(g)?&quot;Bottom&quot;:/^e$/.test(g)?&quot;Right&quot;:&quot;Left&quot;].join(&quot;&quot;);j.css(h,k);this._proportionallyResize()}if(!f(this.handles[g]).length){continue}}};this._renderAxis(this.element);this._handles=f(&quot;.ui-resizable-handle&quot;,this.element).disableSelection();this._handles.mouseover(function(){if(!n.resizing){if(this.className){var g=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}n.axis=g&amp;&amp;g[1]?g[1]:&quot;se&quot;}});if(b.autoHide){this._handles.hide();f(this.element).addClass(&quot;ui-resizable-autohide&quot;).hover(function(){f(this).removeClass(&quot;ui-resizable-autohide&quot;);n._handles.show()},function(){if(!n.resizing){f(this).addClass(&quot;ui-resizable-autohide&quot;);n._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){f(c).removeClass(&quot;ui-resizable ui-resizable-disabled ui-resizable-resizing&quot;).removeData(&quot;resizable&quot;).unbind(&quot;.resizable&quot;).find(&quot;.ui-resizable-handle&quot;).remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.parent().append(this.originalElement.css({position:a.css(&quot;position&quot;),width:a.outerWidth(),height:a.outerHeight(),top:a.css(&quot;top&quot;),left:a.css(&quot;left&quot;)})).end().remove()}this.originalElement.css(&quot;resize&quot;,this.originalResizeStyle);b(this.originalElement)},_mouseCapture:function(b){var a=false;for(var c in this.handles){if(f(this.handles[c])[0]==b.target){a=true}}return this.options.disabled||!!a},_mouseStart:function(l){var b=this.options,m=this.element.position(),n=this.element;this.resizing=true;this.documentScroll={top:f(document).scrollTop(),left:f(document).scrollLeft()};if(n.is(&quot;.ui-draggable&quot;)||(/absolute/).test(n.css(&quot;position&quot;))){n.css({position:&quot;absolute&quot;,top:m.top,left:m.left})}if(f.browser.opera&amp;&amp;(/relative/).test(n.css(&quot;position&quot;))){n.css({position:&quot;relative&quot;,top:&quot;auto&quot;,left:&quot;auto&quot;})}this._renderProxy();var a=d(this.helper.css(&quot;left&quot;)),k=d(this.helper.css(&quot;top&quot;));if(b.containment){a+=f(b.containment).scrollLeft()||0;k+=f(b.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:a,top:k};this.size=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()};this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()};this.originalPosition={left:a,top:k};this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()};this.originalMousePosition={left:l.pageX,top:l.pageY};this.aspectRatio=(typeof b.aspectRatio==&quot;number&quot;)?b.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var c=f(&quot;.ui-resizable-&quot;+this.axis).css(&quot;cursor&quot;);f(&quot;body&quot;).css(&quot;cursor&quot;,c==&quot;auto&quot;?this.axis+&quot;-resize&quot;:c);n.addClass(&quot;ui-resizable-resizing&quot;);this._propagate(&quot;start&quot;,l);return true},_mouseDrag:function(B){var y=this.helper,z=this.options,r={},b=this,w=this.originalMousePosition,o=this.axis;var a=(B.pageX-w.left)||0,c=(B.pageY-w.top)||0;var x=this._change[o];if(!x){return false}var u=x.apply(this,[B,a,c]),v=f.browser.msie&amp;&amp;f.browser.version&lt;7,A=this.sizeDiff;if(this._aspectRatio||B.shiftKey){u=this._updateRatio(u,B)}u=this._respectSize(u,B);this._propagate(&quot;resize&quot;,B);y.css({top:this.position.top+&quot;px&quot;,left:this.position.left+&quot;px&quot;,width:this.size.width+&quot;px&quot;,height:this.size.height+&quot;px&quot;});if(!this._helper&amp;&amp;this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(u);this._trigger(&quot;resize&quot;,B,this.ui());return false},_mouseStop:function(q){this.resizing=false;var p=this.options,b=this;if(this._helper){var r=this._proportionallyResizeElements,v=r.length&amp;&amp;(/textarea/i).test(r[0].nodeName),u=v&amp;&amp;f.ui.hasScroll(r[0],&quot;left&quot;)?0:b.sizeDiff.height,n=v?0:b.sizeDiff.width;var a={width:(b.size.width-n),height:(b.size.height-u)},o=(parseInt(b.element.css(&quot;left&quot;),10)+(b.position.left-b.originalPosition.left))||null,c=(parseInt(b.element.css(&quot;top&quot;),10)+(b.position.top-b.originalPosition.top))||null;if(!p.animate){this.element.css(f.extend(a,{top:c,left:o}))}b.helper.height(b.size.height);b.helper.width(b.size.width);if(this._helper&amp;&amp;!p.animate){this._proportionallyResize()}}f(&quot;body&quot;).css(&quot;cursor&quot;,&quot;auto&quot;);this.element.removeClass(&quot;ui-resizable-resizing&quot;);this._propagate(&quot;stop&quot;,q);if(this._helper){this.helper.remove()}return false},_updateCache:function(b){var a=this.options;this.offset=this.helper.offset();if(e(b.left)){this.position.left=b.left}if(e(b.top)){this.position.top=b.top}if(e(b.height)){this.size.height=b.height}if(e(b.width)){this.size.width=b.width}},_updateRatio:function(c,j){var b=this.options,a=this.position,k=this.size,l=this.axis;if(c.height){c.width=(k.height*this.aspectRatio)}else{if(c.width){c.height=(k.width/this.aspectRatio)}}if(l==&quot;sw&quot;){c.left=a.left+(k.width-c.width);c.top=null}if(l==&quot;nw&quot;){c.top=a.top+(k.height-c.height);c.left=a.left+(k.width-c.width)}return c},_respectSize:function(w,B){var y=this.helper,z=this.options,b=this._aspectRatio||B.shiftKey,c=this.axis,E=e(w.width)&amp;&amp;z.maxWidth&amp;&amp;(z.maxWidth&lt;w.width),v=e(w.height)&amp;&amp;z.maxHeight&amp;&amp;(z.maxHeight&lt;w.height),A=e(w.width)&amp;&amp;z.minWidth&amp;&amp;(z.minWidth&gt;w.width),a=e(w.height)&amp;&amp;z.minHeight&amp;&amp;(z.minHeight&gt;w.height);if(A){w.width=z.minWidth}if(a){w.height=z.minHeight}if(E){w.width=z.maxWidth}if(v){w.height=z.maxHeight}var C=this.originalPosition.left+this.originalSize.width,o=this.position.top+this.size.height;var x=/sw|nw|w/.test(c),D=/nw|ne|n/.test(c);if(A&amp;&amp;x){w.left=C-z.minWidth}if(E&amp;&amp;x){w.left=C-z.maxWidth}if(a&amp;&amp;D){w.top=o-z.minHeight}if(v&amp;&amp;D){w.top=o-z.maxHeight}var u=!w.width&amp;&amp;!w.height;if(u&amp;&amp;!w.left&amp;&amp;w.top){w.top=null}else{if(u&amp;&amp;!w.top&amp;&amp;w.left){w.left=null}}return w},_proportionallyResize:function(){var a=this.options;if(!this._proportionallyResizeElements.length){return}var k=this.helper||this.element;for(var l=0;l&lt;this._proportionallyResizeElements.length;l++){var c=this._proportionallyResizeElements[l];if(!this.borderDif){var m=[c.css(&quot;borderTopWidth&quot;),c.css(&quot;borderRightWidth&quot;),c.css(&quot;borderBottomWidth&quot;),c.css(&quot;borderLeftWidth&quot;)],b=[c.css(&quot;paddingTop&quot;),c.css(&quot;paddingRight&quot;),c.css(&quot;paddingBottom&quot;),c.css(&quot;paddingLeft&quot;)];this.borderDif=f.map(m,function(j,g){var h=parseInt(j,10)||0,o=parseInt(b[g],10)||0;return h+o})}if(f.browser.msie&amp;&amp;!(!(f(k).is(&quot;:hidden&quot;)||f(k).parents(&quot;:hidden&quot;).length))){continue}c.css({height:(k.height()-this.borderDif[0]-this.borderDif[2])||0,width:(k.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var j=this.element,a=this.options;this.elementOffset=j.offset();if(this._helper){this.helper=this.helper||f('&lt;div style=&quot;overflow:hidden;&quot;&gt;&lt;/div&gt;');var k=f.browser.msie&amp;&amp;f.browser.version&lt;7,c=(k?1:0),b=(k?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+b,height:this.element.outerHeight()+b,position:&quot;absolute&quot;,left:this.elementOffset.left-c+&quot;px&quot;,top:this.elementOffset.top-c+&quot;px&quot;,zIndex:++a.zIndex});this.helper.appendTo(&quot;body&quot;).disableSelection()}else{this.helper=this.element}},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(c,k,l){var a=this.options,j=this.originalSize,b=this.originalPosition;return{left:b.left+k,width:j.width-k}},n:function(c,k,l){var a=this.options,j=this.originalSize,b=this.originalPosition;return{top:b.top+l,height:j.height-l}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(a,b,c){return f.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[a,b,c]))},sw:function(a,b,c){return f.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[a,b,c]))},ne:function(a,b,c){return f.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[a,b,c]))},nw:function(a,b,c){return f.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[a,b,c]))}},_propagate:function(a,b){f.ui.plugin.call(this,a,[b,this.ui()]);(a!=&quot;resize&quot;&amp;&amp;this._trigger(a,b,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}}}));f.extend(f.ui.resizable,{version:&quot;1.7.1&quot;,eventPrefix:&quot;resize&quot;,defaults:{alsoResize:false,animate:false,animateDuration:&quot;slow&quot;,animateEasing:&quot;swing&quot;,aspectRatio:false,autoHide:false,cancel:&quot;:input,option&quot;,containment:false,delay:0,distance:1,ghost:false,grid:false,handles:&quot;e,s,se&quot;,helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});f.ui.plugin.add(&quot;resizable&quot;,&quot;alsoResize&quot;,{start:function(c,b){var h=f(this).data(&quot;resizable&quot;),a=h.options;_store=function(g){f(g).each(function(){f(this).data(&quot;resizable-alsoresize&quot;,{width:parseInt(f(this).width(),10),height:parseInt(f(this).height(),10),left:parseInt(f(this).css(&quot;left&quot;),10),top:parseInt(f(this).css(&quot;top&quot;),10)})})};if(typeof(a.alsoResize)==&quot;object&quot;&amp;&amp;!a.alsoResize.parentNode){if(a.alsoResize.length){a.alsoResize=a.alsoResize[0];_store(a.alsoResize)}else{f.each(a.alsoResize,function(j,g){_store(j)})}}else{_store(a.alsoResize)}},resize:function(n,l){var o=f(this).data(&quot;resizable&quot;),c=o.options,m=o.originalSize,a=o.originalPosition;var b={height:(o.size.height-m.height)||0,width:(o.size.width-m.width)||0,top:(o.position.top-a.top)||0,left:(o.position.left-a.left)||0},p=function(h,g){f(h).each(function(){var k=f(this),j=f(this).data(&quot;resizable-alsoresize&quot;),r={},u=g&amp;&amp;g.length?g:[&quot;width&quot;,&quot;height&quot;,&quot;top&quot;,&quot;left&quot;];f.each(u||[&quot;width&quot;,&quot;height&quot;,&quot;top&quot;,&quot;left&quot;],function(w,q){var v=(j[q]||0)+(b[q]||0);if(v&amp;&amp;v&gt;=0){r[q]=v||null}});if(/relative/.test(k.css(&quot;position&quot;))&amp;&amp;f.browser.opera){o._revertToRelativePosition=true;k.css({position:&quot;absolute&quot;,top:&quot;auto&quot;,left:&quot;auto&quot;})}k.css(r)})};if(typeof(c.alsoResize)==&quot;object&quot;&amp;&amp;!c.alsoResize.nodeType){f.each(c.alsoResize,function(h,g){p(h,g)})}else{p(c.alsoResize)}},stop:function(b,a){var c=f(this).data(&quot;resizable&quot;);if(c._revertToRelativePosition&amp;&amp;f.browser.opera){c._revertToRelativePosition=false;el.css({position:&quot;relative&quot;})}f(this).removeData(&quot;resizable-alsoresize-start&quot;)}});f.ui.plugin.add(&quot;resizable&quot;,&quot;animate&quot;,{stop:function(r,b){var a=f(this).data(&quot;resizable&quot;),q=a.options;var u=a._proportionallyResizeElements,x=u.length&amp;&amp;(/textarea/i).test(u[0].nodeName),w=x&amp;&amp;f.ui.hasScroll(u[0],&quot;left&quot;)?0:a.sizeDiff.height,o=x?0:a.sizeDiff.width;var v={width:(a.size.width-o),height:(a.size.height-w)},p=(parseInt(a.element.css(&quot;left&quot;),10)+(a.position.left-a.originalPosition.left))||null,c=(parseInt(a.element.css(&quot;top&quot;),10)+(a.position.top-a.originalPosition.top))||null;a.element.animate(f.extend(v,c&amp;&amp;p?{top:c,left:p}:{}),{duration:q.animateDuration,easing:q.animateEasing,step:function(){var g={width:parseInt(a.element.css(&quot;width&quot;),10),height:parseInt(a.element.css(&quot;height&quot;),10),top:parseInt(a.element.css(&quot;top&quot;),10),left:parseInt(a.element.css(&quot;left&quot;),10)};if(u&amp;&amp;u.length){f(u[0]).css({width:g.width,height:g.height})}a._updateCache(g);a._propagate(&quot;resize&quot;,r)}})}});f.ui.plugin.add(&quot;resizable&quot;,&quot;containment&quot;,{start:function(A,b){var C=f(this).data(&quot;resizable&quot;),w=C.options,u=C.element;var z=w.containment,v=(z instanceof f)?z.get(0):(/parent/.test(z))?u.parent().get(0):z;if(!v){return}C.containerElement=f(v);if(/document/.test(z)||z==document){C.containerOffset={left:0,top:0};C.containerPosition={left:0,top:0};C.parentData={element:f(document),left:0,top:0,width:f(document).width(),height:f(document).height()||document.body.parentNode.scrollHeight}}else{var o=f(v),x=[];f([&quot;Top&quot;,&quot;Right&quot;,&quot;Left&quot;,&quot;Bottom&quot;]).each(function(g,h){x[g]=d(o.css(&quot;padding&quot;+h))});C.containerOffset=o.offset();C.containerPosition=o.position();C.containerSize={height:(o.innerHeight()-x[3]),width:(o.innerWidth()-x[1])};var c=C.containerOffset,B=C.containerSize.height,p=C.containerSize.width,y=(f.ui.hasScroll(v,&quot;left&quot;)?v.scrollWidth:p),a=(f.ui.hasScroll(v)?v.scrollHeight:B);C.parentData={element:v,left:c.left,top:c.top,width:y,height:a}}},resize:function(B,c){var E=f(this).data(&quot;resizable&quot;),z=E.options,C=E.containerSize,o=E.containerOffset,v=E.size,u=E.position,b=E._aspectRatio||B.shiftKey,D={top:0,left:0},A=E.containerElement;if(A[0]!=document&amp;&amp;(/static/).test(A.css(&quot;position&quot;))){D=o}if(u.left&lt;(E._helper?o.left:0)){E.size.width=E.size.width+(E._helper?(E.position.left-o.left):(E.position.left-D.left));if(b){E.size.height=E.size.width/z.aspectRatio}E.position.left=z.helper?o.left:0}if(u.top&lt;(E._helper?o.top:0)){E.size.height=E.size.height+(E._helper?(E.position.top-o.top):E.position.top);if(b){E.size.width=E.size.height*z.aspectRatio}E.position.top=E._helper?o.top:0}E.offset.left=E.parentData.left+E.position.left;E.offset.top=E.parentData.top+E.position.top;var w=Math.abs((E._helper?E.offset.left-D.left:(E.offset.left-D.left))+E.sizeDiff.width),a=Math.abs((E._helper?E.offset.top-D.top:(E.offset.top-o.top))+E.sizeDiff.height);var x=E.containerElement.get(0)==E.element.parent().get(0),y=/relative|absolute/.test(E.containerElement.css(&quot;position&quot;));if(x&amp;&amp;y){w-=E.parentData.left}if(w+E.size.width&gt;=E.parentData.width){E.size.width=E.parentData.width-w;if(b){E.size.height=E.size.width/E.aspectRatio}}if(a+E.size.height&gt;=E.parentData.height){E.size.height=E.parentData.height-a;if(b){E.size.width=E.size.height*E.aspectRatio}}},stop:function(y,h){var b=f(this).data(&quot;resizable&quot;),x=b.options,r=b.position,o=b.containerOffset,z=b.containerPosition,w=b.containerElement;var v=f(b.helper),a=v.offset(),c=v.outerWidth()-b.sizeDiff.width,u=v.outerHeight()-b.sizeDiff.height;if(b._helper&amp;&amp;!x.animate&amp;&amp;(/relative/).test(w.css(&quot;position&quot;))){f(this).css({left:a.left-z.left-o.left,width:c,height:u})}if(b._helper&amp;&amp;!x.animate&amp;&amp;(/static/).test(w.css(&quot;position&quot;))){f(this).css({left:a.left-z.left-o.left,width:c,height:u})}}});f.ui.plugin.add(&quot;resizable&quot;,&quot;ghost&quot;,{start:function(c,b){var k=f(this).data(&quot;resizable&quot;),a=k.options,j=k.size;k.ghost=k.originalElement.clone();k.ghost.css({opacity:0.25,display:&quot;block&quot;,position:&quot;relative&quot;,height:j.height,width:j.width,margin:0,left:0,top:0}).addClass(&quot;ui-resizable-ghost&quot;).addClass(typeof a.ghost==&quot;string&quot;?a.ghost:&quot;&quot;);k.ghost.appendTo(k.helper)},resize:function(c,b){var h=f(this).data(&quot;resizable&quot;),a=h.options;if(h.ghost){h.ghost.css({position:&quot;relative&quot;,height:h.size.height,width:h.size.width})}},stop:function(c,b){var h=f(this).data(&quot;resizable&quot;),a=h.options;if(h.ghost&amp;&amp;h.helper){h.helper.get(0).removeChild(h.ghost.get(0))}}});f.ui.plugin.add(&quot;resizable&quot;,&quot;grid&quot;,{resize:function(x,c){var a=f(this).data(&quot;resizable&quot;),u=a.options,p=a.size,r=a.originalSize,q=a.originalPosition,b=a.axis,o=u._aspectRatio||x.shiftKey;u.grid=typeof u.grid==&quot;number&quot;?[u.grid,u.grid]:u.grid;var v=Math.round((p.width-r.width)/(u.grid[0]||1))*(u.grid[0]||1),w=Math.round((p.height-r.height)/(u.grid[1]||1))*(u.grid[1]||1);if(/^(se|s|e)$/.test(b)){a.size.width=r.width+v;a.size.height=r.height+w}else{if(/^(ne)$/.test(b)){a.size.width=r.width+v;a.size.height=r.height+w;a.position.top=q.top-w}else{if(/^(sw)$/.test(b)){a.size.width=r.width+v;a.size.height=r.height+w;a.position.left=q.left-v}else{a.size.width=r.width+v;a.size.height=r.height+w;a.position.top=q.top-w;a.position.left=q.left-v}}}}});var d=function(a){return parseInt(a,10)||0};var e=function(a){return !isNaN(parseInt(a,10))}})(jQuery);(function(b){b.widget(&quot;ui.selectable&quot;,b.extend({},b.ui.mouse,{_init:function(){var a=this;this.element.addClass(&quot;ui-selectable&quot;);this.dragged=false;var d;this.refresh=function(){d=b(a.options.filter,a.element[0]);d.each(function(){var f=b(this);var c=f.offset();b.data(this,&quot;selectable-item&quot;,{element:this,$element:f,left:c.left,top:c.top,right:c.left+f.outerWidth(),bottom:c.top+f.outerHeight(),startselected:false,selected:f.hasClass(&quot;ui-selected&quot;),selecting:f.hasClass(&quot;ui-selecting&quot;),unselecting:f.hasClass(&quot;ui-unselecting&quot;)})})};this.refresh();this.selectees=d.addClass(&quot;ui-selectee&quot;);this._mouseInit();this.helper=b(document.createElement(&quot;div&quot;)).css({border:&quot;1px dotted black&quot;}).addClass(&quot;ui-selectable-helper&quot;)},destroy:function(){this.element.removeClass(&quot;ui-selectable ui-selectable-disabled&quot;).removeData(&quot;selectable&quot;).unbind(&quot;.selectable&quot;);this._mouseDestroy()},_mouseStart:function(e){var a=this;this.opos=[e.pageX,e.pageY];if(this.options.disabled){return}var f=this.options;this.selectees=b(f.filter,this.element[0]);this._trigger(&quot;start&quot;,e);b(f.appendTo).append(this.helper);this.helper.css({&quot;z-index&quot;:100,position:&quot;absolute&quot;,left:e.clientX,top:e.clientY,width:0,height:0});if(f.autoRefresh){this.refresh()}this.selectees.filter(&quot;.ui-selected&quot;).each(function(){var c=b.data(this,&quot;selectable-item&quot;);c.startselected=true;if(!e.metaKey){c.$element.removeClass(&quot;ui-selected&quot;);c.selected=false;c.$element.addClass(&quot;ui-unselecting&quot;);c.unselecting=true;a._trigger(&quot;unselecting&quot;,e,{unselecting:c.element})}});b(e.target).parents().andSelf().each(function(){var c=b.data(this,&quot;selectable-item&quot;);if(c){c.$element.removeClass(&quot;ui-unselecting&quot;).addClass(&quot;ui-selecting&quot;);c.unselecting=false;c.selecting=true;c.selected=true;a._trigger(&quot;selecting&quot;,e,{selecting:c.element});return false}})},_mouseDrag:function(j){var p=this;this.dragged=true;if(this.options.disabled){return}var n=this.options;var o=this.opos[0],k=this.opos[1],a=j.pageX,l=j.pageY;if(o&gt;a){var m=a;a=o;o=m}if(k&gt;l){var m=l;l=k;k=m}this.helper.css({left:o,top:k,width:a-o,height:l-k});this.selectees.each(function(){var d=b.data(this,&quot;selectable-item&quot;);if(!d||d.element==p.element[0]){return}var c=false;if(n.tolerance==&quot;touch&quot;){c=(!(d.left&gt;a||d.right&lt;o||d.top&gt;l||d.bottom&lt;k))}else{if(n.tolerance==&quot;fit&quot;){c=(d.left&gt;o&amp;&amp;d.right&lt;a&amp;&amp;d.top&gt;k&amp;&amp;d.bottom&lt;l)}}if(c){if(d.selected){d.$element.removeClass(&quot;ui-selected&quot;);d.selected=false}if(d.unselecting){d.$element.removeClass(&quot;ui-unselecting&quot;);d.unselecting=false}if(!d.selecting){d.$element.addClass(&quot;ui-selecting&quot;);d.selecting=true;p._trigger(&quot;selecting&quot;,j,{selecting:d.element})}}else{if(d.selecting){if(j.metaKey&amp;&amp;d.startselected){d.$element.removeClass(&quot;ui-selecting&quot;);d.selecting=false;d.$element.addClass(&quot;ui-selected&quot;);d.selected=true}else{d.$element.removeClass(&quot;ui-selecting&quot;);d.selecting=false;if(d.startselected){d.$element.addClass(&quot;ui-unselecting&quot;);d.unselecting=true}p._trigger(&quot;unselecting&quot;,j,{unselecting:d.element})}}if(d.selected){if(!j.metaKey&amp;&amp;!d.startselected){d.$element.removeClass(&quot;ui-selected&quot;);d.selected=false;d.$element.addClass(&quot;ui-unselecting&quot;);d.unselecting=true;p._trigger(&quot;unselecting&quot;,j,{unselecting:d.element})}}}});return false},_mouseStop:function(e){var a=this;this.dragged=false;var f=this.options;b(&quot;.ui-unselecting&quot;,this.element[0]).each(function(){var c=b.data(this,&quot;selectable-item&quot;);c.$element.removeClass(&quot;ui-unselecting&quot;);c.unselecting=false;c.startselected=false;a._trigger(&quot;unselected&quot;,e,{unselected:c.element})});b(&quot;.ui-selecting&quot;,this.element[0]).each(function(){var c=b.data(this,&quot;selectable-item&quot;);c.$element.removeClass(&quot;ui-selecting&quot;).addClass(&quot;ui-selected&quot;);c.selecting=false;c.selected=true;c.startselected=true;a._trigger(&quot;selected&quot;,e,{selected:c.element})});this._trigger(&quot;stop&quot;,e);this.helper.remove();return false}}));b.extend(b.ui.selectable,{version:&quot;1.7.1&quot;,defaults:{appendTo:&quot;body&quot;,autoRefresh:true,cancel:&quot;:input,option&quot;,delay:0,distance:0,filter:&quot;*&quot;,tolerance:&quot;touch&quot;}})})(jQuery);(function(b){b.widget(&quot;ui.sortable&quot;,b.extend({},b.ui.mouse,{_init:function(){var a=this.options;this.containerCache={};this.element.addClass(&quot;ui-sortable&quot;);this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css(&quot;float&quot;)):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass(&quot;ui-sortable ui-sortable-disabled&quot;).removeData(&quot;sortable&quot;).unbind(&quot;.sortable&quot;);this._mouseDestroy();for(var a=this.items.length-1;a&gt;=0;a--){this.items[a].item.removeData(&quot;sortable-item&quot;)}},_mouseCapture:function(k,j){if(this.reverting){return false}if(this.options.disabled||this.options.type==&quot;static&quot;){return false}this._refreshItems(k);var l=null,m=this,a=b(k.target).parents().each(function(){if(b.data(this,&quot;sortable-item&quot;)==m){l=b(this);return false}});if(b.data(k.target,&quot;sortable-item&quot;)==m){l=b(k.target)}if(!l){return false}if(this.options.handle&amp;&amp;!j){var h=false;b(this.options.handle,l).find(&quot;*&quot;).andSelf().each(function(){if(this==k.target){h=true}});if(!h){return false}}this.currentItem=l;this._removeCurrentsFromItems();return true},_mouseStart:function(k,j,a){var h=this.options,m=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(k);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};this.helper.css(&quot;position&quot;,&quot;absolute&quot;);this.cssPosition=this.helper.css(&quot;position&quot;);b.extend(this.offset,{click:{left:k.pageX-this.offset.left,top:k.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(k);this.originalPageX=k.pageX;this.originalPageY=k.pageY;if(h.cursorAt){this._adjustOffsetFromHelper(h.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(h.containment){this._setContainment()}if(h.cursor){if(b(&quot;body&quot;).css(&quot;cursor&quot;)){this._storedCursor=b(&quot;body&quot;).css(&quot;cursor&quot;)}b(&quot;body&quot;).css(&quot;cursor&quot;,h.cursor)}if(h.opacity){if(this.helper.css(&quot;opacity&quot;)){this._storedOpacity=this.helper.css(&quot;opacity&quot;)}this.helper.css(&quot;opacity&quot;,h.opacity)}if(h.zIndex){if(this.helper.css(&quot;zIndex&quot;)){this._storedZIndex=this.helper.css(&quot;zIndex&quot;)}this.helper.css(&quot;zIndex&quot;,h.zIndex)}if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){this.overflowOffset=this.scrollParent.offset()}this._trigger(&quot;start&quot;,k,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!a){for(var l=this.containers.length-1;l&gt;=0;l--){this.containers[l]._trigger(&quot;activate&quot;,k,m._uiHash(this))}}if(b.ui.ddmanager){b.ui.ddmanager.current=this}if(b.ui.ddmanager&amp;&amp;!h.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,k)}this.dragging=true;this.helper.addClass(&quot;ui-sortable-helper&quot;);this._mouseDrag(k);return true},_mouseDrag:function(l){this.position=this._generatePosition(l);this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var k=this.options,a=false;if(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0].tagName!=&quot;HTML&quot;){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-l.pageY&lt;k.scrollSensitivity){this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop+k.scrollSpeed}else{if(l.pageY-this.overflowOffset.top&lt;k.scrollSensitivity){this.scrollParent[0].scrollTop=a=this.scrollParent[0].scrollTop-k.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-l.pageX&lt;k.scrollSensitivity){this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft+k.scrollSpeed}else{if(l.pageX-this.overflowOffset.left&lt;k.scrollSensitivity){this.scrollParent[0].scrollLeft=a=this.scrollParent[0].scrollLeft-k.scrollSpeed}}}else{if(l.pageY-b(document).scrollTop()&lt;k.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()-k.scrollSpeed)}else{if(b(window).height()-(l.pageY-b(document).scrollTop())&lt;k.scrollSensitivity){a=b(document).scrollTop(b(document).scrollTop()+k.scrollSpeed)}}if(l.pageX-b(document).scrollLeft()&lt;k.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()-k.scrollSpeed)}else{if(b(window).width()-(l.pageX-b(document).scrollLeft())&lt;k.scrollSensitivity){a=b(document).scrollLeft(b(document).scrollLeft()+k.scrollSpeed)}}}if(a!==false&amp;&amp;b.ui.ddmanager&amp;&amp;!k.dropBehaviour){b.ui.ddmanager.prepareOffsets(this,l)}}this.positionAbs=this._convertPositionTo(&quot;absolute&quot;);if(!this.options.axis||this.options.axis!=&quot;y&quot;){this.helper[0].style.left=this.position.left+&quot;px&quot;}if(!this.options.axis||this.options.axis!=&quot;x&quot;){this.helper[0].style.top=this.position.top+&quot;px&quot;}for(var n=this.items.length-1;n&gt;=0;n--){var m=this.items[n],o=m.item[0],j=this._intersectsWithPointer(m);if(!j){continue}if(o!=this.currentItem[0]&amp;&amp;this.placeholder[j==1?&quot;next&quot;:&quot;prev&quot;]()[0]!=o&amp;&amp;!b.ui.contains(this.placeholder[0],o)&amp;&amp;(this.options.type==&quot;semi-dynamic&quot;?!b.ui.contains(this.element[0],o):true)){this.direction=j==1?&quot;down&quot;:&quot;up&quot;;if(this.options.tolerance==&quot;pointer&quot;||this._intersectsWithSides(m)){this._rearrange(l,m)}else{break}this._trigger(&quot;change&quot;,l,this._uiHash());break}}this._contactContainers(l);if(b.ui.ddmanager){b.ui.ddmanager.drag(this,l)}this._trigger(&quot;sort&quot;,l,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(h,g){if(!h){return}if(b.ui.ddmanager&amp;&amp;!this.options.dropBehaviour){b.ui.ddmanager.drop(this,h)}if(this.options.revert){var a=this;var f=a.placeholder.offset();a.reverting=true;b(this.helper).animate({left:f.left-this.offset.parent.left-a.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-a.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){a._clear(h)})}else{this._clear(h,g)}return false},cancel:function(){var a=this;if(this.dragging){this._mouseUp();if(this.options.helper==&quot;original&quot;){this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}for(var d=this.containers.length-1;d&gt;=0;d--){this.containers[d]._trigger(&quot;deactivate&quot;,null,a._uiHash(this));if(this.containers[d].containerCache.over){this.containers[d]._trigger(&quot;out&quot;,null,a._uiHash(this));this.containers[d].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=&quot;original&quot;&amp;&amp;this.helper&amp;&amp;this.helper[0].parentNode){this.helper.remove()}b.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){b(this.domPosition.prev).after(this.currentItem)}else{b(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(e){var a=this._getItemsAsjQuery(e&amp;&amp;e.connected);var f=[];e=e||{};b(a).each(function(){var c=(b(e.item||this).attr(e.attribute||&quot;id&quot;)||&quot;&quot;).match(e.expression||(/(.+)[-=_](.+)/));if(c){f.push((e.key||c[1]+&quot;[]&quot;)+&quot;=&quot;+(e.key&amp;&amp;e.expression?c[1]:c[2]))}});return f.join(&quot;&amp;&quot;)},toArray:function(e){var a=this._getItemsAsjQuery(e&amp;&amp;e.connected);var f=[];e=e||{};a.each(function(){f.push(b(e.item||this).attr(e.attribute||&quot;id&quot;)||&quot;&quot;)});return f},_intersectsWith:function(p){var y=this.positionAbs.left,z=y+this.helperProportions.width,q=this.positionAbs.top,r=q+this.helperProportions.height;var x=p.left,A=x+p.width,l=p.top,u=l+p.height;var a=this.offset.click.top,v=this.offset.click.left;var w=(q+a)&gt;l&amp;&amp;(q+a)&lt;u&amp;&amp;(y+v)&gt;x&amp;&amp;(y+v)&lt;A;if(this.options.tolerance==&quot;pointer&quot;||this.options.forcePointerForContainers||(this.options.tolerance!=&quot;pointer&quot;&amp;&amp;this.helperProportions[this.floating?&quot;width&quot;:&quot;height&quot;]&gt;p[this.floating?&quot;width&quot;:&quot;height&quot;])){return w}else{return(x&lt;y+(this.helperProportions.width/2)&amp;&amp;z-(this.helperProportions.width/2)&lt;A&amp;&amp;l&lt;q+(this.helperProportions.height/2)&amp;&amp;r-(this.helperProportions.height/2)&lt;u)}},_intersectsWithPointer:function(l){var k=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,l.top,l.height),m=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,l.left,l.width),h=k&amp;&amp;m,a=this._getDragVerticalDirection(),j=this._getDragHorizontalDirection();if(!h){return false}return this.floating?(((j&amp;&amp;j==&quot;right&quot;)||a==&quot;down&quot;)?2:1):(a&amp;&amp;(a==&quot;down&quot;?2:1))},_intersectsWithSides:function(h){var k=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,h.top+(h.height/2),h.height),j=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,h.left+(h.width/2),h.width),a=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(this.floating&amp;&amp;g){return((g==&quot;right&quot;&amp;&amp;j)||(g==&quot;left&quot;&amp;&amp;!j))}else{return a&amp;&amp;((a==&quot;down&quot;&amp;&amp;k)||(a==&quot;up&quot;&amp;&amp;!k))}},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&amp;&amp;(a&gt;0?&quot;down&quot;:&quot;up&quot;)},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&amp;&amp;(a&gt;0?&quot;right&quot;:&quot;left&quot;)},refresh:function(a){this._refreshItems(a);this.refreshPositions()},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(u){var a=this;var n=[];var p=[];var m=this._connectWith();if(m&amp;&amp;u){for(var q=m.length-1;q&gt;=0;q--){var j=b(m[q]);for(var r=j.length-1;r&gt;=0;r--){var o=b.data(j[r],&quot;sortable&quot;);if(o&amp;&amp;o!=this&amp;&amp;!o.options.disabled){p.push([b.isFunction(o.options.items)?o.options.items.call(o.element):b(o.options.items,o.element).not(&quot;.ui-sortable-helper&quot;),o])}}}}p.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not(&quot;.ui-sortable-helper&quot;),this]);for(var q=p.length-1;q&gt;=0;q--){p[q][0].each(function(){n.push(this)})}return b(n)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(&quot;:data(sortable-item)&quot;);for(var f=0;f&lt;this.items.length;f++){for(var a=0;a&lt;e.length;a++){if(e[a]==this.items[f].item[0]){this.items.splice(f,1)}}}},_refreshItems:function(C){this.items=[];this.containers=[this];var w=this.items;var a=this;var y=[[b.isFunction(this.options.items)?this.options.items.call(this.element[0],C,{item:this.currentItem}):b(this.options.items,this.element),this]];var u=this._connectWith();if(u){for(var z=u.length-1;z&gt;=0;z--){var r=b(u[z]);for(var A=r.length-1;A&gt;=0;A--){var x=b.data(r[A],&quot;sortable&quot;);if(x&amp;&amp;x!=this&amp;&amp;!x.options.disabled){y.push([b.isFunction(x.options.items)?x.options.items.call(x.element[0],C,{item:this.currentItem}):b(x.options.items,x.element),x]);this.containers.push(x)}}}}for(var z=y.length-1;z&gt;=0;z--){var v=y[z][1];var B=y[z][0];for(var A=0,q=B.length;A&lt;q;A++){var j=b(B[A]);j.data(&quot;sortable-item&quot;,v);w.push({item:j,instance:v,width:0,height:0,left:0,top:0})}}},refreshPositions:function(a){if(this.offsetParent&amp;&amp;this.helper){this.offset.parent=this._getParentOffset()}for(var j=this.items.length-1;j&gt;=0;j--){var h=this.items[j];if(h.instance!=this.currentContainer&amp;&amp;this.currentContainer&amp;&amp;h.item[0]!=this.currentItem[0]){continue}var k=this.options.toleranceElement?b(this.options.toleranceElement,h.item):h.item;if(!a){h.width=k.outerWidth();h.height=k.outerHeight()}var g=k.offset();h.left=g.left;h.top=g.top}if(this.options.custom&amp;&amp;this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var j=this.containers.length-1;j&gt;=0;j--){var g=this.containers[j].element.offset();this.containers[j].containerCache.left=g.left;this.containers[j].containerCache.top=g.top;this.containers[j].containerCache.width=this.containers[j].element.outerWidth();this.containers[j].containerCache.height=this.containers[j].element.outerHeight()}}},_createPlaceholder:function(g){var a=g||this,f=a.options;if(!f.placeholder||f.placeholder.constructor==String){var h=f.placeholder;f.placeholder={element:function(){var c=b(document.createElement(a.currentItem[0].nodeName)).addClass(h||a.currentItem[0].className+&quot; ui-sortable-placeholder&quot;).removeClass(&quot;ui-sortable-helper&quot;)[0];if(!h){c.style.visibility=&quot;hidden&quot;}return c},update:function(d,c){if(h&amp;&amp;!f.forcePlaceholderSize){return}if(!c.height()){c.height(a.currentItem.innerHeight()-parseInt(a.currentItem.css(&quot;paddingTop&quot;)||0,10)-parseInt(a.currentItem.css(&quot;paddingBottom&quot;)||0,10))}if(!c.width()){c.width(a.currentItem.innerWidth()-parseInt(a.currentItem.css(&quot;paddingLeft&quot;)||0,10)-parseInt(a.currentItem.css(&quot;paddingRight&quot;)||0,10))}}}}a.placeholder=b(f.placeholder.element.call(a.element,a.currentItem));a.currentItem.after(a.placeholder);f.placeholder.update(a,a.placeholder)},_contactContainers:function(n){for(var o=this.containers.length-1;o&gt;=0;o--){if(this._intersectsWith(this.containers[o].containerCache)){if(!this.containers[o].containerCache.over){if(this.currentContainer!=this.containers[o]){var j=10000;var k=null;var m=this.positionAbs[this.containers[o].floating?&quot;left&quot;:&quot;top&quot;];for(var a=this.items.length-1;a&gt;=0;a--){if(!b.ui.contains(this.containers[o].element[0],this.items[a].item[0])){continue}var l=this.items[a][this.containers[o].floating?&quot;left&quot;:&quot;top&quot;];if(Math.abs(l-m)&lt;j){j=Math.abs(l-m);k=this.items[a]}}if(!k&amp;&amp;!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[o];k?this._rearrange(n,k,null,true):this._rearrange(n,null,this.containers[o].element,true);this._trigger(&quot;change&quot;,n,this._uiHash());this.containers[o]._trigger(&quot;change&quot;,n,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[o]._trigger(&quot;over&quot;,n,this._uiHash(this));this.containers[o].containerCache.over=1}}else{if(this.containers[o].containerCache.over){this.containers[o]._trigger(&quot;out&quot;,n,this._uiHash(this));this.containers[o].containerCache.over=0}}}},_createHelper:function(f){var e=this.options;var a=b.isFunction(e.helper)?b(e.helper.apply(this.element[0],[f,this.currentItem])):(e.helper==&quot;clone&quot;?this.currentItem.clone():this.currentItem);if(!a.parents(&quot;body&quot;).length){b(e.appendTo!=&quot;parent&quot;?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(a[0])}if(a[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css(&quot;position&quot;),top:this.currentItem.css(&quot;top&quot;),left:this.currentItem.css(&quot;left&quot;)}}if(a[0].style.width==&quot;&quot;||e.forceHelperSize){a.width(this.currentItem.width())}if(a[0].style.height==&quot;&quot;||e.forceHelperSize){a.height(this.currentItem.height())}return a},_adjustOffsetFromHelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperProportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition==&quot;absolute&quot;&amp;&amp;this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&amp;&amp;this.offsetParent[0].tagName.toLowerCase()==&quot;html&quot;&amp;&amp;b.browser.msie)){a={top:0,left:0}}return{top:a.top+(parseInt(this.offsetParent.css(&quot;borderTopWidth&quot;),10)||0),left:a.left+(parseInt(this.offsetParent.css(&quot;borderLeftWidth&quot;),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==&quot;relative&quot;){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css(&quot;top&quot;),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css(&quot;left&quot;),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css(&quot;marginLeft&quot;),10)||0),top:(parseInt(this.currentItem.css(&quot;marginTop&quot;),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f=this.options;if(f.containment==&quot;parent&quot;){f.containment=this.helper[0].parentNode}if(f.containment==&quot;document&quot;||f.containment==&quot;window&quot;){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment==&quot;document&quot;?document:window).width()-this.helperProportions.width-this.margins.left,(b(f.containment==&quot;document&quot;?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(f.containment)){var h=b(f.containment)[0];var g=b(f.containment).offset();var a=(b(h).css(&quot;overflow&quot;)!=&quot;hidden&quot;);this.containment=[g.left+(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingLeft&quot;),10)||0)-this.margins.left,g.top+(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)+(parseInt(b(h).css(&quot;paddingTop&quot;),10)||0)-this.margins.top,g.left+(a?Math.max(h.scrollWidth,h.offsetWidth):h.offsetWidth)-(parseInt(b(h).css(&quot;borderLeftWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingRight&quot;),10)||0)-this.helperProportions.width-this.margins.left,g.top+(a?Math.max(h.scrollHeight,h.offsetHeight):h.offsetHeight)-(parseInt(b(h).css(&quot;borderTopWidth&quot;),10)||0)-(parseInt(b(h).css(&quot;paddingBottom&quot;),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(k,d){if(!d){d=this.position}var m=k==&quot;absolute&quot;?1:-1;var l=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);return{top:(d.top+this.offset.relative.top*m+this.offset.parent.top*m-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop()))*m)),left:(d.left+this.offset.relative.left*m+this.offset.parent.left*m-(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())*m))}},_generatePosition:function(n){var k=this.options,a=this.cssPosition==&quot;absolute&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,j=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition==&quot;relative&quot;&amp;&amp;!(this.scrollParent[0]!=document&amp;&amp;this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var o=n.pageX;var p=n.pageY;if(this.originalPosition){if(this.containment){if(n.pageX-this.offset.click.left&lt;this.containment[0]){o=this.containment[0]+this.offset.click.left}if(n.pageY-this.offset.click.top&lt;this.containment[1]){p=this.containment[1]+this.offset.click.top}if(n.pageX-this.offset.click.left&gt;this.containment[2]){o=this.containment[2]+this.offset.click.left}if(n.pageY-this.offset.click.top&gt;this.containment[3]){p=this.containment[3]+this.offset.click.top}}if(k.grid){var l=this.originalPageY+Math.round((p-this.originalPageY)/k.grid[1])*k.grid[1];p=this.containment?(!(l-this.offset.click.top&lt;this.containment[1]||l-this.offset.click.top&gt;this.containment[3])?l:(!(l-this.offset.click.top&lt;this.containment[1])?l-k.grid[1]:l+k.grid[1])):l;var m=this.originalPageX+Math.round((o-this.originalPageX)/k.grid[0])*k.grid[0];o=this.containment?(!(m-this.offset.click.left&lt;this.containment[0]||m-this.offset.click.left&gt;this.containment[2])?m:(!(m-this.offset.click.left&lt;this.containment[0])?m-k.grid[0]:m+k.grid[0])):m}}return{top:(p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollTop():(j?0:a.scrollTop())))),left:(o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&amp;&amp;this.cssPosition==&quot;fixed&quot;?0:(this.cssPosition==&quot;fixed&quot;?-this.scrollParent.scrollLeft():j?0:a.scrollLeft())))}},_rearrange:function(h,j,m,k){m?m[0].appendChild(this.placeholder[0]):j.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==&quot;down&quot;?j.item[0]:j.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var l=this,a=this.counter;window.setTimeout(function(){if(a==l.counter){l.refreshPositions(!k)}},0)},_clear:function(j,h){this.reverting=false;var g=[],a=this;if(!this._noFinalSort&amp;&amp;this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var k in this._storedCSS){if(this._storedCSS[k]==&quot;auto&quot;||this._storedCSS[k]==&quot;static&quot;){this._storedCSS[k]=&quot;&quot;}}this.currentItem.css(this._storedCSS).removeClass(&quot;ui-sortable-helper&quot;)}else{this.currentItem.show()}if(this.fromOutside&amp;&amp;!h){g.push(function(c){this._trigger(&quot;receive&quot;,c,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(&quot;.ui-sortable-helper&quot;)[0]||this.domPosition.parent!=this.currentItem.parent()[0])&amp;&amp;!h){g.push(function(c){this._trigger(&quot;update&quot;,c,this._uiHash())})}if(!b.ui.contains(this.element[0],this.currentItem[0])){if(!h){g.push(function(c){this._trigger(&quot;remove&quot;,c,this._uiHash())})}for(var k=this.containers.length-1;k&gt;=0;k--){if(b.ui.contains(this.containers[k].element[0],this.currentItem[0])&amp;&amp;!h){g.push((function(c){return function(d){c._trigger(&quot;receive&quot;,d,this._uiHash(this))}}).call(this,this.containers[k]));g.push((function(c){return function(d){c._trigger(&quot;update&quot;,d,this._uiHash(this))}}).call(this,this.containers[k]))}}}for(var k=this.containers.length-1;k&gt;=0;k--){if(!h){g.push((function(c){return function(d){c._trigger(&quot;deactivate&quot;,d,this._uiHash(this))}}).call(this,this.containers[k]))}if(this.containers[k].containerCache.over){g.push((function(c){return function(d){c._trigger(&quot;out&quot;,d,this._uiHash(this))}}).call(this,this.containers[k]));this.containers[k].containerCache.over=0}}if(this._storedCursor){b(&quot;body&quot;).css(&quot;cursor&quot;,this._storedCursor)}if(this._storedOpacity){this.helper.css(&quot;opacity&quot;,this._storedOpacity)}if(this._storedZIndex){this.helper.css(&quot;zIndex&quot;,this._storedZIndex==&quot;auto&quot;?&quot;&quot;:this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!h){this._trigger(&quot;beforeStop&quot;,j,this._uiHash());for(var k=0;k&lt;g.length;k++){g[k].call(this,j)}this._trigger(&quot;stop&quot;,j,this._uiHash())}return false}if(!h){this._trigger(&quot;beforeStop&quot;,j,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!h){for(var k=0;k&lt;g.length;k++){g[k].call(this,j)}this._trigger(&quot;stop&quot;,j,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(b.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(d){var a=d||this;return{helper:a.helper,placeholder:a.placeholder||b([]),position:a.position,absolutePosition:a.positionAbs,offset:a.positionAbs,item:a.currentItem,sender:d?d.element:null}}}));b.extend(b.ui.sortable,{getter:&quot;serialize toArray&quot;,version:&quot;1.7.1&quot;,eventPrefix:&quot;sort&quot;,defaults:{appendTo:&quot;parent&quot;,axis:false,cancel:&quot;:input,option&quot;,connectWith:false,containment:false,cursor:&quot;auto&quot;,cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:&quot;original&quot;,items:&quot;&gt; *&quot;,opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:&quot;default&quot;,tolerance:&quot;intersect&quot;,zIndex:1000}})})(jQuery);(function(b){b.widget(&quot;ui.accordion&quot;,{_init:function(){var e=this.options,a=this;this.running=0;if(e.collapsible==b.ui.accordion.defaults.collapsible&amp;&amp;e.alwaysOpen!=b.ui.accordion.defaults.alwaysOpen){e.collapsible=!e.alwaysOpen}if(e.navigation){var f=this.element.find(&quot;a&quot;).filter(e.navigationFilter);if(f.length){if(f.filter(e.header).length){this.active=f}else{this.active=f.parent().parent().prev();f.addClass(&quot;ui-accordion-content-active&quot;)}}}this.element.addClass(&quot;ui-accordion ui-widget ui-helper-reset&quot;);if(this.element[0].nodeName==&quot;UL&quot;){this.element.children(&quot;li&quot;).addClass(&quot;ui-accordion-li-fix&quot;)}this.headers=this.element.find(e.header).addClass(&quot;ui-accordion-header ui-helper-reset ui-state-default ui-corner-all&quot;).bind(&quot;mouseenter.accordion&quot;,function(){b(this).addClass(&quot;ui-state-hover&quot;)}).bind(&quot;mouseleave.accordion&quot;,function(){b(this).removeClass(&quot;ui-state-hover&quot;)}).bind(&quot;focus.accordion&quot;,function(){b(this).addClass(&quot;ui-state-focus&quot;)}).bind(&quot;blur.accordion&quot;,function(){b(this).removeClass(&quot;ui-state-focus&quot;)});this.headers.next().addClass(&quot;ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom&quot;);this.active=this._findActive(this.active||e.active).toggleClass(&quot;ui-state-default&quot;).toggleClass(&quot;ui-state-active&quot;).toggleClass(&quot;ui-corner-all&quot;).toggleClass(&quot;ui-corner-top&quot;);this.active.next().addClass(&quot;ui-accordion-content-active&quot;);b(&quot;&lt;span/&gt;&quot;).addClass(&quot;ui-icon &quot;+e.icons.header).prependTo(this.headers);this.active.find(&quot;.ui-icon&quot;).toggleClass(e.icons.header).toggleClass(e.icons.headerSelected);if(b.browser.msie){this.element.find(&quot;a&quot;).css(&quot;zoom&quot;,&quot;1&quot;)}this.resize();this.element.attr(&quot;role&quot;,&quot;tablist&quot;);this.headers.attr(&quot;role&quot;,&quot;tab&quot;).bind(&quot;keydown&quot;,function(c){return a._keydown(c)}).next().attr(&quot;role&quot;,&quot;tabpanel&quot;);this.headers.not(this.active||&quot;&quot;).attr(&quot;aria-expanded&quot;,&quot;false&quot;).attr(&quot;tabIndex